Stars and Badges

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

Previous topic - Next topic

Bulakbol

#500
@BurkeKnight
To do that, open Display.template.php and find
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 '<li>', $message['member']['additional_groups']['stars'][$i], '</li>';
}
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo '<li>', $message['member']['additional_groups']['stars'][$i], '</li>';


replace with.
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 '
<li style="color: ', $message['member']['additional_groups']['ag_color'][$i], '">
', $message['member']['additional_groups']['name'][$i], '<br />
', $message['member']['additional_groups']['stars'][$i], '
</li>';

}
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo '
<li style="color: ', $message['member']['additional_groups']['ag_color'][$i], '">
', $message['member']['additional_groups']['name'][$i], '<br />
', $message['member']['additional_groups']['stars'][$i], '
</li>';


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

Burke ♞ Knight

Thanks my friend. :)
That like I said, may not be needed on this site, but may very well be needed on my next project. :)

fmofmpls

#502
Hello. I just installed this mod through my package manger without any failed test warnings. I'm running 1.1.7.

Is this mod compatible with 1.1.7? I'm not seeing any badges or edit member groups options other than the SMF default member group settings.

I really would love to use this mod! Thanks for the support!

Another question that I have is what's the difference between using this mod and just manually adding a new member group complete with member group image? Not sure I fully understand the purpose of the mod? Sorry.  ???

Burke ♞ Knight

Quote from: Bulakbol on March 02, 2008, 03:28:04 PM
The mod will display additional groups that you assign to your members. You have to create a special primary group that you could call it "Donator" and use badge instead of stars. Then go to your members profile, click  Account Related Settings, and click the [show additional groups] and tick the checkbox of the Donator. After that, this mod will display the additional groups badge in their post, personal messages and profile. If still not clear, I'll include images next time.

fmofmpls

Gotcha. But the badges are gif files that I have to add myself to my theme images folders first? Right?

Are there any default badges that are automatically uploaded to these folders upon installing the mod? If so, I didn't see any. I took the donator gif from a thread here at this board.

BTW, it's working fine for me at my forum. Just wanted to make sure that I'm receiving all that the mod has to offer.

Bulakbol

@fmofmpls
Sorry, there are no default badges for this mod.  You have to make your own. The donator badge is only used as a sample to find out if the mod works.

@BurkeKnight
Thanks for the help my friend.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

fmofmpls

Quote from: Bulakbol on December 06, 2008, 04:04:08 PM
@fmofmpls
Sorry, there are no default badges for this mod.  You have to make your own. The donator badge is only used as a sample to find out if the mod works.

Gotcha. Thanks for a great mod and for the fast support! AAA++++

tyhgdgh

does this mod do something like a tree data

so lets say this, there is a Coder group, at first, your a beginner coder, after 50 posts your ameutur

-Coder
--Begginer coder (0 posts)
--Ameutur Coder (50 Posts)

is this featured already?

Acans

Quote from: Nintendofanthr33 on December 14, 2008, 05:19:10 AM
does this mod do something like a tree data

so lets say this, there is a Coder group, at first, your a beginner coder, after 50 posts your ameutur

-Coder
--Begginer coder (0 posts)

it doesnt display addition post groups because you cant be in more than one post group
--Ameutur Coder (50 Posts)

is this featured already?
"The Book of Arantor, 17:3-5
  And I said unto him, thy database query shalt always be sent by the messenger of $smcFunc
  And $smcFunc shall protect you against injections and evil
  And so it came to pass that mysql_query was declared deprecated and even though he says he is not
  dead yet, the time was soon to come to pass when mysql_query shall be gone and no more

Bulakbol

@fmofmpls
You're welcome. Thank you too for using or trying.

@Nintendofanthr33 and α¢αηѕ
This mod is only for displaying additional groups. Sorry. I don't know what you mean by "tree" like.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Shortrnd

#510
JB,

I ran into a problem with the mod today.  I've been running with 19 badges since I added the mod.  Today I added 2 more.  For some reason the 20th and 21st badges won't show up.  I've rearranged the order in which they are shown and no matter what the order is it won't show the 20th and 21st badge.  Is there a restriction somewhere on how many badges you can have? 

I tried to read through this thread but couldn't find anything about this. 

Also, back on page 9 you were nice enough to set me up so that I have 3 lines of 3 badges each without spaces.  Is there any way I can now make that 5 lines of 3 badges each?  The last display template you attached work like a charm. 

Let me know if I'm just not doing something right.  TIA, JB. 

Shorty

Burke ♞ Knight

Shortrnd,

I think the first issue is something I also ran into before. It seems the field where enter the number to be displayed only allows for 19 variables.

Maybe Bulakbol can come up with a fix for us. :)

Shortrnd

Burke,

I think you are on to something there.  I noticed last night that the 20th and 21st badges are shown in the user's profile.  The posts seems to be the only area in which they aren't viewed.  I'm hoping this will be an easy fix.  Thanks for the reply.  At least now I know I'm not screwing up this great mod. 

Burke ♞ Knight

Quote from: Shortrnd on December 24, 2008, 02:13:27 PM
Burke,

I think you are on to something there.  I noticed last night that the 20th and 21st badges are shown in the user's profile.  The posts seems to be the only area in which they aren't viewed.  I'm hoping this will be an easy fix.  Thanks for the reply.  At least now I know I'm not screwing up this great mod. 

Oh... I did not even look in the profile when I was having the issue... Good eye, my friend. :)

Bulakbol

Sorry for the delay. Happy Holidays to all!

I posted this already somewhere but I'll post it again. To add more badges displayed, open Sources/Load.php. Find and change the number 20 (red) to 50. I thought 20 is enough. :)
Quote$context['badges']['ownline'] = !empty($modSettings['badge_ownline']) ? explode(',', $modSettings['badge_ownline'], 20) : '';
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Burke ♞ Knight

Quote from: Bulakbol on December 24, 2008, 08:17:10 PM
Sorry for the delay. Happy Holidays to all!

I posted this already somewhere but I'll post it again. To add more badges displayed, open Sources/Load.php. Find and change the number 20 (red) to 50. I thought 20 is enough. :)
Quote$context['badges']['ownline'] = !empty($modSettings['badge_ownline']) ? explode(',', $modSettings['badge_ownline'], 20) : '';


Johnny, you should know me by now... I never go basic... I always go to the extreme....LOL

Thank you, and Merry Christmas, my friend. :)

Shortrnd

JB,

I figured it was in there somewhere.  I just couldn't find it.  Thanks for reposting that for me.  Have a good holiday, bud. 

Sheree

hi johnny please check my Load.php for me

Bulakbol

Thanks guys.

@Sheree
Your Load.php. Modified but not tested. It should work.

Happy New Year!!

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

Sheree

#519
Sorry to keep on bugging you johnny as you know you're my Fave  ;)

I tried the load.php but still got an error on the personal message page



You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3
File: /home/sheree17/public_html/Sources/Load.php
Line: 1243

I have another prob I want the badges to be placed like this (I made a draft)




Thanks and have a Happy new Year!!

Advertisement: