Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-21-2006, 06:20 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Pulling info from a profile field

Hi peeps

I have just created a new profile field and now i would like to pull the information from the said field.....

I would like to add this information into a new page (Logican's web template)

Please can someone advise as to how to do this....

I have tried this

Code:
<if condition="$post['field24']"><div>$vbphrase[referral]: $post[field24]</div></if>
Didnt work, i got a parse error
Again i tried this and got another parse error

Code:
<if condition="$post[field24] != ''"><div class="smallfont">
I have copied these from other hacks that pull infor from profile fields and trying them

Also is there away that the profile field information can show which member it pulled the info from please?
Something like this

Bashy-----------------[field24]
member---------------[field24]
nother member--------[field24]

get the idea?
Reply With Quote
  #2  
Old 06-21-2006, 06:50 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You nailed it both times. There must be errant characters in your template.

The var is going to contain the custom field info from the posting member.
Reply With Quote
  #3  
Old 06-21-2006, 06:52 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well actually i tried them both in the postbit and thats where i got the errors for the code.....
Reply With Quote
  #4  
Old 06-21-2006, 06:54 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We can be sure of one thing here, what you showed us will work.

However, I think your problem is in code in the template we here can't see. Perhaps you are causing a nesting problem?
Reply With Quote
  #5  
Old 06-21-2006, 07:04 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok lets try a differant way...

Can it be used in a html page or does it have to be a full php page?

Ok...this is what i have, nothing shows apart from

Code:
How did you find us :
Heres my code

Code:
<table width='100%'><tr>
	<td class="panelsurround" align="center" >
	<div class="panel">
		  <div style="width:100%" align="$stylevar[left]"> 
     How did you find us : 
<if condition="$bbuserinfo[field29] != ''">$vbphrase[referral]:<div class="smallfont"></if>
    </div></div>
</td>
</tr>
</table>
From what i can make out, this code should show the member, their field and the phrase, is this correct code?

EDIT:

Right...The code

Code:
<if condition="$post['field29']"><div>$vbphrase[referral]: $post[field29]</div></if>
works in the postbit, but does not work in this code

Code:
<table width='100%'><tr>
	<td class="panelsurround" align="center" >
	<div class="panel">
		  <div style="width:100%" align="$stylevar[left]"> 
     How did you find us : 
<if condition="$bbuserinfo['field29']"><div>$vbphrase[referral] $post[field29]</div></if>
    </div></div>
</td>
</tr>
</table>
Its not showing the info in a new web template (Logicans)
Also in the post bit (just for testing the code) it aint pulling the username.

Have i mentioned i want to compile a list of all members and show [fieldX] along with thier name?
Reply With Quote
  #6  
Old 06-21-2006, 07:57 PM
noppid noppid is offline
 
Join Date: Mar 2003
Location: Florida
Posts: 1,875
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you link me to the page or the hack you got the code from? I don't understand what's going on ie. what user id is being used for the custom fields info and where ya get it.
Reply With Quote
  #7  
Old 06-21-2006, 08:05 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The code is made up from a template within logicans web templates...
It was just something to use to base this on is all...

See it working here its the How did you find us? in the postbit
Although this will be removed once i sort the list out

that main code i want working in the template is

Code:
<if condition="$bbuserinfo['field29']"><div>$vbphrase[referral] $post[field29]</div></if>
like i said it works in the postbit (sort of) it shows the user's profile field.

I think for what im wanting the $bbuserinfo is not the right variable as i want
to create a list of ALL members that have filled [fieldx] showing [fieldx] like this

Bashy-----------------[field24]
member---------------[field24]
nother member--------[field24]
Reply With Quote
  #8  
Old 06-21-2006, 08:10 PM
gulldarek gulldarek is offline
 
Join Date: Dec 2001
Location: London, UK
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You'll have to query all users from db with non-empty specified profile field and iterate through printing the code.
Reply With Quote
  #9  
Old 06-22-2006, 03:02 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dam...that means nothing to me
Can someone ellaborate please, Perhaps peterska2 knows a little more?

Quote:
Originally Posted by gulldarek
You'll have to query all users from db with non-empty specified profile field and iterate through printing the code.
Reply With Quote
  #10  
Old 06-22-2006, 09:06 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You will need to include a query on the userfields table to get this to work on other pages (it would work on memberlist, postbit, and memberinfo only otherwise). However, to include the query will require some PHP coding, so I'm not really the person to ask. The HTML that you have is spot on, and that's my field of knowledge, not PHP.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 08:53 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07307 seconds
  • Memory Usage 2,264KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (7)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete