News:

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

Main Menu

Stars and Badges

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

Previous topic - Next topic

Rhyme

Quote from: king kratos on October 01, 2009, 09:25:56 PM
Quote from: Rhyme on October 01, 2009, 09:17:01 PM
Quote from: king kratos on October 01, 2009, 06:10:40 PM
I've uninstalled and reinstalled it twice now with no luck!

What are the files you are having trouble with? Did any test fail?

See this:

Quote from: king kratos on October 01, 2009, 12:16:16 AM
I have looked through this topic and still cannot seem to figure out how to make my badges and stars work.

I have multiple member groups set up (Admin, Glob Mod, Coach Leader, Leader, Parent, Student, Beta tester, RC tester, and 5 post count groups). I have set all the groups in "arrange additional.......display" (example 1, 2, 3, 10, etc).

My issue is with the post count groups. All of my other groups (non-post count) show each badge in the order they are listed. However, none of the post count groups (stars) are showing under the non-post count groups.

Any help would be great!

Kratos

No tests failed, and the mod works, but like i said in the quote above, it doesn't show the post count group stars under the main group badge.

Kratos


Okay this is really odd.  I was just checking my packages, and I could have sworn I had this one as well.  Yet I don't.  However, I can still place my own images for ranks both group and post count ones.   After checking the mod itself, the only thing I can think of is this:



You might just have to simply put in there the option of having the post count groups displayed.

I've got quite a few numbers in that option there. 

king kratos

I have every group listed (including the post count groups). I'll double check the group numbers, but I know I listed them.

Kratos

bros

Quote from: bros on February 21, 2009, 09:39:40 PM
Found these:
Quote from: bros on July 09, 2008, 09:13:45 PM
Quote from: JohnyB on July 09, 2008, 08:30:03 PM
Try this. Sources/Load.php, look for

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


add after

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


look for

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


and add below

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


look for

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


and add below it

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


look for

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


and add below it.

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


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

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





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

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

That will make it show in topics.

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

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

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


Code (replace) Select

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


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

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

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

Also, tried this on Display.template.php on my 2.0 RC1 board:
echo '<li>','<div style="padding-top: 4px;"></div>', $message['member']['additional_groups']['stars'][$i], '</li>';
Unsurprisingly, it didn't make it display multiple badges :P

Could you give me instructions to make multiple badges appear in SMF 2 RC1.2?

Those don't work.

The first two or so don't match anything

wileyy23

Does this mod only work with usergroups that would be called "Regular Member groups" on the smf admin control panel, or does it work with post based member groups as well? If it is supposed to work for post based member groups, it does not for me. Any ideas on how to fix/modify this mod so that it will display post based member group images?

TW1ST3D

Help!  getting error after clean install on 2.0 RC 1-2.

Getting this on the bottom of every post page after the first or second post

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


here is the code in question:

Quote
      $result_stars = $smcFunc['db_query']('', '
         SELECT id_group, group_name, stars, online_color
         FROM {db_prefix}membergroups
         WHERE id_group IN (' . $groups . ')
         ',
         array()
      );    <--------this is line 1339
         
      // additional groups
      while ($row_stars = $smcFunc['db_fetch_assoc']($result_stars))
      if (!empty($row_stars['stars']))
      {
         $memberContext[$user]['additional_groups']['id'][] = $row_stars['id_group'];
         $memberContext[$user]['additional_groups']['stars'][] = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($row_stars['stars'][1]) ? $settings['images_url'] . '/' . $smcFunc['substr']($row_stars['stars'], 2, strlen($row_stars['stars'])) : '') . '" alt="*" border="0" />', empty($row_stars['stars'][0]) || empty($row_stars['stars'][1]) ? 0 : $row_stars['stars'][0]);
         $memberContext[$user]['additional_groups']['name'][] = $row_stars['group_name'];


any ideas on how to fix this?

TIA.
Running 2.0 Gold.......SMF Rocks!!

TW1ST3D

Running 2.0 Gold.......SMF Rocks!!

TW1ST3D

still looking for a solution...........
Running 2.0 Gold.......SMF Rocks!!

SuperZambezi

Ive been looking around the topic and trying different solutions but no luck. I am trying to get both my membergroups (Regular membegroups and Post based membergroups) to shoe their images so something like this :

Any help would be great. :) Thanks.
Forum : SMF 2.0 RC1-1

wileyy23

Quote from: SuperZambezi on November 05, 2009, 09:08:00 PM
Ive been looking around the topic and trying different solutions but no luck. I am trying to get both my membergroups (Regular membegroups and Post based membergroups) to shoe their images so something like this :

Any help would be great. :) Thanks.
Forum : SMF 2.0 RC1-1

Yeah, I've been looking for a solution to this too, but no one seems to want to help us out.

vaesir

Hi guys and girls,
Any chance this mod can be updated for 2.0 RC2?
Thank you
http://romaniavirtuala.info - Romanian Community from eRepublik
http://stargateromania.com - Stargate Romanian Community
http://stargateworlds.ro - Stargate  Worlds Romanian Community

Mick.

Quote from: SGC_Romania on November 12, 2009, 12:00:22 AM
Hi guys and girls,
Any chance this mod can be updated for 2.0 RC2?
Thank you
X2

Garou

JB has 21 mods that may need to be updated for the new version. I'm sure that's going to take a bit of time but he'll get to it as soon as he can.

TW1ST3D

Still awaiting a reponse to my original problem
Running 2.0 Gold.......SMF Rocks!!

DTM-031

#713
I'm also having a few issues with RC2, is there a known incompatibility?
The mod is installing with no known issues, however the additional groups don't show up anywhere, posts, profiles, PMs, nothing. It does however modify the profile slightly, so it is working to an extent, but not fully.

Not 100% with coding so unsure if there's anything particular I need to change? I've tried doing an auto install, and also a full manual install, no change between either.

Any help would be awesome :)

EDIT: Am using a custom theme so have done the appropriate manual edits but it doesn't work even on the default theme!

Garou

From the Downloads page for the mod.

QuoteCompatible With:
    1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.10, 2.0 Beta 3 Public, 2.0 Beta 3.1 Public, 2.0 Beta 4, 2.0 RC1

Using with other versions of SMF probably wont work. Give the author some time to get it updated.

vaesir

Quote from: Garou on November 18, 2009, 07:35:17 AM
From the Downloads page for the mod.

QuoteCompatible With:
    1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.10, 2.0 Beta 3 Public, 2.0 Beta 3.1 Public, 2.0 Beta 4, 2.0 RC1

Using with other versions of SMF probably wont work. Give the author some time to get it updated.
I know but his/hers mod is one of the best out there. I personally need it very much.
We have like 40 groups..on our forums..:)
http://romaniavirtuala.info - Romanian Community from eRepublik
http://stargateromania.com - Stargate Romanian Community
http://stargateworlds.ro - Stargate  Worlds Romanian Community

mysticmind

RC2 support or not?
anyone?

SgtMic

There is nothing more deadly than a US Marine and his rifle.
A close second is a US Marine and his K-BAR.
2/5 Fox Co.  (BlackHearts)
FAST Co. 5th Plt. (FIDO)

jkrlvgn

Quote from: SgtMic on December 10, 2009, 03:13:00 PM
Quote from: BlueDevil on November 12, 2009, 09:13:17 AM
Quote from: SGC_Romania on November 12, 2009, 12:00:22 AM
Hi guys and girls,
Any chance this mod can be updated for 2.0 RC2?
Thank you
X2

+3

And another request.  I got it to install, but SOMETHING wasn't right, because they weren't showing.

Justyne

#719
Quote from: jkrlvgn on December 14, 2009, 02:55:27 AM
Quote from: SgtMic on December 10, 2009, 03:13:00 PM
Quote from: BlueDevil on November 12, 2009, 09:13:17 AM
Quote from: SGC_Romania on November 12, 2009, 12:00:22 AM
Hi guys and girls,
Any chance this mod can be updated for 2.0 RC2?
Thank you
X2

+3

And another request.  I got it to install, but SOMETHING wasn't right, because they weren't showing.

+ 5

I had a play with it thinking I could update this for RC 2 myself, but it's just messy. Rather than displaying the membergroups selected in the options it's just showing all of them and I have no idea how to fix it.  I'm horribly PHP daft.

If anyone wants to look at my code or fix it, do poke me on PM.
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

Advertisement: