[req]how to modify legend?

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
Locked
princexxx
Registered User
Posts: 82
Joined: Fri May 09, 2008 2:10 pm

[req]how to modify legend?

Post by princexxx »

i want to make legend like this-

Code: Select all

Legend:  [ Administrator ][ Super Moderator ]
i want to make administrator and another ranks in this box-

Code: Select all

[ Ranks ]
i am using subsilver2 style and currently seperated with this-

Code: Select all

Legend :: Administrators, Elite Moderator
thanks,
prince

princexxx
Registered User
Posts: 82
Joined: Fri May 09, 2008 2:10 pm

Re: [req]how to modify legend?

Post by princexxx »

Hey no one can do this or don't know how to do this! :lol:
If any one not want to tell then can you please tell me where to edit these modifications...

User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Airdrie, UK (127.0.0.1)
Name: Kenny Cameron
Contact:

Re: [req]how to modify legend?

Post by stickerboy »

No edits needed for this one. Edit the group in your ACP and select the option to display in the group legend :)
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red

princexxx
Registered User
Posts: 82
Joined: Fri May 09, 2008 2:10 pm

Re: [req]how to modify legend?

Post by princexxx »

Sorry i cannot unserstand you.....can you provide step by step Process? ;)

User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Airdrie, UK (127.0.0.1)
Name: Kenny Cameron
Contact:

Re: [req]how to modify legend?

Post by stickerboy »

Go to your ACP -> Users & Groups tab -> Manage Groups -> Go to "Settings" on each group you wish to show on the legend -> Tick "Display group in legend:" and save.

ps. please don't pm me for support, as also stated in my Signature.
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red

princexxx
Registered User
Posts: 82
Joined: Fri May 09, 2008 2:10 pm

Re: [req]how to modify legend?

Post by princexxx »

Oh you are saying that......I don't want to do that as i had already showing Ranks in the Legend or in the index page of my phpbb!

I want to Replace-

Code: Select all

comma (,) from This Brackets [] in the Legend...
That means Currently my Ranks in index page are showing like this-

Code: Select all

Administrator,Supermod,Register member
I want to replace , With [My Ranks]

To make like this-

Code: Select all

[Administrator][Supermod][Register member]
Regards,
prince

User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Airdrie, UK (127.0.0.1)
Name: Kenny Cameron
Contact:

Re: [req]how to modify legend?

Post by stickerboy »

Ah, ok sorry i mis-read.

You'll want to open index.php and find the following code:

Code: Select all

$legend = array();
while ($row = $db->sql_fetchrow($result))
{
    $colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';
    $group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];

    if ($row['group_name'] == 'BOTS' || ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')))
    {
        $legend[] = '<span' . $colour_text . '>' . $group_name . '</span>';
    }
    else
    {
        $legend[] = '<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . $group_name . '</a>';
    }
}
$db->sql_freeresult($result);

$legend = implode(', ', $legend); 
And replace it with this:

Code: Select all

$legend = array();
while ($row = $db->sql_fetchrow($result))
{
    $colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';
    $group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];

    if ($row['group_name'] == 'BOTS' || ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')))
    {
        $legend[] = '[<span' . $colour_text . '>' . $group_name . '</span>]';
    }
    else
    {
        $legend[] = '[<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . $group_name . '</a>]';
    }
}
$db->sql_freeresult($result);

$legend = implode(' ', $legend); 
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red

princexxx
Registered User
Posts: 82
Joined: Fri May 09, 2008 2:10 pm

Re: [req]how to modify legend?

Post by princexxx »

Wow really helpfull.....Working Great Thanks,
Prince ;)

Locked

Return to “[3.0.x] MOD Requests”