Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: iceman~ on April 06, 2008, 03:25:28 PM

Title: Reorder The News & Search bar
Post by: iceman~ on April 06, 2008, 03:25:28 PM
Need help again Mates.

I am using the default theme ... Need to shift the news section below the search section ... Have searched but got some real complicated post.

Any help Guys ??
Title: Re: Reorder The News & Search bar
Post by: iceman~ on April 07, 2008, 07:11:38 PM
Sorry i dont mean to bump this topic.
Have been searching and found this topic http://www.simplemachines.org/community/index.php?topic=231876.0
Looking for something like the post mentioned .... Could someone please help.
Am i posting in the wrong section ??
Sorry to be of bother again.
Waiting .........................
Thanks.
Title: Re: Reorder The News & Search bar
Post by: Nigel on April 08, 2008, 03:23:23 PM
Hi Iceman~,

Have a look in 'index.template.php' for the following code (around line 300) and have a play:


// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<td width="90%" class="titlebg2">
<span class="smalltext"><b>', $txt['news'], '</b>: ', $context['random_news_line'], '</span>
</td>';


You could copy it to a new location but ensure the table cells are correctly nested. Or as a crude alternative the line:

   $context['random_news_line']

generates the news, so you could echo that line wherever you want it displayed. That wouldn't check if news is enabled though.

Sorry I can't give you the exact code. I'm not proficient enough to just write this stuff off the top of my head and would have to get it working myself first. Too much to do on my forum at the moment!

Hope this points you in the right direction. Make a copy of 'index.template.php' and experiment.

Nigel
Title: Re: Reorder The News & Search bar
Post by: iceman~ on April 08, 2008, 05:01:50 PM
Thanks a million Nigel .... Will experiment and get back to you.
All the best for your forum mate.
Title: Re: Reorder The News & Search bar
Post by: Nigel on April 08, 2008, 07:11:47 PM
You're welcome...
and best of luck with your too  :)

Nigel