wp/wp-content/plugins/codecanyon-3027163-content-timeline-responsive-wordpress-plugin/pages/content_timeline_preview.php
changeset 0 d970ebf37754
equal deleted inserted replaced
-1:000000000000 0:d970ebf37754
       
     1 <?php 
       
     2 include_once($this->path . '/pages/default_settings.php');
       
     3 
       
     4 $title = $tname;
       
     5 $catArray = array();
       
     6 $ccNumbers = array();
       
     7 foreach(explode('||',$tsettings) as $val) {
       
     8 	$expl = explode('::',$val);
       
     9 	$settings[$expl[0]] = $expl[1];
       
    10 	if(substr($expl[0], 0, 8) == 'cat-name') {
       
    11 		$cc = get_cat_name(intval(substr($expl[0], 9)));
       
    12 		array_push ($catArray,$cc);
       
    13 		array_push ($ccNumbers, 0);
       
    14 	}
       
    15 }
       
    16 ?>
       
    17 <style type="text/css">
       
    18 #tl<?php echo $id; ?> .timeline_line {
       
    19  	width: <?php echo $settings['line-width']; ?>px;
       
    20 } 
       
    21 
       
    22 #tl<?php echo $id; ?> .t_line_view {
       
    23  	width: <?php echo $settings['line-width']; ?>px;
       
    24 } 
       
    25  
       
    26 #tl<?php echo $id; ?> .t_line_m {
       
    27 	width: <?php echo ((int)$settings['line-width'])/2-2; ?>px;
       
    28 }
       
    29  
       
    30 #tl<?php echo $id; ?> .t_line_m.right {
       
    31 	left: <?php echo ((int)$settings['line-width'])/2-1; ?>px;
       
    32 	width: <?php echo ((int)$settings['line-width'])/2-1; ?>px;
       
    33 }
       
    34  
       
    35 #tl<?php echo $id; ?> .t_node_desc {
       
    36 	background:  <?php echo $settings['node-desc-color']?>;
       
    37 }
       
    38 
       
    39 #tl<?php echo $id; ?> .item h2,
       
    40 #content #tl<?php echo $id; ?> .item h2 {
       
    41 	font-size: <?php echo $settings['item-header-font-size']?>px;
       
    42 	color: <?php echo $settings['item-header-font-color']?>;
       
    43 	line-height: <?php echo $settings['item-header-line-height']?>px;
       
    44 	
       
    45 	<?php switch($settings['item-header-font-type']) {
       
    46 	case 'regular' : echo '
       
    47 	font-weight:normal;
       
    48 	font-style:normal;'; break;
       
    49 	
       
    50 	case 'thick' : echo '
       
    51 	font-weight:100;
       
    52 	font-style:normal;'; break;
       
    53 	
       
    54 	case 'bold' : echo '
       
    55 	font-weight:bold;
       
    56 	font-style:normal;'; break;
       
    57 	
       
    58 	case 'bold-italic' : echo '
       
    59 	font-weight:bold;
       
    60 	font-style:italic;'; break;
       
    61 	
       
    62 	case 'italic' : echo '
       
    63 	font-weight:normal;
       
    64 	font-style:italic;'; break;} ?>
       
    65 } 
       
    66 
       
    67  
       
    68 #tl<?php echo $id; ?> .item {
       
    69  	width: <?php echo $settings['item-width']; ?>px;
       
    70 	height: <?php echo $settings['item-height']; ?>px;
       
    71 	background:<?php echo $settings['item-back-color']; ?> url(<?php echo $settings['item-background']; ?>) repeat; 
       
    72 	font-size: <?php echo $settings['item-text-font-size']?>px;
       
    73 	color: <?php echo $settings['item-text-font-color']?>;
       
    74 	line-height: <?php echo $settings['item-text-line-height']?>px;
       
    75 	
       
    76 	<?php switch($settings['item-text-font-type']) {
       
    77 	case 'regular' : echo '
       
    78 	font-weight:normal;
       
    79 	font-style:normal;'; break;
       
    80 	
       
    81 	case 'thick' : echo '
       
    82 	font-weight:100;
       
    83 	font-style:normal;'; break;
       
    84 	
       
    85 	case 'bold' : echo '
       
    86 	font-weight:bold;
       
    87 	font-style:normal;'; break;
       
    88 	
       
    89 	case 'bold-italic' : echo '
       
    90 	font-weight:bold;
       
    91 	font-style:italic;'; break;
       
    92 	
       
    93 	case 'italic' : echo '
       
    94 	font-weight:normal;
       
    95 	font-style:italic;'; break;} ?>
       
    96 	
       
    97 	<?php if($settings['shadow'] == 'show') {
       
    98 	echo '
       
    99 	-moz-box-shadow: 0px 0px 6px rgba(0,0,0,0.5);
       
   100 	-webkit-box-shadow: 0px 0px 6px rgba(0,0,0,0.5);
       
   101 	box-shadow: 0px 0px 6px rgba(0,0,0,0.5);';
       
   102 	}
       
   103 	else {
       
   104 	echo '
       
   105 	-moz-box-shadow: 0 0 0 #000000;
       
   106 	-webkit-box-shadow: 0 0 0 #000000;
       
   107 	box-shadow: 0 0 0 #000000;';
       
   108 	} ?>
       
   109  }
       
   110 <?php if($settings['shadow'] == 'on-hover') {
       
   111 echo '
       
   112 #tl'. $id . ' .item:hover {
       
   113 	-moz-box-shadow: 0px 0px 6px rgba(0,0,0,0.5);
       
   114 	-webkit-box-shadow: 0px 0px 6px rgba(0,0,0,0.5);
       
   115 	box-shadow: 0px 0px 6px rgba(0,0,0,0.5);;
       
   116 }';
       
   117 } ?>
       
   118 
       
   119 #tl<?php echo $id; ?> .item_open h2,
       
   120 #content #tl<?php echo $id; ?> .item_open h2 {
       
   121 	font-size: <?php echo $settings['item-open-header-font-size']?>px;
       
   122 	color: <?php echo $settings['item-open-header-font-color']?>;
       
   123 	line-height: <?php echo $settings['item-open-header-line-height']?>px;
       
   124 	
       
   125 	<?php switch($settings['item-open-header-font-type']) {
       
   126 	case 'regular' : echo '
       
   127 	font-weight:normal;
       
   128 	font-style:normal;'; break;
       
   129 	
       
   130 	case 'thick' : echo '
       
   131 	font-weight:100;
       
   132 	font-style:normal;'; break;
       
   133 	
       
   134 	case 'bold' : echo '
       
   135 	font-weight:bold;
       
   136 	font-style:normal;'; break;
       
   137 	
       
   138 	case 'bold-italic' : echo '
       
   139 	font-weight:bold;
       
   140 	font-style:italic;'; break;
       
   141 	
       
   142 	case 'italic' : echo '
       
   143 	font-weight:normal;
       
   144 	font-style:italic;'; break;} ?>
       
   145 } 
       
   146 
       
   147 #tl<?php echo $id; ?> .item_open {
       
   148  	width: <?php echo $settings['item-open-width']; ?>px;
       
   149 	height: <?php echo $settings['item-height']; ?>px;
       
   150 	background:<?php echo $settings['item-open-back-color']; ?> url(<?php echo $settings['item-open-background']; ?>) repeat; 
       
   151  	font-size: <?php echo $settings['item-open-text-font-size']?>px;
       
   152 	color: <?php echo $settings['item-open-text-font-color']?>;
       
   153 	line-height: <?php echo $settings['item-open-text-line-height']?>px;
       
   154 	
       
   155 	<?php switch($settings['item-open-text-font-type']) {
       
   156 	case 'regular' : echo '
       
   157 	font-weight:normal;
       
   158 	font-style:normal;'; break;
       
   159 	
       
   160 	case 'thick' : echo '
       
   161 	font-weight:100;
       
   162 	font-style:normal;'; break;
       
   163 	
       
   164 	case 'bold' : echo '
       
   165 	font-weight:bold;
       
   166 	font-style:normal;'; break;
       
   167 	
       
   168 	case 'bold-italic' : echo '
       
   169 	font-weight:bold;
       
   170 	font-style:italic;'; break;
       
   171 	
       
   172 	case 'italic' : echo '
       
   173 	font-weight:normal;
       
   174 	font-style:italic;'; break;} ?>
       
   175 	
       
   176 	<?php if($settings['shadow'] == 'show' || $settings['shadow'] == 'on-hover') {
       
   177 	echo '
       
   178 	-moz-box-shadow: 0px 0px 6px rgba(0,0,0,0.5);
       
   179 	-webkit-box-shadow: 0px 0px 6px rgba(0,0,0,0.5);
       
   180 	box-shadow: 0px 0px 6px rgba(0,0,0,0.5);';
       
   181 	}
       
   182 	else {
       
   183 	echo '
       
   184 	-moz-box-shadow: 0 0 0 #000000;
       
   185 	-webkit-box-shadow: 0 0 0 #000000;
       
   186 	box-shadow: 0 0 0 #000000;';
       
   187 	} ?>
       
   188  }
       
   189  
       
   190  
       
   191  
       
   192  #tl<?php echo $id; ?> .item .con_borderImage{
       
   193  	border-bottom: <?php echo $settings['item-image-border-width']; ?>px solid <?php echo $settings['item-image-border-color']; ?> ; 
       
   194  }
       
   195  
       
   196  #tl<?php echo $id; ?> .item_open .con_borderImage{
       
   197  	border-bottom: <?php echo $settings['item-open-image-border-width']; ?>px solid <?php echo $settings['item-open-image-border-color']; ?> ; 
       
   198  }
       
   199 
       
   200 #tl<?php echo $id; ?> .item_open_cwrapper {
       
   201  	width: <?php echo $settings['item-open-width']; ?>px;
       
   202 }
       
   203 
       
   204 #tl<?php echo $id; ?> .item_open .t_close:hover {
       
   205 	background:<?php echo $settings['button-hover-color']; ?>;
       
   206 }
       
   207 
       
   208 #tl<?php echo $id; ?> .timeline_open_content {
       
   209 	padding:<?php echo $settings['item-open-content-padding']; ?>px;
       
   210 }
       
   211 
       
   212 
       
   213 
       
   214 </style>
       
   215 
       
   216 
       
   217 <?php 
       
   218 if($settings['read-more'] == 'whole-item') {
       
   219 	$read_more = "'.item'";
       
   220 }
       
   221 else if ($settings['read-more'] == 'button') {
       
   222 	$read_more = "'.read_more'";
       
   223 }
       
   224 else {
       
   225 	$read_more = "'.none'";
       
   226 }
       
   227 ?>
       
   228 
       
   229 <!-- BEGIN TIMELINE -->
       
   230 <div id="tl<?php echo $id; ?>" class="timeline <?php if($settings['line-style'] == 'dark') echo 'darkLine'; if($settings['nav-style'] == 'dark') echo 'darkNav'?>">
       
   231 
       
   232 <?php
       
   233 if ($titems != '') {
       
   234 	$imge_height = $settings['item-width']*125/200;
       
   235 	$imge_open_height = $settings['item-open-width']*155/490;
       
   236 	$explode = explode('||',$titems);
       
   237 	$itemsArray = array();
       
   238 	foreach ($explode as $it) {
       
   239 		$ex2 = explode('::', $it);
       
   240 		$key = substr($ex2[0],0,strpos($ex2[0],'-'));
       
   241 		$subkey = substr($ex2[0],strpos($ex2[0],'-')+1);
       
   242 		$itemsArray[$key][$subkey] = $ex2[1];
       
   243 	}
       
   244 	foreach ($itemsArray as $key => $arr) {
       
   245 		$num = substr($key,4);
       
   246 		if($settings['cat-type'] == 'categories') {
       
   247 			$index = array_search($arr['categoryid'],$catArray);
       
   248 			$ccNumbers[$index]++;
       
   249 			$arr['dataid'] = ($ccNumbers[$index] < 10 ? '0'.$ccNumbers[$index] : $ccNumbers[$index]).'/'.$arr['categoryid'];
       
   250 		}
       
   251 		if($arr['start-item']) {
       
   252 			$start_item = $arr['dataid'];
       
   253 			
       
   254 		}
       
   255 	?>
       
   256 
       
   257 
       
   258 
       
   259 
       
   260 		<div class="item" data-id="<?php echo $arr['dataid']; ?>"<?php if($arr['node-name'] && $arr['node-name'] != '') echo ' data-name="'.$arr['node-name'].'"'; ?> data-description="<?php echo substr($arr['item-title'],0,30); ?>">
       
   261 			<a href="#" class="image_rollover_bottom">
       
   262 			<img class="con_borderImage" src="<?php echo $this->url . 'timthumb/timthumb.php?src=' . $arr['item-image'] . '&w='.$settings['item-width'].'&h='.$settings['item-image-height']; ?>" alt=""/>
       
   263 			</a>
       
   264 			<h2><?php echo $arr['item-title']; ?></h2>
       
   265 			<span><?php echo $arr['item-content']; ?></span>
       
   266 			<?php if ($settings['read-more'] == 'button') { echo '<div class="read_more" data-id="'.$arr['dataid'].'">Read more</div>'; } ?>
       
   267 		</div>
       
   268 		<div class="item_open" data-id="<?php echo $arr['dataid']; ?>">
       
   269 		
       
   270 			<?php if ($arr['item-open-image'] != '') {?>
       
   271 			<img class="con_borderImage" src="<?php echo $this->url . 'timthumb/timthumb.php?src=' . $arr['item-open-image'] . '&w='.$settings['item-open-width'].'&h='.$settings['item-open-image-height']; ?>" alt=""/>
       
   272 			<div class="timeline_open_content" style="height: <?php echo $open_content_height;?>px">
       
   273 			
       
   274 			<?php } else { ?>
       
   275 			<div class="timeline_open_content <?php if($arr['desable-scroll']) echo ''; else echo 'scrollable-content'; ?>" style="height: <?php echo intval($settings['item-height']) - 2*intval($settings['item-open-content-padding']); ?>px">
       
   276 			<?php } ?>
       
   277 			
       
   278 			<?php if ($arr['item-open-title'] != '') { ?><h2><?php echo $arr['item-open-title']; ?></h2><?php } ?>
       
   279 			<?php echo $arr['item-open-content']; ?>
       
   280 			</div>
       
   281 		</div>
       
   282 <?php
       
   283 	}
       
   284 }
       
   285 ?>
       
   286 </div> <!-- END TIMELINE -->
       
   287 
       
   288 <input type="hidden" id="ctimeline-preview-start-item" value="<?php echo $start_item; ?>" />
       
   289