Welcome, Guest. Please Login or Register.
May 14, 2025, 01:16:00 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Custom Stars Mod « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Custom Stars Mod  (Read 701 times)
Dgirllamius
Noobie
*
Posts: 13


reelbigfish@btinternet.com WWW
Custom Stars Mod
« on: May 24, 2003, 11:06:13 AM »
Reply with quote

I'm looking for a custom stars mod, for V 1.5.1 where I can give my moderators different coloured stars.  One mod wants pink ones, and another wants red ones, but I need a mod to do this.

Does anyone have one or something which I could use?
Logged

Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:Custom Stars Mod
« Reply #1 on: May 26, 2003, 06:02:17 AM »
Reply with quote

maybe if you look for the php code that inserts the stars in the html, you can replace it with an included file that could be named stars.php and in that file you write a condition for each moderator, if the post doesn't belong to any of your moderators, then it'll default to the normal star... this is just the idea, I haven't looked into the code really...

any able coder that can tell if this would work?
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
Dgirllamius
Noobie
*
Posts: 13


reelbigfish@btinternet.com WWW
Re:Custom Stars Mod
« Reply #2 on: May 26, 2003, 11:02:35 AM »
Reply with quote

Well, I don't fancy going into the code because for one, I don't know PHP well enough to write it.

Plus, I wouldn't know where to start for making a mod because I don't know how to code or anything.  All I know is the basics of HTML.

D'oh!
Logged

supamike
Jr. Member
**
Posts: 53


I'm... a llama!?

Re:Custom Stars Mod
« Reply #3 on: July 01, 2003, 06:28:44 PM »
Reply with quote

The code for the stars is in the load.php file, as shown below. Actually, here's what mine looks like -- I've edited it to assign a single graphic for each set of stars (PHPBB style)...


   /* create the memberinfo and memberstars entries */
   if ($userprofile[$user]['posts'] > $GodPostNum)
   {
      $memberinfo[$user] = "";
      $memberstar[$user] = "<img src=\"$imagesdir/star5.gif\" border=\"0\" alt=\"*\" />";
   }
   elseif ($userprofile[$user]['posts'] > $SrPostNum)
   {
      $memberinfo[$user] = "";
      $memberstar[$user] = "<img src=\"$imagesdir/star4.gif\" border=\"0\" alt=\"*\" />";
   }
   elseif ($userprofile[$user]['posts'] > $FullPostNum)
   {
      $memberinfo[$user] = "";
      $memberstar[$user] = "<img src=\"$imagesdir/star3.gif\" border=\"0\" alt=\"*\" />";
   }
   elseif ($userprofile[$user]['posts'] > $JrPostNum)
   {
      $memberinfo[$user] = "";
      $memberstar[$user] = "<img src=\"$imagesdir/star2.gif\" border=\"0\" alt=\"*\" />";
   }
   else
   {
      $memberinfo[$user] = "";
      $memberstar[$user] = "<img src=\"$imagesdir/star1.gif\" border=\"0\" alt=\"*\" />";
   }

   /* If this user is a moderator, and we aren't calling this from the IM */
   $modcheck=LoadRealName($user);

   if ($userprofile[$user]['memberGroup'] == 'Administrator')
   {
      $memberstar[$user] = "<img src=\"$imagesdir/staradmin.gif\" border=\"0\" alt=\"*\" />";
      $memberinfo[$user] = "";
   }
   elseif ($userprofile[$user]['memberGroup'] == 'Global Moderator')
   {
      $memberstar[$user] = "<img src=\"$imagesdir/stargmod.gif\" border=\"0\" alt=\"*\" />";
      $memberinfo[$user] = "";
   }
   elseif ($sender != "im" &&  in_array($user, $moderators))
   {
      $modinfo[$user] = "";
      $memberstar[$user] = "<img src=\"$imagesdir/starmod.gif\" border=\"0\" alt=\"*\" />";
   }

Logged
oldiesmann
YaBB God
*****
Posts: 577


Jesus died for your sins... Have you thanked him?

oldiesmann@oldiesmann.us WWW
Re:Custom Stars Mod
« Reply #4 on: July 04, 2003, 01:27:29 AM »
Reply with quote

I don't think it would be too difficult to do... Just create a thing allowing mods to select their own stars color by creating a folder with several different star images in it, then store the star options in the database and create a variable to pick up the appropriate star image...
Logged

"I've sinned greatly, but Christ's for real, baby
It's a wonder He saved me and just didn't hate me
So won't you tell Him "Save me"
Please stand up, please stand up, please stand up..." - J. Jackson (More Info)
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Custom Stars Mod « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.043 seconds with 21 queries.