Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: jcarousel lite / jquery image scroller for classipress

  1. #1
    Thread Starter
    Member damien's Avatar
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb jcarousel lite / jquery image scroller for classipress

    I figured out how to do it easily enough, and happy to share the details if people want to try it themselves.

    Displays 7 images or "no image" picture in a moving scroller that links back to the listing. You can read how to do it here.
    http://blog.oztree.com.au/wordpress/...rdpress-theme/

  2. #2
    Member egghead's Avatar
    Join Date
    Aug 2009
    Posts
    62
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: jcarousel lite / jquery image scroller for classipress

    Thanks for providing the tutorial. I copied the code you've provided, but for some reason the carousel is showing up vertically.
    I get a big square, the proper width of the carousel, but the images are one on top of the other.
    Any suggestions to fix this? Thanks.
    ... standing on the shoulders of giants

  3. #3
    Junior Member
    Not a Verified Customer
    malaysiads's Avatar
    Join Date
    Oct 2009
    Location
    Malaysia
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: jcarousel lite / jquery image scroller for classipress

    Yes it shows vertically too for me. Any solutions?

  4. #4
    Thread Starter
    Member damien's Avatar
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: jcarousel lite / jquery image scroller for classipress

    Hmm strange, cause making it vertical is another thing altogether, diff functions for jquery.

    The only way I've ever seen mine go vertical is when I incorrectly linked the javascript files and then it will drop and refuse to function as a slideshow. Because it's wordpress, make sure you do not have conflicting plug ins either, some of them load their own javascript and versions of jquery in the header that will seriously mess up this hack.

  5. #5
    Member egghead's Avatar
    Join Date
    Aug 2009
    Posts
    62
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: jcarousel lite / jquery image scroller for classipress

    Yea, it's not that it's setting up for a vertical carousel. But that the images are just stacked.
    I added a url in a comment on your blog so you can have a look at what's going on.
    I appreciate the effort you've put into it.
    Perhaps I could just send you some Paypal$ for a copy of the full pages (css, header and index)?
    ... standing on the shoulders of giants

  6. #6
    Thread Starter
    Member damien's Avatar
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Re: jcarousel lite / jquery image scroller for classipress

    Okay I cleaned the code up a little and seen as my blog thing is down I'll just add it here:

    files needing edits:
    classipress/header.php
    classipress/index.php
    classipress/style.css


    begin.

    Open classipress/index.php, find:
    Code:
    <div class="content">
    Add ABOVE it:
    Code:
    <div class="content">
         <div class="main">
              <div class="widget">
    
    <div class="widget_style">
    <ul>
    
    <?php while (have_posts()) : the_post(); ?>
    <li class="active"><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>. price: <?php echo get_option('currency'); ?><?php echo get_post_meta($post->ID, "price", true); ?>">
    <?php if ( get_option('main_page_img') != "no" ) { ?>
    <?php $images = get_post_meta($post->ID, "images", true);
          if (empty($images)) {?>
    [img]<?php bloginfo('template_url'); ?>/images/no_gpic.png[/img]</a><?php } else { ?>
    [img]<?php echo get_bloginfo('template_url').[/img]<?php
          if ( strstr($images, ',')) {
          $matches = explode(",", $images);
          $img_single = $matches[0];
          $img_single = explode(trailingsla****(get_option('siteurl')) . "wp-content/uploads/classipress/", $img_single);
          echo $img_single[1];
          } else {
          $img_single2 = $images;
          echo $img_single2;}?>" alt="Listing Photo" border="0" /></a>
    
          <?php } } ?>
    
          <?php endwhile; ?>[/list]
    </div>
    
         </div>
      </div>
    </div>
    save that. Open classipress/header.php

    find:
    Code:
    <?php wp_head(); ?>
    Add right below that:
    <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jcarousellite_1.0.1.pack.js"></script>
    jcarousellite_1.0.1.pack.js
    http://www.gmarwaha.com/jquery/jcarouse ... .1.pack.js

    In header.php find (at the very end) find:
    Code:
    ?>
    Add AFTER it (new lines):
    Code:
    <script type="text/JavaScript">
        $(document).ready(function() {
            $(".widget_style").jCarouselLite({
                btnPrev: ".previous",
                btnNext: ".next",
    		    auto: 6000,
    			visible: 7,
                /*this makes it a true carousel rather than a slideshow*/
                circular: true
            });
        });
    	</script>
    Save header.php

    Open classipress/style.css add at the bottom:
    Code:
    .widget {
    width:895px;
    margin-left: 22px;
    padding-top:10px;
    }
    .widget a.previous{
    	float:left;
    	display:block;
    	background:url(images/sprev.jpg) bottom;
    	width:34px;
    	height:34px;
    	margin-top:28px;
    	margin-right:2px;
    }
    
    .widget a.next{
    	float:right;
    	display:block;
    	background:url(images/snext.jpg) bottom;
    	width:34px;
    	height:34px;
    	margin-top:-71px;
    }
    
    .widget_style {
    text-align:left;
    padding:0px 0px 0px 0px;
    }
    
    .widget_style ul {
    margin:0;
    padding:0;
    }
    
    .widget_style li {
    height:89px;
    width:109px;
    background:url(images/imgbg.png) left top no-repeat;
    list-style:none;
    margin:0;
    padding:10px 0px 0px 10px;
    }
    
    .widget_style img {
    width:90px;
    height:68px;
    }
    Upload these images to classipress/images


    You can change the default image referenced in index.php code for having no photo for the advert.
    Documentation/functions for jcarousellite is here:
    http://www.gmarwaha.com/jquery/jcarousellite/#doc

    That's it.

  7. #7
    Thread Starter
    Member damien's Avatar
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: jcarousel lite / jquery image scroller for classipress

    finished product


  8. #8
    Veteran sarge's Avatar
    Join Date
    Jun 2009
    Location
    USA
    Posts
    628
    Thanks
    2
    Thanked 9 Times in 9 Posts

    Re: jcarousel lite / jquery image scroller for classipress

    Just tried it and it the photos are still vertical instead of horizontal.
    Always treat everyone with respect and courtesy, but trust no one.

  9. #9
    Thread Starter
    Member damien's Avatar
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: jcarousel lite / jquery image scroller for classipress

    Quote Originally Posted by Sarge
    Just tried it and it the photos are still vertical instead of horizontal.
    It's the js files or javascript not firing.

    Look in the source to your page and click those two links for the js files, just to be sure they are where they are supposed to be. If you get tons of javascript when it opens it works. If not, make sure you have the files where the link points.

    Next it's seeing if you have any other plugins or mods conflicting, the easy and brutal way to check is remove everything classipress uses for javascript.

    Code:
    <script type='text/javascript' src='<?php bloginfo('template_url'); ?>/includes/js/global.js'></script>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/iconified.js"></script>
    <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/iconified.css" media="screen" />
    <script type='text/javascript' src='<?php bloginfo('template_url'); ?>/includes/js/fancybox/jquery.easing.1.3.js'></script>
    <script type='text/javascript' src='<?php bloginfo('template_url'); ?>/includes/js/fancybox/jquery.fancybox-1.2.6.pack.js'></script>
    <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/includes/js/fancybox/jquery.fancybox-1.2.6.css" type="text/css" />
    All that stuff - remove it. If it starts working, you'll have to do trial and error getting the javascript files to play nicely, by moving them around, try loading all the classipress js above first, add the jcarousel lite js files after it in header.

    Or pm me your link, I'll have a look.

  10. #10
    Veteran sarge's Avatar
    Join Date
    Jun 2009
    Location
    USA
    Posts
    628
    Thanks
    2
    Thanked 9 Times in 9 Posts

    Re: jcarousel lite / jquery image scroller for classipress

    I did remove some javascript, perhaps not all of it.

    The links work fine, its just the pics are vertical and not horizontal as they should be.

    Do you have a easier resolution? I looked through all of the code but found nothing relating to horizontal or vertical.
    Always treat everyone with respect and courtesy, but trust no one.

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Displaying a Main Image or Large Image for listings
    By kwave12 in forum ClassiPress General Discussion
    Replies: 20
    Last Post: December 10th, 2010, 03:47 PM
  2. classipress on steroids - image rating/uploading
    By damien in forum Showcase & Feedback
    Replies: 4
    Last Post: February 2nd, 2010, 11:17 PM