PDA

View Full Version : Social groups on profile question..?


Gamelobby
02-18-2009, 10:00 PM
I have an issue..

On the profile where it lists a persons social groups that they belong to, it only shows a dash like this

User-Created Social Groups: (6)
-
-
-
-
-
-

No text links to the actual groups...? (but the dash is a link still.!?)

Any thoughts or ideas.?
Thanks

Any idea what might be causing it..?
Here is the code from Memberinfo_block_group

<if condition="$block_data['membergroupcount']">
<div class="alt1 smallfont block_row">
<span class="group_count">($block_data[membergroupcount])</span> $vbphrase[public_usergroups]:
<ul class="list_no_decoration group_list" id="public_usergroup_list">
$block_data[membergroupbits]
</ul>
</div>
</if>
<if condition="$block_data['socialgroupcount']">
<div class="alt1 smallfont block_row">
<span class="group_count">($block_data[socialgroupcount])</span> $vbphrase[user_created_social_groups]:
<ul class="list_no_decoration group_list" id="social_group_list">
$block_data[socialgroupbits]
</ul>
</div>
</if>
<if condition="!$block_data['membergroupcount'] AND !$block_data['socialgroupcount']">
<div class="alt1 smallfont block_row">$vbphrase[you_not_member_any_groups]</div>
</if>
<if condition="$block_data['show_join_link']">
<div class="alt2 smallfont block_row block_footer"><a href="group.php$session[sessionurl_q]">$vbphrase[join_social_groups]</a></div>
</if>
You can delete this & PM me if that is better.

Thanks in advance. :)

Aclikyano
02-18-2009, 10:02 PM
wish I could help you I am having problems with social groups right now also..

Lynne
02-18-2009, 11:38 PM
This is the line that spits out the groups:
$block_data[socialgroupbits]

And that is made up of calls to the template "memberinfo_socialgroupbit". Is that template a default template?

Gamelobby
02-19-2009, 12:41 AM
I'm not sure.. it looks like it could have been edited.

Here is my "memberinfo_socialgroupbit"
<li class="smallfont"><if condition="$showgrouplink"><a href="group.php?$session[sessionurl]groupid=$socialgroup[groupid]"></if>- $socialgroup[name_html]<if condition="$showgrouplink"></a></if><br /></li>

Lynne
02-19-2009, 02:15 AM
It's definitely been edited if that is all there is to it. You can also tell by going to edit that template and then selecting View History > Compare and comparing it to the default template. You should revert that template (when you revert, your will lose the contents so if for some reason you want to save that, copy it into a text editor.)

Gamelobby
02-19-2009, 02:34 AM
Revert worked great.. it made them images instead of text links.. thats even better.!! :)
Thanks.!

Dismounted
02-19-2009, 04:08 AM
If it's been edited - you may want to think of what you edited as you may have something imported you added there.

Gamelobby
02-19-2009, 04:44 AM
Thanks for the heads up.. but i dont remember what i did to make it change in the first place.

Gamelobby
03-04-2009, 05:27 AM
I have another question about this.. is there an option to limit how many groups will show on this page.?

Although it seems like it should be in the ACP options, I dont see it anywhere.
Do i have to edit the code in one of these templates..?

- memberinfo_socialgroupbit
- memberinfo_socialgroupbit_text
- memberinfo_publicgroupbit
- memberinfo_membergroupbit
- memberinfo_block_groups
- MEMBERINFO

Thanks..

I just switched skins so i have a lot of things going on. :)

Lynne
03-04-2009, 02:01 PM
I have another question about this.. is there an option to limit how many groups will show on this page.?

I believe you would have to actually modify the code to change that. Right now, I think it shows avatars of the groups you are in until you hit 12 groups. At that point, it starts only listing the group names.

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..?
// 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
// 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.