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.
very nice, lol, what an easy fix too. Seems like you coded it very well, just a small little thing t hat you diddn't expect your fellow hack users to do. good job on the hack gary and good correction on that mike
For some reason this is not working for me. I'm not getting any errors, but nothing happens. It's weird. It's simple enough and I followed the directions to the T. Yet, the style doesn't show up at all.
I tried to post a screenshot, but the server kept getting reset. It's not really necessary, though. Imagine what your board looks like w/o this hack installed and you've got my problem. I've got the hack installed, but nothing has changed.
For some reason this is not working for me. I'm not getting any errors, but nothing happens. It's weird. It's simple enough and I followed the directions to the T. Yet, the style doesn't show up at all.
I tried to post a screenshot, but the server kept getting reset. It's not really necessary, though. Imagine what your board looks like w/o this hack installed and you've got my problem. I've got the hack installed, but nothing has changed.
If you're using old style postbits, then modify postbit_legacy instead of the postbit template
This is working just like it was designed and I love it. I have one question, however. Is there a way to make is to that someone who uses "Forum Default" is not classified as "unspecified"? Say if the forum default style is called "Bob" and the standard user just uses the forum default -- is there some kind of if condition that could be put in place that would point it to whichever style is the forum default? I hope I'm making sense. So, if user Joe is using forum default the postbit would display "Bob" instead of unspecified.
Also, what does it mean if the Style: is blank? I apologize if this has all been mentioned before in this thread. I thought I read everything, I swear. :nervous: