vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   restricting addons and mods (https://vborg.vbsupport.ru/showthread.php?t=210233)

tony adams 04-03-2009 04:11 PM

restricting addons and mods
 
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:
PHP Code:

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:
HTML Code:

<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


All times are GMT. The time now is 06:23 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01150 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete