Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Thantos on April 04, 2005, 10:03:46 PM

Title: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 04, 2005, 10:03:46 PM
Link to Mod (http://mods.simplemachines.org/index.php?mod=115)

This mod allows you to display multiple badges for each user.  It also allows you to determine if a badge should be show if it's an additional group
on a per group basis.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: DoW Kid Rock on April 07, 2005, 11:30:19 PM
can't seem to figure out how to add badges to a member.....must be not looking hard enough

just looked in membergroups.  maybe I misread this, but I was thinking that I could add my own badges on a member by member basis.  is that true or is just per membergroup?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 07, 2005, 11:41:36 PM
Its on a membergroup basis.  By default it won't show them if the group is secondary.  To make them visible you go to:
admin -> Edit membergroups -> modify -> Show the stars even if the group is a secondary group?:
Title: Re: Show Multiple Badges (AKA Stars)
Post by: NiXnAx on April 10, 2005, 02:00:25 PM
Could you make a option to show the Group name too, in addition to the star(s)

oh, and it wont show the Post based group stars if the user is in a static group
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 10, 2005, 03:16:04 PM
Version 0.2:
  - Post groups will now be show if they are checked AND the user has a primary group
  - Added in a theme option that will display the additonal groups names with the badges
Title: Re: Show Multiple Badges (AKA Stars)
Post by: NiXnAx on April 10, 2005, 03:54:18 PM
I'm not sure if you got me correct, I were thinking about something like this:

Show the stars even if the group is a secondary group?:                   [ ]
Show the membergroup in posts and profile if it is a secondary group: [ ]

That way I can show witch group a user is in without needing to show the group badge. (when there is no use in showing it)

The usergroup name should be shown below the Primary Membergroup, and not above (or beside, as it is now) the badge. The post based images should be at the bottom of the badges, and they don't need the name on the group because this is an option (to hide it) in the template options.


Otherwise I love the idea of this mod, if it is a too much problem I can try do do it myself and post my idea to it
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 10, 2005, 04:36:59 PM
So you want on a per group basis:
<Name>
<Primary Group Name>
<Secondary Group Names>
<Post Group Name>
<stars>
?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: NiXnAx on April 10, 2005, 05:04:28 PM
Yea :) that's how I would like to have it

<Name>
<Primary Group Name>
<Secondary Group Names>
<Post Group Name>
<Primary Group Badge(star)>
<Secondary Group Badge(star)>
<stars>
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 10, 2005, 05:11:29 PM
I can make another mod for the names as I'd prefer to keep this one about the badges only.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: NiXnAx on April 10, 2005, 06:35:40 PM
That would be great  :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 11, 2005, 03:48:44 PM
I pulled down version 0.2 and will be redoing it without the names.  If you currently have it I'm sorry but its just too dang ugly the way it is
Title: Re: Show Multiple Badges (AKA Stars)
Post by: megacelt on April 13, 2005, 12:41:12 AM
hmm, tried changing the mod files to apply to the file in my theme:

<file name="/public_html/smf/Themes/red/Modifications.english.php">
   <operation>
      <search position="before"><![CDATA[<?php
]]></search>
      <add><![CDATA[
$txt['membergroups_showAddBadge'] = "Show the stars even if the group is a secondary group?";
]]></add>
   </operation>
</file>

</modification>

but does not apparently work as this addition does not show in the package manager list of install actions. Suggestion?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 13, 2005, 01:10:09 AM
Does Modifications.english.php exist in that directory?

If you can't use the package manager to do it, just download the file add the line in and the reupload it
Title: Re: Show Multiple Badges (AKA Stars)
Post by: megacelt on April 13, 2005, 02:49:56 AM
Quite right, made an error on the path, and corrected it to:

<file name="/public_html/smf/Themes/red/languages/Modifications.english.php">
   <operation>
      <search position="before"><![CDATA[<?php
]]></search>
      <add><![CDATA[
$txt['membergroups_showAddBadge'] = "Show the stars even if the group is a secondary group?";
]]></add>
   </operation>
</file>

</modification>

However still did not work.  I guess I'll try the the manual method, I just try to avoid that due to upgrades and other changes making things easier to uninstall and re-install with package manager, without having to go back and search edit files by hand.  Particularly as I understand you will shortly be coming out with a new version of the mod.  By the way, this will be very helpful to my site, thanks for developing it.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: skizip on April 13, 2005, 01:51:03 PM
i've just installed .1 since .2 is currently down, but I can't get it to work.  I installed through the packagae manager, and then checked my server to confirm that the date on the affected files had indeed changed.  I choose Modify Membergroup and the option just isn't there.  I am pretty new to the mod thing, so is there by chance just something I did wrong?  All I want to do is make it possible to see the post based stars, even though all my members are also assigned into additional groups to limit permissions to certain team only boards.

thanks
Title: Re: Show Multiple Badges (AKA Stars)
Post by: megacelt on April 13, 2005, 05:10:35 PM
Gave up and deleted some files I had in my themes directory and modified the default themes files to match. Now it's working just as I wanted in conjunction with your member names color mod.  They are both great mods, which did just in combination what I was hoping to acheive, thanks!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: legion on April 14, 2005, 01:52:44 AM
how do i install this mod?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: HoTmetal on April 16, 2005, 03:43:06 PM
Hello. What version should I be runnig to use this mod? I'm running 1.03 with the  following mods installed :chat:donate:buddy list:
I've tried to download this mod & I get this error

QuoteAn Error Has Occurred!
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

Will this mod work with what I'm running?? Thanks in advance, rickC
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 16, 2005, 03:45:06 PM
Weird, I wrote it for 1.0.3

Well the new version should be out late tonight as soon as I nail down this package problem.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: HoTmetal on April 16, 2005, 10:34:03 PM
I added it manually & it worked fine. But trying to run it through the back end, I got that error
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 20, 2005, 11:09:28 PM
Version 0.3 is up and the multiple group names mod is up and awaiting approval
Title: Re: Show Multiple Badges (AKA Stars)
Post by: megacelt on April 21, 2005, 04:21:12 AM
So what is different with the new version Mike?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 21, 2005, 09:05:47 AM
From 0.1 -> 0.3 fixes the problem with not displaying the post group's stars.  0.2 -> 0.3 gets rid of the group names.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: HoTmetal on April 24, 2005, 12:48:18 PM
So do you have to uninstall the old mod, or will it write over it?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 24, 2005, 01:28:05 PM
0.2 uninstall
0.1 should be able to upgrade
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Gary on April 25, 2005, 02:40:16 PM
For some reason 4 check boxes appear:

Show the stars even if the group is a secondary group?:   [ ]
Show the stars even if the group is a secondary group?:   [ ]
Show the stars even if the group is a secondary group?:   [ ]
Show the stars even if the group is a secondary group?:   [ ]

Yet in the package manager only one of them is there. How do I get rid of the excess three?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 25, 2005, 04:28:18 PM
Weird, open ManageMembers.template.php

Look for:
<tr class="windowbg2">
                                        <td><b>', $txt['membergroups_showAddBadge'], ':</b></td>
                                        <td><input type="checkbox" name="showAddBadge" ', $context['group']['showAddBadge'] ? 'checked="checked"' : '', '</td>
                                </tr>

And delete all repeats
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Gary on April 25, 2005, 05:22:21 PM
We did sort it out by installing a new forum onto the database, but incase of any future screw ups. That'll come in handy. Thanks. :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 25, 2005, 06:27:41 PM
Well if you figure out what actions caused it I'd be more then happy to know so I can fix it.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Gary on April 27, 2005, 01:00:51 PM
The first time we had to uninstall it and get it working again, then upon re-installation there was an extra one added. And when I upgraded to 1.1 Beta 1, as all my mods were uninstalled automatically, the same happened again.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Gary on May 17, 2005, 03:21:50 PM
Sorry to bump... and double post... but is there any chance you could make it so that it'd work in Beta 2, or PM me what I have to do so that I can get it working on Beta 2. I thought that this mod was kick ass, my members thought the same, so it was a bummer when we discovered that it didnt work on Beta 1 & 2.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on May 17, 2005, 03:48:26 PM
I'll be going through all my mods and fixing/updating/upgrading/etc starting next week since finals will be over.  I'll make sure this one gets to the top of the list
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Gary on May 17, 2005, 03:49:34 PM
Thank you Mike. :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on May 25, 2005, 05:28:15 PM
A version for SMF 1.1 has been uploaded.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Gary on May 25, 2005, 05:37:21 PM
Thanks Mike, works like a charm. :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: azuregenesis on June 11, 2005, 09:07:46 AM
how about a version for 1.04?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on June 11, 2005, 09:13:51 AM
It works as is for 1.0.4
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Knightmare2777 on June 17, 2005, 10:05:39 AM
First time poster.

For some bloody reason the automatic install via SMF 1.0.4 fails to execute the Load.php

Meaning I'll have to do it manually.

Where and what do I need to change via the Load.php?

Thanks in advance.
cheers
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on June 17, 2005, 12:20:11 PM
if you open install.xml you'll see something that looks like:

<file name="$sourcedir/Load.php">

Between that and </file> is everything for that file.  Just find what <search> is looking for and make the change.

If position is "before" that means you add whats in <add> after the code you searched for.

If position is "after" that means you add whats in <add> before the code you searched for.

If position is "end" that means you add whats in <add> right before ?>

Title: Re: Show Multiple Badges (AKA Stars)
Post by: Knightmare2777 on June 18, 2005, 11:56:28 AM
Thank you.

It was great help!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: jennewt on July 16, 2005, 10:47:08 PM
Silly question perhaps but I have used this fantastic mod to apply my "awards" for my site. I am using the default template and am trying to figure out how to remove the break between each "badge". Each month members can earn the monthly badge - we currently have 13 available with more coming. With the break between each badge it's causing a large gap between posts. Ideally if I could get them to wrap down the left side. Is this possible? and if so, how would I go about it?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: MarcFox on July 17, 2005, 11:43:52 AM
i want  1 for smf 1.0.5
Title: Re: Show Multiple Badges (AKA Stars)
Post by: EG on July 23, 2005, 12:29:00 PM
great mod! thanks :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: myst on July 25, 2005, 01:45:17 PM
i want this for smf 1.1 beta3
waiting for that
Title: Re: Show Multiple Badges (AKA Stars)
Post by: DemonicInfluence on July 28, 2005, 01:57:24 AM
yes waiting for that.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Dannii on July 28, 2005, 03:45:33 AM
Are there screen shots or a live demo available?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: rojamaia on July 28, 2005, 06:50:44 AM

most of my members ended up becoming members both of the post group and the primary group.

i tried to delete their membership from the post group, but the delete option in the SHOW MEMBERS page (http://catbalogan.com/discussion/index.php?action=membergroups;sa=members;id=9) is turned off.  i mean, the REMOVE MEMBERS button is turned off.

how can i turn it on, because i want my moderators, global mods and admin to be shown only their Primary Titles and Badges.  i mean, it doesn't look good that it says there "Administrator Newbie"
Title: Re: Show Multiple Badges (AKA Stars)
Post by: rojamaia on July 28, 2005, 07:33:11 AM

the LOAD.PHP modification did not work so i tried to manually edit it. however, i did not understand where to add the code below.


function getgroupstars($id, $stars)
{
  global $context, $db_prefix, $settings;
  $ret = '';
  $allstars = array($stars);
  $result = db_query("
        SELECT mg.stars
        FROM {$db_prefix}membergroups AS mg,
                {$db_prefix}members AS mem
   WHERE (FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups) OR ( mg.ID_GROUP=mem.ID_POST_GROUP AND mem.ID_GROUP != 0 ))
      AND mem.ID_MEMBER=$id
      AND mg.showAddBadge=1
   ",
        __FILE__, __LINE__);
  while ( $row = mysql_fetch_row($result) )
        $allstars[] = explode('#', $row[0]);
  mysql_free_result($result);
  $starstrings = array();
  foreach($allstars AS $star)
        $starstrings[] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($star[1]) ? $settings['images_url'] . '/' . $star[1] : '') . '" alt="*" border="0" />', empty($star[0]) ? 0 : $star[0]);
  return implode("<br/>", $starstrings);
}
Title: Re: Show Multiple Badges (AKA Stars)
Post by: DemonicInfluence on July 28, 2005, 08:54:39 AM
Quote from: malinaobenny on July 28, 2005, 07:33:11 AM

the LOAD.PHP modification did not work so i tried to manually edit it. however, i did not understand where to add the code below.


function getgroupstars($id, $stars)
{
  global $context, $db_prefix, $settings;
  $ret = '';
  $allstars = array($stars);
  $result = db_query("
        SELECT mg.stars
        FROM {$db_prefix}membergroups AS mg,
                {$db_prefix}members AS mem
   WHERE (FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups) OR ( mg.ID_GROUP=mem.ID_POST_GROUP AND mem.ID_GROUP != 0 ))
      AND mem.ID_MEMBER=$id
      AND mg.showAddBadge=1
   ",
        __FILE__, __LINE__);
  while ( $row = mysql_fetch_row($result) )
        $allstars[] = explode('#', $row[0]);
  mysql_free_result($result);
  $starstrings = array();
  foreach($allstars AS $star)
        $starstrings[] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($star[1]) ? $settings['images_url'] . '/' . $star[1] : '') . '" alt="*" border="0" />', empty($star[0]) ? 0 : $star[0]);
  return implode("<br/>", $starstrings);
}

Add it on the very end of the file, Load.php
Title: Re: Show Multiple Badges (AKA Stars)
Post by: rojamaia on July 31, 2005, 08:23:48 AM
thanks!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: ygmn on August 10, 2005, 11:26:12 PM
It is not working on our site....

Our other admin installed an hour or so ago...

We see the little box thing on the membergroups admin page...boxes are checked for those we want to see...

but nothing...just the primary shows up..

PS running....
Forum version: SMF 1.0.5
Current SMF version: SMF 1.0.5

customized the template a little bit....based off of 1.0 RC2

link to forum is in my sig...

Any help would appreciated....

thanks....
Title: Re: Show Multiple Badges (AKA Stars)
Post by: DemonicInfluence on August 11, 2005, 06:53:12 PM
that's for 1.1 beta...
Title: Re: Show Multiple Badges (AKA Stars)
Post by: myst on August 18, 2005, 11:47:09 AM
is the mod for 1.1 beta3 released
Title: Re: Show Multiple Badges (AKA Stars)
Post by: DemonicInfluence on August 19, 2005, 12:02:57 AM
no, but u can manually do it.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Hengis on August 27, 2005, 04:28:50 PM
How would you do it manually? Are there instructions anywhere?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: xenovanis on August 27, 2005, 05:51:44 PM
Quote from: Hengis on August 27, 2005, 04:28:50 PM
How would you do it manually? Are there instructions anywhere?

How to make mods work with themes? (http://www.simplemachines.org/community/index.php?topic=34526.0)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: DemonicInfluence on August 28, 2005, 07:23:52 AM
Quote from: Hengis on August 27, 2005, 04:28:50 PM
How would you do it manually? Are there instructions anywhere?

just download the files.. then do the mod.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on September 06, 2005, 02:06:30 AM
New version up for SMF 1.1 ONLY.  Due to SMF being in a public beta I am no longer writing for SMF 1.0

I didn't find anything that needed to be changed from the earlier version for SMF 1.1.  However if you do come across any errors please let me know.

This mod changes the following files:
$sourcedir/Load.php
$sourcedir/ManageMembergroups.php
$themedir/ManageMembergroups.template.php
$themedir/languages/Modifications.english.php

As always if you are using a custom theme that uses a modified verson of those files you may not get the results you expected.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Dannii on September 06, 2005, 06:11:58 AM
Quote from: eldacar on July 28, 2005, 03:45:33 AM
Are there screen shots or a live demo available?
?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on September 06, 2005, 07:27:29 AM
Well my screen shot skills aren't the best but here ya go:
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Dannii on September 06, 2005, 09:05:15 AM
Awesome thanks :D
This could be very useful for me, I'll look into it.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: trenchteam on September 07, 2005, 01:09:38 AM
yes, works flawlessly in beta public ;D
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Valodim on September 07, 2005, 07:20:02 PM
hey there :)

Right after submitting this (http://mods.simplemachines.org/index.php?mod=191), I realized just how similar this mod is to mine. I'm sorry if this looks to you like I stole your idea, just thought I'd tell you that this is not the case (I've been using it for >6 month on my forum, just never released it as a mod). Sorry for any inconveniences ;)

(note that I'm not saying it's entirely the same. the idea behind yours is to display multiple rank-badges (like "coder" or "supporter", mine is meant to be used with stars, that's why normal stars replace postgroup-stars instead of just being added... :) )

PS: How long does it take (avg) to get a mod approved around here? Just a general idea? ::)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on September 07, 2005, 08:09:59 PM
Well in all fairness I don't think it was orginally my idea.  IIRC I got the idea from reading the board and seeing that people wanted something like that so I went and coded one up.

I like the idea of your mod and its an interesting way of displaying it.  The more mods avialable the better, since then people can choose what they want
Title: Re: Show Multiple Badges (AKA Stars)
Post by: covert on September 10, 2005, 07:40:58 PM
I need some serious help, I tried installing this and it gave me a bunch of failures and I hit proceed like a moron and my forums crashed.  It is saying there are errors on certain lines, can anyone help me?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on September 11, 2005, 05:31:44 PM
You will need to ftp into your system and look for files that are <filename>~ and using that file replace the <filename> file.  For example
$sourcedir/Load.php~ would replace $sourcedir/Load.php
$sourcedir/ManageMembergroups.php~ would replace  $sourcedir/ManageMembergroups.php
$themedir/ManageMembergroups.template.php~ would replace  $themedir/ManageMembergroups.template.php
$themedir/languages/Modifications.english.php~ would replace  $themedir/languages/Modifications.english.php

That should restore the forum to what it was prior to installing the mod.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: covert on September 11, 2005, 09:28:09 PM
I don't know how to distinguish the files because none of them end .php like you indicated.  Im a newb to all this stuff.  However, in my source file there are two load.php files, one is load.php and the other is load.php~.  I was wondering if I delete the load.php file and just leave the ~ will that remedy the situation?  I already tried to move the load.php file to a backup folder I created so as to not completely mess everything up(as if I already haven't) and it did nothing.  All I got was a different error.  The error I am getting is the following Fatal error: Cannot redeclare getgroupstars() (previously declared in /home/covert/public_html/Forums/Sources/Load.php:1253) in /home/covert/public_html/Forums/Sources/Load.php on line 1276
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on September 11, 2005, 09:32:01 PM
Sounds like you tried to install it twice.

Quotenone of them end .php like you indicated [...]  one is load.php and the other is load.php~
Realize what you just said and go back to my previous post and reread it
Title: Re: Show Multiple Badges (AKA Stars)
Post by: covert on September 11, 2005, 09:41:35 PM
Ohhhh, do you mean that I have to rename them?  And do I rename all of the files that end in .php?  And if that is the case why is the error only coming up in load.php?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on September 11, 2005, 09:53:36 PM
rename only the ones I mentioned move the .php~ to .php
Title: Re: Show Multiple Badges (AKA Stars)
Post by: covert on September 11, 2005, 10:06:05 PM
Okay, I have located all of the files you are referring to.  Again, I say I am a newb to all of this because I realize I'm asking questions over and over again and I know it can be annoying.  I appreciate all your help though.  Now, for each of the ones you are referred to in your previous post there exists two files for them.  One that is .php and another that is .php~ you want me to move the .php~ into the .php?  So if that is so then I should go to the .php~ file click on it and then select the move option and then move it onto the .php version of that file?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: covert on September 12, 2005, 08:34:53 AM
What I started to do so far was copy each original file and save it in a backup file I created within the file manager.  After doing so I would systematically rename the .php file w/e.php~.  However, after doing each a new error would appear on the site.  So, I stopped thinking that I must have been doing something incorrectly.  ?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Aisling on October 04, 2005, 03:06:57 PM
I don't know if anyone already noted this, but IE won't show multiple badges, just the primary group.

BTW, great mod!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: DougD on October 19, 2005, 02:27:52 PM
Is it at all possible to get the 1.05 version still?  I'd rather not put 1.1 Beta on just for this mod, but I'd like to use the mod just the same.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Xarcell on November 10, 2005, 08:51:33 AM
Any screenshots or demos?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on November 13, 2005, 01:31:38 AM
Quote from: Aisling on October 04, 2005, 03:06:57 PM
I don't know if anyone already noted this, but IE won't show multiple badges, just the primary group.

BTW, great mod!
Works just fine on my IE.  Nothing that is being done is browser specific.  Just a <br/> tag and some <img> tags.

Quote from: Xarcell on November 10, 2005, 08:51:33 AM
Any screenshots or demos?
We use the mod at http://www.twilightavengers.com  Feel free to look around there

Quote from: DougD on October 19, 2005, 02:27:52 PM
Is it at all possible to get the 1.05 version still?  I'd rather not put 1.1 Beta on just for this mod, but I'd like to use the mod just the same.
Sorry I don't have any version for 1.0x

As a note:
I found myself needing to assign some groups that normally would be shown, however on these people I didn't want it to be shown.  I've modified the mod as follows:
Add to {$db_prefix}members column noshow with type tinytext or varchar
Change the function in Load.php to:

function getgroupnames($id, $group)
{
  global $context, $db_prefix, $settings;
  $ret = '';
  $allgroups = array($group);
  $result = db_query("
        SELECT mg.groupName
        FROM {$db_prefix}membergroups AS mg,
                {$db_prefix}members AS mem
WHERE FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups)
AND !FIND_IN_SET(mg.ID_GROUP, mem.noshow)
AND mem.ID_MEMBER=$id
AND mg.showAddName=1
",
        __FILE__, __LINE__);
  while ( list($row) = mysql_fetch_row($result) )
        $allgroups[] = $row;
  mysql_free_result($result);
  return implode("<br/>", $allgroups);
}

noshow should contain a comma delimited set of membergroup ids to not show on that member.

Since I have not created any type of interface to deal with noshow it isn't going into the mod itself.  Just posting in case anyone else has need of it
Title: Re: Show Multiple Badges (AKA Stars)
Post by: MrGrimey on December 04, 2005, 08:31:06 PM
Is there a way for me to add a link to a group depending on which badge is returned?


For instance I have a painting service group in SMF, and with this mod I can now display which members are listed as offering painting services, WHICH IS GREAT!

However, now I want to make that secondary group badge link back to a personal page on the site that exists outside of SMF...is there a way to do this similar to the SSI calls to determine groups from inside the Display.template.php



if(in_array(10, $message['member']['groups']))
    echo '<a href="">badge image</a>';



Any assistance or even idea of where to look would be great!
Thanks!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: azuregenesis on December 12, 2005, 01:26:01 AM
Quote from: MikeMill on November 13, 2005, 01:31:38 AM

Quote from: DougD on October 19, 2005, 02:27:52 PM
Is it at all possible to get the 1.05 version still?  I'd rather not put 1.1 Beta on just for this mod, but I'd like to use the mod just the same.
Sorry I don't have any version for 1.0x


if it's fine with you, i still have the 1.05 version of your mod. :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Valiantheart on December 18, 2005, 06:38:57 AM
Is it possible to make the 1.05 version available?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on December 18, 2005, 10:52:27 AM
azuregenesis if you could can you please mail me the 1.0.5 version so I may add it.  Thanks
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Azumi_chan on December 18, 2005, 10:11:17 PM
Yes please make the 1.0.5 version avaliable :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: azuregenesis on December 23, 2005, 09:18:58 AM
Quote from: MikeMill on December 18, 2005, 10:52:27 AM
azuregenesis if you could can you please mail me the 1.0.5 version so I may add it.  Thanks

of course :) i really should check back here more often xD
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Valiantheart on December 23, 2005, 01:02:05 PM
You should azuregenesis! :) I can't  wait to try the 1.0.5 version!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: azuregenesis on December 24, 2005, 02:48:36 PM
yay! seems like the 1.05 version is up :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: perplexed on February 07, 2006, 11:03:57 PM
can you please tell me if this will be compatible with 1.1 rc1 or rc2 as I use it A LOT on 1.1 beta 3 public and dont want to lose it when/if I upgrade.

Its our favourite feature lol

thanks :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: ladyshanae on February 10, 2006, 07:14:21 PM
I am running 1.1 RC2 and this mod is working fine on my board :)

Thanks for an awesome mod!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: perplexed on February 11, 2006, 06:45:07 AM
Quote from: ladyshanae on February 10, 2006, 07:14:21 PM
I am running 1.1 RC2 and this mod is working fine on my board :)

Thanks for an awesome mod!


YAY!  that is excellent news, thanks for posting, I am just upgrading now :D
Title: Re: Show Multiple Badges (AKA Stars)
Post by: quasar on February 12, 2006, 12:48:28 PM
Quote from: ladyshanae on February 10, 2006, 07:14:21 PM
I am running 1.1 RC2 and this mod is working fine on my board :)

Thanks for an awesome mod!

I've tried to set up the install, but it's complaining about load.php, managemembers.php and managemebers.template.php.

Is that normal?

Should I go ahead and install?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: quasar on February 20, 2006, 06:46:17 AM
Thantos, I've had a look at the RC1.2 code for the new default template, but in the managemembers.php  I can't find references to the stars.  Any suggestions on how I can update it?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: ladyshanae on February 27, 2006, 11:42:23 AM
Is it possible to have the 'stars' line up instead of having a break between each star.  I don't want each 'star' to be on a new line.  I want them all on the same line (or at least as man as will fit).

I think I know the part of the code I need to later, but I'm still very much a beginner with php . . . so knowing how to edit it would be wonderful.

Thanks!

Edit:  I've worked it out :)  If someone else would like to do it, here is how.

QuoteIn Load.php FIND:

  $starstrings = array();
  foreach($allstars AS $star)
        $starstrings[] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($star[1]) ? $settings['images_url'] . '/' . $star[1] : '') . '" alt="*" border="0" />', empty($star[0]) ? 0 : $star[0]);
  return implode("<br/>", $starstrings);
}

REPLACE  return implode("<br/>", $starstrings);

With

return implode($starstrings);

Thanks again for an awesome mod!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: tribal on March 22, 2006, 07:05:18 AM
Alright I am stumped, my provider is running php locally in safe mode. Yay to that.

Using SMF 1.0.5.
So I open up Install.xml and follow the instructions there
In my first try I made the mistake of adding the code just before the one I searched for when the search string stated "before" etc, resulting in a semibroken Forum.
You could post new Topics but trying to open a thread gave a mysql DB error. Unspecified. Very helpful.

Now I returned my forum to its original state and dug through the smf-forum and this thread and found this:
Quote
If position is "before" that means you add whats in <add> after the code you searched for.
If position is "after" that means you add whats in <add> before the code you searched for.
If position is "end" that means you add whats in <add> right before ?>

Redid the editing and guess what? Unspecified DB Error. *sigh* I have no other mods up and running, would someone please be so kind and offer the four modified 1.0.5 files for download?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: True Knight on March 29, 2006, 08:37:27 AM
Any chance in making this work for SMF1.1 RC2?

Thanks!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: DemonicInfluence on March 29, 2006, 01:14:39 PM
dl the smf 1.1 version and that should work. If it says corrupted or something like that when you try to install. Open the file. Change inside the package_info.xml to 1.1rc2 in the install and uninstall tags.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: True Knight on March 30, 2006, 12:20:28 PM
Thanks!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: DemonicInfluence on March 30, 2006, 03:07:19 PM
No problem :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: ThaPizza on April 17, 2006, 05:43:24 PM
Just for the info:
Tested it on 1.1 RC2-1 with package installen and works very fine!

Thx for this mod!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: quasar on May 07, 2006, 11:00:46 AM
I've managed to install all the files (though the uninstall points to members files, not membergroups as in install file) and yet it's not displaying the additional badges. I've ticked all the membergroups I want to see, but still nothing.

Am I missing something simple?

I'm running SMF 1.1 RC2.

Suggestions anybody?

PS Thanks in advance.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Vinspire on May 27, 2006, 05:52:05 AM
I've gotten this error when i tried to uninstall the mods.

What should i do ?  :'( :'( :'(

Uninstall Actions "Show Multiple Badges (Aka Stars)":
Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Sources/Load.php    Test successful
2.    Execute Modification    ./Sources/ManageMembers.php    Test failed
3.    Execute Modification    ./Themes/default/ManageMembers.template.php    Test failed
4.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
5.    Execute Code    remove_settings.php
Title: Re: Show Multiple Badges (AKA Stars)
Post by: quasar on May 28, 2006, 05:00:11 AM
If you've got that result with the latest version, it might be to do with the fact that ManageMembers and the template are named wrongly.  I believe it should be ManageMembergroups.template.php and ManageMembergroups.php

I had a similar problem.  I manually removed the info from the files.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Vinspire on May 29, 2006, 12:31:27 AM
Quote from: quasar on May 28, 2006, 05:00:11 AM
If you've got that result with the latest version, it might be to do with the fact that ManageMembers and the template are named wrongly.  I believe it should be ManageMembergroups.template.php and ManageMembergroups.php

I had a similar problem.  I manually removed the info from the files.

i c. meaning thats i uninstall the current mod then manually uninstall it from the test failed file ?

i just need to remove

//start batch

//end batch

thing right ?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: quasar on May 30, 2006, 01:42:25 PM
Yes, that's right.  Make sure you back up the files before you do so, so that you can always remove them.  A comparison program is good, helps to check for any changes (if you have files before the install to compare them to).
Title: Re: Show Multiple Badges (AKA Stars)
Post by: perplexed on June 10, 2006, 09:53:11 AM
Thantos, I have a question

Ive been using this since last year and have been using it on 1.1 RC2 with no probs at all

the space on the posts is approx 80 pixels wide where the badges go.  so if you have a few badges then currently they are displayed on top of each other thus:

BADGE 1
BADGE 2
BADGE 3
BADGE 4

Is there some way of making the badges line up horizontally within the 80 pixel width so that they take up less space horizontally  eg

BADGE 1  BADGE 2
BADGE 3  BADGE 4

I tried making smaller badges of 35pixels wide but they still display one on top of the other.  Having them display side by side if the badge was small enough would help save space and length of posts.  we use about 6 badges on our site so a 1-2 line post looks kinda empty with all those badges displayed down the post.

Any ideas?

~thanks
Title: Re: Show Multiple Badges (AKA Stars)
Post by: ladyshanae on June 10, 2006, 03:43:22 PM
I figured out how to do this and posted it a page or two back.  Here is the code:

QuoteIn Load.php FIND:

  $starstrings = array();
  foreach($allstars AS $star)
        $starstrings[] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($star[1]) ? $settings['images_url'] . '/' . $star[1] : '') . '" alt="*" border="0" />', empty($star[0]) ? 0 : $star[0]);
  return implode("<br/>", $starstrings);
}

REPLACE  return implode("<br/>", $starstrings);

With

return implode($starstrings);
Title: Re: Show Multiple Badges (AKA Stars)
Post by: PrizeLive.com on June 10, 2006, 03:45:09 PM
When will this be made available for version 1.1 RC2?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: ladyshanae on June 10, 2006, 03:45:50 PM
The current mod works with 1.1 RC2 ;)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: PrizeLive.com on June 10, 2006, 03:50:04 PM
Quote from: ladyshanae on June 10, 2006, 03:45:50 PM
The current mod works with 1.1 RC2 ;)

Are you sure?

Why doesn't this page say it?: http://mods.simplemachines.org/index.php?mod=115

It has:

Compatible With: 1.0.5, 1.1 Beta 3 Public
Title: Re: Show Multiple Badges (AKA Stars)
Post by: perplexed on June 11, 2006, 09:20:59 AM
Quote from: ladyshanae on June 10, 2006, 03:43:22 PM
I figured out how to do this and posted it a page or two back.  Here is the code:

QuoteIn Load.php FIND:

  $starstrings = array();
  foreach($allstars AS $star)
        $starstrings[] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($star[1]) ? $settings['images_url'] . '/' . $star[1] : '') . '" alt="*" border="0" />', empty($star[0]) ? 0 : $star[0]);
  return implode("<br/>", $starstrings);
}

REPLACE  return implode("<br/>", $starstrings);

With

return implode($starstrings);

Hey Ladyshanae - is that in reply to my question?  just checking


And yes I agree, it DOES work with RC2 as I am using it - the same version I was using with beta 2 public last year - no probs at all
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Vinspire on June 16, 2006, 12:54:10 AM
Can someone show me the screenshot of the mod ?

I install it ... Saw the function but didnt see any different in the badge and some said the mods is working on 1.1 RC 2 and some said it doesnt.

So, which one is the true answer ?

I am using SMF 1.1 RC 2 by the way. :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: perplexed on June 16, 2006, 09:34:37 AM
have you activated the option in the membership groups you want to include in this?

you have to check the box in each member group in order for them to show up on the posts-

this option should be in each member group:

"Show the stars even if the group is a secondary group?:  "    
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Tony Reid on June 16, 2006, 10:38:52 AM
Quote from: Vinspire on June 16, 2006, 12:54:10 AM
Can someone show me the screenshot of the mod ?

I install it ... Saw the function but didnt see any different in the badge and some said the mods is working on 1.1 RC 2 and some said it doesnt.

So, which one is the true answer ?

I am using SMF 1.1 RC 2 by the way. :)

It might conflict with the moderator activity mod ;) - easily fixed though

And to confirm Ive installed this on 1.1RC2 for clients - it works fine.

Admittedly I did it manually.

Title: Re: Show Multiple Badges (AKA Stars)
Post by: Vinspire on June 16, 2006, 11:44:08 AM
Quote from: perplexed on June 16, 2006, 09:34:37 AM
have you activated the option in the membership groups you want to include in this?

you have to check the box in each member group in order for them to show up on the posts-

this option should be in each member group:

"Show the stars even if the group is a secondary group?:  "    

Yeap. I did that but it is still not working ... Maybe it is like what Tony said

Quote from: Tony on June 16, 2006, 10:38:52 AM
It might conflict with the moderator activity mod ;) - easily fixed though

And to confirm Ive installed this on 1.1RC2 for clients - it works fine.

Admittedly I did it manually.

So, how to fix it sir ? :P
Title: Re: Show Multiple Badges (AKA Stars)
Post by: quasar on June 18, 2006, 06:03:13 PM
As Vinspire says, I've got it installed, but not showing up the additional badges.  If there is a conflict, how can it be solved?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Tony Reid on June 18, 2006, 06:39:01 PM
Ive just checked and the only place that this mod conflicts with the moderator activity mod is in ManageMembergroups.php

Im not sure its the cause of the problems your describing....

Search for this....
SELECT groupName, minPosts, onlineColor, maxMessages, stars

and let me know what the rest of the line says.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: quasar on June 21, 2006, 07:19:33 AM
// Fetch the current group information.
$request = db_query("
SELECT groupName, minPosts, onlineColor, maxMessages, stars, showAddBadge, GroupModOptions
FROM {$db_prefix}membergroups
WHERE ID_GROUP = " . (int) $_REQUEST['group'] . "
LIMIT 1", __FILE__, __LINE__);
if (mysql_num_rows($request) == 0)
fatal_lang_error('membergroup_does_not_exist', false);
$row = mysql_fetch_assoc($request);
mysql_free_result($request);

$row['stars'] = explode('#', $row['stars']);

$context['group'] = array(
'id' => $_REQUEST['group'],
'name' => $row['groupName'],
'editable_name' => htmlspecialchars($row['groupName']),
'color' => $row['onlineColor'],
'min_posts' => $row['minPosts'],
'max_messages' => $row['maxMessages'],
'star_count' => (int) $row['stars'][0],
'star_image' => isset($row['stars'][1]) ? $row['stars'][1] : '',
'showAddBadge' => $row['showAddBadge'],
'is_post_group' => $row['minPosts'] != -1,
'allow_post_group' => $_REQUEST['group'] == 2 || $_REQUEST['group'] > 4,
'allow_delete' => $_REQUEST['group'] == 2 || $_REQUEST['group'] > 4,
'allow_primary' => substr_count($row['GroupModOptions'], 'P') == 1
);


That's what it has under that section.  Anything else?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Vinspire on June 24, 2006, 12:26:23 AM
Quote from: Tony on June 18, 2006, 06:39:01 PM
Ive just checked and the only place that this mod conflicts with the moderator activity mod is in ManageMembergroups.php

Im not sure its the cause of the problems your describing....

Search for this....
SELECT groupName, minPosts, onlineColor, maxMessages, stars

and let me know what the rest of the line says.

Where is this file ? I can only find ManageMembergroups.template.php and there is no such codes in it :P
Title: Re: Show Multiple Badges (AKA Stars)
Post by: quasar on June 26, 2006, 08:10:50 AM
You need to check under Sources.  The template is used for the language you want to read it in.  Sources contains the core templates/pages that SMF uses for it's database sorting.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Vinspire on June 26, 2006, 09:17:49 AM
Quote from: quasar on June 26, 2006, 08:10:50 AM
You need to check under Sources.  The template is used for the language you want to read it in.  Sources contains the core templates/pages that SMF uses for it's database sorting.

Thanks. Found it :)

Here is mine :

SELECT groupName, minPosts, onlineColor, maxMessages, stars, monitorGroup, showAddBadge
FROM {$db_prefix}membergroups
WHERE ID_GROUP = " . (int) $_REQUEST['group'] . "
LIMIT 1", __FILE__, __LINE__);
if (mysql_num_rows($request) == 0)
fatal_lang_error('membergroup_does_not_exist', false);
$row = mysql_fetch_assoc($request);
mysql_free_result($request);

$row['stars'] = explode('#', $row['stars']);

$context['group'] = array(
'id' => $_REQUEST['group'],
'name' => $row['groupName'],
'editable_name' => htmlspecialchars($row['groupName']),
'color' => $row['onlineColor'],
'min_posts' => $row['minPosts'],
'max_messages' => $row['maxMessages'],
'star_count' => (int) $row['stars'][0],
'star_image' => isset($row['stars'][1]) ? $row['stars'][1] : '', 'monitorGroup' => $row['monitorGroup'],

'showAddBadge' => $row['showAddBadge'],
'is_post_group' => $row['minPosts'] != -1,
'allow_post_group' => $_REQUEST['group'] == 2 || $_REQUEST['group'] > 4,
'allow_delete' => $_REQUEST['group'] == 2 || $_REQUEST['group'] > 4
);

// Get a list of boards this membergroup is allowed to see.
$context['boards'] = array();
if ($_REQUEST['group'] == 2 || $_REQUEST['group'] > 3)
{
$result = db_query("
SELECT ID_BOARD, name, childLevel, FIND_IN_SET(" . (int) $_REQUEST['group'] . ", memberGroups) AS can_access
FROM {$db_prefix}boards", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($result))
$context['boards'][] = array(
'id' => $row['ID_BOARD'],
'name' => $row['name'],
'child_level' => $row['childLevel'],
'selected' => !empty($row['can_access']),
);
mysql_free_result($result);
}
$context['sub_template'] = 'edit_group';
$context['page_title'] = $txt['membergroups_edit_group'];
}

// Display members of a group, and allow adding of members to a group. Silly function name though ;)
function MembergroupMembers()
{
global $txt, $scripturl, $db_prefix, $context, $modSettings, $sourcedir;

$_REQUEST['group'] = (int) $_REQUEST['group'];

// No browsing of guests, membergroup 0 or moderators.
if (in_array($_REQUEST['group'], array(-1, 0, 3)))
fatal_lang_error('membergroup_does_not_exist', false);

// Load up the group details - and ensure this ISN'T a post group ;)
$request = db_query("
SELECT ID_GROUP AS id, groupName AS name, minPosts = -1 AS assignable, minPosts != -1 AS is_post_group
FROM {$db_prefix}membergroups
WHERE ID_GROUP = " . (int) $_REQUEST['group'] . "
LIMIT 1", __FILE__, __LINE__);
// Not really possible...
if (mysql_num_rows($request) == 0)
fatal_lang_error('membergroup_does_not_exist', false);
$context['group'] = mysql_fetch_assoc($request);
mysql_free_result($request);

// Non-admins cannot assign admins.
if ($context['group']['id'] == 1 && !allowedTo('admin_forum'))
$context['group']['assignable'] = 0;

// Removing member from group?
if (isset($_POST['remove']) && !empty($_REQUEST['rem']) && is_array($_REQUEST['rem']) && $context['group']['assignable'])
{
checkSession();

require_once($sourcedir . '/Subs-Members.php');
removeMembersFromGroups($_REQUEST['rem'], $_REQUEST['group']);
}
// Must be adding new members to the group...
elseif (isset($_REQUEST['add']) && !empty($_REQUEST['toAdd']) && $context['group']['assignable'])
{
checkSession();

// Get all the members to be added... taking into account names can be quoted ;)
$_REQUEST['toAdd'] = strtr(preg_replace('~&amp;#(\d{4,5}|[2-9]\d{2,4}|1[2-9]\d);~', '&#$1;', htmlspecialchars(stripslashes($_REQUEST['toAdd']), ENT_QUOTES)), array('&quot;' => '"'));
preg_match_all('~"([^"]+)"~', $_REQUEST['toAdd'], $matches);
$memberNames = array_unique(array_merge($matches[1], explode(',', preg_replace('~"([^"]+)"~', '', $_REQUEST['toAdd']))));

foreach ($memberNames as $index => $memberName)
{
$memberNames[$index] = trim($memberNames[$index]);

if (strlen($memberNames[$index]) == 0)
unset($memberNames[$index]);
}

$request = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE memberName IN ('" . implode("', '", $memberNames) . "') OR realName IN ('" . implode("', '", $memberNames) . "')
LIMIT " . count($memberNames), __FILE__, __LINE__);
$members = array();
while ($row = mysql_fetch_assoc($request))
$members[] = $row['ID_MEMBER'];
mysql_free_result($request);

// !!! Add $_POST['additional'] to templates!

// Do the updates...
require_once($sourcedir . '/Subs-Members.php');
addMembersToGroup($members, $_REQUEST['group'], isset($_POST['additional']) ? 'only_additional' : 'auto');
}

// Sort out the sorting!
$sort_methods = array(
'name' => 'realName',
'email' => 'emailAddress',
'active' => 'lastLogin',
'registered' => 'dateRegistered',
'posts' => 'posts',
);

// They didn't pick one, default to by name..
if (!isset($_REQUEST['sort']) || !isset($sort_methods[$_REQUEST['sort']]))
{
$context['sort_by'] = 'name';
$querySort = 'realName';
}
// Otherwise default to ascending.
else
{
$context['sort_by'] = $_REQUEST['sort'];
$querySort = $sort_methods[$_REQUEST['sort']];
}

$context['sort_direction'] = isset($_REQUEST['desc']) ? 'down' : 'up';

// Count members of the group.
$request = db_query("
SELECT COUNT(ID_MEMBER)
FROM {$db_prefix}members
WHERE " . (empty($context['group']['is_post_group']) ? "ID_GROUP = " . (int) $_REQUEST['group'] . " OR FIND_IN_SET(" . (int) $_REQUEST['group'] . ", additionalGroups)" : "ID_POST_GROUP = " . (int) $_REQUEST['group']), __FILE__, __LINE__);
list ($context['total_members']) = mysql_fetch_row($request);
mysql_free_result($request);

// Create the page index.
$context['page_index'] = constructPageIndex($scripturl . '?action=membergroups;sa=members;group=' . $_REQUEST['group'] . ';sort=' . $context['sort_by'] . (isset($_REQUEST['desc']) ? ';desc' : ''), $_REQUEST['start'], $context['total_members'], $modSettings['defaultMaxMembers']);
$context['start'] = $_REQUEST['start'];

// Load up all members of this group.
$request = db_query("
SELECT ID_MEMBER, memberName, realName, emailAddress, memberIP, dateRegistered, lastLogin, posts, is_activated
FROM {$db_prefix}members
WHERE " . (empty($context['group']['is_post_group']) ? "ID_GROUP = " . (int) $_REQUEST['group'] . " OR FIND_IN_SET(" . (int) $_REQUEST['group'] . ", additionalGroups)" : "ID_POST_GROUP = " . (int) $_REQUEST['group']) . "
ORDER BY $querySort " . ($context['sort_direction'] == 'down' ? 'DESC' : 'ASC') . "
LIMIT $context[start], $modSettings[defaultMaxMembers]", __FILE__, __LINE__);
$context['members'] = array();
while ($row = mysql_fetch_assoc($request))
{
$last_online = empty($row['lastLogin']) ? $txt['never'] : timeformat($row['lastLogin']);

// Italicize the online note if they aren't activated.
if ($row['is_activated'] % 10 != 1)
$last_online = '<i title="' . $txt['not_activated'] . '">' . $last_online . '</i>';

$context['members'][] = array(
'id' => $row['ID_MEMBER'],
'name' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>',
'email' => '<a href="mailto:' . $row['emailAddress'] . '">' . $row['emailAddress'] . '</a>',
'ip' => '<a href="' . $scripturl . '?action=trackip;searchip=' . $row['memberIP'] . '">' . $row['memberIP'] . '</a>',
'registered' => timeformat($row['dateRegistered']),
'last_online' => $last_online,
'posts' => $row['posts'],
'is_activated' => $row['is_activated'] % 10 == 1,
);
}
mysql_free_result($request);

// Select the template.
$context['sub_template'] = 'group_members';
$context['page_title'] = $txt['membergroups_members_title'] . ': ' . $context['group']['name'];
}

// Set general membergroup settings.
function ModifyMembergroupSettings()
{
global $context, $db_prefix, $sourcedir, $modSettings;

$context['sub_template'] = 'membergroup_settings';

// Needed for the inline permission functions.
require_once($sourcedir . '/ManagePermissions.php');

if (!empty($_POST['save_settings']))
{
checkSession();

// Save the permissions.
save_inline_permissions(array('manage_membergroups'));
}

// Initialize permissions.
init_inline_permissions(array('manage_membergroups'), array(-1));
}

?>
Title: Re: Show Multiple Badges (AKA Stars)
Post by: PrizeLive.com on June 28, 2006, 10:08:34 AM
Does this work for version 1.1 RC2?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: URPG on July 03, 2006, 10:18:14 AM
Quote from: SurfExcelerator.com on June 28, 2006, 10:08:34 AM
Does this work for version 1.1 RC2?

That was my question too, but:

Quote from: Tony on June 16, 2006, 10:38:52 AM
And to confirm Ive installed this on 1.1RC2 for clients - it works fine.

and

Quote from: perplexed on June 11, 2006, 09:20:59 AMAnd yes I agree, it DOES work with RC2 as I am using it - the same version I was using with beta 2 public last year - no probs at all
Title: Re: Show Multiple Badges (AKA Stars)
Post by: URPG on July 03, 2006, 10:45:51 AM
I tried to use this MOD (yes, it IS working) to give stars based on posts and on Membergroups (Sheriffs star for Moderators, etc.) but it does not seem to like my Star images... all it displays are *

What is the max size of a starimage? they are all 16x16px but i want the sheriffs star for example to be 45x45 so anyone can easilie see and recognize it...
Title: Re: Show Multiple Badges (AKA Stars)
Post by: PrizeLive.com on July 03, 2006, 11:45:11 AM
Quote from: URPG on July 03, 2006, 10:45:51 AM
I tried to use this MOD (yes, it IS working) to give stars based on posts and on Membergroups (Sheriffs star for Moderators, etc.) but it does not seem to like my Star images... all it displays are *

What is the max size of a starimage? they are all 16x16px but i want the sheriffs star for example to be 45x45 so anyone can easilie see and recognize it...

Are you sure you placed the image in your image folder? Mine showed up as "*" until I uploaded the image.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: URPG on July 03, 2006, 11:54:39 AM
I used /themes/default/images/ as directory to upload the pictures... Do i have to upload it into the /images/ folder of every installed theme?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: ^DooM^ on July 03, 2006, 01:13:05 PM
Quote from: URPG on July 03, 2006, 11:54:39 AM
I used /themes/default/images/ as directory to upload the pictures... Do i have to upload it into the /images/ folder of every installed theme?

yes..
Title: Re: Show Multiple Badges (AKA Stars)
Post by: URPG on July 03, 2006, 01:56:03 PM
Working now... thanks!

I got a deputy sheriff star for moderators and a ProTeam for the support people now :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: boolprop_net on July 30, 2006, 03:50:14 AM
I've installed the Show Multiple Badges (Aka Stars) mod so I could use this as sort of an "Awards" type secondary option.

As each new member is added to the secondary group, I've made it so their group icon shows up. This is an option that is enabled via the mod through the admin section.

Here's what I would to change:

In the post/thread view where it shows

Member Name
Custom Title
Regular group
Post count based group

[ Multiple Badge 1 image ]
[ Multiple Badge 2 image ]
[ Multiple Badge 3 image ]

I would like to change it so the Multiple Badges are lined up the other way, like

[ Multiple Badge 1 image ] [ Multiple Badge 2 image ] [ Multiple Badge 3 image ]

Cany anyone tell me what file I need to edit to do this?

EDIT: Nevermind. I need to read the actual thread first before posting, lol. Got my answer!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: littleone on August 27, 2006, 07:05:38 PM
RC 3 Update for this?  Any other mod author able to work this up into RC 3?  I tried it and most of the coding no longer exists in the sources files for this mod to work
Title: Re: Show Multiple Badges (AKA Stars)
Post by: mark7144 on September 06, 2006, 09:28:03 PM
Is it possible to that the rank image for the Primary Group display ABOVE the post-group name/stars so that the badge is displayed immediately underneath the user's name?

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.murraysworld.com%2Fmark%2Fprofile-rank.png&hash=a51cf374d27cdba55f3e2ba511a4b04f59fb28b5)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Skipdawg on September 07, 2006, 10:50:40 PM
If not updated for RC3 I hope it will be available for 1.1 final (gold)
I used it back in 1.0.5 and it was cool.  ;D
Title: Re: Show Multiple Badges (AKA Stars)
Post by: URPG on September 10, 2006, 08:00:37 AM
It was working well with RC2, guess i can just try and run it in RC3 too?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: littleone on September 10, 2006, 11:46:50 AM
I have it on 1.1 rc 3.  Works just fine
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Tanks on September 10, 2006, 02:10:28 PM
How would i make it so it only shows the badges and not the membergroup name (primary membergroup is shown on top of badges)  ???

Anyway thanks for a great mod.. just what i needed  ;)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Vinspire on October 02, 2006, 02:54:22 PM
Does this mod work with RC 3 ? Thanks :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Vinspire on October 03, 2006, 12:17:21 AM
Just installed this mod in RC3 and it is working perfectly :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: URPG on October 05, 2006, 04:54:51 PM
Thanks for the info, will grab it too now...
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Deific on October 07, 2006, 05:37:31 AM
Some of my members are in several membergroups, and I'd like for my newer members to be able to recognize what the different badges are for.  Is there a way to set the ALT text to display the name of the group instead of the number of stars (asterisks in ALT text) when rolling over the images?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Vinspire on October 07, 2006, 05:47:35 AM
Quote from: Deific on October 07, 2006, 05:37:31 AM
Some of my members are in several membergroups, and I'd like for my newer members to be able to recognize what the different badges are for.  Is there a way to set the ALT text to display the name of the group instead of the number of stars (asterisks in ALT text) when rolling over the images?

You could just create a member tag like what we have here on http://www.simplemachines.org instead of using the star.

example :

SMF Developer

(https://www.simplemachines.org/community/Themes/newsite/images/badge_dev.gif)

Charter Member

(https://www.simplemachines.org/community/Themes/newsite/images/badge_charter.gif)

this badge is already a self explained tag.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Valiantheart on October 25, 2006, 12:36:54 AM
How can I make the group name still show up if i do not use a star image? I want to show multiple groups.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Zwart on November 18, 2006, 08:38:04 AM
Quote from: MrGrimey on December 04, 2005, 08:31:06 PM(...) determine groups from inside the Display.template.php



if(in_array(10, $message['member']['groups']))
    echo '<a href="">badge image</a>';



Any assistance or even idea of where to look would be great!
Thanks!

I'm trying to achieve more or less the same thing. If anyone could please explain how I can use a simple if() statement to determine if a member belongs to a certain (secondary!) usergroup, I'd be much obliged.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Gobo on December 04, 2006, 06:05:07 AM
1.1 Final is out :D

Looking forward to the 1.1 compatible mod :D
Title: Re: Show Multiple Badges (AKA Stars)
Post by: RoarinRow on December 04, 2006, 05:50:41 PM
Quote from: akulion on December 04, 2006, 06:05:07 AM
1.1 Final is out :D

Looking forward to the 1.1 compatible mod :D

Me too.  This mod is a must have for me   8)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: mark7144 on December 04, 2006, 07:15:10 PM
This mod works fine for me in 1.1 final.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on December 06, 2006, 05:16:48 PM
I'm also all for a 1.1 version! :D
Title: Re: Show Multiple Badges (AKA Stars)
Post by: mark7144 on December 06, 2006, 05:38:51 PM
Quote from: Krysia on December 06, 2006, 05:16:48 PM
I'm also all for a 1.1 version! :D
It is already fully compatible, it does not need to be re-released!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Gobo on December 06, 2006, 05:39:33 PM
yup works for me on 1.1 without errors
thanks
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on December 06, 2006, 07:04:16 PM
Quote from: mark7144 on December 06, 2006, 05:38:51 PM
Quote from: Krysia on December 06, 2006, 05:16:48 PM
I'm also all for a 1.1 version! :D
It is already fully compatible, it does not need to be re-released!

Well, when I tried installling it via the package manager, I got the following:
1.     Execute Modification     ./Sources/Load.php     Test failed
2.    Execute Modification    ./Sources/ManageMembers.php    Test failed
3.    Execute Modification    ./Themes/default/ManageMembers.template.php    Test failed


So, if it works with 1.1, I'll try installing it by hand.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: mark7144 on December 06, 2006, 07:12:22 PM
Quote from: Krysia on December 06, 2006, 07:04:16 PM
Quote from: mark7144 on December 06, 2006, 05:38:51 PM
Quote from: Krysia on December 06, 2006, 05:16:48 PM
I'm also all for a 1.1 version! :D
It is already fully compatible, it does not need to be re-released!

Well, when I tried installling it via the package manager, I got the following:
1.     Execute Modification     ./Sources/Load.php     Test failed
2.    Execute Modification    ./Sources/ManageMembers.php    Test failed
3.    Execute Modification    ./Themes/default/ManageMembers.template.php    Test failed


So, if it works with 1.1, I'll try installing it by hand.

You are trying to install 1.0 of this mod right? Should install fine.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on December 06, 2006, 07:30:15 PM
Quote from: mark7144 on December 06, 2006, 07:12:22 PM
Quote from: Krysia on December 06, 2006, 07:04:16 PM
Quote from: mark7144 on December 06, 2006, 05:38:51 PM
Quote from: Krysia on December 06, 2006, 05:16:48 PM
I'm also all for a 1.1 version! :D
It is already fully compatible, it does not need to be re-released!

Well, when I tried installling it via the package manager, I got the following:
1.     Execute Modification     ./Sources/Load.php     Test failed
2.    Execute Modification    ./Sources/ManageMembers.php    Test failed
3.    Execute Modification    ./Themes/default/ManageMembers.template.php    Test failed


So, if it works with 1.1, I'll try installing it by hand.

You are trying to install 1.0 of this mod right? Should install fine.
Yeah.
And I installed by hand, but now get this:
Database Error
Unknown column 'showAddBadge' in 'field list'
File: /var/www/html/xx/myurl.com/SMF/Sources/ManageMembergroups.php
Line: 501


When I look at that line in the file, it says:
LIMIT 1", __FILE__, __LINE__);


???

The lines before start as follows:
496 // Fetch the current group information.
497  $request = db_query("
498 SELECT groupName, minPosts, onlineColor, maxMessages, stars, showAddBadge
499     FROM {$db_prefix}membergroups
        500     WHERE ID_GROUP = " . (int) $_REQUEST['group'] . "
        501     LIMIT 1", __FILE__, __LINE__);
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on December 06, 2006, 07:35:11 PM
Also, I was wondering if the add_settings.php and remove_settings.php files need to be in the main SMF directory or not.

Thank you! :)

ETA: I uploaded them, because when I opened them, they mentioned something about being in that directory, but made no difference to the error mentioned above.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: mark7144 on December 06, 2006, 08:36:55 PM
The sql code seems fine and regarding the settings.php files, they don't seem to be in my SMF directory either.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Valodim on December 07, 2006, 09:29:31 AM
...you didn't apply the sql changes, hence the membergroups table is missing the showAddBadge column.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on December 07, 2006, 10:48:32 AM
Quote from: Valodim on December 07, 2006, 09:29:31 AM
...you didn't apply the sql changes, hence the membergroups table is missing the showAddBadge column.
How do I do that?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Valodim on December 07, 2006, 11:35:39 AM
just execute this query on your database (replacing {$db_prefix} with your prefix, of course)

ALTER TABLE {$db_prefix}membergroups
ADD showAddBadge TINYINT(4) UNSIGNED DEFAULT 0
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on December 07, 2006, 11:48:38 AM
Quote from: Valodim on December 07, 2006, 11:35:39 AM
just execute this query on your database (replacing {$db_prefix} with your prefix, of course)

ALTER TABLE {$db_prefix}membergroups
ADD showAddBadge TINYINT(4) UNSIGNED DEFAULT 0

But how?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Valodim on December 07, 2006, 01:01:35 PM
open phpmyadmin, open query window (the little icon labelled "sql" in the upper left corner), copy&paste and click go.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on December 07, 2006, 01:13:59 PM
Quote from: Valodim on December 07, 2006, 01:01:35 PM
open phpmyadmin, open query window (the little icon labelled "sql" in the upper left corner), copy&paste and click go.

I got this:
Error

SQL query:

ALTER TABLE {$db_kwjtlff1}membergroups ADD showAddBadge TINYINT( 4 ) UNSIGNED DEFAULT 0

MySQL said: Documentation
#1064 - 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 '{$db_kwjtlff1}membergroups
ADD showAddBadge TINYINT(4) UNSIGNED


Really weird for me, because I've never run into this type of problem before.

And when I'd tried to install it via the package manager:
Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./Sources/ModSettings.php    Test successful
2.    Execute Modification    ./Sources/Load.php    Test failed
3.    Execute Modification    ./Sources/MessageIndex.php    Test successful
4.    Execute Modification    ./Sources/BoardIndex.php    Test successful
5.    Execute Modification    ./Sources/Calendar.php    Test failed
6.    Execute Modification    ./Sources/Display.php    Test failed
7.    Execute Modification    ./Sources/Recent.php    Test failed
8.    Execute Modification    ./Sources/PersonalMessage.php    Test failed
9.    Execute Modification    ./Sources/Stats.php    Test successful
10.    Execute Modification    ./Sources/Subs.php    Test successful
11.    Execute Modification    ./Themes/default/Calendar.template.php    Test successful
12.    Execute Modification    ./Themes/default/BoardIndex.template.php    Test successful
13.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful


So I did it by hand. Usually, when I've done it by hand, I've never had to go into the PHPAdmin thing. Thus, my new confusion.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Valodim on December 07, 2006, 02:53:09 PM
that's because this mod does changes to the database structure, which most other mods don't.

you have to replace the whole string "{$db_prefix}" with the prefix. as in, kwjtlff1_membergroups.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on December 07, 2006, 03:06:01 PM
Okay, I'm starting to feel like a moron here, because I'm getting the same error.

Would it be possible for you to type exactly what I'd need to copy/paste into the PHPAdmin query thing? I know you did above, but when you say "replace the whole string "{$db_prefix}", you might as well be saying: AWoiudgnfsdo sodgi738 slkdngso kj 2908yvs.?dso.

I now know how my mom feels when she asks me computer questions; this is way out of my scope of practice!
LOL! :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Valodim on December 07, 2006, 04:06:21 PM
umm... you have to replace the {$db_prefix} part in the query with whatever prefix your database uses. nothing technical there, just remove that part (as in, highlight and hit backspace) and copy&paste or enter your database prefix. default is smf_ , you can find that setting in the server setting tab in your admin panel...
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on December 07, 2006, 04:10:13 PM
But do I keep the "$db" part or delete it? Because I've tried it both ways and got the same error.

Do I type {$db_kwjtlff1} or {$db_kwjtlff1_membergroups} or {kwjtlff1_membergroups} or..?

Edit: Okay, I've tried several variations on the same theme, and still the same error. Is there another way to work around this?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Valodim on December 07, 2006, 04:54:02 PM
yeah, read this sentence two to three more times. ::)

Quote from: Valodim on December 07, 2006, 02:53:09 PM
you have to replace the whole string "{$db_prefix}" with the prefix. as in, kwjtlff1_membergroups.

I said the whole string, meaning everything enclosed by the quotation marks, including the curly brackets. I even told you what it should look like: kwjtlff1_membergroups ;)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on December 07, 2006, 05:04:30 PM
Quote from: Valodim on December 07, 2006, 04:54:02 PM
yeah, read this sentence two to three more times. ::)

Quote from: Valodim on December 07, 2006, 02:53:09 PM
you have to replace the whole string "{$db_prefix}" with the prefix. as in, kwjtlff1_membergroups.

I said the whole string, meaning everything enclosed by the quotation marks, including the curly brackets. I even told you what it should look like: kwjtlff1_membergroups ;)
You know, I appreciate your help with this, but please remember that not all of us are familiar with this sort of thing. I've been working with computers for about 22 years now, and this is the first time I've ever had to do anything like this. Perhaps if I knew what was meant by a freaking string, I'd be able to grasp the fact that you mean for me to replace all that within the quotes --brackets included-- with "kwjtlff1_". But since I've never used the expression myself... it does take about 10 times for it to be comprehended.

Now... I've done that. And get this error:
#1046 - No database selected .

This thing is trying to drive me crazy. <sigh>  :(

Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on December 07, 2006, 06:22:36 PM
Oh, and if I try to add a post (or topic), I get the following error:

Database Error
Unknown column 'mg.showAddBadge' in 'where clause'
File: /var/www/html/XX/myurl.com/community/Sources/Load.php
Line: 2231
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on December 07, 2006, 06:27:14 PM
Okay, I figured out by myself how to select a database.

Repasted the string that Valodim suggested, and it worked.

Now I'm going to try actually adding a badge, and see how it goes. LOL...

:)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Valodim on December 07, 2006, 06:38:36 PM
Quote from: Krysia on December 07, 2006, 05:04:30 PM
You know, I appreciate your help with this, but please remember that not all of us are familiar with this sort of thing. I've been working with computers for about 22 years now, and this is the first time I've ever had to do anything like this. Perhaps if I knew what was meant by a freaking string, I'd be able to grasp the fact that you mean for me to replace all that within the quotes --brackets included-- with "kwjtlff1_". But since I've never used the expression myself... it does take about 10 times for it to be comprehended.

uh... sorry, I certainly didn't expect the word "string" to be the cause of confusion. Since I'm not native english speaker and have grown up using the word in my everyday online communication, I considered it to be common knowledge, or at least derivable from such :P
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on December 07, 2006, 06:43:04 PM
LOL...
Well, let me put it this way...
If someone says "string" to me, I think "embroidery thread". Not something computer-related.

But I do appreciate all your help, thank you very much! :D

Of course... <sigh> Now I've run into a different problem with it, so I'm going to read back through this thread to see if the answer is within already...
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on December 07, 2006, 06:51:57 PM
Because this just doesn't look right...  ???

(see attachment)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Valodim on December 08, 2006, 10:23:16 AM
uh... don't mean to advertise a mod of mine or anything, but if you keep having problems with this mod you might want to try this one (http://mods.simplemachines.org/index.php?mod=191), it has very similar functionality and might do what you want, plus it does not make any changes to the group managment interface or the database (which seem to be your points of problem here). ;)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Orac on December 22, 2006, 02:44:43 PM
Quote from: Krysia on December 06, 2006, 07:04:16 PM
Quote from: mark7144 on December 06, 2006, 05:38:51 PM
Quote from: Krysia on December 06, 2006, 05:16:48 PM
I'm also all for a 1.1 version! :D
It is already fully compatible, it does not need to be re-released!

Well, when I tried installling it via the package manager, I got the following:
1.     Execute Modification     ./Sources/Load.php     Test failed
2.    Execute Modification    ./Sources/ManageMembers.php    Test failed
3.    Execute Modification    ./Themes/default/ManageMembers.template.php    Test failed


So, if it works with 1.1, I'll try installing it by hand.

This happens if you download the mod from the Third Party Mod site, you get the old version (0-3) instead of the new version (1-0) and hence the error messages. (The documentation says 1-0 but the link sends you 0-3. The URL needs changing.)

If you download 1-0 manually to your computer and then upload it to your forum and install it, everything goes fine. ;D
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Taharok on January 01, 2007, 06:26:29 PM
Ok, I downloaded and uploaded the 1-0, but how do I add multiple badges?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Taharok on January 02, 2007, 12:44:20 PM
WTF, does anyone help each other on here!?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on January 02, 2007, 01:08:32 PM
Quote from: Taharok on January 02, 2007, 12:44:20 PM
WTF, does anyone help each other on here!?
Sometimes it takes a while, especially during the Holidays. Have patience.

Add the link in the Membergroups section to the image you want to use for your badge.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Taharok on January 02, 2007, 01:41:20 PM
Doesn't this mod allow multiple Badges aka Stars according to title?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on January 02, 2007, 02:22:59 PM
Quote from: Taharok on January 02, 2007, 01:41:20 PM
Doesn't this mod allow multiple Badges aka Stars according to title?
Ummm... Let me check.
<opens up her own forum with this mod installed... goes to Admin section... Goes to Membergroups...

You set up your membergroup, and what this mod (in my understanding) allows, is for you to not only show your custom badge for a specific membergroup (mine uses a special VIP badge), it also will allow for the regular membership stars (for example, those based on postcounts or membergroups) to be shown or not shown according to one's preferences.
QuoteShow the stars even if the group is a secondary group?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Vinspire on January 31, 2007, 09:17:38 PM
Does it work on 1.1.1 ? Thanks :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on January 31, 2007, 10:05:11 PM
Quote from: Vinspire on January 31, 2007, 09:17:38 PM
Does it work on 1.1.1 ? Thanks :)
I believe so. I'm running on 1.1.1, with no noticeable problems that I can see. :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Vinspire on January 31, 2007, 11:08:47 PM
Quote from: Krysia on January 31, 2007, 10:05:11 PM
Quote from: Vinspire on January 31, 2007, 09:17:38 PM
Does it work on 1.1.1 ? Thanks :)
I believe so. I'm running on 1.1.1, with no noticeable problems that I can see. :)

Thanks for the answer :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on February 01, 2007, 10:26:38 AM
Quote from: Vinspire on January 31, 2007, 11:08:47 PM
Quote from: Krysia on January 31, 2007, 10:05:11 PM
Quote from: Vinspire on January 31, 2007, 09:17:38 PM
Does it work on 1.1.1 ? Thanks :)
I believe so. I'm running on 1.1.1, with no noticeable problems that I can see. :)

Thanks for the answer :)
LOL! You're welcome. ;) :D
Title: Re: Show Multiple Badges (AKA Stars)
Post by: URPG on February 13, 2007, 05:51:52 AM
so, anyone run it on 1.1.2. yet?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on February 13, 2007, 11:11:27 AM
Quote from: URPG on February 13, 2007, 05:51:52 AM
so, anyone run it on 1.1.2. yet?
I'm running it successfully on my forum with 1.1.2. No problems that I can see. :)

I think the only real mod that had difficulty was the Advanced Visualization Registration one, because of its use of CAPTCHA. The SMF update said only mods that used CAPTCHA would be affected. (Or something like that.) And so far, I've found that to be the case. I've had zero problems with any of my mods, although I did have to manually uninstall the Advanced Visual one first before I could run the 1.1.2 patch.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: URPG on February 13, 2007, 12:59:00 PM
Thanks a lot!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Alpay on February 18, 2007, 01:24:07 PM
Does it work on 1.1.2 ? Thanks :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Krysia on February 18, 2007, 04:26:37 PM
Quote from: Alpay on February 18, 2007, 01:24:07 PM
Does it work on 1.1.2 ? Thanks :)
It sure does. :D It's running sans difficulty on my 1.1.2 forum. :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: EG on February 26, 2007, 11:22:52 AM
this is a great mod!  was using it with RC2  now Ive updated to 1.1.2  will it work ?  Ive read a few pages back you have to make physical changes within the database... is that right ???
Title: Re: Show Multiple Badges (AKA Stars)
Post by: perplexed on February 27, 2007, 09:05:33 AM
I have been using it for a long time and each time I upgraded it worked.  This time I upgraded to 1.1.1, installed the mods, and then applied the 1.1.2 patch and it works for me.  I didnt have to make any changes to database or anything.

If you are already at 1.1.2 then I can't say if it will work or not but doing it the way I did above, worked fine.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: NativePages on March 08, 2007, 03:13:23 AM
I FINALLY figured out how to get this one to work! WOOHOO!!! (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.smileypad.com%2Fv224%2FHappy%2FClap-Hands.gif&hash=fbdc2ef28e894d1ff6ba54f87c26d2b30d0c4346) Thanks, Thantos! As Martha would say, "This is a GOOD thing!"
Title: Re: Show Multiple Badges (AKA Stars)
Post by: cassie on March 11, 2007, 03:45:44 PM
Fantastic mod! Does exactly what I wanted it to do. I just installed it on 1.1.2 and it works like a charm.

Thank you for this mod!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: bfdzio on March 18, 2007, 08:36:46 PM
Problem with the mod....It installed fine it claimed, but I am getting this on the top of my page..just the text of this...

Quote$txt['membergroups_showAddBadge'] = "Show the stars even if the group is a secondary group?";

I tried to uninstall, but it says there will be errors.  
Title: Re: Show Multiple Badges (AKA Stars)
Post by: bfdzio on March 21, 2007, 09:20:24 PM
anyone?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: hugocz on April 05, 2007, 10:22:00 PM
Im getting error when trying to install :|

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

Packages i run:
2.     WoW-Itemstats 1.25.6      1.25.6      
3.    SMF Gallery Lite    1.7.1
4.    SMF Ranks    1.1    
5.    Member Color Link    2.0.0    
6.    3guks PJIRC Integrated Chat Mod    1.1    
7.    TinyPortal    0.983    

Any tips? :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Sandwich on April 06, 2007, 07:45:15 PM
I've modified version 0.3 of this mod to work with SMF 1.1.x (it works on my forums, at least). Please test and let me know if it works for y'all.

EDIT: Wait a sec... is there a version 1.0? *goes hunting*

EDIT 2: Oki, now I feel like a dork. :p I didn't see the updated version before.  :-[ Ah well, I learned alot at least. :p
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Orac on April 07, 2007, 01:52:13 PM
Yep, check my post on the 22nd of December:- http://www.simplemachines.org/community/index.php?topic=32323.msg870620#msg870620  ;D
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Sandwich on April 07, 2007, 06:08:05 PM
Thanks.

I've got a feature request. :) I'd like to be able to define a link for each membergroup's badge. How complicated would that be?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: hugocz on April 07, 2007, 06:21:58 PM
Quote from: TEOC on April 07, 2007, 01:52:13 PM
Yep, check my post on the 22nd of December:- http://www.simplemachines.org/community/index.php?topic=32323.msg870620#msg870620  ;D

Yes, i downloaded it manually , and 1.0 and you see im geting error only on Load.php other's are sucesfull. So don't know what to do :O
Title: Re: Show Multiple Badges (AKA Stars)
Post by: hugocz on April 10, 2007, 06:38:19 AM
So anyone know if i can install it even with the Load.php error ?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: hugocz on April 10, 2007, 02:43:47 PM
Can't figure out how to fix it :| i would like this addon bad, but i don't want to install it if it says Load.php test failes, i try paste here the original xml code for load.php and the section in mine Load.php

Original:(from xml)

<file name="$sourcedir/Load.php">
<operation>
&nbsp; &nbsp; &nbsp; <search position="replace"><![CDATA[
'group_stars' => getgroupstars($profile['ID_MEMBER'], $profile['stars']),
]]></search>
<add><![CDATA[
'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]) ? 0 : $profile['stars'][0]),
]]></add>
</operation>
<operation>
<search position="replace" ><![CDATA[
function getgroupstars($id, $stars)
{
&nbsp; global $context, $db_prefix, $settings;
&nbsp; $ret = '';
&nbsp; $allstars = array($stars);
&nbsp; $result = db_query("
&nbsp; &nbsp; &nbsp; &nbsp; SELECT mg.stars
&nbsp; &nbsp; &nbsp; &nbsp; FROM {$db_prefix}membergroups AS mg,
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {$db_prefix}members AS mem
WHERE (FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups) OR ( mg.ID_GROUP=mem.ID_POST_GROUP AND mem.ID_GROUP != 0 ))
AND mem.ID_MEMBER=$id
AND mg.showAddBadge=1
",
&nbsp; &nbsp; &nbsp; &nbsp; __FILE__, __LINE__);
&nbsp; while ( $row = mysql_fetch_row($result) )
&nbsp; &nbsp; &nbsp; &nbsp; $allstars[] = explode('#', $row[0]);
&nbsp; mysql_free_result($result);
&nbsp; $starstrings = array();
&nbsp; foreach($allstars AS $star)
&nbsp; &nbsp; &nbsp; &nbsp; $starstrings[] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($star[1]) ? $settings['images_url'] . '/' . $star[1] : '') . '" alt="*" border="0" />', empty($star[0]) ? 0 : $star[0]);
&nbsp; return implode("<br/>", $starstrings);
}
]]></search>
<add><![CDATA[]]></add>
</operation>
</file>


My Load.php:

'group_stars' => str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($profile['stars'][1]) ? $boardurl . '/ranks/' . $profile['stars'][1] : '') . '" alt="*" border="0" />', empty($profile['stars'][0]) || empty($profile['stars'][1]) ? 0 : $profile['stars'][0]),
'local_time' => timeformat(time() + ($profile['timeOffset'] - $user_info['time_offset']) * 3600, false),
);



EDIT: I think it's prolly cause the mod, Ranks images in one directory, these two prolly won't work together?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 17, 2007, 01:19:33 PM
I am no longer able to keep my mods up to date since I'd rather spend the time I have on developing SMF.  As such the following mods are up for the taking.  I give my permission to update and/or modify and restribute under your name this mod.  All I request is that you let the Customization Team know if / when you post a new version of the mod so that they can remove my version.  thanks.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: hugocz on April 20, 2007, 06:37:30 AM
:( Well atleast you leave the mod for good Thantos :) Anyone please can continue on this mod? I would like to use it badly, but can't get it install without errors.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on April 20, 2007, 07:15:37 AM
Quote from: bfdzio on March 18, 2007, 08:36:46 PM
Problem with the mod....It installed fine it claimed, but I am getting this on the top of my page..just the text of this...

Quote$txt['membergroups_showAddBadge'] = "Show the stars even if the group is a secondary group?";

I tried to uninstall, but it says there will be errors. 

Your theme directory/Languages/Modifications.english.php file has an error. It appears that ?> is not at the very end of it...it's probably in the file though...you need to delete ?> from where it is and move it to the end of the file on a line of its own.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on April 20, 2007, 07:19:32 AM
I'm far from being a great coder but unless somebody better steps in I'll try to at least keep an eye on this one and keep it compatible with new SMF versions as best I can...if somebody else can do better please do it.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on April 20, 2007, 07:24:01 AM
Quote from: hugocz on April 20, 2007, 06:37:30 AM
:( Well atleast you leave the mod for good Thantos :) Anyone please can continue on this mod? I would like to use it badly, but can't get it install without errors.

Would you please post your entire Load.php file...I am not clear as to your having or not having the following at the end of it:

function getgroupstars($id, $stars)
{
  global $context, $db_prefix, $settings;
  $ret = '';
  $allstars = array($stars);
  $result = db_query("
        SELECT mg.stars
        FROM {$db_prefix}membergroups AS mg,
                {$db_prefix}members AS mem
WHERE (FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups) OR ( mg.ID_GROUP=mem.ID_POST_GROUP AND mem.ID_GROUP != 0 ))
AND mem.ID_MEMBER=$id
AND mg.showAddBadge=1
",
        __FILE__, __LINE__);
  while ( $row = mysql_fetch_row($result) )
        $allstars[] = explode('#', $row[0]);
  mysql_free_result($result);
  $starstrings = array();
  foreach($allstars AS $star)
        $starstrings[] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($star[1]) ? $settings['images_url'] . '/' . $star[1] : '') . '" alt="*" border="0" />', empty($star[0]) ? 0 : $star[0]);
  return implode("<br/>", $starstrings);
}


