![]() |
How to remove HTML tags from thread preview (good for HTML-enabled forums especially)
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! :p Anyways here we go: open up forumdisplay.php and find PHP Code:
PHP Code:
PHP Code:
|
Nice, but why not just
PHP Code:
|
Fixed :) (You needed unhtmlspecialchars()) first.
|
Hmm ... now this code might produce invalid XHTML (thinking of quotes and ampersand).
|
*testing* :) I'll post back with a full solution when I have one, should take a few minutes only heh :D
|
PHP Code:
|
Foolproof solution attached ;)
|
Quote:
|
You could submit it as a bug and link to this thread if you want :p
|
Quote:
|
What is this about, can't get the idaea...
|
Is there any way to make this stop what is happening in the attached image...
What I was doing was using a replacement variable, {ebaylist} or {paypaldonate} for example to insert a preformatted paypal cart form or ebay listing into a post... I don't care so much about the mouseover thread preview, just the "> that shows up by the thread title... Thanks in advance! Here's a link to the forum with the post I'm talking about... http://www.cybermomcafe.com/vb/forumdisplay.php?f=3 |
Quote:
Did you use the first replacement code I suggested in my instructions? |
Yeah, I tried both of them...
If I put the code straight into the post (enabling HTML on the forum, which I am trying to avoid) it doesn't add the "> above the thread title, but if I do it as a replacement variable it does...? I turned on guest posting in that forum also... ;) I spose I could just turn on HTML LOL I was using {ebaylisting} to be replaced with: Code:
<script language="JavaScript" src="http://lapi.ebay.com/ws/eBayISAPI.dll?EKServer&ai=avm%7dz%7em.%26%28%26&bdrcolor=FFCC00&cid=0&endcolor=FF0000&endtime=y&fntcolor=000000&fs=0&hdrcolor=FFFFCC&img=y&num=25&numbid=y&popup=n&prvd=0&query=baby+clothing&siteid=0&sort=MetaEndSort&sortby=endtime&sortdir=asc&srchdesc=n&tlecolor=FFCE63&track=&width=570"></script> |
Nice work Gary_King. I've installed and it works apart from one thing. I have another hack that replaces <br> with <br />. How would I also exclude <br /> as well?
|
Quote:
|
That particular hack is pretty important to me and needs to stay. I want to use this hack as well, so if there is a way to specifically exclude <br /> that would be great, otherwise I'll have to remove this one- which I don't really want to do.
|
All times are GMT. The time now is 03:44 PM. |
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:
|