Log in

View Full Version : restricting addons and mods


tony adams
04-03-2009, 04:11 PM
when adding any mod it attaches itself to all styles - is there any way to stop that and just have them on nominated styles

i would like to keep default just as it came from vb with nothing added or modified

Lynne
04-03-2009, 04:22 PM
create a plugin using the style_fetch hook location. Something like:
if ($styleid==x)
{
$vbulletin->options['modification_on_option'] = 0;
}

Play with it - it's something like that. You need to go to your options to get the name of the setting/option to enable/disable the modification.

tony adams
04-03-2009, 04:33 PM
thanks Lynne - will try - i am sure i will be back for more help - but will as you suggest 'play with it'

tony adams
04-04-2009, 08:56 PM
hmmmm - have tried all i know - which is not much so a question or two

looking at your code - do i put the plugin name where you have the red text

i have been testing it with a plugin called 'Members who have Posted' - have tried it with that and with - Members_who_have_Posted

the mod has the product ID 'paulm_wpt_38' - have also tried that

non of those worked

the style ID is 2 - so i entered that - i am assuming the 'zero' at the end turns the named plugin off

but i am just guessing in the dark really

Lynne
04-05-2009, 01:49 AM
As I said in my post, you need to get the setting name from the settings page. Sometimes you may hover over it and see the name ($vbulletin->options ['whatever']), but sometimes you need to look in the page source and find the form name/value. It's not the product id. This is the line you would look at as an example in the page source:
<tr valign="top">
<td class="alt1"><div class="smallfont"title="$vbulletin->options['nested_quotes_enabled']">Set this to yes to enable nested quotes.</div></td>
<td class="alt1"><div id="ctrl_setting[nested_quotes_enabled]" class="smallfont" style="white-space:nowrap">
<label for="rb_1_setting[nested_quotes_enabled]_1"><input type="radio" name="setting[nested_quotes_enabled]" id="rb_1_setting[nested_quotes_enabled]_1" value="1" tabindex="1" title="name=&quot;setting[nested_quotes_enabled]&quot; value=&quot;1&quot;" checked="checked" />Yes</label>
<label for="rb_0_setting[nested_quotes_enabled]_1"><input type="radio" name="setting[nested_quotes_enabled]" id="rb_0_setting[nested_quotes_enabled]_1" value="0" tabindex="1" title="name=&quot;setting[nested_quotes_enabled]&quot; value=&quot;0&quot;" />No</label>
</div></td>
</tr>
Using that as the example, the option name is nested_quotes_enabled and you would set it to '0' to disable it. You will have to look in the page source to get this yourself though.

tony adams
04-05-2009, 08:06 AM
thanks lynne - i understand that now - you have to allow for me knowing nothing about programming - i can add things and work things out but thats all

so if its not 100% clear then i am lost

Lynne
04-05-2009, 03:17 PM
I was exactly where you were four years ago. The best thing I did was set up my test site and play with stuff there.

tony adams
04-05-2009, 04:41 PM
got a couple to work - sort of followed your advice and wandered off at a tangent but it worked - but from there on one that adds smileys to quick reply i am stuck - cannot find the name that i need

still am pleased i am getting somewhere - its all interesting