Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Valodim on September 12, 2005, 08:29:54 PM

Title: vMulticolor-Stars Mod
Post by: Valodim on September 12, 2005, 08:29:54 PM
Link to Mod (http://mods.simplemachines.org/index.php?mod=191)

This mod replaces the common stars system. By default, instead of displaying only the primary group's stars, it takes all stars together and fills up with default stars. for example:

a member is admin (1x red star), special member (1x silver star) and is in the posting group "hero" (4x gold star), he'd have the one red, one silver, and 2 more gold stars all in a row. Of course, you could set "administrators" to have 3 red stars + the rest, but one-color-per-group works pretty well for me :)

There's also options to display all postgroup-stars (and not just fill up), and add breakrows between stargroups now (for badges). :)

This is useful for big forums with many membergroups, because people can see all of them instead of just the main one.

I've been using this at my place for quite a while now, and it's working fine. check it out to see how it really looks:
http://mugenguild.com/forumx/

New feature in 0.98+: Postgroup-based stars. If this option is enabled, the number of stars is determined by the postgroup while the stars (ie, their colors) depend on the main membergroup. Meaning, if you're in administrator group (which has one red star) and hero postgroup, you have four red stars. If administrator group has two red stars, that would result in 8 red stars.

There's a number of stars included in the package (namely those I use on my forum, I was too lazy to make more for this ;P), it also contains big stars (http://www.simplemachines.org/community/index.php?topic=15622.msg131231#msg131231) by tony, and works very well with badges :)

\\ 0.98

Added feature (by request from alexasc), see above

\\ 0.99

whoops, I forgot to have members with no main rank have the default postgroup stars for alternate mode :)
Title: Re: vMulticolor-Stars Mod
Post by: Anguz on September 12, 2005, 09:55:11 PM
Thanks! I wanted something like this, but was too lazy to do it. :P
Title: Re: vMulticolor-Stars Mod
Post by: trenchteam on September 13, 2005, 01:21:30 AM
wow, extremely nice mod! Thanks! This is awesome!
Title: Re: vMulticolor-Stars Mod
Post by: huijaa on September 13, 2005, 10:17:00 AM
Is it compitable for version 1.0.5 ?
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on September 13, 2005, 10:18:16 AM
not tested, but since it's a very simple mod, it might. give me a sec'

\\ edit

no it didn't. fixed ;)
Title: Re: vMulticolor-Stars Mod
Post by: Tony Reid on September 13, 2005, 10:23:14 AM
Here are some stars here - feel free to distribute them if you want ;)

http://www.simplemachines.org/community/index.php?topic=15622.msg131231#msg131231
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on September 13, 2005, 10:42:09 AM
yah I like them. added them to the package, thanks :)
Title: Re: vMulticolor-Stars Mod
Post by: huijaa on September 13, 2005, 10:54:52 AM
I see it...

Step 1 ... failed - ERR(1): Search string could not be found
Step 2 ... ok

