Display Additional Membergroups on Profile

Started by vbgamer45, January 09, 2007, 10:16:18 PM

Previous topic - Next topic

vbgamer45

Link to the mod

Display Additional Membergroups on Profile

Original Author:live627
SMF Version: 2.0.X
Mod Version: 1.2

Description:
This mod will display all of a user's additional membergroup on their profile:


Changelog

Version 2.0
+Added support for SMF 2.1

Version 1.2
! Mod taken over by Runic
- Removed 1.1.x support.

Version 1.1.2
! Would generate database error when trying to view a member's profile when given member had no additional groups

Version 1.1.1
! All membergroups were displayed on a profile

Version 1.1
+ One hour cache
+ Membergroups are colored and link to the membergroup page

Legend:
--------------------------------------------------------------------------------
! Minor change or bugfix
* Feature edit
& Known bug
+ Feature addition
- Feature removal

Why Not Visit:
http://www.smfhacks.com
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

edi67

#1
so strange, installed correctly but nothing show me ?

for example this user must have 2 membergroups writed



and also a lot of these errors:

8: Undefined index: additionalGroups2
File: /home2/crazyzonews/www/Sources/Load.php
Linea: 1189
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Daniel15

edi67, does your theme have a custom Profile.template.php (in the Themes/[theme name] directory)? In that case, you'll need to edit the Profile.template.php file:
Find:

<td><b>', $txt[87], ': </b></td>
<td>', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</td>
</tr>';


Add after:

// Begin modification - Additional membergroups on profile
$x = 1;
// Loop through each additional group
foreach ($context['member']['additionalGroups2'] as $additionalGroup)
{
// Add one to our counter
$x++;
// Output this membergroup
echo '
<tr>
<td><b>', $txt[87], ' ', $x, ': </b></td>
<td>', $additionalGroup, '</td>
</tr>';
}
// End modification
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

edi67

sorry but i have Theme/default normal and installing your mod, it added already in my profile your code as you replied me but also it not show me.... nothing.
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

jdvarner

how do you enable it? dont see anything different from prior to installing it.

DaBoROE09

daniel15 i love this mod...i have it installed.

thank you

jdvarner


Daniel15

Quotesorry but i have Theme/default normal and installing your mod, it added already in my profile your code as you replied me but also it not show me.... nothing.
Quotehow do you enable it? dont see anything different from prior to installing it.
It only has an effect if you're viewing the profile of a user which is in one or more additional membergroups.
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

jdvarner

well thats why i loaded it?

i have a few members like that and there was no change.

Lill-Micke

Hi!

Do you mean that I can add a user to more than one membergroup?
Do I need this mod to do that?
Or do I only need this mod to show in profile that the user is a member in more than one membergroup?

//Micke
On my page:
MKPortal M1.1.1
SMF 1.1.1

Ydyp

#10
Hi, I have installed this mod, but it seems to show all groups double for me. What has gone possibly wrong and how do I solve it?

*EDIT*
Ok found it myself, seems it was installed twice for some reason, deleted the double code and it seems to work fine.

Daniel15

Quotewell thats why i loaded it?

i have a few members like that and there was no change.
What theme are you using? Does it have a custom Profile.template.php file?

QuoteDo you mean that I can add a user to more than one membergroup?
Do I need this mod to do that?
Yes, it's a built in feature of SMF. If you go to the settings for a user, right underneath the dropdown box to change their membergroup is a just of "Additional Membergroups". If you tick the group, they'll be added to that group.

QuoteOr do I only need this mod to show in profile that the user is a member in more than one membergroup?
Yep, exactly :)

Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

jdvarner

#12
Loaded mod.

Lets say the admin. He is an admin and also a member of another membergroup because of post count. When i go to the profile, it only shows additional membergroups admin, global mod? Im thinking the mod is not based off of post count but regular membergroups only?

Maybe im just misunderstanding this mod.

Using default theme.

littleone

will this still work on RC3?

I know ill have to do a manual install on it but wont bother if the code wont work in a previous version (i know I should update but I am still waiting on other mods to be updated that i use) :P

Lill-Micke

#14
Hi Daniel15!

Thx for this great mod!
I installed it and it works great.
How can I get the users membergroup to show in a topic?

Can you post the code to insert in $sourcedir/Display.php and in $themedir/Display.template.php so I can edit the files?
It is this two files to edit so that the membergroup show's up in topic, right?

(Sorry for my bad English)

//Micke
On my page:
MKPortal M1.1.1
SMF 1.1.1

eNoyx

Yes please ^^ I also want the membergroups to appear on posting, below the avatar, nick, and all that stuff. You know what I mean, in the left side of the message, under the little icons linking to profile, email, etc. If it's possible, it'd be a great way of managing fan groups =P

Thanks in advance ^^

Lill-Micke

QuoteHi Daniel15!

Thx for this great mod!
I installed it and it works great.
How can I get the users membergroup to show in a topic?

Can you post the code to insert in $sourcedir/Display.php and in $themedir/Display.template.php so I can edit the files?
It is this two files to edit so that the membergroup show's up in topic, right?

(Sorry for my bad English)

//Micke

Is there enyone that know how to fix this?

//Micke
On my page:
MKPortal M1.1.1
SMF 1.1.1

lexhair


SWTrisha

one more if you please

QuoteInstalling this package will perform the following actions:  Type Action Description
1. Execute Modification ./Sources/Load.php Test successful
2. Execute Modification ./Themes/default/Profile.template.php Test failed

thank you.

Vinspire


Advertisement: