Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Staff rankings? (http://www.mysidiaadoptables.com/forum/showthread.php?t=3786)

Aasixx 07-24-2012 04:43 PM

Staff rankings?
 
Is there anyway I can make it, under their username when viewing their profile, it shows their staff ranking? For example, "Moderator" appears under their name. Thanks.

Hall of Famer 07-24-2012 10:39 PM

Well you can see this by clicking this link:
http://www.mysidiaadoptables.com/forum/showgroups.php

And you are not able to see such information by looking at their profile.

Aasixx 07-24-2012 11:34 PM

Actually, I meant making rankings for my site. XD Like, if there was a code to add rankings.

Hall of Famer 07-24-2012 11:56 PM

Oh sorry, I thought you were referring to this support forum since you mentioned Moderator. XD The usergroup Moderator does not exist on Mys sites, which is why it sounds so confusing.

No one has ever made a code to add ranking, but it should not be difficult. If you do not mind, take a screenshot of your profile page and use paint/photoshop to mark the location you want the text to display. I will write a code for you then.

Aasixx 07-25-2012 12:02 AM

http://i50.tinypic.com/bi1m50.png

Like this, where you can set the rankings to either moderator or admin for a certain user.
Thanks. c:

Hall of Famer 07-25-2012 12:42 AM

Well here you go!

Find this line in profile.php first:

PHP Code:

    $article_content .= "<li><strong><u>{$lang_basic_info} {$user}</u></strong><br /><br />
                            <img src='
{$row->avatar}' border=0 width='100' height=100 /><br />
                            <strong>Member Since:</strong> 
{$row->membersince}<br /><br />
                            Gender: 
{$row->gender}<br />
                            Favorite Color: 
{$row->color}<br />
                            Nickname: 
{$row->nickname}<br />
                            Bio: <br />
                            
{$row->bio}<br /></li>"

And replace with:

PHP Code:

    $usergroup $adopts->join("groups""groups.gid = users.usergroup")
                ->
select("users", array(), constant("PREFIX")."users.username = '{$user}'")->fetchObject();
    
$article_content .= "<li><strong><u>{$lang_basic_info} {$user}</u></strong><br /><br />
                            Usergroup: 
{$usergroup->groupname}<br />
                            <img src='
{$row->avatar}' border=0 width='100' height=100 /><br />
                            <strong>Member Since:</strong> 
{$row->membersince}<br /><br />
                            Gender: 
{$row->gender}<br />
                            Favorite Color: 
{$row->color}<br />
                            Nickname: 
{$row->nickname}<br />
                            Bio: <br />
                            
{$row->bio}<br /></li>"


Aasixx 07-25-2012 12:51 AM

This is what I get when I go to the user's profile:
"Fatal error: Call to undefined method PDO::join() in /home/ipetsx10/public_html/profile.php on line 110"

Hall of Famer 07-25-2012 07:06 AM

umm what version of this script are you using? Mys v1.3.1? o_o

Aasixx 07-25-2012 03:50 PM

Yep, that's the script version I'm using.

Hall of Famer 07-25-2012 07:19 PM

Are you sure about this? Its impossible that Mys v1.3.1's script does not recognize the Database::join() method. Anyway I can rewrite the code for you a few hours later, which should work even with Mys v1.3.0 and its beta.


All times are GMT -5. The time now is 01:30 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.