vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Force Style for Selected Usergroups (https://vborg.vbsupport.ru/showthread.php?t=229038)

Mosh 11-27-2009 10:00 PM

Force Style for Selected Usergroups
 
1 Attachment(s)
Please click Mark as Installed if you are using this hack.

IMPORTANT NOTICE: This hack has now been discontinued - this means that while it will remain available for download and use, there will be no further updates as this thread is no longer monitored. I am also not interested in doing paid work requests to update this hack at all.


What Does This Hack Do?[hr]Silver[/hr]
It is a update of my v3.8.x hack available here, designed to work with vBulletin v4.0.x.

This hack allows you to force a style to a usergroup via usergroup permissions, so this means that you can force different usergroups to different styles (previous versions of this hack only allowed you to apply only 1 style to a set of usergroups/users).

Scenario

The setup on my forums is that I use the default style as the parent to all my other styles which makes modifying the templates easy for me, I just edit my default style and the child styles inherit the changes.

I wanted to use a child style as the standard style for visitors and members, but not have them have a choice of the default style at all, but as soon as you logged out you were presented with the default style that you did not want guests to see.

This hack rectifies that. It also allows you to let others use the forum wide default style (selected via Style & Language Settings -> Default Style in the vBulletin Options of the AdminCP) while forcing the usergroup(s) to the one style you selected.


Frequently Asked Questions

Question:
What if you need custom style permissions as well?
Answer:
This question has been asked a few times: What if you need custom style permissions so that you can control which usergroups see/select what styles? The hack I use is Andreas's Restrict Style to Usergroup hack which he released for v3.5.x. It is because of that hack that this one exists, and I have tested it on v3.5.x, v3.6.x, v3.7.x, v3.8.x and v4.0.0 Beta, and it works for all five versions and works fine with my hacks as well.

For instance on my forum I need to use both hacks, as the style I force on my guests and normal members is not selectable nor do I allow them permission to use it, and is also not my default style (all my other styles are child styles of my default one), so without Andreas's hack I would not be able to do this.

But just to let you know that Andreas's hack is unsupported and is not likely to ever be supported (unless it is a proven bug), so if you have problems with it, you are on your own.

vBulletin Version Compatibility[hr]Silver[/hr]
This hack can only be used with v4.0.0 and later versions.

For the v3.8.x version of this hack, which will also work with v3.7.x and v3.6.x - check here.

For the unsupported v3.5.x version of this hack - check here.



Install/Upgrade/Uninstall Instructions[hr]Silver[/hr]
The readme.txt instructions file is included in attached .zip file.


Version History[hr]Silver[/hr]
v4.0.002 - Friday 12th March 2010
-- Final v4.0.x release
-- Released at Wolfshead Solutions on Friday 5th March 2010
-- Fixed: Style not being enforced in vBulletin v4.0.2 and above

v4.0.001 - Saturday 28th November 2009
-- Initial v4.0.x Release
-- Changed: Plugin (removed forcing style on users - does not work at the moment)
-- Changed: Hack name (used to be called "Force Style for Selected Users or Groups")
-- Added: readme.txt file
-- Added: VersionHistory.txt file
-- Removed: 1 phrase
-- Removed: 2 AdminCP settings
-- Removed: 1 Bitfield setting


Thanks[hr]Silver[/hr]
Thanks go out to Paul M who gave me permission to use some of his install code.


Show Your Appreciation [hr]Silver[/hr]
Although not required, if you have enjoyed the benefits of this hack, and would like show your appreciation for my efforts, then please feel free to click on the Support Developer link and donate any amount you feel is appropriate.

SİMAR 11-29-2009 09:27 PM

thanks man

Dr.osamA 11-30-2009 10:06 PM

goooood

thnxxxx

i try it
________
COACH PURSES

rajubd 12-22-2009 04:11 PM

not working
Force Styles for Selected Usergroups
Enable Hack ?
Turn on the Force Styles for Selected Usergroups hack. ON
user group stle id added but not working

rajubd 12-22-2009 06:11 PM

I need this adons everything done currectly style also rebuild but still no luck

Mosh 12-22-2009 08:22 PM

I will check this out and get back to you.

bullyboy1 12-22-2009 09:11 PM

I haven't installed it yet but wondering what happens if user is in more than 1 usergroup. Is there a way to determine primary style in the case user is in 2 groups?

Mosh 12-22-2009 09:16 PM

Tested and working fine with vBulletin 4.0.0 Gold.

I will no longer be supporting Alpha, Beta & Release Candidates of vBulletin 4.0.0.

Mosh 12-22-2009 09:18 PM

Quote:

Originally Posted by bullyboy1 (Post 1935792)
I haven't installed it yet but wondering what happens if user is in more than 1 usergroup. Is there a way to determine primary style in the case user is in 2 groups?

It will use the style of the primary usergroup - as members can be members of multiple secondary usergroups, but only one primary usergroup.

Merjawy 12-23-2009 05:08 AM

Nice mod.. might come handy, Taged for now

Thanks

rajubd 12-23-2009 06:35 AM

Its handy for me because i provide vip as ads free with diff style. Did you changed it because version i download says for rc2

Mosh 12-23-2009 09:26 AM

Quote:

Originally Posted by rajubd (Post 1936119)
Its handy for me because i provide vip as ads free with diff style. Did you changed it because version i download says for rc2

Nope, it is the same version.

rajubd 12-24-2009 09:42 AM

Should i copy both file to xml folder

rajubd 12-24-2009 11:22 AM

Quote:

"Select "Rebuild > Rebuild Style Information", to rebuild the style information (this may need to be done whenever you do Step 4)."
is it
Maintenance>Update Counters>Rebuild Styles

rajubd 12-25-2009 10:18 AM

anyone test it is it working

josantos 01-01-2010 05:53 PM

Can you make a script to force the presentation from users with less to 1 post in the foruns ?

for VB 4.

Mosh 01-02-2010 12:15 AM

Hi all,

It is with regret that after over 4 years (and thousands of hours) spent providing free support for my free hacks released here, as of today I will no longer be able to provide support for free.

This is due to being unemployed for a while, being strapped for cash and unable to rely on the virtually non-existant donations from here to help to pay the bills or put food on the table for my family. I am now providing all support for my free hacks released here over at Wolfshead Solutions via an annual support subscription (for a small fee).

It does not mean I will be no longer release free hacks, I will, I just no longer be supporting them for free.

My free hacks have and always will remain free to download and use. And so will updates/bug fixes.

I will be releasing more free hacks, but if you require any support at all for those free hacks, you will need to purchase an annual support subscription over at Wolfshead Solutions to receive support.

I am really sorry I have to do this, but revenue generated by my programming gigs are now my only source of income, and I can no longer afford the luxury of providing free support here, when that time can be spent creating new commerial products, doing paid work requests or providing paid support to pay the bills.

Thank you for the understanding.

Regards,

Mosh.

captkirk 01-02-2010 04:22 PM

Tested caused many errors to other parts of my board :(

jolinary 02-17-2010 08:21 PM

Hello, very good mod, thanks you :)

tafreeh 03-03-2010 10:59 PM

i did install it properly and did set the permission.. but still no effect.

Please Advice.

Budget101 03-04-2010 03:29 PM

installed it on vb4.0.2 PL1 (on a Clean Installation- new board with NO other mods, btw) - didn't work, uninstalled.

tafreeh 03-05-2010 04:27 AM

i think this should go to graveyard. because it doesnt supported and its not working either... there is no point of having this here.

But this is much needed hack.

Mosh 03-05-2010 07:47 AM

Hi all,

This hack has now been updated this hack to v4.0.002, and is now available to download at Wolfshead Solutions for all vBulletin.org Hacks Support subscribers.

This new version fixes the bug that caused usergroup style enforcement to stop working once people upgrade their sites to vBulletin 4.0.2.

If there are no issues then I will release this update to vBulletin.org on Friday 12th March 2010.

Regards,

Mosh Shigdar, Wolfshead Solutions.

Mosh 03-12-2010 02:03 AM

Update: v4.0.002 - Friday 12th March 2010
-- Released at Wolfshead Solutions on Friday 5th March 2010
-- Fixed: Style not being enforced in vBulletin v4.0.2 and above

tafreeh 03-12-2010 03:23 AM

Thank You, Works like a charm... :)

tafreeh 03-14-2010 08:12 PM

Actually not.. If you doesnt select any theme for specific usergroup, it will redirect them to a random skin.

fatal1980 03-15-2010 03:39 PM

For me on 4.0.2 I have set it to force unregistered to use a specific skin however once they login and they select any other skin, they only get the one forced for unregistered skin. All the other usergroups have this hack disabled. However one thing that does change is the logo but the colors remain the same... any idea what could be causing this? Maybe caching?

Bobbo 05-06-2010 04:43 PM

Quote:

Originally Posted by fatal1980 (Post 2004144)
For me on 4.0.2 I have set it to force unregistered to use a specific skin however once they login and they select any other skin, they only get the one forced for unregistered skin. All the other usergroups have this hack disabled. However one thing that does change is the logo but the colors remain the same... any idea what could be causing this? Maybe caching?


I've been having similar problems. One thing I have noticed is that there appears to be some issues around the Primary usergroup versus the Secondary usergroup.

For example, if I have a user and their Primary group is the "Registered Users" group, the style associated with that Primary group is displayed. Even if this user has secondary groups assigned that might have their own forced styles. This makes me assume Primary is used in the determination.

However, if I have a user and their Primary group is the "Other Users" group, it will show the style defined by that group only if "Registered User" is not one of that users Secondary groups. If I add "Registered User" to that users Secondary group, it overrides the style.

BTW, I am using VB 4.0.3

earnest79 11-14-2010 06:16 AM

too bad this finally stopped working on 4.0.8 :(

madkeen 02-21-2011 12:06 PM

Any chance of this being done for 4.1.1?

Is payment needed?
If so I am happy to pay/donate.

lmgc 05-04-2011 08:43 AM

is there any way to force style by language ??

iDHKHCM 08-29-2011 02:52 AM

this is working fine on me for vb 4.1.5 pl1
simplw fix

just open "ms_force_style_40.xml"

find
<dependency dependencytype="vbulletin" minversion="4.0.0 Beta 1" maxversion="4.0.999" />

replace with
<dependency dependencytype="vbulletin" minversion="4.0.0 Beta 1" maxversion="4.1.6" />

works perfect for me hope it works for u guys

GuLYaRaSi 08-19-2012 11:58 AM

When will versiyon 4.2.0 ??

madness85 04-13-2013 07:44 AM

4.2 would be great anyone help?

fxdigi-cash 08-11-2013 02:25 AM

it works great without any issues on vb4.2.1

Thanks big times, mate

madness85 08-22-2013 09:34 PM

This product is not compatible with version 4.2.0 of vBulletin. :(

Marv 08-05-2015 11:27 AM

Working with 4.2.2

Sorry for diggin out such an old thread, but this one came in very handy - a usefull mod, but there is one downside. May be someone knows a workaround for that:

With this mod I´m forcing unregistered users (only) to use style 16. The problem is, when they visit the forums via tablet or smartphone the autodetection and style-assignement for mobile browser (-> assigning the mobile style) doesn´t work. I guess it would be possible to add a <vb:if> condition that excludes unregistered mobile browsers from the style enforcement. Anyone an idea how to do that and which conditionals to use for the mobile detection?

Marv 08-07-2015 11:48 AM

Mhm, guess this problem needs to be slightly bumped. I volunteer ;)

x iJailBreak x 08-13-2015 05:17 AM

I wrote a similar plugin for my own board (to stop users using beta styles mid-build). If interested, I'll post it.

killah360z 08-13-2015 05:31 AM

Quote:

Originally Posted by x iJailBreak x (Post 2552730)
I wrote a similar plugin for my own board (to stop users using beta styles mid-build). If interested, I'll post it.

im intrested :D


All times are GMT. The time now is 06:30 PM.

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.01347 seconds
  • Memory Usage 1,824KB
  • 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
  • (5)bbcode_quote_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
  • (40)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