diff -r 000000000000 -r d970ebf37754 wp/wp-content/plugins/codecanyon-3027163-content-timeline-responsive-wordpress-plugin/pages/backup/content_timeline_frontend.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wp/wp-content/plugins/codecanyon-3027163-content-timeline-responsive-wordpress-plugin/pages/backup/content_timeline_frontend.php Wed Nov 06 03:21:17 2013 +0000 @@ -0,0 +1,346 @@ + '500', + 'easing' => 'easeOutSine', + 'hide-years' => false, + 'cat-type' => 'months', + 'number-of-posts' => '30', + + // style + 'line-width' => '920', + 'item-width' => '240', + 'item-open-width' => '490', + 'item-margin' => '20', + 'item-height' => '360', + 'read-more' => 'button', + 'close-text' => 'Close', + 'hide-line' => false, + 'line-style' => 'light', + 'hide-nav' => false, + 'nav-style' => 'light', + 'shdow' => 'show', + 'item-back-color' => '#ffffff', + 'item-background' => '', + 'item-open-back-color' => '#ffffff', + 'item-open-background' => '', + + 'button-hover-color' => '#1986ac', + 'item-image-height' => '150', + 'item-image-border-width' => '5', + 'item-image-border-color' => '#1986ac', + 'item-open-image-height' => '150', + 'item-open-content-padding' => '10', + 'item-open-image-border-width' => '5', + 'item-open-image-border-color' => '#1986ac' + +); +global $wpdb; +if($id) { + global $wpdb; + $timeline = $wpdb->get_results('SELECT * FROM ' . $wpdb->base_prefix . 'ctimelines WHERE id='.$id); + $timeline = $timeline[0]; +} +$title = $timeline->name; +$cats = "["; +$catArray = array(); +$ccNumbers = array(); +$catNumber = 0; + +foreach(explode('||',$timeline->settings) as $val) { + $expl = explode('::',$val); + if(substr($expl[0], 0, 8) == 'cat-name') { + if($cats != "[") $cats .= ","; + $cc = get_cat_name(intval(substr($expl[0], 9))); + $cats .= "'".$cc."'"; + array_push ($catArray,$cc); + array_push ($ccNumbers, 0); + $catNumber++; + } + else { + $settings[$expl[0]] = $expl[1]; + } + +} +$cats .= "]"; + +$frontHtml = ' + +'; + +if($settings['read-more'] == 'whole-item') { + $read_more = "'.item'"; + $swipeOn = 'false'; +} +else if ($settings['read-more'] == 'button') { + $read_more = "'.read_more'"; + $swipeOn = 'true'; +} +else { + $read_more = "'none'"; + $swipeOn = 'true'; +} + +if($settings['cat-type'] == 'categories') { + $cats = ', + categories : '.$cats . ', + numberOfSegments : ['; + $cats .= $settings['number-of-posts']; + for ($i = 1; $i < $catNumber; $i++) { + $cats .= ', '. $settings['number-of-posts']; + } + $cats .= ']'; +} +else { + $cats = ''; +} + +$frontHtml .=' + + +
'; + +if ($timeline->items != '') { + $explode = explode('||',$timeline->items); + $open_content_height = intval($settings['item-height']) - intval($settings['item-open-image-height']) - 2*intval($settings['item-open-content-padding']) -intval($settings['item-open-image-border-width']) - 6; + + $itemsArray = array(); + foreach ($explode as $it) { + $ex2 = explode('::', $it); + $key = substr($ex2[0],0,strpos($ex2[0],'-')); + $subkey = substr($ex2[0],strpos($ex2[0],'-')+1); + $itemsArray[$key][$subkey] = $ex2[1]; + } + foreach ($itemsArray as $key => $arr) { + $num = substr($key,4); + + if($settings['cat-type'] == 'categories') { + $index = array_search($arr['categoryid'],$catArray); + $ccNumbers[$index]++; + $arr['dataid'] = ($ccNumbers[$index] < 10 ? '0'.$ccNumbers[$index] : $ccNumbers[$index]).'/'.$arr['categoryid']; + } + if($arr['start-item']) { + $start_item = $arr['dataid']; + + } + + + +$frontHtml .=' + +
+ +

'.$arr['item-title'].'

+ '.$arr['item-content'].' + '.(($settings['read-more'] == 'button') ? '
Read more
' : '').' +
+
'; + + if ($arr['item-open-image'] != '') { + $frontHtml .= ' + +
'; + + } + else { + $frontHtml .= ' +
'; + } + + if ($arr['item-open-title'] != '') { + $frontHtml .= ' +

'.$arr['item-open-title'].'

'; + + } + $frontHtml .= ' + ' . $arr['item-open-content'].' +
+
'; + + + } +} +$frontHtml .= ' +
+ + + + + + + +'; +?> \ No newline at end of file