Support » Plugins » JCarousel -Please Help

  • Resolved tinkerdomino

    (@tinkerdomino)


    Please help. I am trying to use JCarousel in a site, and I just cannot get it to work. The best I can get is all the images displayed in a bulletted list. I am tearing my hair out! I am developing the site locally – could this be a problem?

    Please help me.

Viewing 15 replies - 1 through 15 (of 23 total)
  • You know the jQuery bundled with WordPress uses jQuery. rather than $. right? That had me stumped for ages…

    I am so confused now… whaaaaaaaaa?

    Could you post the Javascript you’re trying to use?

    ‘<script type=”text/javascript” src=”js/jquery.js”></script>
    <script type=”text/javascript” src=”js/jcarousellite.js”></script>
    <script>
    $(document).ready(function() {
    $(“.widget_style”).jCarouselLite({
    btnPrev: “.previous”,
    btnNext: “.next”,
    /*this makes it a true carousel rather than a slideshow*/
    circular: true
    });
    });’

    I hope is have put the code in correctly…

    Could you post the HTML you’re using as well? I think I might know what’s up, possibly. By the way, if you were trying to use backticks before, they’re not the same as quote marks.

    I have no idea what a back tick is… Sorry – we have different names for punctuation here…

    I have tried alsorts, but at the moment I ma trying these instructions:
    http://www.shahin.co.nr/how-to-install-and-style-jcarousel-lite/

    I did follow all the instructions, and they did not work. To test, I an now trying to call jc.php like this: but it has the same result.

    I have no idea what a back tick is… Sorry – we have different names for punctuation here…

    I have tried alsorts, but at the moment I ma trying these instructions:
    http://www.shahin.co.nr/how-to-install-and-style-jcarousel-lite/

    I did follow all the instructions, and they did not work. To test, I an now trying to call jc.php like this: <?php include (TEMPLATEPATH . ‘/jc.php’); ?>
    but it has the same result.

    A backtick is shown at the bottom of the post form 😛

    I think those last instructions were written for a relatively old version of WordPress. As far as I know, there isn’t such thing as TEMPLATEPATH anymore, that’s been replaced. For the sake of simplicity, let’s try this. Put all the files for jCarousel under /wp-content/plugins/jcarousel and take out everything else, you start from the beginning.

    In your theme’s functions.php (if you don’t have one, make one and put <?php and ?> around the following), put:

    wp_enqueue_script( 'jquery' );
    wp_enqueue_script( 'jcarousel', '/wp-content/plugins/jcarousel/lib/jcarousel.js', array('jquery'), 0.2.3 );
    wp_enqueue_style( 'jcarousel', '/wp-content/plugins/jcarousel/lib/jquery.jcarousel.css', null, 0.2.3 );
    wp_enqueue_style( 'jcarousel-ie7', '/wp-content/plugins/jcarousel/skins/ie7/skin.css', array('jcarousel'), 0.2.3 );

    then use the example javascript to load it in whichever page. Instead of using TEMPLATEPATH though, use get_theme_root().

    I think that should work. You can’t use <?php tags inside a WordPress page though without a special plugin, only templates, so it might be easier to just use the code instead.

    ….argh these tutorials are all horrible D:

    Thank you so much… super star

    I am ftping site, and will give it a bash tomorrow (its late here…) will let you know.

    Thank you so much again.

    sorry about backticks… I see now! DUH!

    Hi again

    I tried all, but am now getting a parse error (still local – ftping in this country is a silly joke!)

    The parse error is as follows:
    Parse error: parse error in C:\wamp\www\Thean\wp-content\themes\Thean\functions.php on line 10

    the code for fucntions is as follows:

    <?php
     if ( function_exists('register_sidebars') )
     register_sidebars(2,array(
            'before_widget' => '',
        'after_widget' => '',
     'before_title' => '<h5>',
            'after_title' => '</h5>',
        ));
    wp_enqueue_script( 'jquery' );
    wp_enqueue_script( 'jcarousel', '/wp-content/plugins/jcarousel/lib/jcarousel.js', array('jquery'), 0.2.3 );
    wp_enqueue_style( 'jcarousel', '/wp-content/plugins/jcarousel/lib/jquery.jcarousel.css', null, 0.2.3 );
    wp_enqueue_style( 'jcarousel-ie7', '/wp-content/plugins/jcarousel/skins/ie7/skin.css', array('jcarousel'), 0.2.3 );
    ?>

    And the page header template:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    
    <title><?php wp_title(''); if (function_exists('is_tag') and is_tag()) { ?>Tag Archive for <?php echo $tag; } if (is_archive()) { ?> archive<?php } elseif (is_search()) { ?> Search for <?php echo $s; } if ( !(is_404()) && (is_search()) or (is_single()) or (is_page()) or (function_exists('is_tag') and is_tag()) or (is_archive()) ) { ?> at <?php } ?> <?php bloginfo('name'); ?></title>
    	<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
    	<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_head(); ?>
    <script type="text/javascript">
    
    jQuery(document).ready(function() {
        jQuery('#mycarousel').jcarousel();
    });
    
    </script>
    </head>
    <body>
    
    <div id="wrap">
    <div id="head" onclick="location.href='http://randaclay.com/themes';" title="return to main page"; style="cursor: pointer;">
    	<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
    		<div class="description"><h2><?php bloginfo('description'); ?></h2></div>
    
    <ul id="mycarousel" class="jcarousel-skin-tango">
        <li><img src="http://static.flickr.com/66/199481236_dc98b5abb3_s.jpg" width="75" height="75" alt="" /></li>
        <li><img src="http://static.flickr.com/75/199481072_b4a0d09597_s.jpg" width="75" height="75" alt="" /></li>
        <li><img src="http://static.flickr.com/57/199481087_33ae73a8de_s.jpg" width="75" height="75" alt="" /></li>
        <li><img src="http://static.flickr.com/77/199481108_4359e6b971_s.jpg" width="75" height="75" alt="" /></li>
        <li><img src="http://static.flickr.com/58/199481143_3c148d9dd3_s.jpg" width="75" height="75" alt="" /></li>
        <li><img src="http://static.flickr.com/72/199481203_ad4cdcf109_s.jpg" width="75" height="75" alt="" /></li>
    
        <li><img src="http://static.flickr.com/58/199481218_264ce20da0_s.jpg" width="75" height="75" alt="" /></li>
        <li><img src="http://static.flickr.com/69/199481255_fdfe885f87_s.jpg" width="75" height="75" alt="" /></li>
        <li><img src="http://static.flickr.com/60/199480111_87d4cb3e38_s.jpg" width="75" height="75" alt="" /></li>
        <li><img src="http://static.flickr.com/70/229228324_08223b70fa_s.jpg" width="75" height="75" alt="" /></li>
      </ul>
    
    </div>

    This is geeting really sad!

    Thank you for all help so far…

    Oh… and I get the same error if I try to log in. If I remove the script in functions.php, I can get into the site, but the images appear as an bullet list.

    Whoops. Apparently PHP doesn’t like having numbers with double decimals outside of quote marks.

    wp_enqueue_script( 'jquery' );
    wp_enqueue_script( 'jcarousel', '/wp-content/plugins/jcarousel/lib/jcarousel.js', array('jquery'), '0.2.3' );
    wp_enqueue_style( 'jcarousel', '/wp-content/plugins/jcarousel/lib/jquery.jcarousel.css', null, '0.2.3' );
    wp_enqueue_style( 'jcarousel-ie7', '/wp-content/plugins/jcarousel/skins/ie7/skin.css', array('jcarousel'), '0.2.3' );

    Hi

    Thank you
    It is still making a buletted list. Could it be the style sheet?

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘JCarousel -Please Help’ is closed to new replies.