I have searched..and tried a lot of things still no success so im begging for someone to help me :-\
I want to replace the and help and search buttons with gallery and downloads respectively but only the links are changing the name of the button stays the same as
Help and
Search Here is my code for both buttons :
Quote
if (in_array($context['current_action'], array('download', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'gallery', 'pm', 'forum', 'tpadmin')))
$current_action = $context['current_action'];
// Show the [gallery] button.
echo '
<td class="mainnav"><a href="', $scripturl, '?action=gallery">' , $txt[119] , '</a></td>';
// How about the [download] button?
if ($context['allow_search'])
echo '
<td class="mainnav"><a href="', $scripturl, '?action=tpmod;dl">' , $txt[182] , '</a></td>';
Please help im a noob with php :(
Thanks a lot!! in return
What theme ?
What gallery ?
Did you search your default themes gallery button to see what txt it holds ?
Downloads doesent hold a txt called downloads so remove this part ' , $txt[182] , ' abd typ Downloads there instead
Theme is IronWoW_tp90
SMF Gallery Lite
Did you check what i asked ? you have the button info for the gallery in the default core themes index.template.php file
I copied it from default theme file but this is how it looks
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fsldotaportal.co.cc%2Fbutton.jpg&hash=ad624dd012824a62fb20ee7b6c739f928a9570ed)
Code:
Quote
// the [SMF Gallery] button
if ($context['allow_smfgallery_view'])
echo ($current_action == 'gallery' || $context['browser']['is_ie4']) ? '<td class="mainnav_active_' . $first . '"> </td>' : '' , '
<td valign="top" class="mainnav_' , $current_action == 'gallery' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=gallery">' , $txt['smfgallery_menu'] , '</a>
</td>' , $current_action == 'gallery' ? '<td class="mainnav_active_' . $last . '"> </td>' : '';
Copy the calendar button from the theme and change the txt to $txt['smfgallery_menu'] and all actions to gallery
theme meaning the default theme or IronWoW theme?
btw the IronWoW theme has no calender button
Thanks got it fixed!! Yipee :D :D :D ;D ;D
This post shows a great lack of dialog and communiction. One person asks a question, the next one replies with a suggestion and the original poster keeps posting with no answer to the second person's suggestions... seems like this post was not of help for him or he decided not to post how he got it to work.
The button does not work for me after copying the calendar line and replacing all actions to "gallery", the [allow_smfgallery_view] and the $txt to "gallery_menu"
if (in_array($context['current_action'], array('gallery', 'search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum')))
......
// The [gallery]!
if ($context['allow_smfgallery_view'])
echo '<li><a href="', $scripturl, '?action=gallery">' , $txt['smfgallery_menu'] , '</a></li>';
mcardo99, the best way to get help with your issue is to start your own topic. :)
Be sure to follow the posting guidelines so that we may know how to help.
Please read the Posting Guidelines.html (http://www.tinyportal.net/index.php/topic,581)
Strange way to get free support on a site... First wave the bat on the people giving support, then hijack a topic that really old, and then ask for help !!
Good luck with that.
I will just ask you to use the search and read the replies you find, there are several of them with the correct answers. You can "waste" your own time on your question just because you came with a non wanted attitude..... and because you didnt follow our posting guide we have