News:

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

Main Menu

Stars and Badges

Started by Bulakbol, February 29, 2008, 11:59:19 PM

Previous topic - Next topic

Bulakbol

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

chickenwing


xstrxpurez

Hi i am having trouble with the badges and stars.. i uploaded the images and made them for the groups.. but they dont show the stars also.. so how can i make it show stars and the badges... also when making someone in multiple groups it doesn't show their star's/badges for the additional group, so can someone help me with that? the message it sends me when i edit my profile is The user whose profile you are trying to view does not exist.

Bulakbol

#543
@xstrxpurez
I don't know what is happening. Does their additional groups shows in their profile?
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

xstrxpurez

Yes, but when the user, or someone else that is not a staff member goes and view's it, it doesn't show them.

Bulakbol

The mod suppose to show the additional group badges to everyone. Are you using custom theme?
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

xstrxpurez


Bulakbol

@chickenwing
There are different places you can display the additional badges. Here's one just above the signature. Edit your Display.template.php and find
echo '
</td>
</tr></table>';

// Show the member's signature?


replace
echo '
</td>
</tr>';
if (!empty($message['member']['additional_groups']['id']))
{
echo '<tr><td colspan="2" width="100%">';
if (!empty($context['badges']['ownline']))
{
foreach($context['badges']['ownline'] AS $key)
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
if ($message['member']['additional_groups']['id'][$i] == $key)
echo $message['member']['additional_groups']['stars'][$i], ' ';
}
else
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo $message['member']['additional_groups']['stars'][$i], ' ';
echo '</td></tr>';
}
echo ' </table>';

// Show the member's signature?




@xstrxpurez
If you are still having problem, please attach your profile.template.php.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

chickenwing

Johnny,,,that looks great.  It does show the same images along the bottom as it shows under the name of the left.  What would it take for this scenario,,,

Left side under the name shows up to the first eleven additional member groups.

The bottom row of images shows for twelve or more additional member groups.

So, for example, if the server setting "Arrange additional group id to be displayed" had the values: 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
then
member groups 4,5,6,7,8,9,10,11,12,13,14 would be displayed on the left and
member groups 15,16,17,18,19,20 would be displayed on the bottom

Would that be just changing the "for" loops?

minos

maybe you could add  show  post cont membergroup  too

chickenwing

#550
Quote from: chickenwing on January 19, 2009, 08:19:58 PM
Johnny,,,that looks great.  It does show the same images along the bottom as it shows under the name of the left.  What would it take for this scenario,,,

Left side under the name shows up to the first eleven additional member groups.

The bottom row of images shows for twelve or more additional member groups.

So, for example, if the server setting "Arrange additional group id to be displayed" had the values: 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
then
member groups 4,5,6,7,8,9,10,11,12,13,14 would be displayed on the left and
member groups 15,16,17,18,19,20 would be displayed on the bottom

Would that be just changing the "for" loops?

or, maybe two fields...
"Additional member groups ids to display" (ones on the left) and "Group ids to display along bottom" .  Then, we could determine which groups show which place.

just an idea

Bulakbol

@minos
Post group title is default. This mod is for additional groups.

@chickenwing
Good idea. If I have time to update this mod, I will pick the additional field. I will add to my "TODO" list.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

chickenwing

Great Johnny!  Thanks for considering this.  We really like the mod!

minos

but .. when  a user with an special group by default  post cont rank doesnt show.. the other  mod aka starrs and badges shows that  ...

well  thank you for this mod

Mick.

Has anyone had any luck applying this mod to the UltimateProfile mod?   If so,do you mind sharing?

Bulakbol

#555
@BlueDevil
Try this to add additional groups in ultimate profile for version 1.1.7. Default/UltimateProfile.template.php, find

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


replace
<<td style="color: ', !empty($context['member']['group_color']) ? $context['member']['group_color'] : $context['member']['post_group_color'], ';">
<b>', !empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group'], '</b></td>
<td>', $context['member']['group_stars'], '</td>
</tr>';
                           
                        if (!empty($context['member']['additional_groups']['id']))
for ($i = 0; $i < count($context['member']['additional_groups']['id']); $i++)   
echo '
<tr>
<td style="color: ', $context['member']['additional_groups']['ag_color'][$i], ';"><b>', $context['member']['additional_groups']['name'][$i], '</b>
</td><td>', $context['member']['additional_groups']['stars'][$i], '</td>
</tr>';   
                        echo '


I'll add Ultimate Profile mod support in the next update. Maybe after the release of SMF 2.0 RC1 to the public.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Mick.

Quote from: Bulakbol on January 25, 2009, 08:05:30 PM
@BlueDevil
Try this to add additional groups in ultimate profile for version 1.1.7. Default/UltimateProfile.template.php, find

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


replace
<<td style="color: ', !empty($context['member']['group_color']) ? $context['member']['group_color'] : $context['member']['post_group_color'], ';">
<b>', !empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group'], '</b></td>
<td>', $context['member']['group_stars'], '</td>
</tr>';
                          
                        if (!empty($context['member']['additional_groups']['id']))
for ($i = 0; $i < count($context['member']['additional_groups']['id']); $i++)  
echo '
<tr>
<td style="color: ', $context['member']['additional_groups']['ag_color'][$i], ';"><b>', $context['member']['additional_groups']['name'][$i], '</b>
</td><td>', $context['member']['additional_groups']['stars'][$i], '</td>
</tr>';  
                        echo '


I'll add Ultimate Profile mod support in the next update. Maybe after the release of SMF 2.0 RC1 to the public.

Thank you,you rock!

midiof[f]

Quote1.     Execute Modification     ./Sources/Load.php     Test failed

i dont know why? install.xml is like to with load.php
other php files is ok i have Core default theme but not other themes

Yaarar clan Azure L2 [nofollow] Admin

Bulakbol

@midiof[f]
Here's your Load.php. Use this file before installing this mod.
You have to manually edit your custom theme's Display.template.php.If you still encounter errors, let me know.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

bros

How long do you think until this will be made compatible with SMF 2 RC1?

Advertisement: