TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,021
  • Total Topics: 21,332
  • Online today: 744
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 499
  • Total: 499

BBCode incomplete

Started by Hobox, July 29, 2007, 10:43:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hobox

Was adviced to put this here:
Quote
It seems like TP doesn't support the BB Code ABBR. When an entry is displayed on the front page it shows the whole
[abbr=Private Message]PM[/abbr]

instead of PM.

The same is true for acronym as well. There are probably a few more unsupported BBCs

bloc

What version of SMF is this on?

Hobox


feline

Quote from: Hobox on July 29, 2007, 10:43:33 PM
Was adviced to put this here:
Quote
It seems like TP doesn't support the BB Code ABBR. When an entry is displayed on the front page it shows the whole
[abbr=Private Message]PM[/abbr]

instead of PM.

The same is true for acronym as well. There are probably a few more unsupported BBCs

That is a little bit struggle in SMF  ::)
You must modify the Subs.php as follow:

array(
'tag' => 'abbr',
'type' => 'unparsed_content',
'content' => '<abbr title="$1">$1</abbr>',
'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
),
array(
'tag' => 'abbr',
'type' => 'unparsed_equals',
'before' => '<abbr title="$1">',
'after' => '</abbr>',
'quoted' => 'optional',
'disabled_after' => ' ($1)',
),

So the input:
[abbr=Private Message]PM[/abbr]
[abbr]Any Text[/abbr]

show correct.

You can use same schema for acronym and so one...

Fel

Hobox

Do i really have to change subs.php?

SMF supports it already, it is just that TP doesn't when showing an entry on the first page.

feline

Normaly, TP use the function "doubbc" from subs.php.
It's this only on shorten overview?

Fel

Hobox

Quote from: feline on August 03, 2007, 07:12:19 PM
Normaly, TP use the function "doubbc" from subs.php.
It's this only on shorten overview?

Fel

I think so, is there a way to display a forum post on the front page without it being in a shortened version?

bloc

She means that the shortened version might cut off the text before it can show the end tag of the bbc tag. TP use exactly the same BBC code function as SMF so thats not the problem.

Try increase the amount of letters to show for the "intro", and see if the tag starts showing then.

Hobox

#8
No it shows the entire code.

In the forum it looks like this:
"...bla bla bla send me a PM if you bla bla..."

And on the front page the exact same message is displayed like this
"...bla bla bla send me a [abbr=Private Message]PM[/abbr] if you bla bla..."

But BBC like bold and italic works fine

Try it for yourselves and see

bloc

hm, it might be something the mod does to the SMF that TP doesn't pick up.

This website is proudly hosted on Crocweb Cloud Website Hosting.