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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 141
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 114
  • Total: 114

how to ... remove link from navigation

Started by evilfx, September 10, 2008, 02:09:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

evilfx

Link to my site: http://www.fifamanager.com.pt
SMF version: 1.1.6
TP version: 1.0.5
Theme name and version: Dzinerstudio's Outline
Mods installed: Country Flags
Related Error messages: None

Hi, i want to remove the Help button, how do i do that ?

Zetan

Hi, we have a guide on how to add buttons to the main menu. If you look through it, you'll find it added in the index.template.php file for each theme.

How to add a Home button or a new tab?




evilfx

i'm sorry i'm new to this, can you point what part should i delete to have it done, i'm new to this and i'm afraid i'll mess it all up

Zetan

#3
All themes are different.

I don't know what experience you have, but here goes.

I'm assuming you know how to edit a file on your server? Make a backup of the index.template.php file, this will be found in the theme folder of the theme you are using, if you are using the Default Core theme that comes with SMF, leave it alone and you'll need to make a copy of the Default Theme (We'll get to that later if needed).

With the backup of the index.template.php file safe, you can start to edit a copy of the file. Again, I don't know what experience you have. Open the file with Notepad in windows. Click CTRL + F to open the Find function and search for the word Help.


You should find several instances of the word Help.
There will be an Array:

   if (in_array($context['current_action'], array('gallery','search', 'arcade', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin')))
Remove: 'help',

Further down if you open the Find feature and search next:
It should look something like this:

   echo '      <ul>
                  <li' , $current_action=='help' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=help"><span>' , $txt[119] , '</span></a></li>';


I would Comment that out to start with, so it looks like

   
/*
      echo '      <ul>
                  <li' , $current_action=='help' ? ' class="chosen"' : '' , '><a href="', $scripturl, '?action=help"><span>' , $txt[119] , '</span></a></li>';
*/




Browsers ignore code inside comment tags, comment examples:

// This is a line comment and is ignored by the browser

/*
This is a paragraph comment
and is also ignored by the browser
*/


Save, and upload replacing the original index.template.php file. If you are happy it works, you can either leave it as it is.. or reopen the file and delete the section that has been commented out.


Zetan

I can't do anything from here at work regarding uploading of files, attachments. They are blocked by the company firewall. If you get really stuck, somebody may help. We would rather you made an attempt as you will likely be doing other things like this in the future.

evilfx

well... the thing is, i downloaded english utf8 translation for TP 1.0.5 and translated the portal file to portuguese, i logged into admin and chose english utf-8 but the characters are all f. up :(

i was going to remove the help button because it's a pain in the ass to translate all that and it serves no real purpose to my site's visitor's as they are more than aware on how to use SMF.

how can i use the portuguese forum translation already installed with SMF + my own translation of TP ?

evilfx

i translated this file: TPortal.english-utf8.php hoping to use this + the pre-installed forum translation of SMF

Zetan

#8
Woah.. hold up. You are asking about 2 entirely different things and I think you need to figure out what it is you want to do. Removing the button is one thing, in my mind it solves nothing with the translation.

Has the translation helped? You are aware that the Help button is part of SMF and the translation would be in SMF's translation, not TP's?

evilfx

yes, i know i'm asking about 2 different things.

can you help me with the translation files ? i think i made it clear what i'm trying to do but i'll explain it again just in case:

there's no portuguese translation file for the latest TP version. therefore i'm trying to translate the frontpage of TP myself. so i downloaded  the english utf8 file from the repository and i translated TPortal.english-utf8.php.

smf already has a portuguese translation so i'm guessing the forum translation should be secured.

what i can't figure out is how to merge these two, the TP file i translated with the portuguese translation of SMF, can you help me with this and forget the whole remove the link issue as i'll deal with it later

This website is proudly hosted on Crocweb Cloud Website Hosting.