News:

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

Main Menu

3 Questions

Started by Grim Line, July 24, 2010, 12:06:31 PM

Previous topic - Next topic

Joker™

for drop down just see this code.i got it from Sources\subs.php


'admin' => array(
            'title' => $txt['admin'],
            'href' => $scripturl . '?action=admin',
            'show' => $context['allow_admin'],
            'sub_buttons' => array(
               'featuresettings' => array(
                  'title' => $txt['modSettings_title'],
                  'href' => $scripturl . '?action=admin;area=featuresettings',
                  'show' => allowedTo('admin_forum'),
               ),
               'packages' => array(
                  'title' => $txt['package'],
                  'href' => $scripturl . '?action=admin;area=packages',
                  'show' => allowedTo('admin_forum'),
               ),
               'errorlog' => array(
                  'title' => $txt['errlog'],
                  'href' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc',
                  'show' => allowedTo('admin_forum') && !empty($modSettings['enableErrorLogging']),
               ),
               'permissions' => array(
                  'title' => $txt['edit_permissions'],
                  'href' => $scripturl . '?action=admin;area=permissions',
                  'show' => allowedTo('manage_permissions'),
                  'is_last' => true,
               ),
            ),
         ),


just see how drop down buttons associated with admin tab are declared there.If you want further assistance tell us exactly what are you trying to do.To which button are you trying to add more drop down options.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Grim Line

Well what i want is "League Tables" as the title which will link to "/index.php?page=leagues" then one drop down menu under it which will say "Premiership" and link to "/index.php?page=premiership".

Joker™

So you want it as

League Tables(main button)

Premiership ( dropdown button/sub menu button)
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Grim Line

#23
Yes you got it perfectly :)

Joker™

one last question , after which button you want to place "League Tables" button ?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Grim Line


Joker™

forum button :o , can you name some other button which is by default in smf , as otherwise i'vd require this file

Sources\subs.php
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

ɔɔɔɔɔɔuɥoɾ

#27
Obviously have a portal installed lol

Probably simple portal, it creates a forum button

That would be after

'forum' => array(
'title' => empty($txt['sp-forum']) ? 'Forum' : $txt['sp-forum'],
'href' => $scripturl . ($modSettings['sp_portal_mode'] == 1 && empty($context['disable_sp']) ? '?action=forum' : ''),
'show' => in_array($modSettings['sp_portal_mode'], array(1, 3)) && empty($context['disable_sp']),
'sub_buttons' => array(
),
),


If you have simple portal

Which portal are you using?


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Joker™

Quote from: ♪ JohnCcCcCc ♫ on July 25, 2010, 04:11:11 PM
Obviously have a portal installed lol

i've never used a portal that's why wrote that :)
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Grim Line

Yes i have simpleportal activated so i have a Home then Forum tab so it's wanted between Forum and help :)

ɔɔɔɔɔɔuɥoɾ

Well, thats where you want it isn't it? lol

add the button array after the forum button array. as so:


         'forum' => array(
            'title' => empty($txt['sp-forum']) ? 'Forum' : $txt['sp-forum'],
            'href' => $scripturl . ($modSettings['sp_portal_mode'] == 1 && empty($context['disable_sp']) ? '?action=forum' : ''),
            'show' => in_array($modSettings['sp_portal_mode'], array(1, 3)) && empty($context['disable_sp']),
            'sub_buttons' => array(
            ),
         ),
         'yourbutton' => array(
            'title' => 'label here',
            'href' => 'linkhere',
            'show' => true,
            'sub_buttons' => array(
            ),
         ),


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Grim Line

Thats the issue, i have no idea how to create the array :\

Joker™

#32
open

Sources\subs.php
Find:

'help' => array(


Add Before

'leagues' => array(
'title' => $txt['leagues'],
'href' => $scripturl . '?page=leagues',
'show' => true,
'sub_buttons' => array(
'premiership' => array(
'title' => $txt['premiership'],
'href' => $scripturl . '?page=premiership',
'show' => true,
),
),
),



Now open this file

themes\default\languages\index.english.php
before

?>


add this

$txt['leagues'] = 'Leagues';
$txt['premiership'] = 'Premiership';



clear your site cache to see the buttons as some text strings are added.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

ɔɔɔɔɔɔuɥoɾ

#33
Im reading the thread, Im not quiet getting what you want from this button, tell me these
What lable do you want the button to have?
What link do you want it to got to?
...
attach Subs.php too

Or do as Joker says If you can do it yourself

When I 1st came to SMF a year or so back, I would have attached my file already, your holding out pretty well lol

Oh by the way, I created a mod which allows you to add upto 5 custom buttons, just for this purpose lol
its in the approval list on the mod site already, been their since last night.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Grim Line

I tried what you said Joker and nothing was added, I will upload my files for you.

Why can't smf be simple like Mybb, Gah!

Joker™

are you sure address for leagues page is

/index.php?page=leagues

and not

/index.php?action=leagues
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Grim Line


Joker™

try the attached files
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

ɔɔɔɔɔɔuɥoɾ

He has set up a custom page with simple portal, the address he asks for is correct

?page= :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Grim Line

I uploaded both and nothing :S

Advertisement: