Dogal

Started by Fussilet, August 30, 2008, 07:33:23 AM

Previous topic - Next topic

Fussilet


Crip

Fantastic Theme bro, menu look awesome. ==
I have become comfortably numb!


I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -



TOTM Winner. | Demo Site1on1 Theme Support

Fussilet


TosTos

Beautifull, excellent, wonderfull :) Just one suggestion: It might be better to have some hover effects at the menu bro. Then, this theme could be the best.

Fussilet

thanks for your comment bro

Minare

Thank you bro, good theme ;)

Fussilet


Ryanna

If only it worked on 2.0 Beta 3.1 Public =(

Fussilet


Kosedragen

I get a parsing error when I try to add the forum button in this theme o.O
Can someone please tell me what I should do? =/

Other than this I really like this theme ^^ It looks good.

Antechinus

Post the tabs section of your index.template.php in code tags, thanks. It'll be something fairly simple to fix.

Kosedragen

Thanks, I deleted my flawed changes though =/

If this is not the section you meant; I'm sorry x3

// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

// 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'];

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

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '
<a href="', $scripturl, '?action=admin">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin.gif" alt="' . $txt[2] . '" border="0" />' : $txt[2]), '</a>', $context['menu_separator'];

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '
<a href="', $scripturl, '?action=profile">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.gif" alt="' . $txt[79] . '" border="0" />' : $txt[467]), '</a>', $context['menu_separator'];

// The [calendar]!
if ($context['allow_calendar'])
echo '
<a href="', $scripturl, '?action=calendar">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" border="0" />' : $txt['calendar24']), '</a>', $context['menu_separator'];

// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="', $scripturl, '?action=login">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/login.gif" alt="' . $txt[34] . '" border="0" />' : $txt[34]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=register">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/register.gif" alt="' . $txt[97] . '" border="0" />' : $txt[97]), '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" border="0" />' : $txt[108]), '</a>';
}

Antechinus

That's the right section. Is the button you want for Tiny Portal or for one of the other portals?

Kosedragen

I'm using SimplePortal, but is that relevant?

Antechinus

I've only used Tiny Portal so this is how you'd do it for TP. If you are using a different portal you'll probably have to enter a different string here:

if($settings['TPortal_front_type']!='boardindex')
// Show the [forum] button.


and here:

$txt['tp-forum']

However you should be able to get the correct strings for your portal from the tabs section of your default theme. Anyway, this will work for Tiny Portal:

// 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'];

if($settings['TPortal_front_type']!='boardindex')
// Show the [forum] button.
echo'
<a href="', $scripturl, '?action=forum">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/forum.gif" alt="' . $txt['tp-forum'] . '" border="0" />' : $txt['tp-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'];



If you give me the correct strings for Simple Portal I can edit those in where appropriate, or you can sort them yourself. Should be a piece of cake.

Kosedragen

I did not find anything of that kind in the tabs-section of the default theme...

Antechinus

#16
Nevermind. I took a look at the mod page for SP and found the manual edit instructions.
Do your forum button like this:

// 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'];

if(!empty($context['portalactive']))
// Show the [forum] button.
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'];


Obviously the button format is completely different to the default theme because you're using a custom theme that runs a different syntax for its buttons. The only relevant thing was the if statement and the $txt string for Simple Portal. The rest just follows the syntax for all of Dogal's other buttons.

Kosedragen

#17
Hey, thanks : D Great. *checks if it works now*

It worked perfectly. Many thanks ;3

Antechinus

Welcome. Just remember that when doing buttons for custom themes the only things you have to worry about are if statements before the button, plus the action for it (which was forum in this case) and the $txt string.

All you do is grab those from your default theme and stick them into a copy of your help button (or one of the others) if that makes sense.

Kosedragen

Hmm, I've added buttons to other themes without problems =/

Yeah, I knew that with tht-strings and the action, but what is it with if statments?

Advertisement: