BI Portal added to sap blog list
This commit is contained in:
@@ -536,7 +536,7 @@ class Databap extends PhpObject
|
||||
{
|
||||
//Title & link
|
||||
case 'font-color-normal':
|
||||
$asArticleInfo['title'] = ucfirst(trim($oLink->nodeValue));
|
||||
$asArticleInfo['title'] = trim($oLink->nodeValue);
|
||||
$asArticleInfo['title'] = mb_substr($asArticleInfo['title'], -1)=='.'?mb_substr($asArticleInfo['title'], 0, -1):$asArticleInfo['title'];
|
||||
$asArticleInfo['link'] = $oLink->getAttribute('href');
|
||||
$asArticleInfo['date'] = mb_substr(str_replace(array($sSAPBlogUrl.'/', '/'), array('', '-'), $asArticleInfo['link']), 0, 10);
|
||||
@@ -555,7 +555,39 @@ class Databap extends PhpObject
|
||||
}
|
||||
}
|
||||
|
||||
//TODO add http://www.biportal.org/sap_bi_blog
|
||||
//BI Portal
|
||||
$oDom = $this->getRemotePageDom('http://www.biportal.org/sap_bi_blog');
|
||||
$aoArticles = $oDom->getElementsByTagName('li');
|
||||
foreach($aoArticles as $oArticle)
|
||||
{
|
||||
if($oArticle->getAttribute('class')=='boxesListItem' && $oArticle->getAttribute('id') > 0)
|
||||
{
|
||||
$asArticleInfo = array();
|
||||
$aoLinks = $oArticle->getElementsByTagName('a');
|
||||
$oLink = $aoLinks->item(0);
|
||||
|
||||
$asArticleInfo['link'] = $oLink->getAttribute('href');
|
||||
$asArticleInfo['title'] = trim($oLink->nodeValue);
|
||||
|
||||
$aoLinks = $oArticle->getElementsByTagName('span');
|
||||
foreach($aoLinks as $oLink)
|
||||
{
|
||||
switch($oLink->getAttribute('class'))
|
||||
{
|
||||
case 'postedOn':
|
||||
$asArticleInfo['date'] = date(self::DATE_SQL_FORMAT, strtotime($oLink->nodeValue));
|
||||
break;
|
||||
case 'postedByLink':
|
||||
$sName = trim($oLink->firstChild->nodeValue);
|
||||
$asArticleInfo['first_name'] = strstr($sName, ' ', true);
|
||||
$asArticleInfo['last_name'] = substr(strstr($sName, ' '), 1);
|
||||
$asArticleInfo['email'] = $oLink->firstChild->getAttribute('href');
|
||||
break;
|
||||
}
|
||||
}
|
||||
$asArticles[] = $asArticleInfo;
|
||||
}
|
||||
}
|
||||
|
||||
//SAP BW BW
|
||||
$oDom = $this->getRemotePageDom('http://sapbwbw.com/');
|
||||
@@ -566,15 +598,12 @@ class Databap extends PhpObject
|
||||
{
|
||||
$asArticleInfo = array();
|
||||
$aoLinks = $oArticle->getElementsByTagName('a');
|
||||
foreach($aoLinks as $oLink)
|
||||
{
|
||||
$asArticleInfo['link'] = $oLink->getAttribute('href');
|
||||
$asArticleInfo['title'] = ucfirst(trim($oLink->nodeValue));
|
||||
break;
|
||||
}
|
||||
$aoLinks = $oArticle->getElementsByTagName('time');
|
||||
foreach($aoLinks as $iCount=>$oLink) break;
|
||||
$oLink = $aoLinks->item(0);
|
||||
$asArticleInfo['link'] = $oLink->getAttribute('href');
|
||||
$asArticleInfo['title'] = trim($oLink->nodeValue);
|
||||
|
||||
$aoLinks = $oArticle->getElementsByTagName('time');
|
||||
$oLink = $aoLinks->item(0);
|
||||
$asArticleInfo['date'] = mb_substr($oLink->getAttribute('datetime'), 0, 10);
|
||||
$asArticleInfo['first_name'] = 'Claudio';
|
||||
$asArticleInfo['last_name'] = 'Ciardelli';
|
||||
|
||||
1
todo
1
todo
@@ -14,7 +14,6 @@ Bug fix:
|
||||
|
||||
Améliorations
|
||||
- [1.0.0] Importer la liste des tables de Christophe
|
||||
- Ajouter les blogs sap (see databap.php)
|
||||
- Son pour les nouveaux messages
|
||||
- liste complète : ajouter des tabs pour sélectionner soit code, soit article, soit table...
|
||||
- [1.1.0] Chat : compatibilité mobile (utiliser la fonctionnalité ff)
|
||||
|
||||
Reference in New Issue
Block a user