Jump to content

Need help with php code


ActiveZuuch

Recommended Posts

I have this code:

defined('_JEXEC') or die('Restricted access');

$plugin_folder = basename(dirname(dirname(dirname(__FILE__))));

$template_folder = basename(dirname(__FILE__));

$files_path = JURI::base() . 'plugins/k2/'.$plugin_folder.'/tmpl/'.$template_folder.'';

$document = &JFactory::getDocument();

$visibleItems = $plugin_params->visibleItems;

$height = $plugin_params->slider_height;

$width = $plugin_params->slider_width;

$slideType = $plugin_params->type_slider;

$orientation = $plugin_params->sorient;

$slideTime = $plugin_params->stime;

$duration = $plugin_params->sduration;

$autoslide = $plugin_params->autoSlide;

$document->addStyleSheet($files_path.'/css/stylesheet.css');

$document->addScript($files_path.'/src/'.$template_folder.'.js');

$document->addScriptDeclaration("

window.addEvent('load', function(){

new YJK2SimpleSlide({

outerContainer : 'SimpleSlide_outer',

innerContainer : 'SimpleSlide_inner',

elements: '.SimpleSlide_slide',

navigation: {

'forward':'SimpleSlide_right',

'back':'SimpleSlide_left',

container: 'SimpleSlide_inner_nav',

elements:'.SimpleSlide_navLink',

outer: 'SimpleSlide_nav',

visibleItems:$visibleItems

 

},

navInfo: 'SimpleSlide_nav_info',

navLinks: '.SimpleSlide_navLink',

slideType: $slideType,

orientation:$orientation,

slideTime:$slideTime,

duration:$duration,

autoslide:$autoslide,

startElem:0

 

});

});

 

");

?>

<div class="SimpleSlide" style="width:<?php echo $width ?>px;">

<div id="SimpleSlide_outer" class="slide" style="width:<?php echo $width ?>px; height:<?php echo $height ?>px;">

<a href="#" title="previous" id="SimpleSlide_left"></a> <a href="#" title="next" id="SimpleSlide_right"></a>

<div id="SimpleSlide_inner" style="width:<?php echo $width ?>px; height:<?php echo $height ?>px;">

 

<?php

if(!empty($all_photos)){

foreach($all_photos as $photo_row => $photo_value){

?>

<div class="SimpleSlide_slide" style="width:<?php echo $width ?>px; height:<?php echo $height ?>px; display:none">

<img src="<?php echo JURI::root().$photo_value; ?>" alt=""/>

</div>

<?php

}

}

?>

</div>

</div>

 

<div class="navContainer" style="width:<?php echo $width ?>px;">

<div id="SimpleSlide_nav" style="width:<?php echo $width ?>px;">

<div class="nav_inner" id="SimpleSlide_inner_nav">

<?php

if(!empty($all_photos)){

foreach($all_photos as $photo_row => $photo_value){

?>

<a href="#" class="SimpleSlide_navLink">

<span class="slide_img" style="background:url(<?php echo JURI::root().$photo_value ?>) no-repeat center 50%;"></span>

</a>

<?php

}

}

?>

</div>

</div>

</div>

</div>

 

This code does display what i need but in the thumbnail area it is showing a piece of big image, I need help in showing the whole image. I figured out that code in red is responsible for it, but I dont know how it can display the whole image thumbnail instead of just one piece of image. Any help would be appreciated.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.