News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Question. How to open new window w/this?

Started by kennyemery, December 21, 2009, 08:26:20 AM

Previous topic - Next topic

kennyemery

 'chat' => array(
            'title' => 'Chat',
            'href' => 'URL',
            'show' => $context['allow_memberlist'],
            'sub_buttons' => array(
            ),
            ),

What do I need to add to get this to open up a new window? I know target="blank" would def not work. This is for adding a new tab and when clicked, I'd like for it to open a new window instead of take users away from main forum screen.

Thanks in advance,
Ken

Kays

The example in Subs.php shows usage as such:


'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
'target' => '_blank',

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

ilearnmath.net

#2
Hi. I am having a similar issue here. Trying to get this TAB to open in a new window, but it isn't doing it. Any idea what I am doing wrong?

Here is the tab code from Subs.php


'abstractmath' => array(
'title' => 'ABSTRACT MATH',
'href' => $scripturl . '?page=abstractmath',
'show' => true,
'sp_page' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
'target' => '_blank',
),


EDIT: I'm using SimplePortal and OverLight theme. Could this be why?

Kays

It might be an SP thing. The other option is to add it to the url.


'abstractmath' => array(
            'title' => 'ABSTRACT MATH',
            'href' => $scripturl . '?page=abstractmath" target="_blank',
            'show' => true,
            'sp_page' => true,
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],
             //'target' => '_blank',
            ),


@  kennyemery

Has this resolved you issue?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

CapadY

Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

ilearnmath.net

@Kays: Thank you very much. It worked nicely.

@capady: I tried clearing the forum (and browser) cache before applying Kay's fix above, but that did not work. Thanks for the tip anyway.

Kays


If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Advertisement: