• OzzModz is no longer taking registrations. All registrations are being redirected to Snog's Site
    All addons and support is available there now.

Making a Plugin - Need Help

Black Snow

New member
Hi,

This is more for ozzy47 lol. I have used your mod [OzzModz] Change Forumrow Color On Mouseover as an example to make my own mod. Can you see anything wrong with this?

Code:
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';
    }
}

I have the template and I have the settings, but it messes up my top statistics CSS on FORUMHOME when I enable the plugin althought I only want it to show on showthread template.
 
I think I forgot to add another "{" at the end of the plugin lol. The plugin is no longer messing the CSS>

Now, I have this plugin to change the background of moderated posts, does this look OK?

PHP:
$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.
 
Last edited:
Back
Top