Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
Faytal
Newbie
Newbie



Joined: Feb 21, 2012
Posts: 60

PostPosted: Mon May 06, 2013 12:15 am Reply with quote

I understand that the forums and Your Account are separate modules, but i shoukd still be able to so this... How could I display the Ranking of a user on their Your_Account profile page? Not just for special ranks, but for the post count ranks, too. So, for example, it would say on the Your_Account userinfo page for a normal user with X posts that their ranking is "Rookie Poster", but if the user has a special ranking, it will display as that name, for example "Site Admin".

Basically, I want to take the forum ranking User Title and display it on the Your_Account profile just below the "Username" field.

I know that this is possible to do, I just don't know how to do it.
I would appreciate it so much if someone could help.
 
View user's profile Send private message
Palbin
Newbie
Newbie



Joined: Nov 26, 2007
Posts: 25

PostPosted: Mon May 06, 2013 5:16 pm Reply with quote

Use the following where you want to display the rank. I also include the image if you ant to use that. I didn't test this, but it should work.

Code:
$result = $db->sql_query('SELECT * FROM ' . $prefix . '_bbranks WHERE rank_id=\'' . $usrinfo['user_rank'] . '\'');
$row = $db->sql_fetchrow($result, SQL_ASSOC);
echo $row['rank_title'];
echo $row['rank_image']
 
View user's profile Send private message
Faytal
Newbie
Newbie



Joined: Feb 21, 2012
Posts: 60

PostPosted: Mon May 06, 2013 7:31 pm Reply with quote

Palbin wrote:
Use the following where you want to display the rank. I also include the image if you ant to use that. I didn't test this, but it should work.

Code:
$result = $db->sql_query('SELECT * FROM ' . $prefix . '_bbranks WHERE rank_id=\'' . $usrinfo['user_rank'] . '\'');
$row = $db->sql_fetchrow($result, SQL_ASSOC);
echo $row['rank_title'];
echo $row['rank_image']


Yeah, I was just looking for a textual rank. I'll try it. Thanks.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Mon May 06, 2013 10:36 pm Reply with quote

Faytal,
Please use the Reply button instead of Quote on every reply. The Quote button is very wasteful as you already have the context in the post right above.
Thanks.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunch
linear-bunch