News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Show Multiple Badges (AKA Stars)

Started by Thantos, April 04, 2005, 10:03:46 PM

Previous topic - Next topic

jennewt

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?

MarcFox








myst

i want this for smf 1.1 beta3
waiting for that

DemonicInfluence


Dannii

Are there screen shots or a live demo available?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

rojamaia


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"

rojamaia


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);
}

DemonicInfluence

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


ygmn

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....
Thread Killer ... After I post they die?

LSU BABY!

Large SMF forum About a truck....go Figure?

DemonicInfluence


myst


DemonicInfluence


Hengis

How would you do it manually? Are there instructions anywhere?
Visit www.pchelpforum.com for all your PC support needs

xenovanis

"Insanity: doing the same thing over and over again and expecting different results."

DemonicInfluence

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.

Thantos

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.

Dannii

"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Thantos

Well my screen shot skills aren't the best but here ya go:

Advertisement: