Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: How to better parse the center() news  (Read 1750 times)

amber025

  • Guest
How to better parse the center() news
« on: December 08, 2006, 12:26:37 pm »

hi,

i use a template class and have an index.tpl and index.php file. I am trying to assign center() to {CENTER} to look  like
{CENTER}
on my index.tpl file, but the problem is that center() immediately begins to echo html as soon as its called !!! Which means, the news stuff starts to show up earlier than it should on my index page :(  Is there like some way I can supress or contain center()? Maybe I can make a separate php file with just center(); and somehow frame it into where {CENTER} would be?

Any help is appreciated, thank you !!

(sNews 1.5)
Logged

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
How to better parse the center() news
« Reply #1 on: January 02, 2007, 09:24:42 am »

In its current state, sNews doesn't utilize third-party templating system like Smarty or similar tpl engines. However, you could(?) recode complete snews.php file (basically that means replacing all the echoes with a new set of variables and returns) and make some modifications to your tpl class... or extract center() as you suggested...
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version