![]() |
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 |
vBulletin Options/vBulletin Options/BB Code Settings/Enabled Built-in BB Codes -> Yes/No :D Maybe it is
|
Euh, it's not that what I'm looking for, but thx
|
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. ;)
|
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 |
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. :)
|
All times are GMT. The time now is 01:28 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|