TinyPortal

Development => Support => Topic started by: HellBent on December 12, 2008, 02:31:06 PM

Title: WEB2 menu help
Post by: HellBent on December 12, 2008, 02:31:06 PM
Hi,  I have installed the web2 theme on this website...

http://www.lewportalumni.com

And have also installed ajax chat, however I can't figure out how to get the menu button to go to our chatroom which is on this url ...


http://www.lewportalumni.com/chat/index.php

Here is my current chat button code:

// chat button
         $context['menubox'][]=array(
'title' => $txt['chat'],
'link' => $scripturl.'?action=chat',
'chosen' => 'chat',
'memberonly' => true,
'guestonly' => false,
'permission' => '',
);




I've tried a direct link and all sorts of variants but I'm no php coder and would really appreciate some advise.

Many thanks :)

Title: Re: WEB2 menu help
Post by: G6Cad on December 12, 2008, 02:42:14 PM
You need to make sure the action is set to chat in the mod and also that the text ['chat'] is what the mods adds to the default theme

You need to check the mods XML or MOD file and see what code it adds for the button
Title: Re: WEB2 menu help
Post by: IchBin on December 12, 2008, 03:05:25 PM
If this code does not work:
'title' => $txt['chat'],

Try this instead:
'title' => 'Chat',
Title: Re: WEB2 menu help
Post by: HellBent on December 12, 2008, 03:16:47 PM
Thankyou both for your answers but my problem isn't with "chat" showing up in menu ... it's with the code of  the custom menu ... I need to know how to make this line in the menu code as posted in my first message ... take me to an actual url. 

This is the url:

http://www.lewportalumni.com/chat/index.php

Here is the theme code .. you see, my  chat programme is in a different folder than smf_chat

'link' => $scripturl.'?action=chat',
Title: Re: WEB2 menu help
Post by: HellBent on December 12, 2008, 03:37:05 PM
OK I probably didn't make that very clear.  Really it's not the chat thing I have a problem with, I have a problem figuring out how to put a an url into the theme button code. This theme does have custom buttons in the admin panel but I have no idea what to put in there  :-\

Is there any way I can change the following highlighted code to click on an actual url instead of the "action" ?

/ chat button
         $context['menubox'][]=array(
'title' => $txt['chat'],
[color=red]'link' => $scripturl.'?action=chat',[/color]
'chosen' => 'chat',
'memberonly' => true,
'guestonly' => false,
'permission' => '',
);
Title: Re: WEB2 menu help
Post by: IchBin on December 12, 2008, 04:40:39 PM
'link' => 'http://www.yourlink.com',
Title: Re: WEB2 menu help
Post by: HellBent on December 12, 2008, 06:06:23 PM
Quote from: IchBinâ,,¢ on December 12, 2008, 04:40:39 PM
'link' => 'http://www.yourlink.com',
That was a nice easy fix :)  Why didn't I try that ... I tried near enough everything else  :buck2: :idiot2:

Thankyou very much IchBin  O0
Title: Re: WEB2 menu help
Post by: QertysXasder on December 13, 2008, 09:32:35 AM
Quote from: IchBinâ,,¢ on December 12, 2008, 04:40:39 PM
'link' => 'http://www.yourlink.com',

thats help me to )
thanks
Title: Re: WEB2 menu help
Post by: HellBent on December 13, 2008, 05:25:54 PM
Hmmm, sorry to bother you again IchBin, but please could you show me how to write the code to make that link open in a new window, if it's possible?? 

I know how to do it in html but not this code  :-\


Title: Re: WEB2 menu help
Post by: IchBin on December 13, 2008, 05:31:11 PM
You should be able to do this:
'link' => 'http://www.yourlink.com" target="_blank',
Title: Re: WEB2 menu help
Post by: HellBent on December 13, 2008, 05:47:00 PM
Perfect!!  Thank you so much ... again  :up: