Jump to content
Sign in to follow this  
turn3tv

Feature Pause on Hover

Recommended Posts

turn3tv

Is there a way to get a feature that transitions automatically to pause when the user's mouse is hovering over it?

Share this post


Link to post
Share on other sites
kastelic

Straight from the docs, couldn't have said it better myself: The PageLines feature section is based on the Cycle plugin for Jquery. So theoretically, anything that this plugin can do, the features can do as well. If you are interested in extending the feature, or requesting additional settings, please review the Jquery Cycle website first.

Share this post


Link to post
Share on other sites
turn3tv

It doesn't come in the platformpro install?

Share this post


Link to post
Share on other sites
turn3tv

I figured this out. If anyone needs this for future reference... In sections.features.php add

Pause:1,
in this section:
//Feature Cycle Setup
						$j('#cycle').cycle({
						    fx: '<?php if(pagelines('feffect')):?><?php echo pagelines('feffect');?><?php else:?>fade<?php endif;?>',
							sync: <?php if(pagelines('fremovesync')):?>0<?php else:?>1<?php endif;?>,
							timeout: <?php if(pagelines('timeout')):?><?php echo pagelines('timeout');?><?php else:?>0<?php endif;?>,
						    speed:  <?php if(pagelines('fspeed')):?><?php echo pagelines('fspeed');?><?php else:?>1500<?php endif;?>,
							cleartype:true,
			    			cleartypeNoBg:true,
						[b]pause:1,[/b]
							pager: 'div#featurenav'
						 });

Share this post


Link to post
Share on other sites
jordi
Hi, edit your sections.features.php on /themes/platformpro/sections/features. First you should add that setting on the 'feature_settings' array, you'll find it on line 456 [code] function section_options($optionset = null, $location = null) { if($optionset == 'new' && $location == 'bottom'){ return array( 'feature_settings' => array( [/code] The setting will appear on the PlatformPro panel in the same order as it is on that array. We'll put it on the first place. [code] function section_options($optionset = null, $location = null) { if($optionset == 'new' && $location == 'bottom'){ return array( 'feature_settings' => array( 'feature_pauseonhover' => array( 'default' => true, 'version' => 'pro', 'type' => 'check', 'inputlabel' => 'Pause on Hover?', 'title' => 'Pause on Hover', 'shortexp' => "Pause on Hover", 'exp' => "It pauses on hover :P" ), [/code] Now, you should go to line 205: [code] $autostop = ( has_filter('pagelines_feature_autostop') ) ? ', autostop: 1, autostopCount: ' . apply_filters( 'pagelines_feature_autostop', 0) : ''; [/code] and add below: [code] $pauseonhover = (pagelines_option('feature_pauseonhover')) ? 'true' : '0'; [/code] Finally, on line 214: [code] //Feature Cycle Setup printf( "$j('#cycle').cycle({fx: '%s', sync: %d, timeout: %d, speed: %d, cleartype: true, cleartypeNoBg: true, pager: 'div#featurenav'%s});", $feffect, $fsync, $timeout, $speed, $autostop ); [/code] you should have: [code] //Feature Cycle Setup printf( "$j('#cycle').cycle({pause: %s, fx: '%s', sync: %d, timeout: %d, speed: %d, cleartype: true, cleartypeNoBg: true, pager: 'div#featurenav'%s});", $pauseonhover, $feffect, $fsync, $timeout, $speed, $autostop ); [/code]

Jordi López Garrostas
programador web

Share this post


Link to post
Share on other sites
catrina
You must add [ code ] before your HTML code and then [ /code ] after the HTML code. (Remove the spaces, of course)

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×