Hi guys on my main page I have wordpress and under /forum I have smf, I would like a user to be able to navigate back to main page from smf, and would like to add an extra button "Main Page" which will direct to wordpress, how can I do that? If it is with editing smf files, would this stay on the next upgrade?
Thanks,
Anarchy
Graphics and Themes (http://www.simplemachines.org/community/index.php?topic=82003.0) go to How to add tabs to themes.
How do I add buttons to SMF 2.0 (http://wiki.simplemachines.org/smf/How_do_I_add_buttons_to_SMF_2.0)
and yes if you use the package manager to upgrade your change will stay in place.
also this is not a graphics nor templates issue any longer in 2.0.
I did it successfully for the English lang and current theme in Subs.php, but background of "Home" is highlighted with orange, I want this highlight to be valid or active for "Main Page" button, how can I accomplish this one?
find // Figure out which action we are doing so we can set the active tab.
// Default to home.
in that file and copy one of the elseif's and edit it to match what you put in your custom button.
Errm .. sorry but I didnt quite get what you mean ... I copy pasted 'Home' button, changed it to my desired custom button, but only the home is highlighted, can you maybe give an example? Or give the exact code I should be looking for to modify?
Thanks
can you post the code you added for your button?
// All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.
if (($menu_buttons = cache_get_data('menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'], $cacheTime)) === null || ti$
{
$buttons = array(
'ana' => array(
'title' => 'Ana Sayfa',
'href' => 'http://www.hababam.biz',
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'home' => array(
'title' => 'Forum',
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
// 'is_last' => $context['right_to_left'],
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),
Ana Sayfa = My Custom Button
Forum = Home button
that button cant be set as active as it is not an action that is part of smf, the reason the "home" button is orange is because it is the page the user is currently on.
Hi, if you are showing that menu bar on the Ana Sayfa page. Something to try.
In the page for Ana Sayfa, before SSI.php is included, add the following:
$_GET['action'] = 'ana';
I thought home was specially highlighted because it is home :) but when I navigated to admin, search etc. I see that they are also highlated, all clear and Ana Sayfa is completely something else, wordpress ... I guess thats why it cant be highlighted, but no problem, the site will survive :) thanks a lot for the replies guys,
Anarchy
Yes, that's because Home is the default button.
Are you showing the menu bar on the Ana Sayfa page? It is possible to highlight the button. I've done it before. Just forget how though. ::)
No both are separate installations have no bridge or any other connection between, in this case I will put Ana Sayfa button the bottom I guess because doesnt look nice , or I will try other combinations :)