Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 19 Feb 2013, 17:14
KevinL KevinL is offline
 
Join Date: Apr 2005
Call 'fieldx' as a link?

I am trying to call a user field as a link in a custom page.

The user adds their custom link in the user field and it is used to link back to the site using the code below...



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Any ideas?
Reply With Quote
  #2  
Old 19 Feb 2013, 17:23
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Which template is that in? Does each user see their own link, or is it in a user's profile or post or something like that?
Reply With Quote
  #3  
Old 19 Feb 2013, 17:32
KevinL KevinL is offline
 
Join Date: Apr 2005
Thanks for the reply

I am creating my own template/page.

Yes each user would edit their settings and change the profile field to the correct URL. Similar to this page:

http://betweennapsontheporch.net/how...-your-sidebar/

The link back would change based on the URL entered in their settings.
Reply With Quote
  #4  
Old 19 Feb 2013, 17:38
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
OK, so you want all users to see the link of whatever user is being displayed? How are you getting the other user information? Are you caling fetch_userinfo() or something like that?

The data will be in the userfield table, but you don't have to read it from the database yourself unless you're getting all your info directly from the db.
Reply With Quote
  #5  
Old 19 Feb 2013, 17:44
KevinL KevinL is offline
 
Join Date: Apr 2005
No. I want each user [that edits the field in settings] to see their [own] link.

SO they will copy the code that is the box and paste it on their site and it will link back to their url.
Reply With Quote
  #6  
Old 19 Feb 2013, 17:55
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
OK, in that case try this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


where you'd replace 'X' with the actual id of your profile field.

That assumes that the above code is being put in a template. If it's not then you might want to use $vbulletin->userinfo['fieldX'] as part of the html string.
Reply With Quote
  #7  
Old 19 Feb 2013, 18:08
KevinL KevinL is offline
 
Join Date: Apr 2005
That works perfect. I forgot the 'vb:var'

Thank you!!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 12:13.

Layout Options | Width: Wide Color: