News:

Wondering if this will always be free?  See why free is better.

Main Menu

adding a button to the menu

Started by grannie, March 02, 2012, 07:28:22 PM

Previous topic - Next topic

grannie

I've checked the help topic for adding a button to the menu, and I sort of understand what it's asking me to do. I need to add a GALLERY link (the gallery is already installed) and so I need to provide the title that the button will be called (gallery) and the actual address of the gallery, yes?

the forum is only in English, and I don't require any sub-menus

'menu_action' => array(
            'title' => 'text for menu',
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
               'sub_menu_action' => array(
                  'title' => 'text for sub-menu',
                  'href' => $scripturl . '?action=newaction',
                  'show' => true,
                  'is_last'=> true,
               ),
            ),
         ),

So where exactly do I place each of these requirements, within this piece of code? Sorry to be such a pain, asking such obvious questions. Hopefully this will be the last one.

TheListener


grannie

que?

The gallery is Photopost and was installed by them, is that what you're needing to know?

TheListener

It helps.

Can we see a link please.

If the gallery had been one of the mods things would have been easier.

Edited to add:

Is photopost related to vbulletin?

Mareid

You need to go to two files:  the first one is

Themes/default/languages/index.english.php
find this segment of code
$txt['warn_mute'] = 'Muted';

$txt['message_index'] = 'Message Index';
$txt['news'] = 'News';
$txt['home'] = 'Home';


insert the text of your button, and a label (e.g. $txt['gallery'] = 'Gallery'; ) following the format shown in the document.

now open Sources/subs.php and find the following code:
$buttons = array(
                        'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
and insert the following code
         'gallery' => array(
'title' => $txt['gallery'],
'href' => 'url_of_your_gallery',
'show' => true,
'sub_buttons' => array(
),
),



grannie

I don't have subs.php.

I have SubsPackage, SubsPost, Subs Recent, Subs Sound

Sorry I must sound like a complete dill.

IGNORE THAT *blushing furiously* I found it.

grannie

GOD BLESS YOU, EVERY ONE!

I have a functioning gallery and now I'm going to lie down with a bottle of gin and forget all about php and FileZilla forever.

TheListener


grannie

Please, please, God-of-Grandmothers, let there not be a next time.

Advertisement: