News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Looking to add text to index.template.php but can't find where!

Started by rootuid, November 07, 2012, 06:04:25 PM

Previous topic - Next topic

rootuid

I'm looking to insert some text on the main page on index.template.php. I'm looking at line 331 // The main content should go here.

// The main content should go here.
echo '
<div id="content_section"><div class="frame">
<div id="main_content_section">';

// Custom banners and shoutboxes should be placed here, before the linktree.

// Show the navigation tree.
global $user_info;

if (!empty($modSettings['show_index_message']) && !empty($modSettings['index_message_title']) && !empty($modSettings['index_message_body']) && $context['user']['is_logged'] && isset($modSettings['inactive_users']) && $user_info['posts'] < $modSettings['inactive_users']) {
echo'<br /><br />
<span class="clear upperframe"><span></span></span>
<div class="roundframe"><div class="innerframe">
<div class="cat_bar">
<h3 class="catbg">' ,parse_bbc($modSettings['index_message_title']), '</h3>
</div>
    <p>', parse_bbc($modSettings['index_message_body']), '</p>
   </div></div>
  <span class="lowerframe"><span></span></span>';
      }

// Show the navigation tree.
theme_linktree();
}



I can put text just below the Home Help Search Profile...... however I want to place the text where my nchat shout box is located just above the news/first forum. any ideas on how to get the text in there? I'm guessing index.template.php calls another file for that content? Thanks

ApplianceJunk

Quotehowever I want to place the text where my nchat shout box is located

I can't see that from here. Can you post a link to your site?

rootuid

I've attached an image. The highlighted area is where I want to put the text. Excuse the censoring in the image :)

ApplianceJunk

Being able to see your site would have helped answer other questions I had too. Such as what theme you are using and if you are using a portal.
So the text you want is going to replace the chat box then?

Kill Em All

I have no idea what I'm looking at from that images. So much editing. haha

@rootuid, you can PM ApplianceJunk a link to your website. :P


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

ApplianceJunk

Quote from: Kill Em All on November 07, 2012, 09:03:24 PM
@rootuid, you can PM ApplianceJunk a link to your website. :P

That they did, the index.template.php file would be helpful too but I don't think you can PM me a attachment.
Maybe someone else can help.

Kill Em All

Really? interesting...

rootuid, would you mind attaching your index.template.php file for your main theme?


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.


Herman's Mixen

most of the $txt strings wich apear on index.template.php are comming from /Themes/default/languages/index.{language}.php
just alter a new $txt['your-text-string'] = 'This is your text string';
where ever you wanna show  $txt['your-text-string']  in the template just add it like this

echo '<div id="">',  $txt['your-text-string'] , '</div>;
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

Advertisement: