Beispiel #1
0
function b_yogurt_lastpictures_show($options)
{
    global $xoopsDB, $xoopsModule, $xoopsModuleConfig;
    $myts =& MyTextSanitizer::getInstance();
    $block = array();
    /**
     * Filter for fetch votes ishot and isnothot
     */
    $criteria = new criteria('cod_img', 0, ">");
    $criteria->setSort("cod_img");
    $criteria->setOrder("DESC");
    $criteria->setLimit($options[0]);
    /**
     * Creating factories of pictures and votes
     */
    //$album_factory      = new Xoopsyogurt_imagesHandler($xoopsDB);
    $pictures_factory = new Xoopsyogurt_imagesHandler($xoopsDB);
    $block = $pictures_factory->getLastPicturesForBlock($options[0]);
    return $block;
}
Beispiel #2
0
include_once '../../mainfile.php';
$xoopsOption['template_main'] = 'yogurt_seutubo.html';
include_once '../../header.php';
include_once 'class/yogurt_controler.php';
$controler = new YogurtVideoControler($xoopsDB, $xoopsUser);
/**
* Fecthing numbers of tribes friends videos pictures etc...
*/
$nbSections = $controler->getNumbersSections();
$start = isset($_GET['start']) ? intval($_GET['start']) : 0;
/**
* Criteria for Videos
*/
$criteriaUidVideo = new criteria('uid_owner', $controler->uidOwner);
$criteriaUidVideo->setStart($start);
$criteriaUidVideo->setLimit($xoopsModuleConfig['videosperpage']);
/**
* Get all videos of this user and assign them to template
*/
$videos = $controler->getVideos($criteriaUidVideo);
$videos_array = $controler->assignVideoContent($nbSections['nbVideos'], $videos);
if (is_array($videos_array)) {
    $xoopsTpl->assign('videos', $videos_array);
} else {
    $xoopsTpl->assign('lang_novideoyet', _MD_YOGURT_NOVIDEOSYET);
}
$pageNav = $controler->VideosNavBar($nbSections['nbVideos'], $xoopsModuleConfig['videosperpage'], $start, 2);
/**
* Adding to the module js and css of the lightbox and new ones
*/
$xoTheme->addStylesheet(XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/include/yogurt.css');
Beispiel #3
0
include_once '../../mainfile.php';
$xoopsOption['template_main'] = 'yogurt_audio.html';
include_once '../../header.php';
include_once 'class/yogurt_controler.php';
$controler = new YogurtAudioControler($xoopsDB, $xoopsUser);
/**
* Fecthing numbers of tribes friends videos pictures etc...
*/
$nbSections = $controler->getNumbersSections();
$start = isset($_GET['start']) ? intval($_GET['start']) : 0;
/**
* Criteria for Audio
*/
$criteriaUidAudio = new criteria('uid_owner', $controler->uidOwner);
$criteriaUidAudio->setStart($start);
$criteriaUidAudio->setLimit($xoopsModuleConfig['audiosperpage']);
/**
* Get all audios of this user and assign them to template
*/
$audios = $controler->getAudio($criteriaUidAudio);
$audios_array = $controler->assignAudioContent($nbSections['nbAudio'], $audios);
if (is_array($audios_array)) {
    $xoopsTpl->assign('audios', $audios_array);
    $audio_list = '';
    foreach ($audios_array as $audio_item) {
        $audio_list .= '../../uploads/yogurt/mp3/' . $audio_item['url'] . ' | ';
    }
    //$audio_list = substr($audio_list,-2);
    $xoopsTpl->assign('audio_list', $audio_list);
} else {
    $xoopsTpl->assign('lang_noaudioyet', _MD_YOGURT_NOAUDIOYET);
Beispiel #4
0
 public static function getForExpertCategory($iCategoryId)
 {
     $c = new criteria();
     $c->addJoin(UserPeer::ID, ExpertCategoryPeer::USER_ID, Criteria::JOIN);
     $c->add(ExpertCategoryPeer::CATEGORY_ID, $iCategoryId);
     $c->addDescendingOrderbyColumn(UserPeer::POINTS);
     $c->setLimit(5);
     $c->setDistinct();
     return UserPeer::doSelect($c);
 }