It was at version 1.0.5... :(

But I would change first step in this mod, but it don't works. I think that i must upgrade my forum  to 1.1 beta 3...
Title: Re: vMulticolor-Stars Mod
Post by: R1p.PeR on September 13, 2005, 11:31:50 AM
the mod installs correctly but when i try to see the topics in the boards i got this error

An Error Has Occurred!
2: Missing argument 2 for db_query()

i have version 1.0.5 of the forum  :o
Title: Re: vMulticolor-Stars Mod
Post by: huijaa on September 13, 2005, 11:38:47 AM
Quote from: R1p.PeR on September 13, 2005, 11:31:50 AM
the mod installs correctly but when i try to see the topics in the boards i got this error

An Error Has Occurred!
2: Missing argument 2 for db_query()

i have version 1.0.5 of the forum  :o
it's same result at my...:(
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on September 13, 2005, 11:52:35 AM
crap >_<

I'll fix that immediately, sec'

\\ edit

haha, I forgot to add __FILE__, __LINE__ to the query. 1.0.5 seems to be more picky about that than 1.1beta3, I'm sorry. :P
Title: Re: vMulticolor-Stars Mod
Post by: R1p.PeR on September 13, 2005, 12:01:00 PM
maybe i can't make a mod but i think that the problem is it

// exluce all with minPosts = -2, so we don't get warning "stars" here! (for vWarn mod)
$result = db_query("SELECT ID_GROUP, groupName, stars FROM {$db_prefix}membergroups WHERE ID_GROUP IN ('" . implode('\',\'', $groupsToLoad) . "') AND minPosts != -2");
while($row = mysql_fetch_assoc($result)) {
$groupData[$row['ID_GROUP']] = explode('#', $row['stars']);
$groupData[$row['ID_GROUP']]['name'] = $row['groupName'];


seem that you vstar mod was created to work with you vwarning mod  :'(
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on September 13, 2005, 12:18:51 PM
geez, that's what I get for hurrying >_<

Quote
seem that you vstar mod was created to work with you vwarning mod 

nope, that's not it.

DO NOT YET use with smf1.0.5, there's some unfixed problem left! I hope I can fix it fast, sorry guys.

PS: what's wrong with the smf page, it's slow as hell >_<

\\ edit

didn't notice "additionalGroups" wasn't in the normal profile-query, fixed now and should work for 1.1 and 1.0.5. sorry for any inconveniences :(
Title: Re: vMulticolor-Stars Mod
Post by: R1p.PeR on September 13, 2005, 01:38:05 PM
 :D  woaaah, the mod works now, thx a lot   ;D
Title: Re: vMulticolor-Stars Mod
Post by: huijaa on September 13, 2005, 06:34:35 PM
Quote from: R1p.PeR on September 13, 2005, 01:38:05 PM
:D  woaaah, the mod works now, thx a lot   ;D
How? (when it works at version 1.0.5) I found it in download at mods-page. It works now too, thx a lot ;D
Title: Re: vMulticolor-Stars Mod
Post by: kikea on September 14, 2005, 04:30:57 AM
... last fix work - ok, but now for users not including counted stars ...
I'm using SMF 1.1 Beta 3 Public. I'm tested your mod an example for Admin account and only displays the Admin star.

Thanks for good stuff.
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on September 14, 2005, 10:39:19 AM
works fine for me ???

if your admin rank has the default number of stars, which is 5, and the user has < 6 postcount-stars (by default, max is 5), there aren't any. change your admin rank to one single star and it should work.
Title: Re: vMulticolor-Stars Mod
Post by: kikea on September 15, 2005, 10:09:41 AM
An suggestion,

Not will be more obvious if will displays all stars from all Groups?

An example.

If User is in Administrator group, and Moderator, and he also is a Newbie.
For me is more usefull if it will displayed at following example:
(http://forum.scorpan.com/Themes/classic/images/staradmin.gif)(http://forum.scorpan.com/Themes/classic/images/stargmod.gif)(http://forum.scorpan.com/Themes/classic/images/star.gif)

Current for this user is displayed as following:
(http://forum.scorpan.com/Themes/classic/images/staradmin.gif)(http://forum.scorpan.com/Themes/classic/images/stargmod.gif)


From my point view ... the second version is more confuse than first.
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on September 15, 2005, 11:03:20 AM
don't think so, a profile would just have too many stars, then. that other star mod around here (the one with "badges" in its name) does it like that, I think...
Title: Re: vMulticolor-Stars Mod
Post by: Jazhawk on September 15, 2005, 10:37:42 PM
Are these stars automatic and where do I configure them?  I dont' see anything on my test board.

-Jazhawk
Title: Re: vMulticolor-Stars Mod
Post by: mrandall131 on September 16, 2005, 12:19:52 AM
I had to uninstall this.  I was getting this error:

Quote8: Undefined offset: 1
File: ***********/forum/Sources/Load.php
Line: 954

Here is the code around that area.  Line 954 is the first if statement.

Quote// init tempvars
   $stars = '';
   $starcount = 0;

   // and build up the groups
   foreach($groups as $current)
      // only groups with actual stars count
      if(!empty($groupData[$current]) && $groupData[$current][1] != '') {
         $stars .= str_repeat('<img src="' . $settings['images_url'] . '/' . str_replace('$language', $context['user']['language'], $groupData[$current][1]) . '" title="' . $groupData[$current]['name'] . '" alt="*" border="0" />', $groupData[$current][0]);
         $starcount += $groupData[$current][0];
      }

   // fill the "remaining" empty places with normal post-stars
   if(($groupData[$postgroup][0] - $starcount) > 0)
      $stars .= str_repeat('<img src="' . $settings['images_url'] . '/' . $groupData[$postgroup][1] . '" alt="*" border="0" />', $groupData[$postgroup][0] - $starcount);

   return $stars;
}
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on September 16, 2005, 01:38:05 AM
mrandall: undefined offset? but that's what the empty() check is for... hum. I'll take a look later. :|

Jazhawk: this mod takes the stars from all the user's membergroups, glues them together, and fills up with post group stars. it's meant to be used on a one-star-per-group basis, so in the end the profiles look like here;
http://www.mugenguild.com/forumx/index.php?topic=31123.msg289520#msg289520
it may seem a bit confusing first, but people got used to it quite easily... mouseover shows name of the membergroup. I guess you have the default ranks, change the admin rank to 1 red star, the gmod rank to 1 blue star, and give your account 300 posts and you'll see. ;)
Title: Re: vMulticolor-Stars Mod
Post by: R1p.PeR on September 16, 2005, 02:12:29 AM
the mod work fine for me, it looks like this
(http://img354.imageshack.us/img354/5258/10ld.jpg) (http://imageshack.us[url=http://imageshack.us)
Title: Re: vMulticolor-Stars Mod
Post by: mrandall131 on September 16, 2005, 08:46:18 AM
Oh yeah, I am running 1.1b3.
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on September 16, 2005, 11:11:21 AM
updated, there are now 3 options:
- disable mod entirely :P
- display <br /> between star-groups (if you have badges and don't want to rely on wordwrap)
- force display of postgroup-stars (basically, what kikea requested ;) )

and more failsafe-checks, I'm not sure but maybe this fixes the error mrandall131 got, I couldn't reproduce it... :(
Title: Re: vMulticolor-Stars Mod
Post by: mrandall131 on September 16, 2005, 11:21:10 AM
Cool, I'll install it now.

[edit]

Thanks!  Works fine now.
Title: Re: vMulticolor-Stars Mod
Post by: Jazhawk on September 16, 2005, 12:36:10 PM
Doesn't seem to do anything for me.

-Jazhawk
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on September 16, 2005, 03:14:22 PM
set number of stars of your membergroup to 1, and add another membergroup... :P
Title: Re: vMulticolor-Stars Mod
Post by: Aisling on September 20, 2005, 05:46:01 PM
Quote from: Valodim on September 16, 2005, 11:11:21 AM
updated, there are now 3 options:
- disable mod entirely :P
- display <br /> between star-groups (if you have badges and don't want to rely on wordwrap)
- force display of postgroup-stars (basically, what kikea requested ;) )

and more failsafe-checks, I'm not sure but maybe this fixes the error mrandall131 got, I couldn't reproduce it... :(

Where can I change this stuff?
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on September 20, 2005, 06:15:53 PM
features and options
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on September 22, 2005, 10:59:14 AM
this mod is now SMF1.1RC1 compatible :D
Title: Re: vMulticolor-Stars Mod
Post by: nay27uk on November 19, 2005, 10:10:17 AM
i just installed this mod an when i click on a topic i get this error insted of the topic

Quote2: str_repeat(): Second argument has to be greater than or equal to 0.
File: E:\home\Default\sell-uk.net\htdocs\swingerpost\Sources\Load.php
Line: 678

Whats wrong do i have to alter any setings to get it working
Title: Re: vMulticolor-Stars Mod
Post by: RoarinRow on November 30, 2005, 04:11:08 PM
Quote from: nay27uk on November 19, 2005, 10:10:17 AM
i just installed this mod an when i click on a topic i get this error insted of the topic

Quote2: str_repeat(): Second argument has to be greater than or equal to 0.
File: E:\home\Default\sell-uk.net\htdocs\swingerpost\Sources\Load.php
Line: 678

Whats wrong do i have to alter any setings to get it working

I got the same error except on Line: 687.  I enabled Force start and Breakrow between stars.  I disabled Breakrow between stars and still got same issue on my SMF 1.05 forum.
Title: Re: vMulticolor-Stars Mod
Post by: RoarinRow on December 06, 2005, 04:39:13 PM
Quote from: RoarinRow on November 30, 2005, 04:11:08 PM
Quote from: nay27uk on November 19, 2005, 10:10:17 AM
i just installed this mod an when i click on a topic i get this error insted of the topic

Quote2: str_repeat(): Second argument has to be greater than or equal to 0.
File: E:\home\Default\sell-uk.net\htdocs\swingerpost\Sources\Load.php
Line: 678

Whats wrong do i have to alter any setings to get it working

I got the same error except on Line: 687.  I enabled Force start and Breakrow between stars.  I disabled Breakrow between stars and still got same issue on my SMF 1.05 forum.

Any updates on this issue from anyone?
Title: Re: vMulticolor-Stars Mod
Post by: Tech o.O; on December 26, 2005, 10:12:01 PM
I just installed this mod and I want to add new images for a certain member, I'm pretty sure this is ;ossible, but I'm not sure how to do it, I've seen it on other forums.

http://mods.simplemachines.org/index.php?mod=191

That's the mod I installed.

Any help would be appreciated.

Bowserman~
Title: Re: vMulticolor-Stars Mod
Post by: kikea on January 10, 2006, 03:37:10 AM
What about SMF 1.1 RC2?
Title: Re: vMulticolor-Stars Mod
Post by: huijaa on January 18, 2006, 04:03:06 PM
It works well in SMF 1.1 RC2...
Title: Re: vMulticolor-Stars Mod
Post by: kikea on January 19, 2006, 02:50:26 AM
I'm not sure about that it operate well in RC2, because I still have a error "The package you are trying to download or install is either corrupt or not compatible with this version of SMF."
Title: Re: vMulticolor-Stars Mod
Post by: JonMarkGo on February 03, 2006, 07:17:24 PM
Is there going to be a new version for RC2? Mine wont let me install it.
Title: Re: vMulticolor-Stars Mod
Post by: quasar on February 20, 2006, 06:13:47 AM
Is there a way of making this compatible with a forum that was not upgraded to 1.1 RC2?
Title: Re: vMulticolor-Stars Mod
Post by: kikea on March 03, 2006, 08:42:09 AM
I spent a small time to adjust mode for 1.1 RC2. I will try to define needful steps which transforms install package compatible with RC2.

The steps:

1. Uninstall, delete existing mod. (I'm not sure that this step is necesary, but I did it to assure my changes are correctly)
2. Download mod (don't download directly to site), in some local folder. Mod location is vMulticolor-Stars Mod (http://mods.simplemachines.org/index.php?mod=191)
3. Unpack package.
4. Find file package-info.xml.
5. Open it for edit.
6. In XML format file find sections
<install for="1.1 RC1">
...
</install>
<uninstall for="1.1 RC1">
...
</uninstall>

7. Make a copy of these sections in same file.
8. In new recent copied section rename next titles
<install for="1.1 RC1"> with <install for="1.1 RC2">
and
<uninstall for="1.1 RC2"> with <uninstall for="1.1 RC2">
9. Pack back the files into *.tar.gz file or *.zip file. An example to set name of package is vMulti-Color_0.96.tar.gz or vMulti-Color_0.96.zip
10. Upload new package to site (forum) and install it.

Good luck!
Title: Re: vMulticolor-Stars Mod
Post by: mrandall131 on March 03, 2006, 08:48:03 AM
I have it installed and running fine on RC2.
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on March 22, 2006, 01:55:12 PM
compatbility update :)

concerning the bug mentioned above, could one of you post the piece of code that causes the error? it should be either of these:

$stars .= str_repeat('<img src="' . $settings['images_url'] . '/' . str_replace('$language', $context['user']['language'], $groupData[$current][1]) . '" title="' . $groupData[$current]['name'] . '" alt="*" border="0" />', $groupData[$current][0]) . (!empty($modSettings['brBetweenStars']) ? '<br />': '');


$stars .= str_repeat('<img src="' . $settings['images_url'] . '/' . $groupData[$postgroup][1] . '" alt="*" border="0" />', empty($modSettings['forcePostStars']) ? ($groupData[$postgroup][0] - $starcount) : $groupData[$postgroup][0]);
Title: Re: vMulticolor-Stars Mod
Post by: Gobo on March 28, 2006, 06:12:46 PM
1.     Execute Modification     ./Sources/Load.php     Test failed

Can you please give me the manual code modification instructions for that file so I can modify it myself?

Thanks
Title: Re: vMulticolor-Stars Mod
Post by: RoarinRow on April 09, 2006, 08:48:20 AM
Seems to work on RC2 for me   ???
Title: Re: vMulticolor-Stars Mod
Post by: camflan on April 12, 2006, 02:52:05 PM
Quote from: akulion on March 28, 2006, 06:12:46 PM
1.     Execute Modification     ./Sources/Load.php     Test failed

Can you please give me the manual code modification instructions for that file so I can modify it myself?

Thanks

any word on how to fix this?
Title: Re: vMulticolor-Stars Mod
Post by: RoarinRow on May 16, 2006, 01:01:55 AM
Any fixes to the load.php issue?  I'd like to re-install this mod.   ;D
Title: Re: vMulticolor-Stars Mod
Post by: RoarinRow on May 18, 2006, 07:43:58 PM
Quote from: RoarinRow on May 16, 2006, 01:01:55 AM
Any fixes to the load.php issue?  I'd like to re-install this mod.   ;D

Bump.  Anyone?   ;)
Title: Re: vMulticolor-Stars Mod
Post by: RoarinRow on May 29, 2006, 10:55:17 AM
Quote from: RoarinRow on May 18, 2006, 07:43:58 PM
Quote from: RoarinRow on May 16, 2006, 01:01:55 AM
Any fixes to the load.php issue?  I'd like to re-install this mod.   ;D

Bump.  Anyone?   ;)

Bump.  Anyone have a fix for this load issue?
Title: Re: vMulticolor-Stars Mod
Post by: sbclansite.com on June 02, 2006, 04:23:37 PM
Quote from: RoarinRow on May 29, 2006, 10:55:17 AM
Quote from: RoarinRow on May 18, 2006, 07:43:58 PM
Quote from: RoarinRow on May 16, 2006, 01:01:55 AM
Any fixes to the load.php issue?  I'd like to re-install this mod.   ;D

Bump.  Anyone?   ;)

Bump.  Anyone have a fix for this load issue?

Dude if u need it fixed contact me via pm if you cannot do manual modding. Usually what happens is that u install some other mod and it modifies a file in  way that hinders in installation of other mod. So just open up that mod and edit your load.php file mannually
Title: Re: vMulticolor-Stars Mod
Post by: RoarinRow on June 02, 2006, 05:11:09 PM
Quote from: SeoFriendly on June 02, 2006, 04:23:37 PM
Quote from: RoarinRow on May 29, 2006, 10:55:17 AM
Quote from: RoarinRow on May 18, 2006, 07:43:58 PM
Quote from: RoarinRow on May 16, 2006, 01:01:55 AM
Any fixes to the load.php issue?  I'd like to re-install this mod.   ;D

Bump.  Anyone?   ;)

Bump.  Anyone have a fix for this load issue?

Dude if u need it fixed contact me via pm if you cannot do manual modding. Usually what happens is that u install some other mod and it modifies a file in  way that hinders in installation of other mod. So just open up that mod and edit your load.php file mannually

No problem.  I could do manual modding for the fix, but it was posted here, then it would be for everyone's benefit. 
Title: Re: vMulticolor-Stars Mod
Post by: sbclansite.com on June 02, 2006, 09:02:43 PM
Well i cannot reinstall it again but here is my version of vmulticolor tell me if it worked for u.

http://www.sbclansite.com/downloads/mods-smf/vMulti-Color_0.96.tar.gz

If it doesnt work just send me ur load.php file
Title: Re: vMulticolor-Stars Mod
Post by: greyias on June 16, 2006, 05:21:32 PM
I wanted to ask before I install this (I just recently reset my forum to zero as far as mods go, so I can ensure a clean installation on everything), and was wondering if this would provide the functionality I'm looking for...

I'm wanting to use this as sort of a "badge" system, where I can assign badges to groups who do things around my forum (ie: they help in the calendar, but also write fanfic or help out in the gallery). What I'm looking for is the badges to be displayed side by side, instead of on each line.

I think that's possible with this mod, just wanted to be sure first. (I'm planning on installing the Shop Mod and Custom Profile Mods, and was hoping that wouldn't conflict with these)
Title: Re: vMulticolor-Stars Mod
Post by: RoarinRow on June 16, 2006, 05:38:53 PM
Quote from: greyias on June 16, 2006, 05:21:32 PM
I wanted to ask before I install this (I just recently reset my forum to zero as far as mods go, so I can ensure a clean installation on everything), and was wondering if this would provide the functionality I'm looking for...

I'm wanting to use this as sort of a "badge" system, where I can assign badges to groups who do things around my forum (ie: they help in the calendar, but also write fanfic or help out in the gallery). What I'm looking for is the badges to be displayed side by side, instead of on each line.

I think that's possible with this mod, just wanted to be sure first. (I'm planning on installing the Shop Mod and Custom Profile Mods, and was hoping that wouldn't conflict with these)

There is a setting which enables the stars/badging to be on each line, which is the way that I have it on my forum.  But if you set them in a straight line, it may looked cluttered, in my opinion.
Title: Re: vMulticolor-Stars Mod
Post by: greyias on June 16, 2006, 05:43:41 PM
Thanks RoarinRow :) Just what I needed to know. Guess I'll have to mess around with it for a little while to get it right. I once visited a vbulletin board that used a badge system, so I've been trying to find an equivalent for my forum :)
Title: Re: vMulticolor-Stars Mod
Post by: RoarinRow on June 16, 2006, 05:52:41 PM
Quote from: greyias on June 16, 2006, 05:43:41 PM
Thanks RoarinRow :) Just what I needed to know. Guess I'll have to mess around with it for a little while to get it right. I once visited a vbulletin board that used a badge system, so I've been trying to find an equivalent for my forum :)

Thanks to sbclansite.com's reply above I have it installed on my site - http://www.avalanchestyle.com/index.html  Check it out if you want to see what it looks like.
Title: Re: vMulticolor-Stars Mod
Post by: greyias on June 16, 2006, 05:56:43 PM
Yep... looks like it may be what I'm after :)
Title: Re: vMulticolor-Stars Mod
Post by: Zxaos on August 31, 2006, 12:32:57 AM
Unfortunately, this is broken in RC3.  Which really sucks, because it's a great mod for clan/guild sites and such.
Title: Re: vMulticolor-Stars Mod
Post by: RoarinRow on August 31, 2006, 12:50:25 AM
Quote from: Zxaos on August 31, 2006, 12:32:57 AM
Unfortunately, this is broken in RC3.  Which really sucks, because it's a great mod for clan/guild sites and such.

I haven't upgraded yet, but would really want this when I do.   :)
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on September 07, 2006, 04:16:53 PM
it works fine for me in rc3... updated package with rc3 compatibility checked ;)
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on September 09, 2006, 09:40:18 AM
updated with new option to show stars by request from alexasc :)
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on December 05, 2006, 09:20:31 AM
1.1 supdate ;)
Title: Re: vMulticolor-Stars Mod
Post by: RoarinRow on December 05, 2006, 10:25:00 AM
Quote from: Valodim on December 05, 2006, 09:20:31 AM
1.1 supdate ;)

Awesome, thanks!  Just waiting for Tiny Portal to be ready as well as a few other key mods and I'll be ready to rock and roll with 1.1. Final    8)
Title: Re: vMulticolor-Stars Mod
Post by: URPG on December 17, 2006, 07:37:21 AM
How easy can i add my own stars? (Like a sherrifs badge for moderators)
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on December 17, 2006, 11:59:41 AM
add them to the /images/stars/ dir where the other ones are, and point to them in the membergroup options :)
Title: Re: vMulticolor-Stars Mod
Post by: URPG on December 19, 2006, 08:50:54 AM
Once per installed theme or independed of it?
Title: Re: vMulticolor-Stars Mod
Post by: Naberius on December 31, 2006, 12:08:43 AM
Are you planning on a 1.1.1 update at all?
Title: Re: vMulticolor-Stars Mod
Post by: RoarinRow on December 31, 2006, 02:51:11 AM
Quote from: AMBA on December 31, 2006, 12:08:43 AM
Are you planning on a 1.1.1 update at all?

Works on my 1.1.1 forum   8)
Title: Re: vMulticolor-Stars Mod
Post by: Naberius on December 31, 2006, 05:45:43 AM
hmm I'll try a manual install then. Package manager tells me it's not compatable with the forum version I am using.
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on December 31, 2006, 11:05:59 AM
try adding the parameter version_emulate=1.1.1 in your package manager :)
Title: Re: vMulticolor-Stars Mod
Post by: Naberius on January 01, 2007, 03:17:37 AM
I did a manual install which worked fine. Thanks for your help.
Title: Re: vMulticolor-Stars Mod
Post by: Maniakc on January 09, 2007, 09:10:19 PM
Love the mod! ;)
I like that I can get the admins and mods want to post because they like those pointless stars :P
I was able to set it so they just get green and red stars, but like everyone else gets gold ones :D

Thanks for this mod, one of my moderators just keeps pming me for updates like this :P
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on January 14, 2007, 01:18:07 PM
updated for 1.1.1. could someone confirm it works? :)
Title: Re: vMulticolor-Stars Mod
Post by: Tanix on January 19, 2007, 10:42:53 PM
Yes, thank you, it does.
Title: Re: vMulticolor-Stars Mod
Post by: Gantry on February 13, 2007, 02:24:09 AM
smf 1.1.2 is out tonite.  I tried installing it but says its incompatible.  In an earlier post, Val said "try adding the parameter version_emulate=1.1.1 in your package manager " but I can't find that option anywhere.

