Variable News Blurb Using BBCodes

Topic author
Active Member
Active Member
Posts: 1
Joined: 19. September 2010 08:15

Variable News Blurb Using BBCodes

Post by Epochalepse »

I'm looking at Board3/phpbb3 as a possible replacement at my site. Consequently, I'm also looking at the portal for ease of modification.

One immediate shortcoming I found was that including pics or vids which have long URLs in the news summary/teaser/blurb is problematic when the embedding code exceeds the Board 3 news teaser character limit.

A simple solution is presented here which does not impact the character limit method.


In the ACP, create a dummy BBCode with no replacement parameters in the form:

Code: Select all


Code: Select all

In portal/includes/functions.php

if (($text_length != 0) && (strlen($len_check) > $text_length))


		if ( $blurbpos = stripos  ( $len_check, '[blurb' )) {
			$row['post_text'] = substr  ( $len_check, 0, $blurbpos );
			$posts[$i]['striped'] = true;

		if (($text_length != 0) && (strlen($len_check) > $text_length) && ($posts[$i]['striped'] != true) )
This will override the character count method (if the 'blurb' BBCode is present) and allow the news writer to choose where the summary/teaser/blurb ends by placing in the news post...

Code: Select all

So you could do something like this:

Code: Select all

Rammstein singer Till Lindemann is reported to be in intensive care after attempts to remove a high-intensity LED from his mouth ran into complications.

Doctors attending to his case said blah blah blah....
I've not thoroughly tested this. But it seems to work. I'm also new to Board 3 so I may have overlooked something.

Return to “Modification Requests”