SimplePortal

Customization => Themes and Graphics => Topic started by: ODB1 on August 04, 2009, 11:49:28 AM

Title: Help adding Forum button to Cleanmachine theme
Post by: ODB1 on August 04, 2009, 11:49:28 AM
Ok, I have followed the steps in the general custom theme tutorial and I keep getting a parse error. I have searched the forums, and I see this come up several times but I have not found anything more complete than the instructions in the tutorial. I am using SMF 1.1.10 and Simple Portal 2.2.2. I am using the theme called Cleanmachine. I want to add the button after the home button. I posted earlier but my post has disappeared. I am including the index.template.php file from the above mentioned theme. Any help would be appreciated.
Title: Re: Help adding Forum button to Cleanmachine theme
Post by: 130860 on August 04, 2009, 12:00:08 PM
try this one:

greetings!
Title: Re: Help adding Forum button to Cleanmachine theme
Post by: ODB1 on August 04, 2009, 12:15:05 PM
Thank you very much. I was going nuts trying to get that working. If its not to much to ask, can you outline the changes you made? So next time I can fix it myself. I am obviously a noob, but really want to learn.

Cheers,
ODB1
Title: Re: Help adding Forum button to Cleanmachine theme
Post by: Costa on August 04, 2009, 02:55:37 PM
130860 modification  :nervous-happy:

Code: [Select]
// Show the [home] button.
     echo '<li', $current_action == 'home' ? ' class="chosen"' : '', '><a href="', $scripturl, '">' , $txt[103] , '</a></li>';
     
     
     // Show the [forum] button.
     global $modSettings;
     
    if (in_array($modSettings['sp_portal_mode'], array(1, 3)))
        echo '<li', $current_action=='forum' ? ' class="chosen"' : '', '> <a href="', $scripturl . ($modSettings['sp_portal_mode'] == 1 ? '?action=forum' : ''), '">', empty($txt['sp-forum']) ? 'Forum' : $txt['sp-forum'], '</a></li>';
Title: Re: Help adding Forum button to Cleanmachine theme
Post by: ODB1 on August 04, 2009, 03:23:21 PM
Thanks again.  ;)
Title: Re: Help adding Forum button to Cleanmachine theme
Post by: 130860 on August 04, 2009, 03:35:59 PM
well, I also added the "$current_action=='forum" code  for the theme's correct use, I just follow the parser at smf.org. ;)


greetings!
SimplePortal 2.3.8 © 2008-2024, SimplePortal