I shall wait for an upgraded version just to be safe!
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on February 14, 2007, 04:55:51 PM
updated xml file. the mod is hardly critical, could someone confirm it works?
Title: Re: vMulticolor-Stars Mod
Post by: Sarke on February 28, 2007, 12:05:12 AM
Hi, nice mod just one problem.  When both "Postgroup-Based stars" and "Breakrow between stars" are checked, the stars are on seperate rows.  Should these be considered one group, just like they are when "Postgroup-Based stars" isn't checked?
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on February 28, 2007, 02:39:53 PM
well, when you check "breakrow between stars", they are on seperate rows. that's the point...
Title: Re: vMulticolor-Stars Mod
Post by: Sarke on February 28, 2007, 06:41:59 PM
You misunderstand.  When you just have "Breakrow between stars" it works like expected, for example:

(http://img339.imageshack.us/img339/5595/33841210qp8.png)

As you can see, the four yellow post ones are still on the same line together (that's what I ment by "group").  If I then also check "Postgroup-Based stars" there is one star on each line now, the post ones being ungrouped.
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on March 01, 2007, 02:18:37 PM
well, yeah. how else is it supposed to work? if you use postgroup-based stars, it displays the main group's stars times the postgroup's star count, meaning there is only one group. and for every repetition of the main group's stars there is a br.

meaning, if you have an admin group with 2 red stars, and a postgroup with 3 stars, with those two options enabled it would be three rows with two red stars each. without breakrow enabled it would be 6 red stars in one line.

what way of displaying do you have in mind? I think it makes sense the way it is.
Title: Re: vMulticolor-Stars Mod
Post by: Sarke on March 01, 2007, 09:32:26 PM
Well I thought they would be grouped just like when postgroup-based stars are off.  The reason I asked was because I modded the code to display secondary groups even when the postgroup-based stars are on, which is really what the mod is supposed to do, right? :P

That's a feature I'd like to see by default, as well as to set the order in which the stars are displayed.  If you wish I can send you the code of how to do this.
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on March 02, 2007, 12:36:39 PM
aaah. I get it. gonna udate it, in a few days.

maybe :P
Title: Re: vMulticolor-Stars Mod
Post by: EG on March 04, 2007, 07:03:08 AM
excellent mod!  thanks!

Just one question, is it possible to disable stars from showing for secondary membergroups ?  Some of my mods have access to a number of boards.. some of which prob ought to be kept secret....  IS there a way to disable these ?
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on March 04, 2007, 04:23:25 PM
you can set the groups to have zero stars :P
Title: Re: vMulticolor-Stars Mod
Post by: EG on March 04, 2007, 04:29:23 PM
No I cant

because for those people who have that group as a Primary group, it would mean that they wouldnt have them shwoing.

Some people belong to certain membergroups as Primarymember, and others as secondarymember.

Its those who belong as a secondary member that I dont want them to show for :P
Title: Re: vMulticolor-Stars Mod
Post by: Sarke on March 04, 2007, 11:44:23 PM
Then turn off the mod.  What you're asking for is how it is by default for SMF.
Title: Re: vMulticolor-Stars Mod
Post by: EG on March 05, 2007, 03:02:57 AM
again Im not

My members have shown in the info stuff by the side of their posts the Primary membergroup they belong to... but there is no mention at all of the secondary membergroup.... any secondary membergroups they belong to are hidden.  This is how SMF works

Im sorry to cause you so much upset by asking a simple question.
Title: Re: vMulticolor-Stars Mod
Post by: Tanix on March 05, 2007, 04:38:24 AM
There is a mod  that shows secondary memberships.
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on March 05, 2007, 10:08:54 AM
EG: sorry, that's too specific :P
Title: Re: vMulticolor-Stars Mod
Post by: EG on March 05, 2007, 10:48:46 AM
ok thanks
Title: Re: vMulticolor-Stars Mod
Post by: manudevil on May 25, 2007, 07:07:53 AM
Thanks ! It works very well !

Here is a french translation, if anybody needs it. I just added the necessary lines in the code.
Title: Re: vMulticolor-Stars Mod
Post by: Naudran on June 11, 2007, 07:44:56 AM
I'm trying to install in onto a forum with version 1.1.2. I'm getting the following error:

Type                                     Action                                    Description
1.    Execute Modification    vMulticolorstars11RC1.mod    Modification parse error


The only other modification that I have installed is the Member Awards mod. I've had a look at both mod's files and it doesn't look like they are editing the same files.

I also made sure that the 4 files being edited is writable (even chmod it to 777).

Running out of ideas :)

Any ideas?
Title: Re: vMulticolor-Stars Mod
Post by: erlend_sh on June 16, 2007, 05:09:48 AM
Hey. I recently installed your mod on two almost identical forums (in terms of themes and mods) and an odd thing occured. One one forum (where I had the most mods) it worked perfectly, but on the other, nothing happened. I then tried to uninstall it, but got the error warning:
1.   Execute Modification   ./Sources/Load.php   Test failed
2.   Execute Modification   ./Sources/ModSettings.php   Test failed
3.   Execute Modification   ./Themes/default/languages/ModSettings.english.php   Test failed
4.   Execute Modification   ./Themes/default/languages/Help.english.php   Test failed

My packages (in the one not working) are:
1.   vMulticolor-Stars Mod   0.99
2.   Admin Notepad   1.0
3.   Favicon   1.0
4.   Merge Double Posts   1.0.8

My themes are:
Standard ones, + Dilber Multicolor and Black Rain.

Any idea what is wrong here?.. And is it safe to just delete (not uninstall) the mod and try to install it again?.. Needless to say I'm not that experienced with this.

Edit: Would also be nice to see whether or not this mod is still compatible with 1.1.3 and 1.0.11
Title: Re: vMulticolor-Stars Mod
Post by: Gantry on July 01, 2007, 11:16:54 PM
I had been using this mod on a 1.1.2 site, but with the upgrade to 1.1.3, it broke.

I tried this on my test site, smf 1.1.3. It won't install as is. I opened the zip file, and modified package-info.xml with Notepad. What I did was simply copy the sections <install for="1.1.2"> to </install>, and <uninstall for="1.1.2"> to </uninstall>. I put the copy above the <install for="1.1.2"> section. Then I replaced the "1.1.2" with "1.1.3", saved the file, and re-zipped all the files back up.

Now be forewarned, I typically don't recommend people assume this or any other package can simply be editing in this fashion and expected to work! You'll need to know what you're doing, and I certainly don't claim to. I take no resposibility for any problems you might or will have if you do this! I also don't recommend doing this on a live site, please play with things like this on a test site. You can learn a lot by messing with things, but the downside is you can really mess up your forum!

So once your tweaked mod is repackaged, upload the package and install it. The menu options, from what I can tell so far in my testing, work just fine in 1.1.3.  YMMV.
Title: Re: vMulticolor-Stars Mod
Post by: kamili34 on July 02, 2007, 02:48:29 AM
Good job  :P grat mod thank
Title: Re: vMulticolor-Stars Mod
Post by: erlend_sh on July 05, 2007, 01:01:38 PM
Please make it 1.1.3 compatible for non-technical users :)
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on July 10, 2007, 09:30:52 AM
updated :)
Title: Re: vMulticolor-Stars Mod
Post by: pipo_il_primero on August 07, 2007, 11:03:47 AM
OK, I must be very slow, I can't get this mod to work...

