![]() |
User Postbit Template Selection
I'm just getting back into the swing of things with vBulletin 3.5. Here's my first plugin being released (Others are still in progress).
What this does: This allows users to select which postbit they wish to use via their control panel. Installation Upload the plugin and create a new user profile field by following the directions below. Once you complete the top two steps you must edit the plugin and find: field5 Then change that to your user profile field number. Add a New User Profile Field Profile Field Type: Single-Selection Menu Title: Postbit Template Selection Description: If you prefer the old-style postbit, using two vertical columns rather than the new horizontal layout, you can switch back to using that template with this switch. Options: Horizontal Postbit Vertical Postbit (Legacy) Set Default: Yes, but no First Blank Option Display Order: This is your choice. Field Required: No Field Editable by User: Yes Private Field: Yes Field Searchable on Members List No Show on Members List No Allow user to input their own value for this option No The rest does not matter. |
|
Didn't know that was there. :(
|
Not working.
|
What seems to be the problem? I need more information. You most likely did not change the userfield in the plugin.
|
Wow -- you all are porting these so quickly that I won't be able to catch up in time to have to port anything I am using as everything on my list of ToDos is showing up here. LOL!
Thank you for sharing!! :D |
Quote:
That's what I had to do, it's working great now. Thanks for the Plugin, I've always wanted the Users to be able to select this. :classic: |
Quote:
|
Quote:
|
Quote:
|
global_start is the equivalent hook ;)
Satan |
Quote:
|
Well... you could set the Vertical Postbit default for new registrations... but I'm not sure what you could do for the existing users.
Edit: I just thought of something, I'm not sure if this would work or not... but. When you're setting up the profile field, there's an option to make a selection default... try doing that. That should effect everyone's profiles, in theory anway. |
I uploaded another version. Anyone that wants the forum default to work on either postbit option try that one. I did not test this though so let me know if it works.
|
Your script causes this problem. Just wanted to let you know.
|
Heya,
This hook location conflicts with the ignore user function as well as the soft-delete noted above. No biggie -- it is just an issue of when it is being called. Tested with a minor change to the code and moving the hook to global_start. Add in the template cache I PM'd ya, and you are all set. :) |
Exactly what i was looking for thanks...
|
Works a treat. Thanks.
|
Can you attach the minor change you did to the code to fix the problem?
-CMX |
Given that this isn't my hack, I would prefer for the hack author to fix and re-release it. No stepping on any toes that way.
:) |
Quote:
If you have the time would/could you PM me the working code? I'll re-release it along with giving you credit for your work. I'm very busy right now getting the Help Desk plugin converted to 3.5. |
Done. :)
|
Has anyone figured out how to make this work if you have postbit_legacy selected in the vboptions. Because I have racked my brain trying to get it to work to no avail. And I would like to make postbit_legacy default for members AND guests.
|
Ok the problem lies in functions.php
PHP Code:
PHP Code:
|
Aha, I have figured it out.
I have my forums enabled for "Legacy Postbit" by default. Add the plugin to the hook 'cache_templates' Use this code: Code:
global $vbulletin; This way when it caches the template, it will disable the legacypostbit option and not force it to use postbit_legacy. -CMX |
Quote:
|
Thanks CMX_CMGSCCC, works like a charm :)
|
Is there any way to do it with plugin?
|
I've tried to implement this and failed miserably.
I tried using the default version and had that same problem with the deleted posts. Then I tried using the above version instead, and I got the following message whenever I tried to edit my user options... Could not find phrase '::$values for profile fields is not an array::'. Any ideas on whether we can get a working version of this available for download instead of downloading the file just to find it doesn't work? :( |
Thanks for this fix :)
|
works good on 3.5.0
nice and easy and especially nice with the add on. installed. |
Everybody considering to use this should use this Code: https://vborg.vbsupport.ru/showpost....1&postcount=25
The default Code of this Hack causes additional queries due to uncached Templates. |
Quote:
|
Aye, that is also what I'm interested in doing. My website uses non-legacy by default but has legacy as an option, and we can't upgrade until we can figure out how to do this (using our test board).
|
So is there a version of this that works properly with the horizontal, non-legacy, as the default yet? I seemed to read conflicting reports in this thread. :)
|
Quote:
the code Kirby linked to resolves that issue but legacy postbit needs to be set in ACP as default. hopfully a version of that code is released to work with horizontal as default and without the extra queries. i tried playing with the plugin code, reversing and switching the code around...but was unsuccessful (no surprise there though...dont know a whole lot about php yet). |
I did this, with the regular postbit as default:
https://vborg.vbsupport.ru/showpost....1&postcount=25 I did away with the else portion and only used the first part. Works fine with legacy as an option but not default. :) I also made sure to set in the profile field for the 'Top' option to be the default selection, if that makes any difference. |
Quote:
That's i did exactly. But still not working on gold version even replacing by right field profile in module :( |
hmm - I think I'll eventually use this on my forums if we ever get a confirmed version that works with 3.5.0 and horizontal as default.
|
Works for me, jtallen. :)
|
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:
|