default.php

Download Link
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<?php 

/**
* @package MB Nivo Slider Module
* @Copyright (C) 2012 marbol2
* @ All rights reserved
* @ Joomla! is Free Software
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* Contact to : mariuszboloz@gmail.com
* @version 1.0
**/



defined('_JEXEC') or die('Restricted access'); 
$doc =& JFactory::getDocument(); 
$base_url = JURI::base();


$jquery				= $params->get('jquery');
$width				= $params->get('width');
$height				= $params->get('height');
$effect 			= $params->get('effect');
$slices				= $params->get('slices');
$boxCols			= $params->get('boxCols');
$boxRows			= $params->get('boxRows');
$animSpeed			= $params->get('animSpeed');
$pauseTime			= $params->get('pauseTime');
$startSlide			= $params->get('startSlide');
$directionNav		= $params->get('directionNav');
$directionNavHide	= $params->get('directionNavHide');
$controlNav			= $params->get('controlNav');
$randomStart		= $params->get('randomStart');
$cssStyle			= $params->get('style');

$directNavVerPos	= $params->get('direct_nav_ver_pos');
$directNavHorPos	= $params->get('direct_nav_hor_pos');

$image1				= $params->get('slide1_image');
$url1				= $params->get('slide1_url');
$desc1				= $params->get('slide1_desc');
$target1			= $params->get('slide1_target');

$image2				= $params->get('slide2_image');
$url2				= $params->get('slide2_url');
$desc2				= $params->get('slide2_desc');
$target2			= $params->get('slide2_target');

$image3				= $params->get('slide3_image');
$url3				= $params->get('slide3_url');
$desc3				= $params->get('slide3_desc');
$target3			= $params->get('slide3_target');

$image4				= $params->get('slide4_image');
$url4				= $params->get('slide4_url');
$desc4				= $params->get('slide4_desc');
$target4			= $params->get('slide4_target');

$image5				= $params->get('slide5_image');
$url5				= $params->get('slide5_url');
$desc5				= $params->get('slide5_desc');
$target5			= $params->get('slide5_target');

$image6				= $params->get('slide6_image');
$url6				= $params->get('slide6_url');
$desc6				= $params->get('slide6_desc');
$target6			= $params->get('slide6_target');

$image7				= $params->get('slide7_image');
$url7				= $params->get('slide7_url');
$desc7				= $params->get('slide7_desc');
$target7			= $params->get('slide7_target');

$image8				= $params->get('slide8_image');
$url8				= $params->get('slide8_url');
$desc8				= $params->get('slide8_desc');
$target8			= $params->get('slide8_target');

$image9				= $params->get('slide9_image');
$url9				= $params->get('slide9_url');
$desc9				= $params->get('slide9_desc');
$target9			= $params->get('slide9_target');

$image10			= $params->get('slide10_image');
$url10				= $params->get('slide10_url');
$desc10				= $params->get('slide10_desc');
$target10			= $params->get('slide10_target');

$doc->addStyleSheet($base_url."/modules/mod_mbNivoSlider/css/nivo-slider.css");
$doc->addStyleSheet($base_url."/modules/mod_mbNivoSlider/css/default.css");

if ($cssStyle !='default'):
	$doc->addStyleSheet($base_url."/modules/mod_mbNivoSlider/css/".$cssStyle.".css");
endif;

