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 |
#122
|
||||
|
||||
Was going to release the 4.0 ugly beta last night after I posted the 4.0 tabs mod, but I decided to get some sleep
It'll be out soon. Why not post it now you ask? Because I'm posting from my phone Automation needs functionality tweaking. |
#123
|
|||
|
|||
Looking forward to it mate, thanks for it in advance
|
#124
|
|||
|
|||
Quote:
Line 1 Line 2 Line 3 ... Line 25 currently it will show up without line breaks Line1Line2Line3...Line25 which is useless members on my site enter list of animals that they keep so this drop down is very handy to see what a member keeps. Your mod significantly cleans up the signatures...before users would create signatures that are 25lines high, to show the animals they keep. Now it's nice and clean in a drop down. Thanks for the mod! |
#125
|
|||
|
|||
so...any ideas if this is possible or if it will be made in the next update?
|
#126
|
||||
|
||||
It would be outside the scope of the mod, but it's possible. Something like if profile field 34, then parse lines by line break or special character or something.
|
#127
|
||||
|
||||
Quote:
Template markup: I have used a h6 header and a definition list for the different fields and values - semantically, I think that's the best approach. PHP Code:
Notice that I had to add one inline style rule (clear:both) to the containing div in order to keep it in place. I haven't bothered to use language variables. Resulting HTML markup: HTML Code:
<!-- start Computer Details --> <div class="popupmenu" style="clear:both"> <a href="javascript://" class="popupctrl">Computer Details</a> <dl class="popupbody" style="width:220px"> <h6>CADTutor's Computer Details</h6> <dt>Operating System:</dt><dd>Windows Vista Home Premium SP2 32bit</dd> <dt>Motherboard:</dt><dd>Asus P5K WS</dd> <dt>CPU:</dt><dd>Intel Core2Duo E6850 @ 3.0 GHz</dd> <dt>RAM:</dt><dd>4GB PC2-8500 C5 Corsair Dominator</dd> <dt>Graphics:</dt><dd>NVIDIA Quadro FX 1700 512 MB</dd> <dt>Stotage:</dt><dd>Samsung Spinpoint T166 320 GB</dd> <dt>Monitor:</dt><dd>BenQ FP241W 24" Wide</dd> </dl> </div> <!-- end Computer Details --> Additional CSS added at the bottom of the additional.css template: HTML Code:
/* COMPUTER DETAILS DROP-DOWN */ .popupbody h6 { font-weight: bold; color: {vb:stylevar postbithead_color}; background: {vb:stylevar postbithead_background}; padding: 6px 7px; border: {vb:stylevar postbithead_border}; } .popupbody dt { background-color: {vb:stylevar popupmenu_background.backgroundColor}; padding: 3px 7px 4px 7px; } .popupbody dd { background-color: {vb:stylevar formrow_background.backgroundColor}; padding: 3px 7px 4px 7px; } Attachment 118586 This is what it looks like in postbit_legacy. I'm not claiming to be an expert at any of this but I thought it might help progress this mod. I'd be grateful if, in return, you could see any obvious improvements I could make to my hack. Thanks - keep up the good work! |
#128
|
||||
|
||||
Gotta remember to post my code tonight. Looks largely the same, but I didn't have issues with width restrictions. The opposite actually where something would make it really long in testing. JS thing I think.
|
#129
|
||||
|
||||
Thanks cfish.
|
#130
|
||||
|
||||
Just one update to the above. I upgraded to vB4.0.4 and the styling on the pop-up vanished! So I moved the custom CSS from the popupmenu.css template to the postbit.css template and now all works well. I'll update the post above accordingly.
|
#131
|
|||
|
|||
could you paste the code please. Is that something that needs to be done in your mod or in the postbit template. Doesn't seem like this would be too difficult for you. Even maybe with a special character delimited (say |) if that would be easier
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|