Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 09 Nov 2010, 16:45
MikesSite MikesSite is offline
 
Join Date: Jan 2009
Thumbs up Disable certain hack in certain style?

I have some hacks on my forum that I would like to disable in certain styles. The hack is a random album picture on the forum home, but on my mobile style I would like to disable this all together.

How can I disable certain hacks on a certain style?

Thanks.
Reply With Quote
  #2  
Old 10 Nov 2010, 01:35
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
You can check the styleid to see what style is being displayed, but exactly what you'd have to do to disable the hack depends on exactly what it does. Maybe you can just put an "if" in a template

Edit: ...if it's possible to remove the hack from a template you could just modify the template in that style. (But if the mod has an on/off option then it might be better to do what Lynne suggests below).

Last edited by kh99; 10 Nov 2010 at 10:35.
Reply With Quote
  #3  
Old 10 Nov 2010, 03:20
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You can write a plugin to do this, but you need to look in the code for the modification to grab the correct variable that will turn the modification off.

hook_location: style_fetch
php code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Change x to the styleid and 'modification_on_off' to the variable name used by the modification to turn it on and off. For instance, in my Move Smilies below Textarea mod, the on/off variable is named "lynne_sb_below", so I would write it like this to not show in styleid 5


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

As I said, you will need to look in the code for the modification to get the name of the option to turn it on and off. (And some mods don't have one.)
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #4  
Old 15 Nov 2010, 16:25
MikesSite MikesSite is offline
 
Join Date: Jan 2009
Lynn,

You are the best!! Thank you so much. How could I define 2 styles within this? I tried separating style ID #'s by commas but that didn't work. For now I just made another plugin with the other style ID.



KH9,

Thank you for the advise, I really appreciate it

Last edited by MikesSite; 15 Nov 2010 at 16:40.
Reply With Quote
  #5  
Old 15 Nov 2010, 16:46
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #6  
Old 15 Nov 2010, 17:23
MikesSite MikesSite is offline
 
Join Date: Jan 2009
Thanks.

What do I do if the mod doesnt have a variable to turn the modification off?
Reply With Quote
  #7  
Old 15 Nov 2010, 19:44
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by MikesSite View Post
Thanks.

What do I do if the mod doesnt have a variable to turn the modification off?
Add one? Look for other variables to use that would turn it off?
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #8  
Old 15 Nov 2010, 19:53
MikesSite MikesSite is offline
 
Join Date: Jan 2009
Any suggestions when looking for other variables to use to turn it off?
Reply With Quote
  #9  
Old 15 Nov 2010, 21:19
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Not really. You kinda have to take a look at the code and see what variable does what.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #10  
Old 15 Nov 2010, 21:53
MikesSite MikesSite is offline
 
Join Date: Jan 2009
Okay, I will look into it more in depth tonight.

Thanks, Lynne You're the best
Reply With Quote
  #11  
Old 16 Nov 2010, 04:34
gamerzhut gamerzhut is offline
 
Join Date: Jan 2010
Thank you lynne
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 22:02.

Layout Options | Width: Wide Color: