PDA

View Full Version : Mini Mods - [OzzModz] Force Style Per THIS_SCRIPT Values


ozzy47
08-17-2014, 10:00 PM
Another mod brought to you by,
https://vborg.vbsupport.ru/external/2015/01/1.png

This is a small mod that will allow admins to set a specific style on specified pages, using the pages THIS_SCRIPT value.

It is a simple installation, just import the product XML, product-ozzmodz_style_per_script

You can edit the options under the settings, [OzzModz] Force Style Per THIS_SCRIPT Values Settings

RisingGlow (https://vborg.vbsupport.ru/member.php?u=468276) asked for this here (https://vborg.vbsupport.ru/showthread.php?t=313759). :)

Complete Feature List
Option to disable the mod completely.
Option to set the style.
Option to set the THIS_SCRIPT values.Frequently Asked Questions.

Q. Why do I need such a thing, you ask?

A. Some admins might like to use a different style on certain pages.


-------------------------------------------------------------------------------------------

If you like this mod please hit the https://vborg.vbsupport.ru/external/2015/08/1.png button to the right ---->

Please remember to click the, https://vborg.vbsupport.ru/external/2015/08/2.png button to the right if you installed the mod ---->

What does 'Marking As Installed' do ?

* It helps you to stay on top of updates - members who have installed modifications will be notified whenever new updates are available.

* For security issues - vbulletin.org will contact all members who have installed a modification whenever a security issue is brought to their attention.

* Marking a modification as installed also helps me know how many people are using my work, giving me extra incentive to provide more features and new modifications.

I appreciate the support!
-------------------------------------------------------------------------------------------

* History (Changelog) *
-------------------------
v1.0.0 (August 17, 2014)
- Initial public release.

ozzy47
08-18-2014, 12:24 AM
Reserved.

Muhammad Rahman
08-18-2014, 01:04 AM
request ..
one style for one THIS_SCRIPT

ex :
THIS_SCRIPT Blog = style A
THIS_SCRIPT Member Profile = style B
...

ozzy47
08-18-2014, 01:08 AM
That would take a bit of doing, as It would need multiple settings.

RisingGlow
08-18-2014, 01:46 AM
Thanks! There's a few overlapping styles bugs though, can I PM you my site so you can check it out?

ozzy47
08-18-2014, 01:48 AM
What do you mean by overlapping styles bugs? This in no way should overlap any styles, it simply sets a styleid to a page.

Zachery
08-18-2014, 06:09 AM
Is there a reason you're using a loop instead of a single if condition?

ozzy47
08-18-2014, 09:13 AM
Not sure what you mean Zachary, to my understanding, the way the "do" works, is if X is true, it stops the plugin from executing.

I am by far a expert coder, so any light you shed would be appreciated.

Zachery
08-18-2014, 02:14 PM
I'm not either, it just seems like a lot of extra work/typing to do it the way you're doing it.



if ($vbulletin->options['ozzmodz_style_per_script_active'] AND in_array(THIS_SCRIPT, explode(',', $vbulletin->options['ozzmodz_style_per_script_script'])))
{
$styleid = $vbulletin->options['ozzmodz_style_per_script_style']; //Set the style on selected pages
}



I don't think you need the global there, for vBulletin either.

ozzy47
08-18-2014, 03:21 PM
Yeah I don't know about the global either, but it can't hurt.

The reason I typed it out the way I did, is it makes it a lot easier to debug if there is a problem with one of the conditions, it's something I learned from Fillip, :)

goxy63
08-25-2014, 01:04 PM
more options would be nice

installed nominated rated

thank you

ozzy47
08-25-2014, 01:32 PM
More options for what?

goxy63
08-28-2014, 11:01 PM
More options for what?

example: one style for my games , another one for my radio stations

and one more question, when I use this under my arcade games its working, but only for logged in users...for guests its not working?

thank you

ozzy47
08-29-2014, 12:46 AM
I'll look sometime next week, I am a bit tied up for a few days.

Alibass
01-12-2015, 10:11 PM
Thanks Chris, just what I was looking for. :D:up:

ozzy47
01-12-2015, 10:15 PM
Glad you like it, and thanks for marking as installed. :)