+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: using slideshow script for Featured Listings ?

  1. #1
    Join Date
    Jun 2004
    Location
    Central Mexico
    Posts
    327

    Default using slideshow script for Featured Listings ?

    My eyes are glazing over at the code in IMAGES.INC.PHP for renderListingsMainImageSlideShow($listingID) trying to figure out how to utilize the slideshow feature for Featured Listing Thumbnails rather than tying it to the current property listing id.

    I would like to modify this script (which I would otherwise not use) so that the tag {slideshow_images} can be placed on the home page in the main.html file. Or, a new function (yes, yes, I know, "addon") like {slideshow_featured_images} will slide through the available images associated with all Featured Properties.

    Instead of seeing a static display of the featured property thumbnails that I now use I would like to see an animated slideshow of ONE featured property that cycles to the next and the next without requiring the vtour button....while the user is staring in rapt fascination at the home page.

    So, user arrives at homepage and a slideshow starts on load that cycles one Featured Property thumbnail after the other instead of the existing OR feature that only changes a display of Featured Properties on a re-load of the home page.

    I know that the SELECT in the current renderListingMainImageSlideShow has to incorporate something like this extra query:
    if ($config['use_expiration'] === "1")
    $sql = "SELECT listingsdb_id, listingsdb_title FROM " . $config['table_prefix'] . "listingsdb WHERE (listingsdb_featured = 'yes') AND (listingsdb_active = 'yes') AND (listingsdb_expiration > ".$conn->DBDate(time()).") ";
    }
    else
    {
    $sql = "SELECT listingsdb_id, listingsdb_title FROM " . $config['table_prefix'] . "listingsdb WHERE (listingsdb_featured = 'yes') AND (listingsdb_active = 'yes') ";

    I have tried using LEFT JOIN and RIGHT JOIN statments in one big query to link the listingsdb_id in listingsdb with the listingsdb_id field in the listingsimages table while grabbing the listingsimages_thumb_file_name but I am getting either error statements or when I get no error statments the {slideshow_images} tag when placed in my main.html just stays unparsed.

    Could the resident geniuses (we all know WHO you are!) show me a snatch of code that transforms the slideshow for individual listings into a slideshow for all unexpired active Featured Listings?

    Thank you for your kind consideration...

  2. #2
    Join Date
    Feb 2004
    Posts
    1,069

    Default Re: using slideshow script for Featured Listings ?

    try this, you will need another sql select to get the images

    // Get the thumbnail from the listingimages table
    $sql2 = "SELECT listingsimages_thumb_file_name FROM " . $config['t
    able_prefix'] . "listingsimages WHERE (listingsdb_id = $ID) ORDER BY listingsimage
    s_rank";
    $recordSet2 = $conn->SelectLimit($sql2, 1, 0 );
    if ($recordSet2 === false) {
    $misc->log_error($sql);
    }
    if ($recordSet2->RecordCount() > 0) {
    $thumb_file_name = $misc->make_db_unsafe ($recordSet2->fields[
    'listingsimages_thumb_file_name']);
    // gotta grab the image size
    $imagedata = GetImageSize("$config[listings_upload_path]/$thum
    b_file_name");
    $imagewidth = $imagedata[0];
    $imageheight = $imagedata[1];
    $shrinkage = $config['thumbnail_width']/$imagewidth;
    $displaywidth = $imagewidth * $shrinkage;
    $displayheight = $imageheight * $shrinkage;
    $display = "img src="'.$config['listings_view_images_path'].'/
    '.$thumb_file_name.'" align="center" height="75" width="75";

    Something like that may help.

  3. #3
    Join Date
    Jun 2004
    Location
    Central Mexico
    Posts
    327

    Default Re: using slideshow script for Featured Listings ?

    Thanks Al,

    Unfortunately, I don't know how to incorporate that or how to finish it off with another query to select the actual images that will run in the slideshow. As I said above, I know I have to check on whether Expiration is running, whether a listing is Featured, and whether today has not run past its expiration date.

    My brain is getting number than usual.

  4. #4
    Join Date
    Feb 2004
    Posts
    1,069

    Default Re: using slideshow script for Featured Listings ?

    Try this one out. There is no readme but there are instructions in the addon.inc.php.

    The zip file will create the folder featuredslide to place in your addons directory.

    If this works for you we can post it in the addon releases.
    Attached Files
    Last edited by alsmith; 04-13-2006 at 07:35 PM. Reason: Removed debug from addon

  5. #5
    Join Date
    May 2006
    Posts
    33

    Default Re: using slideshow script for Featured Listings ?

    how to use this addon?

    i don't see it in addon menu of admin panel

    what tag to use?

  6. #6
    Join Date
    Feb 2004
    Posts
    1,069

    Default Re: using slideshow script for Featured Listings ?

    Wow this is an old one.
    Read the addon.inc.php header, I believe I put something in there.

  7. #7
    Join Date
    May 2006
    Posts
    33

    Default Re: using slideshow script for Featured Listings ?

    nothing in the header :(

  8. #8
    Join Date
    Feb 2004
    Posts
    1,069

    Default Re: using slideshow script for Featured Listings ?

    this is:
    Code:
    * Addon - featuredslide
        *       Display featured listings in a slideshow
        * Al Smith
        * Place {addon_featured_slide} in your template where you want the slideshow
        * of the Featured Listings to appear. Set the width of the slideshow usind
        * $slideimagewidth below.

  9. #9
    Join Date
    May 2006
    Posts
    33

    Default Re: using slideshow script for Featured Listings ?

    can u place it on front page insted of featured images?

  10. #10
    Join Date
    Feb 2004
    Posts
    1,069

    Default Re: using slideshow script for Featured Listings ?

    well I believe so, I wrote it for someone a while back and never really finished it as a supported addon.

+ Reply to Thread

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