Adding Website menu button

Started by ivanr, November 17, 2017, 07:03:02 PM

Previous topic - Next topic

ivanr

I want to add a Website button in Subs.php but my PHP is very basic what s wrong below. Also if I need some sort of action where would that go and can someone give an example script

Thanks

$buttons = array(
         'website' => array(
            'title' => $txt['website'],
            'href' => 'www.ukvga.org/index.php',
            'show' => true,
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],
      
         'home' => array(
            'title' => $txt['home'],
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],

Bob Perry of Web Presence Consulting

Quote from: ivanr on November 17, 2017, 07:03:02 PM
I want to add a Website button in Subs.php but my PHP is very basic what s wrong below. Also if I need some sort of action where would that go and can someone give an example script

Thanks

$buttons = array(
         'website' => array(
            'title' => $txt['website'],
            'href' => 'http://www.ukvga.org/index.php',
            'show' => true,
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],
      
         'home' => array(
            'title' => $txt['home'],
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],


In this quotation, I've already edited what may be your difficulty with the new button, see if the edit works for ya...
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

Kindred

You are missing a closing parens in the first array

Also, if you add something before the home button, you need to remove the is_last code from the home button array
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Illori

also have you defined the text string somewhere so it will actually show something in the menu for the button?

ivanr


Advertisement: