• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to integrate p30imagescroll into gallery template?
PostPosted: Wed Dec 05, 2012 8:50 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Sat Mar 08, 2008 9:53 pm
Posts: 109
Location: Paloznak - Hungary
I would like to use the above mention joomla plugin as a Gallery template. I have css file, jquery file and a default.php with the content:
Code:
<?php
/**
* @Created:      P30doctor.com (Abolfazl Talebi)
* @version:      P30 Imagescroll
* @package:      Joomla
* @copyright:   Copyright (C) 2010 - 2011 P30doctor. All rights reserved.
* @license:      GNU/GPL, see LICENSE.php
* @Email:      abimanager@gmail.com
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/



defined('_JEXEC') or die('Restricted access');
$doc = JFactory::getDocument();
$base = JURI::base(true);
$doc->addStyleSheet($base.'/modules/mod_p30imagescroll/tmpl/p30imagescroll.css');


$loadjquery                = ($params->get( 'loadjquery', ''));
$boxwidth                   = ($params->get( 'boxwidth', ''));
$imageheight                = ($params->get( 'imageheight', ''));
$navigation                = ($params->get( 'navigation', ''));
$autoscroll                = ($params->get( 'autoscroll', ''));
$scrollspeed                = ($params->get( 'scrollspeed', ''));
$direction                = ($params->get( 'direction', ''));
   if ($loadjquery){
?>
<__script__ type="text/javascript" src="<?php echo $base;?>/modules/mod_p30imagescroll/tmpl/jquery.min.js"></__script>
<?php }
switch ($direction){
case 1:
$setdirection='turnRight';
break;
case 0:
$setdirection='turnLeft';
break;
}
 ?>

<__script__ type="text/javascript">
jQuery.fn.imageScroller = function(params){

var p = params || {
next:"btn1",
prev:"btn2",
frame:"product-body",
width:100,
child:"a",
auto:true,
func:function(){}
};

var _btnNext = $("#"+ p.next);
var _btnPrev = $("#"+ p.prev);
var _imgFrame = $("#"+ p.frame);
var _width = p.width;
var _child = p.child;
var _auto = p.auto;
var _func = p.func;
var _itv;

var turnLeft = function(){
_btnPrev.unbind("click",turnLeft);
if(_auto) autoStop();
_imgFrame.animate( {marginLeft:-_width}, 'fast', '', function(){
_imgFrame.find(_child+":first").appendTo( _imgFrame );
_imgFrame.css("marginLeft",0);
_btnPrev.bind("click",turnLeft);
if(_auto) autoPlay();
});
};

var turnRight = function(){
_btnNext.unbind("click",turnRight);
if(_auto) autoStop();
_imgFrame.find(_child+":last").clone().click(_func).show().prependTo( _imgFrame );
_imgFrame.css("marginLeft",-_width);
_imgFrame.animate( {marginLeft:0}, 'fast' ,'', function(){
_imgFrame.find(_child+":last").remove();
_btnNext.bind("click",turnRight);
if(_auto) autoPlay();
});
};

_btnNext.css("cursor","hand").click( turnRight );
_btnPrev.css("cursor","hand").click( turnLeft );

var autoPlay = function(){
  _itv = window.setInterval(<?php echo $setdirection;?>, <?php echo $scrollspeed;?>);
};
var autoStop = function(){
window.clearInterval(_itv);
};
if(_auto) autoPlay();
};
$(document).ready(function(){
   $(".shop-product").imageScroller({
      next:"btn1",
      prev:"btn2",
      frame:"product-body",
      width:100,
      child:"a",
      auto:<?php echo $autoscroll;?>
   });
 });
</__script>
<?php
$internalboxwidth=($boxwidth - 90 );
$boxheight=($imageheight + 50);
echo '<div class="shop-product" style="width:'.$boxwidth.'px;height:'.$boxheight.'px;" ><div class="product-wrapper" style="width:'.$internalboxwidth.'px;"><div id="product-body"  >';
$a = modP30scrollimageHelper::p30imagescroll();

if ($navigation){
echo '</div></div><span id="btn1" style=""></span><span id="btn2" style=""></span></div>';
}else{
echo '</div></div></div>';
}
?>



Can anybody help me?
Thank you in advance.

_________________
Számításaim szerint az én problémám nem is létezik...


Top
 Profile  
 
 Post subject: Re: How to integrate p30imagescroll into gallery template?
PostPosted: Tue Jan 29, 2013 8:47 pm 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 12302
Location: Arizona
It would most likely help if we could see a working version of this script...

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get its parameters.
Right click and view source is a great way to see what you have to work with.
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner