コード例 #1
0
 function onPromoteData($id)
 {
     $db = JFactory::getDBO();
     $Itemid = JRequest::getInt('Itemid');
     $eschk = $this->_chkextension();
     if (!empty($eschk)) {
         /*$query = "SELECT cf.id FROM #__community_fields as cf
         				LEFT JOIN #__community_fields_values AS cfv ON cfv.field_id=cf.id
         				WHERE cf.name like '%About me%' AND cfv.user_id=".$id;
         		$db->setQuery($query);
         		$fieldid = $db->loadresult();
         		*/
         $query = "SELECT u.name AS title\n\t\t\t\t\t\tFROM #__users AS u\n\t\t\t\t\t\tWHERE u.id =" . $id;
         $db->setQuery($query);
         $previewdata = $db->loadobjectlist();
         //if($fieldid)
         //$query .= " AND cfv.field_id=".$fieldid;
         require_once JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php';
         $user = Foundry::user($id);
         //easysocial data for user
         $activitysocialintegrationprofiledata = new activitysocialintegrationprofiledata();
         $img_path = $activitysocialintegrationprofiledata->getUserAvatar('EasySocial', JFactory::getUser($id));
         $link = $activitysocialintegrationprofiledata->getUserProfileUrl('EasySocial', $id);
         $previewdata[0]->image = $img_path;
         $previewdata[0]->url = JUri::root() . substr(JRoute::_($link, false), strlen(JUri::base(true)) + 1);
         $previewdata[0]->bodytext = '';
         return $previewdata;
     } else {
         return '';
     }
 }
コード例 #2
0
ファイル: users.php プロジェクト: BetterBetterBetter/B3App
		<div class="row-fluid">
					<div class="span12 well well-small">
						<div align="center"><h4><?php 
echo JText::_('COM_QUICK2CART_WHO_BOUGHT');
?>
</h4></div>
						<ul class="center thumbnails qtc_ForLiStyle" >
							<?php 
$i = 0;
foreach ($peopleWhoBought as $data) {
    $i++;
    $libclass = new activitysocialintegrationprofiledata();
    ?>
								<li>
									<a href="<?php 
    echo $libclass->getUserProfileUrl($socialintegration, $data->id);
    ?>
">
											<img title="<?php 
    echo $data->name;
    ?>
" alt="Image Not Found" src="<?php 
    echo $libclass->getUserAvatar($socialintegration, $data);
    ?>
" class="user-bought img-rounded ">
									</a>
								</li>
							<?php 
}
?>