Exemple #1
0
 // 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();
 }
 unset($bitfactory, $bit, $collection_factory, $collection);
 $sortorder = $desc ? 'desc' : 'asc';
 $oppositesort = $vbulletin->GPC['order'] == 'asc' ? 'desc' : 'asc';
 $sorturl = 'group.php?' . $vbulletin->session->vars['sessionurl'] . 'do=categorylist' . ($perpage != $vbulletin->options['sg_perpage'] ? "&pp={$perpage}" : '');
 $titlesort = $sorturl . '&sort=title&order=' . ('title' == $sortfield ? $oppositesort : 'asc');
 $groupsort = $sorturl . '&sort=groups&order=' . ('groups' == $sortfield ? $oppositesort : 'desc');
 eval('$sortarrow["$sortfield"] = "' . fetch_template('forumdisplay_sortarrow') . '";');
 // Construct page navigation
 $pagenavurl = $sorturl . ($vbulletin->GPC['order'] ? "&order={$sortorder}" : '') . ($vbulletin->GPC['sort'] ? "&sort={$sortfield}" : '');
Exemple #2
0
 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()) {
             $bit =& $bitfactory->create($item);
             $bit->set_template('album_latestbit');
             $latestbits .= $bit->construct();
         }
         // Construct page navigation
         $latest_pagenav = construct_page_nav($pagenumber, $perpage, $pagetotal, 'album.php?' . $vbulletin->session->vars['sessionurl'] . "do=latest");
         $show['latestalbums'] = true;
     }
     unset($collection_factory, $collection);
     if (!$userinfo) {
         // navbar and final output
         $navbits = construct_navbits(array('album.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['albums'], '' => $vbphrase['recently_updated_albums']));
Exemple #3
0
 /**
  * Create a bit renderer for the specified item.
  *
  * @access public
  *
  * @param	array							item information
  * @return	vB_Group_Bit
  */
 function create($item, $group)
 {
     $this->group = $group;
     return parent::create_instance($item);
 }
 /**
  * Create a bit renderer for the specified item.
  *
  * @access public
  *
  * @param	array							item information
  * @return	vB_Group_Bit
  */
 function &create($item, $group)
 {
     $this->group = $group;
     return parent::create($item);
 }
Exemple #5
0
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());
        // 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()) {
                $bit =& $bitfactory->create_instance($item);
                $bit->set_template('album_latestbit');
                $latestbits .= $bit->construct();
            }
            // Construct page navigation
            $latest_pagenav = construct_page_nav($pagenumber, $perpage, $pagetotal, 'album.php?' . $vbulletin->session->vars['sessionurl'] . "do=latest");
            $show['latestalbums'] = true;
        }
        unset($collection_factory, $collection);
        if (!$userinfo) {
            // navbar and final output
            $navbits = construct_navbits(array('album.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['albums'], '' => $vbphrase['recently_updated_albums']));
Exemple #6
0
 // Navbits for breadcrumb
 $navbits = array(fetch_seo_url('grouphome', array()) => $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_instance($category);
     $categorybits .= $bit->construct();
 }
 unset($bitfactory, $bit, $collection_factory, $collection);
 $sortorder = $desc ? 'desc' : 'asc';
 $oppositesort = $vbulletin->GPC['order'] == 'asc' ? 'desc' : 'asc';
 $pagevars = array('do' => 'categorylist');
 if ($perpage != $vbulletin->options['sg_perpage']) {
     $pagevars['pp'] = $perpage;
 }
 $pagevars['sort'] = 'title';
 $pagevars['order'] = 'title' == $sortfield ? $oppositesort : 'asc';