...followed by the closing ?> line

If you don't have that the mod will fail to work.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: hugocz on April 20, 2007, 08:52:21 AM
Well i don't have this in my Load.php but i think that's cause I don't have the mod installed? I can't install it cause Load.php

Also im using Ranks and Stars images one location (http://custom.simplemachines.org/mods/index.php?mod=335) MOD, can this be why i can't install this one ?

I can't post my Load.php here it's too long(characters limit)







Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on April 20, 2007, 09:45:34 AM
OK can you put it in a zip archive and post it as an attachment?

The two mods do conflict but what I'll try to do for you is to merge them as regards the Load.php file.

What you would then be able to do is to install this mod ignoring the error and then rename the Load.php file on your server (do this in case you need to remove this mod)...name it whatever would let you find it again easily..."Load.php-mulbadge" sans quotes would do fine. Then upload the new Load.php file I'll make for you in its place.

Your obvious other alternative, that would save on having a custom  mod, would be not to use the Ranks and Stars images one location mod.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: hugocz on April 20, 2007, 12:33:25 PM
Oh, i see, thanks alot TrueSatan that would be much appreciated :)

I've uploaded the file here http://hugo.rytir.com/Load.php.txt

Also could you help please with the second problem, (if you help me modify the Load.php) then how I make the mod work in my custom theme? cause im using a modified Tinyportal theme and most mods work only in default, don't know how about this one.

Thanks again every much :)

EDIT: I uninstalled the Ranks in one directory and now installed this mod without errors :D tho i need to figure out 2thinks now, how to make it show the secondary group title, not just badge, and make it work in nondefault theme :)

EDIT2: Ahh looks like the addon only show badges not the grouptitles, i want titles, looks like theres not mod like that around.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: hugocz on April 20, 2007, 01:47:05 PM
Really sorry that i keep spaming, but now that i Finally installed it without any errors using the packages installer (i uninstalled the problematic mod before).

And figured out it can't do exactly what i wanted to, i tried to uninstall it and woah :S

1.     Execute Modification     ./Sources/Load.php     Test successful
2.    Execute Modification    ./Sources/ManageMembers.php    Test failed
3.    Execute Modification    ./Themes/default/ManageMembers.template.php    Test failed
4.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
5.    Execute Code    remove_settings.php

Why am i geting errors, when i installed it, it was 100% error free, someone help me out so i can give up on this, please.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on April 20, 2007, 03:03:15 PM
The reason you're getting error is because you have mods that have altered the files this mod seeks to alter. I've sorted out the conflict you reported between this mod and the "Ranks and Stars images one location" mod...that one conflicts with it in the Load.php file. I'll attach two files to this posting...the first is for a clean board with no other mods than these two in place...the second is your Load.php file with the conflict in it regarding the two mods in question resolved for you.

To resolve the new problem you've reported I'll need to see your ./Themes/default/ManageMembers.template.php file and to manually edit that for you.

BTW I don't use Tiny Portal so I can't be of much use to you regarding that...I only use the default theme and though I can point you to documentation on how to integrate mods into themes in general since I must assume that as you're using Tiny Portal the theme in question is a Tiny Portal theme I'll again have to suggest that you ask on the Tiny Portal forum about it.

To use the second file please rename it to Load.php and first add the Ranks and Stars images one location then this mod ignoring the error on the Load.php file then rename the Load.php file on your server as I described earlier and upload the new file....but don't do any of the above until I've sorted your new ./Themes/default/ManageMembers.template.php problem.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on April 20, 2007, 03:11:25 PM
Quote
EDIT2: Ahh looks like the addon only show badges not the grouptitles, i want titles, looks like theres not mod like that around.

Sorry...just catching up with you having been doing the editing you needed and making a meal too...don't worry I didn't get food all over my computer.

You could get around this by making suitable images that included appropriate text and thus you wouldn't need any new mod.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: hugocz on April 20, 2007, 03:45:41 PM
Yes im sorry man, you helping me good, i did send you PM but probably too late, i downloaded the Load.php's and will test it, but firt i  would to know how to sucesfully uninstall it, too.

I can edit the files myselft, just don't know what code to change :( (the most important part yeah:D)

Two files is giving me error:

./Sources/ManageMembers.php and /Themes/default/ManageMembers.template.php

I've uploaded them here:
http://hugo.rytir.com/smf/ManageMembers.php.txt
http://hugo.rytir.com/smf/ManageMembers.template.php.txt

Please TrueSatan if you will be so kind and tell me what code i must remove/change in there ? Much apreciated

Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on April 20, 2007, 04:05:46 PM
You'll have to forgive me not giving you a complete answer right now...I look after my elderly mother and must get her off to bed....probably the easiest way for you to see what needs to be done is for me to do it then for you to compare what you had before with what I give you. Most of us learn that way.

Uninstalling isn't too difficult...really it's just a matter of reversing the process...delete the manually edited file(s) change back the old file(s) whose name(s) you edited and then use the package manager to do an uninstall.

I'll edit the files for you later on tonight and post the fixed versions here.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on April 20, 2007, 05:38:07 PM
Hmmm the two files you have provided are completely clean of any mods whatever...they are identical to those in the SMF installer pack. It would seem that you have tried to uninstall more than once and that a previous attempt already managed to uninstall the mod...either that or it never installed properly even in the files it claimed to install into.

I now need to see the two files that appeared to succeed in the uninstall as those ought to have failed if a complete uninstall had been done...

Your site is looking rather mangled to be frank. I would hope that you have been working on a test site in any case and have followed standard practice and backed up your files before applying any mod.

I can straighten out these files for you fairly easily but what worries me is did you do exactly as I told you with regard to the Load.php file prior to uninstalling as the package installer result indicates otherwise?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: hugocz on April 21, 2007, 06:43:26 AM
I didn't do anything with your Load.php's yet, and i didn't really tried to install or uninstall with errors. here's the complete list what i did.

1. Uninstall - Ranks and Images in one Location - sucessfull no errors
2. Install Multiple Badges - sucessfull no errors
3. Try ot Uninstall Multiple Badges, now it was saying errors so did hit back

The end, then i posted you the error files here, i really didn't do anything else.

here's the other mods i got installed:
1.    Show Multiple Badges (Aka Stars)     1.0
2.    WoW-Itemstats 1.25.6    1.25.6
3.    SMF Gallery Lite    1.7.1    
5.    Member Color Link    2.0.0    
6.    3guks PJIRC Integrated Chat Mod    1.1    
7.    TinyPortal    0.983    
10.    Custom BBCode    2.00


EDIT: TrueSatan i uninstalled it now :) i hit uninstall even with erros and replaced all the files, both  the sucesfulf and failel ones with files from 2007-04-20_before_multiplebadges_1-0.tar.gz  it's the automatic backup when installin new mod, phew glad it's solved out, i can now keep lookin :) Thanks you again
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on April 21, 2007, 07:32:34 AM
I can make some guesses as to what happened (an explanation of the lack of errors shown but there still being problems)...but they can only be guesses due to not (at this time...no criticism intended) having all the information I'd need to confirm them. I'd guess that you might not have had the files all set to CHMOD 777. Before installing any mod you should go to:

Admin>Packages>Options

Set up your ftp details in Installation Options (this can need some trial and error to see if the settings work properly to change the CHMOD of your files...if not try altering them) then Cleanup Permissions>All files are writable.

Check via ftp to see that all files really are writable...as above if they aren't the ftp settings you put in the Installation Options aren't right.

You can use the same process to make less files writable after installing a mod if you so wish...see the other options in Cleanup Permissions.

In this case the important ones are the files affected by this mod...their permissions should be set to CHMOD 777...do it manually via ftp if you can't get the above process to work or are having to spend a lot of time sorting it out (do get it working some time though.)

I'll add the mod to the two problem files for you and post them later.

What is the end result you are seeking now...do you want the mod installed or not?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: hugocz on April 21, 2007, 03:22:55 PM
What i seek now is a MOD that allow me to show multiple membergroup titles, for example:

Name
-primary group
-secondary group
-post group
-primary badge
-post group badge

I need the reverse of what this MOD does actually, instead of badge i want just the text. and enable witch groups to show with the check button.

Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on April 21, 2007, 03:39:59 PM
You could try requesting that such a mod be written via a posting in the SMF Coding Discussion forum, though unless you were to be prepared to pay someone to write the code you might not get anyone to do the work....it is possible to offer payment for a custom mod via that forum.

One way around your problem might be to use the Member Awards mod by Jay Bachatero and giving badges to the members in the groups you mention...it wouldn't be an automated system but it might suffice for your needs.http://custom.simplemachines.org/mods/index.php?mod=475 (http://custom.simplemachines.org/mods/index.php?mod=475)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Con on May 06, 2007, 09:34:46 AM
Thanks for making this mod, I just have a small question, how can I make it that it displays the badges in one line, instead of under each other?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on May 06, 2007, 10:25:21 AM
Thantos (who was kind enough to code this mod) is now engaged on many duties as part of the core coding team for SMF and is thus unable to continue to support mods such as this...I'll do my best to help though.

This mod is coded to show the badges in a line as much as is possible...if the badges are numerous or big then to stop them flowing across from the side bar multiple lines are used.

Perhaps the badges you have opted to use are simply too big?

For future reference those who want the badges to show under each other should change the code as follows:

in Sources/Load.php find:


function getgroupstars($id, $stars)
{
  global $context, $db_prefix, $settings;
  $ret = '';
  $allstars = array($stars);
  $result = db_query("
        SELECT mg.stars
        FROM {$db_prefix}membergroups AS mg,
                {$db_prefix}members AS mem
WHERE (FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups) OR ( mg.ID_GROUP=mem.ID_POST_GROUP AND mem.ID_GROUP != 0 ))
AND mem.ID_MEMBER=$id
AND mg.showAddBadge=1
",
        __FILE__, __LINE__);
  while ( $row = mysql_fetch_row($result) )
        $allstars[] = explode('#', $row[0]);
  mysql_free_result($result);
  $starstrings = array();
  foreach($allstars AS $star)
        $starstrings[] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($star[1]) ? $settings['images_url'] . '/' . $star[1] : '') . '" alt="*" border="0" />', empty($star[0]) ? 0 : $star[0]);
  return implode("<br/>", $starstrings);
}


replace with:


function getgroupstars($id, $stars)
{
  global $context, $db_prefix, $settings;
  $ret = '';
  $allstars = array($stars);
  $result = db_query("
        SELECT mg.stars
        FROM {$db_prefix}membergroups AS mg,
                {$db_prefix}members AS mem
WHERE (FIND_IN_SET(mg.ID_GROUP, mem.additionalGroups) OR ( mg.ID_GROUP=mem.ID_POST_GROUP AND mem.ID_GROUP != 0 ))
AND mem.ID_MEMBER=$id
AND mg.showAddBadge=1
",
        __FILE__, __LINE__);
  while ( $row = mysql_fetch_row($result) )
        $allstars[] = explode('#', $row[0]);
  mysql_free_result($result);
  $starstrings = array();
  foreach($allstars AS $star)
        $starstrings[] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($star[1]) ? $settings['images_url'] . '/' . $star[1] : '') . '" alt="*" border="0" /> <br> ', empty($star[0]) ? 0 : $star[0]);
  return implode("<br/>", $starstrings);
}
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Con on May 06, 2007, 01:20:05 PM
my badges are all 13x13 pixels, so, thats not too big.
But after installing this mod, they are all shown under each other, not next to one another.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on May 06, 2007, 04:07:44 PM
Please post examples of the images you are using. What theme are you using them in? In the default theme the mod performs as it should...if you are using a custom theme then that could be the problem.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Con on May 07, 2007, 01:13:41 AM
Heh, yea a default theme, 'black22'

Attached one of the images
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on May 07, 2007, 04:42:19 AM
 Right..."black22" isn't a default theme it's a custom theme...and it's probably why you are having problems. Please switch to the SMF default theme and test this mod in that...I expect that you'll find it works properly. Your star/badge image certainly looks to be OK.

The following tutorial gives details of how to install into a custom theme...though some themes can be a problem and that's not an area in which I would be of help to you.

http://docs.simplemachines.org/index.php?topic=402 (http://docs.simplemachines.org/index.php?topic=402)

Title: Re: Show Multiple Badges (AKA Stars)
Post by: Con on May 07, 2007, 07:58:51 AM
Quote from: TrueSatan on May 07, 2007, 04:42:19 AM
Right..."black22" isn't a default theme it's a custom theme...and it's probably why you are having problems. Please switch to the SMF default theme and test this mod in that...I expect that you'll find it works properly. Your star/badge image certainly looks to be OK.

The following tutorial gives details of how to install into a custom theme...though some themes can be a problem and that's not an area in which I would be of help to you.

http://docs.simplemachines.org/index.php?topic=402 (http://docs.simplemachines.org/index.php?topic=402)


Sorry, yypo, I ment it was a custom, anyway, it even shows them under each other in the default theme.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on May 07, 2007, 09:11:30 AM
If it isn't working properly in the SMF default theme as well then it would appear that there has to be an error in the installation or a clash with some other mod or alteration to the code.

The most likely file to be the culprit would be Load.php in the Sources directory...if you'd like to put the following files in a zip archive and post it here I'll check through them for you to make sure that the mod is installed correctly

Sources Directory:

Load.php
ManageMembergroups.php

SMF Default theme directory

ManageMembergroups.template.php

  I'll try to spot any other alterations you may have made that could be causing a conflict...I'll do my best for you...but in the end it might be necessary for you to work on a fresh test forum add this mod first then add your other mods and alterations one by one until the problem occurs...then you'll know what caused the conflict.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Con on May 07, 2007, 12:16:08 PM
I think they did get changed by another mod, I also had one edit of the posts to display location and age, and maybe thats why the awards dont show up too then..
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on May 07, 2007, 04:13:24 PM
Well...I've taken investigating this for you as far as I can Con.

The files you were kind enough to post are all OK...no problems in them at all. Only two mods have affected those files...this mod and Daniel 15's display age and location mod. That mod and this one don't conflict. I set up a fresh install and installed both mods into it to confirm that they don't conflict...no problems on that site. I then checked your files thoroughly...they are exact duplicates of those I had in that fresh install...indeed I replaced my files with yours and all was well.

The only way I can see you resolving this problem is by installing a test forum and, as I said in a previous posting, first adding this mod...then the age and location mod...checking that all is well...if it is then add each of your modifications one by one checking as you go until you find the culprit.

The files the mod affects give me no clues whatever as to what other change you may have made that could cause this problem so there's nothing more I can do to point you to a solution.

I'm sorry that I've been unable to resolve this for you but I hope that the above does give you the method by which you may find the problem's source...if you do find it please post back here giving the details.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Con on May 07, 2007, 04:54:14 PM
Thanks a lot for your help, I'll see if I can delete the location and age one, it isnt as impostant ^^
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on May 07, 2007, 05:09:21 PM
I don't think you need bother about that one...it's not the cause of your problems.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Con on May 07, 2007, 07:09:33 PM
Well, I deleted both mods, and it gave errors for deleting this one, test failed things, but I deleted anyway, and the forum flipped, saving over with the old 'load.php' as that one was the one that failed.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on May 07, 2007, 07:41:49 PM
You need to do a manual uninstall...the task is very easy to do. Given that you only had those two mods added to Load.php you could instead replace it with a fresh copy from the SMF forum install.

When tests fail please don't just ignore them...note what tests fail and in what files then manually alter those files...note...you should always do backups before installing or uninstalling mods...backup both your files and your database.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Con on May 08, 2007, 07:09:37 AM
1. Custom Profile Field Mod
2. nneonneo's AJAX ShoutBox
3. YouTube BBC Tag (XHTML Compliant)
4. SMF Gallery Lite
5. Award Mod
6. Gender On Registration
7. Karma Blocks Package V.04
8. Karma Description Mod
9. Move Old Topics

These are all the mods I have, would replacing the load.php with a fresh affect any of those?
And I do make backup's before each change.

sorry for being a pain, I'm just dont want to do anything to mess up the forum again..
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on May 08, 2007, 08:18:33 AM
Your Load.php file only had alterations from this mod and the location and age display mod in it and was otherwise exactly the same as that from a fresh install so if you don't want these two mods replacing it with one from a fresh install should cause you no problems at all...obviously it would be sensible of you to keep the old file but I don't see any reason why you would need to use it.

In the information you've posted above is something that could be a big potential problem to your forum...it's off topic as regards this mod so I'll take the liberty of PMing you about it if I may?

I've some further thoughts about resolving the issues you've had with this mod and will PM you regarding them.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: FelixofMars on May 22, 2007, 07:47:08 AM
I noticed the star rankings appear on one line which is fine, for example if you are a moderator you get the following.

* * * * *

however the additional badges all appear on a new line so you get the following;

* * * * *
[B1]
[B2]

Is there a way of having a number of badges in a row underneath the star rankings.

* * * * *
[B1][B2][B3]
[B4][B5][B6]

Please see the link for how the badges currently display.


http://www.vgzombies.com/index.php?topic=759.0

BTW I tried it with the default template, this is defiantly how the code currently handles the badges.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on May 22, 2007, 09:31:06 AM
You can remove the line break in the code from this mod that is in load.php and that should give what you appear to require...the different badges will not then be on different lines.

Find:

  return implode("<br/>", $starstrings);

Replace with:

  return implode($starstrings);

If you then want your primary member group to be alone on the first line in the badges display it will need to have enough stars/badges in it to fill that line.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: joh87swe on May 28, 2007, 07:20:03 PM
Does this mod work for version 1.1.2?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on May 28, 2007, 07:45:46 PM
Quote from: joh87swe on May 28, 2007, 07:20:03 PM
Does this mod work for version 1.1.2?

Yes...no changes are needed to the version offered on the official mods site for SMF1.1.2 support.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: xxXionxx on June 09, 2007, 05:28:09 PM
Good Day SMF :D  ;D

This is at the bottom of my forum so i assume it is what verisin I have...
"Powered by SMF 1.1.2 | SMF © 2006, Simple Machines LLC  "


Do I need :

multiplebadges_1-0.zip

--Or--

multiplebadges_0-3_SMF105.zip


Thankyou very Much.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on June 09, 2007, 05:46:06 PM
You need 1-0

From your question I'd say you were new to SMF so I'll add that if the package manager installation shows errors they will be due to other mods you may have installed conflicting with this one and that you'll then need to read http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531) and also use http://server.daniel15.com/smf/package.php (http://server.daniel15.com/smf/package.php)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: xxXionxx on June 09, 2007, 08:23:47 PM
Thankyou so much, and yes im new :P  All we have on it to my knowledge is a custom skin.

Ill be sure to come back if i need any more help.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on June 09, 2007, 08:27:10 PM
In SMF we talk of themes not skins as the effect of the customising is so much more than a traditional skin would give you...but you'll soon get the hang of such things I'm sure.

With a custom theme you will certainly need to use the links I gave you as, like most mods, this one only installs into the default theme and you will need to manually install into a custom theme.

Good luck!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: xxXionxx on June 09, 2007, 09:11:27 PM
HMmmm My forum owner really isnt sure of where to go to install this mod.
Would iot be possible for you to provide a detailed sequence of installing this manually? :X soory if im causing an annoyance.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on June 09, 2007, 09:52:49 PM
The second link I gave you allows you to input the mod and it will then output the detailed instruction list you mention. That will tell you how to install into the SMF default theme by way of a manual install.

Your forum owner shouldn't have any more trouble installing this mod than any other so perhaps you might suggest that a thorough read of the SMF documentation (link at the top of this page in the navigation bar) would be in order and that it might be as well if he/she first tried any modification work or custom themes in a test forum and didn't try installing anything in a live forum without doing it in the test forum first. In general a test forum is your lifeline and allows you to make as many mistakes as you like without causing any real harm...you can easily delete and reinstall a test forum.

I'd suggest that getting mods running in the SMF default theme is the first step then one might try to get them running in a custom theme if that first step is a success. Obviously if you can't get a mod to run in the SMF default theme trying to get it to work in a custom theme would be futile.

I'm more than happy to help you get a mod running in the SMF default theme but when it comes to custom themes you are on your own...they tend to be a very mixed bag and often give difficulties...particularly to those who are new to SMF. To be frank I tend to avoid them and run my forums on the SMF default theme.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: KGIII on June 10, 2007, 02:39:42 PM
Here's a fun one... Anyone have any idea how to make the primary membergroup stars show under the secondary group stars instead?

Right now it is:

[badge]
[stars]

The badge is the primary membergroup. The stars are the post count based membergroups. So...

I can't figure it out. I've looked.

The objective is:

[stars]
[badge]

*sighs*

;) I don't know everything.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: drasut on June 27, 2007, 07:34:28 PM
Quote from: Thantos on April 04, 2005, 10:03:46 PM
Link to Mod (http://mods.simplemachines.org/index.php?mod=115)

This mod allows you to display multiple badges for each user.  It also allows you to determine if a badge should be show if it's an additional group
on a per group basis.

Thank you for this excellent mod.
It solved a huge problem for me
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Gantry on July 01, 2007, 11:05:13 PM
Anyone have any suggestions on how to hack this one to work with 1.1.3?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Fustrate on July 01, 2007, 11:08:17 PM
Removed (see below) :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on July 02, 2007, 04:57:15 AM
@ Gantry

The mod already supports SMF 1.1.3. It is not SMF version specific.

@ YodaOfDarkness

Your posting has no relevance to this mod.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Fustrate on July 02, 2007, 09:28:37 AM
Ah, I thought I remembered it being version-specific, sorry :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on July 02, 2007, 09:51:40 AM
No problem...I just didn't want people trying to do what you'd advised then reporting back saying it couldn't be done.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Gantry on July 02, 2007, 05:25:58 PM
It may support 1.1.3, but when I installed 1.1.2 -> 1.1.3, it blew away Show Mult Badges.

When I tried to Apply the mod, I got this:

QuoteError in Package Installation.  At least one error was encountered ...blahblah

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

The only other installed package I have is vMulticolor-Stars Mod 0.99 , and I'm using the SMF Default theme on my test site.  It's all pretty basic.

Suggestions?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on July 02, 2007, 07:02:16 PM
All very simple...the SMF upgrade upgraded/overwrote some of the files this mod edits so the edits were lost.

As regards this mods support for SMF 1.1.3 there's no may support SMF 1.1.3 about it...it does support SMF 1.1.3.

Your other package does edit files this mod also needs to edit therefore your files are not as this mod expects to find them. You thus need to do a manual installation of this mod...please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

As you had this mod installed prior to the upgrade and didn't uninstall it (I presume) some of the file edits it made may still be in place and so you will need to inspect your files to see what needs new editing and what does not.

You could instead, providing you've done no other editing and added no other nods, uninstall the SMF 1.1.2 to 1.1.3 package, uninstall this mod, reinstall the SMF 1.1.2 to 1.1.3 package and reinstall this mod...if all went well that might well fix things for you though you might still need to do the reinstallation of this mod manually.

Whenever two mods seek to edit the same files the kind of fail report you saw is likely to be encountered...it's probably the most common issue faced by any SMF admin and the resolution is always to use a manual installation of the mod.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: ferrazf on July 04, 2007, 06:29:53 PM
Hey,
First of all nice little hack, this thing does wonders!

I would like to know if it is possible to add a link to one of the icons? I want to link a player's profile to their optional screenshots page. So I think the easiest way would be to add each user that has screenshots to their own group, and use the group's image under their name as a link to their screenshot page.

I can do it through phpmyadmin for each individual player, if needed, I just wanted to know how and where :)
Any other ways to do this?

Thanks!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on July 04, 2007, 07:23:10 PM
I don't think I'd do that via alterations to this mod...more likely I'd seek to add an icon next to the view profile, personal messages, email etc and have that be your link. You'd need to edit display.template.php to get that icon and then code the rest of what you want from there...it certainly isn't within the scope of this mod.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: JoeB on July 04, 2007, 08:25:46 PM
I am getting these errors with SMF 1.1.3:

Type Action Description
1. Execute Modification ./Sources/Load.php Test failed
2. Execute Modification ./Sources/ManageMembers.php Test failed
3. Execute Modification ./Themes/default/ManageMembers.template.php Test failed
4. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
5. Execute Code add_settings.php 


Please advice me
Title: Re: Show Multiple Badges (AKA Stars)
Post by: redone on July 04, 2007, 08:35:56 PM
From what you have reported you will need to install the mod manually.

Follow the edits in the provided .xml or .mod file which ever this mod uses and edit the files accordingly.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: mark7144 on July 15, 2007, 04:45:09 PM
Quote from: KGIII on June 10, 2007, 02:39:42 PM
Here's a fun one... Anyone have any idea how to make the primary membergroup stars show under the secondary group stars instead?

Right now it is:

[badge]
[stars]

The badge is the primary membergroup. The stars are the post count based membergroups. So...

I can't figure it out. I've looked.

The objective is:

[stars]
[badge]

*sighs*

;) I don't know everything.
This is exactly what I want to know as well. I looked through all the code but couldn't find anything to change the order. In it's current form it just looks wrong having the stars below the badge.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Davy-D on July 18, 2007, 02:35:23 PM
Hi Thantos,

thanks a lot for this great mod. I just installed it smoothly on 1.1.3. Maybe the SMF support list on the mod site could be updated ...

I got some questions:
1. is it somehow possible to show the badge in the members' profiles also ?
2. is there a way, to allow any moderator group to add/remove users from a specific badge's group - other than raw editing the DB of course ?

Thanks in advance,
Davy.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on July 18, 2007, 03:33:33 PM
@ Davy-D

Thantos has taken on a very demanding role as part of the SMF team and is thus unable to spare time to support a number of his mods...he has been kind enough to offer them for other members to take on and support. I'm looking after this one

I don't have the necessary access to the mod site and thus I can't update it. I may formally take over the mod at some stage if a new version is required and, SMF permitting, may be able to alter the mod listing at that time.

To show the stars/badges on profile pages you would need to make suitable edits to profile.template.php Like almost all php changes it is possible but not necessarily easy.

To remove a member from having a particular badge in the way you describe you'd need to move that member to a different group.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Toma Grubb on August 11, 2007, 07:03:36 AM
I have the Stars mod installed but am not figuring out how to use it. Is there a manual or forum for it?

I am not sure if this mod is what I was looking for. I was looking for something that allows me to assign designations like mentor, trainer, Nurse, Advisory Board, Tech Support, etc and have it show like the Developer, support etc. designations I see in this and other forums. (Not the stars but badges that say those things) I am looking for a system to make it easy for forum members and guest to easily identify those with special expertise and let them know their post carries more weight as far as an authoritative source.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on August 11, 2007, 08:45:49 AM
Other than this support topic this mod, like the vast majority of mods, has no manual or other instructions...and frankly it doesn't really need more. If you want to know what it does then put it on a test forum on your hosting and play with it...that's the best way to learn how to use any mod.

You might well assign the sort of designations you mention via the systems in the default SMF installation without use or need of additional mods...put the members concerned into new groups (or secondary groups.) You could replace the current images for particular groups with new images as needed and add more for new groups...
Title: Re: Show Multiple Badges (AKA Stars)
Post by: BioCarbon13 on August 16, 2007, 11:05:09 AM
Help! :)

I'm trying to add a feed and get following error msg: XML error: mismatched tag at line 63

What does it mean? What am I doing wrong?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Gantry on August 16, 2007, 11:46:39 AM
Quote from: BioCarbon13 on August 16, 2007, 11:05:09 AM
I'm trying to add a feed and get following error msg: XML error: mismatched tag at line 63

What do you mean by "add a feed"? The question sounds like it belongs to an RSS problem...
Title: Re: Show Multiple Badges (AKA Stars)
Post by: cometopapa on September 06, 2007, 06:40:16 AM
Help me...

Right now, i use SMF 1.1.3 and try to install this mod ( "Show Multiple Badges (AKA Stars)" but there many error like this...

Installing this package will perform the following actions:  Type Action Description
1. Execute Modification ./Sources/Load.php                                                       Test failed  2. Execute Modification ./Sources/ManageMembers.php                                    Test failed  
3. Execute Modification ./Themes/default/ManageMembers.template.php         Test failed  
4. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
5. Execute Code add_settings.php

For info i already installed other valid mod , like these :
1. Googlebot & Spiders Mod 2.0.3
2. Ad Managment 2.3   
3. MessagePreviewOnHover 1.5   
4. View Only Boards 1.1   
5. Referrals Mod 1.4   
6. Member Awards 1.0.2
7. Additional Membergroups on Profile 1.0   
8. Users Online Today Mod 1.4.0   
9. Invite 1.14   
10. Attachments Download Permission 1.0   
11. SMF Gallery Lite 1.8   
12. Spiders Don't Increase Topic Views 1.0   

There's another conflig which the other mod ?
please.... Anybody can fix it  :(

thanks
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on September 06, 2007, 06:51:00 AM
Your errors are a variant on the most common error of all those reported on these pages...it tells you that another mod you have installed has already edited the file in question and that you thus need to do a manual installation of this mod. Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)

Mirror of the last link:

http://www.smfhacks.com/smf-package-parser.html (http://www.smfhacks.com/smf-package-parser.html)

It doesn't matter which mod or mods have caused the conflicts as the solution is the same in any event.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Merecraft on September 24, 2007, 07:14:47 AM
This is a great mod and really does what I require regarding showing stars for membergroups that are additionalGroups rather than just the primary group.

It seems to work great, but I am getting the following errors in my forum errors log:
Database Error: Lost connection to MySQL server during query
File: /home/domainname/public_html/forum/Sources/Load.php
Line: 2279

This line refers to the database query in the function getgroupstars(). I'm not getting db errors with any other queries, just the one from this mod. Any ideas why this may be happening?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on September 24, 2007, 07:44:23 AM
I think it's your hosting rather than the mod as such...it may well be that you have a lot of mods installed that query the database via Load.php and this mod has been akin to the straw that broke the camel's back...the database will only stay connected for a set time (set by your host) and if a query takes longer than that it will disconnect...if this query pushed your Load.php over that time limit it would give the error you report. It may well work properly at times when the server is under less load and not work when the server is under more load...in less load periods the scripts will execute faster and be less likely to trigger a time out.

You may not be too happy with the choices you may have to make...get rid of some mods...move hosting...get the host to up rate the timeout.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Merecraft on September 24, 2007, 08:56:14 AM
Thanks for the quick response :)

It's possible that it is a host problem but I've been talking to my host about it and they can find nothing wrong. They have been doing some slow query logging on the server, and have reported that
QuoteThe slow query log for these times (the time of the error reports) shows no problem with the size of the queries reaching any limits at all so its not a limit problem.
They assure me the sql server is correctly configured and optimised as well.

I have installed other mods since that query the database, but they are not causing any errors at all. It's really weird and a shame because I really don't want to lose the functionality of this mod.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on September 25, 2007, 04:57:36 AM
 Looking at the query and assuming the mod to be properly installed it really has to be an issue with your hosting...the error report says as much. It isn't quoting a failed file or a line in a file as wrong but saying the server disconnected MySQL part way through. I can't say why it disconnected but the report you quoted says it did do so.

Sorry I can't be more help on this but there's nothing more in the error report than that. You could prove to yourself that the mod works on your server by setting up a test forum (you should do this anyway and test mods on it before adding them to a live/production forum) and seeing if the mod works properly on that.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: glasschalice on October 01, 2007, 12:21:34 AM
Boy I am totally lost on this one!  I installed the package and got no error messages.  But I don't see anywhere to use the mod.  Nothing has changed in the menu on the left or in the member or membergroup modification area.  I'm very new to SMF so any hand holding the newbie would be awesome!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on October 02, 2007, 08:57:35 AM
Are you using a custom theme...anything other than the SMF default theme is a custom theme. Almost all mods only install into the SMF Default theme and this one is no exception...you have to manually edit them into custom themes.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: glasschalice on October 02, 2007, 01:05:40 PM
I am using a custom theme.  Can you give me a general idea of what I need to modify to get it to work?  Thanks!!
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on October 02, 2007, 02:18:33 PM
Certainly...you need to look at the edits the mod makes to the SMF default theme and then to try to replicate them in your custom theme...to do this you need to study the process of a manual installation...the following links should give you the information you need...the Package Parser gives a human readable version of the directions for doing a manual installation of the mod:

Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)

Mirror of the last link:

http://www.smfhacks.com/smf-package-parser.html (http://www.smfhacks.com/smf-package-parser.html)


If there isn't a particular named file that the mod would normally edit included in your custom theme then your forum should automatically use the file from the SMF default theme....sometimes this fails and in those instances you should copy the default theme file to your custom theme.

Some custom themes are easier to edit that others...if the one you are using is too difficult for you to edit you might be best to either pick an easier one or to use the SMF Default theme.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: 3mrhythm on October 29, 2007, 02:57:36 AM
any hopes for a 1.1.4 version?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TikkA on October 29, 2007, 08:14:39 PM
Quote from: 3mrhythm on October 29, 2007, 02:57:36 AM
any hopes for a 1.1.4 version?

Hope so
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on October 30, 2007, 06:19:33 AM
Please note the above two queries leave me exasperated! You have always been able to use version emulate on mods that don't support a new SMF version but even worse than not looking that up you haven't even tried to use this mod or you would already know that it isn't version specific and will run on any SMF version from 1.1.1 to 1.1.x!

Title: Re: Show Multiple Badges (AKA Stars)
Post by: TikkA on November 02, 2007, 09:38:15 AM
lol i didnt try, how does it work?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: gxd5 on November 09, 2007, 02:48:21 PM
Aloha,

I would like to extend this functionality so that the extra badges are displayed whenever the user name is displayed. For instance, when you are looking at the topic list, I would like the badges next to "Last Post" and "Started By". Alternately, modifying this so that the color indicating the person's group shows up might work. The main idea is to identify certain posters.

I am using the extra group icons to distinguish "professionals" from regular posters, and I would like to make this distinction easily recognizable. Php is not my forte, but I am willing to attempt to hack this together myself. However, before doing so, I thought I would post here to see if it has already been done.

Thanks for a great mod!

Mahalos,

Rob
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on November 09, 2007, 10:25:49 PM
It hasn't been done, to my knowledge anyhow, and if you do manage to pull it off I'd be happy to see these aditions as ACP controlled options. Thantos has passed this mod on and I've taken charge of it so if you'd like to have a new version with such additions and want to code them I'd be delighted to give you attribution and post said new version.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: seymoor on December 10, 2007, 05:14:32 PM
A possible bug is if I don't want to display the REGULAR group's stars (Number of star images=0),
but I want to display the post count based (secondary) group's picture, it will be displayed double.

Is there any solution for this phenomenom?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on December 10, 2007, 09:38:30 PM
Sorry no...the mod is only coded for the non post count groups.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: seymoor on December 11, 2007, 02:52:32 PM
I mean if the regular group's

Number of star images:  0 (don't show any image)

Show the stars even if the group is a secondary group?:    (on or off it doesn't matter)   

and the post count based group's

Number of star images:  1 (show an image)
Show the stars even if the group is a secondary group?: ticked

this will display the post count based group's image TWICE below each other, not ONCE.

Title: Re: Show Multiple Badges (AKA Stars)
Post by: Cladestino on December 14, 2007, 06:10:24 PM
Hi:

Im on 1.1.4, default theme, no mods.

Ive tried to add this mod but no success at all, the usual error reported before:
1. Execute Modification ./Sources/Load.php Test failed  
2. Execute Modification ./Sources/ManageMembers.php Test failed  
3. Execute Modification ./Themes/default/ManageMembers.template.php Test failed .

Ok, no problem...ill make a manual install...but....didnt find the strings that was supose to change/add on those 3 files above.

What im doing wrong? Please help me.

Thanks in advance





Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on December 14, 2007, 06:44:16 PM
@ Seymoor

I'll try to find time to debug your problem this weekend

@ Cladestino

Have you gone to ACP>Packages>Options and used the system there to make "All Files Writeable"? If not...
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on December 16, 2007, 05:32:09 AM
@ Seymoor

You would appear to have duplicate installed the mod...check all the files the mod edits and remove any duplicate code it has added.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: tennesseeavalanches on December 21, 2007, 09:30:54 PM
Having a problem and not quite sure what the deal is.

Thanks to SleePy we finally got it working but now I have a few members showing the following.
duplicate 08 badges
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Gary on December 21, 2007, 10:35:17 PM
Dont set the same membergroup as a primary membergroup and a secondary membergroup. :P
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Nutronic on January 10, 2008, 06:33:28 AM
Does this work for 1.4 or can anyone suggest a similar mod that does?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: TrueSatan on January 10, 2008, 11:00:10 AM
This mod does work for SMF 1.1.4
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Jade Elizabeth on January 29, 2008, 07:03:51 PM
Quote from: ladyshanae on June 10, 2006, 03:43:22 PM
I figured out how to do this and posted it a page or two back.  Here is the code:

QuoteIn Load.php FIND:

  $starstrings = array();
  foreach($allstars AS $star)
        $starstrings[] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($star[1]) ? $settings['images_url'] . '/' . $star[1] : '') . '" alt="*" border="0" />', empty($star[0]) ? 0 : $star[0]);
  return implode("<br/>", $starstrings);
}

REPLACE  return implode("<br/>", $starstrings);

With

return implode($starstrings);

I tried this on my 1.1.4 install and I got

QuoteWarning: main(/home/jade/public_html/forums/Sources/Load.php) [function.main]: failed to open stream: No such file or directory in /home/jade/public_html/forums/index.php on line 52

Fatal error: main() [function.require]: Failed opening required '/home/jade/public_html/forums/Sources/Load.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/jade/public_html/forums/index.php on line 52

I really want the space from between the badges taken out :(
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Jade Elizabeth on January 29, 2008, 07:07:58 PM
NVM...my FTP didnt upload right :(
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Kimmie on February 17, 2008, 12:54:15 AM
well i just installed this (with everything passing on the install) and now all i get is this no matter what area I try to go to on my forum. :


QuoteThe page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.


Please try the following:

Open the kimmie.byethost13.com home page, and then look for links to the information you want.
Click the  Refresh button, or try again later.

Click  Search to look for information on the Internet.
You can also see a list of related sites.




HTTP 500 - Internal server error
Internet Explorer 

Sure glad it was a test site.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: novastar on April 21, 2008, 04:19:15 PM
I would like to be able to decide what order the membergroup stars will appear. Can someone show me what to edit or add to have the mod do that?
_________________________________________

Also, for anyone having problems installing or uninstalling, make sure the following files are being edited:

1. Execute Modification ./Sources/Load.php
2. Execute Modification ./Sources/ManageMembergroups.php
3. Execute Modification ./Themes/default/ManageMembergroups.template.php

I see alot of people posting that the mod is trying to edit ManageMembers instead of ManageMembergroups. It will not find the correct information in the ManageMembers files, which is why it is failing. My install.xml shows the proper files, but my uninstall.xml file shows incorrect files. simply enter the correct filename in either of those, and you should not have problems (unless another mod has edited the lines it is looking for, in which case you would have to install the mod manually)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Jade Elizabeth on April 21, 2008, 05:42:43 PM
http://custom.simplemachines.org/mods/index.php?mod=1110 <This mod does it :).
Title: Re: Show Multiple Badges (AKA Stars)
Post by: novastar on April 21, 2008, 08:35:13 PM
Quote from: Alundra on April 21, 2008, 05:42:43 PM
http://custom.simplemachines.org/mods/index.php?mod=1110 <This mod does it :).

But that mod does not give me the features of this mod, specifically, allowing disabling of stars for secondary membergroups.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Jade Elizabeth on April 22, 2008, 08:14:47 AM
Quote from: novastar on April 21, 2008, 08:35:13 PM
Quote from: Alundra on April 21, 2008, 05:42:43 PM
http://custom.simplemachines.org/mods/index.php?mod=1110 <This mod does it :).

But that mod does not give me the features of this mod, specifically, allowing disabling of stars for secondary membergroups.

True, but then there would be no point of having this mod- I mean multiple stars/badges (you can only have one primary membergroup) would use the secondary groups. With the other mod you can disable a star from showing by not including it in the order you wish for the badges to display in. I'd ask JB how he did the order thing, if you want to use it with this mod :).
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 22, 2008, 09:32:18 AM
I think novastar meant the ability to selectively disable stars for particular membergroups if they are secondary groups.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Jade Elizabeth on April 22, 2008, 11:58:24 AM
Quote from: Thantos on April 22, 2008, 09:32:18 AM
I think novastar meant the ability to selectively disable stars for particular membergroups if they are secondary groups.

Ahh okay. I'd still suggest either asking JB or looking at his code for how he managed the ordering :).
Title: Re: Show Multiple Badges (AKA Stars)
Post by: perplexed on April 23, 2008, 05:59:38 AM
I use this mod too (have for years so I stuck with it) and the order thing is something that is a puzzle so I would be interested to know if there is a way around it too :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Jade Elizabeth on April 23, 2008, 03:47:14 PM
I used it before I upgraded. It served me very well!

I will ask JB for you.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: perplexed on April 23, 2008, 03:49:21 PM
cheers alundra, maybe you can just point him to this thread :)
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Jade Elizabeth on April 23, 2008, 03:50:15 PM
I know how to ask JB for help lol
Title: Re: Show Multiple Badges (AKA Stars)
Post by: LiamTheDuck on April 23, 2008, 03:51:22 PM
Really would like this to be 2.0 :D
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Bulakbol on April 24, 2008, 02:36:46 PM
Please post your suggestion/request here.  ;)

http://www.simplemachines.org/community/index.php?topic=225743.140#lastPost
Title: Re: Show Multiple Badges (AKA Stars)
Post by: perplexed on April 24, 2008, 02:39:37 PM
that's for a different badge mod ???
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Thantos on April 24, 2008, 02:41:04 PM
Well this one isn't being maintained anymore so you would probably be better off if JohnnyB can add features from this mod into his mod.
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Bulakbol on April 24, 2008, 02:47:34 PM
Or maybe have someone to update this mod for 1.1.4 and 2.0 Beta 3 Public.  :D
Title: Re: Show Multiple Badges (AKA Stars)
Post by: perplexed on April 24, 2008, 03:03:34 PM
to be honest I've never compared this mod to JohnyB's badge mod because we've had this one for years and it works for us and does what we want it to do, but perhaps a comparison is in order since I don't actually know what the differences are ???
Title: Re: Show Multiple Badges (AKA Stars)
Post by: BigStotty on June 28, 2008, 03:07:13 PM
is there a way to split the badges, as currently it shows membergroup then post group straight after and i am looking to slipt these so i can show

Username
membergroup (ie admin)
membergroup stars
avatar
postgroup
postgroup stars
Title: Re: Show Multiple Badges (AKA Stars)
Post by: tk2012 on July 18, 2008, 11:26:03 PM
Is this being updated to v2.0 b3.1?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Marcus Forsberg on August 30, 2008, 04:59:21 AM
Will this work whit 2.x?

And if not, will it do in the future?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: funcouldron on January 09, 2009, 04:06:57 AM
this mod is not updateddd
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Ave Marie on July 01, 2009, 02:11:49 PM
Dagnabbit! Can someone help me out with this one? 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: Show Multiple Badges (AKA Stars)
Post by: midiof[f] on July 23, 2009, 03:32:17 AM
pls update to v. 1.1.10 thx

Installing this package will perform the following actions:
Type   Action   Description
1.   Execute Modification   ./Sources/Load.php   Test failed
2.   Execute Modification   ./Sources/ManageMembers.php   Test failed
3.   Execute Modification   ./Themes/default/ManageMembers.template.php   Test failed
4.   Execute Modification   ./Themes/default/languages/Modifications.english.php   Test successful
5.   Execute Code   add_settings.php
Title: Re: Show Multiple Badges (AKA Stars)
Post by: MajorHavok on July 26, 2009, 04:39:52 PM
Is it safe to say that this Mod is no longer in production?  It will not install (successfully) under 1.1.10 - and there are people (not unlike myself) who are looking for this functionality.

Has it been supplanted by Stars and Badges (http://www.simplemachines.org/community/index.php?topic=225743.0)?

Just askin', there aren't that many options out there...

- MajorHavok
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Bruno36 on July 30, 2009, 02:56:32 AM
Hello!

An adaptation for SMF 2.0 RC1.2 is planned?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: azhriel on March 09, 2010, 04:48:24 AM
can i use this on smf 1.1.8?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: fresh iz ere on January 18, 2011, 12:50:43 PM
Could you please update the mod to RC4?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Jessica. on June 16, 2011, 04:59:34 PM
can this be made compatible for SMF 2.0 please
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Joe_ on August 15, 2011, 12:30:39 AM
Ah, I know this is an extremely old topic.. But Could someone please update this mod for 2.0?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: 51B0RG on January 31, 2012, 08:42:41 AM
please update for 2.0.2. this would be really useful
Title: Re: Show Multiple Badges (AKA Stars)
Post by: Alpay on March 27, 2012, 06:55:50 PM
Quote from: 51B0RG on January 31, 2012, 08:42:41 AM
please update for 2.0.2. this would be really useful

Yes , please :(
Title: Re: Show Multiple Badges (AKA Stars)
Post by: kittonium on March 31, 2018, 04:40:13 AM
any alternatives for latet smf?
Title: Re: Show Multiple Badges (AKA Stars)
Post by: -Rock Lee- on March 31, 2018, 09:45:38 AM
Quote from: kittonium on March 31, 2018, 04:40:13 AM
any alternatives for latet smf?

Maybe https://github.com/MissAllSunday/showCustomMembergroups?


Regards!