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.
Not a member yet? Click here to register.
Forgot Password?

User ranks

Asked Modified Viewed 8,042 times
S
staktas
S
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
asked
Junior Member

Hi, i created user rank, and wondered, how i can set it for user. Could i set it for user through rank_apply field as you see in this pic?

i56.tinypic.com/rupfl3.jpg

Thanks.
0 replies

25 posts

S
staktas
S
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Junior Member

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 ;)
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

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.
0 replies
S
staktas
S
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Junior Member

I would really appreaciate your help with it :)
Edited by staktas on 20-01-2011 17:28,
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

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
0 replies
S
staktas
S
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Junior Member

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
/*-------------------------------------------------------+
| PHPFusion 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.
Edited by staktas on 20-01-2011 18:46,
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

That's an old version.

Download this version...

http://www.fangree.co.uk/forum/viewthread.php?thread_id=796&rowstart=0#post_6539
0 replies
S
staktas
S
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Junior Member

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?
Edited by staktas on 20-01-2011 20:31,
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

What country are you in?
0 replies
S
staktas
S
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Junior Member

Lithuania.
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Can you send me your IP in a PRIVATE MESSAGE?

Thanks
0 replies
S
staktas
S
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Junior Member

Ok, done, but could you upload your mod somewhere?
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Try the site now. ;)
0 replies
S
staktas
S
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Junior Member

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..
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

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
/*-------------------------------------------------------+
| PHPFusion 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]
Edited by Craig on 20-01-2011 22:21,
0 replies
S
staktas
S
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Junior Member

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.
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Code in post #19 fixed.
0 replies
S
staktas
S
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Junior Member

Ok, now, now errors, but still, can't see image in profile. I think i done everything as i had to..

i52.tinypic.com/10qctbq.jpg

I use this for image and it's definetly working: http://www.rsbots.lt/images/ranks/patikimas.png
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

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
0 replies
S
staktas
S
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Junior Member

Still, i was already changed these. After i changed super_ranks.php i got that error again.
0 replies
S
staktas
S
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Junior Member

I tried all that again today, and still it doesn't work. I deleted the mod, then uploaded it again, changed rows i needed to, but nothing. The one thing i don't like about php-fusion is that you can't do simple things simple.

Look, it shows that, user has rank, but it doesnt show image:

i54.tinypic.com/24enxgw.jpg
Edited by staktas on 21-01-2011 13:32,
0 replies

Category Forum

User Administration - 8

Labels

None yet

Statistics

  • Views 0 views
  • Posts 25 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
S
S
  • Junior Member, joined since
  • Contributed 18 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet