Topic: More effects for slideshow

How can I use ScrollLeft effect in slideshow? not only fade effect.

$('#featured-slideshow').cycle({
    fx: 'fade',
    speed: 1000,
    next: '#controls .next',
    prev: '#controls .prev',
    timeout: 11000,
    pause: 1,
    slideExpr: '.featured-slideshow-inner',
    height: '<?php $size = arras_get_image_size('featured-slideshow-thumb'); echo $size['h']; ?>px'
});

it was good if we could choose Timeout and the FX from settings panel

Thumbs up

Re: More effects for slideshow

To be short: you can't. Arras uses the 'min' version of the jQuery plugin and that one only has fade.

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: More effects for slideshow

extatix wrote:

To be short: you can't. Arras uses the 'min' version of the jQuery plugin and that one only has fade.

Of course it is possible! everything in PHP is possible!

so you say I need the full version of jQuery plugin? I have to add it by my self. thanks.

Thumbs up

Re: More effects for slideshow

Just replace the min version in the js folder of arras with the full version and change header.php to enqueue it.

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: More effects for slideshow

Goooooood  big_smile

thanks cool

Thumbs up

Re: More effects for slideshow

for every one who like to use more effects...
this is other versions you can use:

http://jquery.malsup.com/cycle/download.html

Thumbs up

Re: More effects for slideshow

[just a quick note for Child Theme users]

If you want to do this in a child theme you can do this. (You need to have a folder named 'js' in the child theme folder and the actual js-file in that.)

function kill_js() {
    
        wp_deregister_script( 'jquery-cycle' );

}
add_action( 'wp_print_scripts', 'kill_js', 100 );

function my_slideshow_js() {

if (is_home() || is_frontpage() ) {
wp_enqueue_script('jquery-cycle-all', get_stylesheet_directory_uri() . '/js/jquery.cycle.all.js', 'jquery', null, true); 
}
}

add_action('wp_print_scripts', 'my_slideshow_js');
My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: More effects for slideshow

extatix wrote:

[just a quick note for Child Theme users]

If you want to do this in a child theme you can do this. (You need to have a folder named 'js' in the child theme folder and the actual js-file in that.)

function kill_js() {
    
        wp_deregister_script( 'jquery-cycle' );

}
add_action( 'wp_print_scripts', 'kill_js', 100 );

function my_slideshow_js() {

if (is_home() || is_frontpage() ) {
wp_enqueue_script('jquery-cycle-all', get_stylesheet_directory_uri() . '/js/jquery.cycle.all.js', 'jquery', null, true); 
}
}

add_action('wp_print_scripts', 'my_slideshow_js');

I tried but dont see where i can change transitions

Thumbs up

Re: More effects for slideshow

Actually, this is the complete code to do it:

function kill_js() {

         wp_deregister_script( 'jquery-cycle' ); 

}
add_action( 'wp_print_scripts', 'kill_js', 100 );

function my_slideshow_js() {

if (is_home() || is_front_page() ) {
wp_enqueue_script('jquery-cycle-all', get_stylesheet_directory_uri() . '/js/jquery.cycle.all.js', 'jquery', null, true); 
}
}

add_action('wp_print_scripts', 'my_slideshow_js');


function my_add_slideshow_js() {
?>
<script type="text/javascript">
jQuery(document).ready(function($) {

<?php if (is_home() || is_front_page()) : ?>
$('#featured-slideshow').cycle({
    fx: 'wipe',
    speed: 250,
    next: '#controls .next',
    prev: '#controls .prev',
    timeout: 6000,
    pause: 1,
    slideExpr: '.featured-slideshow-inner',
    height: '<?php $size = arras_get_image_size('featured-slideshow-thumb'); echo $size['h']; ?>px'
});
<?php endif ?>
    
});
</script>
<?php
}
add_action('wp_footer', 'my_add_slideshow_js');

function my_slideshow_init() {

remove_action('wp_footer', 'arras_add_slideshow_js');
}
add_action('init', 'my_slideshow_init');

You can change the 'fx: 'wipe',' into anything from here: http://jquery.malsup.com/cycle/browser.html

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: More effects for slideshow

extatix wrote:

Actually, this is the complete code to do it:

function kill_js() {

         wp_deregister_script( 'jquery-cycle' ); 

}
add_action( 'wp_print_scripts', 'kill_js', 100 );

function my_slideshow_js() {

if (is_home() || is_front_page() ) {
wp_enqueue_script('jquery-cycle-all', get_stylesheet_directory_uri() . '/js/jquery.cycle.all.js', 'jquery', null, true); 
}
}

add_action('wp_print_scripts', 'my_slideshow_js');


function my_add_slideshow_js() {
?>
<script type="text/javascript">
jQuery(document).ready(function($) {

<?php if (is_home() || is_front_page()) : ?>
$('#featured-slideshow').cycle({
    fx: 'wipe',
    speed: 250,
    next: '#controls .next',
    prev: '#controls .prev',
    timeout: 6000,
    pause: 1,
    slideExpr: '.featured-slideshow-inner',
    height: '<?php $size = arras_get_image_size('featured-slideshow-thumb'); echo $size['h']; ?>px'
});
<?php endif ?>
    
});
</script>
<?php
}
add_action('wp_footer', 'my_add_slideshow_js');

function my_slideshow_init() {

remove_action('arras_footer', 'arras_add_slideshow_js');
}
add_action('init', 'my_slideshow_init');

You can change the 'fx: 'wipe',' into anything from here: http://jquery.malsup.com/cycle/browser.html

using a child theme I put this where?

Thumbs up

Re: More effects for slideshow

functions.php

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: More effects for slideshow

bigcobi wrote:
extatix wrote:

Actually, this is the complete code to do it:

function kill_js() {

         wp_deregister_script( 'jquery-cycle' ); 

}
add_action( 'wp_print_scripts', 'kill_js', 100 );

function my_slideshow_js() {

if (is_home() || is_front_page() ) {
wp_enqueue_script('jquery-cycle-all', get_stylesheet_directory_uri() . '/js/jquery.cycle.all.js', 'jquery', null, true); 
}
}

add_action('wp_print_scripts', 'my_slideshow_js');


function my_add_slideshow_js() {
?>
<script type="text/javascript">
jQuery(document).ready(function($) {

<?php if (is_home() || is_front_page()) : ?>
$('#featured-slideshow').cycle({
    fx: 'wipe',
    speed: 250,
    next: '#controls .next',
    prev: '#controls .prev',
    timeout: 6000,
    pause: 1,
    slideExpr: '.featured-slideshow-inner',
    height: '<?php $size = arras_get_image_size('featured-slideshow-thumb'); echo $size['h']; ?>px'
});
<?php endif ?>
    
});
</script>
<?php
}
add_action('wp_footer', 'my_add_slideshow_js');

function my_slideshow_init() {

remove_action('arras_footer', 'arras_add_slideshow_js');
}
add_action('init', 'my_slideshow_init');

You can change the 'fx: 'wipe',' into anything from here: http://jquery.malsup.com/cycle/browser.html

using a child theme I put this where?


Parse error: syntax error, unexpected '}' in /nfs/c05/h03/mnt/3813/domains/theflowlive.com/html/wp-content/themes/nullcoreII/functions.php  on line 80

this is my error

Thumbs up

Re: More effects for slideshow

can you c/p the entire functions.php ?

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: More effects for slideshow

bigcobi wrote:
bigcobi wrote:
extatix wrote:

Actually, this is the complete code to do it:

function kill_js() {

         wp_deregister_script( 'jquery-cycle' ); 

}
add_action( 'wp_print_scripts', 'kill_js', 100 );

function my_slideshow_js() {

if (is_home() || is_front_page() ) {
wp_enqueue_script('jquery-cycle-all', get_stylesheet_directory_uri() . '/js/jquery.cycle.all.js', 'jquery', null, true); 
}
}

add_action('wp_print_scripts', 'my_slideshow_js');


function my_add_slideshow_js() {
?>
<script type="text/javascript">
jQuery(document).ready(function($) {

<?php if (is_home() || is_front_page()) : ?>
$('#featured-slideshow').cycle({
    fx: 'wipe',
    speed: 250,
    next: '#controls .next',
    prev: '#controls .prev',
    timeout: 6000,
    pause: 1,
    slideExpr: '.featured-slideshow-inner',
    height: '<?php $size = arras_get_image_size('featured-slideshow-thumb'); echo $size['h']; ?>px'
});
<?php endif ?>
    
});
</script>
<?php
}
add_action('wp_footer', 'my_add_slideshow_js');

function my_slideshow_init() {

remove_action('arras_footer', 'arras_add_slideshow_js');
}
add_action('init', 'my_slideshow_init');

You can change the 'fx: 'wipe',' into anything from here: http://jquery.malsup.com/cycle/browser.html

using a child theme I put this where?


Parse error: syntax error, unexpected '}' in /nfs/c05/h03/mnt/3813/domains/theflowlive.com/html/wp-content/themes/nullcoreII/functions.php  on line 80

this is my error

<?php

if (is_admin() && isset($_GET['activated']) && $pagenow == 'themes.php') {
    $arras_options->style = 'default';
}

define( 'NULLCORE_DIR', STYLESHEETPATH );
define( 'NULLCORE_LIB', NULLCORE_DIR . '/library' );

load_child_theme_textdomain('nullcore', get_stylesheet_directory() . '/language');

require_once NULLCORE_LIB . '/tapestries.php';
require_once NULLCORE_LIB . '/custom.php';
require_once NULLCORE_LIB . '/nc-admin.php';
require_once NULLCORE_LIB . '/efca.php';
require_once NULLCORE_LIB . '/carousel.php';
require_once NULLCORE_LIB . '/sociallinks.php';
require_once NULLCORE_LIB . '/slider.php';

nullcore_flush_options();

add_action('init', 'nullcore_init');
add_action('arras_add_default_thumbnails', 'nullcore_thumbs', 15);

function nullcore_thumbs() {
    arras_add_image_size( 'custom-node-thumb', __('Tapestry: Custom Node Based', 'arras'), 195, 110);
    arras_add_image_size( 'custom-quick-thumb', __('Tapestry: Custom Quick Preview', 'arras'), 115, 115);
    arras_add_image_size( 'custom-line-thumb', __('Tapestry: Custom Per Line', 'arras'), 36, 36);
    arras_add_image_size( 'nc-carousel-thumb', __('Carousel', 'arras'), 150, 100 );
    arras_add_image_size( 'slider-thumb', __('Slider', 'arras'), 195, 195 ); 
}


function kill_js() {

         wp_deregister_script( 'jquery-cycle' );

}
add_action( 'wp_print_scripts', 'kill_js', 100 );

function my_slideshow_js() {

if (is_home() || is_front_page() ) {
wp_enqueue_script('jquery-cycle-all', get_stylesheet_directory_uri() . '/js/jquery.cycle.all.js', 'jquery', null, true);
}
}

add_action('wp_print_scripts', 'my_slideshow_js');


function my_add_slideshow_js() {
?>
<script type="text/javascript">
jQuery(document).ready(function($) {

<?php if (is_home() || is_front_page()) : ?>
$('#featured-slideshow').cycle({
    fx: 'wipe',
    speed: 250,
    next: '#controls .next',
    prev: '#controls .prev',
    timeout: 6000,
    pause: 1,
    slideExpr: '.featured-slideshow-inner',
    height: '<?php $size = arras_get_image_size('featured-slideshow-thumb'); echo $size['h']; ?>px'
});
<?php endif ?>
   
});
</script>
<?php
}
add_action('wp_footer', 'my_add_slideshow_js');

function my_slideshow_init() {

remove_action('arras_footer', 'arras_add_slideshow_js');
}

Thumbs up

Re: More effects for slideshow

There's isn't anything on line 80 here, you are missing a few lines.

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: More effects for slideshow

extatix wrote:

There's isn't anything on line 80 here, you are missing a few lines.

I have it without an error. but dont think its working

Thumbs up

Re: More effects for slideshow

bigcobi wrote:
extatix wrote:

There's isn't anything on line 80 here, you are missing a few lines.

I have it without an error. but dont think its working


any idea on how to trouble shoot, i still dont have any options.

sorry, but I have very little web design experience.

Thumbs up

Re: More effects for slideshow

I have the same code working in my NullCore II 0.4 test-install (with added options from the admin-panel) so there isn't much I can do to make it work more smile

But I actually think this is the problem:

remove_action('arras_footer', 'arras_add_slideshow_js');

Change it into

remove_action('wp_footer', 'arras_add_slideshow_js');

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: More effects for slideshow

extatix wrote:

I have the same code working in my NullCore II 0.4 test-install (with added options from the admin-panel) so there isn't much I can do to make it work more smile

But I actually think this is the problem:

remove_action('arras_footer', 'arras_add_slideshow_js');

Change it into

remove_action('wp_footer', 'arras_add_slideshow_js');

doesnt look like it working

Thumbs up

Re: More effects for slideshow

It works just fine here: http://demo.nullcore.nl/

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: More effects for slideshow

extatix wrote:

It works just fine here: http://demo.nullcore.nl/

sorry can you walk me through the step to make sure it installed properly.

Thumbs up

Re: More effects for slideshow

The steps are in post #9.

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: More effects for slideshow

<?php
wp_enqueue_script('jquery');
wp_enqueue_script('jquery-ui-tabs', null, array('jquery-ui-core', 'jquery'), null, false);

if ( is_home() || is_front_page() ) {
    wp_enqueue_script('jquery-cycle', get_template_directory_uri() . '/js/jquery.cycle.all.min.js', 'jquery', null, true);
}

if ( !function_exists('pixopoint_menu') ) {
    wp_enqueue_script('hoverintent', get_template_directory_uri() . '/js/superfish/hoverIntent.js', 'jquery', null, false);
    wp_enqueue_script('superfish', get_template_directory_uri() . '/js/superfish/superfish.js', 'jquery', null, false);
}

if ( is_singular() ) {
    wp_enqueue_script('comment-reply');
    wp_enqueue_script('jquery-validate', get_template_directory_uri() . '/js/jquery.validate.min.js', 'jquery', null, false);
}

?>
I think something is wrong here? any advice

Thumbs up

Re: More effects for slideshow

Why would anything be wrong there?

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: More effects for slideshow

Hm, you have the old script still loaded, are you sure there is this line?

remove_action('wp_footer', 'arras_add_slideshow_js');

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.