GSimpson
06-07-2009, 06:53 AM
Hi there,
I've been working on a cms/blog system and need some help with a feature I would like to imply. Okay, so on the homepage I have the last 5 articles displaying one after the other. Currently, they trim the string down to 1500 characters so that the homepage doesn't display the entire artcle as some are quite lengthy.
My input is a textarea supporting a custom bbcode that parses to html for insertion to the database then displays on the homepage as that html. I would like to create a tag that lets me stop displaying from that point onwards, so in other words, only displays up until the first occourence of [trim] and doesn't display the tag "[trim]" itself.
I thought strstr() might help but it displays from [trim] onwards.
Thanks in advance.
I've been working on a cms/blog system and need some help with a feature I would like to imply. Okay, so on the homepage I have the last 5 articles displaying one after the other. Currently, they trim the string down to 1500 characters so that the homepage doesn't display the entire artcle as some are quite lengthy.
My input is a textarea supporting a custom bbcode that parses to html for insertion to the database then displays on the homepage as that html. I would like to create a tag that lets me stop displaying from that point onwards, so in other words, only displays up until the first occourence of [trim] and doesn't display the tag "[trim]" itself.
I thought strstr() might help but it displays from [trim] onwards.
Thanks in advance.