coolegg
02-17-2012, 02:12 PM
I am redesigning one of my vB4 CMS widgets, "Recent Threads". It has variable for the preview of a thread post contents, it is called {vb:raw thread.previewtext}. I want to move it into the title attribute for the link to the thread (<a href="thread_url" title="thread_preview_text">) so that on most modern browsers the preview text will show up on hover over the link.
To work, I need to escape either double or single quotes from the text. Can I do this in a template? {vb:raw xxx} and {vb:urlencode xxx} aren't going to cut it for me. Is there an alternative that will escape my quotes?
If not, any other suggestions? I suppose I could do a plug-in(?) but that template has no hook, and I have always been perplexed how to do a plug-in when there is no template hook.
To work, I need to escape either double or single quotes from the text. Can I do this in a template? {vb:raw xxx} and {vb:urlencode xxx} aren't going to cut it for me. Is there an alternative that will escape my quotes?
If not, any other suggestions? I suppose I could do a plug-in(?) but that template has no hook, and I have always been perplexed how to do a plug-in when there is no template hook.