View Full Version : Additional Section within Profile and Dropdown within Posts
Wired1
10-18-2005, 10:00 PM
Link to 3.6.0 version:
https://vborg.vbsupport.ru/showthread.php?t=123254
This hack builds upon my Extra Profile Fields Page (https://vborg.vbsupport.ru/showthread.php?t=98282) hack. This template mod lets you take the extra fields from that hack and places them within a dropdown that sits below the user's title within each post, as well as replaces the Group Memberships area with a listing of only these specs. The EFP hack is basically the entry form for the data that's manipulated in this hack. Please check out the pics at the EFP hack link to get the full idea.
In my case, it is used for PC specs (and as you will see the instructions are tailored towards this), however it can be easily used for parts or specifications of almost anything (car parts for example).
An example is shown here:
http://www.houseofhelp.com/v2/showthread.php?t=39826
Example of user profile with specs:
http://www.houseofhelp.com/v2/member.php?userid=15
# of plugin hooks: 1
# of php page edits: 1 (just 1 line to add the custom hook line into member.php)
# of template edits: 3
# of phrase edits: 1
An admin section will eventually be done for this, as well as extra areas to place the new specs within. Because this is based upon the EFP hack, the upgrades in functionality to this hack will depend on the EFP hack's upgrades. In otherwords, staggered upgrades. Other functionality has been recommended and will be added at a later date. Any suggestions are appreciated.
Don't forget to hit INSTALL! (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=98282)
Also, please post where you've installed this, as I'd like to see how people are using it. That'll help me think of new ways to add to it aside from my own needs for this hack. Or if guests can't see the effects, then please post a pic.
Wired1
10-19-2005, 04:09 AM
Link to 3.6.0 version:
https://vborg.vbsupport.ru/showthread.php?t=123254
pipin
10-19-2005, 07:46 AM
Thanx Wired.
Just two points:
You should add that <td class="tcat" width="50%">$vbphrase[group_memberships]</td> has to be changed <td class="tcat" width="50%">$vbphrase[extra_options]</td>
and my extras fields that are set to "Show on Members List - No" are displayed too.
nexialys
10-19-2005, 10:41 AM
interesting... really
... your release, please .zip it for easier uses...
Wired1
10-19-2005, 12:02 PM
Thanx Wired.
Just two points:
You should add that <td class="tcat" width="50%">$vbphrase[group_memberships]</td> has to be changed <td class="tcat" width="50%">$vbphrase[extra_options]</td>
Well... it doesn't HAVE to be, but yeah, it would make it neater under certain circumstances. (in otherwords, when coding @ 1 AM, you forget things! :) ) I left them separate in case someone wanted different titles for both areas, although I will update the instruction file with that note, no version # change though.
please .zip it for easier uses...It's only 7K though, and the XML file is not needed per se, as the same code is in the instruction file. IMHO, it'd take longer to download 1 file and unzip it then to download 2 files.
Wired1
10-19-2005, 01:52 PM
and my extras fields that are set to "Show on Members List - No" are displayed too.
Displayed in the members list you mean?
pipin
10-19-2005, 02:03 PM
Displayed in the members list you mean?
in the profile, sorry left that out. :surprised
i had a dropdown that sits below the user's title before your hack was released and i have one extra field that can be set to no or yes, so the member can decide himself if the specs are shown in this dropdown or not.
Wired1
10-19-2005, 02:47 PM
Ahhh, gotcha. Possible, but ATM I can't think of a reason why someone would put info in the list, but not want anyone to see it. Got an example?
One thing I intend to add on is for a field to be able to get info from 1 of 2 different areas. Example: the field by default is a dropdown selection, with all of the current motherboards listed in it. But what if they have one that's so new, it isn't on the list? Then they can select OTHER: and slap something in.
Combining 2 fields to show on one line is relatively easy (as someone will eventually bring this idea up).
predatorkill
10-19-2005, 05:23 PM
installed,works perfectly!!!
take a look http://www.xbox-live.gr/forum/showthread.php?p=95#post95
click on Predators games at the bottom of the page to see!!!
it's a little bit modified to meet my needs!!
Thanx m8,great plug in!!
EDIT: found a little bug,i dont know if i did anything wrong.When i click "Edit"(via AJAX)
on a post,when i save it and click the tab it wont show up!!If i click refresh,everything's fine!
Wired1
10-19-2005, 07:29 PM
installed,works perfectly!!!
take a look http://www.xbox-live.gr/forum/showthread.php?p=95#post95
click on Predators games at the bottom of the page to see!!!
it's a little bit modified to meet my needs!!
Thanx m8,great plug in!!
EDIT: found a little bug,i dont know if i did anything wrong.When i click "Edit"(via AJAX)
on a post,when i save it and click the tab it wont show up!!If i click refresh,everything's fine!
Nice! The info in the dropdown, it's supposed to be in one line? Where'd the info come from?
Never noticed that bug, pretty sure it's because of how AJAX works. I'll ask an AJAX-savvy friend of mine about it.
predatorkill
10-19-2005, 10:17 PM
Nice! The info in the dropdown, it's supposed to be in one line? Where'd the info come from?
I ve told ya,i ve made it to meet ma own needs!!! It's better for me in one line,cos i cant figure out or guess how many games a user has!!If someone got 20,it would be a huge list for the dropdown.So i ve limited it in 1 line seperated with commas!!!
Wired1
10-19-2005, 10:26 PM
I ve told ya,i ve made it to meet ma own needs!!! It's better for me in one line,cos i cant figure out or guess how many games a user has!!If someone got 20,it would be a huge list for the dropdown.So i ve limited it in 1 line seperated with commas!!!
Relax! :)
GamerzWorld
11-09-2005, 10:16 AM
Hello, great hack. Dont mean to be a pain but how could i recycle the group memberships to show
Guilds: Group Membership fields
Thanks for your help
Wired1
11-09-2005, 03:19 PM
Not a pain at all, in fact I was wanting to get around to this eventually. While this isn't as elegant as I want it to be, this should do it for you. Basically it adds the Group Membership and a blank area below the current profile. You can swap the Group Membership and Extra Info areas if you'd like, just have to swap the code in the appropriate areas.
REPLACE:
</tr>
</table>
$footer
</body>
</html>
With:
</tr>
<tr>
<td class="tcat" width="50%">$vbphrase[group_memberships]</td>
<td class="tcat" width="50%"> <em>$vbphrase[n_a]</em></td>
</tr>
<tr valign="top">
<td class="panelsurround" align="center">
<div class="panel">
<div align="$stylevar[left]">
<div class="fieldset">
<if condition="$show['extrainfo']">
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<if condition="$userinfo['birthday']">
<tr>
<td>
<strong>$vbphrase[birthday]</strong>:<br />
$userinfo[birthday]
</td>
</tr>
</if>
$customfields
</table>
<else />
<em>$vbphrase[n_a]</em>
</if>
</div>
</div>
</div>
</td>
<td class="panelsurround" align="center">
<div class="panel">
<div align="$stylevar[left]">
<div class="fieldset">
<table cellpadding="0" cellspacing="$stylevar[formspacer]px" border="0">
<tr>
</tr>
</table>
</div>
</div>
</div>
</td>
</tr>
</table>
$footer
</body>
</html>
GamerzWorld
11-09-2005, 04:28 PM
Thanks, just need to think how to do it so that i dont have a spare box
Wired1
11-09-2005, 05:36 PM
Don't forget to hit Install! :)
It can probably be done, but the downside is that the opposite cell has a large area of nothing in it. You can remove the info in that <TR> to make it completely blank of even the title bar, or you could have the last cell stretch the whole width if you wanted.
rootnik
12-01-2005, 02:58 PM
Nice, installed no problems
*clicks install*
Wired1
12-01-2005, 04:18 PM
Nice, installed no problems
*clicks install*
glad to hear! Going to try to lay out some framework for some new features this weekend.
Snake
12-01-2005, 05:49 PM
/me clicks on install
Wired1
12-01-2005, 07:30 PM
* Aftermath clicks on install
Thanks for the install!
BTW, (quoting what I just added to the install notes)
please post where you've installed this, as I'd like to see how people are using it. That'll help me think of new ways to add to it aside from my own needs for this hack. Or if guests can't see the effects, then please post a pic.
rootnik
12-01-2005, 07:32 PM
glad to hear! Going to try to lay out some framework for some new features this weekend.
Any way to have the pulldown table in the postbit build itself dynamically? Instead of editing the postbit every time there is a new extra field added...
Thats my only request :)
Installed at http://friendcodes.com/forums
friendcodes are the Nintendo DS version of Xbox's gamer tags for online play (except each game gives you a different code). People were driving me crazy with the sloppy sigs, you code cleans things up allot.
Snake
12-01-2005, 07:59 PM
Here's mine: http://www.metalgearforum.net/profile.php?do=extra
By the way, it says that you have updated the hack today. What's new in this version?
Wired1
12-01-2005, 08:13 PM
rootnik:
Yeah, I'd like that as well! Just gotta figure out how to do that. Can't say I completely understand how the templates work with the php pages, as they both call each other at times I think. Odd recursive loop in logic almost. Haven't looked at the updated documentation yet though.
Aftermath:
That link only works for members of the forum.
Nothing new, just updated the top post with that last paragraph.
Snake
12-01-2005, 08:51 PM
Yeah I know that so either you have to register on the forum or use the test account (test/test). ;)
steven s
01-04-2006, 11:16 AM
Not working for all users.
When I look at the html source all I see for the ones who are not working is
<!-- post specs_menu -->
<!-- / post specs_menu -->Working postbits show<!-- post specs_menu -->
<div class="vbmenu_popup" id="specs_47172_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">Username's Garage</td>
</tr>
<tr><td class="vbmenu_option">Year: 1997</td></tr>
<tr><td class="vbmenu_option">Model: Active</td></tr>
<tr><td class="vbmenu_option">Color: Hellrot/Bright Red</td></tr>
<tr><td class="vbmenu_option">Modifications: Cone Air Filter, Sparco 8.5MM Plug Wires, E30 M3 Three Spoke Steering Wheel, H&R Springs, Koni Front</td></tr>
</table>
</div>
<!-- / post specs_menu -->
Wired1
01-04-2006, 12:28 PM
Did you use the conditional for the first field at all? Can you post a thread link that has both a working one and non working one?
There's nothing in the code aside from the optional conditional that would cause it to work for some and not for others.
steven s
01-04-2006, 04:52 PM
Did you use the conditional for the first field at all? Can you post a thread link that has both a working one and non working one?
There's nothing in the code aside from the optional conditional that would cause it to work for some and not for others.
http://www.318ti.org/forum/showthread.php?t=8325
3rd post down shows the missing information.
At this time few people have any info. I can find no pattern to the problem.
Eventually I will make a condition if there is no information to not even post the extra fields. Then maybe a link to the profile section for the user.
Something like, your garage is empty, go here to update your garage.
But first I want to be sure it's working properly.
Thanks.
Edit: You're right. I went back to the postbit template and I had the wrong field number. :tired:
And it figures, vBulletin is now 3.5.3.
Wired1
01-04-2006, 05:40 PM
3.5.3? aaahhhhh damnit. gotta update forums again.
I had just signed up for a membership there to t/s this, lol. Feel free to delete the Wired member, don't drive a BMW :)
FYI, it won't show the blank extra fields if they're not filled out. At the House of Help, I've got it set up w/ that conditional on the first field so that if someone doesn't specify what motherboard they have, the whole dropdown doesn't show up.
steven s
01-04-2006, 10:16 PM
3.5.3? aaahhhhh damnit. gotta update forums again.That is for the weekend. I'll just use the plugin for now.
My members really like the mod. Thanks!
steven s
01-05-2006, 12:54 AM
Is there a way to make one line taller?
For instance, my modification line doesn't fit all of the information.
Wired1
01-06-2006, 02:18 AM
Is there a way to make one line taller?
For instance, my modification line doesn't fit all of the information.
The actual code for the dropdown is a function done by vBulletin. Example code from my hack for a field within the dropdown:
<tr><td class="vbmenu_option">$post[field6]</td></tr>
The class made by vBulletin may override this, but try:
<tr><td class="vbmenu_option" width="100">$post[field6]</td></tr>
May want to try having multiple Modification fields (e.g. I've got HDD 1, HDD 2, etc. on mine). Don't know much about cars (although Need For Speed: Most Wanted rocks), but you may also want to try fields like Rims, spoiler, body kit, etc. for example. (yeah, I'm just pulling stuff I've seen in NFS:MW, Rides, and Overhaulin'). Ask the forum members for suggestions. The posters of my site helped tweak the fields, and it's become a more effective tool because of them.
steven s
01-06-2006, 02:47 AM
May want to try having multiple Modification fields (e.g. I've got HDD 1, HDD 2, etc. on mine).Actually height is the problem. I tried width="100" height="24". vB still uses the class. I think a workaround will be to limit the content of each line but have additional lines. What I really want is for it to wordwrap and make the field bigger.
Wired1
01-06-2006, 03:25 AM
Actually height is the problem. I tried width="100" height="24". vB still uses the class. I think a workaround will be to limit the content of each line but have additional lines. What I really want is for it to wordwrap and make the field bigger.
Was hoping the width would override the class. bah. There may be some other way to do it by overriding the CSS for just that one area, I'll have to poke around. In the meantime, try:
<tr><td class="vbmenu_option" word-wrap:break-word>$post[field6]</td></tr>
steven s
01-06-2006, 11:49 AM
Was hoping the width would override the class. bah. There may be some other way to do it by overriding the CSS for just that one area, I'll have to poke around. In the meantime, try:
<tr><td class="vbmenu_option" word-wrap:break-word>$post[field6]</td></tr>
Nah. Didn't work. I think the trick is to create a new class just for the one line.
I'm also taking suggestions from my members. Maybe multiple fields is the answer.
Great mod! :)
Wired1
01-06-2006, 11:57 AM
Not too knowledgeable with CSS, but I believe there are ways to inherit them, and then override parts of them. Gonna bug some people today about it.
I'm partial to multiple fields though. I've got 10 or so on mine, and helps us a lot.
pipin
01-21-2006, 09:31 AM
I will bring it to our forums this weekend, just curios how the users will accept it.
btw my solution looks like this:
http://home.arcor.de/jensgessner/system2.jpg
would be interestest in other examples.
htscpl
01-30-2006, 02:44 AM
Thanks been looking for this since I upgraded to 3.53
** clicks installs **
:D
eNforce
02-02-2006, 12:02 AM
Not too knowledgeable with CSS, but I believe there are ways to inherit them, and then override parts of them. Gonna bug some people today about it.
Find anything on this?
Wired1
02-02-2006, 01:32 AM
nothing that worked.
eNforce
02-04-2006, 08:57 PM
nothing that worked.
Okay, how about a text only drop down thing, like the Quick Links in navbar?
Wired1
02-04-2006, 09:32 PM
It's already using the same vB function that Quick Links uses.
eNforce
02-04-2006, 09:40 PM
Yeah, i mean like what pipin has above, just text
Wired1
03-16-2006, 05:37 AM
Damn vB notifier didn't tell me there was a reply, sorry!
He'd have to post the code, then I could see about integrating it if people wanted.
i never notice this one...got another one...called "My System Spec in Postbit". It Looks like kool..
klickss install.
Wired1
03-16-2006, 01:50 PM
i never notice this one...got another one...called "My System Spec in Postbit". It Looks like kool..
klickss install.
Assuming you meant this hack, thanks! Don't forget to hit install on the hack that you need for this one to work:
https://vborg.vbsupport.ru/showthread.php?t=98282
i cant find this step...
"plugin System -> Add New Plugin
Hook Location: vBulletin: Profile / Option Updates -> member_extras
Title: Extra Member Fields"
nvm..i figured it out perhaps.
I still cant seem to actually get the drop down to appear though
thx for the reply on HoH
Wired1
03-17-2006, 11:56 AM
Do you have info in the specific fields? Did you install the other hack? Do you have a link to the forum in question? Also, please hit the Install button!
heh.
1 yes
2 yes
3 www.slaptardcentral.com
4 i just did.
thanks for the reply
Wired1
03-19-2006, 02:19 AM
The location of the dropdown is in an area for a different post view, where the poster info is above the post, not to the side. You'd just have to move that.
In the dropdown menu i can't make multiple-selection-checkbox fields to show... it just show numbers... :(
Wired1
04-08-2006, 03:15 AM
In the dropdown menu i can't make multiple-selection-checkbox fields to show... it just show numbers... :(
dropdown AND multiple checkboxes? Huh?
Tested Multiple checkboxes, worked fine. Can you be more specific?
I am having issues with this and kinda would like to get rid of the extra stuff now.
How do I "uninstall" the extra stuff like the profile hooks and drop down on postbit.
I went thru the changes and thought I got it all that I added with the readme but some users still have the features available.
Wired1
07-04-2006, 06:19 AM
Go through the instructions step by step. If you've added code, remove it. Make sure you go through each of your templates, and remember to turn off the plugin.
What types of issues are you having?
barryhand
08-02-2006, 07:50 AM
Hi, Great Mod.
At the moment its showing up based on one field condition, any way to enable it based on multiple fields
Say if Field11 or 12 or 13 exist?
<if condition="$post['field11']"> ??
//EDIT
Got it
<if condition="$post['field10'] OR $post['field11'] OR $post['field12']">
paul41598
08-03-2006, 03:52 PM
Wired:
I made an extra profile page as per your instructions here:
https://vborg.vbsupport.ru/showpost.php?p=1034860&postcount=192
I've installed this hack now to show it in memberinfo template and it keeps grabbing my first original custom profile page extra, and not getting extra2. How do I fix this?
paul41598
08-03-2006, 05:04 PM
n/m, figured it out
Wired1
08-03-2006, 05:08 PM
Kewl, glad to see you both got it worked out. Don't forget to hit install Paul :)
Jeordie015
08-06-2006, 09:58 PM
If this has already been asked, I didn't see it. Is there a way to have it so it will show a message in the table in the additional section in the profile instead of leaving it blank if the user doesn't enter anything for those fields?
Wired1
08-06-2006, 11:41 PM
could just replace the n/a message line with whatever message you'd like, but I would code it into the template, don't replace the phrase or it will show up in other unintended places.
Xorlev
08-07-2006, 01:17 AM
Does not work in 3.6.0 due to changed table schema. Fix below:
Change:
$profilefields = $db->query_read("
SELECT profilefieldid, required, title, type, data, def, height
FROM " . TABLE_PREFIX . "profilefield
WHERE form = 6 " . iif(!($permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehiddencustomfields']), "
AND hidden = 0") . "
ORDER BY displayorder
");
TO:
$profilefields = $db->query_read("
SELECT profilefieldid, required, phrase.text AS title, type, data, def, height
FROM " . TABLE_PREFIX . "profilefield, " . TABLE_PREFIX . "phrase
WHERE form = 6 " . iif(!($permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehiddencustomfields']), "
AND hidden = 0") . " AND phrase.varname = CONCAT('field', profilefieldid, '_title')
ORDER BY displayorder
");
Wired1
08-07-2006, 01:39 AM
Does not work in 3.6.0 due to changed table schema.Well, considering it's a 3.5.x hack, that would explain why it's not compatible, now wouldn't it. Patience.
Wired1
08-07-2006, 02:04 AM
Link to 3.6.0 version:
https://vborg.vbsupport.ru/showthread.php?t=123254
Xorlev
08-07-2006, 04:36 AM
Yes, I know that it's a 3.5.x hack. It was on my forum when I upgraded and noticing no new version I fixed it myself and decided to post the fix for everyone else. No need to be snippy about it.
Wired1
08-07-2006, 11:57 AM
Not being snippy, just pointing out that it's clearly marked as 3.5.x, not 3.6.0.
Jeordie015
08-13-2006, 05:36 AM
could just replace the n/a message line with whatever message you'd like, but I would code it into the template, don't replace the phrase or it will show up in other unintended places.
Well for at least one member, it's not showing the N/A message. I haven't fiddled with it to see why. Maybe they put something in there and took it out? Anyway, I'm a little picky, so I was just wondering if there was a way to keep that from happening.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.