I am not sure if this is the right place. If I posted in the wrong place, I am sorry ahead of time.
I have a modified theme, so it realy does not belong in any real theme board, since I have been messing around and creating my own with snippets of other codes from themes. (I am still new at PhP, so the hands on is the best way for me to learn)
Anyways, here is what I would like to do. I would like to remove the help button up top on my main menu bar. However, each attempt I make I end up with errors and that nice white and pink screen.
I have tried to make sure I have all closing tags where they need to go, whether I want it moved or just try to get rid of it. Best thing, if possible is if I were able to move the 'Help' to the right side of the 'Profile'.
I do have a test site up here: http://andronnai.com/forums
The buttons are gif format, as you can see. So I am at a loss here. Perhaps I just need more coffee, or maybe some sleep?.. Na, more coffee I think!
Below the script is a picture of the forum navagation bar. Thank you in advance
Code:
Quote// 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="Home Site"' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/news.gif" alt="Guild News"' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=forum">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/forum.gif" alt="Forum" style="margin: 2px 0;" border="0" />' : 'Forum'), '</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] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</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'] . '" style="margin: 2px 0;" border="0" />' : $txt['calendar24']), '</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] . '" style="margin: 2px 0;" border="0" />' : $txt[182]), '</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] . '" style="margin: 2px 0;" border="0" />' : $txt[467]), '</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] . '" style="margin: 2px 0;" border="0" />' : $txt[2]), '</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] . '" style="margin: 2px 0;" 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] . '" style="margin: 2px 0;" 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] . '" style="margin: 2px 0;" border="0" />' : $txt[108]), '</a> ';
echo '';
if($context['user']['unread_messages']>0)
echo ''.$bullet.'<a href="index.php?action=pm">' , ' <img src="' . $settings['images_url'] . '/english/newpm.gif" border="0" height="22"></a>';
}
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fandronnai.com%2Fforum%2Fgallery%2F1_09_05_07_10_20_03.bmp&hash=1dc60ae7ecc7c9ed477a7ee2f528442ba78d46fc)
Remove this code:
<a href="', $scripturl, '?action=help" >', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '[/url]', $context['menu_separator'];
Saddly, that did not work.
I tried that befor I posted a few times, but I did do it again. The error im getting is the nice white page in responce. I even closed using the
; and/if the
/ tag.
QuoteTemplate Parse Error!
There was a problem loading the /Themes/Drow_Light/index.template.php template
Error line reported:
Quote496: if ($context['allow_calendar'])
497: echo '
hehe.. nothing l ike a crash course in this eh? And thank you for the quick responce. :)
Peace,
Sarrene'
Comment out this part of the code (entire Search button )
// 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] . '" style="margin: 2px 0;" border="0" />' : $txt[182]), '[/url]', $context['menu_separator'];So it looks like this
Quote/* // 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] . '" style="margin: 2px 0;" border="0" />' : $txt[182]), '[/url]', $context['menu_separator']; */
:'( It does not like me I fear. And that did not work either. I tried a few different ways.
I know the problem.. whom ever wrote the php, must have been 'sydlexic' like me and mixed up some of the script tags. .. okay, Im just joking sorry.. bad sence of humor.
The error I am getting this time is:
QuoteThere was a problem loading the /Themes/Drow_Light/index.template.php template
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in .../Themes/Drow_Light/index.template.php on line 496
496: if ($context['allow_calendar'])
You are so going to wish you could strangle me now, im sure.
Once more, thank you!!
Peace,
Sarrene'
I just looked at the code you have pasted, seems like you first pasted it in here with out the code tags, so now it have several [/url] tags that does not belong there.
Can you post your index.teplate.php for us here to see if we can sort it out for you.
Okay, not a problem at all.. And by the way.. i still say thank you for all the hard work.. though im sure you are still going to want to strangle me. I feel like a kid trying to learn calc for the first time. :o
Edit: I also have a test account if you are curious to see how badly i have done. I am not sure if that is something you would want to do, or not. I just know that I have seen others post up or ask for simular.
Peace,
Sarrene'
If i want to strangle something i strangle my pillow as soon as i get home from here :2funny:
I will take a look at the file and post it back if i can find the error in it.
Try this one now.
Well, thank you so very much. It means a lot, and is greatly appreciated. This is the best site I have seen (though in compitition with w3schools and dynamic drive ;) ). Sadly, I had gone to SMF, and they had just redirected me to a few sites and guides. Though I have read them.. some things seem to excape me at times. And usualy, it is just something simple as a tag missing or misplaced.
Once more, thank you. There is not a rush at all, so no worries if you are unable to get to it. What ever, when ever you are able to is most appreciated.I have most of the other features complete on both my live and test. I was just hoping to reorder the buttons and get them a little more organized.
On a side, note, I did learn how to recover and restore my database earler today. :) Entire forum and member groups went bye bye on me. Now that one was fun. I was able to figure my way throuh there.. though I am not exactly sure how. I think it was one of those divine blessings just befor I went to sleep (finaly). Most of the information I needed I was able to find here from you guys. The rest was trial and error. (obviously since I crashed my own forum) :P
Peace,
Sarrene'
Okay, let us see how that works out :)......
Okay, that one worked!
Now, to see what was done differently and where my mistake was at. This should make it easer to move some of the others around as well, I presume? Once more.. I know, I said this already..
THANK YOU
I wish there was some way I could help out, but alas, im only nearing 3 weeks into learning php. I do grahics though :laugh:
Peace,
Sarrene'
Edit:
Okay, I see a few differnces so far just glancing at it.
From- <a href="', $scripturl, '?action=forum">', ($settings['use_image_buttons']
To- <a href="', $scripturl, '">', ($settings['use_image_buttons']
Some spacing differences and then the removial of the
?action=forum. Man, I have a lot to learn.
Actually all i did was that i removed the "help" button code (the one i marked out to you) and added a ; to the end of the Forum button code ;)
Hmm.. okay odd. I am looking at them (I love Notepad++ by the way) and see a few differences. I wonder what I did wrong then in the last attempt. You must just have the magic touch.
Ah well, I am slowly learning this thing.. man, html.. pascal for that fact, seemed a lot easer to me. Perhaps im just getting too old eh> ^-^
Peace,
Sarrene'