Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

December 05, 2022, 06:38:54 AM

Login with username, password and session length
Members
  • Total Members: 3853
  • Latest: tty456
Stats
  • Total Posts: 193627
  • Total Topics: 21108
  • Online today: 75
  • Online ever: 3540
  • (September 02, 2022, 06:38:54 PM)
Users Online
Users: 0
Guests: 64
Total: 64

Author Topic: Forum news in a block  (Read 8511 times)

0 Members and 1 Guest are viewing this topic.

YahMan

  • Guest
Forum news in a block
« on: January 08, 2006, 10:20:52 AM »
Is that possible? I don't like the SMF news function simply putting it at the top of the centerblocks. Depending on your theme off course. I was kinda hoping for an SSI function, but since the news function is SMF implemented, I guess that isn't possible. So, any ideas anyone?

~YM

Rasyr

  • Guest
Re: Forum news in a block
« Reply #1 on: January 08, 2006, 10:44:06 AM »
If you go into TPAdmin, and then go to Edit Blocks, you will see a column called on/off/move.

scroll down to the Center Blocks section and you will see the green button, red button, 2 arrows and a little globe. The arrows and globe allow you to move a given block from one section to another.

Thus, clicking on the little arrow that points to the right will move it to the right side blocks. You would then have to set the value in the Pos column to determine where in right side blocks you want it located.

Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: Forum news in a block
« Reply #2 on: January 08, 2006, 10:48:10 AM »
SMF news is not part of the TP blocks Rasyr. It is part of the theme for SMF. If you wanted to put it in a block you could always copy the code from the index.template.php file and put it in a block for TP. If you need help with this let me know and I will post the code for you.

YahMan

  • Guest
Re: Forum news in a block
« Reply #3 on: January 08, 2006, 10:53:40 AM »
If you need help with this let me know and I will post the code for you.

That would be awesome, IchBin!

~YM


Rasyr

  • Guest
Re: Forum news in a block
« Reply #4 on: January 08, 2006, 12:00:48 PM »
Hmm... Maybe I misunderstod.  ???

I thought he was referring to a standard news block. As in something that can be setup via the Edit Blocks screen. Oopsie... ;D

YahMan - are you referring to something within the blocks? Or the user/news bloc that all appear at the top together in the SMF (1.1 RC1 default/RC2 Babylon) theme?

If you want to get rid of that news block up there, in index.template.php, find the following code:

Code: [Select]

// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<div class="headertitles" style="width: 260px;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
<div class="headerbodies" style="width: 260px; position: relative; background-image: url(', $settings['images_url'], '/box_bg.gif); margin-bottom: 8px;">
<img src="', $settings['images_url'], '/', $context['user']['language'], '/newsbox.gif" style="position: absolute; left: -1px; top: -16px;" alt="" />
<div style="height: 50px; overflow: auto; padding: 5px;" class="smalltext">', $context['random_news_line'], '</div>
</div>';


And place a "/*" on the line before it and a "*/" on the line after it.

To set up the SMF news items in a block, just use a newsbox when you add a block (this pulls from the SMF news item list - at least that is what I think it is doing).



Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: Forum news in a block
« Reply #5 on: January 08, 2006, 12:07:32 PM »
Ah yes, I forgot there is a news block. Thanks Rasyr!