I have SMF 1.1.3, installed latest package of the mod with no problem, but I can't seem to find where and how to use this mod!

I want to be able to put my member to up to 5 different groups.

Anybody cares to explain in a couple of paragraphs what I should be doing?

Many thanks

PiP
Title: Re: vMulticolor-Stars Mod
Post by: skyexile on December 28, 2007, 01:20:28 AM
any chance this can be updated for V 1.1.4, for dummies?
Title: Re: vMulticolor-Stars Mod
Post by: skyexile on December 28, 2007, 02:47:33 AM
ah got it working myself just change the package info.xml file

on the line install for 1.1.3 change it so it says 1.1.4 and your sweet.
Title: Re: vMulticolor-Stars Mod
Post by: drgnfireinferno on January 19, 2008, 12:05:36 AM
please update this mod for version 1.1.4 for those who don't have the ability, myself included, and/or the knowledge to do it themselves.

And before anyone complains about why I'm asking for this, every time I try rezipping the files the server reports it as corrupt.
Title: Re: vMulticolor-Stars Mod
Post by: Taurusguy on March 07, 2008, 11:54:09 PM
OK .. i got this to work with 1.1.4 ..... did what the guy 2 posts previous said .. DLed XML editor .. and changed the version to 1.1.4 .. then rezipped it .. and installed.

I have attatched the modified version of the DL.

p.s. there was no errors with the helios_multi11final theme.

ENjoy
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on March 22, 2008, 12:23:04 AM
now works with smf 2.0! yay :)
Title: Re: vMulticolor-Stars Mod
Post by: justlyssa on March 26, 2008, 11:54:30 PM
I have this wonderful mod installed on my SMF 2.0 Beta 3 Public ... and everytime I click on my mlist ... I get this error.

An Error Has Occurred!
Database error, given array of integer values is empty.

Anyone know how to fix it? I mean I can access my members through admin ... but.. i do think that my members would like to access the list :D
Title: Re: vMulticolor-Stars Mod
Post by: Valodim on March 30, 2008, 10:11:20 AM
Doesn't happen to me on a fresh installation. Please go to the line number of the file specified in the error message, and post the whole query here (if you're unsure what that is, just paste the whole block around the line number)
Title: Re: vMulticolor-Stars Mod
Post by: Pratt on May 15, 2008, 09:38:52 PM
Hi there! Nice Mod! :D
I installed it on 2.0 beta 3.1 and It works fine.

The only problem im having is the following error on the error log:

http://www.hablarmierda.net/comunidad/index.php?action=profile
8: Undefined index: groupName
Archivo: /xxxxx/xxxxx/xxx/xx/xx/xxxxx/xx/comunidad/Sources/Load.php
Línea: 1281
Title: Re: vMulticolor-Stars Mod
Post by: erlend_sh on June 08, 2008, 08:58:29 AM
My forum (http://radakan.org/forums) suffered some rather serious errors after installing your mod. Certain threads would be "broken", making it impossible to make a reply to that thread (reply would be lost). I reported it and SleePy fixed it up:

Quote from: SleePyYour error log had lots of entries so I emptied it and viewed that topic and got these errors:
Database error, given array of integer values is empty.
Database error, given array of integer values is empty.
Function: loadStars
File: /home/radakano/public_html/forums/Sources/Load.php
Line: 1447

8: Undefined index: groupName
File: /home/radakano/public_html/forums/Sources/Load.php
Line: 1450

I fixed both of them. They look related to the vMulticolor-Stars Mod. You should inform the mod author of those two errors. The second one was easiest to fix and the first one I just make a work around to keep the errors from occurring :)
It has also greatly bothered me that your mod is not possible to uninstall. If I recall correctly, this was not possible in 1.1.4 either (I'm running a 2.0 Beta 3.1 board). Please direct your attention to these errors and see what can be done about it.
Title: Re: vMulticolor-Stars Mod
Post by: Otterdam on July 20, 2008, 06:36:48 AM
There seems to be a problem if a member has no stars. One of my forums has the first postgroup set to 0 stars - if a new member posts, the mod vomits an error where his post should be in the thread: "Database error, given array of integer values is empty."

It's a pity because I like what the mod does, but it isn't important enough to spend time looking at it myself (too many other things to do).
Title: Re: vMulticolor-Stars Mod
Post by: ZarPrime on September 08, 2008, 01:18:25 AM
A quick question ...

Does this mod work with SMF 1.1.6?

I get an install error with both 0.99 and 1.0

Thanks

I used this mod on a previous version of SMF and it worked perfectly, but I just upgraded to 1.1.6 and now it won't install :(
Title: Re: vMulticolor-Stars Mod
Post by: ZarPrime on September 08, 2008, 11:30:56 PM
Quote from: zarprime on September 08, 2008, 01:18:25 AM
A quick question ...

Does this mod work with SMF 1.1.6?

I get an install error with both 0.99 and 1.0

Thanks

I used this mod on a previous version of SMF and it worked perfectly, but I just upgraded to 1.1.6 and now it won't install :(

OK, I did what others had mentioned in earlier messages, and added the install ands uninstall for 1.1.6 and it seems to have installed fine.  Getting ready to configure it now.  Will let everybody know if I encounter problems.
Title: Re: vMulticolor-Stars Mod
Post by: erlend_sh on September 09, 2008, 05:18:31 AM
Quote from: Sadr on June 08, 2008, 08:58:29 AM
My forum (http://radakan.org/forums) suffered some rather serious errors after installing your mod. Certain threads would be "broken", making it impossible to make a reply to that thread (reply would be lost). I reported it and SleePy fixed it up:

Quote from: SleePyYour error log had lots of entries so I emptied it and viewed that topic and got these errors:
Database error, given array of integer values is empty.
Database error, given array of integer values is empty.
Function: loadStars
File: /home/radakano/public_html/forums/Sources/Load.php
Line: 1447

8: Undefined index: groupName
File: /home/radakano/public_html/forums/Sources/Load.php
Line: 1450

I fixed both of them. They look related to the vMulticolor-Stars Mod. You should inform the mod author of those two errors. The second one was easiest to fix and the first one I just make a work around to keep the errors from occurring :)
It has also greatly bothered me that your mod is not possible to uninstall. If I recall correctly, this was not possible in 1.1.4 either (I'm running a 2.0 Beta 3.1 board). Please direct your attention to these errors and see what can be done about it.
Still awaiting a reply on this one.

On another note, I would very much appreciate a proper update for Beta 3.1 and 4.0 public accompanied by a working uninstaller. We're trying to update our forum from 3.1 to 4.0, but our webmaster says that there are too many mods "in the way". I've uninstalled nearly all our mods, yet a few returned errors, yours included, which I suspect is the reason why we can't make the update just yet.

I'd be happy to give you full access to our forum if you'd like to take a closer look at the errors.
Title: Re: vMulticolor-Stars Mod
Post by: Gantry on September 26, 2008, 08:05:25 PM
I'm running it in 1.1.6 and it seems to be working fine, all I did was add the 1.1.6 install and uninstall strings in the .xml file. I would be glad to share it with anyone.

HOWEVER, PLEASE NOTE:


I would be glad to email you this zip, to contact me look in my SimpleMachines.org profile for my web site, and there you can click on Contact Us (click on Gantry). Do not PM me here, I don't log in frequently enough to notice PMs. Hopefully this isn't breaking any rules or is a problem with the author, if so I will happily remove it immediately if requested.

cheers
Gantry
Title: Re: vMulticolor-Stars Mod
Post by: Marcus Forsberg on October 07, 2008, 03:54:23 AM
This really need to be updated for 1.1.6..
Title: Re: vMulticolor-Stars Mod
Post by: R.Bourne on April 01, 2009, 10:30:55 PM
Not sure if anyone's still interested in installing this mod on 1.1x series but here it is. FYI, I didn't make any changes other than adding the version numbers to the package info file. Everything else is the same as the original code.

And for those who use any other theme, no problem. MOD doesn't care :)

Last but not least, thanks to developer. Great work :D
Title: Re: vMulticolor-Stars Mod
Post by: PalmBeachPreps on April 02, 2009, 12:37:37 AM
What if my board utilizes badges rather than stars?  Will they align vertically?
Title: Re: vMulticolor-Stars Mod
Post by: R.Bourne on April 02, 2009, 03:47:49 PM
I'm not too sure. I am using badges for a few special groups as well as this mod here --> http://custom.simplemachines.org/mods/index.php?mod=1110

... but unfortunately I'm having a difficult time to get them to play nicely.

So far, I had to get rid of both and will try to install them clean and manually. Sadly, there are MODs are there which don't clean up properly during uninstall. No complain though :)
Title: Re: vMulticolor-Stars Mod
Post by: Moif on November 24, 2009, 04:46:35 AM
Is there an alternative to this mod anywhere? I did have a go at trying to get it to work for RC2 but with little luck.
Title: Re: vMulticolor-Stars Mod
Post by: KensonPlays on February 18, 2010, 01:26:29 PM
Any plans to update this for 2.0RC2, then RC3 when it comes out!?!?!?!?!? HOPE SO!!!!!!
Title: Re: vMulticolor-Stars Mod
Post by: dry3210 on March 02, 2010, 09:28:37 AM
Quote from: Kcmartz on February 18, 2010, 01:26:29 PM
Any plans to update this for 2.0RC2, then RC3 when it comes out!?!?!?!?!? HOPE SO!!!!!!

+1
Title: Re: vMulticolor-Stars Mod
Post by: ZarPrime on March 12, 2010, 11:41:43 AM
Valodim,
I have used this Mod for a couple of years on my 1.1.x site and it is very popular.  It works perfectly for what I need to do (attached image).  I'm wondering if you have any future plans to upgrade this to work with RC3 as I am currently planning on upgrading my site soon.
ZarPrime
Title: Re: vMulticolor-Stars Mod
Post by: dry3210 on March 23, 2010, 02:04:13 PM
Quote from: zarprime on March 12, 2010, 11:41:43 AM
Valodim,
I have used this Mod for a couple of years on my 1.1.x site and it is very popular.  It works perfectly for what I need to do (attached image).  I'm wondering if you have any future plans to upgrade this to work with RC3 as I am currently planning on upgrading my site soon.
ZarPrime

Agreed.  Very nice mod and hoping on an update
Title: Re: vMulticolor-Stars Mod
Post by: ZarPrime on April 07, 2010, 11:19:15 AM
Valodim,


I know that you still check in here once in awhile.  I really need an answer to my previous question, if possible.  To reiterate, will you be doing an update to make this Mod work with SMF 2.0 RC3?  There are many changes between SMF 2.0 beta 3 and RC3.  A simple "Yes" or "No" will suffice.  If the answer is no, I will not continue to waste time checking this topic.


Thank You,
ZarPrime
Title: Re: vMulticolor-Stars Mod
Post by: TheListener on April 07, 2010, 11:24:15 AM
Zarprime

Have you looked at using a mod such as this one?

http://custom.simplemachines.org/mods/index.php?mod=1733

Title: Re: vMulticolor-Stars Mod
Post by: ZarPrime on April 07, 2010, 11:52:14 AM
No, I haven't looked at that one yet but I will.  It looks like it hasn't been updated for RC3 either though.


Thanks,
ZP
Title: Re: vMulticolor-Stars Mod
Post by: oridyne on February 27, 2017, 03:16:40 AM
Quote from: erlend_sh on September 09, 2008, 05:18:31 AM
Quote from: Sadr on June 08, 2008, 08:58:29 AM
My forum (http://radakan.org/forums) suffered some rather serious errors after installing your mod. Certain threads would be "broken", making it impossible to make a reply to that thread (reply would be lost). I reported it and SleePy fixed it up:

Quote from: SleePyYour error log had lots of entries so I emptied it and viewed that topic and got these errors:
Database error, given array of integer values is empty.
Database error, given array of integer values is empty.
Function: loadStars
File: /home/radakano/public_html/forums/Sources/Load.php
Line: 1447

8: Undefined index: groupName
File: /home/radakano/public_html/forums/Sources/Load.php
Line: 1450

I fixed both of them. They look related to the vMulticolor-Stars Mod. You should inform the mod author of those two errors. The second one was easiest to fix and the first one I just make a work around to keep the errors from occurring :)
It has also greatly bothered me that your mod is not possible to uninstall. If I recall correctly, this was not possible in 1.1.4 either (I'm running a 2.0 Beta 3.1 board). Please direct your attention to these errors and see what can be done about it.
Still awaiting a reply on this one.

On another note, I would very much appreciate a proper update for Beta 3.1 and 4.0 public accompanied by a working uninstaller. We're trying to update our forum from 3.1 to 4.0, but our webmaster says that there are too many mods "in the way". I've uninstalled nearly all our mods, yet a few returned errors, yours included, which I suspect is the reason why we can't make the update just yet.

I'd be happy to give you full access to our forum if you'd like to take a closer look at the errors.

I'm just in the process of testing updating my site from SMF1.1.21 to SMF2.0.13 and this was one of the mods causing me headaches as it appears broken under SMF2. I had the same errors as you, I managed to fix the first by finding the code in Load.php where it was using "group_name" then later using "GroupName" so simple typo easy fix. The database error I can see it relates to the database query code from the mod in Load.php but it is a little beyond my knowledge to rectify. Any idea what Sleepy did to fix it or work around it? Alrternatively could you post a copy of your load.php so I can compare.  Though given the age of this thread I suspect this is a looooong shot by now :)

I'll either have to miss this mod off the migration list or hope beyond hope this gets updated or someone else does something similar in another mod one-day..

Title: Re: vMulticolor-Stars Mod
Post by: oridyne on February 27, 2017, 03:39:12 AM
    // load those not yet loaded
    if(!empty($groupsToLoad)){
        // exluce all with minPosts = -2, so we don't get warning "stars" here! (for vWarn mod)
        $result = $smcFunc['db_query']('', "
            SELECT id_group, group_name, stars
                FROM {db_prefix}membergroups
                WHERE id_group IN ({array_int:groupsToLoad})
                    AND min_posts != -2", array(
            'groupsToLoad' => array_filter($groupsToLoad),
        ));
        while($row = $smcFunc['db_fetch_assoc']($result)) {
            $groupData[$row['id_group']] = explode('#', $row['stars']);
            $groupData[$row['id_group']]['name'] = $row['groupName'];
        }
    }


I just had another look at the code and compared it to the previous version and I think in fixing the typo I went with the wrong "fix" I changed groupName to group_name to match the select version when it should have been groupName for both. I'll try this again tonight on my test site to see if this now fixes my database error.  I was working on this late at night so I should have waited until I took a fresh look at the code before posting ;)

Hopefully, if this works, these posts will serve as a help to anyone else encountering the issues.

Title: Re: vMulticolor-Stars Mod
Post by: oridyne on February 27, 2017, 12:53:12 PM
Ah, so checking the new database the table name is group_name  so I was definitely right first time. So there is an issue with that code segment that causes a DB error on some posts.

I'll have to hope people are still reading this thread and that they are able to help...

function loadStars($maingroup, $groups, $postgroup){
    global $smcFunc, $context, $modSettings, $settings, $ID_MEMBER;

    // we cache the membergroups here, and try to load as many of them at once as possible :)
    static $groupData = array();

    // nothing to do?
    if(empty($groups) && empty($postgroup))
        return '';

    // !!! maybe loading all groups at once would save some time?? not sure.

    // get all unloaded groups
    $groupsToLoad = array_diff(empty($modSettings['postGroupStars']) ? array_merge($groups, array($postgroup)) : array($maingroup, $postgroup), array_keys($groupData));

    // load those not yet loaded
    if(!empty($groupsToLoad)){
        // exluce all with minPosts = -2, so we don't get warning "stars" here! (for vWarn mod)
        $result = $smcFunc['db_query']('', "
            SELECT id_group, group_name, stars
                FROM {db_prefix}membergroups
                WHERE id_group IN ({array_int:groupsToLoad})
                    AND min_posts != -2", array(
            'groupsToLoad' => array_filter($groupsToLoad),
        ));
        while($row = $smcFunc['db_fetch_assoc']($result)) {
            $groupData[$row['id_group']] = explode('#', $row['stars']);
            $groupData[$row['id_group']]['name'] = $row['group_Name'];
        }
    }

    // stars string (the result)
    $stars = '';

    // default multicolor-stars mode
    if(empty($modSettings['postGroupStars'])) {

        $starcount = 0;

        // and build up the groups
        foreach($groups as $current)
            // only groups with actual stars count
            if(!empty($groupData[$current]) && !empty($groupData[$current][0]) && !empty($groupData[$current][1])) {
                $stars .= str_repeat('<img src="' . $settings['images_url'] . '/' . str_replace('$language', $context['user']['language'], $groupData[$current][1]) . '" title="' . $groupData[$current]['name'] . '" alt="*" border="0" />', $groupData[$current][0]) . (!empty($modSettings['brBetweenStars']) ? '<br />': '');
                $starcount += $groupData[$current][0];
            }

        // fill the "remaining" empty places with normal post-stars
        if(!empty($groupData[$postgroup][0]) && !empty($groupData[$postgroup][1]) && (!empty($modSettings['forcePostStars']) || ($groupData[$postgroup][0] - $starcount) > 0))
            $stars .= str_repeat('<img src="' . $settings['images_url'] . '/' . $groupData[$postgroup][1] . '" alt="*" border="0" />', empty($modSettings['forcePostStars']) ? ($groupData[$postgroup][0] - $starcount) : $groupData[$postgroup][0]);

    // this setting means that the number of stars is determined by postgroup, but the color is the main group.
    } else {
        if(!empty($groupData[$postgroup][0]) && !empty($groupData[$postgroup][1])) {
            if(!empty($groupData[$maingroup][0]) && !empty($groupData[$maingroup][1]))
                $stars .= str_repeat(str_repeat('<img src="' . $settings['images_url'] . '/' . $groupData[$maingroup][1] . '" alt="*" border="0" />', $groupData[$maingroup][0]) . (!empty($modSettings['brBetweenStars']) ? '<br />': ''), $groupData[$postgroup][0]);
            else
                $stars .= str_repeat('<img src="' . $settings['images_url'] . '/' . $groupData[$postgroup][1] . '" alt="*" border="0" />' . (!empty($modSettings['brBetweenStars']) ? '<br />': ''), $groupData[$postgroup][0]);
        }
    }


    return $stars;
}
Title: Re: vMulticolor-Stars Mod
Post by: Drakkon on April 08, 2018, 05:42:50 AM
Is there a way I can install this on 2.0.15 ?
Title: Re: vMulticolor-Stars Mod
Post by: niraj on September 19, 2018, 08:22:30 AM

I'm also looking to install it on SMF 2.0.15 but it doesn't support 2.0.15 Is there any alternative mod with the same functionality supporting 2.0.15 ?
Title: Re: vMulticolor-Stars Mod
Post by: -Rock Lee- on September 19, 2018, 08:39:27 AM
I'm not sure but you can try emulating the required version of SMF. It should work as such, I have not tried it, You can see it in the wiki with the following link How can I install a mod that doesn't work in my SMF version? (https://wiki.simplemachines.org/smf/How_can_I_install_a_mod_that_doesn%27t_work_in_my_SMF_version).


Regards!