$doc->addStyleDeclaration ("
.nivo-directionNav a {top:".$directNavVerPos."px;}
.theme-default a.nivo-nextNav  {right:".$directNavHorPos."px;}
.theme-default a.nivo-prevNav {left:".$directNavHorPos."px;}
");


if($jquery=='1') : 
$doc->addScript($base_url."/modules/mod_mbNivoSlider/js/jquery-1.7.2.min.js");
endif;
$doc->addScript($base_url."/modules/mod_mbNivoSlider/js/jquery.nivo.slider.pack.js");


$doc->addScriptDeclaration("
	$(window).load(function() {
		$('#slider').nivoSlider({
			effect: '".$effect."', // random Specify sets like: 'fold,fade,sliceDown'
			slices: ".$slices.", // 15 For slice animations
			boxCols: ".$boxCols.", // 8 For box animations
			boxRows: ".$boxRows.", // 4 For box animations
			animSpeed: ".$animSpeed.", // 500 Slide transition speed
			pauseTime: ".$pauseTime.", // 3000 How long each slide will show
			startSlide: ".$startSlide.", // 0 Set starting Slide (0 index)
			directionNav: ".$directionNav.", // true Next & Prev navigation
			directionNavHide: ".$directionNavHide.", // true Only show on hover
			controlNav: ".$controlNav.", // true 1,2,3... navigation
			randomStart: ".$randomStart." // false Start on a random slide
		});
	});
");

?>



<div class="slider-wrapper theme-default">
<div class="bg-top"></div>
<div class="ribbon"></div>
	<div id="slider" style="width:<?php echo $width ?>px; height:<?php echo $height ?>px;" class="nivoSlider">
		
		<?php if ($image1 != '' ) : ?>
			<?php if ($url1 !=  '') : ?>			
				 <a href="<?php echo $url1 ?>" target="<?php echo $target1 ?>"><img src="<?php echo JURI::base(), $image1 ?>" alt="" title="<?php echo $desc1 ?>" /></a>			
			<?php else : ?>			
				<img src="<?php echo JURI::base(), $image1 ?>" alt="" title="<?php echo $desc1 ?>" />			
			<?php endif; ?>		
		<?php endif; ?>
		
		
		<?php if ($image2 != '' ) : ?>
			<?php if ($url2 !=  '') : ?>			
				 <a href="<?php echo $url2 ?>" target="<?php echo $target2 ?>"><img src="<?php echo JURI::base(), $image2 ?>" alt="" title="<?php echo $desc2 ?>" /></a>			
			<?php else : ?>			
				<img src="<?php echo JURI::base(), $image2 ?>" alt="" title="<?php echo $desc2 ?>" />			
			<?php endif; ?>		
		<?php endif; ?>
		
		<?php if ($image3 != '' ) : ?>
			<?php if ($url3 !=  '') : ?>			
				 <a href="<?php echo $url3 ?>" target="<?php echo $target3 ?>"><img src="<?php echo JURI::base(), $image3 ?>" alt="" title="<?php echo $desc3 ?>" /></a>			
			<?php else : ?>			
				<img src="<?php echo JURI::base(), $image3 ?>" alt="" title="<?php echo $desc3 ?>" />			
			<?php endif; ?>		
		<?php endif; ?>
		
		<?php if ($image4 != '' ) : ?>
			<?php if ($url4 !=  '') : ?>			
				 <a href="<?php echo $url4 ?>" target="<?php echo $target4 ?>"><img src="<?php echo JURI::base(), $image4 ?>" alt="" title="<?php echo $desc4 ?>" /></a>			
			<?php else : ?>			
				<img src="<?php echo JURI::base(), $image4 ?>" alt="" title="<?php echo $desc4 ?>" />			
			<?php endif; ?>		
		<?php endif; ?>
		
		<?php if ($image5 != '' ) : ?>
			<?php if ($url5 !=  '') : ?>			
				 <a href="<?php echo $url5 ?>" target="<?php echo $target5 ?>"><img src="<?php echo JURI::base(), $image5 ?>" alt="" title="<?php echo $desc5 ?>" /></a>			
			<?php else : ?>			
				<img src="<?php echo JURI::base(), $image5 ?>" alt="" title="<?php echo $desc5 ?>" />			
			<?php endif; ?>		
		<?php endif; ?>
		
		<?php if ($image6 != '' ) : ?>
			<?php if ($url6 !=  '') : ?>			
				 <a href="<?php echo $url6 ?>" target="<?php echo $target6 ?>"><img src="<?php echo JURI::base(), $image6 ?>" alt="" title="<?php echo $desc6 ?>" /></a>			
			<?php else : ?>			
				<img src="<?php echo JURI::base(), $image6 ?>" alt="" title="<?php echo $desc6 ?>" />			
			<?php endif; ?>		
		<?php endif; ?>
		
		<?php if ($image7 != '' ) : ?>
			<?php if ($url7 !=  '') : ?>			
				 <a href="<?php echo $url7 ?>" target="<?php echo $target7 ?>"><img src="<?php echo JURI::base(), $image7 ?>" alt="" title="<?php echo $desc7 ?>" /></a>			
			<?php else : ?>			
				<img src="<?php echo JURI::base(), $image7 ?>" alt="" title="<?php echo $desc7 ?>" />			
			<?php endif; ?>		
		<?php endif; ?>
		
		<?php if ($image8 != '' ) : ?>
			<?php if ($url8 !=  '') : ?>			
				 <a href="<?php echo $url8 ?>" target="<?php echo $target8 ?>"><img src="<?php echo JURI::base(), $image8 ?>" alt="" title="<?php echo $desc8 ?>" /></a>			
			<?php else : ?>			
				<img src="<?php echo JURI::base(), $image8 ?>" alt="" title="<?php echo $desc8 ?>" />			
			<?php endif; ?>		
		<?php endif; ?>
		
		<?php if ($image9 != '' ) : ?>
			<?php if ($url9 !=  '') : ?>			
				 <a href="<?php echo $url9 ?>" target="<?php echo $target9 ?>"><img src="<?php echo JURI::base(), $image9 ?>" alt="" title="<?php echo $desc9 ?>" /></a>			
			<?php else : ?>			
				<img src="<?php echo JURI::base(), $image9 ?>" alt="" title="<?php echo $desc9 ?>" />			
			<?php endif; ?>		
		<?php endif; ?>
		
		<?php if ($image10 != '' ) : ?>
			<?php if ($url10 !=  '') : ?>			
				 <a href="<?php echo $url10 ?>" target="<?php echo $target10 ?>"><img src="<?php echo JURI::base(), $image10 ?>" alt="" title="<?php echo $desc10 ?>" /></a>			
			<?php else : ?>			
				<img src="<?php echo JURI::base(), $image10 ?>" alt="" title="<?php echo $desc10 ?>" />			
			<?php endif; ?>		
		<?php endif; ?>
		
	
	</div>
	
	<div class="bg-bottom"></div>
	
</div>