vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Allow Somebody to Use Non-Selectable Styles (https://vborg.vbsupport.ru/showthread.php?t=50574)

amykhar 03-20-2003 10:00 PM

Allow Somebody to Use Non-Selectable Styles
 
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

Overgrow 03-21-2003 02:25 PM

Yea that is a handy problem you are fixing there :) Makes no sense that as an admin, you can't view a style to develop it.

Dean C 03-21-2003 02:28 PM

Interesting hack - very useful though amy :)

- miSt

filburt1 03-21-2003 02:32 PM

Non-selectable selectable styles :)

Davey 03-21-2003 02:56 PM

Nice idea!
I will install it (licking install and wiping it clean:p) now, then actually install it later to test it.
Thanks.

Dave.

amykhar 03-21-2003 03:01 PM

I must confess that I put this together to help prepare for my April Fool's joke. A hack created with evil intentions :D

Amy

afterlab 03-21-2003 03:02 PM

heh.. I was about to release something like this. I made one of these custom for myself awhile back. Good job though. Yours looks more cleaner coded than mine, so I may use yours instead. :p

Dan 03-21-2003 03:10 PM

Exactly what I needed now my test account can use this instead of me having private forums for style testing......

/me will use this and install this when he gets home.

~Dan

/me clicks install

Davey 03-22-2003 03:12 AM

One thing troubles me, it would be nice if you could have an option so that the admin can put the userids into the config.php file.
This way, you can easily add a list of users who can 'beta test' your style.
Just need someone to implement it.
Oh come on! How hard can it be!? lol.

Dave.

Cyricx 03-22-2003 06:35 AM

Hmm is there a way for me to let two specific users do this?

I tried this

PHP Code:

if ($bbuserinfo[userid]==6,286) { 

but that didn't work =/

6 and 286 being the two userid's I would like to enable this on.

Thanks and great hack! :)

amykhar 03-22-2003 01:05 PM

You want if (($bbuserinfo[userid]==6) or ($bbuserinfo==286)) {

Attrox 03-22-2003 05:20 PM

Great hack...I installed it, seems to be working smoothly. Nice work. :)

Cyricx 03-22-2003 09:26 PM

Awesome! Great Hack! :)

Chris M 03-23-2003 05:48 PM

Great Idea:)

Satan

amykhar 03-23-2003 06:05 PM

Thank you all :)

Amy

Alchemyst 03-23-2003 10:46 PM

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?

Cyricx 03-28-2003 03:22 AM

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. :)

amykhar 03-28-2003 01:34 PM

Code:

if (!$style['userselect'] and $bbuserinfo[userid]!=6 and $bbuserinfo[userid]!=286) {

amykhar 03-28-2003 01:52 PM

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

Cyricx 03-29-2003 02:35 AM

w00t! :)

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

Thanks!

amykhar 03-29-2003 03:14 AM

good :)

Amy

Smoothie 03-29-2003 08:25 PM

Not sure if you can help, but, I am using filberts style dropdown hack, which uses the phpinclude template instead of firefly's change style hack. Will the styles that are not-selectable still appear in the drop down box on forumhome?

amykhar 03-29-2003 11:18 PM

No, they will not show there unless you code them to do so for the specific user or group.

Alchemist 01-23-2005 09:19 PM

Hey Amy, :)

Can you integrate this hack with your other hack Style for Premium Members!

I have Style for Premium Members hack, yet I need Mods/Supermods/Admins to be able to see hidden schemes fully so that they're easier to customize. :)

amykhar 01-23-2005 09:41 PM

I no longer have a copy of vbulletin 2 and no longer code for older versions. Sorry.

Destroyed Soul 04-26-2005 09:17 PM

Parse error: parse error, unexpected $ in /home/piper/public_html/member.php on line 3033

Help!

Marco van Herwaarden 04-27-2005 03:43 AM

What editor did you use to make the edit?

Destroyed Soul 05-03-2005 05:02 PM

I used CuteFTP Pro.....


All times are GMT. The time now is 12:26 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.02238 seconds
  • Memory Usage 1,767KB
  • 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
  • (10)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (28)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete