News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Personalising SMF

Started by Ron G4GWC, March 07, 2014, 05:48:53 AM

Previous topic - Next topic

Ron G4GWC

Would anyone please point me to Help personalising My Board
such as adding a menu bar along the top just like simple machines.org site entry page,
changing menu item url to the secondary  menu bar,
Is there a topic addressing this type of personalisation.
Current default theme is Core
Regards
Ron

kat

Looking at the support topic, it seems that this...

http://custom.simplemachines.org/mods/index.php?mod=2657

...works with 2.0.4, at least. So, if you backup, then install it, using emulation (Click "advanced" during the install), it might just work, if that's anything like what you're after...

Ron G4GWC

Great! but I want to understand where and how to change the existing theme not just add an extra layer of complexity to the system, where are the top buttons defined and what else do I need to consider to avoid problems.
I suppose I need help getting into  the existing theme templates etc.

Ron G4GWC

Quote from: g4gwc on March 07, 2014, 05:48:53 AM
Would anyone please point me to Help personalising My Board
such as adding a menu bar along the top just like simple machines.org site entry page,
changing menu item url to the secondary  menu bar,
Is there a topic addressing this type of personalisation.
Current default theme is Core
Regards
Ron
such as adding a menu bar along the top just like simple machines.org site entry page,

regards

Lou69

There are a few step by step tutorials on the site but you will need to search for them. You will need an understanding of CSS and PHP, to varying degrees. However, if you download this theme and install it ...

http://custom.simplemachines.org/themes/index.php?lemma=2585

the index.css file is well documented and will give you a good start. From the documentation in that theme, you can practice moving things around. Remember also that some of this requires changes in various PHP files.

Take a look at the index.template.php file in the theme folder. Then look for the function template_body_above() and this will give you a good starting point.

If you are using FireFox, then install the Firebug mod and use it to move across your site and look at what each piece of css and php do.

If you are only wanting to add buttons then use the mod that K@ linked for you or, you can do a search on 'buttons' in the Mods section and see more solutions.


Ron G4GWC

Thank you for the reply, I will search about a bit more, I use Dreamweaver it does help with the css,
Thank again 

Ron

Ron G4GWC

Looks like I'll never find what I want this side of the next Ice Age,
Would any one Please point me to the files that need modding to add a single button and url to the top of the Forum Pages.

The line with the Simple Machines Logo - just like this page

Thanks in anticipation,

Ron

Sir Osis of Liver

If I understand your question correctly, you're looking for this in index.template.php -



<div id="wrapper" style="width: ' . $settings['forum_width'] . '">' : '', '
<div id="header"><div class="frame">
<div id="top_section">
<h1 class="forumtitle">
<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
</h1>';

// the upshrink image, right-floated



From default Curve.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Ron G4GWC

Thanks for that, the theme i am using is Core not sure if the same applies exactly, Ive looked at  index.template.php and the next problem is where are the $context and $scripturl defined
Thanks for your patience

Ron


Sir Osis of Liver

In Core theme it's here -



<div class="catbg">
<img class="floatright" id="smflogo" src="', $settings['images_url'], '/smflogo.gif" alt="Simple Machines Forum" />
<h1 id="forum_name">';

if (empty($context['header_logo_url_html_safe']))
echo $context['forum_name_html_safe'];
else
echo '
<img src="', $context['header_logo_url_html_safe'], '" alt="', $context['forum_name_html_safe'], '" />';

echo '
</h1>
</div>';



$scripturl is $boardurl plus /index.php, i.e., www.simplemachines.org/community/index.php$context is an array variable that pulls various info from the database.  If you're trying to build a site menu like the one top of this forum, just use direct urls, like they do here.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Ron G4GWC

Great thats helpful yes I can add to the buttons with urls directly added to the system ones in your example,
I have been getting A bit too cautious I| think, the existing url board url and board name are in settings.php and seem to be used as part of the paths of many buttons changing them really messes things up.
but I will add a few extra buttons without touching the existing items

Best regards

Advertisement: