vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Additional Section within Profile and Dropdown within Posts (https://vborg.vbsupport.ru/showthread.php?t=98753)

Wired1 10-18-2005 10:00 PM

Additional Section within Profile and Dropdown within Posts
 
Link to 3.6.0 version:
https://vborg.vbsupport.ru/showthread.php?t=123254

This hack builds upon my Extra Profile Fields Page 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!

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

Quote:

Originally Posted by pipin
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.

Quote:

Originally Posted by nexialys
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

Quote:

Originally Posted by pipin
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

Quote:

Originally Posted by Wired1
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/showth...hp?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

Quote:

Originally Posted by predatorkill
installed,works perfectly!!!

take a look http://www.xbox-live.gr/forum/showth...hp?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

Quote:

Originally Posted by Wired1
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

Quote:

Originally Posted by predatorkill
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:

Code:

</tr>
</table>

$footer

</body>
</html>


With:

Code:

</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

Quote:

Originally Posted by rootnik
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

Quote:

Originally Posted by Aftermath
[high]* Aftermath clicks on install[/high]

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

Quote:

Originally Posted by Wired1
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

HTML Code:

<!-- post specs_menu -->
<!-- / post specs_menu -->

Working postbits show
HTML Code:

<!-- 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&amp;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

Quote:

Originally Posted by Wired1
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

Quote:

Originally Posted by Wired1
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

Quote:

Originally Posted by 1996 328ti
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:
Code:

<tr><td class="vbmenu_option">$post[field6]</td></tr>
The class made by vBulletin may override this, but try:

Code:

<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

Quote:

Originally Posted by Wired1
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

Quote:

Originally Posted by 1996 328ti
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:

Code:

<tr><td class="vbmenu_option" word-wrap:break-word>$post[field6]</td></tr>

steven s 01-06-2006 11:49 AM

Quote:

Originally Posted by Wired1
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:

Code:

<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

Quote:

Originally Posted by Wired1
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

Quote:

Originally Posted by Wired1
nothing that worked.

Okay, how about a text only drop down thing, like the Quick Links in navbar?


All times are GMT. The time now is 12:53 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
  • Page Generation 0.01412 seconds
  • Memory Usage 1,858KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (2)bbcode_html_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete