Jump to content

Counting a string up to a certain variable


Zan

Recommended Posts

Hi guys,

I should provide a bit of back story in this case to make sense of what I want to do.

 

I making the site http://www.couchwarriors.org/ and the news and blogs part of the site are simply pulling forum posts from our simplemachines forum through a very easy to use SSI.  The only problem we have with using this is that the SSI can only be set to have a character limit on where it cuts off and says '...' to keep the post length down.

 

I'd like for my forum users to be able to choose what display and what doesn't, and the simplest way I can think of to do this, is to have a function find a string variable (something redundant, perhaps '<s></s>'), count up to that string and assign character limit with that total count.

 

I apologise if this sounds easy, I don't really have much of a coding background and most of my PHP experience consists mostly of fooling around with aforementioned SSIs.  Any constructive criticism on the site is more than welcome as well.

I like when sites allow me to provide my own "tickler". So there is a small textarea when I can post up to ### number of characters, then the big textarea for my post. If no tickler is provided, then they just take the first ## number of characters from the post

I like when sites allow me to provide my own "tickler". So there is a small textarea when I can post up to ### number of characters, then the big textarea for my post. If no tickler is provided, then they just take the first ## number of characters from the post

 

I have experimented with blogging packages like wordpress that do this well, but we decided not to go with it, as most of our users skip the main site and use the forum, so the idea was to pull interested people to look there.  We actually tried to do forum integration with Wordpress and a couple of larger CMS packages, but it got messy really fast.

Joomla does this well if I remember right. They have a button that adds a "break" into the WYSIWYG editor. Long story short, if you want to keep it this way, you will have to add some sort of signifier (like you describe), but you will probably have to start using a server side language (like PHP) to parse for that signifier

Joomla does this well if I remember right. They have a button that adds a "break" into the WYSIWYG editor. Long story short, if you want to keep it this way, you will have to add some sort of signifier (like you describe), but you will probably have to start using a server side language (like PHP) to parse for that signifier

 

That is my understanding, as I described initially.  I don't mind dabbling a bit in the php side of things, this is just the first thing I've come across that I haven't been able to google.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.