PDA

View Full Version : Allow Somebody to Use Non-Selectable Styles


amykhar
03-20-2003, 10:00 PM
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/showthread.php?postid=374533#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

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?

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
if (!$style['userselect'] and $bbuserinfo[userid]!=6 and $bbuserinfo[userid]!=286) {

amykhar
03-28-2003, 01:52 PM
03-23-03 at 07:46 PM Alchemyst said this in Post #16 (https://vborg.vbsupport.ru/showthread.php?postid=372307#post372307)
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:

style.title as styletitle


Add After:

,style.userselect as userselect


Find:


if (!$getperms['cangetattachment']) {
$viewattachedimages=0;
}


Add After:


if (!$post[userselect]) {
$post[styletitle]="Default";
$post[styleid]=1;
}


Find:

style.title as styletitle


Add After:

,style.userselect as userselect


Find:

$post[postcount] = ++$postcount;


Add After:

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! (https://vborg.vbsupport.ru/showthread.php?s=&threadid=48953)

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