The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Custom User Profile Field in My Template
Custom User Profile Field in My Template?
How can I add each member's custom profile fields they have entered in my template below. I need the fields to be their info in the fields and not my info. I am trying to get this template to look like this: User Name Membership Category from Country (Note the red are the fields I need to pull for each member. I used: $bbuserinfo this however makes all the information my information. How do I code this to be the specific user's custom fields and not mine?) I need the two custom fields to match the new member's fields. (PLEASE SEE ATTACHED SCREEN SHOT) Code:
<if condition="$latest_members_count%3 == '1'"><tr></if> <td class="$bgclass" align="center"> <if condition="$vboptions[c_news_letter_show_avatar]"> <img src="$member[avatarurl]" alt="$member[username]'s $vbphrase[avatar]" /> </if> <div class="smallfont"><a href="$vboptions[bburl]/member.php?u=$member[userid]">$member[username]</a></div> $bbuserinfo[field10] from: $bbuserinfo[field24] </td> <if condition="$latest_members_count%3 == '0'"></tr></if> |
#2
|
||||
|
||||
What template are you adding this code to? What does the query look like that grabs this information? That will make a difference on the name of the variable to use.
|
#3
|
||||
|
||||
Quote:
I am not sure what more I could provide you to help here... |
#4
|
||||
|
||||
I need the variable name which is in the code where the query is. And, your query needs to have grabbed the needed fields, and since I don't know the query, I have no idea if the fields are including in the query.
|
#5
|
||||
|
||||
Quote:
Thanks! --------------- Added [DATE]1254026413[/DATE] at [TIME]1254026413[/TIME] --------------- Maybe this will help. Here is the lite version of this mod. I have a paid for version... https://vborg.vbsupport.ru/showthrea...ity+newsletter |
#6
|
||||
|
||||
I have PMs turned off because even though my sig asks for users to post in the forums for help instead of PMing me, they do it anyway, so it's just easier to leave them off.
All that needs to be known is the query (to see if they grab the fields from the userfield table) and then a couple lines after that where the variable name is used (while ($this == $that.... ) line) so we know the name of the variable. Have you tried just using the variable name $member for those fields? That would be my guess for the variable name since it is already used in the template. |
#7
|
||||
|
||||
Here is some portion for you... No i dea if its what you need to help:
Code:
// Get Members $members = $db->query_read(" SELECT user.email, user.userid, user.username " . iif((!empty($vbulletin->options['c_news_letter_field'])),",userfield." . $vbulletin->options['c_news_letter_field'] . "") . " FROM " . TABLE_PREFIX . "user AS user " . iif((!empty($vbulletin->options['c_news_letter_field'])),"LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON (userfield.userid = user.userid)") . " WHERE user.userid >= " . $vbulletin->GPC['startat'] . " " . iif((!empty($vbulletin->options['c_news_letter_field']))," AND (userfield." . $vbulletin->options[c_news_letter_field] . " = '" . $vbulletin->options[c_news_letter_field_yes] . "' OR userfield." . $vbulletin->options[c_news_letter_field] . " = '')") . " " . iif((!empty($vbulletin->GPC['usergroups'])), "AND user.usergroupid IN ('" . implode("','",$c_news_letter_filter_usergroups) . "')") . " ORDER BY user.userid ASC LIMIT " . $vbulletin->GPC['perpage'] ); while ($member = $db->fetch_array($members)) |
#8
|
||||
|
||||
OK, yes, $member is the variable you would use. However, it doesn't look like the userfields are grabbed in the query. So, the query will have to be modified to include the needed fields from that table. Writing queries is not my strong point, so I don't even try to do it on here.
|
#9
|
||||
|
||||
Well I am back to square zero and in the hands of the developer. His response time and support is unknown and always he answers what ever he decides to and in parts.
So I payed for a mod that has some bugs and as usual there is little support... HOHUM... I will give him a couple more days and then have to get third party help yet again... Thanks so much for your time here. It will be nice when I have it all coded and working. |
#10
|
||||
|
||||
It may be that someone else who is good with queries can help out here. I'm just not willing to screw up a query for someone else. It looks like it shouldn't be too hard (it just needs to be rearranged a little cuz the join only happens if another condition is met).
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|