Version: 1.00, by Gary King
Developer Last Online: Jun 2020
Version: 3.0.0
Rating:
Released: 03-27-2004
Last Update: Never
Installs: 86
No support by the author.
NOTE: Make sure all your styles have different display orders (only if they are in the same grouping). For instance, don't have 2 styles each with the display order of '1' otherwise this hack will just show 'Style: ' and no style shown.
This hack will show each users current selected style when viewing a post.
If you want to see how this looks, take a look at the screenshot attached.
The style system is a little more complex than the vBulletin 2 one, but it's still pretty simple and straightforward.
My apologies if this has already been released! I must also note that all of this code is original, meaning I made it all myself, I didn't look at someone else's code if anyone was wondering, so that we don't play the 'blame game' later on.
NOTE: For those who are wondering, this hack adds NO EXTRA QUERIES to your pages! Meaning the load and processing time are about the same as usual, they don't change much
// check what style the user is viewing
if (!$post['styleid'])
{
$post['style'] = '(' . $vbphrase['not_specified'] . ')';
}
else
{
// loop thru the $stylechoosercache to see which style the user is using, has to loop thru a few times
foreach ($stylechoosercache as $parentstyle)
{
foreach ($parentstyle as $innerstyleid)
{
if ($innerstyleid[0]['styleid'] == $post['styleid'])
{
$post['style'] = '<a href="' . $vboptions['forumhome'] . '.php?' . $session['sessionurl'] . 'styleid=' . $post['styleid'] . '">' . $innerstyleid[0]['title'] . '</a>';
continue;
}
}
}
}
Open the postbit template (or postbit_legacy if you're using old-style postbits) and find
<!-- user forum style --><div>$vbphrase[style]: <if condition="$post[style] == '$vbphrase[not_specified]'"><a href="$vboptions[forumhome].php?styleid=$vboptions[styleid]">Default Style</a><else />$post[style]</if></div><!-- / user forum style -->
Now add the following phrase:
Phrase Type: GLOBAL
Title: not_specified Text: not specified
Title: style Text: Style
All done!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Because you probably changed via the "Quick Style Chooser" for it to show up in your posts you have to go to User CP -> Edit Options and change it there.
well that worked thanks...i just dont understand why it wouldnt change on the user cp as well
If you set your preferred style in your profile, it reflect that style. But if you use the style chooser to select a different one, it doesn't reflect that selection. Is there a way to fix this?
Thanks for the reply. I like a lot of the suggestions that have been made in the thread. Maybe they'll be implemented someday.
Quote:
Originally Posted by blubber12
Yes, as the ones you choose in the drop down are really just temporary. It's basically a way to see what styles are being used. If you choose different ones a lot, it doesn't report that. Maybe it will one day.
I installed this hack and it worked good. I only have one style and I changed something in my usercp -> options (where the style chooser would be) and no it just shows up not specified. The only way to have it show up again is to create a new style for the time being so I have a different style to choose then go to my usercp and select the style and then it shows up again. Cause if you only have one style the style chooser don't show up.
Ok I did everything as said but its not showing up for me. Could it be because my forums are in linear mode? Its a brand new board so I'm still working on getting everything added. And this is my first hack that I've installed so it could be something I've done wrong.
Example of the only things that are showing up are attached. Any help is appreciated. thanks.