Advertisement:

Author Topic: News  (Read 2631 times)

Offline halfflight

  • Semi-Newbie
  • *
  • Posts: 40
News
« on: May 04, 2012, 11:25:24 PM »
I have just changed themes from core back to curve. The only thing I miss about core is the News section. I like the fact that it is below the user menu and not stuck over to the right as in curve.

Is there anyway to replicate the news section from core in curve?

I hope that makes sense.

Smudger

Offline Old Fossil

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,952
  • Gender: Male
  • Fussy Old Sod
    • MKComm on Facebook
    • @mkcommforum on Twitter
Re: News
« Reply #1 on: May 04, 2012, 11:32:23 PM »
Is it the Newsfader you mean?

If so Admin > Configuration > Themes and settings > Theme >

Below Theme Options and Preferences look for Show news fader on board index:

Hope this helps.

Offline Krash.

  • Beta Tester
  • SMF Hero
  • *
  • Posts: 3,442
  • It's not a feature, it's a bug.
Re: News
« Reply #2 on: May 04, 2012, 11:35:16 PM »
I think he wants to move it.

In index.template.php find this:

Code: [Select]

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<h2>', $txt['news'], ': </h2>
<p>', $context['random_news_line'], '</p>';


Move it below this:

Code: [Select]

// Show the menu here, according to the menu sub template.
template_menu();

echo '
<br class="clear" />




Offline Old Fossil

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,952
  • Gender: Male
  • Fussy Old Sod
    • MKComm on Facebook
    • @mkcommforum on Twitter
Re: News
« Reply #3 on: May 04, 2012, 11:36:50 PM »
Jus t re read and I believe ya right  :-[

Offline halfflight

  • Semi-Newbie
  • *
  • Posts: 40
Re: News
« Reply #4 on: May 04, 2012, 11:37:53 PM »
Thanks guys I did want to move it, sorry for the confusion, I will have a crack at it now after backing up.

Smudger

Offline Old Fossil

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,952
  • Gender: Male
  • Fussy Old Sod
    • MKComm on Facebook
    • @mkcommforum on Twitter
Re: News
« Reply #5 on: May 04, 2012, 11:39:29 PM »
Can ya please mark the topic as solved once ya have sorted it.

 :)

Offline halfflight

  • Semi-Newbie
  • *
  • Posts: 40
Re: News
« Reply #6 on: May 04, 2012, 11:43:39 PM »
Will do however when I try to move it I get this error;

Template Parse Error!
There was a problem loading the /Themes/default/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
syntax error, unexpected T_STRING, expecting ',' or ';'

Offline halfflight

  • Semi-Newbie
  • *
  • Posts: 40
Re: News
« Reply #7 on: May 04, 2012, 11:53:11 PM »
I sorted it by putting the code before;

Code: [Select]


   // Show the menu here, according to the menu sub template.
   template_menu();

   echo '
      <br class="clear" />

I do however have a new problem, how do I line it up so the actual news is on the same line. Here is an example og what I have now. I changed "news" to "On This Day"

On This Day:

May 5th, 1918. Italian Ace Sergente Giovanni Nicelli is killed in action.

Can I get it to read;

On This Day: May 5th, 1918. Italian Ace Sergente Giovanni Nicelli is killed in action.

Thanks for your help,

Smudger

Offline Krash.

  • Beta Tester
  • SMF Hero
  • *
  • Posts: 3,442
  • It's not a feature, it's a bug.
Re: News
« Reply #8 on: May 04, 2012, 11:53:26 PM »

Code: [Select]

// Show the menu here, according to the menu sub template.
template_menu();

echo '
<br class="clear" />';

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<h2>', $txt['news'], ': </h2>
<p>', $context['random_news_line'], '</p>

</div></div>';

// The main content should go here.



Offline Krash.

  • Beta Tester
  • SMF Hero
  • *
  • Posts: 3,442
  • It's not a feature, it's a bug.
Re: News
« Reply #9 on: May 05, 2012, 12:04:08 AM »

Code: [Select]

<br>&nbsp&nbsp&nbsp<strong>On This Day: </strong>', $context['random_news_line'], '



Offline halfflight

  • Semi-Newbie
  • *
  • Posts: 40
Re: News
« Reply #10 on: May 05, 2012, 12:06:56 AM »
Sorry Crash do I replace;

<h2>', $txt['news'], ': </h2>
            <p>', $context['random_news_line'], '</p>

With the text you suggested.

Sorry I am an old fart trying to get his head around this.

Smudger

Offline Krash.

  • Beta Tester
  • SMF Hero
  • *
  • Posts: 3,442
  • It's not a feature, it's a bug.
Re: News
« Reply #11 on: May 05, 2012, 12:09:41 AM »

You're probably not older than me. 

Code: [Select]


// Show the menu here, according to the menu sub template.
template_menu();

echo '
<br class="clear" />';

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '

<br>&nbsp&nbsp&nbsp<strong>On This Day: </strong>', $context['random_news_line'], '


</div></div>';

// The main content should go here.




Offline Old Fossil

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,952
  • Gender: Male
  • Fussy Old Sod
    • MKComm on Facebook
    • @mkcommforum on Twitter
Re: News
« Reply #12 on: May 05, 2012, 12:11:17 AM »
Oi you two .

* Old Fossil is 39.

Offline ApplianceJunk

  • SMF Hero
  • ******
  • Posts: 3,329
    • ApplianceJunk.com
Re: News
« Reply #13 on: May 05, 2012, 12:11:53 AM »
Just trying to follow along too and trying it myself on a test forum.

What's with the &nbsp&nbsp&nbsp

Offline halfflight

  • Semi-Newbie
  • *
  • Posts: 40
Re: News
« Reply #14 on: May 05, 2012, 12:15:36 AM »
Oi you two .

* Old Fossil is 39.

Smudger is 50++ you youngster

Offline Krash.

  • Beta Tester
  • SMF Hero
  • *
  • Posts: 3,442
  • It's not a feature, it's a bug.
Re: News
« Reply #15 on: May 05, 2012, 12:17:03 AM »
Just a quickie left margin.

(Krash = 62 )


Offline halfflight

  • Semi-Newbie
  • *
  • Posts: 40
Re: News
« Reply #16 on: May 05, 2012, 12:23:34 AM »
Thanks mate that did the trick. You win the old fart stakes!!!

Smudger

Offline Krash.

  • Beta Tester
  • SMF Hero
  • *
  • Posts: 3,442
  • It's not a feature, it's a bug.
Re: News
« Reply #17 on: May 05, 2012, 12:30:45 AM »
You win the old fart stakes!!!

<sigh>


Offline halfflight

  • Semi-Newbie
  • *
  • Posts: 40
Re: News
« Reply #18 on: May 05, 2012, 01:09:24 AM »
 Sorry there is just one cosmetic problem. I placed the On This Day above the menu but I have a rather large gap now between Login and the On This Day. Is there anyway I can close the gap, I have removed avatars from the welcome area. I would also like to have a space between the On This Day and the Menu.

Here is a link to the site to help you understand my ramblings;

http://www.greatwaraviation.com/forum/index.php

Smudger
« Last Edit: May 05, 2012, 01:21:07 AM by halfflight »

Online Colin

  • On Hiatus
  • SMF Hero
  • *
  • Posts: 6,502
  • Gender: Male
  • SMF Customizer
Re: News
« Reply #19 on: May 05, 2012, 01:19:43 AM »
Just trying to follow along too and trying it myself on a test forum.

What's with the &nbsp&nbsp&nbsp
&nbsp = Space in HTML
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.