SimplePortal
Customization => Themes and Graphics => Topic started by: ChubZz on February 14, 2011, 09:41:26 PM
-
Hello Simpleportal comunity
I recently set up a site with MSF and Simpleportal and simple portal looked really cool,i installed my theme "Zone 99" From Deziner studio but noticed there was no FORUM button in the Navigation bar
Probibly a simple fix but i looked through the Admin section so many times.
I dont know how to attach the index.template so ill upload it to media fire
Website:
ta1pgaming.com (http://ta1pgaming.com)
Thank yous all!
-
Hi ChubZz,
There is no administrative option for adding the forum button.
This is something that usually gets taken care of at install time.
I'm guessing that this is a custom theme, not the one in /Themes/default
At install time, there is actually an option to add the forum button to every theme the installer can figure out.
But if you did not select that option, you can do it yourself right now.
Please follow, step by step, the tuturial at: http://simpleportal.net/index.php?topic=148.0 (http://simpleportal.net/index.php?topic=148.0)
It will tell you exactly how to add the forum button and how to add code to set the current action to forum.
-
Hey
Thanks for the reply but i have tried this but coldnt figure out where to put
if (empty($context['disable_sp']) && in_array($modSettings['sp_portal_mode'], array(1, 3)))
Any idea?
Thanks
-
First, make a new 'forum' button. Then, put that "before your new 'forum' button".
This means your new forum button, which started as an extra copy of your help button, will look like (with that special "only do this if simpleportal is turned on" line of code:
// Show the [forum] button.
if (empty($context['disable_sp']) && in_array($modSettings['sp_portal_mode'], array(1, 3)))
echo ($current_action=='forum' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'forum' ? 'active_back' : 'back' , '">
<a href="', $scripturl . ($modSettings['sp_portal_mode'] == 1 ? '?action=forum' : ''), '">', empty($txt['sp-forum']) ? 'Forum' : $txt['sp-forum'], '</a>
</td>' , $current_action=='forum' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
-
Hey thanks for the help but i just cant seam to do it lkol, i attaced the index.template.php to my 1st post, maby you could take a look and see where it needs to go?
Thanks alot i really appreciate it :nervous-happy:
-
I think you can handle this. You are smart.
Your theme is a LITTLE different than the example -- it uses <li> instead of <td>. But still.
First, you can find function template_menu()
Then, you can go down and find the help button. Use your editor's "find" feature to find that
echo '<li><a' , $current_action=='help' ? ' class="active"' : '' , ' href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
After that, it is pretty easy to take a second copy of it:
echo '<li><a' , $current_action=='help' ? ' class="active"' : '' , ' href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
echo '<li><a' , $current_action=='help' ? ' class="active"' : '' , ' href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
And start working on turning the first 'help' into your forum button, just like the tutorial says:
if (empty($context['disable_sp']) && in_array($modSettings['sp_portal_mode'], array(1, 3)))
echo '<li><a' , $current_action=='forum' ? ' class="active"' : '' , ' href="', $scripturl . ($modSettings['sp_portal_mode'] == 1 ? '?action=forum' : ''), '">', empty($txt['sp-forum']) ? 'Forum' : $txt['sp-forum'], '</a></li>';
echo '<li><a' , $current_action=='help' ? ' class="active"' : '' , ' href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';
-
Thanks got it working! :nervous-happy:
Cheers :applause:
-
I was about to suggest using the new hooks system until I realized you're on 1.1.12. :P
-
We are so not going there, Chris!