Exemplo n.º 1
0
    ($hook = vBulletinHook::fetch_hook('album_album_complete')) ? eval($hook) : false;
    // navbar and final output
    $navbits = construct_navbits(array('member.php?' . $vbulletin->session->vars['sessionurl'] . "u={$userinfo['userid']}" => construct_phrase($vbphrase['xs_profile'], $userinfo['username']), 'album.php?' . $vbulletin->session->vars['sessionurl'] . "u={$userinfo['userid']}" => $vbphrase['albums'], '' => $albuminfo['title_html']));
    eval('$navbar = "' . fetch_template('navbar') . '";');
    //$headinclude .= '<style type="text/css">#picturebits table { border: 1px solid red; }</style>';
    eval('print_output("' . fetch_template('album_picturelist') . '");');
}
// #######################################################################
if ($_REQUEST['do'] == 'latest' or $_REQUEST['do'] == 'overview') {
    $vbulletin->input->clean_array_gpc('r', array('pagenumber' => TYPE_UINT));
    $perpage = $vbulletin->options['albums_perpage'];
    // only show latest if we're not showing more specific user albums
    if ((!$userinfo or !$vbulletin->GPC['pagenumber']) and $vbulletin->options['album_recentalbumdays']) {
        // Create collection
        require_once DIR . '/includes/class_groupmessage.php';
        $collection_factory = new vB_Collection_Factory($vbulletin);
        $collection = $collection_factory->create('album', false, $vbulletin->GPC['pagenumber'], $perpage);
        // Set counts for view
        list($pagestart, $pageend, $pageshown, $pagetotal) = array_values($collection->fetch_counts());
        // Nasty kludge
        $album_width = $album_height = $vbulletin->options['album_thumbsize'];
        $album_height += $stylevar['cellpadding'] * 2 + 52;
        $album_width += $stylevar['cellpadding'] * 2 + 16;
        // Get actual resolved page number in case input was normalised
        if ($collection->fetch_count()) {
            $pagenumber = $collection->fetch_pagenumber();
            // Create bit factory
            $bitfactory = new vB_Bit_Factory($vbulletin, 'album');
            // Build message bits for all items
            $latestbits = '';
            while ($item = $collection->fetch_item()) {
Exemplo n.º 2
0
 $vbulletin->input->clean_array_gpc('r', array('perpage' => TYPE_UINT, 'pagenumber' => TYPE_UINT, 'sort' => TYPE_NOHTML, 'order' => TYPE_NOHTML));
 $sortfield = $vbulletin->GPC['sort'];
 $pagenumber = $vbulletin->GPC['pagenumber'];
 if ('groups' == $sortfield) {
     $desc = 'asc' == $vbulletin->GPC['order'] ? false : true;
 } else {
     $desc = 'desc' == $vbulletin->GPC['order'] ? true : false;
 }
 require_once DIR . '/includes/class_groupmessage.php';
 // Navbits for breadcrumb
 $navbits = array('group.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['social_groups'], '' => $vbphrase['categories']);
 ($hook = vBulletinHook::fetch_hook('group_view_categories_start')) ? eval($hook) : false;
 // Items to display per page
 $perpage = (!$vbulletin->GPC['perpage'] or $vbulletin->GPC['perpage'] > $vbulletin->options['sg_maxperpage']) ? $vbulletin->options['sg_perpage'] : $vbulletin->GPC['perpage'];
 // Create category collection
 $collection_factory = new vB_Collection_Factory($vbulletin);
 $collection = $collection_factory->create('groupcategory', false, $vbulletin->GPC['pagenumber'], $perpage, $desc);
 $collection->filter_sort_field($sortfield);
 // Set counts for view
 list($start, $end, $shown, $total) = array_values($collection->fetch_counts());
 // Get actual resolved page number in case input was normalised
 $pagenumber = $show['pagenumber'] = $collection->fetch_pagenumber();
 $quantity = $collection->fetch_quantity();
 // Create bit factory
 $bitfactory = new vB_Bit_Factory($vbulletin, 'groupcategory');
 // Build bits for all categories
 $categorybits = '';
 while ($category = $collection->fetch_item()) {
     $bit =& $bitfactory->create($category);
     $categorybits .= $bit->construct();
 }
Exemplo n.º 3
0
 /**
  * Constructor
  * Note: No validation is done here as we know registry and group are reliably
  * passed to vb_Group_Collection which should always validate them.
  *
  * @access public
  *
  * @param vB_Registry $registry
  * @param array $group						Information about the social group
  * @return vB_Group_Collection_Factory
  */
 function vB_Group_Collection_Factory(&$registry, $group = false)
 {
     parent::vB_Collection_Factory($registry);
     $this->group = $group;
 }