vb.org Archive

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

Wired1 08-06-2006 10:00 PM

Additional Section within Profile and Dropdown within Posts
 
NOTE: After checking out the vBulletin 3.7 First Look thread, which contains significant changes to the Member Profile page, it is clear that this mod as-is will probably not work properly when it comes to displaying the Extra Profile Info on that page. As soon as an official 3.7 comes out, I'll start working on the changes.

The 3.5.x version of this hack can be found here.

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 EPFP hack is basically the entry form for the data that's manipulated in this hack. Please check out the pics at the EPFP 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/forums/sh...ad.php?t=39826

Example of user profile with specs:
http://www.houseofhelp.com/forums/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

Any suggestions are appreciated.

Don't forget to hit INSTALL!

Support will only be given to people who have hit install.

Also, please post where you've installed this, as I'd like to see how people are using it. Or if guests can't see the effects, then please post a pic.

Wired1 08-07-2006 01:59 AM

Reserved for future use.

bollie 08-07-2006 03:57 AM

instal ;)

Wired1 08-07-2006 04:20 AM

:):)

Terminatoronly 08-07-2006 08:02 AM

good one keep the good work ;) and of course installed ;)

Wired1 08-07-2006 12:00 PM

Thanks! Please post back if you're doing something cool with the mod :)

delds 08-07-2006 07:19 PM

Can the selections be made clickable to a url that opens in a new window ?

Wired1 08-07-2006 09:38 PM

Not with this mod. All the selections are just user profiles. If Jelsoft ever lets profile fields become links, or you find a hack that gives you this option, then it should work fine automatically.

steven s 08-07-2006 11:57 PM

In the 3.5 version you list the hook contents, but not in 3.6. ??

Wired1 08-08-2006 01:15 AM

Quote:

Originally Posted by 1996 328ti
In the 3.5 version you list the hook contents, but not in 3.6. ??

Yeah, didn't feel there was a reason to, as you can read the XML code or read the plugin from the admincp.

steven s 08-08-2006 01:31 AM

I can't figure why the pulldown menu doesn't open.
http://www.318ti.org/forum/showthread.php?t=11816

Wired1 08-08-2006 02:52 AM

Have you done the last step in the instruction file? (check the PM on your forum).

steven s 08-08-2006 03:26 AM

Quote:

Originally Posted by Wired1
Have you done the last step in the instruction file? (check the PM on your forum).

You gave me a scare there. :confused:

It is in one postbit and not the other. I'm going to go to sleep and try again when I am awake. Thanks for your help.

Wired1 08-08-2006 03:32 AM

Quote:

Originally Posted by 1996 328ti
You gave me a scare there. :confused:

It is in one postbit and not the other. I'm going to go to sleep and try again when I am awake. Thanks for your help.

Hehe, sleep goooood :) No problemo!

Aligator21 08-08-2006 05:22 AM

I did exactly what you said in the instructions, but there is no pulldown menu show up in my forum :(
I use postbit_legacy and the changes i made them into postbit_legacy insteed of postbit

any help? (see a thread of my forum)

Wired1 08-08-2006 11:51 AM

Quote:

Originally Posted by Aligator21
I did exactly what you said in the instructions, but there is no pulldown menu show up in my forum :(
I use postbit_legacy and the changes i made them into postbit_legacy insteed of postbit

any help? (see a thread of my forum)

Works fine for me when I check out that post, I take it you got it fixed? Was it just a typo, or missing code, or something else?

Arachnophiles 08-08-2006 01:41 PM

Great Modification. One question though; when using a 'multiple-line' text box, is it possible for the contents to be displayed vertically rather than horizontally in the drop-down box within posts?

Cheers,
Adam.

Wired1 08-08-2006 01:51 PM

Quote:

Originally Posted by Arachnophiles
Great Modification. One question though; when using a 'multiple-line' text box, is it possible for the contents to be displayed vertically rather than horizontally in the drop-down box within posts?

Thanks! I'll have to poke around in the code, see what I can find out.

Arachnophiles 08-08-2006 03:19 PM

Quote:

Originally Posted by Wired1
Thanks! I'll have to poke around in the code, see what I can find out.

Thanks, really appreciate that.

I'm using it to allow members to list their collection, some of which are quite lengthy. When allowed to do so in the horizontal format; the drop-down box is off limits to the page.

Example Here

Cheers,
Adam.

steven s 08-09-2006 01:13 AM

Quote:

Originally Posted by Wired1
Hehe, sleep goooood :) No problemo!

I deleted all products and started from scratch.
Code:

after
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
added
<!-- post specs_menu -->
<if condition="$post['field7']">
        <div id="specs_$post[postid]" class="vbmenu_control">
                <a href="#specs">$post[username]'s ti Garage</a>
                <script type="text/javascript"> vbmenu_register("specs_$post[postid]"); </script>
        </div>
</if>
<!-- / post specs_menu -->

after
<!-- / post $post[postid] popup menu -->
added
<!-- post specs_menu -->
<div class="vbmenu_popup" id="specs_$post[postid]_menu" style="display:none">
        <table cellpadding="4" cellspacing="1" border="0">
        <tr>
                <td class="thead">$post[username]'s garage</td>
        </tr>
        <if condition="$post['field7']">
                <tr><td class="vbmenu_option">Year: $post[field7]</td></tr>
        </if>
        <if condition="$post['field8']">
                <tr><td class="vbmenu_option">Model: $post[field8]</td></tr>
        </if>
        <if condition="$post['field9']">
                <tr><td class="vbmenu_option">Color: $post[field9]</td></tr>
        </if>
        <if condition="$post['field10']">
                <tr><td class="vbmenu_option">Mods: $post[field10]</td></tr>
        </if>
</div>
<!-- / post specs_menu -->
and this is what I got. When not selected there is only one post per page.
I removed the code so not to screw up my board.


Aligator21 08-10-2006 09:19 AM

Hi again, i have another question!

Can i dublicate this hack?
I want to use it for another extra fields.

How can i do this???

Wired1 08-10-2006 11:57 AM

1996: I'm going to try to duplicate the problem tonight if I have time.

Aligator: Can you be more precise in what you want to do?

Aligator21 08-11-2006 07:15 AM

In my forum, i have your hack for users favorite games.
I want to add and another drop down menu, for my users pc specs.

is there any way to do this???

Wired1 08-11-2006 01:59 PM

Quote:

Originally Posted by Aligator21
In my forum, i have your hack for users favorite games.
I want to add and another drop down menu, for my users pc specs.

is there any way to do this???

Yes, although it depends on some other things. Do you want a seperate entry page? If not, then simply repeat the last two steps of the instruction file with whatever you'd like in the second dropdown. If you do want a seperate entry page, then some minor code edits have to be made to the plugins, products, and instructions, just so no variables conflict basically.

Wired1 08-13-2006 01:02 AM

Quote:

Originally Posted by 1996 328ti
I deleted all products and started from scratch, and this is what I got. When not selected there is only one post per page. I removed the code so not to screw up my board.

Just tried it on postbit_legacy on my test server, worked fine. May want to try turning off all other plugins, then see how it works. Assuming it does, enable a plugin one by one to see which one does it.

hurry 08-13-2006 05:04 AM

Is it possible to have url links in these dropdown rows? Also I want it only for the admin usergroup.

Wired1 08-13-2006 05:32 AM

Links: No.

You'd have to place conditionals around the last two steps in the instructions. They are the ones that place the dropdowns in the posts.

Why only admins though?

ssvp 08-13-2006 01:20 PM

Code:

<!-- post specs_menu -->
<if condition="$post['field5']">
        <div id="specs_$post[postid]" class="vbmenu_control">
                <a href="#specs">$post[username]'s PC Specs</a>
                <script type="text/javascript"> vbmenu_register("specs_$post[postid]"); </script>
        </div>
</if>
<!-- / post specs_menu -->

How can I change this so rather than displaying the user's name again. It would just display "My Gear".

I actually was able to remove the username, but the size of the "My Gear" background seemed to change depending on the length of the username.

Wired1 08-14-2006 02:09 AM

Code:

<a href="#specs">$post[username]'s PC Specs</a>
change to

Code:

<a href="#specs">My Gear</a>
Please hit Install.

Arachnophiles 08-14-2006 01:55 PM

Hi, did you have any joy in getting the field entries to display vertically rather than horizontally ??

Cheers,
Adam.

Wired1 08-14-2006 02:33 PM

Quote:

Originally Posted by Arachnophiles
Hi, did you have any joy in getting the field entries to display vertically rather than horizontally ??

My guess as to why it happens was dead on. It's stored as a single string with \r\n for character returns. Problem is, vB strips them before I can get access to them. I know of one way to get around it, BUT... it involves recoding the whole hack and creating a new table in the database just for these fields. A little excessive IMHO.

hrm....

Bad Bunny 08-15-2006 07:16 PM

GREAT WORK! Your two profile mods are great. I really appreciate it. I made a dumb mistake and started feeling real dumb, but it was just I forgot to save a file before uploading it. lol

I'll have screenshots soon.

Wired1 08-16-2006 02:11 AM

Quote:

Originally Posted by Bad Bunny
GREAT WORK! Your two profile mods are great. I really appreciate it. I made a dumb mistake and started feeling real dumb, but it was just I forgot to save a file before uploading it. lol

I'll have screenshots soon.

Glad to hear :)

Arachnophiles 08-16-2006 09:30 AM

Quote:

Originally Posted by Wired1
My guess as to why it happens was dead on. It's stored as a single string with \r\n for character returns. Problem is, vB strips them before I can get access to them. I know of one way to get around it, BUT... it involves recoding the whole hack and creating a new table in the database just for these fields. A little excessive IMHO.

hrm....

Fair enough. Is there perhaps a way to specify a maximum width for the 'drop down', after which the text continues onto a new line ?

Cheers,
Adam.

alluidh 08-17-2006 08:25 AM

Hi Wired1
First I had to tank you for this hack, but I got a little problem
I want to use Checkboxes for the hardware (Picture 1)
In Profil everything works fine (Picture 2)
But in Dropdown there it is wrong (Picture 3)
Are you able to help?
Thanks a lot, Mike

Wired1 08-19-2006 04:08 AM

Arach:
I'll have to look into it when I get back later next week, but I believe vB's template format will prevent it, as there's no way to code it. If so, I may have to recode the whole thing to get around both limitations. It wasn't designed for loooooooooooong strings, mainly just for easy access to information that could be relevant in any post, for example, computer rigs.

alluidh:
WTF? First guess would be that you've got a typo in the dropdown code, although I haven't attempted to replicate the issue yet. Don't recall having an issue with the test bed though. I'll attempt to replicate it when I get back. Please hit INSTALL.

Snake 08-23-2006 06:51 PM

Wired, how do I remove the bold effect for the "N/A" phrase in profile view page?

Snake 08-23-2006 07:09 PM

Nevermind. :P

Chriss74 08-26-2006 09:13 AM

Nice Hack!

I submit following proposal: It would be nice, if a pictures could be placed in a user-field. This pic should be loaded via AJAX when the dropdown-info is opened. That would be a nice upgrade of this hack.

Greetings,
Chriss

Wired1 08-26-2006 07:11 PM

This hack won't work on 3.0.1 though :)

That would require a different hack.


All times are GMT. The time now is 04:31 AM.

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.01438 seconds
  • Memory Usage 1,829KB
  • 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
  • (4)bbcode_code_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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