Support Forums

How to display User Registration Field Name Assigned to Extra3, in Search Result page

This is a discussion on How to display User Registration Field Name Assigned to Extra3, in Search Result page within the Technical Support forums, part of the Technical Support Forums category; What version of 68 Classifieds are you running? V4.1.6 Developer What template are you using? default Please describe in detail ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

Reply
 
Thread Tools Display Modes
Old 01-06-2010, 08:15 PM   #1
Customer
 
Join Date: Dec 2009
Posts: 73
Rep Power: 11
user2616 has a spectacular aura about
Default How to display User Registration Field Name Assigned to Extra3, in Search Result page

What version of 68 Classifieds are you running?
V4.1.6 Developer

What template are you using?
default

Please describe in detail the issue you are having:
In admin User Registration Fields form, I assigned "Agency" as Extra3 field name.

In Search Result Page, I am able to display the data value of the User Registration Extra3 field.
But, I do not know how to display the User Registration Extra3 field name "Agency"

Following is the Search Result Page:
*removed*

Currently, I have hard coded User Registration Extra3 field name: Agengy:
Displaying the data value of the User Registration Extra3 field: ABC

Please help.

Thank you in advance.

Bala
__________________
v4.1.9 Developer - Default Template (custom)

Last edited by Blair; 02-16-2010 at 11:37 AM.
user2616 is offline   Reply With Quote
Old 01-06-2010, 09:26 PM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 136
Eric Barnes is just really nice Eric Barnes is just really nice
Default

You should be able to use {$entry.extra3} in the showlistings template.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 01-06-2010, 11:27 PM   #3
Customer
 
Join Date: Dec 2009
Posts: 73
Rep Power: 11
user2616 has a spectacular aura about
Default

Thank you Eric for your reply.

I am able to display the User Registration Field value of Extra3 using {$entry.extra3}.

But, my problem is that I am not able to display the User Registration Field name of Extra3.

For example:
In admin User Registration Fields form, I key in "Agency" in Extra3 field.
Please see attached file User "Registration Fields.pdf"

My Question:
How to display the Extra3 field name, that is "Agency"?

Thank you
Attached Files
File Type: pdf User Registration Fields.pdf (14.9 KB, 5 views)
__________________
v4.1.9 Developer - Default Template (custom)
user2616 is offline   Reply With Quote
Old 01-07-2010, 09:15 AM   #4
curmudgeon
 
Join Date: Mar 2006
Posts: 5,416
Rep Power: 139
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Display it where? Not all variables are available in all templates. Use the smarty DEBUG console to see what variables are available to you on each page of your site as you navigate around.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 01-07-2010, 10:59 AM   #5
Customer
 
Join Date: Dec 2009
Posts: 73
Rep Power: 11
user2616 has a spectacular aura about
Default

Hello Larry,

I want to display the User Registration Field NAME of Extra3 and User Registration Field VALUE of Extra3 in Search Result Page (showlisting2.tpl).

I am able to display User Registration Field VALUE of Extra3 using {$entry.extra3}.

But, I do not know how to display the User Registration Field NAME of Extra3. In my case, in admin User Registration Fields form, I keyed in "Agency" in Extra3 field as field name.

Following is my Search Result Page:
*removed*

In each record, you may notice the display "Agengy: ABC".
"ABC" is the User Registration Field VALUE of Extra3. I am displaying "ABC" using {$entry.extra3}.
Currently, I have hard coded "Agengy:"
But, I want to display the User Registration Field NAME of Extra3 that is "Agengy:"

I really appreciate your help.

Thank you.
__________________
v4.1.9 Developer - Default Template (custom)

Last edited by Blair; 02-16-2010 at 11:38 AM.
user2616 is offline   Reply With Quote
Old 01-07-2010, 11:10 AM   #6
curmudgeon
 
Join Date: Mar 2006
Posts: 5,416
Rep Power: 139
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

As I said above you can look at the DEBUG output and see if the value of the filed name itself is vailable to you, if it is not, then you would have to hard code it like you did OR alter the underlying php script to query the database and retrieve the value stored for the field name and assign it to the templates so it can be displayed via a template variable.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 01-07-2010, 11:39 AM   #7
All Hands On Deck
 
seymourjames's Avatar
 
Join Date: Mar 2008
Posts: 3,527
Rep Power: 89
seymourjames is a jewel in the rough
Default

What is the issue in hardcoding the word agency into the showlistings file and then displaying the extra filed value beside it? seems reasonable to do that. If you really must then create a smarty constant in english.php or whatever language file you are using and then put that in the showlistings.tpl file but it amounts to pretty much the same thing.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C
seymourjames is offline   Reply With Quote
Old 01-11-2010, 05:13 PM   #8
Customer
 
Join Date: Dec 2009
Posts: 73
Rep Power: 11
user2616 has a spectacular aura about
Default

Thank you all for your reply.

As seymourjames mentioned, I am ok with hardcoding the field names for extra, extra2 and extra3 fields in showlistings if the software cannot provide the field names.
__________________
v4.1.9 Developer - Default Template (custom)
user2616 is offline   Reply With Quote
Old 01-11-2010, 07:18 PM   #9
All Hands On Deck
 
seymourjames's Avatar
 
Join Date: Mar 2008
Posts: 3,527
Rep Power: 89
seymourjames is a jewel in the rough
Default

You probably can do it differently by consulting the database if they are not available to the template file but in the interests of saving time it is probably just easier to write them in.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68C
seymourjames is offline   Reply With Quote
Old 01-11-2010, 07:50 PM   #10
Customer
 
Join Date: Dec 2009
Posts: 73
Rep Power: 11
user2616 has a spectacular aura about
Default

seymourjames, I agree with you that in the interests of saving time it is probably just easier to write them in.

But, I wish that 68 Classified provides the field names for extra, extra2, extra3 under {$results} in showlisting2.

Currently, showlisting2 debug console shows the following fields under {$results}:
Array (2)
0 => Array (27)
id => "19"
owner => "2"
title => "3NG Blk 313 AMK Sale Sale Sale Sale S..."
featured => "Y"
section => "4"
shortDescription => ""
description => "Sale Sale Sale Sale Sale Sale Sale Sa..."
price => "0.00"
dateadded => "2010-01-12 08:28:21"
expiration => "2010-01-19 08:28:41"
display => "Y"
pHighlighted => "N"
pBold => "N"
hitcount => "0"
url => ""
username => "MrAgent"
state => ""
city => ""
country => ""
extra => ""
extra2 => ""
extra3 => ""
status => "Y"
image => false
class => "featured "
link => "viewlisting.php?view=19"
custom => ""

Cannot see the field names for extra, extra2, extra3.
__________________
v4.1.9 Developer - Default Template (custom)
user2616 is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
extra registration field in viewlisting page damiun Customizations 3 10-22-2009 02:35 PM
User registration extra field with multiple selection magicosta Technical Support 4 04-22-2009 10:13 AM
Extra field Drop down list in User Registration hel68c Modules / Plugins / Modifications 3 02-08-2009 07:33 PM
Modification: Display Search String on Search Results Page jonahcoyote Modules / Plugins / Modifications 22 07-26-2008 07:08 AM
How to create dropdown list options for Extra Field in "User Registration Fields"? Success Technical Support 11 06-02-2008 11:38 AM


All times are GMT -4. The time now is 05:13 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0