vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to add two User Profile Field Single-Line Text Box to create one profile field. (https://vborg.vbsupport.ru/showthread.php?t=259296)

blind-eddie 02-23-2011 03:23 AM

How to add two User Profile Field Single-Line Text Box to create one profile field.
 
I have to created two User Profile Field Single-Line Text Box just to show one clickable named url. (Editable by members)

How would I go about being able to use 2 User Profile Field Single-Line Text Box, one for name & other for URL in one profile field? Doing this would reduce me having to create two member editable profile fields to show link name in dropdown and less added code to the navbar.
I know this would have to be hard coded, which I prefer.

What I use now to allow members to create clickable links in a navbar dropdown.

Code:

                <if condition="$bbuserinfo[field32]"><tr><td class="vbmenu_option"><a href="$bbuserinfo[field32]$session[sessionurl_q]" TARGET="_blank">$bbuserinfo[field32]</td></tr> </if>
I allow members 10 links, which means I created 20 new User Profile Field Single-Line Text Box just for this to work. Reducing it to 10 would be great.
I created this small template edit a couple versions back, but it still works for all versions up to 3.8.6. Link to in in my profile.

Thanks...

blind-eddie 02-26-2011 12:46 PM

Let me rephrase the question.
Is it possible to create a two part profile field single line text field and produce single output?

kh99 02-26-2011 12:54 PM

So are you saying that you still want 20 text fields but you want them arranged differently in the profile editor (like in pairs)?

ETA: I don't know how to do this, so if anyone else knows, please answer...

blind-eddie 02-26-2011 01:54 PM

Yes, that would be great, how would I go about adding the two in the same frame.
Image below shows what it looks like now.

http://blind-eddie.com/images/mylinks4.JPG

I added an extra profile page via wired1's mod since the list could get very long.

Thanks in advance.

Lynne 02-26-2011 03:43 PM

Let me see if I understand what you are trying to do. You want to create a new dropdown for each user that shows up to 10 custom links for them? And right now, each link requires two profile fields - one for the URL and one for the Site Name?

Could you have just two fields and tell them to separate the URLs/Names with a comma and then explode the string on the comma to create an array and then spit it out that way?

blind-eddie 02-26-2011 06:37 PM

I already created the template edit a few versions back & yes each link requires two profile fields to create the click-able link in the drop down.
I don't know how to do what you described to me, sorry.
I am fine with it how I set it up, but is a little bit of work to set it all up for members to use.
If nothing else, if you can tell me how to show Link One Name & Link One URL in same frame as shown below instead of how I displayed it in earlier post, I would really appreciate it very much.....

http://blind-eddie.com/images/mylinks_3.PNG


All times are GMT. The time now is 03:07 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.01008 seconds
  • Memory Usage 1,720KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete