PDA

View Full Version : Mini Mods - Admin and Mod Panel link on NAVBAR


troppodel
01-11-2009, 10:00 PM
Hi there
this is my first and little modification.

ADMIN AND MOD PANEL LINK ON NAVBAR
TEXT VERSION

open navbar template

find this text:

<if condition="$show['pmwarning']"><div><strong><phrase

1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></div></if>

add below this text:

<center><if condition="$show['admincplink']"><a

href="$admincpdir/index.php$session[sessionurl_q]"><b>[$vbphrase[admin]]</b></a></if>
<if condition="$show['modcplink']"><a

href="$modcpdir/index.php$session[sessionurl_q]"><b>[$vbphrase[mod]]</b></a></if>
</center>

IF YOU WANT YOU CAN ADD AN IMAGE:
IMAGE VERSION:

Add this code:

<center><if condition="$show['admincplink']"><a

href="$admincpdir/index.php$session[sessionurl_q]"><img src="http://www.yousite.com/forums/images/adminpanel.gif"></a></if>
<if condition="$show['modcplink']"><a

href="$modcpdir/index.php$session[sessionurl_q]"><b>[$vbphrase[mod]]</b></a></if>
</center>

REPLACE THE TEXT "http://www.yousite.com/forums" with your board URL
IF YOU WANT YOU CAN CUSTUMIZE THE IMAGE

Upload in your site this image

http://www.bobmarleymagazine.com/images/adminpanel.gif


IF YOU USE VBADVANCED USE THIS CODE FOR TEXT VERSION:

<center>
<if condition="$show['admincplink']"><a href="http://www.yoursite.com/forum/admincp/index.php"><b>[$vbphrase[admin]]</b></a></if>
<if condition="$show['modcplink']"><a href="http://www.yoursite.com/forum/modcp/index.php"><b>[$vbphrase[mod]]</b></a></if>

</center>

ENJOY

PLEASE CLICK ON INSTALL

redrabbit12
01-12-2009, 01:55 PM
Thanks, works fine.

I edited a bit to suit my needs, but it's all good. It always got annoying scrolling down to access the admincp.

Cheers
Eric

Installed.

troppodel
01-12-2009, 02:22 PM
thanks!! yeah It always got annoying scrolling down!!

SEOvB
01-12-2009, 02:55 PM
Adds a query to pages!

R-D
01-12-2009, 03:11 PM
Adds a query to pages!

No, it doesn't. And yes, I actually tested that claim, even though it's obviously wrong.

johnrizz
01-12-2009, 05:14 PM
thanks! it works fine for me...

troppodel
01-12-2009, 08:05 PM
R-D let me know your problem?
you must be administrator or moderators for see the links!

cisco123
01-12-2009, 09:20 PM
thanks nice little mod...works great

R-D
01-12-2009, 09:29 PM
R-D let me know your problem?
you must be administrator or moderators for see the links!

The only problem I have is when people go around spreading completely false information and misinforming people who perhaps don't know any better. (Good mod, by the way. I've had something similar running on my board since 3.6X)

And FRDS, some information to back up my claim:

Taken from global.php
// This generates an extra query for non-admins/supermods on many pages so we have chosen to only display it to supermods & admins
// $show['modcplink'] = iif(can_moderate(), true, false);
$show['modcplink'] = ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] OR $vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator']);

Absolutely no additional queries for admins or supermods, period.

AURFSCAN
01-12-2009, 10:26 PM
cool idea , but I have it in the navbar

SEOvB
01-13-2009, 01:17 AM
No, it doesn't. And yes, I actually tested that claim, even though it's obviously wrong.

My fault, I mis-read the description and thought it was adding the modcp link so moderators could see it

troppodel
01-13-2009, 06:49 AM
cool idea , but I have it in the navbar

yeah it is the same you can put the code where you want, i have shared this mod only because i don't wanna scrolling the page anymore for access to admin page! :D

johnrizz
01-13-2009, 03:37 PM
yeah it is the same you can put the code where you want, i have shared this mod only because i don't wanna scrolling the page anymore for access to admin page! :D

I hear ya!!

troppodel
01-13-2009, 08:36 PM
yes why the vbullettin developers don't change of default the position of these links!!

troppodel
01-15-2009, 08:03 AM
update right now for users with vbadvanced


IF YOU USE VBADVANCED USE THIS CODE FOR TEXT VERSION:

<center>
<if condition="$show['admincplink']"><a href="http://www.yoursite.com/forum/admincp/index.php"><b>[$vbphrase[admin]]</b></a></if>
<if condition="$show['modcplink']"><a href="http://www.yoursite.com/forum/modcp/index.php"><b>[$vbphrase[mod]]</b></a></if>

</center>

Nightmare-GameZ
01-27-2009, 05:08 AM
Cool mod. Makes life easier for me. xD

Installed.

Dingo14
01-28-2009, 05:19 AM
update right now for users with vbadvanced


IF YOU USE VBADVANCED USE THIS CODE FOR TEXT VERSION:

<center>
<if condition="$show['admincplink']"><a href="http://www.yoursite.com/forum/admincp/index.php"><b>[$vbphrase[admin]]</b></a></if>
<if condition="$show['modcplink']"><a href="http://www.yoursite.com/forum/modcp/index.php"><b>[$vbphrase[mod]]</b></a></if>

</center>

mate i have the vBadvanced CMPS v3.0.0 as well can you tell me what template this goes in working great on main forum but portal i cant figure

troppodel
01-30-2009, 02:31 PM
mate i have the vBadvanced CMPS v3.0.0 as well can you tell me what template this goes in working great on main forum but portal i cant figure

sorry but i don't understood
you need to change only the navbar template

Dingo14
02-02-2009, 12:31 AM
sorry mate sorted works great thanks me being a bit brain dead lol

troppodel
02-02-2009, 08:27 AM
thanks friends