SimplePortal

Customization => Themes and Graphics => Custom Theme Tutorials => Topic started by: nikan on November 02, 2008, 05:08:52 PM

Title: Classic and Babylon (Outdated)
Post by: nikan on November 02, 2008, 05:08:52 PM
With this mod we add (not replace) forum button, when we have SPortal installed, to the Classic and Babylon themes.

Edit the file index.template.php at the Themes/classic directory

Find this code:
Code: [Select]
// Show the [home] and [help] buttons.
echo '
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=help">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];

Replace with this code:
Code: [Select]
// Show the [home] button
echo '
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" border="0" />' : $txt[103]), '</a>', $context['menu_separator'];

// Show the [forum] button
  if(!empty($context['portalactive']))
echo '
        <a href="', $scripturl, '?action=forum">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/forum.gif" alt="' . $txt['sp-forum'] . '" border="0" />' : $txt['sp-forum']), '</a>', $context['menu_separator'];

// Show the [help] button
echo '
<a href="', $scripturl, '?action=help">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];

We do the same steps and find - replace the same code to the index.template.php at the Themes/babylon directory for the Babylon theme.
Title: Re: Classic and Babylon
Post by: Nathaniel on November 13, 2008, 02:46:02 AM
Moved to the 'Custom Theme Tutorials' board. The buttons look good, thanks for doing them nikan. :D
Title: Re: Classic and Babylon
Post by: Tomicko on December 09, 2008, 08:39:39 AM
Hmmm...I replaced the code as described but I still can't see my forum, unless I disable te portal.
Title: Re: Classic and Babylon
Post by: [SiNaN] on December 20, 2008, 07:28:26 AM
You should be able to see a button for forum.
Title: Re: Classic and Babylon
Post by: LightningMk6 on April 15, 2009, 12:03:20 PM
Hi there

Using SMF 1.18
Simple Portal 2.2

Applied Mod and working fine on Default Theme

Have carried out changes to my Babylon Theme as instructed, added the button .gif to the images directory in this theme also. Unfortunately no button showing up on this theme.

Here is a copy of my index.template.php file, wonder if anyone can help me sort this out please. Love the portal but would prefer to use the Babylon Theme.

SimplePortal 2.3.8 © 2008-2024, SimplePortal