The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to close all bbcode tags
Hey,
I want to show only a peace of a post on a page. So I cut the string to x chars, but I'm afraid If I'm going to parse it, and there are tags, where to closing part has been cut off, they'll mess up my layout. So, is there a function in vb that closes all open bb tags that have not yet been closed? grz, seba |
#2
|
|||
|
|||
vBulletin Options/vBulletin Options/BB Code Settings/Enabled Built-in BB Codes -> Yes/No Maybe it is
|
#3
|
|||
|
|||
Euh, it's not that what I'm looking for, but thx
|
#4
|
|||
|
|||
Perhaps check out how thread preview is done in the process_thread_array function. Otherwise, you'll probably need to write a regexp to right trim off broken tags. Trying to close a random number of random tags, while accounting for any that get cut, isn't an easy problem, but you probably already know that.
|
#5
|
|||
|
|||
nah, that function doesn't do that, (at least, with a first look at it).
I think I'm just going to strip the bbcode out of it and then cut it off. Thx |
#6
|
|||
|
|||
Right, the process_thread_array function doesn't close tags, but it's an alternative approach. Done regexp to right trim off broken tags, easier than trying to close a random number of random tags, broken and all, but the thread preview approach might, might not, get you closer to what you want.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|