View Single Post
Old 10-17-2006, 04:14 AM  
darksoul
Confirmed User
 
darksoul's Avatar
 
Join Date: Apr 2002
Location: /root/
Posts: 4,997
Quote:
Originally Posted by toonpornblog View Post
Yeah. I just don't feel like making a broken hack version where I add a checkbox to the edit mode which does a status override or something as stupid. I'd still rather use a boolean, but that's me.

For now, I've just written my own three line function to read data.inc and map it with my static links. It's good enough for a couple days.
Quote:
As another suggestion, I really hate {links} - I'd love the ability to set specific things for X entries. Having it use that one set for every link works great for middot or single line use, but it doesn't make for pretty text. Right now I have mine count through the array and place markup where appropriate (after 5 entries, break..)
Thats where smarty comes handy
You can modify rebuild_output() to skip the linktemplate and pass you the whole data.

$smart->assign("links",$links);
then you'll have the hash in the template which you can layout as you see fit.
example:

Code:
{foreach item=$link  from=$links}
<a href="$link.link">$link.title</a>
{/foreach}
Having that you can do you pretty much everything you want with the data.
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote