vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Admin CP and Mod CP links in your navbar (https://vborg.vbsupport.ru/showthread.php?t=104844)

JsnakeJ 01-08-2006 10:00 PM

Admin CP and Mod CP links in your navbar
 
This is a quite simple template modification that will add your AdminCP and ModCP links to your navbar.

Open your Navbar template.


Find:
Code:

</tr>
        </table>
</div>
<!-- / nav buttons bar -->

You don't have to place it at the end of your navbar. You can place in anywhere you would like on the navbar.

Place Above:
Code:

                                <if condition="$show['admincplink']"><td class="vbmenu_control"><a href="$admincpdir/index.php$session[sessionurl_q]">$vbphrase[admin]CP</a></td></if>
                                <if condition="$show['modcplink']"><td class="vbmenu_control"><a href="$modcpdir/index.php$session[sessionurl_q]">$vbphrase[mod]CP</a></td></if>


IF
you would like to remove the other links then please do the following.

Open your Footer template.

Find and Remove:
Code:

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

Should work for any version of vBulletin 3.5.x

Mastar 01-09-2006 02:47 AM

Screen Shots? Sounds Good though depends how they look.

JsnakeJ 01-09-2006 03:16 AM

Added a screenshot for ya.

Tri@de 01-17-2006 12:54 PM

Nice Hack! *INSTALLED*

But i have a request:

There's a way to display only one of the link for mods and admin?
If i'm admin i'd like to view only admincp (the modcp is useless for me)
Also a mod could see only modcp.

Tri@de 01-17-2006 01:48 PM

Modified!

instead of
<if condition="$show['admincplink']">

write
<if condition="$show['admincplink'] AND $bbuserinfo[usergroupid]==X">

Where X is the administrator's groupid

For Modcp Link:
<if condition="$show['modcplink']">
replace with:
<if condition="$show['modcplink']" AND $bbuserinfo[usergroupid]==X">

Where X is the Mod's groupid

I hope it will be useful!

LBSources 01-17-2006 02:02 PM

very nice.. very convenient.. thanks..

we_scooter 01-19-2006 09:36 PM

i like this MOD

I have this concern .

If I want a condition saying (if usergroup Admin or MODERATOR) show "this" else show "blablabla")

what should the code be


???

Overfed 02-13-2006 05:01 PM

I got this error for some reason

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/justs2/public_html/forums/includes/adminfunctions_template.php(3537) : eval()'d code on line 215

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

wwwdjrcs 02-16-2006 01:37 AM

works great for me, thx!

http://forum.djrcs.com

JsnakeJ 02-22-2006 07:45 PM

Quote:

Originally Posted by Tri@de
Modified!

instead of
<if condition="$show['admincplink']">

write
<if condition="$show['admincplink'] AND $bbuserinfo[usergroupid]==X">

Where X is the administrator's groupid

For Modcp Link:
<if condition="$show['modcplink']">
replace with:
<if condition="$show['modcplink']" AND $bbuserinfo[usergroupid]==X">

Where X is the Mod's groupid

I hope it will be useful!

Some may find that useful. :)


All times are GMT. The time now is 05:10 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.01072 seconds
  • Memory Usage 1,738KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete