Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

User ranks

Anyone?
Admin >>> User Admin >>> Forum Ranks

and you can set who to apply it too there.

For only members you must do it like post counts.

eg. 0 -posts Newbie
10 - posts not so much a newbie.
Yeah, i know this, but, sadly, this is not the thing i need.

Ok, maybe try another way. If it's possble to add image to a "only member's" profile, and viewthread.php?
Search Special Ranks By Fangree Productions.
Ok, thanks. I found it, but it says: Admins can give users a Special Rank by entering any text in the text field.

Can i add image too? And it's for v7.01, could i use it with v7.00.07?

btw, thanks for fast response ;)
It is for V7.01.0x as it uses profile links function however that can easily be changed for 7.00.0x series if you want.

As for an image I could give you a code to add so you can use an image instead of text.
I would really appreaciate your help with it :)
File

/includes/user_fields/user_srank_include.php

Look for...

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]echo "<font color='green'>".$user_data['user_srank']."</font>\n";[/syntaxhighlighter]

Change that too...

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]echo "<img src='".$user_data['user_srank']." width='100px' height='100px' alt='' >\n"; [/syntaxhighlighter]

Save upload overwrite.

Now edit special_ranks.php

Look for...
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]
echo " <td class='".$row_color."'><span style='color:#339900;'>".$data['user_srank']."</span></td>\n";[/syntaxhighlighter]

Change it too...
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]
echo " <td class='".$row_color."'><img src='".$user_data['user_srank']." width='100px' height='100px' alt='' ></td>\n";[/syntaxhighlighter]

Save upload overwrite.

Now to use this when editing a users profile just simply add the url to the image in the textfield. something like...

http://www.theimagehost.com/imasges/the_image.jpg

Quote

Now edit special_ranks.php

Look for...
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]
echo " <td class='".$row_color."'><span style='color:#339900;'>".$data['user_srank']."</span></td>\n";[/syntaxhighlighter]


can't find it on special_ranks.php

That's how my special_ranks.php looks:

[syntaxhighlighter brush=html,first-line=1,highlight=0,collapse=false,html-script=false]<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2010 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Name: Special Ranks
| Filename: special_ranks.php
| Author: Fangree Productions
| Developers: Fangree_Craig / MvE Designs
| Site: www.fangree.co.uk / http://www.mvedesigns.eu
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
if (!defined("IN_FUSION"wink) { die("Access Denied"wink; }

include LOCALE.LOCALESET."user_fields/user_srank.php";

$rowstart = (isset($_GET['rowstart']) && isnum($_GET['rowstart'])) ? $_GET['rowstart'] : 0;

$users_per_page = "10";
$user_count = (dbcount("(user_id)", DB_USERS, "user_status = '0' && user_srank !=''"wink);

opentable($locale['spr001']);
echo $locale['spr002'];
closetable();

opentable($locale['spr006']);

echo "<table cellpadding='5' cellspacing='1' align='center' width='100%' class='tbl-border'>\n<tr>\n";
echo "<td class='tbl1'><b>".$locale['global_101']."</b></td>\n";
echo "<td class='tbl'><b>".$locale['uf_srank']."</b></td>\n";
echo "<td class='tbl'><b>".$locale['spr003']."</b></td>\n";
echo "<td class='tbl'><b>".$locale['spr004']."</b></td>\n";
echo "</tr>\n";

$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_srank !='' AND user_status = '0' ORDER BY user_id ASC LIMIT $rowstart,$users_per_page"wink;

while($data = dbarray($result)){
if($data['user_srank']){
echo "<tr>\n";
echo "<td class='tbl2'>".profile_link($data['user_id'], $data['user_name'], $data['user_status'])."</td>\n";
echo "<td class='tbl2'><font color='green'>".$data['user_srank']."</font></td>\n";
// User Web
echo "<td class='tbl2'>";
if (array_key_exists("user_web", $data) && $data['user_web']) {
if (!strstr($data['user_web'], "http://"wink) { $urlprefix = "http://"; } else { $urlprefix = ""; }
echo "<a href='".$urlprefix."".$data['user_web']."' target='_blank'>".$locale['spr005']."</a> ";
} else {
echo"---\n";
}
echo"</td>\n";
// User Country Field
echo"<td class='tbl2'><font color='green'>\n";
if (isset($data['user_country'])) {
$c = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."nations WHERE nat_id='".$data['user_country']."'"wink);
echo "<img style='vertical-align:middle;border:none' src='".($data['user_country'] != 0 ? $c['nat_pic'] : "".IMAGES."flags/f-00.gif"wink."' alt='".$c['nat_name']."' title='".$c['nat_name']."' />\n";
echo"</font>\n";
} else {
//User Location
if (isset($data['user_location'])) {
echo $data['user_location'];
echo"</font>\n";
}
}
echo "</td>\n</tr>\n";
}
}
echo "</table>\n";

if ($user_count > $users_per_page) echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($rowstart,$users_per_page,$user_count,3,FUSION_SELF."?"wink."\n</div>\n";

closetable();

require_once THEMES."templates/footer.php";
?>

[/syntaxhighlighter]

I posted it because, i downloaded this mod not from your link (because your site isn't working), so it could be possible, that i downloaded wrong mod.
That's an old version.

Download this version...

http://www.fangree.co.uk/forum/viewthread.php?thread_id=796&rowstart=0#post_6539
don't know why, but i cant open that link, neither my friends can. It says: Forbidden

You don't have permission to access /forum/viewthread.php on this server.
Apache/2 Server at www.fangree.co.uk Port 80

Is there any other possible way to download newest version somehow?
What country are you in?
Lithuania.
Can you send me your IP in a PRIVATE MESSAGE?

Thanks
Ok, done, but could you upload your mod somewhere?
Try the site now. ;)
Ok, i downloaded and istalled new version, but now i get errors. On special_ranks.php, i get those:

Notice: Undefined index: spr011 in /home/todamach/domains/rsbots.lt/public_html/special_ranks.php on line 50

Notice: Undefined index: spr012 in /home/todamach/domains/rsbots.lt/public_html/special_ranks.php on line 51

Notice: Undefined index: spr004b in /home/todamach/domains/rsbots.lt/public_html/special_ranks.php on line 63

Fatal error: Call to undefined function profile_link() in /home/todamach/domains/rsbots.lt/public_html/special_ranks.php on line 79

Notice: Undefined index: spr011 in /home/todamach/domains/rsbots.lt/public_html/special_ranks.php on line 74

Notice: Undefined index: spr011 in /home/todamach/domains/rsbots.lt/public_html/special_ranks.php on line 74

I see that it's something with prifle_links, and you mentioned that v7.01 uses that..
upload the new locale file.

And use this special_ranks.php

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2010 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Name: Special Ranks
| Filename: special_ranks.php
| Author: Fangree Productions
| Developers: Fangree_Craig
| Site: www.fangree.co.uk
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
include LOCALE.LOCALESET."user_fields/user_srank.php";
if (!defined("IN_FUSION"wink) { die("Access Denied"wink; }

$result = dbquery("SHOW COLUMNS FROM ".DB_USERS. " LIKE 'user_srank'"wink;
if (dbrows($result) > 0) {
if (isset($_GET['rowstart']) && isnum($_GET['rowstart'])) {
$rowstart = $_GET['rowstart'];
} else {
$rowstart = 0;
}

$users_per_page = "10";
$user_count = (dbcount("(user_id)", DB_USERS, "user_status = '0' && user_srank !=''"wink);

opentable($locale['spr001']);
echo $locale['spr002'];
closetable();

opentable($locale['spr006']);

$result = dbquery("SELECT * FROM ".DB_USERS." WHERE user_srank !='' AND user_status = '0' ORDER BY user_level DESC, user_name LIMIT $rowstart,$users_per_page"wink;

if (dbrows($result)) {
$i = 0;

echo "<table cellpadding='5' cellspacing='1' align='center'width='80%' class='tbl-border'>\n";
echo " <tr>\n";
echo " <td style='width: 60px;' class='tbl1'><b>".$locale['spr011']."</b></td>\n";
echo " <td class='tbl1'><b>".$locale['spr012']."</b></td>\n";
echo " <td class='tbl1'><b>".$locale['uf_srank']."</b></td>\n";
$result2 = dbquery("SHOW COLUMNS FROM ".DB_USERS. " LIKE 'user_web'"wink;
if (dbrows($result2) > 0) {
echo " <td class='tbl1'><b>".$locale['spr003']."</b></td>\n";
}
$result3 = dbquery("SHOW COLUMNS FROM ".DB_USERS. " LIKE 'user_country'"wink;
if (dbrows($result3) > 0) {
echo " <td class='tbl1'><b>".$locale['spr004']."</b></td>\n";
}
$result3 = dbquery("SHOW COLUMNS FROM ".DB_USERS. " LIKE 'user_location'"wink;
if (dbrows($result3) > 0) {
echo " <td class='tbl1'><b>".$locale['spr004b']."</b></td>\n";
}
echo " </tr>\n";

while($data = dbarray($result)){
//Get Table row colours
$row_color = ($i % 2 == 0 ? "tbl1" : "tbl2"wink;

echo " <tr>\n";
echo " <td style='text-align:center;' class='".$row_color."'>\n";
if ($data['user_avatar'] && file_exists(IMAGES."avatars/".$data['user_avatar'])) {
echo " <img src='".IMAGES."avatars/".$data['user_avatar']."' style='vertical-align: middle; opacity:0.6;filter:alpha(opacity=60)' onmouseover='this.style.opacity=1;this.filters.alpha.opacity=100' onmouseout='this.style.opacity=0.6;this.filters.alpha.opacity=60' border='0' width='50' height='50' title='".$locale['spr011']."' alt='".$locale['spr011']."' />\n";
}else{
echo " <img src='".IMAGES."avatars/noav.gif' title='".$locale['spr010']."' alt='".$locale['spr010']."' style='float: middle; opacity:0.6;filter:alpha(opacity=60)' onmouseover='this.style.opacity=1;this.filters.alpha.opacity=100' onmouseout='this.style.opacity=0.6;this.filters.alpha.opacity=60' border='0' width='50' height='50' />\n";
}
echo " </td>\n";

/*Uncomment for V7.01.0x Compatibility
echo " <td style='width: 150px;' class='".$row_color."'>".profile_link($data['user_id'], $data['user_name'], $data['user_status'])."</td>\n";
echo " <td class='".$row_color."'><span style='color:#339900;'>".$data['user_srank']."</span></td>\n"; */
//////

echo " <td style='width: 150px;' class='".$row_color."'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side' title='".$data['user_name']."'>".trimlink($data['user_name'],12)."</a>";
echo " <td class='".$row_color."'><img src='".$data['user_srank']." width='100px' height='100px' alt='' ></td>\n";


$result2 = dbquery("SHOW COLUMNS FROM ".DB_USERS. " LIKE 'user_web'"wink;
if (dbrows($result2) > 0) {
echo " <td style='text-align:center; width: 60px;' class='".$row_color."'>";
// User Web User Field
if (array_key_exists("user_web", $data) && $data['user_web']) {
if (!strstr($data['user_web'], "http://"wink) { $urlprefix = "http://"; } else { $urlprefix = ""; }
echo " <a title='".$urlprefix."".$data['user_web']."' href='".$urlprefix."".$data['user_web']."' target='_blank'>".$locale['spr005']."</a>\n";
}else{
echo $locale['spr014'];
}
echo " </td>\n";
}

//User Country User Field
$result3 = dbquery("SHOW COLUMNS FROM ".DB_USERS. " LIKE 'user_country'"wink;
if (dbrows($result3) > 0) {
if (isset($data['user_country'])) {
echo "<td style='text-align:center; width: 60px;' class='".$row_color."'>\n";
$c = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."nations WHERE nat_id='".$data['user_country']."'"wink);
echo "<img style='vertical-align:middle;border:none' src='".BASEDIR."".($data['user_country'] != 0 ? $c['nat_pic'] : "".IMAGES."/flags/f-00.gif"wink."' alt='".$c['nat_name']."' title='".$c['nat_name']."' />\n";
echo"</td>\n";
}
}

//User Location User Field
$result4 = dbquery("SHOW COLUMNS FROM ".DB_USERS. " LIKE 'user_location'"wink;
if (dbrows($result4) > 0) {
if ($data['user_location'] !=""wink {
echo " <td style='text-align:center; width: 60px;' class='".$row_color."'>\n";
echo " ".$data['user_location']."\n";
echo " </td>\n";
}else{
echo " <td style='text-align:center; width: 60px;' class='".$row_color."'>\n";
echo " ".$locale['spr014']."\n";
echo " </td>\n";
}
}
echo " </tr>\n";
$i++;
}
echo "</table>\n";

if ($user_count > $users_per_page) echo "<div align='center' style=';margin-top:5px;'>\n".makepagenav($rowstart,$users_per_page,$user_count,3,FUSION_SELF."?"wink."\n</div>\n";
}else{
echo $locale['spr008'];
}
closetable();
} else {
opentable($locale['spr009']);
if (iADMIN && checkrights("C"wink){
echo "<div class='admin-message' style='text-align:center;'>".$locale['spr007']." <a href='".BASEDIR."administration/user_fields.php".$aidlink."'>".$locale['spr007b']."</div>";
}else{
echo $locale['spr015'];
}
closetable();
}
require_once THEMES."templates/footer.php";
?>[/syntaxhighlighter]
Thanks, but still, one error left:

Notice: Undefined variable: user_data in /home/todamach/domains/rsbots.lt/public_html/special_ranks.php on line 86

in super_ranks.php bellow user's avatar.
Code in post #19 fixed.
Thread Information
Author
Replies
26 posts
Views
7,122 times
Last Post
Last updated on 9 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Craig, staktas