vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Show Thread Enhancements - Profile Fields in a Postbit Dropdown (https://vborg.vbsupport.ru/showthread.php?t=208360)

Wired1 06-09-2010 05:33 PM

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.

Dave-M 06-13-2010 11:42 PM

Looking forward to it mate, thanks for it in advance :)

dendrob 06-14-2010 01:14 PM

Quote:

Originally Posted by Wired1 (Post 2036707)
Please be patient!

So, you're saying you want a dropdown with 50 lines?

Yes, exactly... that would be ideal... right now you can put a text box, but it shows up without line breaks. I want one field where when user enters

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!

dendrob 06-16-2010 05:59 PM

so...any ideas if this is possible or if it will be made in the next update?

Wired1 06-16-2010 10:46 PM

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.

cfish 06-18-2010 02:00 PM

1 Attachment(s)
Quote:

Originally Posted by Wired1 (Post 2051119)
Working, but ugly as hell. Probably going to just release it as a beta and see if someone with better CSS skills than I can clean it up.

I just completed a similar hack for my vB4 forum. I even managed to get my head around the styling and have used only existing stylevars for colours, so it will update with different styles. Feel free to use any of this:

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:

<!-- start Computer Details -->
<
vb:if condition="$post['field13'] OR $post['field14'] OR $post['field15'] OR $post['field16'] OR $post['field17'] OR $post['field18'] OR $post['field19'] OR $post['field20']">
        <
div class="popupmenu" style="clear:both">
            <
a href="javascript://" class="popupctrl">Computer Details</a>
            <
dl class="popupbody" style="width:250px">
                <
h6>{vb:raw post.username}'s Computer Details</h6>
            <vb:if condition="$post['
field13']">
                <dt>Operating System:</dt><dd>{vb:raw post.field13}</dd>
            </vb:if>
            <vb:if condition="$post['
field14']">
                <dt>Computer:</dt><dd>{vb:raw post.field14}</dd>
            </vb:if>
            <vb:if condition="$post['
field16']">
                <dt>Motherboard:</dt><dd>{vb:raw post.field16}</dd>
            </vb:if>
            <vb:if condition="$post['
field17']">
                <dt>CPU:</dt><dd>{vb:raw post.field17}</dd>
            </vb:if>
            <vb:if condition="$post['
field18']">
                <dt>RAM:</dt><dd>{vb:raw post.field18}</dd>
            </vb:if>
            <vb:if condition="$post['
field19']">
                <dt>Graphics:</dt><dd>{vb:raw post.field19}</dd>
            </vb:if>
            <vb:if condition="$post['
field20']">
                <dt>Stotage:</dt><dd>{vb:raw post.field20}</dd>
            </vb:if>
            <vb:if condition="$post['
field15']">
                <dt>Monitor:</dt><dd>{vb:raw post.field15}</dd>
            </vb:if>
            </dl>
        </div>

</vb:if>
<!-- end Computer Details --> 

I have added this just below the avatar in the postbit_legacy template (there's no template hook in that location) but I guess it could go at any hook location.

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&quot; Wide</dd>               
                        </dl>
                </div>
<!-- end Computer Details -->

Notice that the definition list has a fixed width. This is because the default "auto" value restricts it to the with of the postbit user info column, so I'm forcing it to be wider.

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;
}

In the default style:

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!

Wired1 06-18-2010 03:43 PM

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.

Dennis B 06-22-2010 03:39 PM

Thanks cfish. :)

cfish 06-22-2010 03:49 PM

Quote:

Originally Posted by Dennis B (Post 2057526)
Thanks cfish. :)

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.

dendrob 06-22-2010 06:46 PM

Quote:

Originally Posted by Wired1 (Post 2054719)
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.

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

Dave-M 07-14-2010 12:36 AM

Quote:

Originally Posted by Wired1 (Post 2055492)
Gotta remember to post my code tonight.


Amnesia, it's a terrible thing. :D

gamerfu 07-17-2010 11:09 PM

Whoops! You are going to release a 4.0.x. Can't wait! :D

Dave-M 07-25-2010 12:06 PM

Hi Wired1,

Has this been abandoned then for VB4? If so, I'll have to pay someone to code something similar for me, seems a shame cause your mod was great. :)

Dave.

Wired1 08-15-2010 05:15 AM

v4.0's up: https://vborg.vbsupport.ru/showthread.php?t=248651

