Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Bulakbol on February 29, 2008, 11:59:19 PM

Title: Stars and Badges
Post by: Bulakbol on February 29, 2008, 11:59:19 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1110)

Author:JohnyB   Mod Name:StarsAndBadges   Version:1.0   Tested:Freshly installed SMF 1.1.4

StarsAndBadges 1.0
- This mod will display additional group stars and or badges
     or whatever you use as stars in membergroup settings.
- In post - display additional stars and or badges.
- In Profile - display group names and additional group names as well as stars and badges.
- In Personal Message - display stars and or badges of additonal groups.

Supported Themes
- Aa_New_Damage
- Babylon
- Classic
- Cs-dk114v1
- Default
- dilbermc
- helios_multi11
- Wowdk_114v1

If your Theme is not supported, in {yourtheme}/Display.template.php, look for
', $message['member']['group_stars'], '<br />';

and replace with
', $message['member']['group_stars'], '<br />';

if (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo $message['member']['additional_groups']['stars'][$i], '<br />';


February 18, 2009
Released update for SMF version 2.0 RC1.
Title: Re: Stars and Badges
Post by: ApplianceJunk on March 01, 2008, 12:33:14 AM
Hi,

This works great!

Thanks,
Title: Re: Stars and Badges
Post by: jdvarner on March 01, 2008, 10:36:33 AM
i got an error, but suspect its due to other mods installed...

Type Action Description
1. Execute Modification ./Sources/Load.php Test failed
2. Execute Modification ./Themes/default/Display.template.php Test successful
3. Execute Modification ./Themes/default/Profile.template.php Test successful
4. Execute Modification ./Themes/default/PersonalMessage.template.php Test successful
5. Execute Modification ./Themes/babylon/Display.template.php Test successful
6. Execute Modification ./Themes/classic/Display.template.php Test successful
7. Execute Modification ./Themes/helios_multi11/Display.template.php Skipping file
8. Execute Modification ./Themes/wowdk_114v1/Display.template.php Skipping file
9. Execute Modification ./Themes/Aa_New_Damage/Display.template.php Skipping file
10. Execute Modification ./Themes/cs-dk114v1/Display.template.php Skipping file
Title: Re: Stars and Badges
Post by: Bulakbol on March 01, 2008, 11:44:28 AM
@jdvarner.
  Yes, another mod edited your Load.php that's why. You can install it manually though. Go ahead with the installation and edit your Sources/Load.php.  If you have hard time doing it yourself, attach your Load.php here and I'll help you.


@ApplianceJunk.
  Thanks for the compliment. Thanks too for trying this mod.

Title: Re: Stars and Badges
Post by: edi67 on March 02, 2008, 01:59:11 AM
intersting
Title: Re: Stars and Badges
Post by: perpetuallove on March 02, 2008, 07:56:07 AM
I got that same error listed above but installed anyways after making a backup. The question i have is where do i add those codes if my theme doesnt have a display.template or whatever file? I am using TP january theme :)

I tried modifying the default theme but that didnt do it either....... am i gonna have to do it all manually?
Thanks!
Title: Re: Stars and Badges
Post by: runvs on March 02, 2008, 01:20:30 PM
I have the mod installed but how do you use it?  I can not find any option to use it.
Title: Re: Stars and Badges
Post by: Shortrnd on March 02, 2008, 01:52:52 PM
Quote from: runvs on March 02, 2008, 01:20:30 PM
I have the mod installed but how do you use it?  I can not find any option to use it.

I'm in the same boat.  This is my first attempt at using a mod.  I changed my default theme to Babylon just to see how this works.  So far I can't tell that it's done anything.  This will be great for me if I can figure out what I'm doing wrong. 

I'll post whatever info you need.  Just let me know what you need.  TIA
Title: Re: Stars and Badges
Post by: Bulakbol on March 02, 2008, 03:19:36 PM
Quote from: perpetuallove on March 02, 2008, 07:56:07 AM
I got that same error listed above but installed anyways after making a backup. The question i have is where do i add those codes if my theme doesnt have a display.template or whatever file? I am using TP january theme :)

I tried modifying the default theme but that didnt do it either....... am i gonna have to do it all manually?
Thanks!

Hi Perpetuallove. Sorry for the delay. If your theme does not have Display.template.php, it must be using the one from the default theme.  You have to edit only the file that failed the test.
Title: Re: Stars and Badges
Post by: Bulakbol on March 02, 2008, 03:28:04 PM
Quote from: runvs on March 02, 2008, 01:20:30 PM
I have the mod installed but how do you use it?  I can not find any option to use it.

Quote from: Shortrnd on March 02, 2008, 01:52:52 PM<br />
Quote from: runvs on March 02, 2008, 01:20:30 PM<br />I have the mod installed but how do you use it?  I can not find any option to use it.<br />
<br /><br />I'm in the same boat.  This is my first attempt at using a mod.  I changed my default theme to Babylon just to see how this works.  So far I can't tell that it's done anything.  This will be great for me if I can figure out what I'm doing wrong.  <br /><br />I'll post whatever info you need.  Just let me know what you need.  TIA<br />

Hi Runvs and Shortrnd.  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.

Thanks guys for trying this mod.
Title: Re: Stars and Badges
Post by: Shortrnd on March 02, 2008, 04:28:29 PM
Ok I see that now.  It's showing that badge but it won't show the post count membergroup image.  I'm sure I'm missing something fairly obvious. 

Thanks a ton for the replay and support.
Title: Re: Stars and Badges
Post by: Bulakbol on March 02, 2008, 04:35:19 PM
Quote from: Shortrnd on March 02, 2008, 04:28:29 PM
Ok I see that now.  It's showing that badge but it won't show the post count membergroup image.  I'm sure I'm missing something fairly obvious. 

Thanks a ton for the replay and support.

oww ok. The mod didn't touch anything else. Just added the extra stars/badge. Did you install the mod manually? If you need help, I will do the best of my ability.  ;)
Title: Re: Stars and Badges
Post by: Shortrnd on March 02, 2008, 04:47:35 PM
Then I'll try to follow your instructions to the best of my ability ;D

Here's what I did.  I uninstalled your mod, changed my default theme to Babylon, installed the mod, then checked my test post.  Nothing.  I then changed my default theme back to a custom theme and made the changes to the alienation(my theme)/Display.template.php file that you posted.  Still nothing. 

Good so far or did I already make a mistake?
Title: Re: Stars and Badges
Post by: Bulakbol on March 02, 2008, 05:04:53 PM
@Shrtrnd. Did you create additional groups? Try my instruction first. Maybe there's no extra groups stars to display. If you can't figure out, give me temporary admin access to your site and I'll help you.
Title: Re: Stars and Badges
Post by: Shortrnd on March 02, 2008, 05:07:30 PM
Then again I think I just solved my problem.  I forgot that I installed another mod when I could figure out what I was doing wrong to yours.  It was the mod to select a membergroup at registration.  I think if I make this select a secondary membergroup rather than a primary it will work.

I'll keep you up to speed on it if you'd like.

Title: Re: Stars and Badges
Post by: Bulakbol on March 02, 2008, 05:14:49 PM
That's good if you figured out yourself.  That's the way I learned, by doing it myself.  :D But if you really need my help, I am around.
Title: Re: Stars and Badges
Post by: Shortrnd on March 02, 2008, 05:16:49 PM
Wow.  Much better support around here than I thought I would get.  Thanks a ton......... and I'm sure I'll need your at some point with this. 
Title: Re: Stars and Badges
Post by: Bulakbol on March 02, 2008, 05:27:23 PM
Thanks. Just attach the file that you want me to check so I can edit it and give it back to you if that's the way you prefer. I want to know the custom theme's name that you are using.
Title: Re: Stars and Badges
Post by: Shortrnd on March 02, 2008, 05:49:17 PM
I'm using alienation as my default.  I think I made the correct changes.  I'm still trying to set everything up so it will all work correctly.  So far I'm doing ok.  I'll holler if I run into anything.
Title: Re: Stars and Badges
Post by: Bulakbol on March 02, 2008, 05:54:30 PM
Ok Shortrnd. If I am not around, I'll be around.  :P Good luck!
Title: Re: Stars and Badges
Post by: perpetuallove on March 02, 2008, 10:08:56 PM
Quote from: JohnyB on March 02, 2008, 03:19:36 PM
Quote from: perpetuallove on March 02, 2008, 07:56:07 AM
I got that same error listed above but installed anyways after making a backup. The question i have is where do i add those codes if my theme doesnt have a display.template or whatever file? I am using TP january theme :)

I tried modifying the default theme but that didnt do it either....... am i gonna have to do it all manually?
Thanks!

Hi Perpetuallove. Sorry for the delay. If your theme does not have Display.template.php, it must be using the one from the default theme.  You have to edit only the file that failed the test.

aw i see- so do i need to change it in the default display one? also- the one that failed the test was the   Sources/Load.php ........ what do i need to edit from that?

Your welcome for trying it- i cant wait to get it working cuz its perfect for the type of forum i have :)
Title: Re: Stars and Badges
Post by: Bulakbol on March 02, 2008, 10:55:54 PM
Hi Perpetuallove. You don't have to edit the Display.template.php from the default folder. It is already edited by the mod. Edit only the Sources/Load.php. Look for

pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group, mem.is_activated,

or if you cannot find the whole line, just look for
pg.onlineColor AS post_group_color,

and insert
mem.additionalGroups,

Then look for
'post_group_color' => $profile['post_group_color'],

and below it, add
'additional_groups' => array(
'id' => array(),
'stars' => array(),
'name' => array(),
),


More to look for.  :) Find
return true;
}

// Load a theme, by ID.


and replace with
$groups = $profile['additionalGroups'];
// Load additional membergroups
if (!empty($groups))
{
$result_stars = db_query("
SELECT stars, ID_GROUP, groupName
FROM {$db_prefix}membergroups
WHERE ID_GROUP IN (" . $groups . ')
', __FILE__, __LINE__);

// Loop through the additional groups...
while ($row_stars = mysql_fetch_assoc($result_stars))
if (!empty($row_stars['stars']))
{
$memberContext[$user]['additional_groups']['id'][] = $row_stars['ID_GROUP'];
$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $func['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);
$memberContext[$user]['additional_groups']['name'][] = $row_stars['groupName'];
}
mysql_free_result($result_stars);
}

return true;
}

// Load a theme, by ID.


That's all for the Sources/Load.php. If you are not confortable doing the edit, attach your Load.php and I'll do it for you.
Title: Re: Stars and Badges
Post by: perpetuallove on March 03, 2008, 04:11:02 AM
That would be awesome if you would do that for me :) but i cant find it! I dont see that file in the themes folder I am using or in the default? hmmm......
Title: Re: Stars and Badges
Post by: Bulakbol on March 03, 2008, 05:17:50 AM
Quote from: perpetuallove on March 03, 2008, 04:11:02 AM
That would be awesome if you would do that for me :) but i cant find it! I dont see that file in the themes folder I am using or in the default? hmmm......

Hi again Perpetuallove. You can find the Load.php in the Sources folder and not default folder. You can attach here so I can look at it and make the changes for you.
Title: Re: Stars and Badges
Post by: radel on March 03, 2008, 09:32:37 AM
Hi,

I really was looking for a mod like this.

Anyway, I managed to install the mod but it will only show the badge for the primary usergroup. The additional or secondary usergroup/s will only show an "*" both in post and profile.

I tried editing the Load.php but I still wasnt able to get it to work. So  I uninstalled the mod for the meantime.

Any idea whats causing my problem?

Im using the NewDef theme for TP.

The unedited Load.php is attached.
Title: Re: Stars and Badges
Post by: Bulakbol on March 03, 2008, 10:04:22 AM
Hi Radel. Did you use the package manager? Were there any errors when you installed the mod? If there are errors, then I need only the files that failed the test.  If there's no error, then I need only the Display.template.php of your custom theme. Attach the files that failed the test and your custom Display.template.php so i can edit it for you.
Title: Re: Stars and Badges
Post by: islam2hamy on March 03, 2008, 10:13:38 AM
thank you
good mod
Title: Re: Stars and Badges
Post by: Bulakbol on March 03, 2008, 10:18:30 AM
Quote from: islam2hamy on March 03, 2008, 10:13:38 AM
thank you
good mod

awww I thank you for the compliment Islam2hamy.  8)
Title: Re: Stars and Badges
Post by: radel on March 03, 2008, 10:19:46 AM
I used the package manager to install the mod.

Only Load.php failed the test when i installed it so i tried to edit the file.

As I have said in my other post, my badge for my primary group shows just fine, its just that the secondary or additional group badge or star wont show anything but an *

Also there is no display.template.php for the theme that I am using.

Thanks for your time.
Title: Re: Stars and Badges
Post by: Bulakbol on March 03, 2008, 10:25:57 AM
Ok Radel. I'll look at your Load.php and I'll get back to you.
Title: Re: Stars and Badges
Post by: radel on March 03, 2008, 10:38:09 AM
Thanks.

As far as I can tell this mod is really great and I would be sad if I cant use it in my forum.

Anyway, here are 2 screenshots of what I am talking about.
(http://i104.photobucket.com/albums/m193/leeradel/nothing1.jpg)
(http://i104.photobucket.com/albums/m193/leeradel/nothing2.jpg)

As I said only an * will show instead of badges.  :)
Title: Re: Stars and Badges
Post by: Bulakbol on March 03, 2008, 10:52:15 AM
Here;s your Load.php Radel. And if still won't work, your site link will help.

Title: Re: Stars and Badges
Post by: Shortrnd on March 03, 2008, 01:12:19 PM
My issues are a bit different now.  If I put someone in a primary usergroup then their post count images don't show.  If I remove them from all primary membergroups and use the show additional groups then it will work...... sort of.

I'm now getting double images of the membergroup stars.  It does look correct in the profile summary however.

Also, the membergroup titles are showing either.  Perhaps because they're not in primary membergroups?

(http://www.prexis.com/sten/homebuilder/images/Untitled-1%20copy.jpg)

Thanks again for the help

Title: Re: Stars and Badges
Post by: Bulakbol on March 03, 2008, 01:57:33 PM
Hi Shortrnd. Attach your Display.template.php and I'll take a look at it first. Maybe there's double line in there. You probably pasted the code under the code that suppose to be replaced. I'll grab the alienation theme so I can have visual check.
Title: Re: Stars and Badges
Post by: Shortrnd on March 03, 2008, 02:02:23 PM
Ok it's attached to the post above. 
Title: Re: Stars and Badges
Post by: Bulakbol on March 03, 2008, 02:10:28 PM
Shortrnd, here;s your Display.template.php. I deleted the other codes. It was istalled twice. Try that one first then if problem persist, I'll login to your site.
Title: Re: Stars and Badges
Post by: Shortrnd on March 03, 2008, 02:39:01 PM
That's works much better.

Any idea why I can't get the post counts to show when I put someone in a primary membergroup?  Here's what I'm talking about.

(http://www.prexis.com/sten/homebuilder/images/nopcr.jpg)

PM sent on my site btw.
Title: Re: Stars and Badges
Post by: Bulakbol on March 03, 2008, 02:43:38 PM
Quote from: Shortrnd on March 03, 2008, 02:39:01 PM
That's works much better.

Any idea why I can't get the post counts to show when I put someone in a primary membergroup?  Here's what I'm talking about.

(http://www.prexis.com/sten/homebuilder/images/nopcr.jpg)

PM sent on my site btw.

Wait, I'll check your Display.template,php again. There might be missing code in there.

<EDIT>
I can't find anything wrong Shortrnd. The images have both post counts in them.  Is it post count or post group name that you are looking for?
</EDIT>
Title: Re: Stars and Badges
Post by: franklinrony on March 03, 2008, 04:57:15 PM
i wait for 2 years this mods only found to rc2! thanks my friend
Title: Re: Stars and Badges
Post by: Bulakbol on March 03, 2008, 05:14:32 PM
Well, grab two copies then.  :P  You're welcome and thank you too for trying this mod.
Title: Re: Stars and Badges
Post by: perpetuallove on March 04, 2008, 05:10:20 AM
Quote from: JohnyB on March 03, 2008, 05:17:50 AM
Quote from: perpetuallove on March 03, 2008, 04:11:02 AM
That would be awesome if you would do that for me :) but i cant find it! I dont see that file in the themes folder I am using or in the default? hmmm......

Hi again Perpetuallove. You can find the Load.php in the Sources folder and not default folder. You can attach here so I can look at it and make the changes for you.

I found it- im sorry... i dont know why i guess i thought it would be somewhere in a theme folder? here it is, thanks so much!! :)
Title: Re: Stars and Badges
Post by: Bulakbol on March 04, 2008, 04:35:48 PM
Hi again Perpetuallove. I downloaded your attached Load.php and am looking at it now

<EDIT>
  Here's your Load.php. Hope it will work now.
</EDIT>

Thanks for trying this mod.
Title: Re: Stars and Badges
Post by: perpetuallove on March 04, 2008, 09:01:47 PM
ok so it kinda works= but this is what it did. it added 3 stars to my section- and another member- it deleted her first one and added the star.

Is there a way to make it not show the name of the ranks? like just show the image associated with it?


(http://i212.photobucket.com/albums/cc29/PerpetualLove/tutorials/forum.png)

<edit>
i clicked the button to have it show additional membergroups- and this is what it did to the girl that it shows above

(http://i212.photobucket.com/albums/cc29/PerpetualLove/tutorials/Image112.png)
Title: Re: Stars and Badges
Post by: Bulakbol on March 04, 2008, 09:17:54 PM
Hi Perpetuallove. Now I want to see your Display.template.php.  ;) The mod could be installed twice or more. Attach your Display.template.php to your post and a link to your site will also help.
Title: Re: Stars and Badges
Post by: perpetuallove on March 04, 2008, 09:57:44 PM
ok i didnt have one in my theme's folder so i got you the default one- will that work ? :)

The link to my forum  is

http://www.perpetuallove.net/forums/SMF/


But you cant see anything unless your a member- so u can use my tester acct if u need to log in :) ill change the password and send it to you in a PM i hope thats ok :)
Title: Re: Stars and Badges
Post by: Bulakbol on March 04, 2008, 10:13:12 PM
Thanks Perpetuallove. I'll check your Duisplay.template.php. If you don;t have one in your theme's folder, then it must be using the one in default. folder. I'll get back you a.s.a.p.

<EDIT>
Here's your modified Display.template.php Perpetuallove. It was installed 3 times.  ;)
</EDIT>

Thanks for trying this mod.
Title: Re: Stars and Badges
Post by: perpetuallove on March 04, 2008, 10:50:54 PM
ok i got it- so how long do you think it should take to work? cuz i deleted that other file and uploaded the one u fixed for me, but its been abt 10 minutes and it still says it cant load it? :)

(editing)
Um ok so i see what may be the deal . there were 2 of those files- one it would let me edit the other it wouldnt- it was just a download i guess? i deleted the one i could edit and was trying to upload the new one, but it says its uploaded and i look and its not? the only one that shows is

display.template.php~

(it does have that little thing after it )
Title: Re: Stars and Badges
Post by: Bulakbol on March 04, 2008, 10:54:08 PM
Quote from: perpetuallove on March 04, 2008, 10:50:54 PM
ok i got it- so how long do you think it should take to work? cuz i deleted that other file and uploaded the one u fixed for me, but its been abt 10 minutes and it still says it cant load it? :)

uh uh. It should load at once.  Are you sure it wasn't uploaded as txt?


<EDIT>
The one with ~ (tilde) is a backup file.
</EDIT>
Title: Re: Stars and Badges
Post by: perpetuallove on March 04, 2008, 10:56:40 PM
um no it says .php at the end- its the one i downloaded from you :) but it says its uploaded and i go look at my file manager and its not there :(
Title: Re: Stars and Badges
Post by: Bulakbol on March 04, 2008, 10:58:55 PM
How did you uploaded it? Did you use FTP program? Or does your host allow you to upload?
Title: Re: Stars and Badges
Post by: perpetuallove on March 04, 2008, 11:00:30 PM
yah it does- i was able to do the other file with no problem :) Since its just one i uploaded it thru my host- do i need to try ftp?
Title: Re: Stars and Badges
Post by: Bulakbol on March 04, 2008, 11:03:58 PM
Quote from: perpetuallove on March 04, 2008, 11:00:30 PM
yah it does- i was able to do the other file with no problem :) Since its just one i uploaded it thru my host- do i need to try ftp?

Yes, try FTP because I always use FTP when I upload files to my host.
Title: Re: Stars and Badges
Post by: perpetuallove on March 04, 2008, 11:19:33 PM
hmm i tried ftp and it said that file was already there- so i deleted it and uploaded the new one, and its saying this:


[20:17:28] SIZE display.template.php
[20:17:28] 550  /soldiers_wife13/forums/SMF/Themes/default/display.template.php: not a plain file.
[20:17:28] CWD /soldiers_wife13/forums/SMF/Themes/default/display.template.php
[20:17:29] 550 /soldiers_wife13/forums/SMF/Themes/default/display.template.php: No such file or directory.



:(

its still not working?


(edit)
I got it to work- i had to rename it and make it a capital D :) Thanks sooo soo much for your help!
Title: Re: Stars and Badges
Post by: Bulakbol on March 04, 2008, 11:24:26 PM
Let me check if it working. I'm going to login. Will that be okay to you?

<EDIT>
awww I went in haha. Yes. I saw it working. That's great! If you need more help, just yell.  :D
Nice site.
</EDIT>
Title: Re: Stars and Badges
Post by: perpetuallove on March 04, 2008, 11:42:42 PM
yah its working- but somethings not right  ???
here is how i want it to look- i want the regular category on top (for me its admin- for the other girls its e1,e2,etc ) and the secondary membergroup- which is army, navy, etc- to be on bottom- even if its the other way around that would be fine. The e1,e2 etc are based on posts- the army, navy, etc are not. here is mine- it looks right:

(http://i212.photobucket.com/albums/cc29/PerpetualLove/tutorials/Image115.png)

and this is how it looks in my profile-

(http://i212.photobucket.com/albums/cc29/PerpetualLove/tutorials/Image116.png)


This is another girls- and im not sure what happened/why it did this- but i looked in the membergroups and its not letting me change it. Hers should have an e4 above the army :)

(http://i212.photobucket.com/albums/cc29/PerpetualLove/tutorials/Image117.png)

(http://i212.photobucket.com/albums/cc29/PerpetualLove/tutorials/Image114.png)

any ideas?

Also- that CSIAngel- she has her own little board in there that she is the moderator of- but it wont let her moderate it now. Can i not have it to where all the girls are members of 2 groups- and then make certain ones moderators of their own section?
Title: Re: Stars and Badges
Post by: Bulakbol on March 04, 2008, 11:57:36 PM
Hi Perpetuallove. One at a time haha. Let's do the top one first. The double ARMY is maybe because her primary group is army and you added an additional group also as army. That's probably the reason why it's double. Check her additional group if it's the same as her primary gruop. Remove the additional group. We will deal with the other one after this one.
Title: Re: Stars and Badges
Post by: perpetuallove on March 05, 2008, 12:16:10 AM
OK you were right- now the one that shows is just one Army, nothing else. So what happened to her e4?

Am I gonna have to go thru every ones profile to make both ranks show once i had them to the right membergroups?
I gave you admin access :)

Title: Re: Stars and Badges
Post by: Bulakbol on March 05, 2008, 12:17:11 AM
Use the e4 as the primary group or post group. Then add the army as the additional group. That way, they will both show up intheir post.
Title: Re: Stars and Badges
Post by: perpetuallove on March 05, 2008, 12:20:56 AM
oooooooooo oh ok i got that to work- i didnt know i could click no primary membergroup to get the e4 to show :) thanks so much!

How abt the part that she cant moderate her section? shes not online right now so i cant ask her if it fixed- i guess i might have to come back tomorrow once she gets back to me ;)

Thanks so much. You rock! - and so does this mod! lol
Title: Re: Stars and Badges
Post by: Bulakbol on March 05, 2008, 12:30:16 AM
 8) That's great! It's all working now then ha. PM me when you need help for the moderating thing. If you still have problem with this mod, just post it here. Good luck!
Title: Re: Stars and Badges
Post by: Jazhawk on March 05, 2008, 06:36:08 PM
I installed it from the package manager.  No errors at all.  Followed your instructions as you posted here and I get the same as below.  Also, I'm on the default template.

(http://i104.photobucket.com/albums/m193/leeradel/nothing1.jpg)
(http://i104.photobucket.com/albums/m193/leeradel/nothing2.jpg)

-Jazhawk
Title: Re: Stars and Badges
Post by: Bulakbol on March 05, 2008, 09:30:48 PM
Hi Jazhawk. Maybe there's no stars or badges in your additional groups. Can you post a link to your site? It will help me find the problem.
Title: Re: Stars and Badges
Post by: GJSchaller on March 06, 2008, 10:33:53 PM
Hello,

It looks like I am running into a similar issue as a few others.  I have a custom theme, but it is NOT using display.template.php in it (I am running off the Default theme for that).  I installed from the Package Manager, and got no errors.  The code seems to be inserted properly in the Display Template, and only one time.

Attached is an image of what someone who is a regular user, with several additional groups, shows up as - the name of the groups is not listed.

The forum is at: http://www.knightrealms.com/Components/Forums/

Thank you for your help!
Title: Re: Stars and Badges
Post by: Bulakbol on March 06, 2008, 10:40:45 PM
Hi GJSchaller . It looks like the mod was installed twice. Attach your Display.template.php and I'll look at it and make changes.
Title: Re: Stars and Badges
Post by: GJSchaller on March 06, 2008, 10:44:19 PM
Weird... I only saw the code once.

Should it be showing the Group Names as well, next to the stars?  (I think it's supposed to, but I am not 100% sure...)

Attached is the default Display.template.php after loading the package.
Title: Re: Stars and Badges
Post by: Bulakbol on March 06, 2008, 10:52:34 PM
It will show only the names of additional groups in their profile. In topics, it will only display the additional groups' stars or badges. I have your template. I'll get back to you after editing.

EDIT:
  There's nothing wrong with your Display.template,php. It is properly installed.  Can you give me temporary admin access to your site so I can check what's wrong?
Title: Re: Stars and Badges
Post by: GJSchaller on March 06, 2008, 10:55:45 PM
Thank you for all the help!  I would LOVE to have a mod that would actually display the name of the group as well - although I could fake it with graphics, it's not the same.  We use member groups to tell who is Staff in our group, so it would be really helpful to know who is in which group at a glance when they are posting.

Thank you again!
Title: Re: Stars and Badges
Post by: Bulakbol on March 06, 2008, 10:59:29 PM
Ok then. Thanks for trying this mod. Giood luck.
Title: Re: Stars and Badges
Post by: Jazhawk on March 07, 2008, 11:22:18 AM
Quote from: JohnyB on March 05, 2008, 09:30:48 PM
Hi Jazhawk. Maybe there's no stars or badges in your additional groups. Can you post a link to your site? It will help me find the problem.


Badges??  We don't got no badges?

Sorry, I got lost in some old comedy routine.  :D

I'm here, www.edivaonline.com/blue

-Jazhawk
Title: Re: Stars and Badges
Post by: Bulakbol on March 07, 2008, 03:31:13 PM
Quote from: Jazhawk on March 07, 2008, 11:22:18 AM
Quote from: JohnyB on March 05, 2008, 09:30:48 PM
Hi Jazhawk. Maybe there's no stars or badges in your additional groups. Can you post a link to your site? It will help me find the problem.

Badges??  We don't got no badges?

Sorry, I got lost in some old comedy routine.  :D

I'm here, www.edivaonline.com/blue

-Jazhawk

Young site and still naked. lol  You are probably into health and not into fashion. If you want to laugh, visit us (the comedians) more often. haha

SMF Customizer team uses badge or rank or whatchamacallit but I call it badge and not stars. This mod will only display the additional group's stars or badge or whatever you use for them to be recognized. 'Hope you know what I am talking about.
Title: Re: Stars and Badges
Post by: Jazhawk on March 07, 2008, 04:31:53 PM
Quote from: JohnyB on March 07, 2008, 03:31:13 PM
Quote from: Jazhawk on March 07, 2008, 11:22:18 AM
Quote from: JohnyB on March 05, 2008, 09:30:48 PM
Hi Jazhawk. Maybe there's no stars or badges in your additional groups. Can you post a link to your site? It will help me find the problem.

Badges??  We don't got no badges?

Sorry, I got lost in some old comedy routine.  :D

I'm here, www.edivaonline.com/blue (http://www.edivaonline.com/blue)

-Jazhawk

Young site and still naked. lol  You are probably into health and not into fashion. If you want to laugh, visit us (the comedians) more often. haha

SMF Customizer team uses badge or rank or whatchamacallit but I call it badge and not stars. This mod will only display the additional group's stars or badge or whatever you use for them to be recognized. 'Hope you know what I am talking about.

lol.  Actually we are close to 7 years old. I recently moved to a different host and have not figured out how to import stuff I saved from the other host.  Most are waiting for me to get the board back up and drop emails.

Anyway, if I understand you correctly, I'll need to upload some badges in order for them to display correct?

-Jaz
Title: Re: Stars and Badges
Post by: Bulakbol on March 07, 2008, 07:01:19 PM
Maybe, these screenshots will help other new admins as well. Donator is additional group and MG1.jpg shows the badge that I use for donators.  If I will modify the donator group, I will get MG2.gif. Instead of stars.gif, I use donator.gif. I then go to the profile of my donator and add the additional group MG3.jpg. This image will be displayed in every donator's post under their post_group_stars.

Title: Re: Stars and Badges
Post by: Taurusguy on March 07, 2008, 07:54:35 PM
Hi ... i really like this mod .. but im having an issue with it. I can only get the main membergroup to display. IT says the TEXT of the additional user groups .. but wont show the images i have set for the post groups with the membergroups.

What am i doing wrong? ... I installed the package with the package installer .. everthing went fine ... BTW .. im using helios_multi11final for my theme .. with a few mods in it. I am confused :( id really like the additional badges to appear if possible.

Thanks

www.clandoj.com
Title: Re: Stars and Badges
Post by: Taurusguy on March 07, 2008, 10:07:00 PM
Ok .... i got it to work, but its not showing the post count badges. But it is displaying the membergroups badges NP. Is it possible to have the post count badges/stars AND the membergroup badges/stars? Or is that something different alltogether?? IF youcan hlp me achieve this .. that would be great

Thanks
Title: Re: Stars and Badges
Post by: Taurusguy on March 07, 2008, 11:56:57 PM
OK .... i got it .. i found anothermod that allowed whati requested .. it was out of date ... but i changed it so it worked with 1.1.4

It now displayes main member group images, secondary membergroup images and post count images .. with this mod .. and THIS one combined.

http://www.simplemachines.org/community/index.php?topic=49203.100

:)
Thanks for this mod ... took a bit of farting arond to figure it out cause im a PHP newb .. but .. after pulling out some hair ... I finally got it.

Title: Re: Stars and Badges
Post by: Bulakbol on March 08, 2008, 05:54:29 PM
@Taurusguy.
  Sorry for the delayed reply. Are you okay now? Do you still need help?

Do not change their post_group. Just add the primary_group as additional group so both post_group stars and primary_group (additional_group) badges will be displayed in their posts.
Title: Re: Stars and Badges
Post by: Bulakbol on March 08, 2008, 06:01:14 PM
Quote from: Jazhawk on March 07, 2008, 04:31:53 PM

Anyway, if I understand you correctly, I'll need to upload some badges in order for them to display correct?

-Jaz

Are you okay now Jaz? Yes, you have to upload badges and then use them as stars when adding primary_group.
Title: Re: Stars and Badges
Post by: diegolyanky on March 08, 2008, 07:42:58 PM
DOn't work on my ...

Installed and all groups are showing like always.

Installed on helios_multi11 and SMF 1.1.4 without error on installation.
Title: Re: Stars and Badges
Post by: Taurusguy on March 09, 2008, 01:48:29 AM
yeah htings are good .. i just realized that it didnt allow post groups to show with member groups ... i added in that other mod after i altered the xml file and it worked great in combo with yours. :)
Title: Re: Stars and Badges
Post by: Bulakbol on March 09, 2008, 12:49:03 PM
@Taurusguy. At least you found out and know what you are doing.  ;)


@diegolyanky.
   Create an additional primary_group and assign stars on it. Then use additional_group to assign your members to that new group.  Do not touch your members assigned post_group. Click the [Additional Group] to add the new primary_group. If you are confused, let me know and I'll show you a screenshot.
Title: Re: Stars and Badges
Post by: diegolyanky on March 10, 2008, 07:56:57 AM
@diegolyanky.
   Create an additional primary_group and assign stars on it. Then use additional_group to assign your members to that new group.  Do not touch your members assigned post_group. Click the [Additional Group] to add the new primary_group. If you are confused, let me know and I'll show you a screenshot.
[/quote]

I did it ... And I have aditional member group ( not based on messages ) and didn't worked.

Thanks !
Title: Re: Stars and Badges
Post by: Bulakbol on March 10, 2008, 09:52:51 PM
Hi diegolyanky. If you did it and didn't work, then you prpbably did it wrong.  :P If you require my help, I need a kink to your site and if possible, give me temporary admin access so I can find out what is wrong.

Did you install the mod manually? If not, did you get any error during installation?
Title: Re: Stars and Badges
Post by: Bulakbol on March 12, 2008, 09:30:15 AM
If you want to display the names of additional groups on top of the additional stars/badge, in Display.template.php, look for
echo $message['member']['additional_groups']['stars'][$i], '<br />';

and replace with
echo $message['member']['additional_groups']['name'][$i], '<br />', $message['member']['additional_groups']['stars'][$i], '<br />';


Nosey admin?. Aren't they all?  :D If you want to display Buddies of your members in their posts, in Display.template.php, look for

// Show how many posts they have made.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />';


and under it, add these codes.

// show buddies of poster
if ($context['user']['is_admin'])
echo '<acronym style="cursor: hand;" title="'. implode(', ', $message['member']['buddies']) .'">
Buddies: <b>', !empty($message['member']['buddies']) ? count($message['member']['buddies']) : 'none', '</b></acronym><br />';


Only admin can see. Hover your mouse over the number of buddies and the id's will pop up.
Title: Re: Stars and Badges
Post by: D.S on March 12, 2008, 05:37:27 PM
Hey Johny

I need some help plz
see this result
./Themes/default/Display.template.php     Test failed
I tried to upload the mod manually but unfortunately I failed
so I'd be very pleased If you helped me

I attach u my Display.template.php ,plz I Like ur mod ;)
note: I use Dilber theme  8)

Best Regards Dude
Title: Re: Stars and Badges
Post by: Bulakbol on March 12, 2008, 05:54:08 PM
Got it D.S. I'll take a look at it now. I'll get back to you later if not sooner.  :)


EDIT:
  Ok dude. here's your Display.template.php. Upoad this then install the mod. I didn't put the codes in. I just fixed the line that failed the installation text.
Title: Re: Stars and Badges
Post by: D.S on March 12, 2008, 08:07:00 PM
Done>>thank u very much 

really I like ur effort

Best Regards
Title: Re: Stars and Badges
Post by: Bulakbol on March 12, 2008, 08:19:14 PM
Quote from: D.S on March 12, 2008, 08:07:00 PM
Done>>thank u very much 

really I like ur effort

Best Regards

That's great. It's my pleasure. If you still encounter a problem, just post and I'll try the best I could to help. Thanks for using this mod.
Title: Re: Stars and Badges
Post by: byone on March 14, 2008, 03:13:44 AM
I'm now getting double images of the membergroup stars.  It does look correct in the profile summary however.

i'm the same problem with "Shortrnd"

hope u can help me.......

this is my display.template.php

tq
Title: Re: Stars and Badges
Post by: Bulakbol on March 14, 2008, 03:26:56 AM
Hi Byone. Thanks for using this mod. Here's your edited Display.template.php. The mod was installed twice. It should work properly now.
Title: Re: Stars and Badges
Post by: byone on March 14, 2008, 05:04:12 AM
very nice.....
quick response.....

thanks
Title: Re: Stars and Badges
Post by: Bulakbol on March 14, 2008, 05:54:58 AM
My pleasure. Thanks again for using this mod.  8)
Title: Re: Stars and Badges
Post by: Jade Elizabeth on March 25, 2008, 08:22:22 PM
YAAAAAAAAAAAAAAAAY!!!!!!!!!

Sorry, I have the need to display multiple badges, so I'm really excited about this!

Thanks JB!!
Title: Re: Stars and Badges
Post by: Bulakbol on March 26, 2008, 11:03:48 PM
Quote from: Zygomaticus on March 25, 2008, 08:22:22 PM
YAAAAAAAAAAAAAAAAY!!!!!!!!!

Sorry, I have the need to display multiple badges, so I'm really excited about this!

Thanks JB!!

Thanks Al.  8) If you need assistance let me know.
Title: Re: Stars and Badges
Post by: Craw on April 02, 2008, 09:11:55 AM
Hi. I like this mod. Is there a way to toggle certain/specific membergroups' badges?
Title: Re: Stars and Badges
Post by: Shortrnd on April 02, 2008, 02:53:47 PM
JohnyB,

I just wanted to let you know that this mod has been great for us.  We've had a ton of positive comments about the mod and how it's made our site stand out from the others.

Here's how it looks for us

One thing that I wanted to ask you is if you had any plans to allow us to arrange the awards differently.  As you can see, the awards line up top to bottom and I'd like to be able to arrange them in lines of 3.  Any thoughts about doing this?

Regardless, the mod is great and really appreciate the work you've done and the help you've given me.

Shortrnd

Title: Re: Stars and Badges
Post by: Bulakbol on April 02, 2008, 07:58:44 PM
@Craw. Toggle on or off or arrange like what Shortrnd is asking?


@Shortrnd. It is possible to arrange the display but I think we have to use additional group id. I'll see what I can do. I'll keep you posted.

Title: Re: Stars and Badges
Post by: Green Death on April 04, 2008, 01:15:59 PM
My problem with this mod is that I use many "additional groups", but do not want images displayed for all of them. Those "additional groups" that lack images still produce "gaps" on the post.
Title: Re: Stars and Badges
Post by: Bulakbol on April 04, 2008, 02:22:08 PM
Quote from: Green Death on April 04, 2008, 01:15:59 PM
My problem with this mod is that I use many "additional groups", but do not want images displayed for all of them. Those "additional groups" that lack images still produce "gaps" on the post.

Hi GreenDeath. I thought I fixed it so it won't load empty stars. You can try this so it won't display additional groups that does not have stars or badge.

Display.template.php, look for
if (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo $message['member']['additional_groups']['stars'][$i], '<br />';


and replace with
if (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
if ($message['member']['additional_groups']['stars'] != '')
echo $message['member']['additional_groups']['stars'][$i], '<br />';


If you still have problem, let me know. Thanks for trying this mod. If there's a gap between the last badge and the avatar, remove the <br /> from this line
', $message['member']['group_stars'], '<br />';
Title: Re: Stars and Badges
Post by: Jade Elizabeth on April 04, 2008, 05:48:54 PM
JB, are you planning to put the option to choose which badges are able to show an icon if they are secondary groups? Like the previous group?

Can you make it so we can choose the order the badges are displayed in, so that if the user has badges 1, 3 and 4, they display like we ordered them?
Title: Re: Stars and Badges
Post by: Bulakbol on April 04, 2008, 06:58:44 PM
Quote from: Alundra on April 04, 2008, 05:48:54 PM
JB, are you planning to put the option to choose which badges are able to show an icon if they are secondary groups? Like the previous group?

Can you make it so we can choose the order the badges are displayed in, so that if the user has badges 1, 3 and 4, they display like we ordered them?

Hi Alundra. Would you like to be like the Group Color legend? The next version will have that option. I'll work on it then.  ;)
Title: Re: Stars and Badges
Post by: Green Death on April 04, 2008, 07:01:33 PM
While you're at it, can you change it so that it's possible to choose whether a badge is "inline" or not.

All the inline badges are shown on a single line and the rest are shown afterwards in separate lines.
Title: Re: Stars and Badges
Post by: Bulakbol on April 04, 2008, 07:20:42 PM
Quote from: Green Death on April 04, 2008, 07:01:33 PM
While you're at it, can you change it so that it's possible to choose whether a badge is "inline" or not.

All the inline badges are shown on a single line and the rest are shown afterwards in separate lines.

Hi again Green Death. I'll see what I can do. Thanks for your suggestion.
Title: Re: Stars and Badges
Post by: Jade Elizabeth on April 04, 2008, 07:34:10 PM
Quote from: JohnyB on April 04, 2008, 06:58:44 PM
Quote from: Alundra on April 04, 2008, 05:48:54 PM
JB, are you planning to put the option to choose which badges are able to show an icon if they are secondary groups? Like the previous group?

Can you make it so we can choose the order the badges are displayed in, so that if the user has badges 1, 3 and 4, they display like we ordered them?

Hi Alundra. Would you like to be like the Group Color legend? The next version will have that option. I'll work on it then.  ;)

(http://www.jades-world.com/forums/Smileys/default/cheesy.gif) You must be my favourite mod creator! Yeah, that would be good, great in fact, thank you :D.
Title: Re: Stars and Badges
Post by: Bulakbol on April 05, 2008, 01:08:14 AM
Quote from: Alundra on April 04, 2008, 07:34:10 PM

(http://www.jades-world.com/forums/Smileys/default/cheesy.gif) You must be my favourite mod creator! Yeah, that would be good, great in fact, thank you :D.

Wooo you know how to make people smile, do you know that?  ;)
Title: Re: Stars and Badges
Post by: Jade Elizabeth on April 05, 2008, 01:09:07 AM
I sure hope so JB. I believe it to be my ultimate purpose.

Is there anything I can help you with?
Title: Re: Stars and Badges
Post by: Bulakbol on April 05, 2008, 06:38:37 PM
Quote from: Alundra on April 05, 2008, 01:09:07 AM
I sure hope so JB. I believe it to be my ultimate purpose.

Is there anything I can help you with?

That's great! I know you can do it.  ;)

I am thinking about how to do it because of in-line badges. Thanks Alundra.

BTW, you have the rarest forum.
Title: Re: Stars and Badges
Post by: Green Death on April 05, 2008, 06:41:43 PM
For inline badges you would need another boolean entry in the membergroup table. Then just loop through the badges, displaying the inline ones, and then loop through again displaying the non-inline ones.

Or, have two arrays to begin with from the database.
Title: Re: Stars and Badges
Post by: Bulakbol on April 05, 2008, 07:00:46 PM
Quote from: Green Death on April 05, 2008, 06:41:43 PM
For inline badges you would need another boolean entry in the membergroup table. Then just loop through the badges, displaying the inline ones, and then loop through again displaying the non-inline ones.

Or, have two arrays to begin with from the database.

What Alundra want is a way to arrange the display. Just like the MCLegendII.1.  I am considering two fields. One for the arrangement and one for the inline badges. I am trying to avoid adding two fields to the table though.
Title: Re: Stars and Badges
Post by: Green Death on April 05, 2008, 07:03:46 PM
You could use an integer field.

Badges are shown in order of the integer. Any badge with an integer less than 100 is shown inline.
Title: Re: Stars and Badges
Post by: Bulakbol on April 05, 2008, 07:10:23 PM
Quote from: Green Death on April 05, 2008, 07:03:46 PM
You could use an integer field.

Badges are shown in order of the integer. Any badge with an integer less than 100 is shown inline.

I use ids in MCLegendII.1 and I use comma as a separator. Maybe use dash character to identify inline badges and comma for the others. Not sure how to read yet though.  :P
Title: Re: Stars and Badges
Post by: Green Death on April 05, 2008, 07:14:16 PM
I have just looked at your other mod.

If you're going to do it that way, why not just have two lists?

Or have two comma lists separated by a semicolon.
Title: Re: Stars and Badges
Post by: Bulakbol on April 05, 2008, 07:27:06 PM
Yes. I am considering two. I'll see what will come up. I want the easy way you know hehe. Thanks.
Title: Re: Stars and Badges
Post by: Jade Elizabeth on April 05, 2008, 07:30:47 PM
Remember, if you need ANY testing, I am more than willing :)
I haven't yet installed the mod, I'm waiting for the update (http://www.jades-world.com/forums/Smileys/default/shifty.gif) lol.
Title: Re: Stars and Badges
Post by: Bulakbol on April 05, 2008, 07:41:40 PM
Quote from: Alundra on April 05, 2008, 07:30:47 PM
Remember, if you need ANY testing, I am more than willing :)
I haven't yet installed the mod, I'm waiting for the update (http://www.jades-world.com/forums/Smileys/default/shifty.gif) lol.

Sure hun.  ;D Thanks.  I'll send you a copy when it's ready.
Title: Re: Stars and Badges
Post by: MissyNL on April 06, 2008, 11:14:19 AM
Hi Johny,

Great MOD! I am thinking 0f using it.
Title: Re: Stars and Badges
Post by: Bulakbol on April 06, 2008, 11:54:43 AM
Quote from: Lafemme on April 06, 2008, 11:14:19 AM
Hi Johny,

Great MOD! I am thinking 0f using it.

aww thanks a lot. I am upgrading it so admins can arrange the display.
Title: Re: Stars and Badges
Post by: MissyNL on April 06, 2008, 12:08:29 PM
Wow! That would be great!

I feel like such a dumbass.. with my questions.. you all develop.. and i get barely install SMF :D
But... slowly..  i'm getting there :D
Title: Re: Stars and Badges
Post by: Bulakbol on April 06, 2008, 12:24:33 PM
Quote from: Lafemme on April 06, 2008, 12:08:29 PM
Wow! That would be great!

I feel like such a dumbass.. with my questions.. you all develop.. and i get barely install SMF :D
But... slowly..  i'm getting there :D

Good luck. If you need help, a lot of people here are very helpful.  Enjoy!
Title: Re: Stars and Badges
Post by: Green Death on April 06, 2008, 12:37:21 PM
I'm not rushing you, but how long do you think it will take?
Title: Re: Stars and Badges
Post by: Bulakbol on April 06, 2008, 01:03:29 PM
Quote from: Green Death on April 06, 2008, 12:37:21 PM
I'm not rushing you, but how long do you think it will take?

Hi Green Death. I have it and if you want to test it, PM me with your email addy and I'll send you a copy.  It's for 2 beta 3 though.
Title: Re: Stars and Badges
Post by: Green Death on April 06, 2008, 01:10:33 PM
Oh, I need it for 1.1.4. Any chance?

I've sent you my email by PM.
Title: Re: Stars and Badges
Post by: Jade Elizabeth on April 06, 2008, 01:23:32 PM
I'm testing it now JB.
I'll let you know how it goes.
Title: Re: Stars and Badges
Post by: Bulakbol on April 06, 2008, 01:27:35 PM
Quote from: Alundra on April 06, 2008, 01:23:32 PM
I'm testing it now JB.
I'll let you know how it goes.

Thank Alundra.  ;)


@GreenDeath, I'll do the 1.1.4 next. Thanks for trying this mod.
Title: Re: Stars and Badges
Post by: Green Death on April 06, 2008, 01:29:04 PM
I can't install because I do not have a 2.0 forum, only a 1.1.4.

However, I see from the programming that you are doing the inline badges AFTER the ownline badges. I would prefer it the other way round.
Title: Re: Stars and Badges
Post by: Jade Elizabeth on April 06, 2008, 01:37:22 PM
(http://www.jades-world.com/forums/Smileys/default/yay!.gif)JB this is BRILLIANT. It is EXACTLY what I wanted! (http://www.jades-world.com/forums/Smileys/default/jump.gif) I cannot thank you enough!
Title: Re: Stars and Badges
Post by: Bulakbol on April 06, 2008, 01:50:41 PM
@Green Death. Ok, I'll do the changes and do it in 1.1.4 then. Give me couple of days. I'll send you a copy when it's ready.


@Alundra. Thanks my dear. I'll upload the update after the version for 1.1.4 is done. 
Title: Re: Stars and Badges
Post by: Green Death on April 06, 2008, 02:20:03 PM
I have read through the programming again.

Is it necessary to load from the database the membergroup details separately for every poster? This surely requires a database access for every post displayed (or at least every member).

Why not load ALL the membergroup details for the inline and ownline membergroups to begin with and then, for each poster, run through the inline and ownline lists and see if the ID is in the additionalgroups string? If it is, display the badge.
Title: Re: Stars and Badges
Post by: Bulakbol on April 06, 2008, 02:35:49 PM
Hi Green Death. They are all loaded. It is easy to display without the inline option. The additional groups' id, name, and stars are in an array while the options are separate because it's not in member's data. The options' data are in forum settings table.

Alundra tested only the version that has the option to enter the id's and display the stars/badges the way you enter them. No inline option. The one with inline option is only for you.  :)
Title: Re: Stars and Badges
Post by: Craw on April 06, 2008, 02:50:55 PM
Quote from: JohnyB on April 02, 2008, 07:58:44 PM
@Craw. Toggle on or off or arrange like what Shortrnd is asking?

JohnyB,
Firstly: great mod! I love it! Good work!

OK, back to my question: I wanted to toggle it on or off so it won't show under the name. The reason for this is I didn't change the default stars and the stars were showing under the badges and I don't like the looks of it. It's not uniform. What I did instead is just create a different kind of "label" in replacement of the stars.

But what I was originally asking was if I could have an option where, let's say, Group A shouldn't be shown in the poster details (under the name when posting a reply) or when viewing a person's profile.
Title: Re: Stars and Badges
Post by: Bulakbol on April 06, 2008, 10:42:27 PM
hi Craw. I am making changes to the mod so you can enter only the one you want to be displayed and in the order you entered. If you want to move the displayed stars or badge and can't do it yourself, let me know so I can move it for you. An image of what you want will help me. Thanks for trying/using this mod.
Title: Re: Stars and Badges
Post by: fecu2008 on April 09, 2008, 01:56:46 PM
Using this mod, is there a way to add the post count groups or do I have to just make new membergroups with the same images?
Title: Re: Stars and Badges
Post by: Bulakbol on April 09, 2008, 10:59:30 PM
Quote from: fecu2008 on April 09, 2008, 01:56:46 PM
Using this mod, is there a way to add the post count groups or do I have to just make new membergroups with the same images?

Sorry fecu2008, you can't add post group stars. You have to create a new group and designate a badge or stars for it. You can use the same images as your other post group.
Title: Re: Stars and Badges
Post by: fecu2008 on April 10, 2008, 12:08:19 PM
so there is no way of it changing icons for so many posts then?
Title: Re: Stars and Badges
Post by: Jade Elizabeth on April 10, 2008, 03:42:21 PM
Quote from: fecu2008 on April 10, 2008, 12:08:19 PM
so there is no way of it changing icons for so many posts then?

Once the post group has a badge, all the posts made by a member of that group will have the badge.
Title: Re: Stars and Badges
Post by: Bulakbol on April 10, 2008, 05:44:20 PM
Quote from: fecu2008 on April 10, 2008, 12:08:19 PM
so there is no way of it changing icons for so many posts then?

Install the mod and play with it. If it doesn't do what you expected the mod to do, uninstall it. Then you can tell me what you want and we'll see what we can do.


@Alundra. Hi there.
Title: Re: Stars and Badges
Post by: chrisb on April 10, 2008, 10:11:32 PM
I have installed on my forum and now works a treat
Title: Re: Stars and Badges
Post by: fecu2008 on April 11, 2008, 03:47:00 AM
i played with it, but it didnt enable images to change after so many posts. 

here is an idea of what I was looking for, they recommended this mod and its a great mod.  I just cant get it to do what my original plan was.

http://www.simplemachines.org/community/index.php?topic=233074.msg1502511#msg1502511
Title: Re: Stars and Badges
Post by: Bulakbol on April 12, 2008, 03:04:33 AM
@crisb.
Cool. Thanks for using or trying this mod.


@fecu2008
So, basically, what you really want in every post is

Primary Groupname (image)
Post groupname
stars

So you want the image (primary group stars/badge) first then post group name then post group stars?
Title: Re: Stars and Badges
Post by: fecu2008 on April 12, 2008, 03:07:42 PM
yes that is correct johny
Title: Re: Stars and Badges
Post by: Bulakbol on April 12, 2008, 08:10:08 PM
Quote from: fecu2008 on April 12, 2008, 03:07:42 PM
yes that is correct johny

Hi fecu2008. You are talking about primary groups. How about the post groups? Most info that you need are already available. The only thing you need is the primary_groups' post_group_stars. The setup right now is to display either primary group stars or post group stars but not both. Let me know what info you need other than the primary_groups' post_group_stars. If that's tjhe only one you need, maybe we can do something. But it's up to you to format the display.
Title: Re: Stars and Badges
Post by: fecu2008 on April 12, 2008, 08:34:02 PM
Yeah I would like to display them both.  If I put the primary group up there with an image image this mod, it will show the group post image off posts.

That is great, but if i change my primary group with an image, it will show the group post name but no image. 

I need an image for my primary group (instead of the text), my post group name (text) and under that the image that goes along with the post group name.  Once they reach a certain number of posts, i need it to change also, just like the default.

Title: Re: Stars and Badges
Post by: Bulakbol on April 12, 2008, 08:39:55 PM
Well, use image instead of stars then for all your groups. 

<edit>
$message['member']['group'] // group name
$message['member']['group_stars'] // post or primary group stars

Display the group_stars instead of the group name.
</edit>
Title: Re: Stars and Badges
Post by: fecu2008 on April 12, 2008, 09:37:55 PM
will that just replace the text to an image in just the primary membergroup?
Title: Re: Stars and Badges
Post by: Bulakbol on April 12, 2008, 09:48:17 PM
Quote from: fecu2008 on April 12, 2008, 09:37:55 PM
will that just replace the text to an image in just the primary membergroup?

If you want to display only images for primary group, you have to do some checking. You can try this and see if it will do it.
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
', $message['member']['group_stars'], '<br />';

Title: Re: Stars and Badges
Post by: fecu2008 on April 12, 2008, 10:46:54 PM
ok johny ill play around with it, thank you. 
Title: Re: Stars and Badges
Post by: Apllicmz on April 13, 2008, 12:33:12 AM
yes nice work

good Mod
translate portuguese Pt_Pt/pt_BR

<file name="$languagedir/Help.portuguese.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
$helptxt['badge_ownline'] = 'Organizar a exibição de grupos adicionais crachá ou estrelas. Digite o número adicional grupo id e devem ser separados por vírgula. (i.e. 1,2,4)';
]]></add>
</operation>
</file>

<file name="$languagedir/Help.brazilian.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
$helptxt['badge_ownline'] = 'Organizar a exibição de grupos adicionais crachá ou estrelas. Digite o número adicional grupo id e devem ser separados por vírgula. (i.e. 1,2,4)';
]]></add>
</operation>
</file>




<file name="$languagedir/ManageSettings.portuguese.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
$txt['badge_ownline'] = 'Organizar adicionais grupo identificaçao a serem exibido.<div class="smalltext">(Devem ser separados por vírgula. i.e. 1,2,4)</div>';
]]></add>
</operation>
</file>

<file name="$languagedir/ManageSettings.brazilian.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
$txt['badge_ownline'] = 'Organizar adicionais grupo identificaçao a serem exibido.<div class="smalltext">(Devem ser separados por vírgula. i.e. 1,2,4)</div>';
]]></add>
</operation>
</file>
Title: Re: Stars and Badges
Post by: Bulakbol on April 13, 2008, 06:39:14 PM
Quote from: fecu2008 on April 12, 2008, 10:46:54 PM
ok johny ill play around with it, thank you. 

If you need a code for reading primary groups' post_group stars/badges/images, let me know.


@Joomlamz. Thanks a lot for the translation.  8) Does the ModSettings equivalent of ManageSettings in your language? I need the one for ModSettings though.
Title: Re: Stars and Badges
Post by: Eliana Tamerin on May 01, 2008, 12:53:06 AM
Hey, Johny, I was toying around with this and I realized it doesn't show post groups. Would it be possible to include an option to show post groups in the next version of Stars and Badges? I nearly got it working, and then I forgot all about the Load.php file. Couldn't quite wrap my head around what it was telling me, so I gave up.

Btw, the old "Multiple Badges" mod did this, it showed both membergroup badges and postgroup badges.
Title: Re: Stars and Badges
Post by: Bulakbol on May 02, 2008, 01:21:46 PM
Hi Eliana. Sure.  I think I can do that. Thanks for the suggestion.
Title: Re: Stars and Badges
Post by: Niagra on May 06, 2008, 01:42:51 AM
hello,

I really need some help because  I don't have some of those  files that you asked  me to change in the manual  install.  I can  say that  this  mod  does work bcause its  showing stars in the place where it should be showing the images that I have created for the membergroups.   So  bottom line is  that  I need the image or rank icon  to be precise, to show instead of a star.  Can you please help me with that?

I seached in the subs folder  for the lines  and  no  go.  I don't have them.  I don't have a  dispay template in my theme, and I dont  have  mod settings  either.  So  I  am completely  baffled. 

Hopefully  its simply a matter of  diresting the mod to the rank image instead of stars

I  will  be  checking here  often.  Thanks

If you wish to see it you can  check it out at HERE (http://www.frogn.com)  Its an adult content website though.   If  you don't  object to that kind of thing.  I 'd be happy  to give you access as well. 

Thanks  very  much
Title: Re: Stars and Badges
Post by: Bulakbol on May 07, 2008, 05:28:35 AM
Hi Niagra. If you don't have the files that needed to be edited by this mod, then your custom theme probably use the default one. If there were no errors when you installed this mod, then it's okay.

This mod will display whatever you designated stars/badge as group stars. You have to use badge or image of your choice instead of stars. I visited your forum and there were missing images. If you need assistance, PM me a temporay admin access and I'll check it myself. Make sure that images used as stars exist in images folder. 
Title: Re: Stars and Badges
Post by: GhostRose on May 09, 2008, 05:45:03 PM
Sorry I'm such a dork, but I'm having a major brain fart...

Could someone please tell me where you find the group id?  I can't seem to find them displayed anywhere.

Thanks muchly!
Title: Re: Stars and Badges
Post by: Jade Elizabeth on May 09, 2008, 07:15:54 PM
Just hover OVER the group in the admin > membergroups section, and it will say group=## in the link location (seen mostly on the bottom left of the browser)
Title: Re: Stars and Badges
Post by: Bulakbol on May 10, 2008, 04:44:35 AM
@GhostRose. 
Did you follow Alundra's instruction? Do you know what to do now to find the id number?

@Alundra.
Can you flip your avatar vertically?  :P
Title: Re: Stars and Badges
Post by: MissyNL on May 10, 2008, 07:57:42 AM
Hi Johny,

I Have a This mod, a one of your many mods  :D, installed.

The I have made a group, VIPmember.. wich a have attached a picture to.

Al the account, inlcluding my own, it displays very well.. the only thing is, that one girls who is a moderator is does not display, eventho i have marked here as a vip member in here account ralating page on her profile.

Also.. i do no have the extra line as in your third screen shot http://custom.simplemachines.org/mods/index.php?action=download;mod=1110;id=53274;image (http://custom.simplemachines.org/mods/index.php?action=download;mod=1110;id=53274;image)

on the admin page..

And it doesnt display the picture in the profile and pm either...

do you know what might be wrong?

Thanks!

If you want i can send you a pm with the password, so you can take a look :)
Title: Re: Stars and Badges
Post by: Shortrnd on May 10, 2008, 08:09:17 AM
Quote from: Alundra on May 09, 2008, 07:15:54 PM
Just hover OVER the group in the admin > membergroups section, and it will say group=## in the link location (seen mostly on the bottom left of the browser)

You're not the only dork who couldn't figure that out , Ghostrose.  Thanks for pointing that out Alundra.

Now that I have that part figured out how do I now arrange the badges to display 3 side by side in a single line?  Or can I even do that? 

TIA

Shorty
Title: Re: Stars and Badges
Post by: Jade Elizabeth on May 10, 2008, 03:22:50 PM
Quote from: JohnyB on May 10, 2008, 04:44:35 AM
@Alundra.
Can you flip your avatar vertically?  :P

I'm getting ready to change it actually.

Quote from: Shortrnd on May 10, 2008, 08:09:17 AM
Quote from: Alundra on May 09, 2008, 07:15:54 PM
Just hover OVER the group in the admin > membergroups section, and it will say group=## in the link location (seen mostly on the bottom left of the browser)

You're not the only dork who couldn't figure that out , Ghostrose.  Thanks for pointing that out Alundra.

No prob. I'd look into help icons for this one JB :)
Title: Re: Stars and Badges
Post by: GhostRose on May 11, 2008, 12:49:47 AM
Quote from: JohnyB on May 10, 2008, 04:44:35 AM
@GhostRose. 
Did you follow Alundra's instruction? Do you know what to do now to find the id number?

Yup, I found it.  Thanks!
Title: Re: Stars and Badges
Post by: Bulakbol on May 11, 2008, 04:03:36 AM
@Alundra.
     When are you going to replace your avatar? I feel sleepy everytime I look at it.  :D

Maybe we should add instruction to the help text on how to find group id's.

@GhosRose.
     Good to know.
Title: Re: Stars and Badges
Post by: Jade Elizabeth on May 11, 2008, 07:14:00 AM
Quote from: JohnyB on May 11, 2008, 04:03:36 AM
@Alundra.
     When are you going to replace your avatar? I feel sleepy everytime I look at it.  :D

Maybe we should add instruction to the help text on how to find group id's.

@GhosRose.
     Good to know.


Done now :P
Title: Re: Stars and Badges
Post by: Bulakbol on May 11, 2008, 07:48:48 AM
Quote from: Alundra on May 11, 2008, 07:14:00 AM
Quote from: JohnyB on May 11, 2008, 04:03:36 AM
@Alundra.
     When are you going to replace your avatar? I feel sleepy everytime I look at it.  :D

Maybe we should add instruction to the help text on how to find group id's.

@GhosRose.
     Good to know.


Done now :P

Wooo that's better. :) I hope you aren't mad.  ;)
Title: Re: Stars and Badges
Post by: Jade Elizabeth on May 11, 2008, 07:57:04 AM
Mad? As a hatter JB :P
Title: Re: Stars and Badges
Post by: Bulakbol on May 12, 2008, 04:19:11 AM
@Alundra.
I know you don't hate me.  Maybe upset but not angry. Maybe not in good mood but not mad.   :P

@Lafemme.
I'll get back to you as soon as I finish what I am doing.  ;)
Title: Re: Stars and Badges
Post by: Shortrnd on May 12, 2008, 09:28:10 AM
JB, does this new version allow me to arrange my badges left to right on one line?  If so can you help me out with doing that.  If not do you think you will incorporate that in a future release?

Thanks again

Shortrnd
Title: Re: Stars and Badges
Post by: Eliana Tamerin on May 12, 2008, 10:26:11 AM
That's easy.

Open your Display.template.php and find this:
', $message['member']['group_stars'], '<br /> <br />';

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], '<br />';
}
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo $message['member']['additional_groups']['stars'][$i], '<br />';


Then just remove the '<br />' tags and replace them with '&nbsp;'. There's four of those tags.
Title: Re: Stars and Badges
Post by: Bulakbol on May 13, 2008, 02:35:45 AM
Eliana is right. But if you want to make the first 3 additional stars in one line, you can try this.
Code (find) Select

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], '<br />';
}


and replace with

if (!empty($context['badges']['ownline']))
{
$x=0;
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];
if ($x > 1)
echo '<br />';
else
echo '&nbsp;';
$x++;
}
}
Title: Re: Stars and Badges
Post by: bros on May 13, 2008, 02:45:03 PM
Is there a way to make the stars of the additional masks a space below the primary mask?

Since on my forum, we use pictures to show what rank someone is.

But some people have up to 8 masks. So we want to put just a little space between the primary and the secodary masks
Title: Re: Stars and Badges
Post by: Bulakbol on May 13, 2008, 09:53:59 PM
To add space between additional stars/badges, in Display.template.php
Code (find) Select

echo $message['member']['additional_groups']['stars'][$i], '<br />';


Code (replace) Select

echo '<div style="padding-top: 4px;"></div>', $message['member']['additional_groups']['stars'][$i], '<br />';


Replace the 4px with the number of pixels you want. Thanks for trying/using this mod.
Title: Re: Stars and Badges
Post by: bros on May 14, 2008, 04:12:51 PM
Quote from: JohnyB on May 13, 2008, 09:53:59 PM
To add space between additional stars/badges, in Display.template.php
Code (find) Select

echo $message['member']['additional_groups']['stars'][$i], '<br />';


Code (replace) Select

echo '<div style="padding-top: 4px;"></div>', $message['member']['additional_groups']['stars'][$i], '<br />';


Replace the 4px with the number of pixels you want. Thanks for trying/using this mod.

Awesome.

It works. Thanks.
Title: Re: Stars and Badges
Post by: Shortrnd on May 17, 2008, 02:36:46 AM
JB,

I tried both edits suggested above.  Eliana's edit put all of the badges in a line after the post count group image. 

Your edit put 3 badges on the first line exactly like I was wanting.  All other badges after that were arranged top to bottom.  Is there a way to allow all badges to align in rows of 3 just like the first line? 

Thanks for all the help.
Title: Re: Stars and Badges
Post by: Eliana Tamerin on May 17, 2008, 12:15:39 PM
JohnyB, in the code you gave Shortrnd, why do you have $x incrementing twice? You already declared its exit behavior in the for loop statement, you shouldn't need to increment it again within the loop.
Title: Re: Stars and Badges
Post by: Bulakbol on May 18, 2008, 12:33:52 AM
Hi Eliana. The variable $x is inside the if statement block and only incremented when the result of  "if" is "true". The "for" loop only deals with the variable $i.


@Shortrnd. How many additional badges do you have? Too many?  :P
Title: Re: Stars and Badges
Post by: Eliana Tamerin on May 18, 2008, 12:38:04 AM
Yep, another case of "Oops, I read it wrong again." And yet another case of bad lyric references. :P
Title: Re: Stars and Badges
Post by: Bulakbol on May 18, 2008, 12:46:59 AM
Quote from: Eliana Tamerin on May 18, 2008, 12:38:04 AM
Yep, another case of "Oops, I read it wrong again." And yet another case of bad lyric references. :P

No problem at all Eliana. ;) It happens to me all the time.
Title: Re: Stars and Badges
Post by: Shortrnd on May 18, 2008, 08:16:14 AM
JB,

I have as many as 10 right now and will probably be adding more as the site continues to grow.  If I could get them to line up in rows of 3 by default then I would be a very happy man. 

Again thank  you for all the help you've provided. 
Title: Re: Stars and Badges
Post by: Bulakbol on May 20, 2008, 05:23:33 PM
You can try this Shortrnd. 3 lines of 3 badges each line.


if ($message['member']['additional_groups']['id'][$i] == $key)
{
echo $message['member']['additional_groups']['stars'][$i];
if ($x > 1 && $x < 3)
echo '<br />';
elseif ($x > 4 && $x < 6)
echo '<br />';
elseif ($x > 7)
echo '<br />';
$x++;
}
Title: Re: Stars and Badges
Post by: Shortrnd on May 27, 2008, 06:51:53 PM
Thank you so much for putting that together for me, JB.

I just can't seem to get it to work though.  Here's my display template that I've attempted to change.  Is there any way you could take a quick peek at it to see what I'm doing wrong?

Thanks again.

Title: Re: Stars and Badges
Post by: Bulakbol on May 27, 2008, 10:55:18 PM
Hi Shortrnd. Here's your modified Display.template.php. Fiddle with the codes. I added a space between inline badges. Remove it if you don't need it. Good luck.

Title: Re: Stars and Badges
Post by: Shortrnd on May 28, 2008, 09:36:50 AM
That's what I'm looking for but now it's showing the first line after the post count image.  I've attached a screen shot.  I think I removed the space between lines correctly but I'll attach it also just in case.

Thanks for the support on this mod, JB.  You are a god send.
Title: Re: Stars and Badges
Post by: Bulakbol on May 29, 2008, 12:58:30 AM
Is this the way you want it Shortrnd?
Title: Re: Stars and Badges
Post by: GhostRose on June 03, 2008, 12:46:28 AM
Hi :)  Loving the mod!

Is there by chance a limit on how many groups you can add to the additional ID field?  It seems if I add over 25 groups to the list, the ones after the 25th entry do not work.

Thoughts?

Thanks! :)
Title: Re: Stars and Badges
Post by: Bulakbol on June 03, 2008, 01:13:20 AM
Hi GhostRose,
Thank you for using/trying this mod. In sources/Load.php,
Code (find) Select
$context['badges']['ownline'] = !empty($modSettings['badge_ownline']) ? explode(',', $modSettings['badge_ownline'], 20) : '';

and change the number 20 at the end of the line to 50. That should be enough I guess. :)
Title: Re: Stars and Badges
Post by: GhostRose on June 03, 2008, 10:19:09 AM
Quote from: JohnyB on June 03, 2008, 01:13:20 AM
Hi GhostRose,
Thank you for using/trying this mod. In sources/Load.php,
Code (find) Select
$context['badges']['ownline'] = !empty($modSettings['badge_ownline']) ? explode(',', $modSettings['badge_ownline'], 20) : '';

and change the number 20 at the end of the line to 50. That should be enough I guess. :)

Wonderful!  Thank you! :)  (I changed it to 75 just to be safe.  I still have at least 12 more groups to add ;) )
Title: Re: Stars and Badges
Post by: Bulakbol on June 03, 2008, 03:24:04 PM
Holy moly! Too many. :) Well, at least you know now where to increase the count.
Title: Re: Stars and Badges
Post by: slyone on June 03, 2008, 03:58:15 PM
Trouble free installation! Great mod!
Thank You!
Title: Re: Stars and Badges
Post by: Acans on June 12, 2008, 09:12:39 PM
in the personal message you gave me info on changed the star to name it didnt work, its like the mod isnt installed, but i have doen everything i was ment to do, why itsnt it working???
Title: Re: Stars and Badges
Post by: Bulakbol on June 12, 2008, 10:38:39 PM
Are you using custom theme? Try using the default theme and see if it works there. Let me know how things goes.
Title: Re: Stars and Badges
Post by: Acans on June 14, 2008, 07:55:49 AM
i tryed using it with the defult theme but still no luck, i edited the file you asked me to but still nothing
Title: Re: Stars and Badges
Post by: Bulakbol on June 14, 2008, 07:17:53 PM
Did you install the mod manually? I tested the codes and working perfectly. You must be doing it incorrectly. Would you like to attach your Display.template.php?
Title: Re: Stars and Badges
Post by: Acans on June 14, 2008, 08:20:56 PM
just give it time, i ******ed my forum playing around with flash chat intergation, for some reason the regestered members couldnt log in
Title: Re: Stars and Badges
Post by: Colyn on June 15, 2008, 04:10:44 AM
Ok I use the Faux Apple Theme and installed the mod ... the Groups display properly in the member's profile on posts but I cannot add a custom image file ... when I add a filename it reverts to "*" and then displays the default star.gif image.

Please help.
Title: Re: Stars and Badges
Post by: Acans on June 15, 2008, 04:15:16 AM
you need to upload the image you want desplayed to SMF/THEMES/YOURTHEME/IMAGES/ and Bam, Piece of piss
Title: Re: Stars and Badges
Post by: Colyn on June 15, 2008, 04:20:25 AM
Quote from: Basicallyimjesus on June 15, 2008, 04:15:16 AM
you need to upload the image you want desplayed to SMF/THEMES/YOURTHEME/IMAGES/ and Bam, Piece of piss

Sadly not "piss" :) ... been trying the whole morning.

I run 1.1.5 and the Faux Apple Theme.
Title: Re: Stars and Badges
Post by: Acans on June 15, 2008, 04:30:35 AM
.....you shore you been uploading to the right place, beucase tis how tis done.
Title: Re: Stars and Badges
Post by: Colyn on June 15, 2008, 04:36:59 AM
Yes ... correct image folder.
Title: Re: Stars and Badges
Post by: Bulakbol on June 15, 2008, 06:54:47 PM
Do you still need assistance Colyn?
Link to your forum?
Title: Re: Stars and Badges
Post by: Colyn on June 15, 2008, 11:41:25 PM
Yes please ... I do need assistance.

Unfortunately the forum is a "closed" inter company support forum.

What can I do to make it possible for you to help me ?
Title: Re: Stars and Badges
Post by: Bulakbol on June 16, 2008, 12:53:50 PM
Hi Colyn.

Upload your new images/badges to Themes\Faux_Apple\images folder. Then edit your Membergroups and enter the filename in "Star image filename: " text box.

You can also attach your Display.template.php so I can check it.
Title: Re: Stars and Badges
Post by: Colyn on June 16, 2008, 01:48:30 PM
I can confirm that the images re in the Faux_Apple/images folder. If I enter one of them in the Group Star Image field ... I see a "*"

Here is the file ... thank you.
Title: Re: Stars and Badges
Post by: Acans on June 16, 2008, 05:58:20 PM
are you using the right picture file type: .gif, .jpg ect?
Title: Re: Stars and Badges
Post by: Colyn on June 16, 2008, 06:07:21 PM
Quote from: Basicallyimjesus on June 16, 2008, 05:58:20 PM
are you using the right picture file type: .gif, .jpg ect?

Yes.
Title: Re: Stars and Badges
Post by: Bulakbol on June 16, 2008, 07:48:56 PM
Hi Colyn. Here's your Display.template.php. The mod wasn't properly installed. Let me know how it goes.
Title: Re: Stars and Badges
Post by: Colyn on June 17, 2008, 03:04:58 AM
Thanks ... I have updated the Theme DIsplay Templet but still no joy :(

Same thing ... when I enter the new image name I get the "*"

Title: Re: Stars and Badges
Post by: Colyn on June 17, 2008, 03:14:55 AM
Thanks JohnyB ... found the problem ... it was an issue of the FTP User that inserted new files and the new files did not have the right RIGHTS :) ... thanks again.

Now for a request ... is there a posibility that you could make provision for a "HOVER TEXT" feature ?
Title: Re: Stars and Badges
Post by: Colyn on June 17, 2008, 05:00:55 AM
Hmmm ... now the image shows in the Groups Admin Window but no longer in the Member's Profile in posts ?
Title: Re: Stars and Badges
Post by: Colyn on June 17, 2008, 05:06:18 AM
Maybe I am not clear ... only ONE Group Image is displaying in the profile in posts ... can we get to see all group badges that this member belong to ?
Title: Re: Stars and Badges
Post by: Acans on June 17, 2008, 05:29:45 AM
ok, now you waited 5 minutes to post your last post, these people are vollenters, you didnt pay for this so wait, these people arnt on 24/7, their real people as well.
Title: Re: Stars and Badges
Post by: Bulakbol on June 17, 2008, 08:06:28 AM
Quote from: Colyn on June 17, 2008, 05:06:18 AM
Maybe I am not clear ... only ONE Group Image is displaying in the profile in posts ... can we get to see all group badges that this member belong to ?

Go to Admin-> Features and Options-> Basic Features, and in the Arrange additional group id to be displayed. text box, enter the additional groups' id.
Title: Re: Stars and Badges
Post by: Colyn on June 17, 2008, 08:42:01 AM
Quote from: JohnyB on June 17, 2008, 08:06:28 AM
Quote from: Colyn on June 17, 2008, 05:06:18 AM
Maybe I am not clear ... only ONE Group Image is displaying in the profile in posts ... can we get to see all group badges that this member belong to ?

Go to Admin-> Features and Options-> Basic Features, and in the Arrange additional group id to be displayed. text box, enter the additional groups' id.

Thanks JohnyB ... that worked ... are the groups numbered sequentially starting at 1 ?

Now I would love the Hover Text Feature :)
Title: Re: Stars and Badges
Post by: Colyn on June 17, 2008, 08:43:13 AM
Quote from: Basicallyimjesus on June 17, 2008, 05:29:45 AM
ok, now you waited 5 minutes to post your last post, these people are vollenters, you didnt pay for this so wait, these people arnt on 24/7, their real people as well.

I dont know what your problem is ... I did not "chase" anybody ... I only posted more information.
Title: Re: Stars and Badges
Post by: Bulakbol on June 17, 2008, 09:34:40 AM
Go to Asdmin-> Membergroups, then hover your mouse over your groupnames and you can see the group id number in your browser's information bar.  You'll see something like "... action=membergroups;sa=members;group=1" where 1 is the group id number.

What does a "Hover Text Feature" do?
Title: Re: Stars and Badges
Post by: Colyn on June 17, 2008, 11:24:19 AM
Quote from: JohnyB on June 17, 2008, 09:34:40 AM
Go to Asdmin-> Membergroups, then hover your mouse over your groupnames and you can see the group id number in your browser's information bar.  You'll see something like "... action=membergroups;sa=members;group=1" where 1 is the group id number.

What does a "Hover Text Feature" do?

Thanks for the information.

I would like to have HOVER TEXT on the images in the member profile in posts ... so if you see the icon you can hover it to get the meaning. Thank you.
Title: Re: Stars and Badges
Post by: Bulakbol on June 17, 2008, 01:22:24 PM
You can try the acronym tag but IE6 don't support it. Display.template.php, There are two occurences. Look for
echo $message['member']['additional_groups']['stars'][$i], '<br />';

and replace both of them with
echo '<acronym title="', $message['member']['additional_groups']['name'][$i], '">', $message['member']['additional_groups']['stars'][$i], '</acronym><br />';

Title: Re: Stars and Badges
Post by: Eliana Tamerin on June 17, 2008, 03:53:50 PM
Is it possible to stick the name variable into the image tag? You can use name= and title= for the various browsers to pick up on the hover text.
Title: Re: Stars and Badges
Post by: Bulakbol on June 19, 2008, 02:04:53 AM
:P Ok ok. You are right Eliana, that's another way. All browsers probably support the title attribute in the img element/tag. Edit Sources/Load.php.

For version 1.1.5, find

$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $func['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);


and replace with

$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $func['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" title="' . $row_stars['groupName'] . '" style="cursor: hand;" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);


For version 2.0 beta, find
$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $smcFunc['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);


and replace with

$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $smcFunc['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" title="' . $row_stars['groupName'] . '" style="cursor: hand;" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);
Title: Re: Stars and Badges
Post by: Colyn on June 19, 2008, 03:38:39 AM
I will try this later.

JohnyB .... Note for you on Installation ... there seems to be a problem in that the package does not create the TEMP directory and then fails ... if you create the TEMP directory manually and give it 777 rights prior to Install it works fine on 1.1.5 and TP.
Title: Re: Stars and Badges
Post by: Eliana Tamerin on June 19, 2008, 11:33:19 AM
That's not an issue with this mod, but a common package issue. Try this: http://custom.simplemachines.org/mods/index.php?mod=724 for a fix.
Title: Re: Stars and Badges
Post by: Colyn on June 19, 2008, 06:11:33 PM
Quote from: Eliana Tamerin on June 19, 2008, 11:33:19 AM
That's not an issue with this mod, but a common package issue. Try this: http://custom.simplemachines.org/mods/index.php?mod=724 for a fix.

Thank you.
Title: Re: Stars and Badges
Post by: Bulakbol on June 19, 2008, 08:25:48 PM
Do you need more assistance Colyn? 
Title: Re: Stars and Badges
Post by: PsychoWolf on June 26, 2008, 02:59:59 PM
Hmmmm JohnyB i have a little Prob with the load.php, i tried to put in your Code, but no additional Pics are shown. I think its the load.php, but for other failures on my side i send u both, if u could please take a look on them, this would be great, thx.
I have a lot of other Mods build in so i cant find the correct part in load.php with :
return true;
}

// Load a theme, by ID.

because my one looks not like that, maybe there will be the Dog been digged or i did a failure in the display.template, i'm helpless with that.
Title: Re: Stars and Badges
Post by: Bulakbol on June 27, 2008, 01:43:16 AM
I'll take a look at your files PsychoWolf and see what I can do. I'll get back to you.
Title: Re: Stars and Badges
Post by: Anub1s on June 27, 2008, 06:43:32 AM
I love this mod i think its great what i will say is that i am having problems with it thow :'(

I am in loac and i can not find the line of text you are talking about :'(,

i am using 2.0.3.1 any ideas :(

shadow
Title: Re: Stars and Badges
Post by: PsychoWolf on June 27, 2008, 06:56:04 AM
Thx JohnyB, waiting for your response  ;)
Title: Re: Stars and Badges
Post by: Bulakbol on June 27, 2008, 08:34:45 AM
Hi PsychoWolf. Your Display.template.php is fine. Only the Load.php is messed-up. Here's your Load.php. Try it first and if you still encounter problem, let me know.

Title: Re: Stars and Badges
Post by: PsychoWolf on June 27, 2008, 09:48:39 AM
Thank you very much, works like a charm. Your saved my Day and thanks for that great Mod.
Title: Re: Stars and Badges
Post by: Bulakbol on June 27, 2008, 09:54:46 AM
@X_x_Shadow_x_X 
   I'm sorry. This mod also edit the Sources files so it might not work for your version.


@PsychoWolf
     You are welcome. Thank you too for using this mod.
Title: Re: Stars and Badges
Post by: protonxl on June 27, 2008, 03:09:10 PM
ok so i installed it on my localhost.. (where  i test my 1.1.5 plugins before website).
all went great.
it works good.


i went to upload on my website, all went well, no error or anything.

but it doesnt show up and it shows as working

1.     Export Personal Messages      1.0       [ Uninstall ]  [ List Files ]  [ Delete ]
2.    Stars And Badges    2.0    [ Uninstall ] [ List Files ] [ Delete ]
3.    Auto Embed Video Clips    2.2    [ Uninstall ] [ List Files ] [ Delete ]
4.    ShowTopics    1.1    [ Uninstall ] [ List Files ] [ Delete ]
5.    Mod Hide Post    1.1    [ Uninstall ] [ List Files ] [ Delete ]
6.    XarSmilies-2    1.0    [ Uninstall ] [ List Files ] [ Delete ]
7.    SMF Staff Page    1.6    [ Uninstall ] [ List Files ] [ Delete ]
8.    Clickable Avatars    1.0.1    [ Uninstall ] [ List Files ] [ Delete ]
9.    Remove Post Modified Time    1.2    [ Uninstall ] [ List Files ] [ Delete ]
10.    Perfect Smiley Set    1.0    [ Uninstall ] [ List Files ] [ Delete ]
11.    View Single PM    1.3    [ Uninstall ] [ List Files ] [ Delete ]
12.    Enhanced Quick Reply Box 2.0.2    2.0.2    [ Uninstall ] [ List Files ] [ Delete ]
13.    Contact Page    1.1    [ Uninstall ] [ List Files ] [ Delete ]
14.    SimplePortal    1.2    [ Uninstall ] [ List Files ] [ Delete ]
15.    Profile Comments    1.3.6    [ Uninstall ] [ List Files ] [ Delete ]
16.    Image Quote Removal Package    1.0    [ Uninstall ] [ List Files ] [ Delete ]
17.    Hide SMF Version    1.0.2    [ Uninstall ] [ List Files ] [ Delete ]
18.    nCode Image Resizer    1.0    [ Uninstall ] [ List Files ] [ Delete ]
19.    Change_Poster_Of_Topic_And_Message    1.0    [ Uninstall ] [ List Files ] [ Delete ]
20.    Downloads System    1.0.4    [ Uninstall ] [ List Files ] [ Delete ]
21.    Admin Notepad    1.0    [ Uninstall ] [ List Files ] [ Delete ]
22.    SMF Gallery Lite    1.8.3    [ Uninstall ] [ List Files ] [ Delete ]
23.    SMF Links    1.6.7    [ Uninstall ] [ List Files ] [ Delete ]
Title: Re: Stars and Badges
Post by: Bulakbol on June 27, 2008, 08:38:38 PM
@protonxl

Are using a custom theme? if so, you have to edit yourtheme/BoardIndex.template.php and yourtheme/MessageIndex.template.php manually.
Title: Re: Stars and Badges
Post by: Colyn on June 30, 2008, 03:57:42 AM
Quote from: JohnyB on June 19, 2008, 08:25:48 PM
Do you need more assistance Colyn?

Yep now I have another problem on another Forum of mine ...

The feature under Basic Options does not have the Entry Box where I can add the additional groups that can be displayed. It must have been an install problem because it is absent in all themes from the Default Core one :(

Any ideas please.
Title: Re: Stars and Badges
Post by: Anub1s on June 30, 2008, 04:33:58 AM
I got it working was a pain in the bum but i found wheer i needed to put it. all about crss referanceing the basic theam with my custom yyyyyyyyyaaaaaayyyyy.

Again thak you for this mod its great.
Title: Re: Stars and Badges
Post by: Bulakbol on June 30, 2008, 05:45:54 AM
@Colyn
I need more info. Are there any errors in the error log? Did the mod installed without failed test?

@X_x_Shadow_x_X
Cool. Congratz! Thanks for using/trying this mod.
Title: Re: Stars and Badges
Post by: Colyn on June 30, 2008, 05:57:43 AM
JohnyB ... the images displays and no errors were reported during install ... but I do not have the extra section where the ID's must be entered for the groups that must be displayed.

What must I look for in the Error Log ?

Thanks.

PS ... I appreciate your effort in supporting your mod. ;)
Title: Re: Stars and Badges
Post by: Bulakbol on June 30, 2008, 07:01:05 AM
Can you check your Sources/ModSetttings.php and look for
// Stats, compression, cookies.... server type stuff.
The following lines should be above that line. Add them if they are missing.

// Badge and stars
array('text', 'badge_ownline'),
'',

Title: Re: Stars and Badges
Post by: Colyn on June 30, 2008, 07:15:49 AM
Ok that has now inserted the ENTRY BOX but it has no label (Text describing what to enter) like in the other forum that works.


Arrange additional group id to be displayed.
(Must be separated by comma. i.e. 1,2,4)


Thank you for this sofar.

Question ... I have added an Additional  Custom group to the Admin but it does not display in the profile ?

Any idea ?

Thanks.

Title: Re: Stars and Badges
Post by: Colyn on June 30, 2008, 07:34:55 AM
Let me be a bit more clear on my question ...

In the other Forum I added a Custom Group as Additional to the Admin and it displays in the Profile next to posts ... in this Forum where I have the problem it does not.
Title: Re: Stars and Badges
Post by: Bulakbol on June 30, 2008, 08:05:52 AM
It looks like it wasn't intalled properly Colyn. The language string is not installed too. Add this in default/languages/ModSettings.english.php just above the ?> tag at the very end.
$txt['badge_ownline'] = 'Arrange additional group id to be displayed.<div class="smalltext">(Must be separated by comma. i.e. 1,2,4)</div>';

It should display the additional badge in your profile. Did you add the additional membergroup to your profile?

Profile-> Account Related Settings-> Additional Membergroups.
Title: Re: Stars and Badges
Post by: Colyn on June 30, 2008, 08:25:43 AM
Thanks that worked and I also added the HELP text.

Yes I did add the Group as described by you.

Thanks for your help. +1 ;)
Title: Re: Stars and Badges
Post by: Bulakbol on June 30, 2008, 08:29:23 AM
Quote from: Colyn on June 30, 2008, 08:25:43 AM
Thanks that worked and I also added the HELP text.

Yes I did add the Group as described by you.

Thanks for your help. +1 ;)

Cool. Glad everything is in order now. :)
Title: Re: Stars and Badges
Post by: Colyn on June 30, 2008, 08:38:35 AM
JohnyB ... the additional Badge is still not displaying in the Posts/profile :(
Title: Re: Stars and Badges
Post by: Colyn on June 30, 2008, 08:55:49 AM
I did a quick test and added a second custom group ... for normal users only one GROUP displays in the profile next to posts. On my other forum multiples do show.

Any idea why this happening ?

I can give you Admin Access if you want to take a look around.
Title: Re: Stars and Badges
Post by: Bulakbol on June 30, 2008, 08:57:49 AM
Ok Colyn, PM me a temporary admin access and I'll look at the problem.
Title: Re: Stars and Badges
Post by: Colyn on June 30, 2008, 09:12:26 AM
Done ... thanks.
Title: Re: Stars and Badges
Post by: protonxl on June 30, 2008, 09:40:40 AM
Quote from: JohnyB on June 27, 2008, 08:38:38 PM
@protonxl

Are using a custom theme? if so, you have to edit yourtheme/BoardIndex.template.php and yourtheme/MessageIndex.template.php manually.


nop, default theme.
Title: Re: Stars and Badges
Post by: Bulakbol on June 30, 2008, 09:46:01 AM
Quote from: protonxl on June 30, 2008, 09:40:40 AM
Quote from: JohnyB on June 27, 2008, 08:38:38 PM
@protonxl

Are using a custom theme? if so, you have to edit yourtheme/BoardIndex.template.php and yourtheme/MessageIndex.template.php manually.


nop, default theme.

Do you still need help?
Title: Re: Stars and Badges
Post by: Colyn on July 01, 2008, 03:22:50 AM
Thank you very much for your support JohnyB
Title: Re: Stars and Badges
Post by: Colyn on July 03, 2008, 04:40:50 PM
JohnyB ... I am seeing a lot of errors in my ErrorLog ... like this ...


8: Undefined index: additional_groups
File: /home/forum/koi/Themes/default/Display.template.php (main sub template - eval?)
Line: 397


... any idea ... the line it refers to is this ...


for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)


Title: Re: Stars and Badges
Post by: Bulakbol on July 03, 2008, 05:58:47 PM
@Colyn.
  When you installed the mod, what are the files that failed the test aside from Display.template.php?

Attach your Load.php please. I think it wasn't properly edited.
Title: Re: Stars and Badges
Post by: Colyn on July 04, 2008, 01:18:30 AM
Sent the file ... thanks.
Title: Re: Stars and Badges
Post by: trenchteam on July 04, 2008, 07:17:11 PM
How do you limit the number of badges shown?  I have a member in four groups and they all show even though I set it in features and options for only two additional groups to be shown. ??? ???

Seems like the features and Options section: Arrange additional group id to be displayed.

doesn't change anything for me.  All the groups are displayed regardless.

This was the coding I used.

echo '
', $message['member']['group_stars'], '<br />';

if (!empty($message['member']['additional_groups']['id']))
             for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
                if ($message['member']['additional_groups']['stars'] != '')
                  echo $message['member']['additional_groups']['stars'][$i], '<br />';


In the Arrange additional group id to be displayed I only wanted groups 13,18 to appear on the Display.
Title: Re: Stars and Badges
Post by: ElectricSquid on July 05, 2008, 06:44:40 PM
Great Mod!!  I totally love it and it was easy to manually install.

Now I'm customizing the site with it's functionality.
One of the things I'm doing is using Stars and Badges to put up 120x60 logos above the signature section of members posts. Now to do this, I need the Badges to line up horizontally, as opposed to vertically in the default postion.

I do not see in the code anything that is controlling this besides the < br />'s is this correct?

If I take out the < br />'s will the logos line up horizontally like I want?
Title: Re: Stars and Badges
Post by: Bulakbol on July 07, 2008, 03:31:32 AM
@trenchteam
  You are missing some codes. It should look like this. Add the missing codes or replace what you have with the following.
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], '<br />';
}
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo $message['member']['additional_groups']['stars'][$i], '<br />';



@∑£ℓ¢†®¡¢ §ợų¡đ
   Yes, try removing the <br />. If it does not work the way you want it, let me know.


Thanks guys for using this mod.
Title: Re: Stars and Badges
Post by: trenchteam on July 07, 2008, 06:58:57 AM
Thanks. However I just did it ghetto style. lol. The membergroups I didn't want to display I just removed all the stars.  It worked out okay! ;D  I may have to change it to the coding you provided in the future...
Title: Re: Stars and Badges
Post by: Rhyme on July 07, 2008, 07:27:01 AM
Any way to make this work for 1.1.5?
Title: Re: Stars and Badges
Post by: Bulakbol on July 07, 2008, 07:44:36 AM
@trenchteam
lol that's ok as long as it works the way you want it. :)

@Rhyme
It's for both versions. Version 1.1.5 and 2.0 beta 3.1.
Title: Re: Stars and Badges
Post by: Rhyme on July 07, 2008, 07:47:11 AM
Quote from: JohnyB on July 07, 2008, 07:44:36 AM
@trenchteam
lol that's ok as long as it works the way you want it. :)

@Rhyme
It's for both versions. Version 1.1.5 and 2.0 beta 3.1.

OH, because it says versions 1.1.4 and 2.0 beta 3.1
Title: Re: Stars and Badges
Post by: Rhyme on July 07, 2008, 07:49:10 AM
I just got this message:

Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.
Title: Re: Stars and Badges
Post by: Bulakbol on July 07, 2008, 07:50:55 AM
Which file failed the test? Attach it here and I'll take a look.
Title: Re: Stars and Badges
Post by: Rhyme on July 07, 2008, 07:56:12 AM
./Sources/Load.php - failed
Title: Re: Stars and Badges
Post by: Bulakbol on July 07, 2008, 08:50:01 AM
Do you need assistance or help Rhyme?
Title: Re: Stars and Badges
Post by: ElectricSquid on July 07, 2008, 11:00:53 AM
I tried removing the br/s but it didnt help. But adding a table and tr around the mod code, and replacing the br/ with an openning and closing td gave the effect i was after. It works well as long as ya move the first array to the end of the mod code.
Title: Re: Stars and Badges
Post by: Rhyme on July 07, 2008, 12:01:15 PM
Quote from: JohnyB on July 07, 2008, 08:50:01 AM
Do you need assistance or help Rhyme?

I would guess so since ./Sources/Load.php - failed and I didn't want to continue to install the mod if the Load was failing. 

Plus like I stated on the mod it says it's for version 1.1.4 not 1.1.5 but you stated it can be used on 1.1.5.  I just want to make sure because I have not saved a back up of my forum yet.
Title: Re: Stars and Badges
Post by: ElectricSquid on July 07, 2008, 01:23:41 PM
Im using it on 1.1.5 without errors, manual install
Title: Re: Stars and Badges
Post by: Rhyme on July 07, 2008, 02:53:44 PM
Quote from: ∑£ℓ¢†®¡¢ §ợų¡đ on July 07, 2008, 01:23:41 PM
Im using it on 1.1.5 without errors, manual install

Please explain.  I'm just learning how to use SMF and FTP self taught.  I have a BS in web design but they did not go over CSS style sheets or FTP at the college I went too.  I'm learning all this for the first time.
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on July 07, 2008, 08:25:29 PM
Johnny, it seems that something got messed up on my new forum...
I had it all set up, then did this mod and now, can not select additional member group for users.
I already have an admin account, just waiting on your PM. :)

EDIT:
Running the Stars and Badges 2.0 on SMF 1.1.5

I use the default theme... Modded the looks a bit. :)

Also, link to site:
http://www.bkgta.co.cc/ (http://www.bkgta.co.cc/)


Edit #2:

Never mind, I thin k I actually solved them all. :)
Even did so, knowing very little about php, and without cPanel access during server troubles....LOL



Now, just need the post groups to be shown. :)
Title: Re: Stars and Badges
Post by: Bulakbol on July 08, 2008, 04:29:20 AM
@Rhyme
  Attach the files that failed the test. I will fix them before you install the mod. That way, you can uninstall without problem. If only the Sources/Load.php failed the test, attach that file to your next post.

@∑£ℓ¢†®¡¢ §ợų¡đ
   You know what you are doing that's why you have no problem.


@BurkeKnight
   You are learning now. :) If you think I can help, just yell.
Title: Re: Stars and Badges
Post by: ElectricSquid on July 08, 2008, 07:56:38 AM
Im surprised to hear someone say i know what im doing :P Im still new at this whole SMF thing. Anyway, to answer the question about manual install, go to the mod page, on the upper right side chose your version of SMF and the mod version you need, click submit. Follow the directions on the next page exactly. For a mod to work with a theme, in place of "default" in the file name, use your theme name. Said a different way, find that file in your theme. You will need source access to do this, and since i host my own, i have no clue how that works when you use external hosting.
Title: Re: Stars and Badges
Post by: Rhyme on July 08, 2008, 08:35:41 AM
Not to worry, CTwiz fixed everything for me.
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on July 08, 2008, 08:45:34 AM
1. Got things sorted out.
2. Still can't get the post groups to show, even tried vMulticolor-Stars Mod which messes things up a bit.
3. Added a few of the extra tips you posted in this thread. :) (The Buddy one would be better if it showed the names.)
4. As for that Buddy one, instead of under the post line like you said, I just added it above it... :)
5. If you think you can help get it so vMulticolor-Stars Mod does not mess up my Stars and Badges, please let me know, as the post ranks are kind of important on this site. :)

Thank you. :)
Title: Re: Stars and Badges
Post by: Anub1s on July 08, 2008, 08:58:01 AM
i must say this is a easy one to install realy. all you need to do is install into the standard templarte and just cross refernce to your custom in a web page edditor, i prefer dreamweaver lol.

anyway as i was saying it seems the mod works fine with 2.x newest version and i love it.

my only upset is that i carnt keep the post count starts :( when i add somone to a group :'(
Title: Re: Stars and Badges
Post by: ElectricSquid on July 08, 2008, 04:33:50 PM
I noticed that too, and since i move the location of where stars and badges shows up (now just above the sig) the admin and mod stars showed up there too. All efforts to strip them away did not work. So in the name of making it look great at all costs, i removed all stars from all member groups. We run nothing but custom logos for special member groups, and post count member groups get, well ... Nothing :P
Title: Re: Stars and Badges
Post by: Bulakbol on July 09, 2008, 12:44:39 AM
@Rhyme
   Ok then. Say thanks to CTWiz for me. :)

@BurkeKnight
   Sorry, I don't use the vMulticolor-Stars so I don't know how. Attach your Display.template.php and I'll try to look at it.

@Anub1s
   Is it the post count that you have problem with?

Title: Re: Stars and Badges
Post by: Anub1s on July 09, 2008, 08:16:52 AM
on an older version of smf on a forum in the past lol we had the muti badge but also it was showing the post count aswell now i am wondering how to do this :S
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on July 09, 2008, 12:25:27 PM
Johnny, I'd rather not use the vMulticolor-Stars mod, as it does mess things up.

So, I'll just wait for you to come up with a way to show the post groups as well. :)
Title: Re: Stars and Badges
Post by: bros on July 09, 2008, 06:44:52 PM
I'm having trouble with this mod on 1.1.5

Error: Notice: Undefined variable: profile in test2/Sources/Load.php on line 1193

The following mods are installed:
1. LogModAccountEdits
2. SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update 1.0
3. Topic description
4. MCLegendII.2
5. Member Color Link
6. Custom Profile Field Mod
7. Stars And Badges
8. Ad Managment
9. Banlist
10. SimplePortal
11. Sticky First Post (extends sticky topic)
12. SMF Staff Page
13. SMF Gallery Lite
14. Global Headers Footers

Load.php is attached

Cannot modify header information - headers already sent by (output started at public_html/test2/Sources/Load.php:1193)
File: public_html/test2/Sources/Subs.php
Line: 3227
Title: Re: Stars and Badges
Post by: Bulakbol on July 09, 2008, 06:58:37 PM
@Anub1s and BurkeKnight
   Attach an image of what you want to be displayed and I'll see what I can do.


@bros
   The mod was improperly installed. Try this version of Load.php attached.
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on July 09, 2008, 07:05:33 PM
Johnny, it's a bit hard to do that image, so maybe this might help. :)

Besides the member groups, I have my Post Rank Groups. Instead of stars, they have images I use. I'd like for these post rank groups to show, as well as the member's member groups.
Title: Re: Stars and Badges
Post by: Bulakbol on July 09, 2008, 07:24:10 PM
So you want to show the primary groups' post group stars/rank? I can probably do that. I'll post it here if I have time.
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on July 09, 2008, 07:41:57 PM
I'd like the Member groups then below them, the post rank, if you could. :)
Title: Re: Stars and Badges
Post by: bros on July 09, 2008, 08:28:11 PM
Quote from: JohnyB on July 09, 2008, 06:58:37 PM
@Anub1s and BurkeKnight
   Attach an image of what you want to be displayed and I'll see what I can do.


@bros
   The mod was improperly installed. Try this version of Load.php attached.


Thanks. That worked.

Could you tell me how to display the stars for the additional membergroups in the posts by the users? (for 1.1.5)
Title: Re: Stars and Badges
Post by: Bulakbol on July 09, 2008, 08:30:03 PM
Try this. Sources/Load.php, look for

pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group, mem.is_activated,


add after

IF(mem.ID_GROUP > 0, pg.stars, '') AS stars1,


look for

pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group,


and add below

IF(mem.ID_GROUP > 0, pg.stars, '') AS stars1,


look for

$profile['stars'] = empty($profile['stars']) ? array('', '') : explode('#', $profile['stars']);


and add below it

$profile['stars1'] = empty($profile['stars1']) ? array('', '') : explode('#', $profile['stars1']);


look for

'post_group_color' => $profile['post_group_color'],


and add below it.

'post_group_stars' =>  str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($profile['stars1'][1]) ? $settings['images_url'] . '/' . $profile['stars1'][1] : '') . '" alt="*" border="0" />', empty($profile['stars1'][0]) || empty($profile['stars1'][1]) ? 0 : $profile['stars1'][0]),


In the default/Display.template.php, find a place for the following lines.

if (isset($message['member']['post_group_stars']) && $message['member']['post_group_stars'] != '')
echo $message['member']['post_group_stars'], '<br />';



Title: Re: Stars and Badges
Post by: bros on July 09, 2008, 09:13:45 PM
Quote from: JohnyB on July 09, 2008, 08:30:03 PM
Try this. Sources/Load.php, look for

pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group, mem.is_activated,


add after

IF(mem.ID_GROUP > 0, pg.stars, '') AS stars1,


look for

pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group,


and add below

IF(mem.ID_GROUP > 0, pg.stars, '') AS stars1,


look for

$profile['stars'] = empty($profile['stars']) ? array('', '') : explode('#', $profile['stars']);


and add below it

$profile['stars1'] = empty($profile['stars1']) ? array('', '') : explode('#', $profile['stars1']);


look for

'post_group_color' => $profile['post_group_color'],


and add below it.

'post_group_stars' =>  str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($profile['stars1'][1]) ? $settings['images_url'] . '/' . $profile['stars1'][1] : '') . '" alt="*" border="0" />', empty($profile['stars1'][0]) || empty($profile['stars1'][1]) ? 0 : $profile['stars1'][0]),


In the default/Display.template.php, find a place for the following lines.

if (isset($message['member']['post_group_stars']) && $message['member']['post_group_stars'] != '')
echo $message['member']['post_group_stars'], '<br />';





Is this for me, or for the other person who asked for assistance above?
Title: Re: Stars and Badges
Post by: Bulakbol on July 09, 2008, 09:20:29 PM
Try it too bros. That might be the one you wanted because this Stars and Badges mod will display additional membergroup stars. The snippet of code I posted will display post group stars for primary groups.
Title: Re: Stars and Badges
Post by: bros on July 09, 2008, 09:38:28 PM
Quote from: JohnyB on July 09, 2008, 09:20:29 PM
Try it too bros. That might be the one you wanted because this Stars and Badges mod will display additional membergroup stars. The snippet of code I posted will display post group stars for primary groups.

That will make it show in topics.

Since you gave me some code for it to work on my SMF 2.0 beta 3 forums, and it worked perfectly.

This is what you told me then:
Quote from: JohnyB on May 13, 2008, 09:53:59 PM
To add space between additional stars/badges, in Display.template.php
Code (find) Select

echo $message['member']['additional_groups']['stars'][$i], '<br />';


Code (replace) Select

echo '<div style="padding-top: 4px;"></div>', $message['member']['additional_groups']['stars'][$i], '<br />';


Replace the 4px with the number of pixels you want. Thanks for trying/using this mod.

I don't know if it would work on SMF 1.1.5 though.
Title: Re: Stars and Badges
Post by: Bulakbol on July 09, 2008, 10:06:53 PM
Try it bros. It should work on both versions.
Title: Re: Stars and Badges
Post by: bros on July 09, 2008, 10:19:23 PM
Quote from: JohnyB on July 09, 2008, 10:06:53 PM
Try it bros. It should work on both versions.

Nope.

Only shows the Administration red stars.
Title: Re: Stars and Badges
Post by: Bulakbol on July 09, 2008, 10:28:32 PM
Quote from: bros on July 09, 2008, 10:19:23 PM
Quote from: JohnyB on July 09, 2008, 10:06:53 PM
Try it bros. It should work on both versions.

Nope.

Only shows the Administration red stars.


What was the issue again? I am a little confused. :P
Title: Re: Stars and Badges
Post by: bros on July 09, 2008, 10:39:33 PM
Quote from: JohnyB on July 09, 2008, 10:28:32 PM
Quote from: bros on July 09, 2008, 10:19:23 PM
Quote from: JohnyB on July 09, 2008, 10:06:53 PM
Try it bros. It should work on both versions.

Nope.

Only shows the Administration red stars.


What was the issue again? I am a little confused. :P

Here, pictures for example :D

We want this:
(http://i118.photobucket.com/albums/o103/402bros/one.jpg)

To be able to diplay the stars/badges like this:
(http://i118.photobucket.com/albums/o103/402bros/two.jpg)
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on July 09, 2008, 11:12:34 PM
I want to show both member groups, and post rank groups. :)
Title: Re: Stars and Badges
Post by: Bulakbol on July 09, 2008, 11:23:20 PM
@BurkeKnight
   Try the codes that I posted. Edit your BoardIndex.php and Display.template,php


@bros
   If you installed this mod and badges aren't displayed, then your Display.template.php wasn't properly edited. Attach your Display.template,php. I'll take a look at it.
Title: Re: Stars and Badges
Post by: ElectricSquid on July 09, 2008, 11:31:55 PM
Wow, theres great support for this mod! Thanks again.
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on July 09, 2008, 11:35:51 PM
Ok, it shows, yet the post rank name is under the member group name, above the member group image...


Is there a way for this:

Member group name
Member group image

Member group name
Member group image

Member group name
Member group image

Post rank name
Post rank image

(if in 3 member groups)

???

Thanks. :)

PS: go to the forum to see what I mean, please:

http://www.bkgta.co.cc/
Title: Re: Stars and Badges
Post by: Bulakbol on July 09, 2008, 11:50:46 PM
Yes, you can arrange the display like what you want. Attach your Display.template.php and Sources/Load.php. What custom theme are you using?
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on July 09, 2008, 11:54:52 PM
My own. :)

It's the default theme, with some modding done. :)

I will still be able to swap back to the original stars for post rank, right?
I mean, it will still show the 6 stars if a post rank has 6 set?

Here are the 2 files.
Title: Re: Stars and Badges
Post by: Bulakbol on July 10, 2008, 12:06:13 AM
Yes of course. I'll get back to you later for your files. A bit busy.
Title: Re: Stars and Badges
Post by: bros on July 10, 2008, 12:07:15 AM
Quote from: JohnyB on July 09, 2008, 11:23:20 PM
@BurkeKnight
   Try the codes that I posted. Edit your BoardIndex.php and Display.template,php


@bros
   If you installed this mod and badges aren't displayed, then your Display.template.php wasn't properly edited. Attach your Display.template,php. I'll take a look at it.

Yeah, it shows the badges in the profile, but not in the topics. Here is my display.template.php
Title: Re: Stars and Badges
Post by: Bulakbol on July 10, 2008, 12:12:32 AM
lol bros, what is this?
echo '<div style="padding-top: 21000px;">

21000 pixels?

Your Display.template.php is fine if you'll change the 21000px with 4px :)

Can I take a look at your forum?
Title: Re: Stars and Badges
Post by: bros on July 10, 2008, 01:38:16 AM
Quote from: JohnyB on July 10, 2008, 12:12:32 AM
lol bros, what is this?
echo '<div style="padding-top: 21000px;">

21000 pixels?

Your Display.template.php is fine if you'll change the 21000px with 4px :)

Can I take a look at your forum?

I did that to make it appear, Since if it was gonna work, why not set it to a page-stretching limit? :D

http://thecastlehall.com/brostest

edit: i'm going to sleep, so if I don't respond to your helping, don't worry :D
Title: Re: Stars and Badges
Post by: Bulakbol on July 10, 2008, 03:02:34 AM
@BurkeKnight
  Here are your files attached. Load.php and Display.template.php. Backup first before you use them.
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on July 10, 2008, 08:13:53 AM
Perfect, except one thing, can you add line breaks between them?

Thank you :)
This is going to be great on this forum, since the post ranks are basically right out of the games. :)


EDIT:

Got it! :)

I might actually have this coding thing down pat.... at least for entering line breaks....LOL

Thanks again, Johnny!

Great mod and terrific support! :)
Title: Re: Stars and Badges
Post by: Sheree on July 10, 2008, 10:28:26 AM
hi johnyB

This is a great mod nice job.

I was wondering if you could help me seperate the badges from the post rank with a label

something like this
(http://i35.tinypic.com/5pof7r.jpg)

only the word Badges is after the word certified member
I've attached my Display.template.php

Thanks in advance
Title: Re: Stars and Badges
Post by: bros on July 10, 2008, 11:34:29 AM
If you want me to upload any more files. just tell me :)
Title: Re: Stars and Badges
Post by: ElectricSquid on July 11, 2008, 03:37:45 AM
Here's an easy one for ya :P

I would like to make the icon/logo/badge a clickable link to some other page on my forum. Basically I have a few member groups that are based off of donorship to the site. I would like to promote this action through making the Site Donor and Gold Member icons (created through this mod) to be links to a page where other users can get info on how to also donate and/or become Gold Members.

Here is the code you created for Display.template.php that I custom modded as discribed in a previous reply. This code is placed in a different place to make the icons show up just above the users signature in posts and messages.

I also took the first two lines of code and placed them at the end due to a slight issue getting the Gold Member icon to show. the code rearangement took care of that issue (for now). just figured I'd let you know, just in case there was an issue, or if you thought your code looked a little different here :P

The link for Gold Member info and Site Donor info are the same page, so am I correct in thinking that all I would need to do is add the <a href> to the existing < td> opening and closing tags?



// start STARS and BADGES
echo '
<tr>
<td>
<table><tr>';


      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 '<td>', $message['member']['additional_groups']['stars'][$i], '</td>';
      }           

      elseif (!empty($message['member']['additional_groups']['id']))
         for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)   
            echo '<td>&nbsp</td><td>', $message['member']['additional_groups']['stars'][$i], '</td>';
   
      if (!empty($message['member']['group_stars']))
   
        echo '<td>', $message['member']['group_stars'], '</td>';
       

echo '
</tr></table>
</td>
</tr>
';

// end STARS and BADGES


Title: Re: Stars and Badges
Post by: bros on July 11, 2008, 07:56:42 PM
Problem solved.

Did a clean install of SMf

ALl works
Title: Re: Stars and Badges
Post by: Bulakbol on July 11, 2008, 08:55:29 PM
@BurkeKnight
  That's one way to learn. Do it yourself. :)

@Sheeree
   I have your files. I'll look into them. I'll get back to you.

@∑£ℓ¢†®¡¢ §ợų¡đ
  Try like this. Change the 2 with your Gold Member additional group ID.
Quote
if ($message['member']['additional_groups']['id'] == 2)
   echo '<td><a href="', $scripturl, ...">', $message['member']['additional_groups']['stars'][$i], '</a></td>';
else
   echo '<td>', $message['member']['additional_groups']['stars'][$i], '</td>';
Title: Re: Stars and Badges
Post by: ElectricSquid on July 11, 2008, 11:09:47 PM
Quote from: JohnyB on July 11, 2008, 08:55:29 PM

  Try like this. Change the 2 with your Gold Member additional group ID.
Quote
if ($message['member']['additional_groups']['id'] == 2)
   echo '<td><a href="', $scripturl, ...">', $message['member']['additional_groups']['stars'][$i], '</a></td>';
else
   echo '<td>', $message['member']['additional_groups']['stars'][$i], '</td>';


I couldn't get that to work. I think if I knew php a little bit more, I could have gotten it. But I reverted to the simple way for now. I just added the "a href" to each "td".

I did change the 2 to the proper member group number (12), and I'm pretty sure I replaced the correct code. Not exacly sure why it didn't work. But it's OK, I was able to get it good enough for now.

In the future I may need the ability for each user group to have it's own seperate link, but for now this works fine.

Thanks for your help and time :D
Title: Re: Stars and Badges
Post by: Bulakbol on July 11, 2008, 11:33:29 PM
@∑£ℓ¢†®¡¢ §ợų¡đ
  Ok. I'll check it too when I have time.


@Sheree
  Could you try this Display.template.php if it's the one you want. It's attached.

Title: Re: Stars and Badges
Post by: Sheree on July 12, 2008, 12:32:14 AM
just what i wanted .. Thanks JohnyB   :-* :-*
Title: Re: Stars and Badges
Post by: Bulakbol on July 12, 2008, 12:45:06 AM
 8) You're welcome Sheree.  ;)
Title: Re: Stars and Badges
Post by: reo4ua on July 12, 2008, 10:27:49 AM
Where can we find the icons/buttons to use with this mod???
Title: Re: Stars and Badges
Post by: Bulakbol on July 13, 2008, 12:46:23 AM
You have to create it yourself southeastsportsforum.com. That's the hard part. :)
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on July 13, 2008, 09:13:35 AM
There are plenty of places that have some great free rank images for forums.
Easy to find using Google. :)
Title: Re: Stars and Badges
Post by: Eliana Tamerin on July 13, 2008, 12:42:54 PM
http://search.creativecommons.org/
Title: Re: Stars and Badges
Post by: Anub1s on July 17, 2008, 08:07:01 AM
Quote from: JohnyB on July 09, 2008, 06:58:37 PM
@Anub1s and BurkeKnight
   Attach an image of what you want to be displayed and I'll see what I can do.


@bros
   The mod was improperly installed. Try this version of Load.php attached.

Hi dude ok wat i was after was the following

Anub1s
postgroupe image
Postgroup image
Member groupe
Membergroup image
avatar
whatereve comes next lol

is this posible and if so what do i have to eddit in 2.0.3.1

thanks dude
Title: Re: Stars and Badges
Post by: Bulakbol on July 18, 2008, 12:36:12 AM
@Eliana
  Thanks for the link.

@Anub1s
   I'm a bit busy right now but I'll look into it soon.
Title: Re: Stars and Badges
Post by: Acans on July 19, 2008, 07:06:31 AM
hey johny, is it to much to ask if you could edit my display.template so that it lists as

Name
Custom title
Primary Membergroup
Additale Membergrougs
post count
Primary Member goup image


Atm since i edited it so it lists the group names and not the image its

Name
Custom title
Primary membergroup
post count
primary membergroup image
addinatle membergroups names

thanks if you can.
Title: Re: Stars and Badges
Post by: Acans on July 19, 2008, 07:28:38 AM
dont worry about my last post, now i have problems installing this mod on my main forum, it install ok on my test forum, but when i try install on my main the test for load.php fails???
Title: Re: Stars and Badges
Post by: Bulakbol on July 19, 2008, 06:59:32 PM
Ok, I am not downloading your file then  вαѕι¢αℓℓу ι'м נєѕυѕ.
Title: Re: Stars and Badges
Post by: Acans on July 19, 2008, 09:59:29 PM
mmmk, but how do i fix the load.php file then?
Title: Re: Stars and Badges
Post by: Bulakbol on July 19, 2008, 10:05:56 PM
Quote from: вαѕι¢αℓℓу ι'м נєѕυѕ on July 19, 2008, 09:59:29 PM
mmmk, but how do i fix the load.php file then?

My understanding is that you are not going to install this mod because there is an error. If you need help, attach the file in question and I'll look at it.
Title: Re: Stars and Badges
Post by: Acans on July 19, 2008, 10:11:37 PM
but isnt it "bad" to install a mod that a test fails, or how do i make a backup of my forum first?
Title: Re: Stars and Badges
Post by: Bulakbol on July 19, 2008, 10:21:13 PM
Use FTP program and download all your template files and source files to your PC as your backup. Start a topic in the 1.1.5 support board if you don't know how. Sorry but this is a support topic for this mod.
Title: Re: Stars and Badges
Post by: Sheree on July 20, 2008, 07:19:57 AM
hi JohnyB

is there any fix you could suggest because when i tried to put in 3 badges or more the result is this

it's too long is there a way we can align the badges vertically or lets say 2  badges per row or something
(http://i38.tinypic.com/2qu851u.jpg)
Title: Re: Stars and Badges
Post by: ElectricSquid on July 20, 2008, 11:45:04 PM
Is there a way to control the order that the badges are displayed?
It seems as if they display in alphabetical order, which is fine for now, but I am adding a new membergroup soon, and I want the badge to display at the end of the list.

The membergroup id is 13. It needs to always be last on the list.

Here is the code from my Display.template.php
It has been modified a bit to display horizontally, just over the users signature in posts and messages.



// start STARS and BADGES
echo '
      <tr>
        <td>
             <table>
                 <tr>';

      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 '<td><a href="http://mywebsitehere.com/index.php?action=some/page/here">
', $message['member']['additional_groups']['stars'][$i], '</a></td>';
      }
                 elseif (!empty($message['member']['additional_groups']['id']))
         for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)

               echo '<td>&nbsp</td><td><a href="http://mywebsitehere.com/index.php?action=some/page/here">
', $message['member']['additional_groups']['stars'][$i], '</a></td>';
         if (!empty($message['member']['group_stars']))
           echo '<td><a href="http://mywebsitehere.com/index.php?action=some/page/here">
', $message['member']['group_stars'], '</a></td>';
       echo '</tr>
            </table>
    </td>
  </tr>
';
// end STARS and BADGES




Thanks a lot JohnyB. This is a great mod and is allowing me to promote my membergroups very well. Especially the Site Donor group, which I would like to always be at the beginning of the badges list ;)
Title: Re: Stars and Badges
Post by: protonxl on July 21, 2008, 11:09:24 AM
Quote from: JohnyB on June 30, 2008, 09:46:01 AM
Quote from: protonxl on June 30, 2008, 09:40:40 AM
Quote from: JohnyB on June 27, 2008, 08:38:38 PM
@protonxl

Are using a custom theme? if so, you have to edit yourtheme/BoardIndex.template.php and yourtheme/MessageIndex.template.php manually.


nop, default theme.

Do you still need help?

i kinda gave up on it, but if u know the problem, id love to have this mod.
Title: Re: Stars and Badges
Post by: Bulakbol on July 22, 2008, 06:22:34 AM
@Sheree
  Send me your badges (zipped) through email. I need to know the sizes.

@∑£ℓ¢†®¡¢ §ợų¡đ
   Admin-> Features and Options-> Basic Features = Arrange additional group id to be displayed.

@protonxl
  If you tried to install the mod, and some files failed the test, then the problem is in the files that failed the test. :P Which files are they?
Title: Re: Stars and Badges
Post by: ElectricSquid on July 22, 2008, 09:41:35 AM
Thanks, I must have looked over that.
Title: Re: Stars and Badges
Post by: ElectricSquid on July 22, 2008, 10:42:26 AM
Oh, i see. Thats what the input field does where i put in something like 10,11,13,18
Title: Re: Stars and Badges
Post by: Sheree on July 22, 2008, 03:08:14 PM
Quote from: JohnyB on July 22, 2008, 06:22:34 AM
@Sheree
  Send me your badges (zipped) through email. I need to know the sizes.
johny my badges only has one size thats 48x48,  should the size be smaller so it can be laid out horizontally?

Thanks  :-* 
Title: Re: Stars and Badges
Post by: ElectricSquid on July 22, 2008, 09:52:29 PM
Quote from: JohnyB on July 22, 2008, 06:22:34 AM


@∑£ℓ¢†®¡¢ §ợų¡đ
   Admin-> Features and Options-> Basic Features = Arrange additional group id to be displayed.


Cool, that worked, but ONLY after I rearrainged the code back to the way you wrote it. I had messed with it a while back to get one rogue logo to show before the other. This was before you told me the real way to do it :P
Title: Re: Stars and Badges
Post by: ElectricSquid on July 23, 2008, 03:20:46 PM
Quote from: Sheree on July 22, 2008, 03:08:14 PM
johny my badges only has one size thats 48x48,  should the size be smaller so it can be laid out horizontally?

I have my badges laid out horizontally just above the signature in members posts. There is plenty of room there to lay out a lot of 48x48 badges side by side.
It was a very simple edit to get it to lay out that way. I'll share it with you if you like
(don't use the code from my above post, it's not correct and I've since changed it.)

For an example, you can check out the layout here:
http://wherethetrailends.com/index.php/topic,346.msg2681.html#msg2681 (http://wherethetrailends.com/index.php/topic,346.msg2681.html#msg2681)

the badges on that page are a max of 74px high and 170px wide, though I've been thinking of reducing them in size a touch.
Title: Re: Stars and Badges
Post by: Sheree on July 24, 2008, 04:35:27 PM
tnx ∑£ℓ¢†®¡¢ §ợų¡đ

but is there a way that i could look like this?

(http://i35.tinypic.com/vhz23t.jpg)
Title: Re: Stars and Badges
Post by: PAPABEAR on July 26, 2008, 11:55:51 AM
Hello, thanks for the mod. I just installed it.

Can anybody help me here (http://www.simplemachines.org/community/index.php?topic=251842.0)?
Title: Re: Stars and Badges
Post by: Phatmat on July 26, 2008, 12:10:04 PM
What should I do if when I installed the mod, the:

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

All the others passed, and my theme is Black Rain (this uses the core display.template.php). However the multiple badges do not show up, how would I go about fixing this?
Title: Re: Stars and Badges
Post by: Bulakbol on July 26, 2008, 04:49:34 PM
@PAPABEAR
   It's a matter of moving things around and some volunteers are already helping you.

@Phatmat
   Another mod probably altered your Load.php. If you want to go ahead with the installation, you have to edit your Load.php manually.

@Sheree
   I am still confused of what you want to display. I want the real badges so I can test and make neccessary adjustment.

Title: Re: Stars and Badges
Post by: Phatmat on July 26, 2008, 10:33:13 PM
JohnyB, what do I need to edit in my Load.php?
Title: Re: Stars and Badges
Post by: Bulakbol on July 26, 2008, 10:38:41 PM
There's built-in parser or you can use SMF Parser (http://sleepycode.com/PackageParser/index.php)
Title: Re: Stars and Badges
Post by: Phatmat on July 26, 2008, 10:54:49 PM
I used the parser, and edited Load.php manually. However, I now get this problem:
Parse error: syntax error, unexpected ';', expecting ')' in /home/runemart/public_html/Sources/Load.php on line 1195

On line 1195, there is:
   $context['badges']['ownline'] = !empty($modSettings['badge_ownline']) ? explode(',', $modSettings['badge_ownline'], 20) : '';
Title: Re: Stars and Badges
Post by: Bulakbol on July 26, 2008, 11:13:32 PM
Don't know what's wrong. Attach your Load.php and I'll look at it when I have time.
Title: Re: Stars and Badges
Post by: PAPABEAR on July 28, 2008, 07:45:29 PM
I have installed this mod on my 1.1.5 and I think it may have made my Primary Member Group Star images stop showing. I uninstalled it and then they are not showing still. So I reinstalled it and look around more. No changes. Can anybody help me?
Title: Re: Stars and Badges
Post by: Bulakbol on July 29, 2008, 03:00:54 AM
No error during installation Papabear? Which custom theme are you using?
Title: Re: Stars and Badges
Post by: tk2012 on July 31, 2008, 06:59:01 PM
JohnyB -

Love all your mods, but this one is giving me a problem.  The Membergroup badges which are NOT based on post count show up with no problems when selected.  But, the Membergroups based ON post counts do not.  Is it supposed to be like this?  It is that way in the Profile and the Post.

I have a TESTaccount which does not belong to any groups other than the regular members, so the post count icon that I use shows fine.  Is there no way to have both the post count icons AND the non-post count icons appear at the same time?


Also, will this be able to display ALL the other groups this person is in?  We were hoping to be able to display the POST COUNT GROUP, HIGHEST LEVEL MEMBERGROUP, BENEFACTOR, along with any other groups.
Title: Re: Stars and Badges
Post by: Bulakbol on July 31, 2008, 08:21:58 PM
The default display of stars is either post_group stars or member_group stars but not both. No displayed additional_group stars too.

This mod will only display additional_groups stars in post and Profile. It does not touch the default settings.  There is a tweak for 1.1.5 somewhere in this topic that will display both post_group and member_group stars. Maybe you can edit it to work with version 2.0.

This mod will display all additional groups. If you want only certain groups to be displayed, you have to enter the group id's in Admin => Features and Options => Options : Arrange additional group id to be displayed.
Title: Re: Stars and Badges
Post by: tk2012 on July 31, 2008, 08:29:41 PM
okie dokie... thanks for the reply!
Title: Re: Stars and Badges
Post by: Isaac.Eiland-Hall on August 05, 2008, 01:57:16 AM
Fresh install of 1.1.5, no mods, I just downloaded this mod and am getting this:

QuoteInstalling this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    install-1.x.xml    Modification parse error
2.    Execute Modification    -    Modification parse error

Listing files gets me this:
Quote1.  install-1.x.xml (12792 bytes)
   2. install-2.x.xml (9363 bytes)
   3. package-info.xml (1019 bytes)
   4. readme.txt (1903 bytes)

I read this thread and didn't see that particular failure... Any ideas?

This mod looks perfect for our needs :D
Title: Re: Stars and Badges
Post by: Phatmat on August 05, 2008, 07:16:29 AM
JohnyB, I have edited all the files, however the badges still do not show up. They show up in the members profiles, however not on the forum pages. Any idea why this might be happening?
Title: Re: Stars and Badges
Post by: Bulakbol on August 06, 2008, 08:41:14 PM
@Isaac.Eiland-Hall
  Try creating temp directory in the packages folder and chmod to 777 before installing this mod.

@Phatmat
   You are probably using custom theme. Attach your Display.template.php and I'll take a look.
Title: Re: Stars and Badges
Post by: Phatmat on August 07, 2008, 10:01:34 AM
I have a custom theme, it is Black Rain. Though I have edited the display.template.php in my default theme directory since the blackrain theme doesn't have one.

Here is the template from the default theme:

edit: For some reason when I remove the display.template.php from my default theme directory my forum still works. Does this mean my custom theme is not using this display.template.php? (as /blackrain doesn't have anything labelled display.template.php).
Title: Re: Stars and Badges
Post by: Bulakbol on August 07, 2008, 10:14:22 AM
Twice installed @Phatmat. I edited and removed the extra codes. Here's your file.
Title: Re: Stars and Badges
Post by: Phatmat on August 08, 2008, 06:15:50 AM
JohnyB, it still doesn't work. I uploaded the template you attached and there is still no change. However, my theme doesn't have a display.template.php in its file and this means it most likely uses the /default template right?

Though, when I delete the display.template.php in /default the forum still works perfect? I don't understand this, does it mean my custom theme is using a display.template.php from a different directory, because it needs it to load right?
Title: Re: Stars and Badges
Post by: Isaac.Eiland-Hall on August 08, 2008, 06:25:50 PM
Quote from: JohnyB on August 06, 2008, 08:41:14 PM
@Isaac.Eiland-Hall
  Try creating temp directory in the packages folder and chmod to 777 before installing this mod.

Thank you very much for the reply.

I created ./Packages/temp and gave it 777, still no luck -- with the same error:

Quote1.     Execute Modification     install-1.x.xml     Modification parse error
2.    Execute Modification    -    Modification parse error

The package file is also set to 777, and is 5,379 bytes (StarsAndBadges2.0.zip)

Also, this is the first mod I'm installing for this forum, which is otherwise a straight 1.1.5 installation.

(Trying to be helpful, not sure how much it does...)
Title: Re: Stars and Badges
Post by: Bulakbol on August 09, 2008, 03:33:30 AM
@Phatmat
   If your theme does not have its own Display.template.php then yes, it will use the one in the default folder. Any errors in the error log?

@Isaac.Eiland-Hall
   Use the Package manager to install this mod.  Upload the mod to your Package folder via FTP and then go to Admin=> Packages=> Browse Packages, click on the "Apply Mod" link. If no errors, you can click on the "Install Now" button located at the bottom right hand side of the page.
Title: Re: Stars and Badges
Post by: Phatmat on August 09, 2008, 06:29:33 AM
Johny, I have 94 pages of errors. They all seem to be the same, all alike this one:

Apply Filter: Only show the error messages of this member  Phatmat       August 08, 2008, 07:55:30 PM
Apply Filter: Only show the error messages of this IP address 202.65.71.201      Apply Filter: Only show the error messages of this session 524817d28e452a984ef2a5c12516b5ee
Apply Filter: Only show the error messages of this URL http://www.runemart.com/index.php?board=22.0
Apply Filter: Only show the errors with the same message
8: Undefined index: image
File: /home/admin/public_html/Themes/default/MessageIndex.template.php (main sub template - eval?)
Line: 526

Could this be why the badges aren't working?

edit: For some reason, if a users primary group is, for example, Administrator and they have no additional groups they will receive an admin badge. However, if their primary group is administrator and their additional group is administrator they will have 2 admin badges? Does this mean some part of your mod is working? Though, if I select a different additional group it will not show, it only shows if it matches the primary group (resulting in 2 duplicate badges).
Title: Re: Stars and Badges
Post by: Bulakbol on August 09, 2008, 07:18:59 AM
The "image" could be error from my other mod (ImagesOnBoard) if you have it installed.

You can arrange the display of additional badges by going to Admin=> Features and Settings=> Basic Features - Arrange additional group id to be displayed. 

Not really shure what the problem is. You can PM me temporary admin access to your forum so I can check the problem.
Title: Re: Stars and Badges
Post by: Phatmat on August 09, 2008, 07:29:32 AM
Johny, I have PM'ed you all the info. I am not sure if the PM has sent, as there is nothing in my 'Sent Box'. If you received it, please tell me in this thread or PM me back, thanks.
Title: Re: Stars and Badges
Post by: Bulakbol on August 09, 2008, 07:52:24 AM
I received your PM and I've been in your forum. Is everything ok now Phatmat?
Title: Re: Stars and Badges
Post by: Isaac.Eiland-Hall on August 09, 2008, 02:55:45 PM
Quote from: JohnyB on August 09, 2008, 03:33:30 AM
@Isaac.Eiland-Hall
   Use the Package manager to install this mod.  Upload the mod to your Package folder via FTP and then go to Admin=> Packages=> Browse Packages, click on the "Apply Mod" link. If no errors, you can click on the "Install Now" button located at the bottom right hand side of the page.

I'm afraid that's exactly what I've been trying. Or rather, the first time I used the webpage form to upload the package; subsequently, I deleted it from the server and uploaded via FTP...

Thank you dearly for your time. I do appreciate it. :)
Title: Re: Stars and Badges
Post by: tovaanu on August 09, 2008, 10:16:44 PM
can u also pls help me install this for SMF Default Theme - Core

every mod i tried installing failed
Title: Re: Stars and Badges
Post by: Meeturmaker on August 10, 2008, 03:52:27 AM
having a little trouble also
http://img151.imageshack.us/my.php?image=profiletemperrorxk8.jpg

i have attached the file that errored. could you take a look?
Title: Re: Stars and Badges
Post by: Bulakbol on August 10, 2008, 11:07:26 PM
@tovaanu
   What was the error?

@Meeturmaker
   I have your file. I'll get back to you.

<edit> Your Profile.template.php is attached. Use this file after you installed the mod. </edit>
Title: Re: Stars and Badges
Post by: Isaac.Eiland-Hall on August 10, 2008, 11:16:33 PM
(In case it was misunderstood, I'm still having the error outlined in my previous posts - not trying to be pushy at all, just re-read what I wrote and realized it could sound like my problem was fixed when it's not :D )
Title: Re: Stars and Badges
Post by: Bulakbol on August 10, 2008, 11:22:09 PM
Have you tried installing other mods? Do you get the same error on every mod you tried?
Title: Re: Stars and Badges
Post by: en_shua on August 29, 2008, 08:10:26 AM
I'm trying to see if this would work in conjunction with the Treasury mod.  The Treasury mod will add a person to a group if they have made a donation, and I believe will take them out of the membergroup when the donation period is over.  I see where your mod will show the badge of this new group as well as the badge that they currently have.  My question is this, if in Admin -> Feature and Options -> Options I were to add the group id to the "Arrange additional group id to be displayed" list, what happens when a user is no longer a member of this membergroup?  Or, is the only way to get this new badge to display to manually check that box in their profile for "Additional Membergroups"?
Title: Re: Stars and Badges
Post by: Bulakbol on August 30, 2008, 07:05:06 PM
The membergroup id in the text box is used only to for determine which one to display first if that member belong to the group. If a member is not a member of the group listed then there will be no badge to display. Try the mod and test things that you want to find out then tell me if there's something wrong.
Title: Re: Stars and Badges
Post by: en_shua on August 30, 2008, 08:32:26 PM
Seems to be working well so far.  Thanks.
Title: Re: Stars and Badges
Post by: Panache Web on August 31, 2008, 02:58:06 AM
ok

I tried installing this mod and had my members list foul up.. having to rip apart the code was most exciting...

I found the following ERROR.

Quoteif (!empty($groups))
   {
      $result_stars = $smcFunc['db_query']('', "
         SELECT id_group, group_name, stars, online_color
         FROM {$db_prefix}membergroups
         WHERE id_group IN (" . $groups . ')
         ',
         array()
      );

those two in bold are out of sync for the coding.

on reversing those to, and as shown below, my access to my members once again returned..

Quoteif (!empty($groups))
   {
      $result_stars = $smcFunc['db_query']('', "
         SELECT id_group, group_name, stars, online_color
         FROM {$db_prefix}membergroups
         WHERE id_group IN (' . $groups . ')
         ",
         array()
      );

BTW. other then this snafu, the mod is great. Thx.
Title: Re: Stars and Badges
Post by: Bulakbol on August 31, 2008, 10:49:28 PM
@dcd119
   Thanks for your concern. We all make mistake and I think you made one right here. :)
How would a query to membergroups foul up your memberslist while they are miles apart?
Are you sure your modification to the query works?  If it does then good for you.
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 05, 2008, 01:28:05 PM
Johnny:

Awesome mod, but I'm having difficulty modifying my load.php.  Can I have you take a look at it?  I keep getting a parse error on it.  Line 1339.  I'm guessing $profile needs to be defined somewhere, but I'm not sure where.

MDg
Title: Re: Stars and Badges
Post by: Bulakbol on September 05, 2008, 05:58:41 PM
Try this one mgarcia. Let me know if you still encounter problems.
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 05, 2008, 07:04:12 PM
Very much obliged.  This may be a dumb question asked and answered, but is it possible to display the post-count rank image along with the group image?

Thanks again for a great mod!

MDg
Title: Re: Stars and Badges
Post by: Bulakbol on September 05, 2008, 07:19:17 PM
Post group stars are already displayed by default. This mod will display additional groups' stars or badges only. Have enabled the display of post group stars? Admin => Current Theme => Themes Settings => Hide post group titles for grouped members? (untick).
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 05, 2008, 07:38:37 PM
I did, and it's showing my admin badge, my special group badge, but not my post count badge.

I'm wondering if I need to do something in one of my display files?
Title: Re: Stars and Badges
Post by: Bulakbol on September 05, 2008, 09:30:39 PM
Can you check your Display.template.php if these lines of code exist?
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
', $message['member']['post_group'], '<br />';
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 05, 2008, 09:37:50 PM
The Display.template.php I'm using (I think) is in default.  My theme doesn't have that file in the directory.  Am I correct?

If so, then yeah, it has it.  Should make a new copy in the theme dir?

MDg
Title: Re: Stars and Badges
Post by: Bulakbol on September 05, 2008, 09:42:25 PM
No, you don't have to. Not sure why it is not displaying the membergroups' post group name. Attach your Display.template.php and I'll check it.
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 05, 2008, 10:29:38 PM
Attaching.

MDg
Title: Re: Stars and Badges
Post by: Bulakbol on September 05, 2008, 10:44:33 PM
I can't find any problem with your Display.template.php. I don't know why it is not displaying the post group. Sorry.
Title: Re: Stars and Badges
Post by: Eliana Tamerin on September 06, 2008, 12:30:46 AM
Btw, mgarcia, you should updated your site to SMF 1.1.5, for security purposes. ;)
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 12:31:45 AM
It's a freshly installed 1.1.5 board, Eliana. :)

http://utforums.stfsa.net

MDg
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 12:33:07 AM
Quote from: JohnyB on September 05, 2008, 10:44:33 PM
I can't find any problem with your Display.template.php. I don't know why it is not displaying the post group. Sorry.

Is there no other php file that might require checking?  I know it only touched load and display.template... I'm just wondering what to do at this point.

MDg
Title: Re: Stars and Badges
Post by: Eliana Tamerin on September 06, 2008, 12:33:50 AM
Ahh, well google pulled http://forums.stfsa.net out to me, so I thought that was your primary board, still.
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 12:39:30 AM
Nah, I actually need to shut that one down.

MDg
Title: Re: Stars and Badges
Post by: Bulakbol on September 06, 2008, 12:40:09 AM
The Crewman Recruit is the name of your post group isn't it mgarcia?
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 01:00:35 AM
Is it, yeah.

MDg
Title: Re: Stars and Badges
Post by: Bulakbol on September 06, 2008, 01:06:47 AM
I think everything is working. What post group are you looking for to be displayed?
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 01:08:46 AM
In the case of myself, I guess it would be Crewman Recruit.

But for others who're in groups, they're also not showing their post count groups, either.  It's not just Crewman Recruit not showing.

MDg
Title: Re: Stars and Badges
Post by: Bulakbol on September 06, 2008, 01:11:31 AM
It is displayed right under the membergroup name. Like

Administrator
Crewman Recruit
Admin image.

So you have no more problem.
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 01:12:40 AM
Right but there's an image associated with the post count group.  Or is there a limit of 2 images displayed?

MDg
Title: Re: Stars and Badges
Post by: Bulakbol on September 06, 2008, 01:17:04 AM
There is only one set of stars per post_group. You can't use two images per group. The other images are for additional groups.
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 01:18:51 AM
I get that.  I have one image associated with each post group.

When I said a limit of 2, I meant, does the mod only display 2 groups' images?

MDg

// oppss made a mistake
Title: Re: Stars and Badges
Post by: Bulakbol on September 06, 2008, 01:27:21 AM
Nope. If you have 10 additional groups, it will display them all unless you enter the group id in Admin => Features and Options => Basic Features => Arrange additional group id to be displayed. It will display only the additional groups that you enter. Leave it blank and it will display them all.
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 01:31:05 AM
Okay, I checked that section.  That field is blank.

Since it's showing the name of the group, I'm wondering why it won't show the image as well.

I thought maybe it was my cache, but I just cleared that and it still won't show.  Let me try Opera...

MDg
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 01:32:40 AM
Nope.  Opera also doesn't show it.

Just checked to make sure the images actually show up in the membergroups listing.  They showed up, so I know the web server is at least passing them along to the browser.

MDg
Title: Re: Stars and Badges
Post by: Eliana Tamerin on September 06, 2008, 01:38:16 AM
/me repeats her request for Post Groups to be included in the next version.
Title: Re: Stars and Badges
Post by: Bulakbol on September 06, 2008, 01:40:10 AM
No. you need database query to read the post group image and display it. By default, it display membergroup image or post group image but not both. Only the membergroup and post_group name that display both.

<edit> Yay, Eliana, I didn't see your post. Yes, I will. Thanks for reminding me.
For now, Michael D. Garcia, read this post.
http://www.simplemachines.org/community/index.php?topic=225743.msg1609850#msg1609850
</edit>
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 01:44:02 AM
Interesting.  So, I would need to modify the display.template to pull both the name and the image?  And actually, I would rather ditch the non-post membergroup name, since the badge/image is pretty telling :)

MDg
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 01:58:40 AM
Okay, a little confused.  From my Load.php:


pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group, mem.is_activated, mem.additionalGroups,
IF(mem.ID_GROUP = 0 OR mg.stars = '', pg.stars, mg.stars) AS stars" . (!empty($modSettings['titlesEnable']) ? ', mem.usertitle' : '');


Am I replacing that IF statement with the one you suggested, but making the = into a > ?

Just being cautious.

Thanks,

MDg
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 02:06:31 AM
LOL.  Okay, well... that worked.  But it replaced my administrator badge with the post count badge.

MDg
Title: Re: Stars and Badges
Post by: Bulakbol on September 06, 2008, 02:09:14 AM
You didn't replace any lines didn't you? You have to add the new codes.
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 02:10:43 AM
No, this is what my display.template.php looks like for the images:


// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
', $message['member']['post_group'], '<br />';
echo '
', $message['member']['group_stars'], '<br />';
       
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], '<br />';
}
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo $message['member']['additional_groups']['stars'][$i], '<br />';
       
if (isset($message['member']['post_group_stars']) && $message['member']['post_group_stars'] != '')
            echo $message['member']['post_group_stars'], '<br />';


That's straight out of Eclipse.

MDg
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 02:11:54 AM
Here's load.php:

$select_columns = "
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType,
mem.signature, mem.personalText, mem.location, mem.gender, mem.avatar, mem.ID_MEMBER, mem.memberName,
mem.realName, mem.emailAddress, mem.hideEmail, mem.dateRegistered, mem.websiteTitle, mem.websiteUrl,
mem.birthdate, mem.memberIP, mem.memberIP2, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin,
mem.karmaGood, mem.ID_POST_GROUP, mem.karmaBad, mem.lngfile, mem.ID_GROUP, mem.timeOffset, mem.showOnline,
mem.buddy_list, mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group,
pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group, mem.is_activated, mem.additionalGroups,
IF(mem.ID_GROUP > 0 OR mg.stars = '', pg.stars, mg.stars) AS stars1" . (!empty($modSettings['titlesEnable']) ? ',
mem.usertitle' : '');
Title: Re: Stars and Badges
Post by: Bulakbol on September 06, 2008, 02:30:10 AM
I can't find the pg.stars AS pg_stars,
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 02:35:54 AM
I'm confused.  I didn't see this line in the post you referred me to.  Where was pg.stars AS pg_stars supposed to go?

MDg
Title: Re: Stars and Badges
Post by: Bulakbol on September 06, 2008, 03:22:07 AM
Oppsss sorry, I was mixed-up. :P

Is it not working after the modification? No error in the log?
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 03:28:14 AM
Nope.  Still not working, and I can't see any relevant errors in the log.

MDg
Title: Re: Stars and Badges
Post by: Bulakbol on September 06, 2008, 03:37:58 AM
Attach your Load.php and Display.template.php and I'll look at them when I have spare time. Probably tomorrow. Are you using the default theme?
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 03:40:33 AM
I'm using AF316 theme by Fedhog.

Thanks for taking the time to help me out.   I really appreciate it.

MDg
Title: Re: Stars and Badges
Post by: Bulakbol on September 06, 2008, 03:51:02 AM
I'll get back to you tomorrow. Kinda late now.
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 06, 2008, 05:51:37 PM
No problem.  Take your time. :)

MDg
Title: Re: Stars and Badges
Post by: Bulakbol on September 06, 2008, 11:33:51 PM
@Michael D. Garcia
  I looked at your files and TBH, I am confused because of other installed mods that I am not sure what they do. Some lines are removed and I can't do anything. Just try the Load.php if it will work. I can't find a problem with the Display.template.php.

Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 07, 2008, 12:42:04 AM
I installed it.  No joy.

I uninstalled some mods to see if that would help, in particular the ones that modify Load.php, but still no go.

MDg
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 07, 2008, 01:00:30 AM
No, wait!  JOY!  I killed Firefox and started it up and now it's showing all the badge!

Well done, man. :)  Thanks so much for your help. :)

MDg
Title: Re: Stars and Badges
Post by: Bulakbol on September 07, 2008, 01:34:46 AM
Cool. Good to know you got all things sorted.  8)
Title: Re: Stars and Badges
Post by: Michael D. Garcia on September 07, 2008, 04:02:50 AM
Sorry to bother again, but I had one more question.

How would I modify the display.template to remove the names of the membergroup badges, but keep the name of the post group badges?

Thanks!

MDg
Title: Re: Stars and Badges
Post by: Bulakbol on September 07, 2008, 04:28:38 AM
Sorry but sounds too confusing now. Besides, this mod is all about additional groups.
Title: Re: Stars and Badges
Post by: bros on September 12, 2008, 02:26:50 PM
On SMF Beta 4. Trying to do what is in this post:
http://www.simplemachines.org/community/index.php?topic=225743.msg1609878#msg1609878

Display.template.php and Load.php are attached.
Title: Re: Stars and Badges
Post by: bros on September 16, 2008, 06:03:06 PM
?
Title: Re: Stars and Badges
Post by: Bulakbol on September 16, 2008, 11:19:06 PM
@bros
  Sorry for the delay. Too many things at the same time. Busy. Your Display.template.php is fine. Here is your Load.php. Try that.
Title: Re: Stars and Badges
Post by: bros on September 17, 2008, 04:44:07 PM
Quote from: JohnyB on September 16, 2008, 11:19:06 PM
@bros
  Sorry for the delay. Too many things at the same time. Busy. Your Display.template.php is fine. Here is your Load.php. Try that.


It's okay. Thanks for the reply :)

I'll check it out now
Title: Re: Stars and Badges
Post by: bros on September 17, 2008, 04:52:14 PM
It worked. Thanks again.
Title: Re: Stars and Badges
Post by: cfp85 on September 18, 2008, 03:10:16 PM
thanks for the mod ! what i really looking for ...  :)
Title: Re: Stars and Badges
Post by: Bulakbol on September 19, 2008, 05:09:53 AM
You're welcome bros and cfp85. Thank you too for trying/using this mod.
Title: Re: Stars and Badges
Post by: awakencordy on September 19, 2008, 01:03:55 PM
hello. i really wished this would work, but it didnt. :( load.php failed, i installed it anyhow, but I couldn't find the part you asked in it.

return true;
}

// Load a theme, by ID.


this is not in the code, the others are there. I'm attaching my load.php and display template anyhow (i uninstalled it, then saw the edit part, and i reinstalled it), if you'd look.  I hope that it can be done :/
Title: Re: Stars and Badges
Post by: moribund on September 21, 2008, 03:23:19 AM
Not sure if this is covered previously, but it seems that the order in "Admin -> Features and Options -> Basic Features -> Arrange additional group id to be displayed in post" is not respected in Personal Messages.  Is anyone else seeing that?  I'm using version 2.1 of the mod, with SMF 1.16. 
Title: Re: Stars and Badges
Post by: Bulakbol on September 23, 2008, 05:44:33 PM
@awakencordy
Here are your files. Try them.  Display.template.php and Load.php.

@moribund
In admin's eyes, the additional groups' display is different. If you want them to display the way you want it in "Admin -> Features and Options -> Basic Features -> Arrange additional group id to be displayed", edit the Profile.template.php. Find
if (!empty($context['badges']['ownline']) && !allowedTo('moderate_forum'))
and replace.
if (!empty($context['badges']['ownline']))
Title: Re: Stars and Badges
Post by: Cal O'Shaw on September 27, 2008, 12:36:11 AM
Hello,

I'm sorry if I missed reading this (kind of skimmed the 22 pages here, scuzie), but Moderators want to display their group (Global Moderator class) and their group based on how many posts they have. 

Do I have to list all the postcount groups, or all the moderator class groups?  Or do I just leave the list of groups blank?

We're running on 1.1.6.

Grazie,

Cal
Title: Re: Stars and Badges
Post by: Bulakbol on October 02, 2008, 01:13:11 AM
@Cal O'Shaw
This mod is only for additional groups. It won't display post groups' badges or stars.
Title: Re: Stars and Badges
Post by: awakencordy on October 03, 2008, 11:50:42 AM
it worked, thank you!
Title: Re: Stars and Badges
Post by: Bulakbol on October 03, 2008, 02:26:57 PM
Thanks too awakencordy for using/trying this mod.  8)
Title: Re: Stars and Badges
Post by: BlackXBOX on October 06, 2008, 07:16:42 PM
JohnyB, it's not working for me.

I've been trying to get help for several days, and none of the support members could seem to fix the problem.

My forum version is 1.1.5, and the theme I'm trying to install it on is called Dark Night which can be located here:

http://custom.simplemachines.org/themes/index.php?lemma=577

Here is a screenshot of when I install the mod:

(http://img404.imageshack.us/img404/2586/installmodot4.png)

So it seems that the "load.php" failed. Yes, I know did. It's been edited by other support members several times, yet they failed to make it work.

PLEASE HELP!
Title: Re: Stars and Badges
Post by: bros on October 06, 2008, 07:39:29 PM
Attach Load.php and the templates from the theme.
Title: Re: Stars and Badges
Post by: Bulakbol on October 07, 2008, 03:59:47 PM
@BlackXBOX
If you want us to edit your files that failed the search test, do as bros said.
Title: Re: Stars and Badges
Post by: BlackXBOX on October 07, 2008, 07:47:14 PM
Alright here's the load.php


It's been edited by several other members, so please take note of that!
Title: Re: Stars and Badges
Post by: Bulakbol on October 07, 2008, 08:07:05 PM
@BlackXBOX
Try this one. Let me know if it work.
Title: Re: Stars and Badges
Post by: BlackXBOX on October 07, 2008, 08:12:56 PM
Hate to say this but, it didn't make a difference.

HOWEVER, in the Features and Options it shows a blank box. Could it be something to do with it?

Check attached pic etc.
Title: Re: Stars and Badges
Post by: Bulakbol on October 07, 2008, 08:22:12 PM
The language string is missing. It looks like you installed the mod manually and forgot to add the strings. :) Anyway, add the following line to the default/languages/ModSettings.english.php and if you are using utf-8, ModSettings.english-utf-8.
$txt['badge_ownline'] = 'Arrange additional group id to be displayed.<div class="smalltext">(Must be separated by comma. i.e. 1,2,4)</div>';

and also in default/languages/Help.english.php and/or utf-8, add the line that follow if does not exist.
$helptxt['badge_ownline'] = 'Arrange the display of additional group\'s badge or stars. Enter the additional group id number and must be separated by comma. (i.e. 1,2,4)';

Attach your BoardIndex.template.php please.
Title: Re: Stars and Badges
Post by: BlackXBOX on October 07, 2008, 08:26:58 PM
I don't know what to do when you say this:

QuoteThe language string is missing. It looks like you installed the mod manually and forgot to add the strings. :) Anyway, add the following line to the default/languages/ModSettings.english.php and if you are using utf-8, ModSettings.english-utf-8.
$txt['badge_ownline'] = 'Arrange additional group id to be displayed.<div class="smalltext">(Must be separated by comma. i.e. 1,2,4)</div>';

and also in default/languages/Help.english.php and/or utf-8, add the line that follow if does not exist.
$helptxt['badge_ownline'] = 'Arrange the display of additional group\'s badge or stars. Enter the additional group id number and must be separated by comma. (i.e. 1,2,4)';[/quote]

However, i've attached both my BoardIndex.template.php and index.template.php just in case.
Title: Re: Stars and Badges
Post by: Bulakbol on October 07, 2008, 08:37:41 PM
Sorry, I made a mistake. Mix-up. Attach your default/Display.template.php because darknight does not have its own file..
Title: Re: Stars and Badges
Post by: BlackXBOX on October 07, 2008, 08:42:46 PM
Kk here it is.
Title: Re: Stars and Badges
Post by: Bulakbol on October 07, 2008, 08:45:59 PM
It is correctly installed. I don't know why it isn't showing. Try a hard refresh. CTRL+F5. Can you post a link to your forum?
Title: Re: Stars and Badges
Post by: BlackXBOX on October 07, 2008, 08:49:17 PM
www.fratal.org
Title: Re: Stars and Badges
Post by: bros on October 07, 2008, 08:51:04 PM
Server Settings, set the language to English, not English-utf8
Title: Re: Stars and Badges
Post by: BlackXBOX on October 07, 2008, 08:53:14 PM
Quote from: bros on October 07, 2008, 08:51:04 PM
Server Settings, set the language to English, not English-utf8

IT WORKED!!!!! That was the problem! It's supposed to be English not English-utf8!

THANKS MAN!

Title: Re: Stars and Badges
Post by: Bulakbol on October 07, 2008, 08:56:20 PM
It looks like it is working. Have you added additional groups to your self? If your member does not have additional group, of course there's nothing to display.

<edit>
Awww ok then. That's good. :)
</edit>
Title: Re: Stars and Badges
Post by: BlackXBOX on October 07, 2008, 08:57:39 PM
Quote from: JohnyB on October 07, 2008, 08:56:20 PM
It looks like it is working. Have you added additional groups to your self? If your member does not have additional group, of course there's nothing to display.

I'm getting someone to make custom ones atm :)

Also, I put myself in the "Administrator" group and it displays two sets of stars which I don't want. If I take myself out of the administrator group, will I still be administrator of the forum?
Title: Re: Stars and Badges
Post by: Bulakbol on October 07, 2008, 09:16:05 PM
Take the additional Administrator membergroup out. Profile => Account Settings=> Additional Membergroups. Click the "[ show additional groups ]" link and untick the "Administrator" checkbox.
Title: Re: Stars and Badges
Post by: twon on October 15, 2008, 11:26:33 PM
Hello,
To be honest i looked through 18 pages and didnt see my problem listed.
I am using SMF 1.1.6
The forum look great and showing additional groups fine but the PM's are showing double.
Any ideas.
Title: Re: Stars and Badges
Post by: Bulakbol on October 16, 2008, 07:43:12 PM
@twon
Are you using Firefox with Web Developer add-on installed?

Attach your PersonalMessage.template.php and I'll remove the extra codes added. Or find and delete it yourself. Look for
// Is karma display enabled? Total or +/-?
and remove the following lines of codes located above that line.
Code (delete) Select
if (!empty($context['badges']['ownline']) && !allowedTo('moderate_forum'))
{
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], '<br />';
}
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo $message['member']['additional_groups']['stars'][$i], '<br />';
Title: Re: Stars and Badges
Post by: twon on October 16, 2008, 10:32:38 PM
thanks its deleted.
Title: Re: Stars and Badges
Post by: Cal O'Shaw on October 17, 2008, 12:23:43 AM
Quote from: JohnyB on October 02, 2008, 01:13:11 AM
@Cal O'Shaw
This mod is only for additional groups. It won't display post groups' badges or stars.

Pity.  Any chance you might consider that?  Some of our moderators are quite proud of their post counts and want to see all their stars...
Title: Re: Stars and Badges
Post by: Bulakbol on October 17, 2008, 12:49:05 AM
@Cal O'Shaw
I thought I posted it already how to do that. Which version of SMF are you using and which custom theme?
Title: Re: Stars and Badges
Post by: Cal O'Shaw on October 17, 2008, 01:04:51 AM
I'm sorry, I must have missed it (still having a bit of jet lag).  Running 1.1.6 with the default theme.

Grazie
Title: Re: Stars and Badges
Post by: Bulakbol on October 17, 2008, 01:10:28 AM
@Cal O'Shaw
Attach your Sources/Load.php and default/Display.template.php and I'll edit them. I'll post the codes after.
Title: Re: Stars and Badges
Post by: Cal O'Shaw on October 17, 2008, 03:01:49 AM
Grazie!

At the moment I do not have the mod installed (as stars for moderators had been the goal).  Will that make a difference?

I (and my moderators) really appreciate this!

Thank you very much

Cal
Title: Re: Stars and Badges
Post by: Cal O'Shaw on October 17, 2008, 11:52:30 PM
Jonny,

Want to make sure I understand correctly (I really appreciate this help).  My moderators will display, next to their posts, the image for their management group (Moderator, Global Moderator, etc) and then their post-based image, right?

One of my Global Moderators pointed out that she is listed as a Moderator in a board (she started there and likes being listed on the Moderator list there, even if she's a Global Moderator.  Should she expect to still be listed that way?  I just want to let her know what it's going to look like.

Grazie mille!
Title: Re: Stars and Badges
Post by: tk2012 on October 17, 2008, 11:58:47 PM
@ JohnyB

I did a fresh install of b4.0 and it installed correctly and is working!  Something must have happened during the upgrade from b3.1 to b4.0.  Anyway, just wanted to say THANKS for your help.

Title: Re: Stars and Badges
Post by: Bulakbol on October 18, 2008, 11:58:45 PM
@Cal O'Shaw
This mod will add and not modify existing display. Install this mod and look at how additional groups are displayed. If you want to display your members post group stars, tell me where you want it and I'll edit your Load.php and Display.template.php. Here's what I am going to do to add the post group stars.

1.1.5 version. Load.php, look for
mem.karmaGood, mem.ID_POST_GROUP, mem.karmaBad, mem.lngfile, mem.ID_GROUP, mem.timeOffset, mem.showOnline,

add after
pg.stars AS pg_stars,

'post_group_color' => $profile['post_group_color'],

add after
    'post_group_stars' => empty($profile['member_group']) ? '' : str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($profile['pg_stars'][1]) ? $settings['images_url'] . '/' . $profile['pg_stars'][1] : '') . '" alt="*" border="0" />', empty($profile['pg_stars'][0]) || empty($profile['pg_stars'][1]) ? 0 : $profile['pg_stars'][0]),


look for
$profile['stars'] = empty($profile['stars']) ? array('', '') : explode('#', $profile['stars']);

add after
$profile['pg_stars'] = empty($profile['pg_stars']) ? array('', '') : explode('#', $profile['pg_stars']);


And then add the following lines anywhere you want in Display.template.php.
if (!empty($message['member']['additional_groups']))
echo $message['member']['post_group_stars'] != '' ? $message['member']['post_group_stars'] : '', '<br />';



If you want to move the post group name and display it together with the post group stars, enable (tick the check box) the "Hide post group titles for grouped members?" from Admin => Current Theme => Themes and Settings.

Then use
if (!empty($message['member']['additional_groups']) && $message['member']['group'] != '')
echo $message['member']['post_group'], '<br />', $message['member']['post_group_stars'] != '' ? $message['member']['post_group_stars'] : '', '<br />';




@tk2012
Weird things happens sometimes.  ::)
Title: Re: Stars and Badges
Post by: Cal O'Shaw on October 19, 2008, 02:12:46 AM
Hello JonnyB,

I installed it, and unchecked "hide Post Group Titles".

It's now showing in the message view:
Personal Title
Group Title
Post Group Title
Group Star Image

What I am hoping to be able to see is

Personal Title
Group Title
Group Star Image
Post Group Star Image

Is that possible?

Grazie mille

And it appears my Moderator/Global Moderator will have to live with appearing to be a Moderator when she's in the board she has been defined as a Moderator.  Which is fine, unless it's possible to add the logic to say "if Moderator=true, display Moderator and other groups"

Many Thanks!
Title: Re: Stars and Badges
Post by: Bulakbol on October 19, 2008, 02:44:44 AM
@Cal O'Shaw
I'll get back to you.
Title: Re: Stars and Badges
Post by: Cal O'Shaw on October 19, 2008, 02:47:52 AM
Thank you, Jonny, greatly appreciated!

Ciao
Title: Re: Stars and Badges
Post by: Bulakbol on October 19, 2008, 07:32:48 AM
@Cal O'Shaw
Here are your edited files. Make a backup first before you use them. I added the post group image/stars right after the group image/stars. Line 291 - 293 of Display.template.php.
Title: Re: Stars and Badges
Post by: Cal O'Shaw on October 19, 2008, 11:52:58 PM
Hi Jonny,

I loaded the files, but what happened in Message view was:

Group Title
Post Title
Group Star Image
Post Star Image

Can "Post Title" be removed?  If not, can "Group Star Image" be moved to be after Group Title but before Post Star Image, as in:

Group Title
Group Star Image
Post Title
Post Star Image

I really do appreciate your help in this!

Grazie mille!

Cal
Title: Re: Stars and Badges
Post by: Bulakbol on October 20, 2008, 12:28:48 AM
@Cal O'Shaw
Enable (tick the check box) the "Hide post group titles for grouped members?" from Admin => Current Theme => Themes and Settings and then try this attached Display.template.php
Title: Re: Stars and Badges
Post by: Cal O'Shaw on October 20, 2008, 01:03:20 AM
Got it.  Looks Great!  Many, many thanks!!!

Cal
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on November 11, 2008, 07:59:52 PM
JohnyB,

You outdid yourself again. :)
Just installed the mod onto BK-SMF and not only did it install with no problems, but also set up just the way I wanted, and even suggested to you long ago when still working with 1.1.4 :)
Great job. :)
Title: Re: Stars and Badges
Post by: Acans on November 23, 2008, 03:36:09 AM
Hey, for my 1.1.6 forum i've tryed to install stars 2.1 but it sayes dont contunion installation, problem with load.php, how do i fix this
Title: Re: Stars and Badges
Post by: Bulakbol on November 23, 2008, 10:05:31 PM
@BurkeKnight
Some suggested things and can't remember who they are. :) Thanks for the compliment.

@вαѕι¢αℓℓу ι'м נєѕυѕ
Attach your Load.php and I'll edit it if you can't edit it yourself manually.
Title: Re: Stars and Badges
Post by: Acans on November 23, 2008, 10:28:35 PM
Quote from: JohnyB on November 23, 2008, 10:05:31 PM
@вαѕι¢αℓℓу ι'м נєѕυѕ
Attach your Load.php and I'll edit it if you can't edit it yourself manually.

i dont trust myself lol, show i install than attach or attach, upload than install?
Title: Re: Stars and Badges
Post by: funcouldron on November 23, 2008, 10:38:17 PM
when i install this mod ,,, and tries to visit one of the my user profile  or his post i get  following error

Database Error
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 '1)' at line 3
File: /www/110mb.com/f/u/n/c/o/u/l/d/funcouldron/htdocs/fc/Sources/Load.php
Line: 1250


if i uninstall the mod then error is also gone

i m using smf2.0b4
Title: Re: Stars and Badges
Post by: Bulakbol on November 23, 2008, 10:40:46 PM
@вαѕι¢αℓℓу ι'м נєѕυѕ
Attach your Load.php and I'll edit it first. Then upload it to your Sources folder before you install this mod. That way, you can uninstall it wihout editing anything.
Title: Re: Stars and Badges
Post by: Bulakbol on November 23, 2008, 10:45:07 PM
funcouldron
There should be more in that error than you posted. Something like "not exist".  Are there any other errors?
Title: Re: Stars and Badges
Post by: funcouldron on November 23, 2008, 10:50:54 PM
no ,, i was getting this error only
Title: Re: Stars and Badges
Post by: funcouldron on November 23, 2008, 10:51:54 PM
mod works fine .. but when i try to visit profile of user number 2 or any thread in which he posted ,, then i get this error..

if i uninstall the mod then this error is not coming
Title: Re: Stars and Badges
Post by: Acans on November 23, 2008, 10:52:25 PM
Thanks
Title: Re: Stars and Badges
Post by: Bulakbol on November 23, 2008, 10:54:36 PM
Quote from: funcouldron on November 23, 2008, 10:50:54 PM
no ,, i was getting this error only

Hmnn, not sure about that. Did your Load.php failed the test when you installed the mod?
Title: Re: Stars and Badges
Post by: funcouldron on November 23, 2008, 11:00:52 PM
no,, it installed success fully
Title: Re: Stars and Badges
Post by: funcouldron on November 23, 2008, 11:03:10 PM
here is lines from 1245-1256 in load.php without mod
// The theme was specified by REQUEST.
   elseif (!empty($_REQUEST['theme']) && (!empty($modSettings['theme_allow']) || allowedTo('admin_forum')))
   {
      $id_theme = (int) $_REQUEST['theme'];
      $_SESSION['id_theme'] = $id_theme;
   }
   // The theme was specified by REQUEST... previously.
   elseif (!empty($_SESSION['id_theme']) && (!empty($modSettings['theme_allow']) || allowedTo('admin_forum')))
      $id_theme = (int) $_SESSION['id_theme'];
   // The theme is just the user's choice. (might use ?board=1;theme=0 to force board theme.)
   elseif (!empty($user_info['theme']) && !isset($_REQUEST['theme']) && (!empty($modSettings['theme_allow']) || allowedTo('admin_forum')))
      $id_theme = $user_info['theme'];


and here is lines after the mod installed

// The theme was specified by REQUEST.
   elseif (!empty($_REQUEST['theme']) && (!empty($modSettings['theme_allow']) || allowedTo('admin_forum')))
   {
      $id_theme = (int) $_REQUEST['theme'];
      $_SESSION['id_theme'] = $id_theme;
   }
   // The theme was specified by REQUEST... previously.
   elseif (!empty($_SESSION['id_theme']) && (!empty($modSettings['theme_allow']) || allowedTo('admin_forum')))
      $id_theme = (int) $_SESSION['id_theme'];
   // The theme is just the user's choice. (might use ?board=1;theme=0 to force board theme.)
   elseif (!empty($user_info['theme']) && !isset($_REQUEST['theme']) && (!empty($modSettings['theme_allow']) || allowedTo('admin_forum')))
      $id_theme = $user_info['theme'];
Title: Re: Stars and Badges
Post by: Bulakbol on November 23, 2008, 11:05:23 PM
@вαѕι¢αℓℓу ι'м נєѕυѕ
There's a mod that pused things around that is why it failed the test. I corrected them so here is your file. Use this file before you install this mod.
Title: Re: Stars and Badges
Post by: Bulakbol on November 23, 2008, 11:13:08 PM
@funcouldron
Could you attach your Load.php. Maybe codes were in another part of the file causing error because this mod don't touch that part of Load.php. I would like to see your file.
Title: Re: Stars and Badges
Post by: funcouldron on November 23, 2008, 11:23:19 PM
here it is

currently mod is uninstalled
Title: Re: Stars and Badges
Post by: Bulakbol on November 24, 2008, 12:02:03 AM
I can't find anything wrong with your file. Install the mod, attach the Load.php here and then uninstall the mod. I would like to saee the Load.php after the installation.
Title: Re: Stars and Badges
Post by: funcouldron on November 24, 2008, 12:22:23 AM
here it is
Title: Re: Stars and Badges
Post by: Bulakbol on November 24, 2008, 12:59:39 AM
@funcouldron
Your Load.php looks fine to me so I'm sorry to say I can't help you. You installed a portal and it is the one that edited that part of Load.php where you said you are getting errors from.
Title: Re: Stars and Badges
Post by: funcouldron on November 24, 2008, 01:01:21 AM
so what should i do now ????
Title: Re: Stars and Badges
Post by: Bulakbol on November 24, 2008, 01:13:55 AM
If you think the mod is at fault, uninstall it. Maybe it is conflicting with other mods.
Title: Re: Stars and Badges
Post by: funcouldron on November 24, 2008, 01:16:10 AM
i  tried it ,,, if there is no mod installed then also it gives error
Title: Re: Stars and Badges
Post by: Bulakbol on November 24, 2008, 01:49:34 AM
Post the complete error in the support board (http://www.simplemachines.org/community/index.php?board=141.0) and volunteer people will try to help you.
Title: Re: Stars and Badges
Post by: bloodrune on November 24, 2008, 08:22:29 AM
hey..i have been install this http://www.simplemachines.org/community/index.php?topic=225743.0

look at my Donator.gif
(http://i33.tinypic.com/2yzj037.jpg)
Title: Re: Stars and Badges
Post by: Bulakbol on November 25, 2008, 08:15:36 AM
@bloodrune
Do you have the Donator.gif image in your {yourtheme}/images folder? Here's a sample. upload this image to your images folder. This is only a sample.
Title: Re: Stars and Badges
Post by: bloodrune on November 25, 2008, 12:14:36 PM
how do i add..im using freehostia to host my forum


Edit It Work Man...Thank For Helping Me So Much :)
Title: Re: Stars and Badges
Post by: Bulakbol on November 25, 2008, 12:30:16 PM
Owww, sorry but tbh, I don't know. We usually use FTP program to upload files and images to our forum folder. Do you have FTP?

What is FTP? (http://docs.simplemachines.org/index.php?topic=480)

Title: Re: Stars and Badges
Post by: Shortrnd on November 27, 2008, 12:49:49 AM
JB, 

Just wanted to say your mod has been great.  Thank you so much for putting in so much work for all of us.  :)
Title: Re: Stars and Badges
Post by: Bulakbol on November 28, 2008, 04:00:17 AM
I thank you too Shortrnd for using or trying this mod.  :)
Title: Re: Stars and Badges
Post by: Sheree on December 04, 2008, 08:05:15 PM
hi johnny please help me with the edits

thanks mwahh  :-*
Title: Re: Stars and Badges
Post by: Bulakbol on December 04, 2008, 08:41:16 PM
I'll get back to you Sheree.

I'm back. :) Here are your modified files. Use them after installing this mod.
Title: Re: Stars and Badges
Post by: Sheree on December 04, 2008, 09:00:56 PM
thanks johnny  mwahh

edit: I am getting this error on the post

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: 1212

what should i do?
Title: Re: Stars and Badges
Post by: Bulakbol on December 04, 2008, 09:29:21 PM
Not too sure what happened. Try this copy again. Let me know if it still give you error.
Title: Re: Stars and Badges
Post by: Sheree on December 04, 2008, 09:45:01 PM
hi johnny I re uploaded the file and still getting errors  ....  :)
Title: Re: Stars and Badges
Post by: Bulakbol on December 04, 2008, 09:56:10 PM
Sheree,

I don't know why your system is rejecting the query. Maybe uninstall the mod for now until we find a solution. Do you have backup of your Load.php?
Title: Re: Stars and Badges
Post by: Sheree on December 04, 2008, 10:01:16 PM
yes I do :D no problem I know it's kinda late let's call it a day thanks  :-*
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on December 05, 2008, 12:58:48 AM
Hey Bulakbol,

I need a favor if can. Running 2.0 Beta 4 with latest version of S&B.

I need it to also show the group titles for the extra member groups in the topic view.

Example:

Administrator
(Admin Image)

Fleet Admiral
(Admiral Insignia image)

RPG Player
(RPG Image)

And so on. All RPG players have the Rank and RPG, and staff have them & the Staff ranks, too.
Non-Players just use the post ranks, or staff groups if staff.




EDIT:

Well, I just changed the way some things are on that site, so I guess this is now not needed.
Though, may still be good to know, in case need it for another site. :)

I just set it so the RPG image has text. :P
As for staff, I Just added staff rank and game rank as the member group. :P

Best part is, makes it only have 2 displayed ranks for all. :)
Title: Re: Stars and Badges
Post by: Bulakbol on December 05, 2008, 05:01:34 PM
@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>';


Title: Re: Stars and Badges
Post by: Burke ♞ Knight on December 05, 2008, 05:05:04 PM
Thanks my friend. :)
That like I said, may not be needed on this site, but may very well be needed on my next project. :)
Title: Re: Stars and Badges
Post by: fmofmpls on December 06, 2008, 02:18:39 PM
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.  ???
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on December 06, 2008, 03:03:28 PM
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.
Title: Re: Stars and Badges
Post by: fmofmpls on December 06, 2008, 03:39:44 PM
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.
Title: Re: Stars and Badges
Post by: 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.

@BurkeKnight
Thanks for the help my friend.
Title: Re: Stars and Badges
Post by: fmofmpls on December 06, 2008, 04:11:53 PM
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++++
Title: Re: Stars and Badges
Post by: tyhgdgh 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)
--Ameutur Coder (50 Posts)

is this featured already?
Title: Re: Stars and Badges
Post by: Acans on December 14, 2008, 08:24:14 AM
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?
Title: Re: Stars and Badges
Post by: Bulakbol on December 17, 2008, 01:06:45 AM
@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.
Title: Re: Stars and Badges
Post by: Shortrnd on December 23, 2008, 06:32:55 PM
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
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on December 24, 2008, 07:43:07 AM
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. :)
Title: Re: Stars and Badges
Post by: 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. 
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on December 24, 2008, 05:08:28 PM
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. :)
Title: Re: Stars and Badges
Post by: 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) : '';
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on December 24, 2008, 08:59:28 PM
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. :)
Title: Re: Stars and Badges
Post by: Shortrnd on December 24, 2008, 09:47:06 PM
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. 
Title: Re: Stars and Badges
Post by: Sheree on December 27, 2008, 06:14:44 PM
hi johnny please check my Load.php for me
Title: Re: Stars and Badges
Post by: Bulakbol on December 30, 2008, 09:33:58 PM
Thanks guys.

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

Happy New Year!!

Title: Re: Stars and Badges
Post by: Sheree on December 31, 2008, 05:07:11 AM
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

(http://i39.tinypic.com/1zouss0.jpg)

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)

(http://i40.tinypic.com/nyryf9.jpg)


Thanks and have a Happy new Year!!
Title: Re: Stars and Badges
Post by: Bulakbol on January 01, 2009, 04:40:18 AM
Sheree, try this Load.php. If no problem, I will update the package. I think I was mixed up with the 2.0 beta version.

I'll look into your Display.template.php and see what I can do.

<edit>
I added your Display.template.php. Try this one.
</edit>
Title: Re: Stars and Badges
Post by: Sheree on January 01, 2009, 10:40:25 PM
hi johnny
I tried the files and the good news is there are no errors but the problem is there are no badge showing

(http://i42.tinypic.com/2prwll5.jpg)


Title: Re: Stars and Badges
Post by: Highbuzz on January 02, 2009, 08:20:48 PM
Hey Johny B,

I Aa New Damage v2 (http://custom.simplemachines.org/themes/index.php?lemma=738) and I noticed it wasn't on the supported list, so I followed your instructions on non-supported themes. There was one difference and that was:

                        <li>', $message['member']['group_stars'], '</li>';

The only difference was that it uses <li> instead of <br> so I did this:

', $message['member']['group_stars'], '<li />';

if (!empty($message['member']['additional_groups']['id']))
   for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
      echo $message['member']['additional_groups']['stars'][$i], '<li />';


Once I uploaded it, all the badges of my additional member groups appeared on my members. I didn't even tell what ones I wanted it to display.. I figured maybe since it was blank I had to tell it at least one so I find a group and entered it's number alone. Still displays all of them.

I am okay with all of them displaying but it would be nice to have control in case that turns to be untrue one time.

I've uploaded my Display.template.php here incase you want it.
Title: Re: Stars and Badges
Post by: Bulakbol on January 03, 2009, 06:03:34 PM
@Sheree
Could you please try the attached Display.template.php?


@Highbuzz
You are missing a block of code. I'll see what I can do with your Display.template.php.
Title: Re: Stars and Badges
Post by: Highbuzz on January 03, 2009, 06:13:49 PM
Truly appreciated, I'll be waiting!
Title: Re: Stars and Badges
Post by: Sheree on January 04, 2009, 07:27:44 PM
hi johnny , I tried the last dispalytemplate.php

but still no badges are showing  :'( 
Title: Re: Stars and Badges
Post by: Highbuzz on January 06, 2009, 08:56:49 AM
Quote from: Sheree on January 04, 2009, 07:27:44 PM
hi johnny , I tried the last dispalytemplate.php

but still no badges are showing  :'( 
You need to upload your display.template.php from your custom theme that you are using first, so he has something to work with.

I don't know if that display.template.php was for me since you said you would be working on it (as opposed to 'try this'), if it was, didn't work for me.
Title: Re: Stars and Badges
Post by: spiros on January 08, 2009, 12:56:02 PM
Quote- In post - display additional stars and or badges.

Is it possible to simply display the additional membergroup name instead of an image?

Also, is it possible if one uses an image, for that image to have a URL?
Title: Re: Stars and Badges
Post by: Bulakbol on January 08, 2009, 08:40:26 PM
@Sheree
Try removing all the additional groups id's from Admin -> Features and Options -> Basic Features -> Arrange additional groups ...

@HighBuzz
Try this one. Edited Display.template.php attached.

@spiros
Yes, it it possible to display additional groups' name only. Edit your Display.template.php. Find and replace. Two of them.
echo $message['member']['additional_groups']['stars'][$i], '<br />';
Code (replace) Select
echo $message['member']['additional_groups']['name'][$i], '<br />';
Sorry, I don't know if it is possible to add url.
Title: Re: Stars and Badges
Post by: spiros on January 08, 2009, 08:43:12 PM
Many thanks!

Yes, I kept trying to embed a link somehow to the image, but it is not possible for gif -:)
Title: Re: Stars and Badges
Post by: Bulakbol on January 08, 2009, 09:15:00 PM
Maybe you can but only one url for all of your additional groups stars/badges unless you detect the id number before adding the url. You can try though. Find
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], '<br />';

replace
Quotefor ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)   
         {
            if ($message['member']['additional_groups']['id'][$i] == 11)
               echo '<a href="http://www.mysql.com/" target="_blank">', $message['member']['additional_groups']['stars'][$i], '</a><br />';
            else
               echo $message['member']['additional_groups']['stars'][$i], '<br />';
         }
where 11 is the id number of additional group. Replace the www.mysql.com with your own.
Title: Re: Stars and Badges
Post by: funcouldron on January 09, 2009, 04:03:25 AM
johnyB  i intalled this 2.1 version on my smf2.0b4 ,, this time it worked fine and gave no errors (if you remember last time erros were there).. but the problem is  all badges comes 2 time i mean site admin badge come 2 mite   modretor badge come 2 times ,, y is this?
Title: Re: Stars and Badges
Post by: spiros on January 09, 2009, 01:50:54 PM
Brilliant, Bulakbol, it works like magic!

Perhaps this could be considered as extra functionality; it is useful, for example, when you want to have a link pointing to more info regarding the type of status/membership the badge stands for. I.e. I am sure the "Charter member" badge would result in more people becoming charter members, it it was linked to the  "Charter member" page.
Title: Re: Stars and Badges
Post by: chris345 on January 09, 2009, 09:51:48 PM
Hi there quick question, I have several additional groups that users can join freely. However I have members that persist on joining 10 -15 groups, is there any way to only display 3 of their groups oppose to the 15?
Title: Re: Stars and Badges
Post by: Highbuzz on January 10, 2009, 03:06:03 PM
Worked like a charm JohnyB, thanks for all your help!

Truly a great mod with a great creator! ;)
Title: Re: Stars and Badges
Post by: Bulakbol on January 12, 2009, 06:55:07 PM
@funcouldron
It was probably installed twice. You can edit your Display.template.php and delete the duplicate code. Or attache your Display.template.php and I'll delete it for you when i have time.

@chris345
You can try. In Display.template.php, 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 $message['member']['additional_groups']['stars'][$i], '<br />';
}
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo $message['member']['additional_groups']['stars'][$i], '<br />';

Replace
Quote$counter = 0;
      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 && $counter < 3)
               {
                  echo $message['member']['additional_groups']['stars'][$i], '<br />';
                  $counter++;
               }
      }          
      elseif (!empty($message['member']['additional_groups']['id']))
         for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
         {
            if ($counter == 3)
               continue;
            echo $message['member']['additional_groups']['stars'][$i], '<br />';   
            $counter++;
         }
Change the 3 to whatever number of badges you want to display. Codes in red are the additional codes.

@spiros
You can create a topic complete with anchors and add the topic link to every displayed badges. That might work. :)

@Highbuzz
Thanks for the compliment.
Title: Re: Stars and Badges
Post by: chris345 on January 13, 2009, 03:37:26 PM
Thank you so much JohnyB, it worked perfectly!  :)
Title: Re: Stars and Badges
Post by: chickenwing on January 17, 2009, 02:48:00 PM
This is a great MOD!  Works like a champ.  The post with the code to allow mouseover/hover text did the trick for our needs as well.  I did install twice and had to clean up by hand, but that was no biggie.

Now that we are using this, we would like to know if someone has a mod that would allow "badges" to show below the post itself, horizontally, above or below the signature line.  We have up to 6 member groups we show on the left side, along with the regular stars and such which relate to  specific forum activities (like rank), but we want to have badges we can give to folks for other activities.  these secondary activities would overload the left side of the posting area, but would show perfectly as a horizontal line(s) along the bottom.

Any ideas here?  Thanks in advance for your input.
Title: Re: Stars and Badges
Post by: Bulakbol on January 17, 2009, 03:16:34 PM
You're welcome chris345.

@chickenwing
If you can show me a sample image of what you want, maybe we can do something. But no promises of course.
Title: Re: Stars and Badges
Post by: chickenwing on January 17, 2009, 03:42:05 PM
Quote from: Bulakbol on January 17, 2009, 03:16:34 PM
You're welcome chris345.

@chickenwing
If you can show me a sample image of what you want, maybe we can do something. But no promises of course.

hopefully this attachments show what i would like to have.  On the bottom of my post, I have added 3 ribbons and one star to  simulate what are are after.  We could have any number of ribbons or other icons, hopefully of similar shape and size, but not necessarily.  Someone could get 10, 20, or more of these so doing on the left side would get way too large to show all of them. 

Again, we are using the mod to show up to 6 on the left side, those 6 being "primary" badges.  the ones we would like to show on the bottom would be "secondary" badges.  It would be nice if we could select, for each member group's badge, whether to show vertically on the left, or horizontally on the bottom.

Thanks for your considerating this.  Whether doable or not, thanks again for the cool mod!
Title: Re: Stars and Badges
Post by: Bulakbol on January 17, 2009, 03:48:03 PM
I'll see what I can do.
Title: Re: Stars and Badges
Post by: chickenwing on January 17, 2009, 04:55:37 PM
Quote from: Bulakbol on January 17, 2009, 03:48:03 PM
I'll see what I can do.

Thats awesome,,,thanks!
Title: Re: Stars and Badges
Post by: xstrxpurez on January 17, 2009, 06:21:50 PM
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.
Title: Re: Stars and Badges
Post by: Bulakbol on January 17, 2009, 07:03:51 PM
@xstrxpurez
I don't know what is happening. Does their additional groups shows in their profile?
Title: Re: Stars and Badges
Post by: xstrxpurez on January 17, 2009, 09:14:47 PM
Yes, but when the user, or someone else that is not a staff member goes and view's it, it doesn't show them.
Title: Re: Stars and Badges
Post by: Bulakbol on January 17, 2009, 09:41:47 PM
The mod suppose to show the additional group badges to everyone. Are you using custom theme?
Title: Re: Stars and Badges
Post by: xstrxpurez on January 17, 2009, 10:12:13 PM
No im using default.
Title: Re: Stars and Badges
Post by: Bulakbol on January 19, 2009, 01:47:24 PM
@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.
Title: Re: Stars and Badges
Post by: 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?
Title: Re: Stars and Badges
Post by: minos on January 20, 2009, 02:33:33 AM
maybe you could add  show  post cont membergroup  too
Title: Re: Stars and Badges
Post by: chickenwing on January 22, 2009, 06:37:46 AM
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
Title: Re: Stars and Badges
Post by: Bulakbol on January 22, 2009, 09:52:36 PM
@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.
Title: Re: Stars and Badges
Post by: chickenwing on January 22, 2009, 10:06:41 PM
Great Johnny!  Thanks for considering this.  We really like the mod!
Title: Re: Stars and Badges
Post by: minos on January 23, 2009, 06:44:14 PM
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
Title: Re: Stars and Badges
Post by: Mick. on January 24, 2009, 03:08:59 PM
Has anyone had any luck applying this mod to the UltimateProfile mod?   If so,do you mind sharing?
Title: Re: Stars and Badges
Post by: 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.
Title: Re: Stars and Badges
Post by: Mick. on January 25, 2009, 09:35:56 PM
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!
Title: Re: Stars and Badges
Post by: midiof[f] on February 02, 2009, 07:41:57 PM
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

Title: Re: Stars and Badges
Post by: Bulakbol on February 02, 2009, 07:50:27 PM
@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.
Title: Re: Stars and Badges
Post by: bros on February 07, 2009, 06:40:12 PM
How long do you think until this will be made compatible with SMF 2 RC1?
Title: Re: Stars and Badges
Post by: bros on February 07, 2009, 07:01:36 PM
Hm. That's odd. It is working, but it is only displaying one badge. How can I make it display multiple badges in RC1?
Title: Re: Stars and Badges
Post by: Bulakbol on February 09, 2009, 10:37:44 PM
@bros
Sorry, I am late updating my mods. As soon as I have time, I will update all my mods.
Title: Re: Stars and Badges
Post by: midiof[f] on February 11, 2009, 03:10:36 PM
Quote from: Bulakbol on February 02, 2009, 07:50:27 PM
@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.


hi thx but i have many updates and when i upload badges :

QuoteFatal error: Call to undefined function load_onlineColors() in /usr/export/www/hosting/yaarar/Sources/Subs.php on line 3224

if i have clean install smf i dont have troubles with your nice mod :(
but will uninstall all mods this is very bad idea
pls way do have a Load.php problem with updates as code is same.  Is it a hidden  characters ? i dont know where is problem



i was uploaded all updates and all work oki , nice mod thx
Title: Re: Stars and Badges
Post by: ManilaGurL on February 13, 2009, 03:04:27 AM
Please update this to 1.8 or is it alrady updated? lol thanks.
Title: Re: Stars and Badges
Post by: Bulakbol on February 17, 2009, 04:23:01 PM
Sorry for the delay.   :( I will update this mod soon.
Title: Re: Stars and Badges
Post by: Acans on February 17, 2009, 04:29:48 PM
Quote from: Bulakbol on February 17, 2009, 04:23:01 PM
Sorry for the delay.   :( I will update this mod soon.

I'm looking forward to it. ;)
Title: Re: Stars and Badges
Post by: ManilaGurL on February 17, 2009, 09:59:37 PM
Me, too! I really want this mod. :)
Title: Re: Stars and Badges
Post by: Bulakbol on February 18, 2009, 11:58:30 PM
Ok guys, it is now updated. Please let me know of any problem.
Title: Re: Stars and Badges
Post by: ManilaGurL on February 19, 2009, 04:05:03 AM
I got this error ..

Installations actions for "Stars And Badges":
Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Sources/Load.php    Test failed
2.    Execute Modification    ./Sources/ModSettings.php    Test successful
3.    Execute Modification    ./Themes/default/Display.template.php    Test successful
4.    Execute Modification    ./Themes/default/Profile.template.php    Test successful
5.    Execute Modification    ./Themes/default/PersonalMessage.template.php    Test successful
6.    Execute Modification    ./Themes/babylon/Display.template.php    Test successful
7.    Execute Modification    ./Themes/classic/Display.template.php    Test successful
8.    Execute Modification    ./Themes/helios_multi11/Display.template.php    Skipping file
9.    Execute Modification    ./Themes/wowdk_114v1/Display.template.php    Skipping file
10.    Execute Modification    ./Themes/Aa_New_Damage/Display.template.php    Skipping file
11.    Execute Modification    ./Themes/cs-dk114v1/Display.template.php    Skipping file
12.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful
13.    Execute Modification    ./Themes/default/languages/ModSettings.english.php    Test successful


What should I do? I know you've been helping me with your mods, please don't get tired of me. LOL! :)
Title: Re: Stars and Badges
Post by: bros on February 19, 2009, 06:07:01 PM
How can I make multiple badges display? I know you told me how to do it for SMF 2 Beta 4, but I forgot how.
Title: Re: Stars and Badges
Post by: Acans on February 21, 2009, 06:53:16 AM
Hey JonnyB

I got the test failed for load.php but after editing it it made test successful, however when i went to add the id's in features and options their where or ready their, probley from the old database i added however, when i went to check posts only primary was being displayed, even checked profile and they have addional groups ticked and their addional group id is in box in features, and all seperated by , however its still not working.
Title: Re: Stars and Badges
Post by: bros on February 21, 2009, 09:39:40 PM
Found these:
Quote from: bros on July 09, 2008, 09:13:45 PM
Quote from: JohnyB on July 09, 2008, 08:30:03 PM
Try this. Sources/Load.php, look for

pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group, mem.is_activated,


add after

IF(mem.ID_GROUP > 0, pg.stars, '') AS stars1,


look for

pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group,


and add below

IF(mem.ID_GROUP > 0, pg.stars, '') AS stars1,


look for

$profile['stars'] = empty($profile['stars']) ? array('', '') : explode('#', $profile['stars']);


and add below it

$profile['stars1'] = empty($profile['stars1']) ? array('', '') : explode('#', $profile['stars1']);


look for

'post_group_color' => $profile['post_group_color'],


and add below it.

'post_group_stars' =>  str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($profile['stars1'][1]) ? $settings['images_url'] . '/' . $profile['stars1'][1] : '') . '" alt="*" border="0" />', empty($profile['stars1'][0]) || empty($profile['stars1'][1]) ? 0 : $profile['stars1'][0]),


In the default/Display.template.php, find a place for the following lines.

if (isset($message['member']['post_group_stars']) && $message['member']['post_group_stars'] != '')
echo $message['member']['post_group_stars'], '<br />';





Is this for me, or for the other person who asked for assistance above?

Quote from: bros on July 09, 2008, 09:38:28 PM
Quote from: JohnyB on July 09, 2008, 09:20:29 PM
Try it too bros. That might be the one you wanted because this Stars and Badges mod will display additional membergroup stars. The snippet of code I posted will display post group stars for primary groups.

That will make it show in topics.

Since you gave me some code for it to work on my SMF 2.0 beta 3 forums, and it worked perfectly.

This is what you told me then:
Quote from: JohnyB on May 13, 2008, 09:53:59 PM
To add space between additional stars/badges, in Display.template.php
Code (find) Select

echo $message['member']['additional_groups']['stars'][$i], '<br />';


Code (replace) Select

echo '<div style="padding-top: 4px;"></div>', $message['member']['additional_groups']['stars'][$i], '<br />';


Replace the 4px with the number of pixels you want. Thanks for trying/using this mod.

I don't know if it would work on SMF 1.1.5 though.

Hmmm.... I think in the future, I should always install this mod first, because load.php always gets angry somehow :P

Also, tried this on Display.template.php on my 2.0 RC1 board:
echo '<li>','<div style="padding-top: 4px;"></div>', $message['member']['additional_groups']['stars'][$i], '</li>';
Unsurprisingly, it didn't make it display multiple badges :P
Title: Re: Stars and Badges
Post by: ManilaGurL on February 23, 2009, 05:15:42 AM
Bulakbol, still waiting for your help. Thanks.
Title: Re: Stars and Badges
Post by: Garou on February 24, 2009, 11:55:50 PM
Usually when a mod fails to install something its due to the fact that its trying to change a bit of code that another mod has already changed therefor it cant find it.

I would recommend that install the mod anyway and then go in and edit that file by hand, if you know how. Check my signature for information on how to do that.
Title: Re: Stars and Badges
Post by: Bulakbol on February 25, 2009, 09:51:38 PM
@ManilaGurL
Attach your Load.php or send me through email. Sorry for the delay.

@bros
If installation went well, it should display all the additional badges by default. Please post any errors in the error log. Or attach your Load.php and I will look at it.

I would recommend what Garou said. Thanks Garou.

Title: Re: Stars and Badges
Post by: ManilaGurL on February 25, 2009, 10:41:01 PM
Thanks but where do I look for Load.php? I've been looking and I can't find it, sorry. :D
Title: Re: Stars and Badges
Post by: Bulakbol on February 25, 2009, 10:47:13 PM
You can find the Load.php from the Sources folder.
Title: Re: Stars and Badges
Post by: ManilaGurL on February 25, 2009, 11:09:45 PM
Thanks! I emailed you the file. Thanks again! :)
Title: Re: Stars and Badges
Post by: Bulakbol on February 25, 2009, 11:39:37 PM
Replied with the Load.php attached. Good luck!
Title: Re: Stars and Badges
Post by: ManilaGurL on February 26, 2009, 12:00:44 AM
It worked! The only problem I have now is it the additional membergroups won't appear in posts. Maybe I need to edit some settings?
Title: Re: Stars and Badges
Post by: Bulakbol on February 26, 2009, 12:12:45 AM
Uh uh. Any error in the error log?
Title: Re: Stars and Badges
Post by: ManilaGurL on February 26, 2009, 12:17:57 AM
There are login errors there. Not sure if they can be associated with the mod. All I see in posts are additional stars and no group name. If I look in profile, the additional membergroup is there.
Title: Re: Stars and Badges
Post by: Bulakbol on February 26, 2009, 12:38:23 AM
Ow, this mod only display the additional badge or stars but not the name of the additional group. You have to tweak your Display.template.php to show the additional groups' color and name the way you like it. I was expecting a badge with a name on it.

Something like this: (http://www.simplemachines.org/community/Themes/smsite/images/badge_customize.gif)
Title: Re: Stars and Badges
Post by: ManilaGurL on February 26, 2009, 12:42:49 AM
Oh sorry, lol. Then I have to create a badge for that group. Thank you! :)
Title: Re: Stars and Badges
Post by: bros on February 26, 2009, 05:58:19 PM
Quote from: Bulakbol on February 25, 2009, 09:51:38 PM
@ManilaGurL
Attach your Load.php or send me through email. Sorry for the delay.

@bros
If installation went well, it should display all the additional badges by default. Please post any errors in the error log. Or attach your Load.php and I will look at it.

I would recommend what Garou said. Thanks Garou.


Title: Re: Stars and Badges
Post by: Garou on February 27, 2009, 11:00:35 AM
Bros I looked at your attached Load.php, everything was installed where it was supposed to be according to the Installation Instructions for 2.0 RC1 (http://custom.simplemachines.org/mods/index.php?action=parse;mod=1110;attach=87123;smf_version=2.0_RC1) but a huge section for the mod was commented out. That's weird and I'm not sure why that happened

/* $context['badges']['ownline'] = !empty($modSettings['badge_ownline']) ? explode(',', $modSettings['badge_ownline'], 20) : '';
 
$groups = $profile['additional_groups'];
// Load additional membergroups
if (!empty($groups))
{
$result_stars = $smcFunc['db_query']('', '
SELECT id_group, group_name, stars, online_color
FROM {db_prefix}membergroups
WHERE id_group IN (' . $groups . ')
',
array()
);

// additional groups
while ($row_stars = $smcFunc['db_fetch_assoc']($result_stars))
if (!empty($row_stars['stars']))
{
$memberContext[$user]['additional_groups']['id'][] = $row_stars['id_group'];
$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $smcFunc['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);
$memberContext[$user]['additional_groups']['name'][] = $row_stars['group_name'];
$memberContext[$user]['additional_groups']['ag_color'][] = $row_stars['online_color'];
}
$smcFunc['db_free_result']($result_stars);
}

return trued;
}*/


Remove the /* at the beginning and the */ at the end and the mod should work.
Title: Re: Stars and Badges
Post by: bros on February 27, 2009, 11:09:34 AM
Parse error: syntax error, unexpected '}' in /home/xxxxx/public_html/boards/Sources/Load.php on line 1500
Title: Re: Stars and Badges
Post by: Garou on February 27, 2009, 11:36:16 AM
oops, if you grabbed that file I attached in the last post it was the same one you originally attached.

Also I noticed that at the end of the code above which I copied out of your load.php said return trued; instead of return true;
I believe that is what is causing the current syntax error.
Title: Re: Stars and Badges
Post by: bros on February 27, 2009, 11:51:44 AM
Did that, same exact error.

Line 1500 = }
Title: Re: Stars and Badges
Post by: Garou on February 27, 2009, 04:25:14 PM
Ok I think I see whats its doing and it has to do with the other mod that was installed in there.

Try removing the
         
   return true;
}


It looks like its already in there on line 1316 as another mod inserted itself  between the return and the // Load a theme, by ID. If that dont work try putting it back and removing the it in the other spot.
Title: Re: Stars and Badges
Post by: bros on February 27, 2009, 04:57:10 PM
Parse error: syntax error, unexpected '}' in /home/xxx/public_html/boards/Sources/Load.php on line 1500
Title: Re: Stars and Badges
Post by: Garou on February 27, 2009, 06:00:49 PM
Alright then it looks like the different mods are conflicting all together, list them all and I'll have to rebuild the entire Load.php from scratch.
Title: Re: Stars and Badges
Post by: bros on February 27, 2009, 06:10:55 PM
Quote from: Garou on February 27, 2009, 06:00:49 PM
Alright then it looks like the different mods are conflicting all together, list them all and I'll have to rebuild the entire Load.php from scratch.

Are you sure it isn't just something in display.template.php? Since that is what the problem was in the last time. It only displays one membergroup star. I want it to display the stars for all of the membergroups a person has.

Mods:
Stars and Badges
Member Color Link
PM Informer
SMF Arcade
Membergroup Color Legend
Profil Moderator Management
Title: Re: Stars and Badges
Post by: Garou on February 27, 2009, 07:03:26 PM
I came into this conversation a bit late and I'm not sure where your problems started or what was done to try and fix them, I just know that whats in the file isn't right doesn't look correct. For starters part of you problem with the Stars and badges mod is due to the fact that a good chunk of it is commented out in that file.

If that's not the source of your problem at hand its still a problem. I don't know all the ins and outs of this mod but I'm surprised that it works at all with part of the code being ignored like that.

Then when you put the code back in, your running into the other errors. That's because the way these mods layer over each other is causing them not to play nice with each other. The best thing I know to do is try to layer them different ways till they do all work together.

Will this solve the problem at hand? I don't know but I do know it needs to be addressed.

Title: Re: Stars and Badges
Post by: Anub1s on February 27, 2009, 08:18:06 PM
im on 2.0 rc1 and the load wont install

iv tryed earching for the last replace in load but can not find it

attatched is my load file. it may just be because im sleepy lol

but if anyone can help i would be most greatfull.


Its ok i fixed it. member colours was blocking it deeerrrr lol so its working
Title: Re: Stars and Badges
Post by: Garou on February 27, 2009, 10:20:45 PM
Ok I think I have it figured out for both of you.

The code from the last part of the Load.php
$context['badges']['ownline'] = !empty($modSettings['badge_ownline']) ? explode(',', $modSettings['badge_ownline'], 20) : '';
 
$groups = $profile['additional_groups'];
// Load additional membergroups
if (!empty($groups))
{
$result_stars = $smcFunc['db_query']('', '
SELECT id_group, group_name, stars, online_color
FROM {db_prefix}membergroups
WHERE id_group IN (' . $groups . ')
',
array()
);

// additional groups
while ($row_stars = $smcFunc['db_fetch_assoc']($result_stars))
if (!empty($row_stars['stars']))
{
$memberContext[$user]['additional_groups']['id'][] = $row_stars['id_group'];
$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $smcFunc['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);
$memberContext[$user]['additional_groups']['name'][] = $row_stars['group_name'];
$memberContext[$user]['additional_groups']['ag_color'][] = $row_stars['online_color'];
}
$smcFunc['db_free_result']($result_stars);
}
      
This needs to go before

return true;
}

//This is the universial load colors function,

Title: Re: Stars and Badges
Post by: bros on February 27, 2009, 10:23:17 PM
Parse error: syntax error, unexpected '}' in /home/xxxx/public_html/boards/Sources/Load.php on line 1473

Fatal error: require_once() [function.require]: Failed opening required '/home/xxxx/public_html/boards/Sources/Load.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxx/public_html/boards/index.php on line 62
Title: Re: Stars and Badges
Post by: Garou on February 28, 2009, 01:02:12 AM
Try this one. Out of the mods listed the only ones that edit the Load.php are Stars And Badges, Pm_Informer, and Member Color Link. Just installing those 3 in that order produced a good file where all three work well together and all the stars show up in the posts.

If that doesn't fix it you can try the display template but I think you might do better to install all the mods and make sure those three mods are installed in that order.
Title: Re: Stars and Badges
Post by: bros on February 28, 2009, 01:23:41 AM
Quote from: Garou on February 28, 2009, 01:02:12 AM
Try this one. Out of the mods listed the only ones that edit the Load.php are Stars And Badges, Pm_Informer, and Member Color Link. Just installing those 3 in that order produced a good file where all three work well together and all the stars show up in the posts.

If that doesn't fix it you can try the display template but I think you might do better to install all the mods and make sure those three mods are installed in that order.


That fixed it. But now there is something odd.

http://thecastlehall.com/boards/index.php Look at the top. That white bar.
Title: Re: Stars and Badges
Post by: Garou on February 28, 2009, 10:38:47 AM
That shouldn't have anything to do with the Load.php, its either doing to be found in the index.template.php or the or the style.css of the theme you are using. Since I don't really know themes that well, I'm not sure which to tell you but I would compare them to the same files from the default theme.
Title: Re: Stars and Badges
Post by: silber112 on March 02, 2009, 11:01:38 AM
At the instalatión the load.php says error.

I am doing it manualy, but i have one problem. Is says that we have to replace:
Quotereturn true;
}

// Load a theme, by ID.

To This:
Quote$context['badges']['ownline'] = !empty($modSettings['badge_ownline']) ? explode(',', $modSettings['badge_ownline'], 20) : '';
        
   $groups = $profile['additionalGroups'];
   // Load additional membergroups
   if (!empty($groups))
   {
      $result_stars = db_query("
         SELECT stars, ID_GROUP, groupName, onlineColor
         FROM {$db_prefix}membergroups
         WHERE ID_GROUP IN (" . $groups . ')
         ', __FILE__, __LINE__);
            
      // Loop through the additional groups...
      while ($row_stars = mysql_fetch_assoc($result_stars))
      if (!empty($row_stars['stars']))
      {
         $memberContext[$user]['additional_groups']['id'][] = $row_stars['ID_GROUP'];
         $memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $func['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);
         $memberContext[$user]['additional_groups']['name'][] = $row_stars['groupName'];
         $memberContext[$user]['additional_groups']['ag_color'][] = $row_stars['onlineColor'];
      }
      mysql_free_result($result_stars);
   }
         
   return true;
}

// Load a theme, by ID.


But in my forum the first code is:
Quote//Return that what should returned XD
   return (empty($loaded_ids) ? false : ($returnarray == true ? $array : $loaded_ids));
}

// Load a theme, by ID.
function loadTheme($ID_THEME = 0, $initialize = true)
{
   global $ID_MEMBER, $user_info, $board_info, $sc;
   global $db_prefix, $txt, $boardurl, $scripturl, $mbname, $modSettings;
   global $context, $settings, $options;

   // The theme was specified by parameter.


I am using smf 1.1.4 with a lot of mods... Can you please say me what to do?
Pd: sorry for mi worse english
Title: Re: Stars and Badges
Post by: bros on March 02, 2009, 01:22:03 PM
Quote from: silber112 on March 02, 2009, 11:01:38 AM
At the instalatión the load.php says error.

I am doing it manualy, but i have one problem. Is says that we have to replace:
Quotereturn true;
}

// Load a theme, by ID.

To This:
Quote$context['badges']['ownline'] = !empty($modSettings['badge_ownline']) ? explode(',', $modSettings['badge_ownline'], 20) : '';
        
   $groups = $profile['additionalGroups'];
   // Load additional membergroups
   if (!empty($groups))
   {
      $result_stars = db_query("
         SELECT stars, ID_GROUP, groupName, onlineColor
         FROM {$db_prefix}membergroups
         WHERE ID_GROUP IN (" . $groups . ')
         ', __FILE__, __LINE__);
            
      // Loop through the additional groups...
      while ($row_stars = mysql_fetch_assoc($result_stars))
      if (!empty($row_stars['stars']))
      {
         $memberContext[$user]['additional_groups']['id'][] = $row_stars['ID_GROUP'];
         $memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $func['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);
         $memberContext[$user]['additional_groups']['name'][] = $row_stars['groupName'];
         $memberContext[$user]['additional_groups']['ag_color'][] = $row_stars['onlineColor'];
      }
      mysql_free_result($result_stars);
   }
         
   return true;
}

// Load a theme, by ID.


But in my forum the first code is:
Quote//Return that what should returned XD
   return (empty($loaded_ids) ? false : ($returnarray == true ? $array : $loaded_ids));
}

// Load a theme, by ID.
function loadTheme($ID_THEME = 0, $initialize = true)
{
   global $ID_MEMBER, $user_info, $board_info, $sc;
   global $db_prefix, $txt, $boardurl, $scripturl, $mbname, $modSettings;
   global $context, $settings, $options;

   // The theme was specified by parameter.


I am using smf 1.1.4 with a lot of mods... Can you please say me what to do?
Pd: sorry for mi worse english

First you need to update to SMF 1.1.8
Title: Re: Stars and Badges
Post by: silber112 on March 02, 2009, 04:37:58 PM
The mod says that it can be used with 1.1.4

I will not do it because I have a lot of mods instaled and I dont have the time to do all again. Aniway, I have seen forums 1.1.4 that have instales the mod, I hope that some one can help me..
Title: Re: Stars and Badges
Post by: Bulakbol on March 02, 2009, 09:29:48 PM
@bros
Attach your Load.php and I'll try to add the codes.
Try this edited Load.php. Let me know how this one goes.

@silber112
What file are you having problem with? Load.php? Attach here and I'll try to edit it for you when I have time.

@Garou
Thanks for helping out. Appreciated.
Title: Re: Stars and Badges
Post by: silber112 on March 03, 2009, 08:12:44 AM
Quote from: Bulakbol on March 02, 2009, 09:29:48 PM
@bros
Attach your Load.php and I'll try to add the codes.
Try this edited Load.php. Let me know how this one goes.

@silber112
What file are you having problem with? Load.php? Attach here and I'll try to edit it for you when I have time.

@Garou
Thanks for helping out. Appreciated.

Thanks a lot  :D

Here you are:
Title: Re: Stars and Badges
Post by: bros on March 03, 2009, 05:12:19 PM
That fixed it. Thanks, it was irking me and my members :)
Title: Re: Stars and Badges
Post by: Michael D. Garcia on March 21, 2009, 02:58:41 AM
Ugh, I'm having the same problem on a 2.0 RC1, where it's listing the names of the groups, but only the non-post group badge.

Attaching Load and Display.template

Any help would be greatly appreciated.

MDg
Title: Re: Stars and Badges
Post by: Hyronymus on March 22, 2009, 03:13:47 PM
Is it possible for someone to update/rewrite this mod to 1.1.8 and expand it with showing the names of additional membergroups in posts too? I looked at the code but get lost straight after the database queries :(.
Title: Re: Stars and Badges
Post by: C4G-TK on March 25, 2009, 12:08:49 PM
I'm having a little problem with the 3rd edit of the Load.php file.  I have some other mods installed, so I can't tell where to do this edit.  I'm using RC1.  I completed all two of the other Failed Tests by doing manual edits, but this one I just can't figure out.

If someone could help me with this, I would appreciate it.

I just need help with the 3rd edit.  (I'll haven't done the 1st two edits, yet.  But, I will do those myself for the practice.)
Title: Re: Stars and Badges
Post by: Bulakbol on March 28, 2009, 01:03:34 PM
@silber112
Here's your Load.php. Use this file after you install this mod.
Title: Re: Stars and Badges
Post by: Bulakbol on March 28, 2009, 01:20:38 PM
@Michael D. Garcia
Your files looks fine to me. This mod will display only the additional groups. No non-post groups. Can you elaborate your issue more?

Hyronymus
QuoteIs it possible for someone to update/rewrite this mod to 1.1.8 and expand it with showing the names of additional membergroups in posts too? I looked at the code but get lost straight after the database queries  :( .

To display the additional group name under the additional group badge, in Display.template.php find two occurrences of
echo $message['member']['additional_groups']['stars'][$i], '<br />';
and replace with
{
echo $message['member']['additional_groups']['stars'][$i], '<br />';
echo $message['member']['additional_groups']['name'][$i], '<br />';
}


@C4G-TK
Here's your edited Load.php. Use this file after installation.
Title: Re: Stars and Badges
Post by: C4G-TK on March 29, 2009, 01:12:32 PM
Thanks much!
Looks good from here!
Title: Re: Stars and Badges
Post by: MissyNL on March 31, 2009, 09:39:17 AM
Hello... really love this mod.. so i installed the latest version of it..

The only thing is that i, as an admin can see all the additional badges eventhough i have set the id to show specific membergroups.

I know that only admin can see that, but how can i make it so.. that i and my mods see it as the rest? I really do not need to see the other groups, since some members have 4 groups :D

Thank you!
Title: Re: Stars and Badges
Post by: Bulakbol on March 31, 2009, 05:31:53 PM
@MissyNL
I think what an admin can see, others can also see. I can't remember putting a restriction to the last version. I maybe wrong but can you PM me please.
Title: Re: Stars and Badges
Post by: MissyNL on April 01, 2009, 03:58:47 AM
shur :D
Title: Re: Stars and Badges
Post by: Hyronymus on April 05, 2009, 06:54:59 AM
Bulakbol,

Sorry for the late reply but you made me very happy. It works like a charm. Thanks a lot :).
Title: Re: Stars and Badges
Post by: Bulakbol on April 05, 2009, 06:59:25 AM
@Hyronymus
Cool. That's great. Thank you too for using/trying this mod.
Title: Re: Stars and Badges
Post by: dekay on April 16, 2009, 07:03:53 PM
Hi, this is a very useful MOD, great!

Question: is there a possibility to insert linebreaks between membergroup-symbols?

To illustrate my problem I attatched a pic. You see  2 long bages and 3 small icons that are displayed by Stars&Badges. Looks good so far, but only as long as this area stays max. 120 pixels wide. If someone zooms out the page, the small icons move right after that last long badge.

I don't know if its possible to give the »Arrange additional group id to be displayed.« line a syntax like this:
»18,br,60,br,62,br,49,50,51,52,53,54,55,56,57,58,59,61«
br = insert line break

- just as a suggestion for an addional feature, but every kind of workaround would be ok, too :)

I'm hoping that this hasn't been asked before - forum search provided no matches in this topic
Title: Re: Stars and Badges
Post by: Bulakbol on April 17, 2009, 11:03:47 AM
@dekay
Thanks for the suggestion. I will add to my to-do list. Maybe for the next version if I have enough time to do it.
Title: Re: Stars and Badges
Post by: dekay on April 17, 2009, 02:03:57 PM
Sound like it's not possible to find a workaround for that...  :(
Maybe with hard-coded <br>'s ?
Title: Re: Stars and Badges
Post by: Bulakbol on April 19, 2009, 12:35:25 PM
The default is one <br /> each additional badge. You probably removed the linebreak that's why it behaves differently. Yes, you have to hardcode it if you want it now.
Title: Re: Stars and Badges
Post by: dekay on April 19, 2009, 05:40:14 PM
Quote from: Bulakbol on April 19, 2009, 12:35:25 PM
The default is one <br /> each additional badge. You probably removed the linebreak that's why it behaves differently.

Oops,  I'd totally forgotten that I already changed some code.

For those interested: I found a quick&dirty solution by wrapping the whole thing in a fixed width table (default/Display.template.php):

echo '<table width="140" border="0"><tr><td>'; // my labels are around 130 so that should be enough
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], ' ';
echo '</td></tr></table>'; // close table
Title: Re: Stars and Badges
Post by: Bulakbol on April 21, 2009, 12:49:55 AM
@dekay
Cool. 8) Thanks for the tip.
Title: Re: Stars and Badges
Post by: dademan000 on April 21, 2009, 06:44:29 AM
@Johnny

I need some help with my Load.php

I have installed the mod, but when I installed it, it said that it Load.php failed. So I continued with it. This is what I have so far. (Attached to this post).

Rogers~
Title: Re: Stars and Badges
Post by: Bulakbol on April 23, 2009, 01:42:20 AM
@dademan000
Here's your edited Load.php. Let me know if there's error.
Title: Re: Stars and Badges
Post by: dademan000 on April 24, 2009, 02:48:55 AM
@Johnny

Thanks man, works PERFECT now.

P.S Anyone installing this mod, with the Stars To Profile Mod. Just a thing I found, it duplicates the primary group, so I wouldn't suggest it (makes it look horrible).


Thanks again man,
Rogers~
Title: Re: Stars and Badges
Post by: Bulakbol on April 25, 2009, 11:01:08 PM
Thanks for the tip dademan000. Others might find it useful.
Title: Re: Stars and Badges
Post by: CesarManara on April 26, 2009, 04:22:51 PM
Hello, I've installed the mod, the mod it's so good.

But i want that the stars of the normal group for users (Groups Based on posts number) to appear with the stars of custom groups.

Can the mod do that?
Title: Re: Stars and Badges
Post by: Bulakbol on April 27, 2009, 11:24:22 AM
The post group stars are displayed by default. This mod only display the additional group stars/badges under the default stars.
Title: Re: Stars and Badges
Post by: CesarManara on April 27, 2009, 01:20:06 PM
Quote from: Bulakbol on April 27, 2009, 11:24:22 AM
The post group stars are displayed by default. This mod only display the additional group stars/badges under the default stars.

No... but my primary group, is "Founder", that is a custom group, because I'm the founder of the forum.

I Want that my post-group stars is displayed under my defult group stars.

Link for the forum: http://www.destroyercorp.com/postgames
Link to my profile: http://www.destroyercorp.com/postgames/index.php?action=profile;u=1
Link to one of my posts: http://www.destroyercorp.com/postgames/index.php?topic=147

I want that the normal member stars, of "Membro Senior" to appear under the "Founder Stars", can the mod to that?
Title: Re: Stars and Badges
Post by: sombra on April 28, 2009, 01:04:42 PM
hello i got to thanks for this great mod

i have some questions

(http://img407.imageshack.us/img407/8716/rankn.jpg)

i can see the admins stars but not the other ranks stars the post rank

i did the install by the smf page and it didint present any errors all sayd test passed

im using dark break and this them dosent have Display.template.php

can someone point me to the the problem

thanks

-------------------------------------------------------------

since i installed this mod im having problems with     Hack's Park Shoutbox      2.0  its a coincidence or theres conflicts betwen mods?
Title: Re: Stars and Badges
Post by: sombra on April 29, 2009, 09:58:10 PM
well i notice theres no problem with the chat mod but still have only ine banner of rank showing up
Title: Re: Stars and Badges
Post by: Bulakbol on April 29, 2009, 10:16:41 PM
@CesarManara
Why don't you you create an additional group and use post group stars for it. It will be displayed as additional group.

@sombra
This mod will not display post group stars. Sorry. It will display only additional groups. So if you want to display stars, make another group and make it as additional group for members you want the stars be displayed.
Title: Re: Stars and Badges
Post by: sombra on April 30, 2009, 09:12:45 AM
ohh so for ranks for ammount of post can get rank banners mm too bad


but nice job on this mod people now can have 2 ranks showed

is there any way i can make ir show banners for post count ranks?

Title: Re: Stars and Badges
Post by: Bulakbol on May 02, 2009, 07:27:36 PM
Banners? Maybe you should post in the "Coding Discussion" board.  :P
Title: Re: Stars and Badges
Post by: CesarManara on May 03, 2009, 04:50:27 PM
Quote from: sombra on April 30, 2009, 09:12:45 AM
ohh so for ranks for ammount of post can get rank banners mm too bad


but nice job on this mod people now can have 2 ranks showed

is there any way i can make ir show banners for post count ranks?

http://www.simplemachines.org/community/index.php?topic=306852.0

Look this, may solve your problem
Title: Re: Stars and Badges
Post by: ScopeXL on May 18, 2009, 04:26:16 AM
I too am having trouble with my Load.php as well. I took a crack at it, but its still not working. I'm guessing my other mods are conflicting with each other in this mod. Would you please take a look and see if you can get my Load.php working so I can use this mod? This will help my site immensely. I've attached the Load.php to this. Any help would be great, thanks.
Title: Re: Stars and Badges
Post by: Mists on May 18, 2009, 05:41:04 PM
Same, problem with my Load.php.


Any suggestions?
Title: Re: Stars and Badges
Post by: Bulakbol on May 20, 2009, 05:38:45 AM
@ScopeXL and Mists
Thanks for trying/using this mod. I have your Load.php. I'll get back to you.
Title: Re: Stars and Badges
Post by: Neverhurry on May 20, 2009, 01:30:00 PM
hello,

i need this mod very much, but i got a "    ./Sources/Load.php test failed", can you help?

i attached my load. php
Title: Re: Stars and Badges
Post by: Neverhurry on May 20, 2009, 04:53:25 PM
thanks, i figured it out myself.
what a pity that this mod can not show post group stars.

anybody has any ideas? advise? thank you!!!
Title: Re: Stars and Badges
Post by: Mists on May 20, 2009, 05:33:56 PM
Quote from: neverhurry on May 20, 2009, 04:53:25 PM
thanks, i figured it out myself.
what a pity that this mod can not show post group stars.

anybody has any ideas? advise? thank you!!!

If I am not wrong, I thought that was the purpose of this mod? :P
Title: Re: Stars and Badges
Post by: ScopeXL on May 21, 2009, 12:46:54 AM
Yea, this mod should show the stars of any group a member is a part of, if not, then it isn't installed properly. (Why Mists and I are waiting on the Load.php from the expert ;))

// Edit

So I just upgraded my forum to 1.1.9 which has a new Load.php, will the revised one you send back be compatible with the new SMF patch Bulakbol?
Title: Re: Stars and Badges
Post by: Bulakbol on May 21, 2009, 01:52:05 PM
@neverhurry
I didn't download your file. I figured you fixed it yourself.  Have you tried this mod?
http://custom.simplemachines.org/mods/index.php?mod=1530

@Mist & ScopeXL
I can't attach a file. I am getting error so I'll try another browser and try it again later. If you want, PM me and give me your email address and I'll send it to you via email. Sorry about that.

<edit>
@Mists
The file upload is now working so I am attaching your edited Load.php to my post.
Title: Re: Stars and Badges
Post by: Bulakbol on May 21, 2009, 04:03:30 PM
@ScopeXL
Your edited Load.php is now attached. Please try it.

Title: Re: Stars and Badges
Post by: ScopeXL on May 21, 2009, 04:15:22 PM
Quote from: Bulakbol on May 21, 2009, 04:03:30 PM
@ScopeXL
Your edited Load.php is now attached. Please try it.

Perfect, works great now. Thank you for this. Great mod.
Title: Re: Stars and Badges
Post by: Neverhurry on May 21, 2009, 04:30:58 PM
Quote from: Bulakbol on May 21, 2009, 01:52:05 PM
@neverhurry
I didn't download your file. I figured you fixed it yourself.  Have you tried this mod?
http://custom.simplemachines.org/mods/index.php?mod=1530
Bulakbol:

thank you, but i have problems install Manfred's mod. I gave up.

I installed your mod, but strangely, i got these problems:

1. if someone is a moderator and a member from a regular group, then, the moderator group title and the 5 green stars (default) can show, but the badge of that regular group which i added (3 flowers) does not show, nor of course the post count group's badge.

2. if someone is a admin and a member from a regular group, then, the administrator title and badge show, the title of the post count group show, the badge of the regular group which i added (3 flowers) show, but the badge of the post count group doesn't show, nor the title of the regular group.

thank you again in advance for your kindness!

Title: Re: Stars and Badges
Post by: Bulakbol on May 22, 2009, 12:37:19 AM
I know what you mean. The SMF default is either the post_group or main_group stars are shown but not both. This mod only display the additional groups (in red). So, it will look like this.

Main group


post group


Title: Re: Stars and Badges
Post by: ScopeXL on May 22, 2009, 12:55:00 AM
@neverhurry keep in mind that the look of your postbit info is very customizable through your Display.template.php You can switch the order of the postbit.
Title: Re: Stars and Badges
Post by: Neverhurry on May 22, 2009, 03:26:35 AM
Quote from: Bulakbol on May 22, 2009, 12:37:19 AM
I know what you mean. The SMF default is either the post_group or main_group stars are shown but not both. This mod only display the additional groups (in red). So, it will look like this.

Main group

  • main group title
  • administrator stars only. No post group.
  • additional group#1
  • additional group#2
  • etc. etc.


post group

  • post group title
  • post group stars
  • additional group#1
  • additional group#2
  • etc. etc.

I am totally confused.
(http://www.cinask.com/Smileys/skype/ji.gif)(http://www.cinask.com/Smileys/skype/ji.gif)(http://www.cinask.com/Smileys/skype/ji.gif)
Title: Re: Stars and Badges
Post by: Mists on May 22, 2009, 03:40:07 PM
Quote from: Bulakbol on May 21, 2009, 01:52:05 PM
@neverhurry
I didn't download your file. I figured you fixed it yourself.  Have you tried this mod?
http://custom.simplemachines.org/mods/index.php?mod=1530

@Mist & ScopeXL
I can't attach a file. I am getting error so I'll try another browser and try it again later. If you want, PM me and give me your email address and I'll send it to you via email. Sorry about that.

<edit>
@Mists
The file upload is now working so I am attaching your edited Load.php to my post.


I really appreciate you taking your time to do this. :)

Now, it shows the ranks in my profile, but nothing in the posts.

Edit:

Fixed it, I had to modify a line in my display.template.php.

Quote from: neverhurry on May 22, 2009, 03:26:35 AM
Quote from: Bulakbol on May 22, 2009, 12:37:19 AM
I know what you mean. The SMF default is either the post_group or main_group stars are shown but not both. This mod only display the additional groups (in red). So, it will look like this.

Main group

  • main group title
  • administrator stars only. No post group.
  • additional group#1
  • additional group#2
  • etc. etc.


post group

  • post group title
  • post group stars
  • additional group#1
  • additional group#2
  • etc. etc.

I am totally confused.
(http://www.cinask.com/Smileys/skype/ji.gif)(http://www.cinask.com/Smileys/skype/ji.gif)(http://www.cinask.com/Smileys/skype/ji.gif)

It is an explanation on what the modification is for. By default, SMF Boards only show only ONE group in a post, either the post group or the special group. Using this mod will allow you to show all groups that the user is in.

Title: Re: Stars and Badges
Post by: Slagox on June 10, 2009, 04:45:54 AM
Hey, to add a second member group is it compulsory for me to change their password if i edit their profile?
How can i get around this?
Title: Re: Stars and Badges
Post by: Bulakbol on June 10, 2009, 05:02:07 AM
Adding member additional group does not need to change their password. Go to their Profile => Account Related Settings. On the right side of Additional Membergroups:, you'll find [ show additional groups ] link. Click on that link and it will show you all additional groups available. Just select the group you want as an additional group. Click [Change profile] button after.
Title: Re: Stars and Badges
Post by: Slagox on June 10, 2009, 05:18:15 AM
Dont worry fixed error, the ManageMembergroups file was overwritten and replaced with "hacking attempt..."
Title: Re: Stars and Badges
Post by: Bulakbol on June 12, 2009, 12:23:34 AM
@Slagox
Sorry. I am late. But I'm glad you figured out yourself. :)
Title: Re: Stars and Badges
Post by: Neverhurry on June 14, 2009, 04:56:41 AM
Quote from: Bulakbol on May 21, 2009, 01:52:05 PM
@neverhurry
I didn't download your file. I figured you fixed it yourself.  Have you tried this mod?
http://custom.simplemachines.org/mods/index.php?mod=1530


yes, i tried but the load.php file failed the test, then i tried install it manually using the 1.1.9 parse codes, but i couldn't find "'is_guest' => false," .... too difficult to use, maybe it is because i use 1.1.9 but the mod supports only 1.1.7?
Title: Re: Stars and Badges
Post by: Bulakbol on June 15, 2009, 04:24:18 AM
@neverhurry
Sorry, I can't help you with that mod. Do you still need my help with this mod? 
Title: Re: Stars and Badges
Post by: Neverhurry on June 15, 2009, 01:55:08 PM
Quote from: Bulakbol on June 15, 2009, 04:24:18 AM
@neverhurry
Sorry, I can't help you with that mod. Do you still need my help with this mod?

Thank you, i think i am just too tired to answer. Thank you.
Title: Re: Stars and Badges
Post by: MarChelo on June 23, 2009, 10:41:56 AM
Will you supporting this mod?
I love it but Im having problems trying to install in my forum with V 2.0 RC1-1
Thank you
Title: Re: Stars and Badges
Post by: Bulakbol on June 24, 2009, 02:19:38 AM
@MarChelo
What problems are you having? If you need help, just post your issue and I'll see what I can do.
Title: Re: Stars and Badges
Post by: Ave Marie on June 29, 2009, 03:43:22 PM
I desperately want this mod (I have it on another board and it works beautifully) but other mods are interfering.

I got my load.php edited by hand, but ManageMembers.php and ManageMembers.template.php apparently have had the code I need to modify edited out. If I post them, will someone be able to help me out?
Title: Re: Stars and Badges
Post by: Bulakbol on June 29, 2009, 06:50:59 PM
Ave Marie
I will be off for few days but if you can upload those files today, I might have enought time to do the edits for you.  Which custom theme are you using?
Title: Re: Stars and Badges
Post by: avemarie on June 30, 2009, 10:09:45 AM
I am using Diablo 3 (http://custom.simplemachines.org/themes/index.php?lemma=779) for my theme.

Thanks so much for any help you can give me! You're awesome.
Title: Re: Stars and Badges
Post by: Garou on June 30, 2009, 08:48:56 PM
I just checked the package parser (http://custom.simplemachines.org/mods/index.php?action=parse;mod=1110;attach=87123;smf_version=1.1.9) and the mod doesn't edit either of these files.  ???
Title: Re: Stars and Badges
Post by: Ave Marie on July 01, 2009, 02:08:25 PM
It did when I tried to install then read the manual instructions... O_o You sure you're looking at the right mod? There is another one with a similar title.

[edit]
HAHA and I would have posted in the wrong thread for it, too. /)_- My bad. I'm sorry! Thank you for the help - I will move this to the correct thread. :)
Title: Re: Stars and Badges
Post by: Bulakbol on July 04, 2009, 01:15:51 PM
@Garou and Ave Marie
Wooo then I have nothing to do here then. Thanks. Now I can sit back and relax haha.
Title: Re: Stars and Badges
Post by: Garou on July 05, 2009, 10:59:55 AM
Bulakbol, you work hard on this and your other mods. As a long time user and fellow modder I'm happy to help where I can so if you need time to relax go right ahead.  :)
Title: Re: Stars and Badges
Post by: nwobhm on July 22, 2009, 04:00:55 AM
Where can i get those cool badges like "customizer" "donator" or "translator" and so on? To use on my own forum?
Title: Re: Stars and Badges
Post by: Bulakbol on July 23, 2009, 01:20:12 AM
@Garou
Thanks a bunch.

@nwobhm
Use google and search. I don't know where to grab them myself. You can make your own tho.
Title: Re: Stars and Badges
Post by: Bladerider on August 24, 2009, 11:43:01 PM
Hello to all especially Bulakbol...thanks for the great mod.  I have taken over the admin duties that a member here called "Shortrnd"  was managing.  This is my first major pass into smf software...done mostly vb in the past.  But with the excellent information in this thread I have now set up a half dozen new user groups and have the badges displaying properly...thanks to all that were involved....bladerider
Title: Re: Stars and Badges
Post by: Bulakbol on August 25, 2009, 12:52:31 AM
@Bladerider
Aww you scared me.  :) I thought you encountered problem with this mod. Thanks a bunch for the compliment.
Title: Re: Stars and Badges
Post by: edi67 on August 25, 2009, 12:19:45 PM
very strange i install it everything is ok and mod seem to work but appear me in upper part of forum this line:

Notice: Undefined variable: profile in /home/crazyzone/data/www/crazyzone.biz/Sources/Load.php on line 1559
CrazyZone


and my fonts of forum are bigger than normal u can help me??
Title: Re: Stars and Badges
Post by: fox0r on August 27, 2009, 05:19:26 PM
I am wanting to install this on my board, but it is failing on the personal message template.  I have the Advanced Reputation Mod installed, and that removed the Karama line is searches for.

Is this vital to make the mod run, or does this only make it show in PMs?  If it's only for showing in PMs then I'm not worried about it.

After installing, every ones groups are showing, but the post-based star images are not.  How would I get these to show?

I also see in one of the Mod's screen shots that there is an option to list member group ID, how do I get this number?

If I just put numbers for the post-based groups in there, would those be the only ones to show, or would the unspecified ones still show?

Thanks!
Title: Re: Stars and Badges
Post by: Lewis526 on August 28, 2009, 11:45:21 PM
This mod offers something I've been wanting for months.  My main worry is that we're using a default theme called Mystic Jade, which is not listed as a compatible theme.  We're using SMF 1.1.10, which is listed as compatible.  Has this mod been tested and failed with Mystic Jade, or is it simply not tested?
Title: Re: Stars and Badges
Post by: Garou on August 29, 2009, 07:01:07 AM
In order to make just about any mod work with a custom theme you have to manually make edits to the files in the custom theme.

For the 1.1.0 compatible version of this mod go to http://custom.simplemachines.org/mods/index.php?action=parse;mod=1110;attach=87123;smf_version=1.1.10

Everyplace it says ./Themes/default/some file, make those changes to ./Themes/your theme/some file

Occasionally some lines may be hard to find as the theme or other mods have been slightly changed from the default theme but it shouldn't be too hard to figure out.
Title: Re: Stars and Badges
Post by: Lewis526 on August 29, 2009, 11:37:44 AM
Got it.  I'll let you know how it comes out.  Thanks!
Title: Re: Stars and Badges
Post by: Bulakbol on August 29, 2009, 07:45:26 PM
@edi67
Can you post the whole error? I am not sure where to start troubleshooting your issue. Does the error disappear when you uninstalled this mod?

@fox0r
You can ignore the personal message.
This mod will display additional badges. It does not remove or replace post group stars. Maybe you installed another mod that replaced the post based stars.
To find out membergroups ID, go to Admin -> Membergroups. Hover your mouse over the name of your group and in the bottom of your internet browser, you'll see something like this in the status bar - (.../index.php?action=membergroups;sa=members;grouop=1). The 1 at the end is the group ID.
This mod has nothing to do with post group stars or ID. Only for additional groups.

@Garou
Thanks for the help. Appreciated.

Lewis526
Is everything in order now? :)
Title: Re: Stars and Badges
Post by: Lewis526 on August 29, 2009, 11:23:57 PM
Well I've got all the editing done (great instructions, by the way) but I'm waiting for the go-ahead from my two co-admins to put it "in production."  One of the other admins actually installed and set up our forum, so I don't have a full working backup to myself that I can test.  At this point it'll take maybe 5 minutes (if that) to rename the edited files that I've already put to the server, and 5 minutes to revert it back if it errors out, so I could probably test it tonight or tomorrow morning without anyone being the wiser, but I want to at least give them the fair warning and a chance to say "hold yer horses."  Heck, if nobody's logged in right now it'll be awfully tempting.   :P
Title: Re: Stars and Badges
Post by: Lewis526 on August 29, 2009, 11:57:51 PM
Well I couldn't resist the temptation, and yes it works.  However, I have a question.  In the line on the Admin..Features and Options..Basic Features menu, apparently I can choose how to display additional group IDs.  But I'm having trouble figuring out what to enter in that field.  If I enter nothing, all additional group ID images are displayed, but if I enter anything at all, no additional group ID images are displayed (something breaks).  So either I'm using the wrong syntax or something is broken in my code.

Let's start with syntax.  For example, let's say I have badges for three member groups:"Yellow" "Orange" and "Green".  Now I want to display the badges for Green and Yellow but not for Orange.  What should I enter in that field?
Title: Re: Stars and Badges
Post by: Bulakbol on August 30, 2009, 12:15:17 AM
Enter the additional group ID's only. They will be displayed by the order of id. If you don't enter the id for orange, the orange will not be displayed.
Title: Re: Stars and Badges
Post by: Lewis526 on August 30, 2009, 12:21:01 AM
Quote from: Bulakbol on August 30, 2009, 12:15:17 AM
Enter the additional group ID's only. They will be displayed by the order of id. If you don't enter the id for orange, the orange will not be displayed.

Got it.  The tricky thing for me was figuring out the group's id number, until I realized they're displayed in the browser address bar.  Duh.  Okay that's all.  Everything works great now.  Thanks a bunch for this mod, and thanks for being so attentive to our questions.   :D
Title: Re: Stars and Badges
Post by: Bulakbol on August 30, 2009, 12:26:42 AM
@Lewis526
Cool. You're welcome.
Title: Re: Stars and Badges
Post by: Kevin Waggoner on September 01, 2009, 10:30:17 AM
*sighs*

ok, I installed your modification, and my package up-loader stated it was perfect, no errors what so ever.

here is the thing, When I activate the mod to supposedly allow me to have more than one badge appear, I get the primary badge and then the "*" for the secondary's. I have attached screen shots of what I mean as well as a screen shot of the badges.

forum.wolfcreationsinc.com <----- this is my forum (apparently I'm not allowed to post external hyperlinks O_o...so I just took off the hyper text protocol so you'll have to cupy and paste it into the browser bar)

I am not very good when it comes to codes, ESPECIALLY php, that's like..you might as well beat me over the head with a brick several times until I keel over

Hope you can help, I would love to be able to use this modification efficiently :)

Title: Re: Stars and Badges
Post by: Acans on September 02, 2009, 02:34:55 AM
Hi Kevin, you can't post external links till you get to a certain post count.

Have you gone into features and options and put in your order of displaying badges yet, eg

The default Administrator's group id is 1, and the default Global Moderator Id is 2, so in features and options you will see a space label with this

Arrange additional group id to be displayed.

Basically means the order the addional membergroups are displayed, so I would have mine as

1,2,10

so moderator is displayed second and my other custom group is displayed 3rd. For big forums with lots of membergroups like my old one it got it all way like this

1,2,10,15,18,21,14,16,19,13,12

Remember the numbers must be seperated by a , and to find the group id of group just go into the edit mode of it and in the browsers url it will  have its id. Hope that helps.



Now for Wade's problem, trying to install on a new forum, however I think another mod might have changed something with my load.php, can you take a look at it jonnyb
Title: Re: Stars and Badges
Post by: Kevin Waggoner on September 02, 2009, 02:47:04 AM
Quote from: α¢αηѕ on September 02, 2009, 02:34:55 AM
Hi Kevin, you can't post external links till you get to a certain post count.

Have you gone into features and options and put in your order of displaying badges yet, eg

The default Administrator's group id is 1, and the default Global Moderator Id is 2, so in features and options you will see a space label with this

Arrange additional group id to be displayed.

Basically means the order the addional membergroups are displayed, so I would have mine as

1,2,10

so moderator is displayed second and my other custom group is displayed 3rd. For big forums with lots of membergroups like my old one it got it all way like this

1,2,10,15,18,21,14,16,19,13,12

Remember the numbers must be seperated by a , and to find the group id of group just go into the edit mode of it and in the browsers url it will  have its id. Hope that helps.



Now for Wade's problem, trying to install on a new forum, however I think another mod might have changed something with my load.php, can you take a look at it jonnyb


I have already done all that before I posted =/
Title: Re: Stars and Badges
Post by: warlock2009 on September 04, 2009, 03:36:05 PM
where i can get Stars and Badges for smf v1.1.10
cause iam use Stars and Badges2.1 it's not working
Title: Re: Stars and Badges
Post by: Bladerider on September 11, 2009, 07:21:50 PM
Got a question for the php code wizzard...

This mod is set up and working fine....but I want to make a change.

I am showing this as my badges now...

(http://img9.imageshack.us/img9/318/allbadges.gif)

And I want to replace the first displayed badge with a new one that will span the whole first row.
This badge will be for a very limited number of members.

I would like to continue with the groups of three below it for all users that have it, and can live with the other users having just one small badge in their first row if they don't have the special one.

I have been playing with the code but just can't seem to get it work out right.

I would like for it to look like this if possible...

(http://img9.imageshack.us/img9/8732/allbadgesnew.gif)

I have attached my display.template.php.
I am using the alienation theme...

Thanks in advance for any help I receive....blade
Title: Re: Stars and Badges
Post by: yabanize on September 30, 2009, 12:08:50 AM
So basicly im using the theme Phobos by Bloc

So ive installed it and The badges show on the profile page but not on the posts page..

can anyone help me with installing manually on that theme?

Im going to try manually now and ill delete this if i succeed
Title: Re: Stars and Badges
Post by: Rhyme on September 30, 2009, 12:17:29 AM
Quote from: yabanize on September 30, 2009, 12:08:50 AM
So basicly im using the theme Phobos by Bloc

So ive installed it and The badges show on the profile page but not on the posts page..

can anyone help me with installing manually on that theme?

Im going to try manually now and ill delete this if i succeed

I was just looking at the coding, and it seems like it's the same replacement for each theme.  So asuming that's the case, just go to your theme, modify the theme, browse the templates and files for that theme, click on your display template.php then follow this:

Find:

', $message['member']['group_stars'], '<br />';

Replace with:

', $message['member']['group_stars'], '<br />';

      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], '<br />';
      }          
      elseif (!empty($message['member']['additional_groups']['id']))
         for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)   
            echo $message['member']['additional_groups']['stars'][$i], '<br />';


That's all that I can think of doing.
Title: Re: Stars and Badges
Post by: yabanize on September 30, 2009, 12:23:19 AM
Quote from: Rhyme on September 30, 2009, 12:17:29 AM
Quote from: yabanize on September 30, 2009, 12:08:50 AM
So basicly im using the theme Phobos by Bloc

So ive installed it and The badges show on the profile page but not on the posts page..

can anyone help me with installing manually on that theme?

Im going to try manually now and ill delete this if i succeed

I was just looking at the coding, and it seems like it's the same replacement for each theme.  So asuming that's the case, just go to your theme, modify the theme, browse the templates and files for that theme, click on your display template.php then follow this:

Find:

', $message['member']['group_stars'], '<br />';

Replace with:

', $message['member']['group_stars'], '<br />';

      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], '<br />';
      }          
      elseif (!empty($message['member']['additional_groups']['id']))
         for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)   
            echo $message['member']['additional_groups']['stars'][$i], '<br />';


That's all that I can think of doing.

WOW! thanks for such a quick reply! ill try that soon
Title: Re: Stars and Badges
Post by: yabanize on September 30, 2009, 01:01:45 AM
YEYAAHHH!!! it worked first try!! Great mod! and thanks Rhyme!
Title: Re: Stars and Badges
Post by: Rhyme on September 30, 2009, 01:42:49 AM
Quote from: yabanize on September 30, 2009, 01:01:45 AM
YEYAAHHH!!! it worked first try!! Great mod! and thanks Rhyme!

My pleasure.  Now if only there were simple fixes for my issues with other mods, lol.

Oh and WOOT my first time to actually help someone on this forum XD
Title: Re: Stars and Badges
Post by: king kratos on October 01, 2009, 12:16:16 AM
I have looked through this topic and still cannot seem to figure out how to make my badges and stars work.

I have multiple member groups set up (Admin, Glob Mod, Coach Leader, Leader, Parent, Student, Beta tester, RC tester, and 5 post count groups). I have set all the groups in "arrange additional.......display" (example 1, 2, 3, 10, etc).

My issue is with the post count groups. All of my other groups (non-post count) show each badge in the order they are listed. However, none of the post count groups (stars) are showing under the non-post count groups.

Any help would be great!

Kratos
Title: Re: Stars and Badges
Post by: yabanize on October 01, 2009, 05:27:03 PM
Quote from: king kratos on October 01, 2009, 12:16:16 AM
I have looked through this topic and still cannot seem to figure out how to make my badges and stars work.

I have multiple member groups set up (Admin, Glob Mod, Coach Leader, Leader, Parent, Student, Beta tester, RC tester, and 5 post count groups). I have set all the groups in "arrange additional.......display" (example 1, 2, 3, 10, etc).

My issue is with the post count groups. All of my other groups (non-post count) show each badge in the order they are listed. However, none of the post count groups (stars) are showing under the non-post count groups.

Any help would be great!

Kratos

What theme are you using?
Title: Re: Stars and Badges
Post by: king kratos on October 01, 2009, 05:34:21 PM
Default Theme

The following is a list of mods currently installed:

1. ZuperAdmin
2. More Spiders 1.2
3. Custom Form Mod 1.5
4. Hide Post Authors 1.2
5. Simple Award System 2.0.3
6. MessagePreviewOnHover 1.7
7. Stars And Badges 2.1
8. Moderator and Administrator Comment Tags 1.3 
9. Global Headers Footers 2.0
10. Ultimate Profile 0.9
11. Hide ip stuff for users 1.0
14. Order Stickied Topics 1.01
15. Topic Solved 1.1
16. PageDropdown 1.1
17. Redirect on Login and/or Logout mod 0.3
18. SimplePortal 2.3
19. Countdown_BBCode 1.0
20. PM to New Members 1.2
Title: Re: Stars and Badges
Post by: yabanize on October 01, 2009, 05:59:53 PM
Quote from: king kratos on October 01, 2009, 05:34:21 PM
Default Theme

The following is a list of mods currently installed:

1. ZuperAdmin
2. More Spiders 1.2
3. Custom Form Mod 1.5
4. Hide Post Authors 1.2
5. Simple Award System 2.0.3
6. MessagePreviewOnHover 1.7
7. Stars And Badges 2.1
8. Moderator and Administrator Comment Tags 1.3 
9. Global Headers Footers 2.0
10. Ultimate Profile 0.9
11. Hide ip stuff for users 1.0
14. Order Stickied Topics 1.01
15. Topic Solved 1.1
16. PageDropdown 1.1
17. Redirect on Login and/or Logout mod 0.3
18. SimplePortal 2.3
19. Countdown_BBCode 1.0
20. PM to New Members 1.2

Sorry i was looking at the wrong post.. Try reinstalling the mod
Title: Re: Stars and Badges
Post by: king kratos on October 01, 2009, 06:10:40 PM
I've uninstalled and reinstalled it twice now with no luck!
Title: Re: Stars and Badges
Post by: Rhyme on October 01, 2009, 09:17:01 PM
Quote from: king kratos on October 01, 2009, 06:10:40 PM
I've uninstalled and reinstalled it twice now with no luck!

What are the files you are having trouble with? Did any test fail?
Title: Re: Stars and Badges
Post by: king kratos on October 01, 2009, 09:25:56 PM
Quote from: Rhyme on October 01, 2009, 09:17:01 PM
Quote from: king kratos on October 01, 2009, 06:10:40 PM
I've uninstalled and reinstalled it twice now with no luck!

What are the files you are having trouble with? Did any test fail?

See this:

Quote from: king kratos on October 01, 2009, 12:16:16 AM
I have looked through this topic and still cannot seem to figure out how to make my badges and stars work.

I have multiple member groups set up (Admin, Glob Mod, Coach Leader, Leader, Parent, Student, Beta tester, RC tester, and 5 post count groups). I have set all the groups in "arrange additional.......display" (example 1, 2, 3, 10, etc).

My issue is with the post count groups. All of my other groups (non-post count) show each badge in the order they are listed. However, none of the post count groups (stars) are showing under the non-post count groups.

Any help would be great!

Kratos

No tests failed, and the mod works, but like i said in the quote above, it doesn't show the post count group stars under the main group badge.

Kratos
Title: Re: Stars and Badges
Post by: Garou on October 02, 2009, 06:25:32 AM
I haven't actually used this mod in a while now but I know at one point the mod didn't support post count based groups. JB talked about adding it but I don't know if he ever did.
Title: Re: Stars and Badges
Post by: Rhyme on October 02, 2009, 07:20:23 AM
Quote from: king kratos on October 01, 2009, 09:25:56 PM
Quote from: Rhyme on October 01, 2009, 09:17:01 PM
Quote from: king kratos on October 01, 2009, 06:10:40 PM
I've uninstalled and reinstalled it twice now with no luck!

What are the files you are having trouble with? Did any test fail?

See this:

Quote from: king kratos on October 01, 2009, 12:16:16 AM
I have looked through this topic and still cannot seem to figure out how to make my badges and stars work.

I have multiple member groups set up (Admin, Glob Mod, Coach Leader, Leader, Parent, Student, Beta tester, RC tester, and 5 post count groups). I have set all the groups in "arrange additional.......display" (example 1, 2, 3, 10, etc).

My issue is with the post count groups. All of my other groups (non-post count) show each badge in the order they are listed. However, none of the post count groups (stars) are showing under the non-post count groups.

Any help would be great!

Kratos

No tests failed, and the mod works, but like i said in the quote above, it doesn't show the post count group stars under the main group badge.

Kratos


Okay this is really odd.  I was just checking my packages, and I could have sworn I had this one as well.  Yet I don't.  However, I can still place my own images for ranks both group and post count ones.   After checking the mod itself, the only thing I can think of is this:

(http://img.photobucket.com/albums/v461/JirachiMelee/Forum%20Images/th_StarsBadgesoptions.jpg) (http://img.photobucket.com/albums/v461/JirachiMelee/Forum%20Images/StarsBadgesoptions.jpg)

You might just have to simply put in there the option of having the post count groups displayed.

I've got quite a few numbers in that option there. 
Title: Re: Stars and Badges
Post by: king kratos on October 02, 2009, 11:52:24 AM
I have every group listed (including the post count groups). I'll double check the group numbers, but I know I listed them.

Kratos
Title: Re: Stars and Badges
Post by: bros on October 14, 2009, 08:46:28 PM
Quote from: bros on February 21, 2009, 09:39:40 PM
Found these:
Quote from: bros on July 09, 2008, 09:13:45 PM
Quote from: JohnyB on July 09, 2008, 08:30:03 PM
Try this. Sources/Load.php, look for

pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group, mem.is_activated,


add after

IF(mem.ID_GROUP > 0, pg.stars, '') AS stars1,


look for

pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group,


and add below

IF(mem.ID_GROUP > 0, pg.stars, '') AS stars1,


look for

$profile['stars'] = empty($profile['stars']) ? array('', '') : explode('#', $profile['stars']);


and add below it

$profile['stars1'] = empty($profile['stars1']) ? array('', '') : explode('#', $profile['stars1']);


look for

'post_group_color' => $profile['post_group_color'],


and add below it.

'post_group_stars' =>  str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($profile['stars1'][1]) ? $settings['images_url'] . '/' . $profile['stars1'][1] : '') . '" alt="*" border="0" />', empty($profile['stars1'][0]) || empty($profile['stars1'][1]) ? 0 : $profile['stars1'][0]),


In the default/Display.template.php, find a place for the following lines.

if (isset($message['member']['post_group_stars']) && $message['member']['post_group_stars'] != '')
echo $message['member']['post_group_stars'], '<br />';





Is this for me, or for the other person who asked for assistance above?

Quote from: bros on July 09, 2008, 09:38:28 PM
Quote from: JohnyB on July 09, 2008, 09:20:29 PM
Try it too bros. That might be the one you wanted because this Stars and Badges mod will display additional membergroup stars. The snippet of code I posted will display post group stars for primary groups.

That will make it show in topics.

Since you gave me some code for it to work on my SMF 2.0 beta 3 forums, and it worked perfectly.

This is what you told me then:
Quote from: JohnyB on May 13, 2008, 09:53:59 PM
To add space between additional stars/badges, in Display.template.php
Code (find) Select

echo $message['member']['additional_groups']['stars'][$i], '<br />';


Code (replace) Select

echo '<div style="padding-top: 4px;"></div>', $message['member']['additional_groups']['stars'][$i], '<br />';


Replace the 4px with the number of pixels you want. Thanks for trying/using this mod.

I don't know if it would work on SMF 1.1.5 though.

Hmmm.... I think in the future, I should always install this mod first, because load.php always gets angry somehow :P

Also, tried this on Display.template.php on my 2.0 RC1 board:
echo '<li>','<div style="padding-top: 4px;"></div>', $message['member']['additional_groups']['stars'][$i], '</li>';
Unsurprisingly, it didn't make it display multiple badges :P

Could you give me instructions to make multiple badges appear in SMF 2 RC1.2?

Those don't work.

The first two or so don't match anything
Title: Re: Stars and Badges
Post by: wileyy23 on October 16, 2009, 05:54:53 AM
Does this mod only work with usergroups that would be called "Regular Member groups" on the smf admin control panel, or does it work with post based member groups as well? If it is supposed to work for post based member groups, it does not for me. Any ideas on how to fix/modify this mod so that it will display post based member group images?
Title: Re: Stars and Badges
Post by: TW1ST3D on October 17, 2009, 11:08:31 PM
Help!  getting error after clean install on 2.0 RC 1-2.

Getting this on the bottom of every post page after the first or second post

Quote
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 '1)' at line 3
File: /home/galxc3/public_html/forum/Sources/Load.php
Line: 1339


here is the code in question:

Quote
      $result_stars = $smcFunc['db_query']('', '
         SELECT id_group, group_name, stars, online_color
         FROM {db_prefix}membergroups
         WHERE id_group IN (' . $groups . ')
         ',
         array()
      );    <--------this is line 1339
         
      // additional groups
      while ($row_stars = $smcFunc['db_fetch_assoc']($result_stars))
      if (!empty($row_stars['stars']))
      {
         $memberContext[$user]['additional_groups']['id'][] = $row_stars['id_group'];
         $memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $smcFunc['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);
         $memberContext[$user]['additional_groups']['name'][] = $row_stars['group_name'];


any ideas on how to fix this?

TIA.
Title: Re: Stars and Badges
Post by: TW1ST3D on October 20, 2009, 04:49:12 PM
anybody?
Title: Re: Stars and Badges
Post by: TW1ST3D on November 02, 2009, 06:08:07 PM
still looking for a solution...........
Title: Re: Stars and Badges
Post by: SuperZambezi on November 05, 2009, 09:08:00 PM
Ive been looking around the topic and trying different solutions but no luck. I am trying to get both my membergroups (Regular membegroups and Post based membergroups) to shoe their images so something like this :

Any help would be great. :) Thanks.
Forum : SMF 2.0 RC1-1
Title: Re: Stars and Badges
Post by: wileyy23 on November 11, 2009, 02:49:07 PM
Quote from: SuperZambezi on November 05, 2009, 09:08:00 PM
Ive been looking around the topic and trying different solutions but no luck. I am trying to get both my membergroups (Regular membegroups and Post based membergroups) to shoe their images so something like this :

Any help would be great. :) Thanks.
Forum : SMF 2.0 RC1-1

Yeah, I've been looking for a solution to this too, but no one seems to want to help us out.
Title: Re: Stars and Badges
Post by: vaesir on November 12, 2009, 12:00:22 AM
Hi guys and girls,
Any chance this mod can be updated for 2.0 RC2?
Thank you
Title: Re: Stars and Badges
Post by: Mick. on November 12, 2009, 09:13:17 AM
Quote from: SGC_Romania on November 12, 2009, 12:00:22 AM
Hi guys and girls,
Any chance this mod can be updated for 2.0 RC2?
Thank you
X2
Title: Re: Stars and Badges
Post by: Garou on November 12, 2009, 11:27:56 AM
JB has 21 mods that may need to be updated for the new version. I'm sure that's going to take a bit of time but he'll get to it as soon as he can.
Title: Re: Stars and Badges
Post by: TW1ST3D on November 15, 2009, 04:29:56 PM
Still awaiting a reponse to my original problem
Title: Re: Stars and Badges
Post by: DTM-031 on November 18, 2009, 07:10:12 AM
I'm also having a few issues with RC2, is there a known incompatibility?
The mod is installing with no known issues, however the additional groups don't show up anywhere, posts, profiles, PMs, nothing. It does however modify the profile slightly, so it is working to an extent, but not fully.

Not 100% with coding so unsure if there's anything particular I need to change? I've tried doing an auto install, and also a full manual install, no change between either.

Any help would be awesome :)

EDIT: Am using a custom theme so have done the appropriate manual edits but it doesn't work even on the default theme!
Title: Re: Stars and Badges
Post by: Garou on November 18, 2009, 07:35:17 AM
From the Downloads page for the mod.

QuoteCompatible With:
    1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.10, 2.0 Beta 3 Public, 2.0 Beta 3.1 Public, 2.0 Beta 4, 2.0 RC1

Using with other versions of SMF probably wont work. Give the author some time to get it updated.
Title: Re: Stars and Badges
Post by: vaesir on November 18, 2009, 06:47:20 PM
Quote from: Garou on November 18, 2009, 07:35:17 AM
From the Downloads page for the mod.

QuoteCompatible With:
    1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.10, 2.0 Beta 3 Public, 2.0 Beta 3.1 Public, 2.0 Beta 4, 2.0 RC1

Using with other versions of SMF probably wont work. Give the author some time to get it updated.
I know but his/hers mod is one of the best out there. I personally need it very much.
We have like 40 groups..on our forums..:)
Title: Re: Stars and Badges
Post by: mysticmind on December 07, 2009, 11:47:09 PM
RC2 support or not?
anyone?
Title: Re: Stars and Badges
Post by: SgtMic on December 10, 2009, 03:13:00 PM
Quote from: BlueDevil on November 12, 2009, 09:13:17 AM
Quote from: SGC_Romania on November 12, 2009, 12:00:22 AM
Hi guys and girls,
Any chance this mod can be updated for 2.0 RC2?
Thank you
X2

+3
Title: Re: Stars and Badges
Post by: jkrlvgn on December 14, 2009, 02:55:27 AM
Quote from: SgtMic on December 10, 2009, 03:13:00 PM
Quote from: BlueDevil on November 12, 2009, 09:13:17 AM
Quote from: SGC_Romania on November 12, 2009, 12:00:22 AM
Hi guys and girls,
Any chance this mod can be updated for 2.0 RC2?
Thank you
X2

+3

And another request.  I got it to install, but SOMETHING wasn't right, because they weren't showing.
Title: Re: Stars and Badges
Post by: Justyne on December 14, 2009, 06:29:20 PM
Quote from: jkrlvgn on December 14, 2009, 02:55:27 AM
Quote from: SgtMic on December 10, 2009, 03:13:00 PM
Quote from: BlueDevil on November 12, 2009, 09:13:17 AM
Quote from: SGC_Romania on November 12, 2009, 12:00:22 AM
Hi guys and girls,
Any chance this mod can be updated for 2.0 RC2?
Thank you
X2

+3

And another request.  I got it to install, but SOMETHING wasn't right, because they weren't showing.

+ 5

I had a play with it thinking I could update this for RC 2 myself, but it's just messy. Rather than displaying the membergroups selected in the options it's just showing all of them and I have no idea how to fix it.  I'm horribly PHP daft.

If anyone wants to look at my code or fix it, do poke me on PM.
Title: Re: Stars and Badges
Post by: mysticmind on December 14, 2009, 11:13:36 PM
Quote from: Justyne on December 14, 2009, 06:29:20 PM
Quote from: jkrlvgn on December 14, 2009, 02:55:27 AM
Quote from: SgtMic on December 10, 2009, 03:13:00 PM
Quote from: BlueDevil on November 12, 2009, 09:13:17 AM
Quote from: SGC_Romania on November 12, 2009, 12:00:22 AM
Hi guys and girls,
Any chance this mod can be updated for 2.0 RC2?
Thank you
X2

+3

And another request.  I got it to install, but SOMETHING wasn't right, because they weren't showing.

+ 5

I had a play with it thinking I could update this for RC 2 myself, but it's just messy. Rather than displaying the membergroups selected in the options it's just showing all of them and I have no idea how to fix it.  I'm horribly PHP daft.

If anyone wants to look at my code or fix it, do poke me on PM.

+ 6

waiting for the update. :)

i tried by myself, then my page screwed up.  :D

// i wonder, why this option not as built-in  in SMF itself.
Title: Re: Stars and Badges
Post by: Justyne on December 15, 2009, 03:01:41 AM
I think I managed it. Use at your own risk.
Title: Re: Stars and Badges
Post by: jkrlvgn on December 15, 2009, 06:21:55 PM
Justyne - worked great, even in my custom theme!  Very awesome!
Title: Re: Stars and Badges
Post by: mysticmind on December 16, 2009, 10:10:33 PM
Thanks  Justyne  !

It's working fine. :)
Title: Re: Stars and Badges
Post by: Moif on December 17, 2009, 04:43:00 AM
Good work. However my stars are appearing vertically, on top of each other. Is there a way to have them appear horizontally, one after another?
Title: Re: Stars and Badges
Post by: perplexed on December 17, 2009, 06:43:11 AM
Quote from: Moif on December 17, 2009, 04:43:00 AM
Good work. However my stars are appearing vertically, on top of each other. Is there a way to have them appear horizontally, one after another?

it probably depends on the size of your images or are you using the actual stars from the default?  If so there is probably a "<br>" somewhere that needs to be removed.  I haven't looked at this for a while but I remember it being an issue previously
Title: Re: Stars and Badges
Post by: Mick. on December 17, 2009, 05:20:07 PM
Quote from: Justyne on December 15, 2009, 03:01:41 AM
I think I managed it. Use at your own risk.

Thank you.  It works well.
Title: Re: Stars and Badges
Post by: SgtMic on December 17, 2009, 08:12:10 PM
Great job on this mod revamp. Is there a way to modify which membergroups are shown? I specified only 2 in admin/features and options/general to be shown but it's showing all of them as awards.
Title: Re: Stars and Badges
Post by: jkrlvgn on December 17, 2009, 09:44:31 PM
Quote from: Moif on December 17, 2009, 04:43:00 AM
Good work. However my stars are appearing vertically, on top of each other. Is there a way to have them appear horizontally, one after another?

This is a template issue, but yeah, you can fix it fairly easily.  The stars are set up in list tags, so...you can remove that, and all should be well...

If you've got your display.template, it shouldn't be too hard to figure out.  Lemme know what theme you're using, if you need help.

Quote from: SgtMic on December 17, 2009, 08:12:10 PM
Great job on this mod revamp. Is there a way to modify which membergroups are shown? I specified only 2 in admin/features and options/general to be shown but it's showing all of them as awards.

There is, but I think that would entail more work with modifying the other code.  What you can do, though, is put in "0" stars for the ones you don't want to show in your membergroups.  Not sure if that would work for you....but it's what I've done to get around it...
Title: Re: Stars and Badges
Post by: SgtMic on December 17, 2009, 11:27:14 PM
Get back to work and fix this. LOL j/k

I'd have to rearrange how the members are assigned to membergroups. On a temp basis it would work.
Title: Re: Stars and Badges
Post by: Justyne on December 19, 2009, 08:16:40 PM
Quote from: SgtMic on December 17, 2009, 08:12:10 PM
Great job on this mod revamp. Is there a way to modify which membergroups are shown? I specified only 2 in admin/features and options/general to be shown but it's showing all of them as awards.

It'll show you all when you are an administrator. If you'd like only certain things to be shows to admins as well you'll just need to edit your templates a little. If you need a hand shoot me a PM.
Title: Re: Stars and Badges
Post by: spiros on December 20, 2009, 07:45:04 AM
Does it work for RC2?
Title: Re: Stars and Badges
Post by: SgtMic on December 20, 2009, 11:37:30 PM
Quote from: Justyne on December 19, 2009, 08:16:40 PM
Quote from: SgtMic on December 17, 2009, 08:12:10 PM
Great job on this mod revamp. Is there a way to modify which membergroups are shown? I specified only 2 in admin/features and options/general to be shown but it's showing all of them as awards.

I'll keep you in mind when I get back to tinkering with it. :)

It'll show you all when you are an administrator. If you'd like only certain things to be shows to admins as well you'll just need to edit your templates a little. If you need a hand shoot me a PM.
Title: Re: Stars and Badges
Post by: vaesir on December 21, 2009, 05:41:24 PM
On my board dosent work.
I have almost 60 groups and if i let blank dosen't show any of them
Title: Re: Stars and Badges
Post by: gasman on January 03, 2010, 07:37:10 AM
Quote from: mysticmind on December 14, 2009, 11:13:36 PM
Quote from: Justyne on December 14, 2009, 06:29:20 PM
Quote from: jkrlvgn on December 14, 2009, 02:55:27 AM
Quote from: SgtMic on December 10, 2009, 03:13:00 PM
Quote from: BlueDevil on November 12, 2009, 09:13:17 AM
Quote from: SGC_Romania on November 12, 2009, 12:00:22 AM
Hi guys and girls,
Any chance this mod can be updated for 2.0 RC2?
Thank you
X2

+3

And another request.  I got it to install, but SOMETHING wasn't right, because they weren't showing.

+ 5

I had a play with it thinking I could update this for RC 2 myself, but it's just messy. Rather than displaying the membergroups selected in the options it's just showing all of them and I have no idea how to fix it.  I'm horribly PHP daft.

If anyone wants to look at my code or fix it, do poke me on PM.




+ 6

waiting for the update. :)

i tried by myself, then my page screwed up.  :D

// i wonder, why this option not as built-in  in SMF itself.


x7

Please

cheers
Title: Re: Stars and Badges
Post by: 1717alan on January 08, 2010, 11:53:56 AM
This mod seems to work everywhere except in posts.Can anyone help please.
SMF 1.1.11
Theme  Helios_Multi (1.1) as default.
Title: Re: Stars and Badges
Post by: exteeyou on January 11, 2010, 06:37:23 PM
Quote from: Moif on December 17, 2009, 04:43:00 AM
Good work. However my stars are appearing vertically, on top of each other. Is there a way to have them appear horizontally, one after another?

I have a similar issue as seen here:
http://www.maineairsoft.com/forum/index.php/topic,3537.msg29750.html#msg29750

Each image is only set to 1 for that member group rank, but I only have two different ranks listed right now. I am not sure why this is happening or how to fix it, help would be appreciated.
Title: Re: Stars and Badges
Post by: Kimmen on January 11, 2010, 07:11:37 PM
Can someone tell me if it is possible that it views postcount group and special group? As it is now, it displays only special groups. I want to have Admin and my postcount group to be displayed. I kinda misunderstood this mod  :(
Title: Re: Stars and Badges
Post by: bros on January 19, 2010, 11:38:57 PM
How can I make multiple badges appear in SMF 2 RC 1.2?
Title: Re: Stars and Badges
Post by: zzzronzzz on February 26, 2010, 05:01:11 AM
i want the badges to show only in Profile and not inside the topics or posts . What files should i edit and remove lines?
Title: Re: Stars and Badges
Post by: bwyard on February 27, 2010, 06:06:43 PM
how do i make this work.
Title: Re: Stars and Badges
Post by: bwyard on February 27, 2010, 07:27:49 PM
i did the donator badge but it stsill not working
Title: Re: Stars and Badges
Post by: IdanC on March 18, 2010, 08:22:45 PM
just to let everyone know - with a few changes left to be done manually after installation, this mod is compatible with rc3
Title: Re: Stars and Badges
Post by: Keeper on March 22, 2010, 04:01:05 AM
Can someone please update this mod for RC3? And maybe add option to display badges either horizontally or vertically.
Title: Re: Stars and Badges
Post by: Mists on March 23, 2010, 03:02:35 PM
Quote from: IdanC on March 18, 2010, 08:22:45 PM
just to let everyone know - with a few changes left to be done manually after installation, this mod is compatible with rc3

What exactly has to be done after for RC3?
Title: Re: Stars and Badges
Post by: IdanC on March 23, 2010, 03:15:00 PM
nothing special, just follow the installing instructions for any code change that the normal package installer fails to perform...
Title: Re: Stars and Badges
Post by: Bruno36 on March 25, 2010, 11:46:00 AM
the code is not found
Title: Re: Stars and Badges
Post by: perplexed on March 25, 2010, 11:49:02 AM
Quote from: Bruno36 on March 25, 2010, 11:46:00 AM
the code is not found

which code is not found?
Title: Re: Stars and Badges
Post by: Bruno36 on March 25, 2010, 12:40:53 PM
/Sources/Load.php

Find:

return true;
}

// Load a theme, by ID


Replace With:
   $context['badges']['ownline'] = !empty($modSettings['badge_ownline']) ? explode(',', $modSettings['badge_ownline'], 20) : '';
 
$groups = $profile['additional_groups'];
// Load additional membergroups
if (!empty($groups))
{
$result_stars = $smcFunc['db_query']('', '
SELECT id_group, group_name, stars, online_color
FROM {db_prefix}membergroups
WHERE id_group IN (' . $groups . ')
',
array()
);

// additional groups
while ($row_stars = $smcFunc['db_fetch_assoc']($result_stars))
if (!empty($row_stars['stars']))
{
$memberContext[$user]['additional_groups']['id'][] = $row_stars['id_group'];
$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $smcFunc['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);
$memberContext[$user]['additional_groups']['name'][] = $row_stars['group_name'];
$memberContext[$user]['additional_groups']['ag_color'][] = $row_stars['online_color'];
}
$smcFunc['db_free_result']($result_stars);
}

return true;
}

// Load a theme, by ID.



/Sources/ManageSettings.php
Find:

// Stats, compression, cookies.... server type stuff.

Add Before:

// Stars and badges
array('text', 'badge_ownline'),
'',

Title: Re: Stars and Badges
Post by: ZarPrime on April 07, 2010, 11:09:50 AM

On my SMF 1.1.x site, I have been using the following Mod for quite awhile ...
vMulticolor-Stars Mod by Valodim (http://custom.simplemachines.org/mods/index.php?mod=191)


I am sort of looking for a replacement for that Mod that will work with SMF 2.0 RC3, as I am getting ready to upgrade soon.


It allows me to do what is shown in the attached image.  In that image, Speaker's primary Group is Kirduin, and he is also in 3 secondary groups (Counsilor, Sovereign, and FAQMaster).  Each of those membergroups has it's own badge.  The Stars below the 4 badges are, of course, from his post group only.


So, the question is,  can I do the same thing with this Mod?  If so, this is good news as this has been one of the things that has kept me from upgrading to RC3.  The bad news seems to be that the author of this Mod has not been on since November 27, 2009 and, for that reason, this Mod seems to be dead in the water at this point, at least WRT an upgrade for SMF 2.0 RC3 (curve) being available.


Does anyone have any news on this?


ZarPrime
Title: Re: Stars and Badges
Post by: dekay on April 07, 2010, 11:49:22 AM
QuoteSo, the question is,  can I do the same thing with this Mod?
Yes, I think so.

QuoteDoes anyone have any news on this?
Browse a few pages backwards in this thread. You'll find a 'patched' version for RC2. I applied it to my RC3 a few days ago with some manual edits that the Package Manager was not able to make.


Title: Re: Stars and Badges
Post by: ZarPrime on April 07, 2010, 11:54:21 AM
dekay,


OK, thanks.  I'll look back through the topic.


ZP
Title: Re: Stars and Badges
Post by: IdanC on April 08, 2010, 07:10:25 PM
Quote from: IdanC on March 18, 2010, 08:22:45 PM
just to let everyone know - with a few changes left to be done manually after installation, this mod is compatible with rc3

a few notes for installing on RC3 -

in load.php, this change will fail -

return true;
}

// Load a theme, by ID.


instead, find

return true;
}

function detectBrowser()


and replace with

$context['badges']['ownline'] = !empty($modSettings['badge_ownline']) ? explode(',', $modSettings['badge_ownline'], 20) : '';
 
$groups = $profile['additional_groups'];
// Load additional membergroups
if (!empty($groups))
{
$result_stars = $smcFunc['db_query']('', '
SELECT id_group, group_name, stars, online_color
FROM {db_prefix}membergroups
WHERE id_group IN (' . $groups . ')
',
array()
);

// additional groups
while ($row_stars = $smcFunc['db_fetch_assoc']($result_stars))
if (!empty($row_stars['stars']))
{
$memberContext[$user]['additional_groups']['id'][] = $row_stars['id_group'];
$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $smcFunc['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);
$memberContext[$user]['additional_groups']['name'][] = $row_stars['group_name'];
$memberContext[$user]['additional_groups']['ag_color'][] = $row_stars['online_color'];
}
$smcFunc['db_free_result']($result_stars);
}

return true;
}

function detectBrowser()



also, in ManageSettings.php there is a failed search for

// Stats, compression, cookies.... server type stuff.

instead, search for

// Statistics.

last one - in display.template, instead of

search for
<li class="stars">', $message['member']['group_stars'], '</li>';
notice the class="stars"

Title: Re: Stars and Badges
Post by: luismanson on April 09, 2010, 09:10:41 PM
maybe a new package can be uploaded here
Title: Re: Stars and Badges
Post by: dav on April 13, 2010, 05:20:02 PM
Alright..

Everything is working when I manually installed the mod on SMF 1.1.11.

However, there's one addition I would like to see.

Before I installed this mod, I was able to have the Color in online list (Admin -> Members -> Membergroups -> Modify) show..
I still have the color there but the color doesn't show up anymore..

Is there anyway I can fix this?

Thanks!
-dav
Title: Re: Stars and Badges
Post by: dav on April 15, 2010, 04:05:42 PM
Quote from: dav on April 13, 2010, 05:20:02 PM
Alright..

Everything is working when I manually installed the mod on SMF 1.1.11.

However, there's one addition I would like to see.

Before I installed this mod, I was able to have the Color in online list (Admin -> Members -> Membergroups -> Modify) show..
I still have the color there but the color doesn't show up anymore..

Is there anyway I can fix this?

Thanks!
-dav

Anyone have any idea?
Title: Re: Stars and Badges
Post by: mysticmind on April 18, 2010, 10:49:42 PM
anyone installed this (with manual edit above) on SMF2 RC3?
is it all OK without any error logged?
i wonder why smf rc3 not include a ready built function like this since the author of this mods is MIA. :(
Title: Re: Stars and Badges
Post by: C4G-TK on May 16, 2010, 11:58:58 PM
Well, after installing 48 other mods, I installed this by EMULATING the package that was attached in reply #721.  I only had one failed test which was the ManageSettings.php edit, so I manually edited that file.  It is working.  Good luck.
Title: Re: Stars and Badges
Post by: X3neizes on May 26, 2010, 09:55:50 PM
I attached a modified version tested and running in SMF 2.0 RC3  ;)
Title: Re: Stars and Badges
Post by: luismanson on May 28, 2010, 08:32:51 AM
thanks @X3neizes

Are you from Argentina?
Title: Re: Stars and Badges
Post by: X3neizes on May 30, 2010, 09:21:27 PM
Quote from: luismanson on May 28, 2010, 08:32:51 AM
thanks @X3neizes

Are you from Argentina?

Si amigo! tu tambien?  :)
Title: Re: Stars and Badges
Post by: chinaren on June 27, 2010, 04:45:36 AM
Quote from: X3neizes on May 26, 2010, 09:55:50 PM
I attached a modified version tested and running in SMF 2.0 RC3  ;)

Awesome job!  Great stuff, many thanks!
Title: Re: Stars and Badges
Post by: tRu3_sKiTz0 on July 08, 2010, 09:03:53 AM
Hey all! First off, thanks for this mod, this is a feature that I have been wanting on my forum because we have three different companies that are using the forum and I wanted to be able to identify who is with what company. Now my problem is that if I am using more than one member group, I end up with doubled images for the extra groups. So as an admin I have the five red stars but when I add a member group I end up with the five red stars and a double image of the second group. If I add a third it show this:

I just want to get rid of the double images so it only shows each badge once. Let me know what files you need me to upload. Thanks in advance.

FYI: I'm using 2.0 RC3 with my own variation of the default curve theme.
Title: Re: Stars and Badges
Post by: bobbart on July 18, 2010, 01:03:51 PM
Thank for the MOD, and thanks to the Editor for RC3.

I have made the display of stars into names.  I also moved it to be just under the Primary Group and still not for guest view.
I would now like to know if I can get the group colors to reflect in the post view.  Admin is RED and others have there own colors.
Title: Re: Stars and Badges
Post by: tRu3_sKiTz0 on July 19, 2010, 09:02:11 AM
And I'm still having trouble with duplicate badges. Please help.^^^^^
Title: Re: Stars and Badges
Post by: C4G-TK on July 19, 2010, 02:01:52 PM
Quote from: tRu3_sKiTz0 on July 19, 2010, 09:02:11 AM
And I'm still having trouble with duplicate badges. Please help.^^^^^

Did you by chance install the mod twice?  Check your template edits to make sure that they were only done one time and not duplicated.
Title: Re: Stars and Badges
Post by: tRu3_sKiTz0 on July 20, 2010, 03:31:11 PM
Okay here is what I found in load.php:

Quote from: Load.php

'group_stars' => str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($profile['stars'][1]) ? $settings['images_url'] . '/' . $profile['stars'][1] : '') . '" alt="*" border="0" />', empty($profile['stars'][0]) || empty($profile['stars'][1]) ? 0 : $profile['stars'][0]),

Does this have anything to do with the dupe badges? So far I haven't found any stings that were doubled.
Title: Re: Stars and Badges
Post by: bobbart on July 21, 2010, 10:39:19 AM
So does anyone know how I can get the group names to show up in there selected colors?  I have the names showing but would like them to be color coded.
Title: Re: Stars and Badges
Post by: RuneCrafter on August 03, 2010, 08:28:39 PM
Ok i got the edit for 2.0 rc3 (thanks btw) but when i add new membergroups it
Title: Re: Stars and Badges
Post by: RuneCrafter on August 04, 2010, 03:44:52 PM
Please help :D
Title: Re: Stars and Badges
Post by: dekay on August 04, 2010, 11:12:22 PM
Quote from: RuneCrafter on August 04, 2010, 03:44:52 PM
Please help :D

I'm not sure if I understood what your problem is, please give more information.
Title: Re: Stars and Badges
Post by: syphergaming on August 09, 2010, 01:48:32 PM
im getting a error when i click on my members list
here is error:
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 '1)' at line 3
File: /forums/Sources/Load.php
Line: 1281
Title: Re: Stars and Badges
Post by: richie80 on August 23, 2010, 11:38:21 PM
I installed the mod on my server and did not have any issues.  I put in what membergroups I wanted to show, but no images show.  I am running SMF 2.0 RC3.  Can anyone help?
Title: Re: Stars and Badges
Post by: dekay on August 24, 2010, 04:18:29 AM
You made the configuration in "Features & Options" (don't know how it's called in english, thats the german title).

The is a line "Arrange additional group id to be displayed."
Title: Re: Stars and Badges
Post by: richie80 on August 24, 2010, 11:46:52 AM
Did that.  I added the groups I wanted.  Still nothing showing
Title: Re: Stars and Badges
Post by: TheListener on August 24, 2010, 11:52:16 AM
Quote from: richie80 on August 24, 2010, 11:46:52 AM
Did that.  I added the groups I wanted.  Still nothing showing

Are you using the default theme?

If not make sure the images are also in the images folder of the theme you use.
Title: Re: Stars and Badges
Post by: richie80 on August 24, 2010, 01:01:56 PM
I am using a custom theme.  Which folder should the images be in?  Right now they are in the public_html / ranks
Title: Re: Stars and Badges
Post by: TheListener on August 24, 2010, 01:08:48 PM
Have a look at the default theme folder and see which one the images are in.
Title: Re: Stars and Badges
Post by: richie80 on August 24, 2010, 01:11:30 PM
I added the images to the folder and still nothing shows up.
Title: Re: Stars and Badges
Post by: Lord991 on August 26, 2010, 10:25:51 AM
I have one problem, i need to set up a <div class="frankie"></div> because of look in styles.css 
but i cant i get an error.

I open Display.template.php
and i find the code:

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], '<br />';
}
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo $message['member']['additional_groups']['stars'][$i], '<br />';




Can some one fix this problem for me pls. I just need to put that div class somehow.

If anyone help me he deserved to be called a GENUIS.  :-[ ;)

btw I am using 1.1.11, Mystic Jade theme
Title: Re: Stars and Badges
Post by: Melissa524 on September 01, 2010, 06:21:05 PM
Okay, I am having a issue of the admins being able to see the second group but the other members can not.  Did I miss a permission some where?
Title: Re: Stars and Badges
Post by: zaks_bg on September 15, 2010, 12:00:48 PM
Thanks a lot for this mod.

When I have multiply groups the icons are displaying properly, although the texts /the group names/ disappear. Is it possible not only to display the icons /the images/ but also the Group titles one after another or with comas like:
Admin, Great Guy, Cool Member, etc...
->
and then down
->
the icones 1
the icones 2
the icones 3 ...

edit:
Actually - new problem happened. When the title is "post count" based - then the title is displayed without the icons, if the title is not post based then just the icons appear.
Title: Re: Stars and Badges
Post by: elkingrey on September 18, 2010, 06:48:37 PM
Hi there,

I just installed the mod and am not sure what to do next. There are two things I would like to do, one of them I don't know if this mod supports.

The first is, where do we get the badge images from? I know there are all different colors and we can change the words on them, but I don't know how to do that or get it set up.

Secondly, is it possible to have to special groups(admin, mods etc.) have their number of stars directly correlate to their post count group? Right now the number of stars each special group has is arbitrary. It would be nice to have the two different types of groups combined into one. Thanks!
Title: Re: Stars and Badges
Post by: Maree on October 14, 2010, 05:10:22 AM
Thank-you for this mod, it's great  :D
Title: Re: Stars and Badges
Post by: azhriel on October 22, 2010, 01:39:32 AM
Hi there, i install the 2rc3 version. but the problem is the two badges is separated by the thank you lines.

See the pic
(http://photo.sikatpinoy.com/images/profile.jpg)

what do i need to edit so that the badges is comes after one another..

Title: Re: Stars and Badges
Post by: syphergaming on October 25, 2010, 08:48:21 AM
Quote from: syphergaming on August 09, 2010, 01:48:32 PM
im getting a error when i click on my members list
here is error:
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 '1)' at line 3
File: /forums/Sources/Load.php
Line: 1281

any one know why i am getting this error?
Title: Re: Stars and Badges
Post by: Melissa524 on November 05, 2010, 12:44:02 PM
Are we going to get an updated version of the most for the new RC4?
Title: Re: Stars and Badges
Post by: MalikCarr on November 11, 2010, 05:34:04 AM
I must've fumbled something along the lines or missed some obvious permissions box that needs to be checked.

X3neizes' RC3 version worked perfectly on the BlackRain theme, but for some reason the additional badges are only shown to moderators and admins - not even the regular members that have been placed in the groups to receive extra badges get to see them. Further, only the admin and moderator badges can be seen by those members, even if the admin or moderator has more badges than just that. It's maddening.

I took a screen snippet here of what a member's profile looks like from my view (as an admin) - the user himself sees his postcount-based group, but both the text and badges for his two other groups aren't shown to him at all. What am I not doing correctly?
(http://i12.photobucket.com/albums/a229/MalikCarr/f0b350fa.png)
Title: Re: Stars and Badges
Post by: Melissa524 on November 30, 2010, 06:08:32 PM
I had this problem too but I don't remember how I fixed it, so any help would be useful because I need to fix it again when I upgrade to 4.0
Title: Re: Stars and Badges
Post by: MalikCarr on November 30, 2010, 10:52:37 PM
Don't worry about it - I actually figured out how to fix it, and it was pure user error (on my part).

I was under the mistaken impression that the group numbers were sequential, rather than just random - so when I input 1,2,3,4,5, etc into the list of groups to show, it showed my Administrator and Moderator badges (1 and 2) but no others, since those were various 18,12,14,9 and 16. Har.
Title: Re: Stars and Badges
Post by: syphergaming on December 01, 2010, 07:26:59 AM
Quote from: syphergaming on August 09, 2010, 01:48:32 PM
im getting a error when i click on my members list
here is error:
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 '1)' at line 3
File: /forums/Sources/Load.php
Line: 1281

any one worked out this error yet??
Title: Re: Stars and Badges
Post by: i777Ares on December 16, 2010, 08:16:09 PM
Need Stars and Badges for smf 2.0b4
HELP!!!!!!!!
Title: Re: Stars and Badges
Post by: syphergaming on December 17, 2010, 10:19:43 PM
dont think any one updates this any more...
Title: Re: Stars and Badges
Post by: Joker™ on December 18, 2010, 08:15:33 AM
Quote from: i777Ares on December 16, 2010, 08:16:09 PM
Need Stars and Badges for smf 2.0b4
HELP!!!!!!!!
http://www.simplemachines.org/community/index.php?topic=225743.msg2644620#msg2644620 << it worked fine on RC4
Title: Re: Stars and Badges
Post by: i777Ares on December 18, 2010, 03:08:21 PM
thank you for the 2.0rc3 mod worls fine on 2.0 rc4
Title: Re: Stars and Badges
Post by: syphergaming on December 19, 2010, 07:43:12 AM
i dont like this mod i fixed my last error now im getting double images...

and i would not recommend installing
Title: Re: Stars and Badges
Post by: bigbusey on January 15, 2011, 01:07:40 AM
Does this mod display Regular groups and Post count groups at the same time?

Is there any mod that does that for 2.0 RC4?

thanks in advance.
Title: Re: Stars and Badges
Post by: i777Ares on January 15, 2011, 09:17:59 PM
i have this mod installed and wanted to know if anyone here knows how i can call the function to display the secondary groups of a member in a user info block

my code so far is

global $context, $txt, $scripturl, $settings, $memberContext, $modSettings, $member_id, $sc;
   global $color_profile;

   if($context['user']['is_logged']) {
      $member_id = $context['user']['id'];
      loadMemberData($member_id);
      loadMemberContext($member_id);

      //If you install the Membercolor Link the colors will be autmaticly set.
      if(empty($modSettings['MemberColorLinkInstalled']) && sp_loadColors($member_id) !== false)
         $memberContext[$member_id]['colored_name'] = $color_profile[$member_id]['colored_name'];

      $memberContext[$member_id]['karma']['total'] = $memberContext[$member_id]['karma']['good'] - $memberContext[$member_id]['karma']['bad'];
   }
         echo '<div align="center">';

         if ($context['user']['is_guest'])
            echo '<form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '">
         <table border="0" cellspacing="1" cellpadding="0" class="ssi_table">
            <tr>
               <td align="right"><label for="user">', $txt[35], ':</label> </td>
               <td><input type="text" id="user" name="user" size="9" value="', !empty($user_info['username']) ? $user_info['username'] : '', '" /></td>
            </tr><tr>
               <td align="right"><label for="passwrd">', $txt[36], ':</label> </td>
               <td><input type="password" name="passwrd" id="passwrd" size="9" /></td>
            </tr><tr>
               <td><input type="hidden" name="cookielength" value="-1" /></td>
               <td><input type="submit" value="', $txt[34], '" /></td>
            </tr>
         </table>
      </form>', $txt['welcome_guest'];

         else
         {
            echo $txt['hello_member'], ' <b>', (!empty($memberContext[$member_id]['colored_name']) ? $memberContext[$member_id]['colored_name'] : $context['user']['name']), '</b><br /><br />';

            if (!empty($context['user']['avatar']))
               echo $context['user']['avatar']['image'], '<br />';

   if ($context['user']['is_logged'])
   {
      echo '
                        <span style="font-size: 75%;"> <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
                 <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br /></span><br>';

   }
               if (!empty($memberContext[$member_id]['group']))
                  echo $memberContext[$member_id]['colored_id']['group'];
             
                 

               echo '<br />', $memberContext[$member_id]['group_stars'], '<br /><br /></div>
               
<img src="http://icthus-777.com/Themes/Call_of_Duty_RC3/images/sp/dot3.png"> ', $txt[21], 'Post Group:  ',$memberContext[$member_id]['post_group'],'<br />';

               if(!empty($modSettings['karmaMode']))
                  echo '
                  <img src="http://icthus-777.com/Themes/Call_of_Duty_RC3/images/sp/dot3.png"> ', $txt['sp-userkarma'], ': ';
                 
               if($modSettings['karmaMode'] == '1')
                  echo $memberContext[$member_id]['karma']['total'],'<br />';
               elseif($modSettings['karmaMode'] == '2')
                  echo '+', $memberContext[$member_id]['karma']['good'],'/-', $memberContext[$member_id]['karma']['bad'], '<br />';

         }

         if(allowedTo('pm_read'))
         echo '
        <img src="http://icthus-777.com/Themes/Call_of_Duty_RC3/images/sp/dot3.png"> ', $txt['sp-usertmessage'], ': <a href="' . $scripturl . '?action=pm">' . $context['user']['messages'], '</a><br />
        <img src="http://icthus-777.com/Themes/Call_of_Duty_RC3/images/sp/dot3.png"> ', $txt['sp-usernmessage'], ': ' . $context['user']['unread_messages'], '<br /><br />';

      if (!empty($context['user']['total_time_logged_in']))

      {

   echo '

   <span style="font-size: 75%;">            ', $txt['totalTimeLogged1'];
echo'
         <br>';
// If days is just zero, don't bother to show it.
                            if ($context['user']['total_time_logged_in']['days'] > 0)

   echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];


// Same with hours - only show it if it's above zero.

         if ($context['user']['total_time_logged_in']['hours'] > 0)

            echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];



         // But, let's always show minutes - Time wasted here: 0 minutes ;).

         echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br /></span>';

      }   
         // Now, onto our second set of info, are they logged in again?
   if ($context['user']['is_logged'])
   {
      // Is the forum in maintenance mode?
      if ($context['in_maintenance'] && $context['user']['is_admin'])
         echo '
                        <b>', $txt[616], '</b><br />';

   }
Title: Re: Stars and Badges
Post by: Dreadfear on March 19, 2011, 12:07:25 PM
Well its not working on RC5 :( Is it possible to fix? Will this get updates any soon?

(http://img715.imageshack.us/img715/7982/badgesy.png)
Title: Re: Stars and Badges
Post by: Arantor on March 19, 2011, 12:17:25 PM
Did you try the version linked a few posts up?
Title: Re: Stars and Badges
Post by: Dreadfear on March 19, 2011, 12:29:15 PM
Quote from: Arantor on March 19, 2011, 12:17:25 PM
Did you try the version linked a few posts up?

Okey you are the most annoying person on this forum ! Are you monitoring this forum 24/7? You are answering to all my messages in a 1-3 mins. How is that even possible?

Thank you ! Yes it did work.
Title: Re: Stars and Badges
Post by: Arantor on March 19, 2011, 12:30:00 PM
Because I keep up with the unread posts list.

You've tried a version which doesn't work... but didn't say which version it was...

(And while I might be the most annoying, I do at least usually know what I'm talking about, which for some is sort of my redeeming feature)
Title: Re: Stars and Badges
Post by: Garou on March 19, 2011, 04:26:49 PM
LOL I was just Telling Arantor the other day that there was a time I thought he had to be a machine. It is not humanly possible for someone to provide the amount of support and code that he does to this project. Then you add the fact that he does have a life outside of the SMF forums.

They are going to cut out his brain and use it for the CPU when they build Skynet (http://en.wikipedia.org/wiki/Skynet_(Terminator)).  ;D
Title: Re: Stars and Badges
Post by: Alex4108 on March 28, 2011, 01:40:51 AM
Attached on page 38 doesn't work.  Multiple errors on test, including Load.php

Any luck on finding a mod that will work properly on RC5?
Title: Re: Stars and Badges
Post by: Garou on March 28, 2011, 11:20:09 AM
I'm using it on RC5 with no problems and I dont remember tweaking it but I may have. I always do my tweaking the packages before uploading to to the sites I work on for cleaner install and uninstall if needed.

Here's the install-2.xml in the version I have.
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>JB:SAB</id>
<version>2.1</version>

<!-- Sources/Load.php -->
<file name="$sourcedir/Load.php">
<operation><!--903 -->
<search position="before"><![CDATA[mem.karma_good, mem.id_post_group, mem.karma_bad, mem.lngfile, mem.id_group, mem.time_offset, mem.show_online,]]></search>
<add><![CDATA[ mem.additional_groups,]]></add>
</operation>
<operation><!-- 1164 -->
<search position="before"><![CDATA['post_group_color' => $profile['post_group_color'],]]></search>
<add><![CDATA[
'additional_groups' => array(
'id' => array(),
'stars' => array(),
'name' => array(),
'ag_color' => array()
),]]></add>
</operation>
<operation><!-- 1194 -->
<search position="replace"><![CDATA[ return true;
}

function detectBrowser()]]></search>
<add><![CDATA[ // Badges Mod
$context['badges']['ownline'] = !empty($modSettings['badge_ownline']) ? explode(',', $modSettings['badge_ownline'], 20) : '';
 
$groups = $profile['additional_groups'];
// Load additional membergroups
if (!empty($groups))
{
$result_stars = $smcFunc['db_query']('', '
SELECT id_group, group_name, stars, online_color
FROM {db_prefix}membergroups
WHERE id_group IN (' . $groups . ')
',
array()
);

// additional groups
while ($row_stars = $smcFunc['db_fetch_assoc']($result_stars))
if (!empty($row_stars['stars']))
{
$memberContext[$user]['additional_groups']['id'][] = $row_stars['id_group'];
$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $smcFunc['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);
$memberContext[$user]['additional_groups']['name'][] = $row_stars['group_name'];
$memberContext[$user]['additional_groups']['ag_color'][] = $row_stars['online_color'];
}
$smcFunc['db_free_result']($result_stars);
}
return true;
}

function detectBrowser()]]></add>
</operation>
</file>

<!-- default/Profile.template.php -->
<file name="$themedir/Profile.template.php">
<operation><!-- 140 -->
<search position="replace"><![CDATA[if (!isset($context['disabled_fields']['posts']))]]></search>
<add><![CDATA[ echo '
<dt 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></dt>
<dd>', $context['member']['group_stars'], '</dd>';

if (!empty($context['badges']['ownline']) && !allowedTo('moderate_forum'))
{
foreach($context['badges']['ownline'] AS $key)
for ($i = 0; $i < count($context['member']['additional_groups']['id']); $i++)
if ($context['member']['additional_groups']['id'][$i] == $key)
echo '
<dt style="color: ', $context['member']['additional_groups']['ag_color'][$i], ';"><b>', $context['member']['additional_groups']['name'][$i], '</b></dt>
<dd>', $context['member']['additional_groups']['stars'][$i], '</dd>';
}
elseif (!empty($context['member']['additional_groups']['id']))
for ($i = 0; $i < count($context['member']['additional_groups']['id']); $i++)
echo '
<dt style="color: ', $context['member']['additional_groups']['ag_color'][$i], ';"><b>', $context['member']['additional_groups']['name'][$i], '</b></dt>
<dd>', $context['member']['additional_groups']['stars'][$i], '</dd>';
echo '</dl><dl>';

if (!isset($context['disabled_fields']['posts']))]]></add>
</operation>
</file>

<!-- Sources/ManageSettings.php -->
<file name="$sourcedir/ManageSettings.php">
<operation><!-- 443 -->
<search position="after"><![CDATA[// Statistics.]]></search>
<add><![CDATA[// Stars and badges
array('text', 'badge_ownline'),
'',
]]></add>
</operation>
</file>

<!-- default/PersonalMessage.template.php -->
<file name="$themedir/PersonalMessage.template.php">
<operation><!-- 286 -->
<search position="replace"><![CDATA[// Show avatars, images, etc.?]]></search>
<add><![CDATA[if (!empty($context['badges']['ownline']) && !allowedTo('moderate_forum'))
{
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 class="postgroup">', $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 class="postgroup">', $message['member']['additional_groups']['stars'][$i], '</li>';

// Show avatars, images, etc.?]]></add>
</operation>
</file>

<!-- default/Display..template.php -->
<file name="$themedir/Display.template.php">
<operation><!-- 294 -->
<search position="replace"><![CDATA[// Show avatars, images, etc.?]]></search>
<add><![CDATA[if (!empty($context['badges']['ownline']) && !allowedTo('moderate_forum'))
{
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 class="postgroup">', $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 class="postgroup">', $message['member']['additional_groups']['stars'][$i], '</li>';

// Show avatars, images, etc.?]]></add>
</operation>
</file>

<!-- Themes/babylon/Display.template.php -->
<file name="$boarddir/Themes/babylon/Display.template.php" error="skip">
<operation><!-- 298 -->
<search position="replace"><![CDATA[', $message['member']['group_stars'], '<br />';]]></search>
<add><![CDATA[', $message['member']['group_stars'], '<br />';

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], '<br />';
}
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo $message['member']['additional_groups']['stars'][$i], '<br />';]]></add>
</operation>
</file>

<!-- Themes/classic/Display.template.php -->
<file name="$boarddir/Themes/classic/Display.template.php" error="skip">
<operation><!-- 280 -->
<search position="replace"><![CDATA[', $message['member']['group_stars'], '<br />';]]></search>
<add><![CDATA[', $message['member']['group_stars'], '<br />';

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], '<br />';
}
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo $message['member']['additional_groups']['stars'][$i], '<br />';]]></add>
</operation>
</file>

<!-- default/languages/Help.english.php -->
<file name="$languagedir/Help.english.php">
<operation>
<search position="end"></search>
<add><![CDATA[
$helptxt['badge_ownline'] = 'Arrange the display of additional group\'s badge or stars. Enter the additional group id number and must be separated by comma. (i.e. 1,2,4)';
]]></add>
</operation>
</file>

<!-- default/languages/ManageSettings.english.php  -->
<file name="$languagedir/ManageSettings.english.php">
<operation>
<search position="end"></search>
<add><![CDATA[
$txt['badge_ownline'] = 'Arrange additional group id to be displayed.<div class="smalltext">(Must be separated by comma. i.e. 1,2,4)</div>';
]]></add>
</operation>
</file>

</modification>

<!-- default/BoardIndex.template.php
<file name="$themedir/BoardIndex.template.php">
<operation>
<search position="replace"><![CDATA[.....]]></search>
<add><![CDATA[.....]]></add>
</operation>
</file>
-->


Compare it to yours and if its the same then you probably have a conflict with another mod.
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 01, 2011, 10:59:40 AM
I really really want to use this mod, but /sources/load.php failed on installation (due to a mod I may have installed). I tried to manually install it. The following is the code I tried to install myself.

Quote
Code (Find) Select
return true;
}

// Load a theme, by ID.

Code (Replace) Select
$context['badges']['ownline'] = !empty($modSettings['badge_ownline']) ? explode(',', $modSettings['badge_ownline'], 20) : '';
 
$groups = $profile['additionalGroups'];
// Load additional membergroups
if (!empty($groups))
{
$result_stars = db_query("
SELECT stars, ID_GROUP, groupName, onlineColor
FROM {$db_prefix}membergroups
WHERE ID_GROUP IN (" . $groups . ')
', __FILE__, __LINE__);

// Loop through the additional groups...
while ($row_stars = mysql_fetch_assoc($result_stars))
if (!empty($row_stars['stars']))
{
$memberContext[$user]['additional_groups']['id'][] = $row_stars['ID_GROUP'];
$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $func['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);
$memberContext[$user]['additional_groups']['name'][] = $row_stars['groupName'];
$memberContext[$user]['additional_groups']['ag_color'][] = $row_stars['onlineColor'];
}
mysql_free_result($result_stars);
}

return true;
}

// Load a theme, by ID.



Unfortunately, this didn't work.  :( It does nothing but gives me an error in my error log:

Pages: [1]
Check all

Apply Filter: Only show the error messages of this member żεχเ๏ภ Today at 15:59
Apply Filter: Only show the error messages of this IP address xx.xx.xx.xx    Apply Filter: Only show the error messages of this session 4ea64bd1d2d37c26bd491d053acecbcc
Apply Filter: Only show the error messages of this URL http://mainmedia.me/forum/index.php?action=viewErrorLog;desc
Apply Filter: Only show the errors with the same message
8: Undefined variable: profile
File: /web/users/jason/forum/Sources/Load.php
Line: 1373
Check all
Pages: [1]


Can someone please have a look and see if its possible to manually add that bit of code in my attached Load.php? I would be eternally grateful for any help or advice.


Thanks,

Jason
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 02, 2011, 12:17:58 PM
Bump in the night.
Title: Re: Stars and Badges
Post by: Garou on April 02, 2011, 03:11:10 PM
Cant test it because I dont know what mods your using but comparing your file to the one that comes standard in 1.1.13
It just looks like a couple of other mods have installed between
return true;
}


and

// Load a theme, by ID.


By the way according to your file your a few versions behind, you need to upgrade for security reasons.

None the less try finding...

return true;
}

//This is the universial load colors function, can be used by each person who need it :)


and replace with...
$context['badges']['ownline'] = !empty($modSettings['badge_ownline']) ? explode(',', $modSettings['badge_ownline'], 20) : '';
 
$groups = $profile['additionalGroups'];
// Load additional membergroups
if (!empty($groups))
{
$result_stars = db_query("
SELECT stars, ID_GROUP, groupName, onlineColor
FROM {$db_prefix}membergroups
WHERE ID_GROUP IN (" . $groups . ')
', __FILE__, __LINE__);

// Loop through the additional groups...
while ($row_stars = mysql_fetch_assoc($result_stars))
if (!empty($row_stars['stars']))
{
$memberContext[$user]['additional_groups']['id'][] = $row_stars['ID_GROUP'];
$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $func['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);
$memberContext[$user]['additional_groups']['name'][] = $row_stars['groupName'];
$memberContext[$user]['additional_groups']['ag_color'][] = $row_stars['onlineColor'];
}
mysql_free_result($result_stars);
}

return true;
}

//This is the universial load colors function, can be used by each person who need it :)
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 02, 2011, 03:51:49 PM
Thank you so much! I would like to add it to a custom ultimate profile box I made. Can you please tell me what I am supposed to edit if you see it? Sorry for dumb questions.

function up_block_badges() {
global $context, $settings, $txt;

echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="badges">
<tr>
<td class="titlebg" height="26" align="center">
', $txt['profile_badges'] ,'
</td>
</tr>
<tr>
<td class="windowbg">
<table>';

// Show the member's primary group (like 'Administrator') if they have one.
if (isset($context['member']['group']) && $context['member']['group'] != '')
echo '
<center><br /><font face="verdana" color="#CCCCCC" size="4">
', $context['member']['group'], '</font><br /><br /></center>';



// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $context['member']['group'] == '') && $context['member']['post_group'] != '')
echo '
<center><br /><font face="verdana" color="#CCCCCC" size="4">
', $context['member']['post_group'], '</font><br /><br /></center>';
echo '
<center><br /><font face="verdana" color="#CCCCCC" size="4">
', $context['member']['group_stars'], '</font><br /><br /></center>';
echo '
</table>
</td>
</tr>
</table>';

return true;
}

Title: Re: Stars and Badges
Post by: Garou on April 02, 2011, 04:28:49 PM
I'm not really familiar with ultimate profile, I tried it once and didn't like it. Seems to me there was a post in about something like that either in the official thread or maybe on the demo site for adding Stars and badges to it.
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 02, 2011, 10:31:20 PM
Quote from: Garou on April 02, 2011, 04:28:49 PM
I'm not really familiar with ultimate profile, I tried it once and didn't like it. Seems to me there was a post in about something like that either in the official thread or maybe on the demo site for adding Stars and badges to it.

Alright, thanks alot for your help.   :D If you run across the post please do post it here. I'll do an extensive search for it.  ;D


Jason
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 03, 2011, 02:52:53 AM
http://www.simplemachines.org/community/index.php?topic=225743.msg1895909;topicseen#msg1895909

^Only could find this post. I tried to edit the coding for my custom ultimate profile block. The following is what I came up with...

function up_block_badges() {
global $context, $settings, $txt, $i;

echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="badges">
<tr>
<td class="titlebg" height="26" align="center">
', $txt['profile_badges'] ,'
</td>
</tr>
<tr>
<td class="windowbg">
<table>';
echo '
<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 '
</table>
</td>
</tr>
</table>';

return true;
}


Unfortunately.. This is the ultimate output..  :o

(http://i52.tinypic.com/2zny5ww.png)
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 05, 2011, 04:03:39 PM
Bump for advice or help.  :)
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 06, 2011, 04:04:25 PM
Bumping for help, my forum is nearly complete after 6 months of work. This is the finishing touch.
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 07, 2011, 09:31:43 PM
Bumping for anyone with a hunch on how to make this mod work for Ultimate Profiles.
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 09, 2011, 03:09:26 PM
Beggingly bumped.  :(
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 10, 2011, 03:32:44 PM
I beg for help of any kind.  :-[
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 12, 2011, 02:16:04 PM
Doesn't anyone have any suggestions to make this compatible with Ultimate Profiles?
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 13, 2011, 05:15:57 PM
I'm going to keep bumping this periodically until someone with a little time and knowledge sees it and replies.  :P
Title: Re: Stars and Badges
Post by: Garou on April 13, 2011, 08:08:01 PM
So It looks like Im going to take this topic off notification and If someone does have an issue I can solve Ill never see it.
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 15, 2011, 02:58:31 PM
Quote from: Garou on April 13, 2011, 08:08:01 PM
So It looks like Im going to take this topic off notification and If someone does have an issue I can solve Ill never see it.


Thanks for the bump. :L
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 17, 2011, 01:04:22 AM
Bumping for help with Stars and Badges on Ultimate Profiles.  :)
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 18, 2011, 10:25:05 AM
Bumping for help with Stars and Badges on Ultimate Profiles.  :)
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 19, 2011, 01:23:02 PM
Bumping for help with Stars and Badges on Ultimate Profiles.  :)
Title: Re: Stars and Badges
Post by: kat on April 19, 2011, 04:15:28 PM
Will you please stop bumping this.

It obviously ain't gonna happen, so why waste your time winding people up over it?
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on April 20, 2011, 03:34:11 PM
Quote from: K@ on April 19, 2011, 04:15:28 PM
Will you please stop bumping this.

It obviously ain't gonna happen, so why waste your time winding people up over it?

May I please have your permission to bump this every 2 weeks then? I feel eventually someone with the expertise or basic knowledge will see it.


Edit 21 April 2011 (in Response to @K's post directly under mine):

Sorry if I caused trouble. I'll stop.
Title: Re: Stars and Badges
Post by: kat on April 20, 2011, 04:09:37 PM
I think someone's likely to see it, anyway.

Thing is, every time you bump this, every member who's posted in this topic gets a notification and it's pissing people off.

'course, I'm buggered, too, now, coz I've bloody posted in it. :(
Title: Re: Stars and Badges
Post by: Iomega0318 on May 14, 2011, 07:08:55 AM
Hmm I have a question for you guys,
I looked through here and found a post for 2.0 RC5 and it installed with no errors.

However after install I got a 500 internal server error and after looking at my error logs I found this:
[14-May-2011 10:50:56] PHP Parse error:  syntax error, unexpected T_VARIABLE in /***/******/Sources/Load.php on line 1295

It refers to this section of code:
// Badges Mod
$context['badges']['ownline'] = !empty($modSettings['badge_ownline']) ? explode(',', $modSettings['badge_ownline'], 20) : '';
 
*** $groups = $profile['additional_groups'];
// Load additional membergroups
if (!empty($groups))
{
$result_stars = $smcFunc['db_query']('', '
SELECT id_group, group_name, stars, online_color
FROM {db_prefix}membergroups
WHERE id_group IN (' . $groups . ')
',
array()
);

// additional groups
while ($row_stars = $smcFunc['db_fetch_assoc']($result_stars))
if (!empty($row_stars['stars']))
{
$memberContext[$user]['additional_groups']['id'][] = $row_stars['id_group'];
$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $smcFunc['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);
$memberContext[$user]['additional_groups']['name'][] = $row_stars['group_name'];
$memberContext[$user]['additional_groups']['ag_color'][] = $row_stars['online_color'];
}
$smcFunc['db_free_result']($result_stars);
}
return true;
}

$groups = $profile['additional_groups']; being line 1295

After reverting to my original Load.php file I was able to uninstall the package, but I would love to get this to work if anyone can give me any insight that would be awesome.
Title: Re: Stars and Badges
Post by: Henzo on May 15, 2011, 02:59:35 PM
Did anyone ever figure out how to get rid of the duplicate badges showing up?
Title: Re: Stars and Badges
Post by: Henzo on May 21, 2011, 09:56:34 AM
I've tried tinkering with it, but have had no success in removing duplicate insignia.

It's too bad this isn't supported anymore.
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on May 23, 2011, 12:42:05 AM
Quote from: Henzo on May 21, 2011, 09:56:34 AM
It's too bad this isn't supported anymore.

You're telling me.  :(
Title: Re: Stars and Badges
Post by: minos on May 24, 2011, 09:55:36 PM
ant other developer can update this mod please?
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on May 25, 2011, 11:09:55 AM
Quote from: minos on May 24, 2011, 09:55:36 PM
ant other developer can update this mod please?

Pretty sure that violates copyright laws...  :(
Title: Re: Stars and Badges
Post by: MissyNL on June 07, 2011, 06:20:38 AM
yeah oke... but if he does not show up for almost 2 years... i think he will not mind. I also want to have this on my site... but i am having RC4.. so that is not not an option for me.

Good luck everyone...
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on June 07, 2011, 03:20:21 PM
Quote from: MissyNL on June 07, 2011, 06:20:38 AM
yeah oke... but if he does not show up for almost 2 years... i think he will not mind.

I obviously don't mind!  ;) I want it updated more than anyone, but I just don't want anyone to be in trouble.
Title: Re: Stars and Badges
Post by: actgym on June 09, 2011, 10:31:16 PM
+100 for getting this upgraded to RC5. i want this feature bad on my forum
Title: Re: Stars and Badges
Post by: C4G-TK on June 18, 2011, 11:23:44 PM
Not sure why people can't get this to work.  All I've done for the past year plus has been to use the package in reply #721 and then did the fix in reply #752.  I have it working on my 2.0 forum fine.  Might help if people searched for the answer instead of bumping.
Title: Re: Stars and Badges
Post by: bros on June 19, 2011, 06:52:13 PM
Quote from: MissyNL on June 07, 2011, 06:20:38 AM
yeah oke... but if he does not show up for almost 2 years... i think he will not mind. I also want to have this on my site... but i am having RC4.. so that is not not an option for me.

Good luck everyone...

Someone can upgrade it for themselves, but not release it for general use
Title: Re: Stars and Badges
Post by: żεχเ๏ภ on June 20, 2011, 12:29:08 AM
Quote from: bros on June 19, 2011, 06:52:13 PM
Quote from: MissyNL on June 07, 2011, 06:20:38 AM
yeah oke... but if he does not show up for almost 2 years... i think he will not mind. I also want to have this on my site... but i am having RC4.. so that is not not an option for me.

Good luck everyone...

Someone can upgrade it for themselves, but not release it for general use

Seconded.  8)
Title: Re: Stars and Badges
Post by: jestism on July 05, 2011, 07:58:26 PM
OK.. Installed and working.

My question is.. "IS" there a way to have the badges display in columns of (3) instead of a single column like in the image below.
(the way it is below is taking up a lot of vertical space)

(http://www.weaponsguild.com/virus/single%20column%20layout.bmp)

Thank-you for any advice, help or directions in advance.

Mike
Title: Re: Stars and Badges
Post by: hcfwesker on July 05, 2011, 11:18:59 PM
I found this link, that will Install on SMF 2.0 with no install errors, and I have over 40 MODs installed.

http://www.simplemachines.org/community/index.php?topic=225743.msg2644620#msg2644620


To Remove the double badges, I found out that REMOVING the line from Themes/default/Display.template.php will get rid of the duplicate.


}
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo '
<li class="postgroup">', $message['member']['additional_groups']['stars'][$i], '</li>';

if (!empty($context['badges']['ownline']) && !allowedTo('moderate_forum'))
{
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 class="postgroup">', $message['member']['additional_groups']['stars'][$i], '</li>';
Title: Re: Stars and Badges
Post by: jestism on July 07, 2011, 08:40:43 AM
BTT for a possible method of doing this.
(Know it can be done, as 3 years ago I had my SMF 1.1.xx modified by a person to do it. Unfortunately, I never knew which file or what he modified)



Quote from: jestism on July 05, 2011, 07:58:26 PM
OK.. Installed and working.

My question is.. "IS" there a way to have the badges display in columns of (3) instead of a single column like in the image below.
(the way it is below is taking up a lot of vertical space)

(http://www.weaponsguild.com/virus/single%20column%20layout.bmp)

Thank-you for any advice, help or directions in advance.

Mike
Title: Re: Stars and Badges
Post by: Dai Li on July 20, 2011, 03:01:54 AM
Alright um, I had it working and then it randomly stopped showing the extra badge things in threads. I have no idea why. I was moving stuff around, pretty sure, basic copy paste-a-few-lines-down type stuff, altered some HTML, it shouldn't have broken so I have no idea why it did.

echo '
<p class="stars" style="padding-bottom: 2px;">', $message['member']['group_stars'], '</p>';

// Show the member's extra groups if they have them.
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 '
<p class="stars" style="padding-bottom: 2px;">', $message['member']['additional_groups']['stars'][$i], '</p>';
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo '
<p class="stars" style="padding-bottom: 2px;">', $message['member']['additional_groups']['stars'][$i], '</p>';


Added the commentary for my own reference, but this is what the section that should affect this looks like. All it shows is the primary badges, not the additional badges. I'm running the altered one for RC3 a few posts back on a 2.0.

Edit: Never mind, I just replaced it with the default display.template and manually remade the changes.
Title: Re: Stars and Badges
Post by: jestism on July 20, 2011, 08:54:19 AM
In "which" of the many .php files is this found or this modification placed.?
Title: Re: Stars and Badges
Post by: jestism on July 22, 2011, 09:00:15 AM
Bump back to top. Still looking for a way (or how to) accomplish this.
(Know it can be done, as 3 years ago I had my SMF 1.1.xx modified by a person to do it. Unfortunately, I never knew which file or what he modified)

Quote from: jestism on July 05, 2011, 07:58:26 PM
My question is.. "IS" there a way to have the badges display in columns of (3) instead of a single column like in the image below.
(the way it is below is taking up a lot of vertical space)

(http://www.weaponsguild.com/virus/single%20column%20layout.bmp)

Thank-you for any advice, help or directions in advance.

Mike

Title: Re: Stars and Badges
Post by: jestism on July 24, 2011, 11:54:23 AM
I am also running into the issue that admin and moderators can see all of the badges of the members in posts, however members are not seeing all of their badges while running the 2.3 version of "Stars and Badges" that was posted (http://www.simplemachines.org/community/index.php?topic=225743.msg2644620#msg2644620) with SMF 2.0
Title: Re: Stars and Badges
Post by: jeronij on August 02, 2011, 02:05:05 PM
Quote from: MalikCarr on November 30, 2010, 10:52:37 PM
Don't worry about it - I actually figured out how to fix it, and it was pure user error (on my part).

I was under the mistaken impression that the group numbers were sequential, rather than just random - so when I input 1,2,3,4,5, etc into the list of groups to show, it showed my Administrator and Moderator badges (1 and 2) but no others, since those were various 18,12,14,9 and 16. Har.

Hello,

Using V2.3 (in zip, but installed it says 2.2)

I am having a problem with the Arrange additional Groups ID. It does not matter what I put in it, it does not work. It shows always all the badges.

This list of ID I want to use:
1,2,9,10,11,13,14,15,23,25,26,27,29,37,40,43,47,50,51,53,54,55,56,57,64,65,74,75,77,84,89,90
Doesnt work :(

I tried with:
1,2
Doesnt work either :(

It shows always all the badges.

It seems that MalikCarr had the same problem and figured out how to fix it, but I am sorry, I cant understand how he did. I cant see how to set up this list in the comment he posted, so I hope someone can help me to clear this and solve the problem.

Thanks in advance ¡¡


EDIT: The numbers series are being correctly saved in the database.
Title: Re: Stars and Badges
Post by: jestism on August 02, 2011, 02:24:32 PM
I had the opposite problem to begin with, and that was some members were only seeing some of their badges, but not all of them.

Don't remember which file it is (but it in this thread is where I found it) you had to change the base quantity of from the default number of badges/stars from "20" to as large of a number as you needed to handle all of the ones you have.
--------------------------------
Our members seeing ones that are "not" assigned to them?


-----------------
Side note:
I got the rows and columns working... ;D (again from hunting and trying different things that I found in this thread)

(http://www.weaponsguild.com/virus/stars.jpg)
Title: Re: Stars and Badges
Post by: jeronij on August 03, 2011, 09:22:58 AM
Hello and thanks for pointing me in the right direction  :D . There is only one "20" in the code, and it was easy to find. I changed it to "90" and it solved the problem, and now only the wanted labels are showing.

I used the 2.1 version from the beggining, and I tried version 2.3 found in this thread. However 2.3 didnt work for me with or without this modification thus I use a self-modified 2.1 version, which installs and works fine in SMF 2.0 . Dont think it is worth to attach it here, but if someday someone would need it, just send me a PM  :)

Again thanks for the help ¡¡
Title: Re: Stars and Badges
Post by: jestism on August 03, 2011, 10:13:49 AM
You are welcome... (glad that my little knowledge of just hunting this thread helped)

I am down to just figuring out "HOW" to get the badge name to "appear" when the mouse is hovered over it.

Something had been modified on the old SMF 1.1.xx version that made it work, but the person who did it is no longer involved with the site.

I am sure it is something "simple" ... but knowing "ZERO, ZIP, NADA" about how to write script isn't helping me to figure it out.

So I search threads in hopes of finding something that will point me to the solution.
Title: Re: Stars and Badges
Post by: jeronij on August 03, 2011, 04:00:43 PM
Well, you helped me, I help you ;)

I would recommend you to unistall the mod, make the modifications in install-2.xml and upload and install the mod again. The IDs list (if you use it) is saved in the database and you'll recover it automatically.

You can also make the modifications directly in your forums files, <!-- Sources/Load.php -->, but I would not recommend that because you'll have errors when unistalling the mod, and if you want to install it again the trick wont work ;)   


Search:


$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $smcFunc['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);


and change it to:



$memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $smcFunc['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" title="' . $row_stars['group_name'] . '" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);


This should make the trick. It took me sometime to make it work, because the "alt" tag does not show in the browsers, so I had to use "title" instead.
Title: Re: Stars and Badges
Post by: jestism on August 03, 2011, 05:17:53 PM
Thanks...

I just went in (first on one of my test sites) and edited the sources/load.php file.
It worked perfectly.

So did the same on my live site and everything is doing what it is suppose to do.

When a member "hoovers" their mouse over a badge (award) that they or someone else has, it now shows them the "name" of it.

Thank-you again.
Title: Re: Stars and Badges
Post by: H3lioz on August 06, 2011, 10:22:09 AM
Anyone that can make this for 2.0 final for 8$-10$.
Title: Re: Stars and Badges
Post by: jestism on August 06, 2011, 10:44:55 AM
I used the 2.3.3 zip version (though it shows up in the packages screen as 2.2) and it loaded in SMF 2.0 Gold without any problems.

The issues I ran into were:

#1   The total number of badges that I have exceeded the default quantity of (20)... {file to mod noted in one of my previous posts}

#2   I wanted "3 columns" of badges (thus creating rows) and that required mod is found early in this thread (don't remember the page or post number)

#3   I wanted the "names" of the badges to appear when the mouse hoovered over it. {file to mod noted by another member just a few posts back}

I do not know "ANYTHING" about writing script for php.... but everything is here in this thread to have it running flawlessly on SMF 2.0 Gold.

"IF" you have 20 or less badges and just want them in a single column, then you can (if the theme you are using doesn't have an issue with it) just install the 2.3.3 zip version that can be found in this thread on SMF 2.0 Gold. (Or at least I did and didn't have any problems or issues that were not related to "extra" features I wanted.
Title: Re: Stars and Badges
Post by: jeronij on August 06, 2011, 11:15:51 AM
Quote from: strafe on August 06, 2011, 10:22:09 AM
Anyone that can make this for 2.0 final for 8$-10$.

You can try this if you want, at your own risk  ;)

If you get any errors when you go to install it, dont do it, and post here the code that is giving the error. I have a somehow customized installation but this should work in a clean as well. Only 2.0

If it works and you still want to give these 8-10$, just pay a visit here:  http://sc4devotion.com/forums/index.php?page=5 and support my site  8)   (<-- if it is not allowed to post this sort of links,  I am sorry. Please a mod delete it :) )

Hope this helps
Title: Re: Stars and Badges
Post by: ambrosiavenus on August 07, 2011, 05:47:08 AM
I am running SMF 2.0, and while I can get this to work here's my small noobish question...

I want the Admin Stars to show, but I would also like the Post Groups to show to, is this possible?

The reason I ask is because, when I install this mod, I keep getting two Admin Badges one where the badge is supposed to be and one as my Post Group.  I am sure it's something I'm doing I'm just not sure what it is at this point, so any help would be awesome :D
Title: Re: Stars and Badges
Post by: jestism on August 07, 2011, 10:50:09 AM
It is a pain to do, but if you have the time to manage it (which is the method we have had to use since the version for SMF 1.1.XX), is this.

"Post Count" groups can be a pain, especially if you have other badges that are "non-post count" driven.

The "ONLY" solution we have came up with (again in 3 years across both SMF 1.1.XX and now SMF 2.0) is to just create standard membership groups.

Then in a members profile, (your example is Admin, which should have the primary group set to Admin), you would just select the other groups from the additional list.
This would then list them "under" the original.

You just have to remember to "Manually" add a member (even an admin) to each additional membership group you want listed.

Side Note:
Once you create separate "member-groups", hover your mouse over the member-group name. It will end with a number (that is the group number).
"IF" you want badges to show up in a specific (and consitant) order under the members names, the list of group numbers will have to be entered in the same order that you want them to appear in the Admin feature/layout screen.
Title: Re: Stars and Badges
Post by: ambrosiavenus on August 07, 2011, 12:01:53 PM
Yeah! That's just a bit of a pain!  Thank you very much :D
Title: Re: Stars and Badges
Post by: H3lioz on August 09, 2011, 12:58:20 PM
http://prntscr.com/2kyu4

Cant find the text in display.template.php please help.
Title: Re: Stars and Badges
Post by: Biology Forums on August 13, 2011, 01:36:53 AM
How many badges could you give someone before it starts crashing. For some reason, after 5 badges, the user's stars (which signify post count membergroup) disappear >:( :( Could some explain why this is?
Title: Re: Stars and Badges
Post by: ceylankral on August 14, 2011, 07:47:48 AM
can anyone show me smf rc5 codes?
Title: Re: Stars and Badges
Post by: Biology Forums on August 14, 2011, 08:59:51 PM
Quote from: shuban on August 13, 2011, 01:36:53 AM
How many badges could you give someone before it starts crashing. For some reason, after 5 badges, the user's stars (which signify post count membergroup) disappear >:( :( Could some explain why this is?

I find that when the member has "moderator" status, their post-count membergroup image (stars), disappears.
Title: Re: Stars and Badges
Post by: hcfwesker on September 01, 2011, 04:24:31 PM
Quote from: shuban on August 14, 2011, 08:59:51 PM

I find that when the member has "moderator" status, their post-count membergroup image (stars), disappears.

That's not from this MOd, I believe thats a setting under Admin > Themes >  Theme Settings

Hide post group titles for grouped members:
Enabling this will not display a member's post group title on the message view if they are assigned to a non-post based group.

uncheck the box for that option and see if it works.
Title: Re: Stars and Badges
Post by: Biology Forums on September 01, 2011, 05:18:42 PM
Quote from: hcfwesker on September 01, 2011, 04:24:31 PM
Quote from: shuban on August 14, 2011, 08:59:51 PM

I find that when the member has "moderator" status, their post-count membergroup image (stars), disappears.

That's not from this MOd, I believe thats a setting under Admin > Themes >  Theme Settings

Hide post group titles for grouped members:
Enabling this will not display a member's post group title on the message view if they are assigned to a non-post based group.

uncheck the box for that option and see if it works.

It was unchecked... Checking it removes the post group title and image. I find that only when a person is a "moderator" do the stars disappear:

See here, the first user, http://biology-forums.com/index.php?topic=3945.0

But on other posts, where the user is not a moderator, the star image is there.
Title: Re: Stars and Badges
Post by: H3lioz on September 07, 2011, 08:12:01 AM
Quote from: jeronij on August 06, 2011, 11:15:51 AM
Quote from: strafe on August 06, 2011, 10:22:09 AM
Anyone that can make this for 2.0 final for 8$-10$.

You can try this if you want, at your own risk  ;)

If you get any errors when you go to install it, dont do it, and post here the code that is giving the error. I have a somehow customized installation but this should work in a clean as well. Only 2.0

If it works and you still want to give these 8-10$, just pay a visit here:  http://sc4devotion.com/forums/index.php?page=5 and support my site  8)   (<-- if it is not allowed to post this sort of links,  I am sorry. Please a mod delete it :) )

Hope this helps
Hey man i downloaded the mod and its perfect but.. I got one question, can u tell me how i can make all the stars/ranks show in profile comments too?

Should be like this:
(http://i54.tinypic.com/f551td.png)

But is like this:
(http://i54.tinypic.com/ay8v2o.png)

Same problem in private messages would been gratefull if u replyed :) I havnt been on in a while so i havnt answered to ur post before now.. If u help me with this ill give u the 8$ :)
Title: Re: Stars and Badges
Post by: hcfwesker on September 09, 2011, 10:07:22 PM
Quote from: strafe on September 07, 2011, 08:12:01 AM
Hey man i downloaded the mod and its perfect but.. I got one question, can u tell me how i can make all the stars/ranks show in profile comments too?

Are you using Ultimate Profiles MOD or regular Profile Comments MOD to have comments on profile.

The personal messages shouldn't be too hard, just need to know what MOD you have for profile comments to be allowed.


Quote
Same problem in private messages would been gratefull if u replyed :) I havnt been on in a while so i havnt answered to ur post before now.. If u help me with this ill give u the 8$ :)

Try this, remember to make a backup of the file in case of an errors, but I got this to work on my site.


Themes/default/PersonalMessage.template.php

Find
// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
<li class="postgroup">', $message['member']['post_group'], '</li>';
echo '
<li class="stars">', $message['member']['group_stars'], '</li>';



REPLACE with
// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
<li class="stars">', $message['member']['group_stars'], '</li>';

if (!empty($context['badges']['ownline']) && !allowedTo('moderate_forum'))
{
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 class="postgroup">', $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 class="postgroup">', $message['member']['additional_groups']['stars'][$i], '</li>';
Title: Re: Stars and Badges
Post by: lolmao2 on September 10, 2011, 06:25:41 PM
I tried this, with no luck unfortunately.
I have the exact same problem as Strafe has and I tried changing the Themes/default/PersonalMessage.template.php, as you said.
Did not work for me.
Probably something with the MODs your talking about. Thanks for the above comments though, really helped me. Just have the same single problem as Strafe.
Hope you guys can make it work somehow  :laugh:
Title: Re: Stars and Badges
Post by: hcfwesker on September 10, 2011, 09:43:30 PM
Strange, cause I made the same exact edits after I seen strafe ask, so i can test, and got them to work.   And actually leaving it like this on my own forum.  Not ure what else to do,  you sure you made the edits correctly, and sure your're not using a custom theme with it's own PersonalMessage.template.php file
Title: Re: Stars and Badges
Post by: lolmao2 on September 11, 2011, 10:14:11 AM
ahhhh sorry I'm still new to this coding and style things.
Well, I actually made it work on the default theme. But I hoped that it would work on the core theme aswell, since I've spend hours changing it's design.
I tried entering the codes in the PersonalMessage.template in "core" folder, but did not seem to work, only on default.
Is there any small tricks that will make it work on core too? I would really appreciate that! Right now I'm just sitting and reading about this coding to try and find out myself, but it seems really confusing if you haven't worked with it before :-)
I hope it's not as hard as it looks and that you have time to help me!
Thanks very much in advance!

/lolmao2
Title: Re: Stars and Badges
Post by: hcfwesker on September 11, 2011, 03:20:58 PM
Quote from: lolmao2 on September 11, 2011, 10:14:11 AM
ahhhh sorry I'm still new to this coding and style things.
Well, I actually made it work on the default theme. But I hoped that it would work on the core theme aswell, since I've spend hours changing it's design.
I tried entering the codes in the PersonalMessage.template in "core" folder, but did not seem to work, only on default.
Is there any small tricks that will make it work on core too? I would really appreciate that! Right now I'm just sitting and reading about this coding to try and find out myself, but it seems really confusing if you haven't worked with it before :-)
I hope it's not as hard as it looks and that you have time to help me!
Thanks very much in advance!

/lolmao2

make the SAME EXACT edits on the core theme's PersonalMessage.template.php  just like you did on the default's theme.
Title: Re: Stars and Badges
Post by: lolmao2 on September 11, 2011, 03:44:09 PM
Quote from: hcfwesker on September 11, 2011, 03:20:58 PM
Quote from: lolmao2 on September 11, 2011, 10:14:11 AM
ahhhh sorry I'm still new to this coding and style things.
Well, I actually made it work on the default theme. But I hoped that it would work on the core theme aswell, since I've spend hours changing it's design.
I tried entering the codes in the PersonalMessage.template in "core" folder, but did not seem to work, only on default.
Is there any small tricks that will make it work on core too? I would really appreciate that! Right now I'm just sitting and reading about this coding to try and find out myself, but it seems really confusing if you haven't worked with it before :-)
I hope it's not as hard as it looks and that you have time to help me!
Thanks very much in advance!

/lolmao2

make the SAME EXACT edits on the core theme's PersonalMessage.template.php  just like you did on the default's theme.

I have tried that 10 times now :/ Does not work. I'm going: ftp://[mywebaddress]/forum/Themes/core/PersonalMessage.template.php
Changing
         // Don't show these things for guests.
         if (!$message['member']['is_guest'])
         {
            // Show the post group if and only if they have no other group or the option is on, and they are in a post group.
            if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
               echo '
            <li class="postgroup">', $message['member']['post_group'], '</li>';
            echo '
            <li class="stars">', $message['member']['group_stars'], '</li>';

to

         // Don't show these things for guests.
         if (!$message['member']['is_guest'])
         {
            // Show the post group if and only if they have no other group or the option is on, and they are in a post group.
         if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
         echo '
                        <li class="stars">', $message['member']['group_stars'], '</li>';

         if (!empty($context['badges']['ownline']) && !allowedTo('moderate_forum'))
      {
         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 class="postgroup">', $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 class="postgroup">', $message['member']['additional_groups']['stars'][$i], '</li>';

But it doesn't make any changes at all.
ONLY when I do it here:
ftp://[myadress]/forum/Themes/default/PersonalMessage.template.php.

But I have to make it work on the core theme. It makes no sense... I've double checked everything.. Hmmm

I can still see that I've got more groups under my profile. But not in comments hmm
Title: Re: Stars and Badges
Post by: lolmao2 on September 11, 2011, 04:58:40 PM
Sorry for double-posting.
Conclusion is this so far:
I can see more groups in comments if I use default theme.
but I can't when I use core theme.
I do the exact same changes in both of the themes. (triple-checked)
If anyone can make this work on their core theme, could they possible attach their "PersonalMessage.template" file to me?
I feel like I've been trying everything, and I can't seem to find a solution yet.
Thanks!

//lolmao2
Title: Re: Stars and Badges
Post by: hcfwesker on September 12, 2011, 12:38:21 AM
Try this ...


core/PersonalMessage.template.php

Find
// Is karma display enabled? Total or +/-?

Add BEFORE
if (!empty($context['badges']['ownline']) && !allowedTo('moderate_forum'))
{
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], '<br />';
}
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo $message['member']['additional_groups']['stars'][$i], '<br />';

// Is karma display enabled? Total or +/-?


If that don't work then I really don't know what to do.
Title: Re: Stars and Badges
Post by: lolmao2 on September 12, 2011, 03:37:59 AM
YESS.... It worked Hcfwesker! Thanks so much for your time! Finally! Feels like a three days war that I've finally won! And I could never have won it without you! Thanks! woo!:)
Title: Re: Stars and Badges
Post by: H3lioz on September 12, 2011, 04:08:09 AM
Quote from: hcfwesker on September 09, 2011, 10:07:22 PM
Quote from: strafe on September 07, 2011, 08:12:01 AM
Hey man i downloaded the mod and its perfect but.. I got one question, can u tell me how i can make all the stars/ranks show in profile comments too?

Are you using Ultimate Profiles MOD or regular Profile Comments MOD to have comments on profile.

The personal messages shouldn't be too hard, just need to know what MOD you have for profile comments to be allowed.


Quote
Same problem in private messages would been gratefull if u replyed :) I havnt been on in a while so i havnt answered to ur post before now.. If u help me with this ill give u the 8$ :)

Try this, remember to make a backup of the file in case of an errors, but I got this to work on my site.


Themes/default/PersonalMessage.template.php

Find
// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
<li class="postgroup">', $message['member']['post_group'], '</li>';
echo '
<li class="stars">', $message['member']['group_stars'], '</li>';



REPLACE with
// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
<li class="stars">', $message['member']['group_stars'], '</li>';

if (!empty($context['badges']['ownline']) && !allowedTo('moderate_forum'))
{
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 class="postgroup">', $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 class="postgroup">', $message['member']['additional_groups']['stars'][$i], '</li>';


Thanks.

Im using Regular Profile Comments MOD :)
Title: Re: Stars and Badges
Post by: asdqwezxc1 on September 13, 2011, 01:14:23 PM
Can anyone help me set this up for me ? my forum is SMF 2.0 i'll pay them a fee for it.

Add me on msn : [email protected]
Title: Re: Stars and Badges
Post by: hcfwesker on September 13, 2011, 11:21:42 PM
Quote from: strafe on September 12, 2011, 04:08:09 AM
Im using Regular Profile Comments MOD :)

I can't install and test it, cause i use Ultimate Profile MOD for comments.  And it's too heavily customized on my forum to uninstall.  Sorry, I could guess at it all day, but rather only post up fixes I know will work after testing them.
Title: Re: Stars and Badges
Post by: H3lioz on September 14, 2011, 05:19:02 AM
Quote from: hcfwesker on September 13, 2011, 11:21:42 PM
Quote from: strafe on September 12, 2011, 04:08:09 AM
Im using Regular Profile Comments MOD :)

I can't install and test it, cause i use Ultimate Profile MOD for comments.  And it's too heavily customized on my forum to uninstall.  Sorry, I could guess at it all day, but rather only post up fixes I know will work after testing them.
Ah, well thanks anyways :)
Title: Re: Stars and Badges
Post by: Biology Forums on September 15, 2011, 05:13:35 PM
Nice
Title: Re: Stars and Badges
Post by: hctez on September 20, 2011, 10:05:11 PM
Hi, im using 2.0 RC5 and i want to use this mod  but when i try to install it with the package manager i get a lot of errors, can anyone tell me if it still works with my version? and if it does, how do i install it?.

Another question, is there a way to show the avatar BEFORE de stars/badges?

Thanks!!
Title: Re: Stars and Badges
Post by: hcfwesker on September 20, 2011, 10:12:03 PM
Quote from: hctez on September 20, 2011, 10:05:11 PM
Hi, im using 2.0 RC5 and i want to use this mod  but when i try to install it with the package manager i get a lot of errors, can anyone tell me if it still works with my version? and if it does, how do i install it?.

This is very common, you're gonna have to parse the mod and make manual edits to the files it calls for that are getting errors.  On the package install errors page, look at the files that are getting errors, then click the arrows to the left, which will bring up a pop-up page showing the edits needing to be made.    Once you make all the manual edits for files that are getting errors, just install the MOD afterwards, the errors will still show, cause the package can't make the edits, even after you do.  Just be sure to make backups of the files just in case of an error on your part.

QuoteAnother question, is there a way to show the avatar BEFORE de stars/badges?

Thanks!!

Yes, it's a simple edit, just place the edit for the stars & Badges MOD above the code for avatars in your Themes/default/Display.template.php file.
 
Title: Re: Stars and Badges
Post by: hctez on September 21, 2011, 09:57:21 AM
Thanks!!
Title: Re: Stars and Badges
Post by: hctez on September 21, 2011, 12:00:07 PM
One more thing, now i want to "center" the badges, not left-align.

Also i found a problem, after installing the mod, i can't see some symbols for example "ñ" or "´" (im from argentina, language=spanish), i see this instead �

Any help?

Thanks!!
Title: Re: Stars and Badges
Post by: LetterBox on September 22, 2011, 09:42:22 AM
Hello, i wish to install it on 2.1 on a custome theme, and when i parse, it shows

It failed <replace> ./sources/loap.php

and

<add before> ./sources/managesettings.php

and

<replace> ./themes/default/personalmessage.template.php

and

<replace> ./themes/default/display.template.php


I am totally a novice, would need step by step help on this.

Thanks!
Title: Re: Stars and Badges
Post by: Shawn90 on September 22, 2011, 10:53:58 AM
Yo Johny man I just installed your mod... I made a new membersgroup but when I upload the badge it's extremely huge. I resized it and reuploaded it and got the same results. Can you help me out man?
Title: Re: Stars and Badges
Post by: LetterBox on September 22, 2011, 02:47:29 PM
Just another update, do i go along with the install if there's error, and just add in this like first post says?

if (!empty($message['member']['additional_groups']['id']))
   for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
      echo $message['member']['additional_groups']['stars'][$i], '<br />';


-------------------------------------------------------------------------------------------------------------------

The parts which failed during the install parse :

<replace> ./sources/loap.php

and

<add before> ./sources/managesettings.php

and

<replace> ./themes/default/personalmessage.template.php

and

<replace> ./themes/default/display.template.php


Title: Re: Stars and Badges
Post by: hcfwesker on September 22, 2011, 07:25:35 PM
Quote from: LetterBox on September 22, 2011, 02:47:29 PM
Just another update, do i go along with the install if there's error,

All the files with show install errors, you have to manually make those edits.  Parse the mod on the package page where you downloaded it from, and check the file edits and make the changes.

OR

in the package manager, the page that tells you there's errors, click the arrow to the left of the file thats getting an error, and click it til a pop-up box appears.  that will show you what edits need to be made.  Make edits to all the files that get errors, then, install the MOD.

Always make backups before doing anything you're not sure of just as a safety precaution.
Title: Re: Stars and Badges
Post by: hcfwesker on September 22, 2011, 07:27:17 PM
Quote from: Shawn90 on September 22, 2011, 10:53:58 AM
Yo Johny man I just installed your mod... I made a new membersgroup but when I upload the badge it's extremely huge. I resized it and reuploaded it and got the same results. Can you help me out man?

try readding the image manually where you edits membergroups.  Or do a hard refresh, F5 on your keyboard.
Title: Re: Stars and Badges
Post by: LetterBox on September 23, 2011, 06:27:19 AM
Help on installing on custom theme please! Thanks!

And umm, does the badge go above or below the primary group's badge?
Title: Re: Stars and Badges
Post by: Shawn90 on September 23, 2011, 02:18:39 PM
Quote from: hcfwesker on September 22, 2011, 07:27:17 PM
Quote from: Shawn90 on September 22, 2011, 10:53:58 AM
Yo Johny man I just installed your mod... I made a new membersgroup but when I upload the badge it's extremely huge. I resized it and reuploaded it and got the same results. Can you help me out man?

try readding the image manually where you edits membergroups.  Or do a hard refresh, F5 on your keyboard.

So when I upload the badges to the profile do I use the HTML coding?

Update:
Here are some screen shots to show u what they look like.
Title: Re: Stars and Badges
Post by: 4Kstore on September 23, 2011, 05:46:27 PM
An alternative to this mod is http://www.simplemachines.org/community/index.php?topic=453194.0
For SMF 2.0 and 2.0.1
Grettings
Title: Re: Stars and Badges
Post by: Shawn90 on September 23, 2011, 06:59:17 PM
Quote from: 4kstore on September 23, 2011, 05:46:27 PM
An alternative to this mod is http://www.simplemachines.org/community/index.php?topic=453194.0
For SMF 2.0 and 2.0.1
Grettings

I'm running on the 1.1.15
Title: Re: Stars and Badges
Post by: JoeyD0831 on October 25, 2011, 01:39:37 AM
I'm able to hide groups I don't want visible in posts using the arrange IDs in feature and options but this doesn't hide them in my profile. How do I hide them in my profile?
Title: Re: Stars and Badges
Post by: hcfwesker on November 19, 2011, 04:36:05 AM
Quote from: Shawn90 on September 23, 2011, 02:18:39 PM
Quote from: hcfwesker on September 22, 2011, 07:27:17 PM
Quote from: Shawn90 on September 22, 2011, 10:53:58 AM
Yo Johny man I just installed your mod... I made a new membersgroup but when I upload the badge it's extremely huge. I resized it and reuploaded it and got the same results. Can you help me out man?

try readding the image manually where you edits membergroups.  Or do a hard refresh, F5 on your keyboard.

So when I upload the badges to the profile do I use the HTML coding?

Update:
Here are some screen shots to show u what they look like.

No, use the direct link.   Though, they should be uploaded to your database in an images folder.
Title: Re: Stars and Badges
Post by: Lord991 on January 03, 2012, 01:23:45 PM
How to fix this error, I am using 1.1.16  :(

8: Undefined index: post_group_stars
File: /Themes/default/Display.template.php
Line: 285


8: Undefined index: group_stars
File: /Themes/default/Display.template.php
Line: 283
Title: Re: Stars and Badges
Post by: hcfwesker on January 03, 2012, 01:51:06 PM
I think those errors has to do with the smf default group stars for member groups, not this MOD. 
Title: Re: Stars and Badges
Post by: Lord991 on January 03, 2012, 03:29:05 PM
I posted there, and they referred me to this topic, where to ask now?  :o

Edit: Here's the Display.template.php
Title: Re: Stars and Badges
Post by: sCeege on February 02, 2012, 05:56:20 PM
Has anyone managed to get this running with v2.0.2? This seems to be the most updated option of showing multiple group badges, but I'm running into errors when I'm installing to 2.0.2 =(
Title: Re: Stars and Badges
Post by: hcfwesker on February 02, 2012, 09:00:43 PM
Quote from: sCeege on February 02, 2012, 05:56:20 PM
Has anyone managed to get this running with v2.0.2? This seems to be the most updated option of showing multiple group badges, but I'm running into errors when I'm installing to 2.0.2 =(

http://www.simplemachines.org/community/index.php?topic=225743.msg3168718#msg3168718
Title: Re: Stars and Badges
Post by: sCeege on February 02, 2012, 09:22:59 PM
Quote from: hcfwesker on February 02, 2012, 09:00:43 PM
Quote from: sCeege on February 02, 2012, 05:56:20 PM
Has anyone managed to get this running with v2.0.2? This seems to be the most updated option of showing multiple group badges, but I'm running into errors when I'm installing to 2.0.2 =(

http://www.simplemachines.org/community/index.php?topic=225743.msg3168718#msg3168718

Yeah, I tried that link earlier as well, but the website hosting it has a broken registration page (required for download), and the author isn't publishing the download on the official mod database =(.
Title: Re: Stars and Badges
Post by: hcfwesker on February 02, 2012, 10:03:19 PM
Try the attached MOd in this link http://www.simplemachines.org/community/index.php?topic=225743.msg2644620#msg2644620

,ight have to emulate to SMF 2.0 in the package manager to install, but it works.
Title: Re: Stars and Badges
Post by: sCeege on February 02, 2012, 11:08:09 PM
Quote from: hcfwesker on February 02, 2012, 10:03:19 PM
Try the attached MOd in this link http://www.simplemachines.org/community/index.php?topic=225743.msg2644620#msg2644620

,ight have to emulate to SMF 2.0 in the package manager to install, but it works.

Wow thank you so so much! And it worked perfectly on 2.0.2 without emulation, if it helps the next person to come across this thread =).
Title: Re: Stars and Badges
Post by: ZarPrime on February 04, 2012, 12:17:09 AM
Personally, I wouldn't run a Mod that has not been submitted and accepted here for download on this site but that's just me.
Title: Re: Stars and Badges
Post by: hcfwesker on February 04, 2012, 12:33:04 AM
Quote from: ZarPrime on February 04, 2012, 12:17:09 AM
Personally, I wouldn't run a Mod that has not been submitted and accepted here for download on this site but that's just me.

Ok ..... not sure where that came from lol
Title: Re: Stars and Badges
Post by: GlitchPC on February 15, 2012, 12:43:48 PM
Thanks, for an awesome mod!
Title: Re: Stars and Badges
Post by: fullmoonya on February 17, 2012, 03:16:15 AM
where are the images of the mod?
Title: Re: Stars and Badges
Post by: GlitchPC on February 17, 2012, 11:38:10 AM
Quote from: fullmoonya on February 17, 2012, 03:16:15 AM
where are the images of the mod?

From the first post of this modification...

Quote- This mod will display additional group stars and or badges
     or whatever you use as stars in membergroup settings.

It does not supply you with the images...you supply your own rank images or stars...
Title: Re: Stars and Badges
Post by: fullmoonya on February 18, 2012, 09:13:56 PM
Quote from: GlitchPC on February 17, 2012, 11:38:10 AM
Quote from: fullmoonya on February 17, 2012, 03:16:15 AM
where are the images of the mod?

From the first post of this modeification...
yes. i see that. but where are those badge in the mod? i dont see any badge image in the mod i downloaded.
Title: Re: Stars and Badges
Post by: GlitchPC on February 18, 2012, 09:24:00 PM
Like I said...there are NO images included in this mod.  You supply your own images.  A "badge" is an image.
Title: Re: Stars and Badges
Post by: fullmoonya on February 18, 2012, 09:27:18 PM
Quote from: GlitchPC on February 18, 2012, 09:24:00 PM
Like I said...there are NO images included in this mod.  You supply your own images.  A "badge" is an image.
oh. i thought there are images like in the image posted. sorry for mistakes.
Title: Re: Stars and Badges
Post by: rzm25 on February 25, 2012, 12:40:22 PM
It seems I'm the first to mention this, but this mod is rather incompatable with 2.0.3

After being installed and activated this mod cuts off posts, leaving the stump but deleting all other data past a certain point. This means all members are limited to making posts to what seems to be somewhere between 500 and 600 characters. I have this as the only installed mod on a brand new 2.0.3 install. I've tested 2 different themes, but I assume the issues is something to do with the display.template file.

This is a forum breaker, not a minor glitch.

Is there anyone available with the know-how to help me work out a solution?
Title: Re: Stars and Badges
Post by: fedxrx on February 25, 2012, 02:47:39 PM
i got an error, but suspect its due to other mods installed...

Type Action Description
1. Execute Modification ./Sources/Load.php Test failed
2. Execute Modification ./Themes/default/Display.template.php Test successful
3. Execute Modification ./Themes/default/Profile.template.php Test successful
4. Execute Modification ./Themes/default/PersonalMessage.template.php Test successful
5. Execute Modification ./Themes/babylon/Display.template.php Test successful
6. Execute Modification ./Themes/classic/Display.template.php Test successful
7. Execute Modification ./Themes/helios_multi11/Display.template.php Skipping file
8. Execute Modification ./Themes/wowdk_114v1/Display.template.php Skipping file
9. Execute Modification ./Themes/Aa_New_Damage/Display.template.php Skipping file
10. Execute Modification ./Themes/cs-dk114v1/Display.template.php Skipping file
Title: Re: Stars and Badges
Post by: CT Carruthers on February 29, 2012, 03:24:01 PM
Quote from: hcfwesker on February 02, 2012, 10:03:19 PM
Try the attached MOd in this link http://www.simplemachines.org/community/index.php?topic=225743.msg2644620#msg2644620

,ight have to emulate to SMF 2.0 in the package manager to install, but it works.

Thank You, got it installed and working.
Title: Re: Stars and Badges
Post by: rzm25 on March 01, 2012, 09:29:24 AM
Scratch my last post, turns out it's most likely simpleportal not liking 2.0.3
Title: Re: Stars and Badges
Post by: GlitchPC on March 01, 2012, 10:46:52 AM
As far as I know...there is no 2.0.3 for SMF...at least, not yet.  This mod works fine on SMF 2.0.2 for my default and custom theme.
Title: Re: Stars and Badges
Post by: rzm25 on March 04, 2012, 07:03:45 AM
Sorry yeah that was a massive error on my part, but yeah it is this mod is causing something similar to a character limit. It's quite strange. Can anybody help, please?
Title: Re: Stars and Badges
Post by: Colyn on March 09, 2012, 06:36:43 AM
I have this running on 1.1.16 and it is working fine but I have a problem in the Forum in posts. Not all Badges are displaying ... in the Profile they show all but in posts they do not show.

Is there a limit that will display in Posts ?

Thank you.
Title: Re: Stars and Badges
Post by: avepeachy on April 06, 2012, 09:47:33 PM
Okay - I searched through this topic with every possible combination of words to try to find my answer, and I couldn't find it. That being said,

I am running 2.0.2 and my theme is a variation of Curve called Outline.

Is there any way to have the badges show up side by side on a single line as opposed to their own individual lines? My members can have upwards of 5 or 6 badges, and so that creates quite a stretch. It would work better if they were in line with each other.
Title: Re: Stars and Badges
Post by: KevinW on April 08, 2012, 10:00:14 AM
1.    Execute Modification    ./Sources/Load.php    Test failed
      1.    Replace    ./Sources/Load.php    Test successful
      2.    Replace    ./Sources/Load.php    Test successful
      3.    Replace    ./Sources/Load.php    Test failed
*    2.    Execute Modification    ./Sources/ManageSettings.php    Test failed
      1.    Replace    ./Sources/ManageSettings.php    Test failed
*    3.    Execute Modification    ./Themes/default/Profile.template.php    Test successful
*    4.    Execute Modification    ./Themes/default/PersonalMessage.template.php    Test failed
      1.    Replace    ./Themes/default/PersonalMessage.template.php    Test failed
*    5.    Execute Modification    ./Themes/default/Display.template.php    Test failed
      1.    Replace    ./Themes/default/Display.template.php    Test failed
   6.    Execute Modification    ./Themes/babylon/Display.template.php    Skipping file
   7.    Execute Modification    ./Themes/classic/Display.template.php    Skipping file
*    8.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful
*    9.    Execute Modification    ./Themes/default/languages/ManageSettings.english.php    Test successful
Title: Re: Stars and Badges
Post by: TheListener on April 08, 2012, 10:30:23 AM
@KevinW

Which theme are you using?

Forum version?

Where the test failed notices are means a manual edit is required.
Title: Re: Stars and Badges
Post by: daenerys on May 16, 2012, 12:22:20 PM
I'm using this mod on my forum (2.0.2) and it works great, but I have another question. Is there a way to make the additional member group names appear as well, making it function the same way this mod does where you can go into Features & Options and provide the group id number for which badges you want shown? Or, is there another mod that y'all can point me in the direction of?

Title: Re: Stars and Badges
Post by: FireDitto on December 14, 2012, 06:23:21 AM
Hi!

I was wondering if anyone knew how to adjust this code, in order to display the additional badges in a horizontal manner. The badges being used are 50x50px, and we'd like to be able to put 4 of them together (200px)

Is anyone able to help out? I'm not that amazing with this stuff.

Thanks!

      {
         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 class="stars">', $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 class="stars">', $message['member']['additional_groups']['stars'][$i], '</li>';

Title: Re: Stars and Badges
Post by: Colyn on February 23, 2013, 11:18:48 AM
I am on SMF 2.0.3 and use the Bluebird Theme. The Install Package fails with many errors ... any advice ?
Title: Re: Stars and Badges
Post by: mark7144 on March 04, 2013, 05:25:57 PM
This may have been mentioned before but when I set a colour for an Additional Group, that colour is not applied in the 'Who's Online' list. Where as, Primary Groups do show the colour.
Title: Re: Stars and Badges
Post by: Arantor on March 04, 2013, 05:42:13 PM
That's nothing to do with this mod.

The colouring for who's online is a core feature and it has never, ever taken into account additional groups, mostly because additional groups are never indicated normally.

Here's the real question: a user has two groups attached with different colours, which should it use?
Title: Re: Stars and Badges
Post by: mark7144 on March 04, 2013, 05:44:44 PM
Quote from: Arantor on March 04, 2013, 05:42:13 PM
Here's the real question: a user has two groups attached with different colours, which should it use?

There are two groups but only one has a colour defined. The additional membergroup is the one with the colour.

It's a bit strange but I have to make the 'Donor' group as a primary for my custom code to work. Which means the important groups like 'Moderator' have to be made as Additional.
Title: Re: Stars and Badges
Post by: Arantor on March 04, 2013, 05:49:08 PM
I'm not being funny but I don't actually care about the example you gave. I'm telling you why SMF doesn't do it for additional groups - because there's no way to identify whether one group is more important than another. So it only ever cares about the primary group. In your specific case you could probably rewrite that code to behave how you want, but it's in some random file, probably Subs-MembersOnline.php where you'd have to modify the queries to get that information.
Title: Re: Stars and Badges
Post by: mark7144 on March 04, 2013, 05:50:39 PM
Right got you. I missed the point you were making with the question you asked me but understand now. :)
Title: Re: Stars and Badges
Post by: ninja111 on March 06, 2013, 10:16:46 PM
Hello,

I am having a error. I'm trying to manually install this mod, and i went into;
./Sources/ManageSettings.php
and I have no such thing of;
// Stats, compression, cookies.... server type stuff.

If anyone knows why, or if he accidentally put the wrong file name to go to,
then please tell me.

Thanks,
Ninja111
Title: Re: Stars and Badges
Post by: Shambles on March 07, 2013, 03:20:23 AM
./Sources/ModSettings.php


Use an editor such as Notepad++ which has a "find in files" feature ;)
Title: Re: Stars and Badges
Post by: Jahsun on August 23, 2013, 06:49:13 PM
Hello all,
I know this topic is a little old but i am having trouble with the badges. Install went ok but i have two badges showing per group.

Can anyone help? i have attached a screen shot.

Thank you
Title: Re: Stars and Badges
Post by: TheListener on August 23, 2013, 06:50:21 PM
Any errors on install?

Are there any errors in your error log?
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on August 23, 2013, 07:28:38 PM
Quote from: Jahsun3777 on August 23, 2013, 06:49:13 PM
Hello all,
I know this topic is a little old but i am having trouble with the badges. Install went ok but i have two badges showing per group.

Can anyone help? i have attached a screen shot.

Thank you

Looks like you may have the code installed twice in the Display.template.php file.
Title: Re: Stars and Badges
Post by: Jahsun on August 23, 2013, 07:34:27 PM
Quote from: Grumpy Old Sod on August 23, 2013, 06:50:21 PM
Any errors on install?

Are there any errors in your error log?

Hello,
I am not 100% sure but i think there was a error for themes/core but could not find the right code to edit. This was the only error i can recall.

No there are no errors in error log.

Thank you again
Title: Re: Stars and Badges
Post by: TheListener on August 23, 2013, 07:37:42 PM
So the next route to follow is BKs suggestion.

Unless you use the Core theme then that particular error can be ignored.
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on August 23, 2013, 07:40:46 PM
Also, why is the member an admin and a global mod?
If a member is an admin, they do not need to be listed as a GM, since they can do what a GM does, and more.
There is no need for an admin to be placed in the GM group.
Title: Re: Stars and Badges
Post by: Jahsun on August 23, 2013, 07:52:07 PM
Thank you BK and GOS,

I do not have a display.template.php in the current theme but i think i can recall install badges in core and default /themes. Should i remove the code from one? Core or default?

The only instance i can find for stars and badges in Themes/core/Display.template.php is below:

if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
<li>', $message['member']['group'], '</li>';

// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
<li>', $message['member']['post_group'], '</li>';
echo '
<li>', $message['member']['group_stars'], '</li>';

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>';


But for Themes/default/Display.template.php i can see that smfshop code got placed between some how.

// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
<li class="postgroup">', $message['member']['post_group'], '</li>';
echo '
<li class="stars">', $message['member']['group_stars'], '</li>';

// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<li class="avatar">
<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
', $message['member']['avatar']['image'], '
</a>
</li>';

// Show how many posts they have made.
if (!isset($context['disabled_fields']['posts']))
echo '
<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';

// Begin SMFShop 2.3 (Build 11) code
echo '
<li>', $modSettings['shopCurrencyPrefix'], $message['member']['money'], $modSettings['shopCurrencySuffix'], '</li>
<li><a href="', $scripturl, '?action=shop;do=invother2;member=', $message['member']['username'], '">', $txt['shop_display_view_inventory'], '</a></li>
<li><a href="', $scripturl, '?action=shop;do=sendmoney;member=', $message['member']['username'], '">', $txt['shop_display_send_money'], ' ', $message['member']['name'], '</a></li>';
//END SMFShop code

if (!empty($context['badges']['ownline']) && !allowedTo('moderate_forum'))
{
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], '<br />';
}
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo $message['member']['additional_groups']['stars'][$i], '<br />';


Thank you guy again so much. What is the best approach here?
Title: Re: Stars and Badges
Post by: TheListener on August 23, 2013, 07:54:35 PM
QuoteThank you guy again so much. What is the best approach here?

If the theme you use does not have the display.template file then you would use the default themes display template file.
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on August 23, 2013, 08:15:11 PM
Themes/default/Display.template.php

DO A BACK UP FIRST!!!!! :)

Replace:
// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
<li class="postgroup">', $message['member']['post_group'], '</li>';
echo '
<li class="stars">', $message['member']['group_stars'], '</li>';

// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<li class="avatar">
<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
', $message['member']['avatar']['image'], '
</a>
</li>';

// Show how many posts they have made.
if (!isset($context['disabled_fields']['posts']))
echo '
<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';

// Begin SMFShop 2.3 (Build 11) code
echo '
<li>', $modSettings['shopCurrencyPrefix'], $message['member']['money'], $modSettings['shopCurrencySuffix'], '</li>
<li><a href="', $scripturl, '?action=shop;do=invother2;member=', $message['member']['username'], '">', $txt['shop_display_view_inventory'], '</a></li>
<li><a href="', $scripturl, '?action=shop;do=sendmoney;member=', $message['member']['username'], '">', $txt['shop_display_send_money'], ' ', $message['member']['name'], '</a></li>';
//END SMFShop code

if (!empty($context['badges']['ownline']) && !allowedTo('moderate_forum'))
{
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], '<br />';
}
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo $message['member']['additional_groups']['stars'][$i], '<br />';


With:
// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
<li class="postgroup">', $message['member']['post_group'], '</li>';
echo '
<li>', $message['member']['group_stars'], '</li>';

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>';

// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<li class="avatar">
<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
', $message['member']['avatar']['image'], '
</a>
</li>';

// Show how many posts they have made.
if (!isset($context['disabled_fields']['posts']))
echo '
<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';

// Begin SMFShop 2.3 (Build 11) code
echo '
<li>', $modSettings['shopCurrencyPrefix'], $message['member']['money'], $modSettings['shopCurrencySuffix'], '</li>
<li><a href="', $scripturl, '?action=shop;do=invother2;member=', $message['member']['username'], '">', $txt['shop_display_view_inventory'], '</a></li>
<li><a href="', $scripturl, '?action=shop;do=sendmoney;member=', $message['member']['username'], '">', $txt['shop_display_send_money'], ' ', $message['member']['name'], '</a></li>';
//END SMFShop code
Title: Re: Stars and Badges
Post by: Jahsun on August 23, 2013, 08:39:48 PM
Quote from: BurkeKnight on August 23, 2013, 08:15:11 PM
Themes/default/Display.template.php

DO A BACK UP FIRST!!!!! :)

Replace:
// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
<li class="postgroup">', $message['member']['post_group'], '</li>';
echo '
<li class="stars">', $message['member']['group_stars'], '</li>';

// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<li class="avatar">
<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
', $message['member']['avatar']['image'], '
</a>
</li>';

// Show how many posts they have made.
if (!isset($context['disabled_fields']['posts']))
echo '
<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';

// Begin SMFShop 2.3 (Build 11) code
echo '
<li>', $modSettings['shopCurrencyPrefix'], $message['member']['money'], $modSettings['shopCurrencySuffix'], '</li>
<li><a href="', $scripturl, '?action=shop;do=invother2;member=', $message['member']['username'], '">', $txt['shop_display_view_inventory'], '</a></li>
<li><a href="', $scripturl, '?action=shop;do=sendmoney;member=', $message['member']['username'], '">', $txt['shop_display_send_money'], ' ', $message['member']['name'], '</a></li>';
//END SMFShop code

if (!empty($context['badges']['ownline']) && !allowedTo('moderate_forum'))
{
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], '<br />';
}
elseif (!empty($message['member']['additional_groups']['id']))
for ($i = 0; $i < count($message['member']['additional_groups']['id']); $i++)
echo $message['member']['additional_groups']['stars'][$i], '<br />';


With:
// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
<li class="postgroup">', $message['member']['post_group'], '</li>';
echo '
<li>', $message['member']['group_stars'], '</li>';

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>';

// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<li class="avatar">
<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
', $message['member']['avatar']['image'], '
</a>
</li>';

// Show how many posts they have made.
if (!isset($context['disabled_fields']['posts']))
echo '
<li class="postcount">', $txt['member_postcount'], ': ', $message['member']['posts'], '</li>';

// Begin SMFShop 2.3 (Build 11) code
echo '
<li>', $modSettings['shopCurrencyPrefix'], $message['member']['money'], $modSettings['shopCurrencySuffix'], '</li>
<li><a href="', $scripturl, '?action=shop;do=invother2;member=', $message['member']['username'], '">', $txt['shop_display_view_inventory'], '</a></li>
<li><a href="', $scripturl, '?action=shop;do=sendmoney;member=', $message['member']['username'], '">', $txt['shop_display_send_money'], ' ', $message['member']['name'], '</a></li>';
//END SMFShop code


Hi BK,
Thank you for your help but the error still remains even after replacing code.
Title: Re: Stars and Badges
Post by: TheListener on August 23, 2013, 08:41:21 PM
What is your forums link?
Title: Re: Stars and Badges
Post by: Burke ♞ Knight on August 23, 2013, 08:44:33 PM
Did that fix the location, though?

A new screenshot would be good.

Also, check the Sources/Load.php file for duplicate for this mod.
Title: Re: Stars and Badges
Post by: Jahsun on August 23, 2013, 08:45:23 PM
Quote from: BurkeKnight on August 23, 2013, 07:40:46 PM
Also, why is the member an admin and a global mod?
If a member is an admin, they do not need to be listed as a GM, since they can do what a GM does, and more.
There is no need for an admin to be placed in the GM group.

Hi BK,
I only did that to test each group to see if it was just certain groups have a double badge. I guest i should have taken a screen shot after  :).

Thank you very much for the heads up though.
Title: Re: Stars and Badges
Post by: TheListener on August 23, 2013, 08:47:09 PM
Quote from: Grumpy Old Sod on August 23, 2013, 08:41:21 PM
What is your forums link?

/me doesn't mind his questions being ignored.
Title: Re: Stars and Badges
Post by: Jahsun on August 23, 2013, 09:53:19 PM
Quote from: Grumpy Old Sod on August 23, 2013, 08:47:09 PM
Quote from: Grumpy Old Sod on August 23, 2013, 08:41:21 PM
What is your forums link?

/me doesn't mind his questions being ignored.

LOL thank you very much Grumpy Old Sod but BK suggestion really did it. Sources/Load.php. I will be posting my forum for review/showcase soon as well as add a siggy as soon as the site is ready and i will post a link here as well.  :) Thank you again so much.

Quote from: BurkeKnight on August 23, 2013, 08:44:33 PM
Did that fix the location, though?

A new screenshot would be good.

Also, check the Sources/Load.php file for duplicate for this mod.
Yes it did fix the location, was not paying attention but yes thank you very much BK  :)
There was a dup. in Sources/Load.php and that solved it for me. Thank you so much uploading screen shot now.

Thank you guys again so much, you have been so helpful. Lost my login info from a fews years back and i must say the community has changed according to my experience. You guys are the best  8)
Title: Re: Stars and Badges
Post by: TheListener on August 23, 2013, 10:01:53 PM
As long as it is solved that's all that matters.

:)

Showcase is a good idea but not if the forum uses the default theme.

;)
Title: Re: Stars and Badges
Post by: IcePhreak on November 16, 2013, 12:51:57 AM
Please update this!! I really would enjoy this mod  : 8) Anyone who could update it would be awesome, any info update would be appreciated  :laugh:
Title: Re: Stars and Badges
Post by: Arantor on November 16, 2013, 12:55:37 AM
No-one can legally update it without the mod author's permission and he hasn't been here in 4 years.
Title: Re: Stars and Badges
Post by: IcePhreak on November 16, 2013, 01:26:38 AM
Quote from: Arantor on November 16, 2013, 12:55:37 AM
No-one can legally update it without the mod author's permission and he hasn't been here in 4 years.
Oh man.. Is there anyway a new one can be made but of a different type?
Title: Re: Stars and Badges
Post by: Arantor on November 16, 2013, 08:25:04 AM
Sure, someone just has to write it. This is not a quick task, you know.
Title: Re: Stars and Badges
Post by: Papoune57 on December 19, 2013, 04:02:48 PM
Please upgrade for 2.0.6  :'(
Title: Re: Stars and Badges
Post by: Arantor on December 19, 2013, 04:07:00 PM
Quote from: Arantor Beeblebrox the First on November 16, 2013, 12:55:37 AM
No-one can legally update it without the mod author's permission and he hasn't been here in 4 years.
Title: Re: Stars and Badges
Post by: Cmely on April 20, 2014, 03:06:44 AM
Hello everybody,

I've installed the version 2.3 found in this thread and had no installation problem with it.
But I don't have anymore badges for post count based groups.

Is there a way to show that also ?

Thank you for your help.
Title: Re: Stars and Badges
Post by: margarett on April 20, 2014, 04:10:05 AM
/me whistles (http://custom.simplemachines.org/mods/index.php?mod=3805)
Title: Re: Stars and Badges
Post by: brynn on July 20, 2015, 01:10:34 AM
Hi Friends,
I tried to install this on SMF 2.0.10 with Tiny Portal 1.107, but over half the tests failed.  Any chance this could be updated to current versions?

I've been to the mod site and searched it fairly thoroughly, but don't see any other mod for badges, for current versions of SMF.  I surely would appreciate if this could be updated.

Or maybe someone could point me to a mod that I might have overlooked?

Thank you very much  :)
Title: Re: Stars and Badges
Post by: margarett on July 20, 2015, 04:47:58 AM
No, it can't really be updated due to licensing restrictions.
Check the post before yours, there is an alternative there ;)
Title: Re: Stars and Badges
Post by: brynn on July 20, 2015, 05:25:29 AM
Thanks margaret.

I've read back a couple of pages of posts, but didn't see alternatives.  I saw some tweaks for certain errors or changing some behaviors, but I didn't see a clear alternative.

Hhmm, did you mean "Also, check the Sources/Load.php file for duplicate for this mod."?

If there are licensing issues, then would it be appropriate to post in the Mod Requests board, to ask for a new mod to be written?

Thanks again  :)
Title: Re: Stars and Badges
Post by: margarett on July 20, 2015, 05:41:33 AM
Quote from: margarett on April 20, 2014, 04:10:05 AM
/me whistles (http://custom.simplemachines.org/mods/index.php?mod=3805)
;)
Title: Re: Stars and Badges
Post by: brynn on July 20, 2015, 06:01:38 AM
No, that's not the same thing.  It's similar, I guess.  But I wanted to be able to create the new graphics for the badges.  That one just shows the membergroup with no special badge

I did try to install it though (long time ago) and the test fails for my default theme only.  But I didn't want it bad enough to get help installing.

Thanks for your help margaret :)
Title: Re: Stars and Badges
Post by: margarett on July 20, 2015, 06:13:21 AM
You can create new graphics for the badges. Look at my badge here, it's (obviously) custom ;)

When you configure the membergroup just set the number of "stars" to 1 and give it the name of your custom badge. Of course that badge must be uploaded to your theme's images folder ;)
Title: Re: Stars and Badges
Post by: brynn on July 21, 2015, 08:36:09 AM
But I thought this mod allows to have both stars and badge.  Already I have stars for the membergroup.  But everyone (all member groups) has stars.  I thought extra badge might be nice.

I will investigate your suggestion though.  Maybe can find a way?

Thanks again  :)
Title: Re: Stars and Badges
Post by: Kindred on July 21, 2015, 08:42:22 AM
stars = badges

with this mod (and the others similar to it) you can show the badges/stars for MULTIPLE membergroups that the user belongs to.
Title: [Help] - Tiles
Post by: John12 on July 23, 2015, 09:35:58 AM
I have attached the SMF "Displaying additional group" and all the great work we pads are displayed on the profile, but I wanted to be like as I put in the picture, it means that the primary plate is first over the avatars, and other tiles after all avatars.
I saw this on a couple of forums, so if someone knows to help me ..
Title: Re: [Help] - Tiles
Post by: margarett on July 23, 2015, 09:37:37 AM
Which MOD is it?

Please use the respective support topic for these "customization" questions ;)
Title: Re: [Help] - Tiles
Post by: John12 on July 23, 2015, 09:48:48 AM
This mode http://custom.simplemachines.org/mods/?mod=1110

Sorry I'm new to the forum and just do not know English so good, I use google translator
Title: Re: [Help] - Tiles
Post by: margarett on July 23, 2015, 10:04:13 AM
You should use this support topic, then:
http://www.simplemachines.org/community/index.php?topic=225743.0
;)

Specifically there is this post that should help you:
Quote from: hcfwesker on September 20, 2011, 10:12:03 PM
QuoteAnother question, is there a way to show the avatar BEFORE de stars/badges?

Thanks!!

Yes, it's a simple edit, just place the edit for the stars & Badges MOD above the code for avatars in your Themes/default/Display.template.php file.

Title: Re: [Help] - Tiles
Post by: John12 on July 23, 2015, 10:24:01 AM
Can you explain more precisely what he wrote, "It's a simple edit, just place the edit for the stars & Badges MOD above the code for avatars in your Themes / default / Display.template.php file." how to do this, or to ask in this topic?  :)
Title: Re: [Help] - Tiles
Post by: Illori on July 23, 2015, 10:25:02 AM
ask in the topic linked and the author of the mod should be able to help you.
Title: Re: [Help] - Tiles
Post by: margarett on July 23, 2015, 10:30:28 AM
Actually he won't :P Bulakbol is AWOL for ages.
@John12, but we need to keep MOD related questions in each MOD's support topic ;)

edit: hold on, I'll just merge these.

edit2: done
Title: Re: Stars and Badges
Post by: margarett on July 23, 2015, 10:33:57 AM
Quote from: John12 on July 23, 2015, 10:24:01 AM
Can you explain more precisely what he wrote, "It's a simple edit, just place the edit for the stars & Badges MOD above the code for avatars in your Themes / default / Display.template.php file." how to do this, or to ask in this topic?  :)
Can you please attach your Display.template.php? If the theme you are using doesn't have such file, attach the one from "default"
Title: Re: Stars and Badges
Post by: John12 on July 23, 2015, 10:42:26 AM
http://pastebin.com/zgjMEqTj Here I put on pastebin.com
Title: Re: Stars and Badges
Post by: margarett on July 23, 2015, 10:47:31 AM
This
                        if (!empty($context['badges']['ownline']) && !allowedTo('moderate_forum'))
                {
                        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 class="postgroup">', $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 class="postgroup">', $message['member']['additional_groups']['stars'][$i], '</li>';

Should be moved below this (instead of above where it is right now):
                                // Show avatars, images, etc.?
                        if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
                                echo '
                                                                <li class="avatar">
                                                                        <a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
                                                                                ', $message['member']['avatar']['image'], '
                                                                        </a>
                                                                </li>';
Title: Re: Stars and Badges
Post by: John12 on July 23, 2015, 11:11:37 AM
Quote from: margarett on July 23, 2015, 10:47:31 AM
This
                        if (!empty($context['badges']['ownline']) && !allowedTo('moderate_forum'))
                {
                        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 class="postgroup">', $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 class="postgroup">', $message['member']['additional_groups']['stars'][$i], '</li>';

Should be moved below this (instead of above where it is right now):
                                // Show avatars, images, etc.?
                        if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
                                echo '
                                                                <li class="avatar">
                                                                        <a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
                                                                                ', $message['member']['avatar']['image'], '
                                                                        </a>
                                                                </li>';


Showing me error now
Title: Re: Stars and Badges
Post by: margarett on July 23, 2015, 11:14:18 AM
I'm sorry, I left my crystal ball in my other jeans ;D

I can't really guess which error you get. So I need you to tell me the complete error you got and ATTACH (not pastebin) the file as it stands right now.
Title: Re: Stars and Badges
Post by: John12 on July 23, 2015, 11:28:58 AM
Whether you can modify it and send me Display.template.php? Uploud I file below
Title: Re: Stars and Badges
Post by: margarett on July 23, 2015, 11:34:17 AM
Try this
Title: Re: Stars and Badges
Post by: John12 on July 23, 2015, 11:38:56 AM
Quote from: margarett on July 23, 2015, 11:34:17 AM
Try this
Oh, you're the king, thank you very much  :D
Title: Re: Stars and Badges
Post by: electrumowl on June 14, 2016, 12:17:12 AM
Hello!  I realize that the developer may no longer be providing support for the mod, but on the off chance that's not true....

I've successfully installed and set up the mod, but have run into a problem -- badges only show up to users with administrator permissions.  I've played with every permission setting I can think of and still can't figure out what's wrong, but I would like my badges to be visible to anyone visiting the site. Here is my site (work in progress...) --> http://pantheonrpg.net/ (http://pantheonrpg.net/)

Anyway, if you're a visual person this is what it looks like when I'm using an admin account:  http://i.imgur.com/wHAoUxd.jpg (http://i.imgur.com/wHAoUxd.jpg)

And this is what the same post looks like when the account is not an admin account: http://i.imgur.com/wohk71V.jpg (http://i.imgur.com/wohk71V.jpg)

Any help anyone can give, whether suggestions or solutions, would be much appreciated.  Thank you!

P.S. Sorry about the weird external links, I haven't made 10 posts on the forum yet so it won't allow me to have working urls. Hopefully you can just copy and paste-ish.
Title: Re: Stars and Badges
Post by: Grammy on June 14, 2016, 06:56:41 AM
Quote from: electrumowl on June 14, 2016, 12:17:12 AM
Hello!  I realize that the developer may no longer be providing support for the mod, but on the off chance that's not true....

I've successfully installed and set up the mod, but have run into a problem -- badges only show up to users with administrator permissions.  I've played with every permission setting I can think of and still can't figure out what's wrong, but I would like my badges to be visible to anyone visiting the site. Here is my site (work in progress...) --> http://pantheonrpg.net/ (http://pantheonrpg.net/)

Anyway, if you're a visual person this is what it looks like when I'm using an admin account:  http://i.imgur.com/wHAoUxd.jpg (http://i.imgur.com/wHAoUxd.jpg)

And this is what the same post looks like when the account is not an admin account: http://i.imgur.com/wohk71V.jpg (http://i.imgur.com/wohk71V.jpg)

Any help anyone can give, whether suggestions or solutions, would be much appreciated.  Thank you!

P.S. Sorry about the weird external links, I haven't made 10 posts on the forum yet so it won't allow me to have working urls. Hopefully you can just copy and paste-ish.


While you're in this topic, if you do a search (above, right) for the words "only admin" (set the pulldown to "This Topic") others have had this problem.  (Make sure your header is not collapsed, so that you can see the search field.)  This is one of the results that came up:   http://www.simplemachines.org/community/index.php?topic=225743.msg2847125#msg2847125 (http://www.simplemachines.org/community/index.php?topic=225743.msg2847125#msg2847125)  There are a few other links.  Hope you find something that helps.   :)
Title: Re: Stars and Badges
Post by: electrumowl on June 14, 2016, 04:11:01 PM
That's already helpful. Thank you!
Title: Re: Stars and Badges
Post by: Raffoz on September 28, 2018, 06:19:44 AM
This is and was a wonderful MOD.

I can't understand why I can't see a lot of badges I set for my groups.
Better:
- I see all of them;
- Users see just some of them.

I read the topic but I couldn't find the right answer or solution.

Is there someone who could help me? :)
Title: Re: Stars and Badges
Post by: -Rock Lee- on September 28, 2018, 09:25:54 AM
@Raffaele1977 When did you begin to notice the problem? It may be some issue of permissions possibly although what your url to be able to see the problem.


Regards!