View Full Version : Postbit / Postbit Legacy
White_Snake
09-02-2005, 10:37 PM
well my question is this one
i want to have a skin where users can choose the default postbit or postbit legacy, i suppose that i have to copy and paste my skin, but how can i make the copied skin runs with the legacy and my normal skin with default postbit?
Tony G
09-03-2005, 01:07 AM
I don't understand the second part, you want one skin to be using postbit legacy and the default one with the normal postbit without user option, or do you want the user option?
White_Snake
09-03-2005, 01:54 AM
well, what i frist have in mind is that the choose of legacy or normal postbit can be by skin ex: you pick up "default skin" and you can see the threads with the default postbit, but if you pick up the skin "default skin (Legacy)" you can see the threads with the legacy postbit
but if there is a better way, that can be nice to know too :)
thanks for reading
Tony G
09-03-2005, 03:42 AM
I'm pretty sure there is a mod where users are able to choose what postbit they'd like (legacy or normal) through the User CP. Is this what you are after?
Adrian Schneider
09-03-2005, 04:40 AM
You could just be lazy and make a child style where you copy the legacy template over the postbit template.
White_Snake
09-03-2005, 03:34 PM
You could just be lazy and make a child style where you copy the legacy template over the postbit template.
i was thinking about doing that, but i was looking for another way ya' know in programming there are various ways to achieve the same goal, so, i was also curious about what Tony G said, a mod, but i suppose a mod like that would require a plugin/hack to be done and well, im not that skilled in php :ninja:
Adrian Schneider
09-03-2005, 06:44 PM
You could try this..
hook cache_templates
if ($styleid == X)
{
$vbulletin->options['legacypostbit'] = 1;
}
White_Snake
09-03-2005, 09:11 PM
hmm intresting, this maybe can be out of the topic but,
$vbulletin->options['legacypostbit'] is an array, isnt it? so now, where i can have a reference about all the $vbulletin->options ?
Adrian Schneider
09-03-2005, 10:06 PM
$vbulletin->options is an array containing all the options, and should be available everywhere.
$vbulletin->options['legacypostbit'] just contains 1 or 0 depending on what you have that option set to.
White_Snake
09-03-2005, 10:14 PM
$vbulletin->options is an array containing all the options, and should be available everywhere.
$vbulletin->options['legacypostbit'] just contains 1 or 0 depending on what you have that option set to.
0k, we're getting progress, so, now, where i can have a referrence of all the options? i mean, the php file with all of em?
and well, now on the if statement you told me, i suppose there is a way can be re arranged, so, the users can choose something on UCP like "Show normal postbit or postbit legacy"
if ($user_have_choose_postibt == legacy)
{
$vbulletin->options['legacypostbit'] = 1;
}
else
{
$vbulletin->options['legacypostbit']= 0;
{
btw, sorry for bother with all this Uber Newbie questions lol, but im a very newbie on php
Adrian Schneider
09-03-2005, 11:00 PM
Say if it was a profile field...
if ($vbulletin->userinfo['fieldX'] == 'Yes')
{
$vbulletin->options['legacypostbit'] = 1;
}
else
{
$vbulletin->options['legacypostbit'] = 0;
}
Assuming that the profile field is a "Yes" or "No" field (case sensitive).
I'm not 100% sure where it checks the option and changes the output, but putting this in the hook I suggested would work, or look for the hack here (which does the same/very similar thing AFAIK).
To view all the options go into your ACP... vBulletin Options > vBulletin Options
or throw in this up in a php file...
require_once('./global.php');
// check access
if (!is_member_of($vbulletin->userinfo, 6))
{
print_no_permission();
}
// display array
echo '<pre>';
print_r($vbulletin->options);
echo '</pre>';
if you are still using 3.0.x change all occurances of
"$vbulletin->options" to "$vboptions"
and all
"$vbulletin->userinfo" to "$bbuserinfo"
White_Snake
09-03-2005, 11:36 PM
0ka, thanks a lot :D i needed all of this info, i own you one!!
Thank you very much. This information helped me to get the user option for the postbit back into my just upgraded vB 3.5.4!
bluechris
03-13-2007, 11:33 AM
Hi guys i wanna try to do the same... so i created a custom field that can have 0 or 1....
Now i wanna put the checking code but i dont know where... here is what i have
if ($vbulletin->userinfo['field18'] == '1')
{
$vbulletin->options['legacypostbit'] = 1;
}
else
{
$vbulletin->options['legacypostbit'] = 0;
}
Nevermind i founted it ... sorry for asking.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.