Results 1 to 10 of 10

Thread: Search Results Class & Addons

  1. #1
    Join Date
    Nov 2009
    Posts
    66

    Question Search Results Class & Addons

    Hi all not sure if this should go in templates or addons...

    Never the less, a client of mine asked to include a 3rd party addon in the Search Results Class page...

    I've tried this by including the {addon} tag in the search_results_class_2.html but nothing shows up but the standard search results template below my addon tag...

    Is there a way around this or am I out of luck?

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

    Default Re: Search Results Class & Addons

    Quote Originally Posted by b-town View Post
    Is there a way around this or am I out of luck?
    Sorry but we can't "just guess" wich is the problem you are facing!
    You need to give us much more details about it. For example, a link to a page so we can see it... a link to download your add-on so we can see the code... Wich Open-Realty version you have installed...

    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
    Nov 2009
    Posts
    66

    Arrow Re: Search Results Class & Addons

    Well I'm working to adapt an addon I tossed together some time ago (borrowed most of the code from another addon), to select featured listings by class. More so when I am done, I want to add a subset of featured listings by class.

    That is to say instead of using the default selection of "Featured Listing" I'll add a table column for "Featured by Class"...

    Attached is the original version that displays the default "Featured Listings". jQueryClassSlider.zip

    OR 2.5.8

    http://bit.ly/eVfgTR

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

    Default Re: Search Results Class & Addons

    I made a test with your add-on and O-R v.2.5.8 and it worked just fine.
    I went to see your "search_results_class_2.html" and there is no add-on tag at that file - so if you don't include the add-on tag at the template file, for sure the add-on will not work.

    Eduardo

    p.s.: At line 60 of your add-on you have:
    Code:
    effect: '."'fade'".',
    Make it be (it is a clean way to have the same):
    Code:
    effect: \'fade\',
    Also, you have 2 instances with:
    Code:
    $featured_thumb_width = '300px' ;
    $featured_thumb_height = '240px' ;
    Make it be:
    Code:
    $featured_thumb_width = '300';
    $featured_thumb_height = '240';
    Last edited by ebmarques; 01-06-2011 at 01:14 PM. Reason: 2 instances with...

    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)

  5. #5
    Join Date
    Nov 2009
    Posts
    66

    Default Re: Search Results Class & Addons

    Thanks much Eduardo, looks like that did the trick to get it to show up correctly.

    I'm getting ready to add the finishing touches to this addon but I've noticed something. In order to make it work as I would like I believe I'll have to hack the core code..?

    Any suggestions on how to approach this?

    As it is now you can make a listing featured through the admin listing editor.

    However it seems I will need to add another column to the listing database and the another selection on the admin listing editor to make it featured by class...

    To be a little clearer on the explanation. I want to feature many listings in one class on the home page as "featured" but have the option to for only a few in one class show in this addon when looking at the index.php?action=searchresults&pclass[]=2.
    Last edited by b-town; 01-13-2011 at 11:16 PM. Reason: Didn't post a question :-)

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

    Default Re: Search Results Class & Addons

    Quote Originally Posted by b-town View Post
    ...To be a little clearer on the explanation. I want to feature many listings in one class on the home page as "featured" but have the option to for only a few in one class show in this addon when looking at the...
    I don't see the need to edit core files.
    If I really got what you wish, an add-on can handle it - but you will need to create new listing fields. For example:
    At the "Edit Listing Template" create a new listing field named "addonfeat1", type "Select List", with elements "yes||no" available ONLY for classID 1 and set the "Show Field to" only to admin or only to agent (as you wish, so this field will not be printed at your pages to the public).
    Repeat and create a new listing field named "addonfeat2" available ONLY for classID 2, the same as above.
    And so on...
    Then you will need to edit the listings you wish to be "featured" by class (add-on'ed) - setting "yes" for the ones you wish.
    You will end with a different number of "featured" listings by class, that will ONLY be handled by your add-on, according the classID.
    Of course, I can't say if your add-on is properly coded to make it work as above. That's up to you.

    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)

  7. #7
    Join Date
    Nov 2009
    Posts
    66

    Default Re: Search Results Class & Addons

    Haven't got around to changing the addon code yet. :-) I was to a bit more concerned this might not be easily done.

    However the suggestions you have sound very good as a solution for this.

    With any luck I'll have this up and working in a bit.

    Thanks again for the help!

  8. #8
    Join Date
    Nov 2009
    Posts
    66

    Default Re: Search Results Class & Addons

    Okay, so it is more difficult than I thought.

    With the idea being I can place this addon in any search results class page, and returned those featured in this class. How can I grab the current class, dynamically?

    So, if I place it on index.php?action=searchresults&pclass[]=2 the addon will see it is looking for the results of class 2 and likewise for other classes.

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

    Default Re: Search Results Class & Addons

    Research using PHP's $_GET variables a bit. The current class is present as a $_GET variable named "pclass" and it is an array.
    "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

  10. #10
    Join Date
    Nov 2009
    Posts
    66

    Default Re: Search Results Class & Addons

    Gotcha, thank you.

Similar Threads

  1. Different search results limit per class?
    By kazdar in forum Sandbox (CLOSED)
    Replies: 1
    Last Post: 04-11-2009, 11:22 AM
  2. Different search results limit per class?
    By kazdar in forum General Help (CLOSED)
    Replies: 1
    Last Post: 04-11-2009, 11:22 AM
  3. Added New Class - But No Search Results?
    By zmc in forum General Help (CLOSED)
    Replies: 8
    Last Post: 01-22-2009, 01:13 PM
  4. Search results in class not appearing
    By ncosper in forum General Help (CLOSED)
    Replies: 1
    Last Post: 06-13-2008, 08:51 PM
  5. Search results by Class id
    By Burtie in forum General Help (CLOSED)
    Replies: 5
    Last Post: 10-30-2006, 03:09 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
  •