![]() |
style name in postbit 0.3
this is my implementation of the hack used here that shows what style each one is using under their usernames
it will only show the style if the user chose something else then "default style" in the usercp. also this wont show styles choosen with the "quick style chooser", because those are stored in cookies and not in the database. if you logoff your style is resetted to the one in the usercp. Installation - Upload and activate "style name in postbit.xml" plugins - Put this where you want it to appear Code:
<if condition="$post['styleid'] != 0"><div class="smallfont">Style: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">$post[styletitle]</a></div></if> |
Easy money thanks!
|
Instead of it re-directing to index.php, do you think you could make it so it re-loads the thread? ;)
Satan |
*YAWN*
ill see what I can do. im thinking of changing it so it will only show styles for people that does not use the default one (ie. style 0, if you choose the default style in the usercp it shows) im a little worried with that require_once() too, its called for each construct_postbit, not sure the performance implications of that |
Is there a way to port this to where it shows the info in the profile? I feel that's a more appropriate place for such a minor detail on a user.
|
Quote:
Is there any way you can require /includes/adminfunctions_template.php earlier on in the code, i.e. when showthread is initialised? This might stop it having to be called for every post... Satan |
Quote:
it seems to be a little faster but I didnt test with microstats ========================================== 0.3 links to the current thread, and only shows the style if the user didnt choose "default style" in the usercp. if you installed the old one you have to edit the templates again. ========================================== and here is the old version that shows the style of all users Code:
<div class="smallfont">Style: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">$post[styletitle]</a></div> |
I have just noticed a small bug. If you use quick reply then the AJAX system doesn't pull the style name down. Once you do a hard reload of the page all is ok. Just not when the new post is added via AJAX.
|
im discontinuing this one cause it adds a query to showthread.php, and thats not a good place to add queries as its a very requested script. anyone have my permission to develop it from here.
you can use this one instead that adds the style to the user's profile |
Quote:
|
Idea to avoid the query caused by cache_styles:
showthread_start PHP Code:
|
Better yet
Use this plugin in showthread_query Code:
$hook_query_fields .= ",style.title"; Code:
<if condition="$post['styleid'] != 0"><div class="smallfont">Style: EDIT - okay, it needs a lil bit of tweaking LOL, in PMs it shows your style as the title of the pm hehehee. |
Quote:
|
Murrtex, mine doesn't work at all, causes alot of bugs :), was a good idea but bad application :)
I'm going to try Andreas code :) |
O awesome! It worked great, no extra queries by what I can tell :)
Just replace the showthread_start plugin with andreas code :) Thanks Andreas!! |
ok cyricx..what will we do..fist i'll install style name in postbit 0.3.zip plugin than apply andreas code..can u show me the way? how ?
|
Admincp -> plugin system -> download / upload plugins
Scroll to the bottom, Click browse, select the xml in the first post, click import now admincp -> plugin system -> plugin manager scroll down to "Hook Location : showthread_start" - "Styles in Postbit" and click Edit for that one. Replace all the code in the "PHP Plugin Code" box with Andreas code above. Click save. Do the template edit. Tada :) |
Quote:
|
Murrtex,
Did you get this to work, I have Replace all the code in the "PHP Plugin Code" box with Andreas code but still can not see the style. JoeWho |
same on me JoeWho..it works on some user,it doesnt work on some user. :(
|
Quote:
|
Quote:
Can someone tell me how to get the style to show in PMs? It shows 'Style:' but not the actual style name. Thanks in advance. |
This is pretty good. However, it only shows what style the user has selected in their UserCP. It does not register if the user changed styles in the pull-dowqn list outside of the UserCP.
Ideas? |
I don't think you can show what they picked in the quick style chooser, as that choice is saved in that computers cookies and nowhere on the site.
That's why if your at home and select a style through the chooser, and then go to a different computer, like at work, you have to reselect the style there too is that it's only saved in your cookies. |
i want to put this... underneath the avatar etc..
as i have all the posts/threads/rep on the right... and avatar and user title on the left which template do i edit to put it on the left hand side? ty for help given |
Great hack!!! Wow i love it ;) And it works perfect...
Just if you want show Default Style too, in postbit use: Code:
<div>$vbphrase[style]: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]"><if condition="$post['styleid'] == 0">Default Style<else />$post[styletitle]</if></a></div> |
Can this be fixed so I can use it in memberinfo ?
|
Could it be fixed too with the announcements please ?
|
Nice hack! Is there any way that the Default Style set in vBulletin Options --> Style & Language Settings will be displayed for the styleid = 0, instead of making it disappear?
|
Hi Dream,
I am not very good at it, so please elaborate in which file and where (specifically) I should put this text: Code:
<if condition="$post['styleid'] != 0"><div class="smallfont">Style: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">$post[styletitle]</a></div></if> Thank you. |
go to your admincp->styles + templates and open your postbit or postbit_legacy which ever you use
search for Code:
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div> Code:
<if condition="$post['styleid'] != 0"><div class="smallfont">Style: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">$post[styletitle]</a></div></if> |
I have both, postbit and postbit_legacy, but I could not find the following text in neither of them:
Code:
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div> |
try looking for this
Code:
<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower] </if><div>$post[reputationdisplay]</div></if> Code:
<if condition="$post['styleid'] != 0"><div class="smallfont">Style: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">$post[styletitle]</a></div></if>N |
Thanks a lot tipoboy for your reply. I did just what you said but still no result.
Please check your code ended with "N", which I didn't include assuming it could be e typo. |
sorry the "N" was a typo!!
i'm running this with 3.5.3 perfectly, what version of vb are you using?? |
The latest one, just bought it 2 weeks ago.
|
ok try going into your style and opening up your postbit/postbit_legacy templates and do a searc for 'msn' and follow the code back to where you see <div>$post
and before that enter the code screenshot attached + pm sent regarding IM |
screen shot pleae
|
Just did that again and still no use :)
Code:
<!-- post #$post[postid] --> |
you guys do know you could just modify the postbit template and add
Code:
<if condition="$post['styleid']= 0"><div class="smallfont">Style: you should always be avoiding using plug-ins where you can :p |
All times are GMT. The time now is 04:50 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|