vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Mini Mods - [OzzModz] Force Style Per THIS_SCRIPT Values (https://vborg.vbsupport.ru/showthread.php?t=313767)

ozzy47 08-17-2014 10:00 PM

[OzzModz] Force Style Per THIS_SCRIPT Values
 
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 asked for this here. :)

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.


PHP Code:

if ($vbulletin->options['ozzmodz_style_per_script_active'] AND in_array(THIS_SCRIPTexplode(','$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, :)


All times are GMT. The time now is 12:51 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.01740 seconds
  • Memory Usage 1,736KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete