Results 1 to 9 of 9

Thread: listing field tags

  1. #1
    Join Date
    Aug 2009
    Posts
    18

    Question listing field tags

    Hello,

    I have manually added two fields in the add/edit listing form. The fields are Country and Region. I have not created them through the Edit Listing Template because I wanted to link those two fields. The fields work perfectly when it comes to searching, adding or editing a listing. The only problem though is that the tags {listing_field_country} and {listing_field_region} don't work. Neither {listing_field_country_value} and {listing_field_region_value} works. I am trying to find out how those tags are generated, but I can't find it anywhere. I looked in the code and in the databse itself, but no luck. I see all the other fields in database _listingsformelements, but the ones I created (country & region) can only be found in _listingsdbelements. Does anyone have any idea what tag I can use to display the country and region of the listings?

  2. #2
    the_sandking's Avatar
    the_sandking is offline hadron remnant - Moderation Fachmann
    Join Date
    Apr 2003
    Location
    Nullspace
    Posts
    5,289

    Default Re: listing field tags

    Fields are not the same as field contents. You create new fields (Edit Listing Template), and then add content to those fields using Add/Edit listings.

    I don't have any idea how you would add new listing fields other than via OR's Edit Listing Template feature. I'd even dare say you can't, because you can't.

    I know if you do add the fields the way they are supposed to be entered and then add contents to those fields via Add/Edit Listings than the tags you referenced will work.

    It sounds like you added content to an existing field, one that is not named 'Country' or 'Region'. To get that field to display it's contents, you would have to use the correct field name {listing_field_FIELDNAME}.
    "Much of what looks like rudeness in hacker circles is not intended to give offense. Rather, it's the product of the direct, cut-through-the-BS communications style that is natural to people who are more concerned about solving problems than making others feel warm and fuzzy."

    "We gotta' go to the crappy town where I'm a hero!"
    -Hoban 'Wash' Washburne 2485-2519


    "When you’re born you get a ticket to the freak show. When you’re born in America, you get a front-row seat.."
    -George Carlin 1937-2008

    New to Open-Realty® and need help? Check the:
    -OR DOCUMENTATION -

    Important: Read this at least once in your lifetime
    How To Ask Questions The Smart Way

  3. #3
    Join Date
    Aug 2009
    Posts
    18

    Default Re: listing field tags

    nope, I added fields through script added in the listing_editor.inc.php file, based on the way the ajax2combo addon works. If you checked my earlier posts, I've been looking for a way to make the chained fields work in the add/edit listing forms, and not only in the search form, cause then it wasn't of much help. So like I said, I don't see the fields Country and Region in my database in the _listingsformelements table, but I do see them in _listingsdbelements where you see the value of each listing. The "options" of region and country are written in the text files exactly the way the ajax2combo addon works. I just have to input all the options in these text files for the them to be available. The problem is that there is no tag to show these values, so I can't find a way to display them when you see listing details. But I'm sure there must be some other way which I can't think of.

  4. #4
    the_sandking's Avatar
    the_sandking is offline hadron remnant - Moderation Fachmann
    Join Date
    Apr 2003
    Location
    Nullspace
    Posts
    5,289

    Default Re: listing field tags

    O.K. so you are doing core hacks. That means this thread gets moved to the sandbox forum.

    Regardless, if you want the OR template tags to work, you'll have to add your listing fields correctly, or, you'd need to create another add-on or function that processes whatever it is you are doing.
    "Much of what looks like rudeness in hacker circles is not intended to give offense. Rather, it's the product of the direct, cut-through-the-BS communications style that is natural to people who are more concerned about solving problems than making others feel warm and fuzzy."

    "We gotta' go to the crappy town where I'm a hero!"
    -Hoban 'Wash' Washburne 2485-2519


    "When you’re born you get a ticket to the freak show. When you’re born in America, you get a front-row seat.."
    -George Carlin 1937-2008

    New to Open-Realty® and need help? Check the:
    -OR DOCUMENTATION -

    Important: Read this at least once in your lifetime
    How To Ask Questions The Smart Way

  5. #5
    Join Date
    Feb 2005
    Location
    BiH
    Age
    39
    Posts
    811

    Default Re: listing field tags

    If I understand you, if you are able to create this "very interesting hack", have you tried to create those two fields using listing field editor, and than to hide this listing fields from showing on add/edit listing (you will use your script to generate them on those pages)?

    The main problem (if I understand) is how to tell OR to now show this two fields on add/edit listing page?

    This would be very interesting feature request: ability to set field to not show on add/edit listing field (so we could use hack or even better an addon to for chained select).

    Or, maybe even better, you should try to open feature request for chained select, and (if you can) share your code with OR devs, so they could try to build that feature in next release of OR (from my opinion chained select is almost must have option for already great script .

  6. #6
    Join Date
    Aug 2009
    Posts
    18

    Default Re: listing field tags

    I haven't created the fields through the Edit Listing Template. I tried it once I got my code working, but then the code stoped working. I deleted the fields from the Edit Listing Template, and the code works again.

    OR displays the fields in the add/edit listing page now and stores the values in the database.

    I just figured out that the actual fields are not created anywhere in the database.. but their values are stored in the _listingsdbelements table. So these fields have no functions like other fields do, like when editing a listing, being able to display the current region/country of the listing in the drop down menu, instead of the default text "Select a Country" / "Select a Region". Also I am not able to use a tag to display their values in the listing_details_default.html or other pages. I am now working on the currently selected value to be displayed.. as well as being able to pull out the values from the text files so I can display them anywhere I want. I have no idea how I would be able to work this feature as an addon, and my method is not so good. I mean.. having text files etc. but I needed a solution to this so that's what I was able to come up with.

  7. #7
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,763

    Default Re: listing field tags

    Quote Originally Posted by Brilliant View Post
    ...I have no idea how I would be able to work this feature as an addon, and...
    You will never have it as an add-on. Add-ons does not modify core files.
    You will end with an unsupported and hacked version of Open-Realty.

    What you wish is possible. Without core files modifications. Only with a real add-on.
    The problem: this add-on is a very, very, very difficult one to code. This addon will need to replace a lot of core functions (listing fields, listing creation/editing/deleting, images related, etc).
    IMO, to have an add-on like this one... will be so expensive that I don't believe it would justify the effort to achieve it.

    Eduardo

    Open-Realty® DOCs
    We can easily forgive a child who is afraid of the dark; the real tragedy of life is when men are afraid of the light. (Author Unknown)

  8. #8
    Join Date
    Aug 2009
    Posts
    18

    Default Re: listing field tags

    Quote Originally Posted by ebmarques View Post
    IMO, to have an add-on like this one... will be so expensive that I don't believe it would justify the effort to achieve it.
    I do not underestimate your words, I agree with you and this is why I ended up changing core files and losing the oportunity to upgrade to later versions.

  9. #9
    Join Date
    Sep 2009
    Posts
    1

    Default Re: listing field tags

    Thanks for the suggestion, I wish it had worked.

Similar Threads

  1. Search Field Tags
    By nycbrokerfreedotcom in forum Addon help, ideas and discussion (CLOSED)
    Replies: 1
    Last Post: 02-14-2009, 10:09 PM
  2. Problem with SEO Listing Tags
    By FranceFan in forum General Help (CLOSED)
    Replies: 6
    Last Post: 07-25-2006, 04:43 PM
  3. Listing Template Tags
    By animas in forum General Help (CLOSED)
    Replies: 1
    Last Post: 06-27-2006, 06:53 PM
  4. listing tags showing
    By casadelcura in forum Installation/Configuration Help (CLOSED)
    Replies: 4
    Last Post: 04-16-2006, 03:29 AM
  5. Parsing of listing detail tags
    By timeforsmilin in forum General Help (CLOSED)
    Replies: 7
    Last Post: 01-03-2006, 04:21 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •