Customizing SMF > SMF Coding Discussion

"$scripturl" usage about adding button with external url

(1/2) > >>

Kiriakos GR:
Hi people.

I have read all the help about adding one extra button that will lead back to my main website.
And the help file is poor with out one example, of what would be the form of the hrf line.

'menu_action' => array(
            'title' => 'back to my site',
            'href' => $scripturl,  ? ?   www_mysite_com
            'show' => true,

Please give me a hand, thanks.

Arantor:
If it's an external URL you don't need $scripturl, you just list the external URL:


--- Code: ---'menu_action' => array(
  'title' => 'back to my site',
  'href' => 'http://mysite.com/',
  'show' => true,
),
--- End code ---

Kiriakos GR:
Hi I have major problems to make any change to the file it self with out to collapse.
Thankfully I made a backup copy, and I am safe.

I use notepad to edit the file.

1) question: is just one     ), needed at the end ?
2) is there any suggested editor about editing this file ?
Thanks.   

Arantor:
1. There will need to be a ), at the end of that code - like all the other menu items do.

2. I personally use Notepad++ but there's a lot of good text editors out there.

Kiriakos GR:
Thank you, with the notepad++ the task was allot easier.

Best regards from Greece. 
 :)

Navigation

[0] Message Index

[#] Next page

Go to full version