This is more for ozzy47 lol as I have used your mod [OzzModz] Change Forumrow Color On Mouseover as an example to make my own mod. I am making this plugin to change the background of moderated posts, does this look OK?
Code:
global $vbulletin;
if (THIS_SCRIPT == 'showthread') {
if ($vbulletin->options['mod_post_background_enable'])
{
if ($vbulletin->options['storecssasfile'])
{
$template_hook['custom_css_links'] .= '<link type="text/css" rel="stylesheet" href="' . vB_Template::fetch_css_path() . 'mod_post_background_color.css' . '?d=' . $style['dateline'] . '" />';
} else {
$template_hook['custom_css_list'] .= 'mod_post_background_color.css';
}
$find = '<div class=\"postbody\">';
$replace = '<div class=\"postbody <vb:if condition="$show['moderated']">moderated</vb:if>\">';
$vbulletin->templatecache['postbit_legacy'] = str_replace($find, $replace, $vbulletin->templatecache['postbit_legacy']);
}
}
I am unsure if I escaped the quotes properly or if it is working. What's the quickest way to making a moderated post also?