Will Active member Nov 16, 2011 #1 I want to pull a custom field value in a template. What could I use to achieve this?
dmnkhhn Active member Nov 18, 2011 #3 There is a template viewHelper (see Core.php, inside the ViewHelper directory, for the syntac) that you can use to show the value in a template.
There is a template viewHelper (see Core.php, inside the ViewHelper directory, for the syntac) that you can use to show the value in a template.
Will Active member Nov 18, 2011 #4 dmnkhhn said: There is a template viewHelper (see Core.php, inside the ViewHelper directory, for the syntac) that you can use to show the value in a template. Click to expand... Thanks for that. Do you know how I can pull a value from a specific field?
dmnkhhn said: There is a template viewHelper (see Core.php, inside the ViewHelper directory, for the syntac) that you can use to show the value in a template. Click to expand... Thanks for that. Do you know how I can pull a value from a specific field?
dmnkhhn Active member Nov 18, 2011 #5 The userfieldvalue viewHelper asks for the field_id and the $user. The syntax should be either this: HTML: {xen:helper userFieldValue, 'yourfieldid', $user} or HTML: {xen:helper userFieldValue, yourfieldid, $user} XenForo uses this ViewHelper in the template "message_user_info".
The userfieldvalue viewHelper asks for the field_id and the $user. The syntax should be either this: HTML: {xen:helper userFieldValue, 'yourfieldid', $user} or HTML: {xen:helper userFieldValue, yourfieldid, $user} XenForo uses this ViewHelper in the template "message_user_info".
Will Active member Nov 18, 2011 #6 dmnkhhn said: The userfieldvalue viewHelper asks for the field_id and the $user. The syntax should be either this: HTML: {xen:helper userFieldValue, 'yourfieldid', $user} or HTML: {xen:helper userFieldValue, yourfieldid, $user} XenForo uses this ViewHelper in the template "message_user_info". Click to expand... Can't seem to get this to work. For example, I have this code in the template but I want to pull the value from the field to replace a space in the code.
dmnkhhn said: The userfieldvalue viewHelper asks for the field_id and the $user. The syntax should be either this: HTML: {xen:helper userFieldValue, 'yourfieldid', $user} or HTML: {xen:helper userFieldValue, yourfieldid, $user} XenForo uses this ViewHelper in the template "message_user_info". Click to expand... Can't seem to get this to work. For example, I have this code in the template but I want to pull the value from the field to replace a space in the code.
dmnkhhn Active member Nov 19, 2011 #7 I am really sorry, I replied without having a working XenForo installation to verify my instructions. Maybe a developer can comment on this? From what I see, the above snippet should work.
I am really sorry, I replied without having a working XenForo installation to verify my instructions. Maybe a developer can comment on this? From what I see, the above snippet should work.
mrGTB Well-known member Nov 19, 2011 #8 Read this thread here, I was asking the same question before and it was answered: http://xenforo.com/community/threads/adsense-revenue-sharing-idea.23115/
Read this thread here, I was asking the same question before and it was answered: http://xenforo.com/community/threads/adsense-revenue-sharing-idea.23115/
Will Active member Nov 21, 2011 #9 mrGTB said: Read this thread here, I was asking the same question before and it was answered: http://xenforo.com/community/threads/adsense-revenue-sharing-idea.23115/ Click to expand... Thanks, that helped me figure it out. dmnkhhn said: I am really sorry, I replied without having a working XenForo installation to verify my instructions. Maybe a developer can comment on this? From what I see, the above snippet should work. Click to expand... Don't worry about it man. Thanks for your time.
mrGTB said: Read this thread here, I was asking the same question before and it was answered: http://xenforo.com/community/threads/adsense-revenue-sharing-idea.23115/ Click to expand... Thanks, that helped me figure it out. dmnkhhn said: I am really sorry, I replied without having a working XenForo installation to verify my instructions. Maybe a developer can comment on this? From what I see, the above snippet should work. Click to expand... Don't worry about it man. Thanks for your time.