Back to vBulletin 3.0 Add-Ons

How to remove HTML tags from thread preview (good for HTML-enabled forums especially)
Mod Version: 1.00, by Gary King

This modification is in the archives.
vB Version: 3.0.0 Rating: (0 vote - 0 average) Installs: 7
Released: 10 Feb 2004 Last Update: Never Downloads: 0
Not Supported  

Don't you just hate it when thread previews show HTMl tags even though browsers don't interprete those tags in popup menus? Well then this hack is just right for you!

This hack will remove all HTML tags such as <b>, <i>, <strong> and even closing tags like </b>, </i>, and </strong> so that they don't show up in the thread preview. It's genius they say!

Anyways here we go:

open up forumdisplay.php and find
PHP Code:
                eval('$threadbit .= "' fetch_template('threadbit') . '";'); 
Above, add

PHP Code:
                $thread[preview] = eregi_replace('(")','',strip_tags(unhtmlspecialchars($thread[preview]))); // solution #2 
If the above code doesn't show some thread previews properly, try the one below:
PHP Code:

                $thread
[preview] = eregi_replace('(&[a-z]+;|&lt;[a-zA-Z]+&gt;[a-zA-Z]+&lt;/[a-zA-Z]+&gt;)','',strip_tags($thread[preview])); 
All done

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024