Temat: Rangi
Witam, korzystam z tego moda
##
##
##
## Mod title: Rank Them up!
## Mod version: 1.0
## Works on PunBB: 1.2.*
## Release date: 10/10/2007
## Author: Natanzuelo
##
## Description: This Mod allows you to put pips or any image you want as a rank
## according to the number of posts of each user.
## It comes with a pack of pips ready to use.
## Very different to that Mod named Image Rank, but based on it (Thanx Joshua!)
##
## Notes: The pack of pips was done using Joshua's Pips (Thanx again!).
##
## Affected files: viewtopic.php
##
## Affects DB: No
##
## Preview: http://gritaloforum.com.ar/viewtopic.php?id=4 <== viewtopic.php
## http://gritaloforum.com.ar/viewtopic.php?id=108 <== Pack of Pips
##
## DISCLAIMER: Please note that "mods" are not officially supported by
## PunBB. Installation of this modification is done at your
## own risk. Backup your forum database and any and all
## applicable files before proceeding.
##
##
##
#
#-------------[1. Upload]---------------------------
#
/img/pips/*
to
/img/pips/
*Note: You have to create that folder.
#
#-------------[ 2. Open File ]----------------------
#
viewtopic.php
#
#-------------[ 3. Find ]---------------------------
#
if ($cur_post['poster_id'] > 1)
{
#
#-------------[ 4. Add After ]----------------------
#
// Rank them up! Mod 1.0 Starts here
if($cur_post['num_posts'] > 7500) { $imagen_pip = 'pip30.gif'; }
elseif($cur_post['num_posts'] > 7000) { $imagen_pip = 'pip29.gif'; }
elseif($cur_post['num_posts'] > 6500) { $imagen_pip = 'pip28.gif'; }
elseif($cur_post['num_posts'] > 6000) { $imagen_pip = 'pip27.gif'; }
elseif($cur_post['num_posts'] > 5500) { $imagen_pip = 'pip26.gif'; }
elseif($cur_post['num_posts'] > 5000) { $imagen_pip = 'pip25.gif'; }
elseif($cur_post['num_posts'] > 4500) { $imagen_pip = 'pip24.gif'; }
elseif($cur_post['num_posts'] > 4000) { $imagen_pip = 'pip23.gif'; }
elseif($cur_post['num_posts'] > 3600) { $imagen_pip = 'pip22.gif'; }
elseif($cur_post['num_posts'] > 3200) { $imagen_pip = 'pip21.gif'; }
elseif($cur_post['num_posts'] > 2800) { $imagen_pip = 'pip20.gif'; }
elseif($cur_post['num_posts'] > 2400) { $imagen_pip = 'pip19.gif'; }
elseif($cur_post['num_posts'] > 2000) { $imagen_pip = 'pip18.gif'; }
elseif($cur_post['num_posts'] > 1800) { $imagen_pip = 'pip17.gif'; }
elseif($cur_post['num_posts'] > 1600) { $imagen_pip = 'pip16.gif'; }
elseif($cur_post['num_posts'] > 1400) { $imagen_pip = 'pip15.gif'; }
elseif($cur_post['num_posts'] > 1200) { $imagen_pip = 'pip14.gif'; }
elseif($cur_post['num_posts'] > 1000) { $imagen_pip = 'pip13.gif'; }
elseif($cur_post['num_posts'] > 800) { $imagen_pip = 'pip12.gif'; }
elseif($cur_post['num_posts'] > 700) { $imagen_pip = 'pip11.gif'; }
elseif($cur_post['num_posts'] > 600) { $imagen_pip = 'pip10.gif'; }
elseif($cur_post['num_posts'] > 500) { $imagen_pip = 'pip9.gif'; }
elseif($cur_post['num_posts'] > 400) { $imagen_pip = 'pip8.gif'; }
elseif($cur_post['num_posts'] > 300) { $imagen_pip = 'pip7.gif'; }
elseif($cur_post['num_posts'] > 250) { $imagen_pip = 'pip6.gif'; }
elseif($cur_post['num_posts'] > 200) { $imagen_pip = 'pip5.gif'; }
elseif($cur_post['num_posts'] > 150) { $imagen_pip = 'pip4.gif'; }
elseif($cur_post['num_posts'] > 100) { $imagen_pip = 'pip3.gif'; }
elseif($cur_post['num_posts'] > 50) { $imagen_pip = 'pip2.gif'; }
else { $imagen_pip = 'pip1.gif'; }
$ranking_pips = '/img/pips/'.$imagen_pip;
// Note: The numbers above are the quantity of posts that users
// need to reach to have the different ranks.
//
// Rank them up! Mod 1.0 Ends here
#
#-------------[ 5. Find ]---------------------------
#
<dd class="usertitle"><strong><?php echo $user_title ?></strong></dd>
#
#-------------[ 6. Add After ]----------------------
#
<dd class="usertitle"><img src="<?php echo $ranking_pips ?>"></dd> <!-- RANKING IMAGENES PIP -->
#
#-------------[ 7. Save and Upload ]----------------
#
In point 4, you can use different quantities of posts to have the different ranks.
You can actually erase some "elseif" if you don't want to have so many ranks.
You can also replace the pack of pip-ranks uploaded to /img/pips/ with any rank
images you want.
Enjoy.Ale rang mi nie wyświetla, jak skopiuje link co pokazuje w kodzie źródłowym to pokazuje. Ale niestety pod nazwą już nie ;/

