Exemplo n.º 1
0
 /**
  * @param array $twitterId
  * @param $orderType
  * @param $maxItemDisplayed
  * @return array
  */
 public static function getTwitterList($twitterId = array(), $orderType = 0, $maxItemDisplayed = 10, $params = array())
 {
     JModelLegacy::addIncludePath(JPATH_ROOT . '/components/com_redtwitter/models', 'redtwitterModelfollowedprofiles');
     $model = JModelLegacy::getInstance('followedprofiles', 'redtwitterModel', array('ignore_request' => true));
     $twitterUserList =& $model->getData($twitterId);
     $twitterDataTimelines = RedtwitterHelper::getAllUserTimeline($twitterUserList, $orderType, $maxItemDisplayed, $params);
     return $twitterDataTimelines;
 }
Exemplo n.º 2
0
?>
	</style>
	<h1 class="componentheading<?php 
echo $this->params->get('pageclass_sfx');
?>
">
		<?php 
echo $this->params->get('page_title');
?>
	</h1>
<?php 
$cache = JFactory::getCache();
$cache->setCaching(1);
include_once JPATH_COMPONENT_SITE . '/helpers/redtwitter.php';
echo '<div id="tweetlist">';
$array1 = RedtwitterHelper::getAllUserTimeline($this->lists);
if (count($array1) > 0) {
    $b = 1;
    foreach ($array1 as $key => $val) {
        $date = new DateTime($val['pdate']);
        $dt1 = $date->format($this->params->get("date", 'Y-m-d'));
        $dt = strtotime($dt1);
        $title = $val['title'];
        $change_contents = $title;
        $change_con = explode("http://", $change_contents);
        if (count($change_con) > 0) {
            foreach ($change_con as $f) {
                $ifr1 = explode(" ", $f);
                $mytxt1 = "" . $ifr1[0] . "";
                $mylink1 = str_replace($ifr1[0], ".", $ifr1[0]);
                $mylink1 = str_replace($mylink1, ",", $mylink1);