Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Allow Somebody to Use Non-Selectable Styles Details »»
Allow Somebody to Use Non-Selectable Styles
Version: 1.00, by amykhar amykhar is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 03-20-2003 Last Update: Never Installs: 11
 
No support by the author.

I put this together very quickly to allow me to use non-selectable styles so that I can develop and test styles without members using something that is not ready yet.


It's a quick hack that I have put together in two versions. The first allows one specific user to use all styles. The second allows all admins to use all styles.

If you know PHP, it is trivial for you to add more users or more usergroups to the list.

No screenshot is available because it would have no meaning. Basially, what you will see after installation is that non-selectable styles now appear in your usercp dropdown if you are the designated member.

Using the styles in postbit hack and don't want your users to see that you are using an unavailable style? This addon will help:
https://vborg.vbsupport.ru/showthrea...533#post374533

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 03-22-2003, 01:05 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You want if (($bbuserinfo[userid]==6) or ($bbuserinfo==286)) {
Reply With Quote
  #13  
Old 03-22-2003, 05:20 PM
Attrox's Avatar
Attrox Attrox is offline
 
Join Date: Jan 2002
Location: St.Paul, MN
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack...I installed it, seems to be working smoothly. Nice work.
Reply With Quote
  #14  
Old 03-22-2003, 09:26 PM
Cyricx Cyricx is offline
 
Join Date: Aug 2002
Location: Missouri
Posts: 1,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome! Great Hack!
Reply With Quote
  #15  
Old 03-23-2003, 05:48 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Idea

Satan
Reply With Quote
  #16  
Old 03-23-2003, 06:05 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you all

Amy
Reply With Quote
  #17  
Old 03-23-2003, 10:46 PM
Alchemyst's Avatar
Alchemyst Alchemyst is offline
 
Join Date: Aug 2002
Location: Ireland
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way too intergrate this with the Styles in Postbit hack. So that mods who have a scheme that is non-selectable it shows up as the default?
Reply With Quote
  #18  
Old 03-28-2003, 03:22 AM
Cyricx Cyricx is offline
 
Join Date: Aug 2002
Location: Missouri
Posts: 1,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Forgot to ask you about the Global.php too

How do I need to alter this line to allow for user id 6 and 286 in the global.php?

Code:
if (!$style['userselect'] and $bbuserinfo[userid]!=X) {
Thank you greatly!!

This is an AWESOME help to creating styles.
Reply With Quote
  #19  
Old 03-28-2003, 01:34 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
if (!$style['userselect'] and $bbuserinfo[userid]!=6 and $bbuserinfo[userid]!=286) {
Reply With Quote
  #20  
Old 03-28-2003, 01:52 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
03-23-03 at 07:46 PM Alchemyst said this in Post #16
Is there a way too intergrate this with the Styles in Postbit hack. So that mods who have a scheme that is non-selectable it shows up as the default?
OK. I have this working on my board, but I think part of it is working because I have the postcounter hack installed (the one by Bira and Freddie)

Here's the code you need to modify: (Please understand queries before you try to do this. I am writing the instructions this way to enable you to use it with other hacks.)
Find:
Code:
style.title as styletitle
Add After:
Code:
,style.userselect as userselect
Find:
Code:
	if (!$getperms['cangetattachment']) {
		$viewattachedimages=0;
	}
Add After:
Code:
        if (!$post[userselect]) {
             $post[styletitle]="Default";
             $post[styleid]=1;
        }
Find:
Code:
style.title as styletitle
Add After:
Code:
,style.userselect as userselect
Find:
Code:
 $post[postcount] = ++$postcount;
Add After:
Code:
  if (!$post[userselect]) {
      $post[styletitle]="Default";
      $post[styleid]=1;
  }
I am serious though. If you don't understand what the queries mean, then don't try this hack. Email me and send me your showthread.php and I will do it for you instead.

Amy
Reply With Quote
  #21  
Old 03-29-2003, 02:35 AM
Cyricx Cyricx is offline
 
Join Date: Aug 2002
Location: Missouri
Posts: 1,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

w00t!

Now I can get the wife to browse over the new ones too.

Thanks!
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 08:41 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05444 seconds
  • Memory Usage 2,309KB
  • Queries Executed 27 (?)
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
  • (10)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete