Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-03-2009, 04:11 PM
tony adams tony adams is offline
 
Join Date: Oct 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 04-03-2009, 04:22 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 04-03-2009, 04:33 PM
tony adams tony adams is offline
 
Join Date: Oct 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks Lynne - will try - i am sure i will be back for more help - but will as you suggest 'play with it'
Reply With Quote
  #4  
Old 04-04-2009, 08:56 PM
tony adams tony adams is offline
 
Join Date: Oct 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 04-05-2009, 01:49 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 04-05-2009, 08:06 AM
tony adams tony adams is offline
 
Join Date: Oct 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 04-05-2009, 03:17 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 04-05-2009, 04:41 PM
tony adams tony adams is offline
 
Join Date: Oct 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:40 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.04033 seconds
  • Memory Usage 2,236KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete