Results 1 to 5 of 5

Thread: Get listing id for search result addon

  1. #1
    Join Date
    Dec 2008
    Posts
    31

    Default Get listing id for search result addon

    I'm writing an addon that will display output for each listing in the search result loop.

    It needs to access the listing id for each search result.

    How do I access the listing id for each search result listing?

    Thanks.

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

    Default Re: Get listing id for search result addon

    Quote Originally Posted by Nuwanda View Post
    I'm writing an addon that will display output for each listing in the search result loop. It needs to access the listing id for each search result. How do I access the listing id for each search result listing?
    For example:
    function ADDONNAME_YOUR_FUNCTION() {
    global $current_ID;
    $display = '';
    if (!isset($current_ID)) {
    $current_ID = $_GET['listingID'];
    }
    $display .= $current_ID;
    return $display;
    }
    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)

  3. #3
    Join Date
    Jul 2003
    Location
    California
    Age
    43
    Posts
    4,229

    Default Re: Get listing id for search result addon

    $current_ID

    Also you'll need to set it as a global variable in order for it to work.

    This assumes your addon is trying to be used on each search result. If outside of the loop, then you will need to use, I think $matched_ids (or something similar) to get a list of all the listing ids in the search result set . That is in the developer addon documentation
    Open-Realty 2 Documentation

    ~The Difference Between an ORDEAL and an ADVENTURE is ATTITUDE~

  4. #4
    Join Date
    Dec 2008
    Posts
    31

    Default Re: Get listing id for search result addon

    Thanks, guys, much appreciated.

    Is there a list of all of the globally available vars?

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

    Default Re: Get listing id for search result addon

    Quote Originally Posted by Nuwanda View Post
    Is there a list of all of the globally available vars?
    Nope!

    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)

Similar Threads

  1. multiple listing in search result
    By arctushar in forum General Help (CLOSED)
    Replies: 1
    Last Post: 07-18-2009, 10:56 PM
  2. Listing and search result templates
    By castopia in forum Templates - Help/Ideas/Discussion (CLOSED)
    Replies: 2
    Last Post: 11-05-2008, 11:26 AM
  3. Images PopUp in Listing Details and Search Result
    By albyguest in forum Addon Releases (FREE) (CLOSED)
    Replies: 0
    Last Post: 08-06-2007, 11:04 AM
  4. help with search listing result
    By bidsea in forum General Help (CLOSED)
    Replies: 6
    Last Post: 11-06-2006, 04:44 PM
  5. Removing the search result number of listing.
    By frankmalone in forum HELP (CLOSED)
    Replies: 2
    Last Post: 08-19-2004, 05:38 PM

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
  •