Sorry for the delay guys, but my last job was running me ragged with late hours and well past 40+ hours a week with odd days. Eating / sleeping prioritized over coding :( New job's standard hours, and I'm rested up, so here's the code! Managed to fix some bugs too, but one or 2 arose. Fricking hate vB4 ATM :mad:

viper357 08-19-2010 06:17 PM

Has anybody figured out how to allow members to place a clickable link in the drop down menu?

For example, my members want to place a link to a particular thread on the forum so that other members can click on the link to read all about that member's thread.

Thanks.

Wired1 08-20-2010 01:26 AM

Code for URLs
Code:

<tr><td class="vbmenu_option" align="left"><a href="private.php" rel="nofollow">Private Messages</a></td></tr>
My code:
Code:

<tr><td class="vbmenu_control"><b>Processor</b></td><td class="vbmenu_option">$post[field6]</td></tr>
Mash em up how you'd like in the Dropdown - Manual template and you're good to go. UNTESTED.

viper357 08-20-2010 08:47 AM

Quote:

Originally Posted by Wired1 (Post 2086640)
Code for URLs
Code:

<tr><td class="vbmenu_option" align="left"><a href="private.php" rel="nofollow">Private Messages</a></td></tr>
My code:
Code:

<tr><td class="vbmenu_control"><b>Processor</b></td><td class="vbmenu_option">$post[field6]</td></tr>
Mash em up how you'd like in the Dropdown - Manual template and you're good to go. UNTESTED.

That sort of worked but it broke the layout of the dropdown menu, so I modified it a bit and came up with this which works perfectly.

Code:

<tr><td class="vbmenu_option">My Tank: <a href="$post[field28]" target="_blank">Click here to see my tank thread.</a></td></tr>
Thanks for the help. :up:

Saviour 02-22-2011 01:08 PM

Updating this for 4.x.x?

Wired1 02-27-2011 08:05 PM

Quote:

Originally Posted by Saviour (Post 2165403)
Updating this for 4.x.x?

Been there, done that :)
https://vborg.vbsupport.ru/showthread.php?t=248651

Llandy 04-05-2011 04:34 PM

Hey Wired1, great mod.

Question: How do i change the location of the "dropdown field" in the postbit? Say I want it to show in the bottom of the postbit, instead of above the avatar?

Wired1 04-06-2011 04:40 AM

Quote:

Originally Posted by Llandy (Post 2181154)
Hey Wired1, great mod.

Question: How do i change the location of the "dropdown field" in the postbit? Say I want it to show in the bottom of the postbit, instead of above the avatar?

Code:

$template_hook[postbit_userinfo_left]
Change that in all of the templates / plugins to the hook you want to use.

bada_bing 02-19-2013 04:17 PM

Can I get some help with this mod please, I have had this installed for years now and need to make some changes. I am using the manual template and things are working ok however I want to add an additional option and cant seem to find where the profile fields are being pulled from. As a users I see the questions in usercp but when I go to admincp to find these profile fields I don’t see them? Where is this mod getting the profile fields from?

Wired1 02-19-2013 09:44 PM

Sounds like you're also using the extra profile fields page mod I made. Go back to the instructions for it, re-do the manual edits and the fields will show up.

bada_bing 02-20-2013 04:06 PM

Quote:

Originally Posted by Wired1 (Post 2405305)
Sounds like you're also using the extra profile fields page mod I made. Go back to the instructions for it, re-do the manual edits and the fields will show up.

The fields actually show up in the usercp under edit extra fields however I cant find where to add or remove these fields? Where is this mod getting the profile fields from as they are not in the normal vb profile fields section so where is it calling them from?

Wired1 02-21-2013 12:46 AM

Quote:

Originally Posted by bada_bing (Post 2405442)
The fields actually show up in the usercp under edit extra fields however I cant find where to add or remove these fields? Where is this mod getting the profile fields from as they are not in the normal vb profile fields section so where is it calling them from?

They are normal profile fields, but because you've most likely updated the forum without re-editing the files (as per the EPFP mod instructions), they're hidden.

bada_bing 02-21-2013 03:29 PM

Quote:

Originally Posted by Wired1 (Post 2405506)
They are normal profile fields, but because you've most likely updated the forum without re-editing the files (as per the EPFP mod instructions), they're hidden.

Thanks so much that did the trick...


All times are GMT. The time now is 08:27 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.01442 seconds
  • Memory Usage 1,834KB
  • 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
  • (1)bbcode_php_printable
  • (11)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
  • (26)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