News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

MCLegendII.1

Started by Bulakbol, January 28, 2008, 07:44:55 PM

Previous topic - Next topic

pp08

Quote from: JohnyB on June 16, 2008, 10:44:54 PM
Yeah, you are confused. Attach your BoardIndex.template.php and I'll see what I can do. What custom theme are you using again?

thank you in advance for trying to help.
i am using smf 1.1.5 and i am using theme "fire" designed by Tamuril and this is the link to her theme if you need it
http://custom.simplemachines.org/themes/index.php?lemma=689

also as you asked i am attaching the file please let me know if you need anything else thank you

p.s. this is not going to mess up my forum right? i got scared when i saw the fetal error

Bulakbol

Here's your BoardIndex.template.php back pp08. Thanks for using this mod.

Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

pp08

#202
thank you so much, i just uploaded it and now its showing the groups however its showing "regular groups" and "post count based groups" which is ok it works if thats how it was made but what is messing up is its showing all the groups even if no one from that group is online. i need to only show the group name if any users are online from that group. other wise it should stay hidden, thats how it was made isnt it? otherwise what would be the point for the groups to sshow... also as a user i can not click on the groups to view who is in that group. can you help me with it plz

Bulakbol

This mod will display membergroup legend regardless of members online status. That's the way I made it. You can arrange the display of group legend by going to Admin-> Features and Options and enter your group id's in "Membergroups legend arrangement." text box.

But if you want only the legend for online members then you don't need this mod. You need the old version. You have to manually edit your BoardIndex.tempte.php. It might work.
http://custom.simplemachines.org/mods/index.php?mod=207
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

pp08

in the features and options i tried to rearrange by changing the numbers but no matter what i change it seems to pull up what ever group it wants how can i fix this?

pp08

also how do i understand which number refers to which group/club?

Bulakbol

Go to Admin-> membergroups then hover your mouse over your group names and the browser's progress bar, you'll see something like ... sa=members;group=2. The "2" is the groups id of that group.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

fangweile

Hello there,

I installed this mod and it works fine, however it is possible to show only the membergroup legend of the current online users. Not all the membergroups?

Bulakbol

To display only group legend of online members, you have to replace the code to

if (!empty($modSettings['arrange_mclegend']))
{
echo '
<tr>
<td class="windowbg2" width="100%">
<span class="smalltext">';
foreach($context['online_groups'] AS $group)
             if(!empty($group['color']) && $group['color'] != '')
                    echo '[<span style="color:' . $group['color'] . '">' . $group['name'] . '</span>] ';
      echo '
      </span>
</td>
</tr>';
}


The code above is from Jay Bachatero's Membergroup Color Legend mod.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

fangweile

I already tried the Jay Bachatero's Membergroup Color legend but I want to add a link to the membergroup name just like in your mod. ANy idea how to do this??

Bulakbol

You can try this. Edit your Sources/BoardIndex.php and find
// Some basic color coding...
and add this above it.
if (allowedTo('moderate_forum'))
$glink = '<a href="'. $scripturl . '?action=membergroups;sa=members;group='. $row['ID_GROUP']. '" style="color: '. $row['onlineColor']. ';">'. $row['groupName']. '</a>'; 


then find
'color' => $row['onlineColor']

and replace with
'color' => $row['onlineColor'],
'glink' => $glink


and in your defautl/BoardIndex.template.php, use this
if (!empty($modSettings['arrange_mclegend']))
{
echo '
<tr>
<td class="windowbg2" width="100%">
<span class="smalltext">';
foreach($context['online_groups'] AS $group)
echo '[<span style="color:' . $group['color'] . '">' . $group['glink'] . '</span>] ';

          echo '
          </span>
</td>
</tr>';
}
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

fangweile

Hello there

It perfectly work when I log as an Admin, I can see the link btw

However when i try to log in as another user
It only display this

[] []

and it generates and forum error log from that user

Undefined variable: glink
File:/htdocs/Sources/BoardIndex.php

I think this code is causing this
if (allowedTo('moderate_forum'))

???

Bulakbol

Oppsss sorry, I forgot the else thing. Replace this (Sources/BoardIndex.php)
if (allowedTo('moderate_forum'))
$glink = '<a href="'. $scripturl . '?action=membergroups;sa=members;group='. $row['ID_GROUP']. '" style="color: '. $row['onlineColor']. ';">'. $row['groupName']. '</a>'; 


with  this.
if (allowedTo('moderate_forum'))
$glink = '<a href="'. $scripturl . '?action=membergroups;sa=members;group='. $row['ID_GROUP']. '" style="color: '. $row['onlineColor']. ';">'. $row['groupName']. '</a>'; 
else
$glink = !empty($row['onlineColor']) ? '<span style="color: '. $row['onlineColor']. ';">'. $row['groupName']. '</span>' : $row['groupName'];
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

fangweile

OMG, thanks a lot for your help,
It really works fine now. You are so great.

Thanks again. ^_^

Bulakbol

You're welcome. 'Glad it's working now. :)
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

pp08

Quote from: JohnyB on June 21, 2008, 02:06:27 AM
Go to Admin-> membergroups then hover your mouse over your group names and the browser's progress bar, you'll see something like ... sa=members;group=2. The "2" is the groups id of that group.


thank you so much i can see the groups now

tyty1234

Is there an action like http://www.simplemachines.org/index.php?action=groups to view which members are in that specific group? Because I don't like the fact where it goes to the admin panel when people click on it.
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

Bulakbol

@pp08
  You're welcome.  Thank you too for trying or using this mod.

@tyty1993
Have you tried this mod? Because I don't know about the "admin panel".
The 1.1.5 version - only groups with permission to manage membergroups + admins.
The 2.0 Beta 3.1 version - yes if you allow them to view members list.

Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

tyty1234

Quote from: JohnyB on June 29, 2008, 05:37:36 AM
@tyty1993
Have you tried this mod? Because I don't know about the "admin panel".
The 1.1.5 version - only groups with permission to manage membergroups + admins.
The 2.0 Beta 3.1 version - yes if you allow them to view members list.
Aww, I have 1.1.5........
Thanks for the quick reply though!
My Activity: Inactive
My Links: tyty1234's SMF Site | SMF Package Parser | SMF Helper | My Mods [5]
Subscribe to my SMF blog for updates
PMs for support will not be accepted, unless requested otherwise.

Bulakbol

Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Advertisement: