Log in

View Full Version : Miscellaneous Hacks - Open Admincp/Modcp in a New Tab


smokin1337
11-10-2009, 10:00 PM
I don't know if this has been done or not if so sorry. This will open Admincp/Modcp in a new tab.

Go to admincp->Styles and Templates->Style Manager->Yourstyle->Edit Templates->footer

For Admincp find:
<if condition="$show['admincplink']"><a href="$admincpdir/index.php$session[sessionurl_q]">$vbphrase[admin]</a> -</if>

Replace with:
<if condition="$show['admincplink']"><a href="$admincpdir/index.php$session[sessionurl_q]" target="_blank">$vbphrase[admin]</a> -</if>

For Modcp find:
<if condition="$show['modcplink']"><a href="$modcpdir/index.php$session[sessionurl_q]">$vbphrase[mod]</a> -</if>

Replace with:
<if condition="$show['modcplink']"><a href="$modcpdir/index.php$session[sessionurl_q]" target="_blank">$vbphrase[mod]</a> -</if>

Thats it, if you use a mod to put admincp on your navbar it will be in the navbar or header template just add target="_blank" inside the href tag.

djbaxter
11-11-2009, 02:11 PM
That will open in a new window rather than a new tab depending on your browser settings.

It's far easier to do this with a right mouse click on the link, giving you the choice of a new tab or a new window. And then you don't have to modify any vBulletin code at all or change it after every upgrade. :)

abdobasha2004
11-12-2009, 12:28 AM
It is the default to open in new tab I think !

smokin1337
11-12-2009, 12:44 AM
It is the default to open in new tab I think !

Nah it's not, I posted it because it aggravated me because it would always open in the same tab. So i added target="_blank" so it opens in a new tab for me. I didn't think about the browser settings really this just worked for me. Figured someone might use it too.

TheLastSuperman
11-12-2009, 01:39 AM
Browser settings too people ;)

snowlion
11-13-2009, 10:35 AM
You can open new tab by clicking the wheel or use Ctrl + left click without browser setting ^_^.