Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: gantocks on June 08, 2008, 03:50:12 PM

Title: Adding a Button and link
Post by: gantocks on June 08, 2008, 03:50:12 PM
Hi there

Firstly

I have searched and cannot find a way to add a Button with a link to version 1.1.5

I wish to add a Button which will Link to My Flashchat .

Forgive my ignorance as I am New to SMF.

I tried the Mod crbutton but I could not change the link from the roadrunner link that was in the mod.

I have now uninstalled that mod.

Can anybody help this idiot.

LOL

Many thanks
Title: Re: Adding a Button and link
Post by: Owdy on June 08, 2008, 04:24:14 PM
http://www.simplemachines.org/community/index.php?topic=82003.0
Title: Re: Adding a Button and link
Post by: gantocks on June 08, 2008, 04:47:39 PM
Hi there Owdy

Thanks for that

I have added this as suggested to the index_template.php as suggested.

As you can see the url is <a href="http://oceans19.net/forum/chat/flashchat.php>

However when clicking on the button I am taken to http://www.roadrunner.cx/ which was the URL in the crtbutton Mod I used previously

Where else do Ineed to place the Url of the Chatroom


    // The Chat Room
        echo '
     <a href="http://oceans19.net/forum/chat/flashchat.php>', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/chat.gif" alt="Chat" style="margin: 2px 0;" border="0" />' : $txt[467]), '</a>', $context['menu_separator'];

            
   
Title: Re: Adding a Button and link
Post by: Owdy on June 08, 2008, 04:52:16 PM
Quote from: gantocks on June 08, 2008, 04:47:39 PM

However when clicking on the button I am taken to http://www.roadrunner.cx/ which was the URL in the crtbutton Mod I used previously
Are you sure you are editing right theme? If you still have that "wrong" link, just edit that and correct it.
Title: Re: Adding a Button and link
Post by: gantocks on June 08, 2008, 04:54:48 PM
Hi Owl

I use the SMF Default Theme and that is the File I have edited

It places the Button on the Forum without a problem it is just the URL that does not change

Cheers for your reply
Title: Re: Adding a Button and link
Post by: Owdy on June 08, 2008, 05:03:14 PM
If you open /Themes/default/index.template.php and search http://www.roadrunner.cx/ , do you find it? If yes, change that url. If no, the you are editing wrong file.
Title: Re: Adding a Button and link
Post by: Jumpmasterrt on June 08, 2008, 05:13:36 PM
gantocks,

attach a copy of your index.templat.php file if you can't figure it out.
Title: Re: Adding a Button and link
Post by: gantocks on June 08, 2008, 05:17:49 PM
Hi there

Here is my Index file

Many thanks.
Title: Re: Adding a Button and link
Post by: Jumpmasterrt on June 08, 2008, 05:27:19 PM
And a link to your page, sorry.
Title: Re: Adding a Button and link
Post by: gantocks on June 08, 2008, 05:28:36 PM
Hi JumpmasterRt

Here is the link

http://oceans19.net/forum/index.php
Title: Re: Adding a Button and link
Post by: Jumpmasterrt on June 08, 2008, 05:49:58 PM
The link doesn't show to guests, so try this file.

I deleted what you had and added

// the [chat] button
echo ($current_action == 'chat' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'chat' ? 'active_back' : 'back' , '">
<a href="http://oceans19.net/forum/chat/flashchat.php>' , $txt[467] , '</a>
</td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
Title: Re: Adding a Button and link
Post by: gantocks on June 08, 2008, 05:58:00 PM
Hi there

I uploaded the file you kindly sent and overwritten the original

There is no button showing on the menu

What could the reason for that be?

Once again thanks for your help

Gantocks
Title: Re: Adding a Button and link
Post by: Jumpmasterrt on June 08, 2008, 06:02:05 PM
probably the $txt[467]. I registered on your forum so i can see. Once we're done you can delete me.
Title: Re: Adding a Button and link
Post by: gantocks on June 08, 2008, 06:04:29 PM
Hi there

I have just approved you

Gantocks
Title: Re: Adding a Button and link
Post by: Jumpmasterrt on June 08, 2008, 06:10:20 PM
Ok so it added a space.... that's odd.

Ok, made a change

The link was missing a set of " anyway so it's good it didn't work. ;)

Try this......
Title: Re: Adding a Button and link
Post by: gantocks on June 08, 2008, 06:14:33 PM
Mnay thanks JumpmasterRT

I am very grateful for you help and it works a treat now

You are a star mate

Gantocks
Title: Re: Adding a Button and link
Post by: gantocks on June 08, 2008, 06:20:29 PM
Hi mate

here is that link fot the chatroom

http://www.tufat.com/s_flash_chat_chatroom.htm
Title: Re: Adding a Button and link
Post by: Jumpmasterrt on June 08, 2008, 06:21:07 PM
My pleasure to help. ;)
Title: Re: Adding a Button and link
Post by: gantocks on June 08, 2008, 06:23:06 PM
Thanks again