The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Profile Fields in a Postbit Dropdown Details »» | |||||||||||||||||||||||||||||||
If you use this mod please hit INSTALL!
With this mod you can allow profile fields to show up in a dropdown below a user's name and user's title under each post. There are two ways to use this product, and each has its own plugin (and template): Dropdown - Manual (enabled by default), and Dropdown - Automated (disabled by default). NOTE: The dropdown's title shows up as [username]'s [dropdown_title]. Yes, the 's is hardcoded into the mod. Figured if I didn't hardcode it, someone wouldn't be able to figure out how to add it To edit the title: Go to AdminCP -> Languages & Phrases -> Search in Phrases. Search for the phrase's title: [dropdown_title] (no brackets). Edit and save! The dropdown is dependent on Profile Field 5 being filled. If the user does not have this profile field filled out, then the dropdown will not show. To edit or remove this restriction: Go to the Dropdown Call Template. Find and edit, or remove these 2 lines of code (so that the dropdown will always show): Code:
<if condition="$post['field5']"> ... </if> The "Dropdown - Manual" template allows you to manually create the dropdown. Some examples of how to do this are already provided within the template. This template is the default. To edit it, go to AdminCP -> Styles & Templates -> Style Manager -> [STYLE NAME] Edit Style: Dropdown Information - Manual The "Dropdown - Automated" template / plugin combo will automatically create the dropdown for ALL custom fields (it will skip the first 4 default ones). To use the automated dropdown, DISABLE Plugin "Dropdown - Manual" and ENABLE Plugin "Dropdown - Automated". Simple! To sum it up: Plugin: Dropdown - Manual PRO: You select which fields, what descriptions, and in what order you want the fields to show up. CON: Lots of typing Plugin: Dropdown - Automatic PRO: Automatic! CON: no real control, Profile fields 5 and up will show up in order. NOTE: if it is a HIDDEN profile field, apparently only the DATA is hidden, not the field name, so the field name will show up as well. To block a profile field from showing up in the Automatic Dropdown, check out this post. Version History: 3.0.0 - Initial Release 3.0.1 - Added plugin to cache templates, courtesy of ssslippy. 3.1.0 - Updated for 3.8.x, no code changes made. NOTE: Support will only be given to those who have hit install. If you use this mod please hit INSTALL! Download Now
Screenshots
Show Your Support
|
Comments |
#12
|
||||
|
||||
Quote:
Installed: |
#13
|
|||
|
|||
TigerC10, would you by any chance know how to fix the problem wherein the dropdown extends off the page? Appears only to happen in Firefox. |
#14
|
||||
|
||||
Quote:
|
#15
|
||||
|
||||
Well, the length is determined by the CSS handler for each browser with that code segment. Because of the "position: absolute" property, it acts independently from the CSS of the items containing it. This might be why Firefox makes it go off the screen... But the "width: auto" is supposed to automatically size the div to the size of its contents.
You could try switching it to "position: relative" instead, but I think that would invalidate the "width: auto" property. I've never been a fan of CSS because of how it is handled differently between different browsers. |
#16
|
||||
|
||||
Even though I know there's the ability to add a link using the afore mentioned process...it would be better if this mod allowed the use of the url bbcode tag in the profile field, since someone may want to link to something different then what can be coded in the template.
Say with what our site uses it for...I could enter my processor name and then link it to the manufacturer's website. Since everyone doesn't have the same processor...what was mentioned before about adding a link (by Jasem) is moot. |
#17
|
||||
|
||||
Quote:
Can't remember, but can you moderate profile fields/ I don't think you can (although you can moderate new accounts). |
#18
|
||||
|
||||
Well...
We can moderate new users...and their posts...but the profile fields can't be moderated. However...isn't that what Moderators and Admins are for anyway? LOL! Keeps us honest... This is actually one of the best mods on this site...and I'm glad you're letting us use it for free. However...I would think about incorporating links into these profile fields...and giving admin the ability to turn this feature on/off per user/usergroup. We can dream can't we? Thanks, again, Wired... Steve |
#19
|
||||
|
||||
I may look into making an alternate version of this, or an addon or something, where that's possible. The problem is where to store the URL for each profile field. It could be in a separate field, but then you've just doubled the # of profile fields, and this starts to get unwieldly in the admin area where you browse user info.
If the whole mod was moved over to its own table, that would solve some problems, but create some new ones. Kinda gets away from the KIS method. |
#20
|
||||
|
||||
Ya know...thinking about this, I may have come up with a solution...
Why not just have one profile field...or just a user editable box, so a user can enter data, link it...then go to a new line and repeat the process for each item they'd like to add. You could then take the data they entered and add it to the ajax menu. For instance... I'm using this Quick Reply box...and I can enter whatever I want for my System Specs... Compaq Presario SR5507F Iris8-GL6 Next Item Next Item And so on and so forth... Then just parse this info into the menu...wouldn't that work? |
#21
|
||||
|
||||
Doing it that way would mean it wouldn't be standard. Someone could enter their CPU on the last line instead of the first. Can you dig it?
Although I've got a more elegant solution. Just enable the BBCode parser. Add these lines to the top of both of your plugins (automatic and manual): Code:
require_once(DIR . '/includes/class_bbcode.php'); $parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list()); $post[fieldxx] = $parser->do_parse($post[fieldxx], false, false, true, false, false, true); This will allow you to enable bbCode for only certain profile fields, which will in turn let you use something like: [url=http://www.tigerdirect.com/someproduct]My Awesome Computer Part[/url] in the profile field. It goes without saying, that the profile field would have to be "hidden" so it doesn't mess up on the user's profile page (you know how if it's visible, it adds it to a tab in the user's profile data). Of course, if you have some crazy bbcodes that do things with images... Those would be allowed. Somewhat not cool. You would have to replace the function call "fetch_tag_list()" with an array of the tags you want to allow to get around that. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|