SimplePortal

Customization => Themes and Graphics => Topic started by: sattninja on December 02, 2009, 10:45:47 PM

Title: forums
Post by: sattninja on December 02, 2009, 10:45:47 PM
ok i installed simple portal and live it i have found my way sround pretty easily however there is no clear way to get to my forums i have to make a block with the top forums then it will list my forums then i can click on that the click another link to take me to my forums i am trying to be clear as i can is there a way to either add a button on top that says forums or some kind of block i have to be missing something here

please help

thanks
Title: Re: forums
Post by: ccbtimewiz on December 03, 2009, 01:12:26 AM
Yes, by clicking the 'forum' button in your tab list. :)
Title: Re: forums
Post by: sattninja on December 03, 2009, 02:14:28 AM
i am not using the default theme there is no forum button
Title: Re: forums
Post by: Marcus on December 03, 2009, 02:16:44 AM
Then you'll need to add a button in your theme's index template to the following URL.

http://yourdomain.com/index.php?action=forum

Or you can add a link using HTML in a block.
Title: Re: forums
Post by: sattninja on December 03, 2009, 02:18:41 AM
i am pretty much a noob at this can you give me some details
Title: Re: forums
Post by: Marcus on December 03, 2009, 02:22:03 AM
I can give you the HTML for adding a button in a block, but it would probably be best to add the button to your menu.

Edit: Take a look here (http://docs.simplemachines.org/index.php?topic=564.0).  There is a very good tutorial.  That is assuming you are using version 1.1 as stated in your profile.  Depending on your theme, the template may be different.  You might also search the thread for your theme on Simplemachines if that is where you got it.

Good luck.
Title: Re: forums
Post by: sattninja on December 03, 2009, 02:36:14 AM
yes that is where i got is it is called 2nd i am looking there now but no luck yetcould you give me the html code for now i can atrtach my php if you could take a look at it

i appreciate the help
Title: Re: forums
Post by: Marcus on December 03, 2009, 02:59:49 AM
I am fairly new to doing all of this.  I just took a look at your template file, and I see some of the code for the menu is repeated.   You would probably be better off waiting for someone with more experience to help you.

Did you take a look at that tutorial? 

http://docs.simplemachines.org/index.php?topic=564.0
Title: Re: forums
Post by: sattninja on December 03, 2009, 03:48:38 AM
ok i got it with the link you sent me problem is it is just a word no button how do i make it a button man i love this theme but how stupid is it that they didnt build a forum button into it
Title: Re: forums
Post by: Chas on December 03, 2009, 04:57:30 AM
Before you installed SimplePortal, the "HOME" button took you to the forum page. When SimplePortal is installed the Home button takes you to the portal "Home" page, your forum page can be found at www. myforumname/forumfolder/index.php.

What you need to do is use the instructions in the link to edit the code in the index.template.php file of your forum for whatever theme you're using to copy the code for your current Home or Help button and convert this to point to the Forum page. The instructions are clear there.

Make a backup copy of each theme's index.template.php and then edit each one using a plain text editor or PHP text editor (Notepad2 for Windows is good).

Once you have edited each theme's index.template.php file you then upload them back to your server (ftp probably) and your forum button will appear.

Remember BACKUP the originals before you change anything just in case you get the code wrong and you get errors.

HTH
Chas
PS have done this numerous times on different themes.
Title: Re: forums
Post by: sattninja on December 03, 2009, 05:04:31 AM
the instruction i follwed did the now i have

home,profile,members,search,message etc button anf i do have forum now in that list and it works takes you to the forum but it is only text not a button like the rest i have been pouring over this code and i think i am close i managed to make 2 home button lol but everything i try i cannot get the forum text to become a button
Title: Re: forums
Post by: sattninja on December 03, 2009, 05:42:53 AM
yeah i am lost i have tried everyting i can delete buttons off the page i can duplicate buttons off the page but i cannot get a forum button on the page just text that takes you right to the forum can some one please tell me what the hell to do i deleted my help button cause i dont want it so the forum text is the last in the list here is what it looks like my php

Code: [Select]
// The [calendar]!
if ($context['allow_calendar'])
 { echo '<li', $current_action == 'calendar' ? ' class="current"' : '', '><a href="', $scripturl, '?action=calendar"><b>' , $txt['calendar24'] , '</b></a></li>';

;}else{ echo'';}
   // Show the [Forum] button.
   echo ($current_action=='Forum' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'Forum' ? 'active_back' : 'back' , '">
               <a href="', $scripturl, '?action=Forum">Forum</a>
            </td>' , $current_action == 'Forum' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';




}

// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td> </td>';

echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode('  |  ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}

the home button string was at the bottom i deleted it and the home button went away
Title: Re: forums
Post by: Nathaniel on December 10, 2009, 04:25:55 AM
The best tutorial for adding a 'Forums' button for SimplePortal is this one: General Custom Theme Tutorial (http://simpleportal.net/index.php?topic=148.0)

Have a go at following that, if you can't get it to work then attach your index.template.php file to your next post.

Moved to the Themes and Graphics board.
SimplePortal 2.3.8 © 2008-2024, SimplePortal