TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,989
  • Total Topics: 21,322
  • Online today: 897
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 337
  • Total: 337

Php Coding Help

Started by alan s, March 22, 2006, 04:20:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alan s

Hi, I Converted A Theme but i have a bit of a problem, i followed Ichbins Steps To Add The Forum Button But Now It Looks Different To The Other Links

Heres A Screen Of It




i explained what i wanted in the pic, the image is in the correct directory i checked and this is the code

// 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="/images/mensep.gif' . $settings['images_url'] . '/images/mensep.gif' . $context['user']['language'] . '/images/mensep.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'];
       echo '        <a href="', $scripturl, '?action=forum">', ($settings['use_image_buttons'] ? '<img src="/images/mensep.gif' . $settings['images_url'] . '/images/mensep.gif' . $context['user']['language'] . '/images/mensep.gif" alt="Forum" style="margin: 2px 0;" border="0" />' : 'Forum '), '</a>', $context['menu_separator'];
       echo '        <a href="', $scripturl, '?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="/images/mensep.gif' . $settings['images_url'] . '/images/mensep.gif' . $context['user']['language'] . '/images/mensep.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];



// How about the [search|] button?

if ($context['allow_search'])

echo '

<a href="', $scripturl, '?action=search">',$txt[182],'</a><img src="' . $settings['images_url'] . '/mensep.gif" border="0" />';



// Is the user allowed to administrate at all? ([admin|])

if ($context['allow_admin'])

echo '

<a href="', $scripturl, '?action=admin">',$txt[2],'</a><img src="' . $settings['images_url'] . '/mensep.gif" border="0" />';



// Edit Profile... [profile|]

if ($context['allow_edit_profile'])

echo '

<a href="', $scripturl, '?action=profile">',$txt[79],'</a><img src="' . $settings['images_url'] . '/mensep.gif" border="0" />';



// The [calendar|]!

if ($context['allow_calendar'])

echo '

<a href="', $scripturl, '?action=calendar">',$txt['calendar24'],'</a><img src="' . $settings['images_url'] . '/mensep.gif" border="0" />';



// If the user is a guest, show [login|] and [register|] buttons.

if ($context['user']['is_guest'])

{

echo '

<a href="', $scripturl, '?action=login">',$txt[34],'</a><img src="' . $settings['images_url'] . '/mensep.gif" border="0" />

<a href="', $scripturl, '?action=register">',$txt[97],'</a>';

}

// Otherwise, they might want to [logout]...

else

echo '

<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', $txt[108], '</a>';

echo '

</div>';

}


and this is the section that i need edited

// Show the [home|] and [|help|] buttons.
       echo '
                     <a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="/images/mensep.gif' . $settings['images_url'] . '/images/mensep.gif' . $context['user']['language'] . '/images/mensep.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'];
       echo '        <a href="', $scripturl, '?action=forum">', ($settings['use_image_buttons'] ? '<img src="/images/mensep.gif' . $settings['images_url'] . '/images/mensep.gif' . $context['user']['language'] . '/images/mensep.gif" alt="Forum" style="margin: 2px 0;" border="0" />' : 'Forum '), '</a>', $context['menu_separator'];
       echo '        <a href="', $scripturl, '?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="/images/mensep.gif' . $settings['images_url'] . '/images/mensep.gif' . $context['user']['language'] . '/images/mensep.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];


Thanks For Any Help

           - Alan S

IchBin

Change this:
       echo '
                     <a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="/images/mensep.gif' . $settings['images_url'] . '/images/mensep.gif' . $context['user']['language'] . '/images/mensep.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'];
       echo '        <a href="', $scripturl, '?action=forum">', ($settings['use_image_buttons'] ? '<img src="/images/mensep.gif' . $settings['images_url'] . '/images/mensep.gif' . $context['user']['language'] . '/images/mensep.gif" alt="Forum" style="margin: 2px 0;" border="0" />' : 'Forum '), '</a>', $context['menu_separator'];
       echo '        <a href="', $scripturl, '?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="/images/mensep.gif' . $settings['images_url'] . '/images/mensep.gif' . $context['user']['language'] . '/images/mensep.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];


To this:

echo '  <a href="', $scripturl, '">' , $txt[103], '</a><img src="' . $settings['images_url'] . '/mensep.gif" alt="' . $txt[103] . '" />';
echo '  <a href="', $scripturl, '?action=forum">Forum</a><img src="'.$settings['images_url'] . '/mensep.gif" alt="Forum" />';
echo ' <a href="', $scripturl, '?action=help" target="_blank">', $txt[119], '</a><img src="' . $settings['images_url'] . '/mensep.gif" alt="' . $txt[119] . '"/>';

alan s


This website is proudly hosted on Crocweb Cloud Website Hosting.