vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Mini Mods - Admin and Mod Panel link on NAVBAR (https://vborg.vbsupport.ru/showthread.php?t=201504)

troppodel 01-11-2009 10:00 PM

Admin and Mod Panel link on NAVBAR
 
Hi there
this is my first and little modification.

ADMIN AND MOD PANEL LINK ON NAVBAR
TEXT VERSION

open navbar template

find this text:

Code:

                <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:

Code:

<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:

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:

Code:

<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

Quote:

Originally Posted by FRDS (Post 1709774)
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

Quote:

Originally Posted by troppodel (Post 1710132)
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
Code:

// 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

Quote:

Originally Posted by R-D (Post 1709789)
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

Quote:

Originally Posted by AURFSCAN (Post 1710294)
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

Quote:

Originally Posted by troppodel (Post 1710648)
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:

Code:

<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

Quote:

Originally Posted by troppodel (Post 1713127)
update right now for users with vbadvanced


IF YOU USE VBADVANCED USE THIS CODE FOR TEXT VERSION:

Code:

<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

Quote:

Originally Posted by Dingo14 (Post 1726884)
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


All times are GMT. The time now is 04:54 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01137 seconds
  • Memory Usage 1,762KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (20)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete