MyBBThemes Community

Full Version: Medals Plugin Customization
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
Hi there,

If you would like to have a medals system in your forum (and award the best members of your forum with them), you may want to install this plugin:

--------------------------------------------------------------
SkunkMedals Plugin:
http://mods.mybboard.net/view/skunkmedals

However, the latest version is found here:
https://code.launchpad.net/ncaanetwork
(I had to download one by one the files... well, at least there are few of them)
Edit: The above link doesn't seem to work anymore. So I decided to attach the whole plugin package in this post.

This updated version removed the fixed size of medal images :) so you can set any image size you want... you may even set different images sizes for each medal =D

--------------------------------------------------------------

The bad thing with this plugin is that the medals are set in a row in the postbit zone (the mini-profile shown in the users posts). So... if an user has too many medals, it may crash your forum layout (x_x)

Additionally, the medals are shown just down the postbit... and it doesn't look so good... There was a time when this forum had that plugin installed, and FirefoxWiz modified the Postbit template so the medals were shown in a nice "groupbox"... but, with this modification, in the private messages (and some other areas) the groupbox appeared without medals in it.

Well... I decided to modify the latest version plugin code in order to solve this two problems.

I'm sharing the file (attached). You may want to customize this parts of the file:

PHP Code:
$medals_per_line 5
And change the 5 for wathever number of medals per line you want. I have set 5 as default because this is a nice size to set 24x24 images files as medals :) they're aligned to the left in each line so they look like "scoutboys" badges :mrgreen: ... as you can see in this screenshot:

[Image: muestragroupboxmedallaskp2.th.png]

And also you may want to change this part of the file to change the title of the "groupbox":
PHP Code:
$post['medals'] = "<br><fieldset><legend><strong>Badges</strong>
</legend><table align=\"left\"><tbody><tr><td align=\"left\">"

And change Badges for Medals or wathever word you like for the groupbox title ;-)

To apply this customization of the plugin, you just need to replace the original file "inc/languages/plugins/medals.php" with the attached in this thread. :)

Enjoy *<=o)

Edit: If you want the badges to be centered in the container (groupbox), you can change this part of the second part of code shown before:
Quote:<td align=\"left\">

to this:
Quote:<td align=\"center\">

and... of course, you can align the medals to the right as well:
Quote:<td align=\"right\">

UPDATE:

I've updated tha attached file. Now you can make the number of medals per line be automatically fixed in the available space of each user (wich may be affected by screen resolution, medals sizes, browser window size, etc)

If this is what you want to do, you just need set to zero the "medals_per_line" parameter. How? Just find this line of code, and set zero, this way:

PHP Code:
$medals_per_line 0

So, example: a 800x600 user may see only 3 medals per line, but a 1024x768 user may see 5 medals per line. In both examples, the medals will try to fill the available space inside the medals container.

If you have some comments you are welcome to post them here :)

Enjoy again :thumb1:

UPDATE 2:

The link to the latest version of the plugin doesn't seem to work anymore. So I decided to attach the whole plugin package in this post. The plugin license allows me to do that :) The attached package contains my modified file, so have that in mind. It's not the original version.
Very cool and helpful. Did you post this on the mybb thread for the mod?
NetSage Wrote:Very cool and helpful. Did you post this on the mybb thread for the mod?
Glad you found it helpful :D Erm.. the MyBB thread.. well.. no ;-D but I've just searched, found this thread there, and posted the same message there. So, NOW the anser is Yes :up:

bloodbower Wrote:thanx ı like the puling
That's nice :) But please don't double post ;-)

ByResul Wrote:Turkey Versiyons and edit ------>
What? :lol:
It is soooo much cool
i really appreciate ur work
jasmine Wrote:It is soooo much cool
i really appreciate ur work
Thank you. I hope you can enjoy of this nice plugin mod soon. :)
wow this is very helpful! thanks alot for this :D
oh my gosh YESthis is exactly what this plugin needed


THANKS!
Would like to have and use that one.. Thanks
Thanks, i've seen a similar thing for other forums but didn't have it for mybb. it's definitely useful.
They just put something like this at ubuntuforums. :)
Pages: 1 2 3 4 5
Reference URL's