vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Social groups on profile question..? (https://vborg.vbsupport.ru/showthread.php?t=205846)

Gamelobby 03-04-2009 06:07 PM

Wow thats a bummer.. 12 avatars/icons takes up a lot of room.

Any idea where or how to edit the code to limit it..?
I didn't see anything in any of those templates for a limit.

I hate to go back to text only, but i guess i might have to..

Lynne 03-04-2009 06:18 PM

You aren't going to find it in a template. It's in the query and php is not in templates. You will have to actually edit the code in the file. And actually, I think the 12 is on another page (profile page), not this page. You will have to apply a limit to the query or whatever you want done instead for that template/list. The query is around line 774 in group.php. If you want to change what gets spit out, the $mygroup_bits variable is defined right after the query about line 801.

Gamelobby 03-04-2009 06:45 PM

I found this on line 847..?
Code:

// Items to display per page
        $perpage = (!$vbulletin->GPC['perpage'] OR $vbulletin->GPC['perpage'] > $vbulletin->options['sg_maxperpage']) ? $vbulletin->options['sg_perpage'] : $vbulletin->GPC['perpage'];


And this on line 776
Code:

        // Display groups the current user is in
        if ($vbulletin->userinfo['userid'])
        {
                $mygroups = fetch_socialgroups_mygroups($vbulletin->options['sg_enablesocialgroupicons']);

                // Render bits
                $mygroup_bits = '';
                foreach ($mygroups AS $mygroup)
                {
                        ($hook = vBulletinHook::fetch_hook('group_list_mygroupsbit')) ? eval($hook) : false;

                        eval('$mygroup_bits .= "' . fetch_template('socialgroups_mygroups_' . ($vbulletin->options['sg_enablesocialgroupicons'] ? '' : 'listview_') . 'bit') . '";');
                }
        }

        ($hook = vBulletinHook::fetch_hook('group_overview')) ? eval($hook) : false;

        $navbits[''] = $vbphrase['social_groups'];

        $show['creategroup'] = ($vbulletin->userinfo['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['cancreategroups']);

        $templatename = 'socialgroups_overview';
}


Lynne 03-04-2009 07:58 PM

Neither of those is the query. Look for the query just before the "// Display groups the current user is in" line. It's called "$mygroups" and that is the query you would have to modify if you want it to only spit out a certain number of groups (add "LIMIT x" to it).

Gamelobby 03-04-2009 08:18 PM

I have to add to the code.? I'm scared.. lol

I am ok with editing, but very weary about creating my own.
I'll see what i can find, then i can find out exactly what & where to make the edit.

Thanks

Lynne 03-04-2009 08:21 PM

I never edit files on my live site first (if I can help it - if it's tracker related, I do need to do it live and have brought down my site a couple of times , lol). I always test it out on a test site first no matter how simple the edit may seem.


All times are GMT. The time now is 10:53 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01440 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete