1 deljr Nov 28, 2009 20:39
3 yabba Nov 29, 2009 09:13
If it was me I'd probably play with the bbcode settings for comments :
search :
~[vulgar](.+?)[/vulgar]~is
replace :
<div class="vulgar"><span class="disclaimer">Click here to read this comment</span><div class="vulgar_content">$1</div></div>
css :
.vulgar .vulgar_content{
display:none;
}
js :
jQuery( '.vulgar .disclaimer').each(function(){
jQuery( this ).click( function(){
jQuery( this ).parent().parent().find( '.vulgar_content').show();
jQuery( this ).remove();
});
});
Free-typed, so expect errors
¥
4 deljr Nov 29, 2009 09:38
Alright, the last issues are resolved. I redefined
$A_coreattrs = 'class title id style onmouseover onmouseout onclick'
in \inc\xhtml_validator\_xhtml_dtd.inc.php
For some reason setting allow_javascript and comments_allow_css_tweaks to true, which should have done essentially the same thing, didn't work.
Also instead of using href for the javascript I used onclick.
5 yabba Nov 29, 2009 10:16
Remember to redo your hacks on every upgrade ;)
¥
Okay, I'm making progress. To enable javascript as part of href, I had to add 'javascript' to the $schemes array in inc/_core/_url.funcs.php.