Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

head.phtml

By: a guest on Feb 5th, 2013  |  syntax: None  |  size: 13.03 KB  |  views: 52  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <script type="text/javascript">var slide_on=false;</script>
  2. <?php
  3. function themeOptions ($themeOption) {
  4.         switch ($themeOption) {
  5.      
  6.      /* GENERAL */
  7.      
  8.      case 'additionalLink':
  9.            return Mage::getStoreConfig('deco/generaloptions/additional_nav');
  10.          break;
  11.      case 'menutype':
  12.        return Mage::getStoreConfig('deco/generaloptions/menutype');
  13.          break;
  14.      case 'topbanner':
  15.            return Mage::getStoreConfig('deco/generaloptions/topbanner');
  16.          break;    
  17.      case 'phones':
  18.            return Mage::getStoreConfig('deco/generaloptions/phones');
  19.          break;
  20.      case 'additionalLinkUrl':
  21.            return Mage::getStoreConfig('deco/generaloptions/additional_nav_href');
  22.          break;
  23.      
  24.       /* BackGroung */
  25.      
  26.      case 'pattern':
  27.            return Mage::getStoreConfig('deco/background/pattern');
  28.          break;
  29.      case 'maincolor':
  30.            return Mage::getStoreConfig('deco/background/maincolor');
  31.          break;  
  32.      case 'bg_repeat':
  33.            return Mage::getStoreConfig('deco/background/bg_repeat');
  34.          break;  
  35.      case 'bg_attachment':
  36.            return Mage::getStoreConfig('deco/background/bg_attachment');
  37.          break;  
  38.      case 'bg_position_x':
  39.            return Mage::getStoreConfig('deco/background/bg_position_x');
  40.          break;
  41.      case 'bg_position_y':
  42.            return Mage::getStoreConfig('deco/background/bg_position_y');
  43.          break;  
  44.      
  45.      /* PRODUCT LIST */
  46.      
  47.      case 'layer':
  48.        return Mage::getStoreConfig('deco/product_list/layer');
  49.          break;
  50.  
  51.      case 'use_share':
  52.            return (Mage::getStoreConfig('deco/share/use_share') == 1);
  53.          break;
  54.      case 'share_code':
  55.            return Mage::getStoreConfig('deco/share/share_code');
  56.          break;
  57.      case 'use_slideshow':
  58.            return (Mage::getStoreConfig('deco/slideshow/use_slideshow') == 1);
  59.          break;
  60.      case 'speed':
  61.            return Mage::getStoreConfig('deco/slideshow/speed');
  62.          break;
  63.      case 'use_zoom':
  64.            return (Mage::getStoreConfig('deco/productpage/use_zoom') == 1);
  65.          break;
  66.      case 'use_carousel':
  67.            return (Mage::getStoreConfig('deco/productpage/use_carousel') == 1);
  68.          break;
  69.      
  70.      /* COLORS */
  71.      
  72.      case 'active_color':
  73.            return Mage::getStoreConfig('deco/colors/active_color');
  74.          break;
  75.      case 'light_color':
  76.            return Mage::getStoreConfig('deco/colors/light_color');
  77.          break;
  78.      case 'button1':
  79.            return Mage::getStoreConfig('deco/colors/button1');
  80.          break;
  81.      case 'button1_hover':
  82.            return Mage::getStoreConfig('deco/colors/button1_hover');
  83.          break;
  84.      case 'button2':
  85.            return Mage::getStoreConfig('deco/colors/button2');
  86.          break;
  87.      case 'button2_hover':
  88.            return Mage::getStoreConfig('deco/colors/button2_hover');
  89.          break;
  90.      
  91.      /* FOOTER */
  92.      
  93.      case 'use_prefooter':
  94.            return (Mage::getStoreConfig('deco/footer/use_prefooter') == 1);
  95.          break;
  96.      case 'block_1':
  97.            return Mage::getStoreConfig('deco/footer/block_1');
  98.          break;
  99.      case 'block_2':
  100.            return Mage::getStoreConfig('deco/footer/block_2');
  101.          break;
  102.      case 'block_1_title':
  103.            return Mage::getStoreConfig('deco/footer/block_1_title');
  104.          break;
  105.      case 'block_2_title':
  106.            return Mage::getStoreConfig('deco/footer/block_2_title');
  107.          break;
  108.      case 'use_facebook':
  109.            return (Mage::getStoreConfig('deco/footer/use_facebook') == 1);
  110.          break;
  111.      case 'fb_title':
  112.            return Mage::getStoreConfig('deco/footer/fb_title');
  113.          break;
  114.      case 'fb_text':
  115.            return Mage::getStoreConfig('deco/footer/fb_text');
  116.          break;
  117.      case 'fb_id':
  118.            return Mage::getStoreConfig('deco/footer/fb_id');
  119.          break;
  120.      case 'use_twitter':
  121.            return (Mage::getStoreConfig('deco/footer/use_twitter') == 1);
  122.          break;
  123.      case 'tw_title':
  124.            return Mage::getStoreConfig('deco/footer/tw_title');
  125.          break;
  126.      case 'tw_text':
  127.            return Mage::getStoreConfig('deco/footer/tw_text');
  128.          break;
  129.      case 'tw_id':
  130.            return Mage::getStoreConfig('deco/footer/tw_id');
  131.          break;    
  132.      default:
  133.         return Mage::getStoreConfig($themeOption);
  134.      break;
  135.      
  136.         }
  137. }
  138. ?>
  139. <meta http-equiv="Content-Type" content="<?php echo $this->getContentType() ?>" />
  140. <title><?php echo $this->getTitle() ?></title>
  141. <meta name="description" content="<?php echo htmlspecialchars($this->getDescription()) ?>" />
  142. <meta name="keywords" content="<?php echo htmlspecialchars($this->getKeywords()) ?>" />
  143. <meta name="robots" content="<?php echo htmlspecialchars($this->getRobots()) ?>" />
  144. <link rel="icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
  145. <link rel="shortcut icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
  146. <!--[if lt IE 7]>
  147. <script type="text/javascript">
  148. //<![CDATA[
  149.     var BLANK_URL = '<?php echo $this->helper('core/js')->getJsUrl('blank.html') ?>';
  150.     var BLANK_IMG = '<?php echo $this->helper('core/js')->getJsUrl('spacer.gif') ?>';
  151. //]]>
  152. </script>
  153. <![endif]-->
  154.  
  155. <?php echo $this->getCssJsHtml() ?>
  156. <?php echo $this->getChildHtml() ?>
  157. <?php echo $this->helper('core/js')->getTranslatorScript() ?>
  158. <?php echo $this->getIncludes() ?>
  159.  
  160. <!-- MENU -->
  161. <?php $menutype = themeOptions('menutype'); ?>
  162. <?php if($menutype == 1): ?>
  163.     <link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('css/menu1.css'); ?>" media="screen"/>
  164. <?php elseif($menutype == 2): ?>
  165.     <link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('css/menu2.css'); ?>" media="screen"/>
  166.     <script type="text/javascript" src="<?php echo $this->getJsUrl('varien/menu.js'); ?>"></script>
  167. <?php endif; ?>
  168. <!-- CUSTOM COLORS AND FONTS -->
  169. <script type="text/javascript">
  170.     var ribBg = '<?php echo themeOptions('button1') ?>';
  171. </script>
  172. <?php
  173. $selectors = Array();
  174. $selectors['active_color'] = '
  175. a:hover,
  176. .block-cart-header .view_all,
  177. .currency span,
  178. .form-search button.button span,
  179. .jqTransformSelectWrapper ul a.selected,
  180. .jqTransformSelectWrapper ul a:hover,
  181. #nav ul li.over > a > span,
  182. .opc .allow.active .step-title h2,
  183. .regular-price .price,
  184. .price-box .price,
  185. .bottom-container a,
  186. #nav > li.over > a > span,
  187. #nav > li:hover > a > span,
  188. .product-tabs li.active a,
  189. a.link-learn,
  190. .pages .current,
  191. .pages li a:hover,
  192. .block-cart-header .price,
  193. .cart .totals tfoot th strong, .cart .totals tfoot td strong,
  194. .product-tabs li.active a:hover,
  195. #nav ul li.active > a > span    
  196. ';
  197.  
  198. $selectors['active_color_border'] = '
  199. .category-overlay #added,
  200. .category-overlay #added img,
  201. .product-view #added,
  202. .product-view #added .image-popup    
  203. ';
  204. $selectors['button_1'] = '
  205. button.button span,
  206. #added a.button,
  207. .new-arrow.next,
  208. .new-arrow.prev,
  209. .more-views-arrow.prev,
  210. .more-views-arrow.next,
  211. .phones div ,
  212. .etheme_cp_btn_show,
  213. .back-to,
  214. a.readmore,
  215. .tintButton,
  216. .jcarousel-next-horizontal,
  217. .jcarousel-prev-horizontal,
  218. #message a,
  219. .view-mode strong,
  220. .btn-remove,
  221. .block-progress dt,
  222. .btn-remove2,
  223. .newproduct_grid    
  224. ';
  225. $selectors['button_1_hover'] = '
  226. button.button:hover span,
  227. #added a.button:hover,
  228. .back-to:hover,
  229. a.readmore:hover,
  230. #message a:hover,
  231. .etheme_cp_btn_show:hover,
  232. .tintButton:hover,
  233. .btn-remove2:hover,
  234. .more-views-arrow.prev:hover,
  235. .more-views-arrow.next:hover,
  236. .new-arrow.next:hover,
  237. .new-arrow.prev:hover,
  238. .jcarousel-next-horizontal:hover,
  239. .jcarousel-prev-horizontal:hover    
  240. ';
  241. if($menutype == 1){
  242. $nav = '#nav > li  > ul ul > li,';
  243. $nav_hover = '#nav > li  > ul ul > li:hover,';
  244. }else{
  245. $nav = '#nav > li ul > li,';
  246. $nav_hover = '#nav > li ul > li:hover,';
  247. }
  248.  
  249. $selectors['button_2'] = '
  250. #nav > li > ul > li ul > li ,
  251. .left-categorys-container a,
  252. .button-show,
  253. .btn-edit,
  254. .block-progress dt.complete,
  255. button.btn-checkout span,
  256. button.button.btn-cart span,
  257. .block-cart-header button.checkout span    
  258. ';
  259. $selectors['button_2_hover'] = '
  260. #nav > li > ul > li ul > li:hover ,
  261. .left-categorys-container a:hover,
  262. button.btn-checkout span:hover,
  263. button.button.btn-cart:hover span,
  264. .block-cart-header button.checkout:hover span    
  265. ';
  266. $selectors['light_color'] = '
  267. .nav-container,
  268. .footer2,
  269. .header .logo img,
  270. .etheme_cp .etheme_cp_head
  271. ';
  272. $selectors['light_color_border'] = '
  273. #nav .chield,
  274. .etheme_cp,
  275. .block-cart-header #header-items    
  276. ';
  277. $selectors['light_color_color'] = '
  278. #nav > li.active > a > span    
  279. ';
  280.     function jsString($str='') {
  281.         return trim(preg_replace("/('|\"|\r?\n)/", '', $str));
  282.     }    
  283. ?>
  284. <script type="text/javascript">
  285.  
  286.     var first_color_selector = '<?php echo jsString($selectors['light_color']).','.jsString($selectors['button_2']); ?>';
  287.     var first_color_border_selector = '<?php echo jsString($selectors['light_color_border']); ?>';
  288.     var first_color_default = '<?php echo themeOptions('light_color') ?>';
  289.    
  290.     var second_color_selector = '<?php echo jsString($selectors['button_1']); ?>';
  291.     var second_color_default = '<?php echo themeOptions('button1') ?>';
  292.    
  293. </script>
  294.  
  295. <style type="text/css">
  296.     /* Active Color */
  297.     <?php echo jsString($selectors['active_color']); ?>              { color: #<?php echo themeOptions('active_color') ?>; }
  298.    
  299.     <?php echo jsString($selectors['active_color_border']); ?>       { border-color: #<?php echo themeOptions('active_color') ?>; }
  300.    
  301.     /* Button 1 */
  302.     <?php echo jsString($selectors['button_1']); ?>                  { background-color: #<?php echo themeOptions('button1') ?>;}    
  303.    
  304.     /* Button 1:hover */
  305.     <?php echo jsString($selectors['button_1_hover']); ?>            { background-color: #<?php echo themeOptions('button1_hover') ?>!important;}
  306.  
  307.     /* Button 2 */    
  308.     <?php echo jsString($nav.$selectors['button_2']); ?>             { background-color: #<?php echo themeOptions('button2') ?>;}
  309.     /* Button 2:hover */
  310.     <?php echo jsString($nav_hover.$selectors['button_2_hover']); ?> { background-color: #<?php echo themeOptions('button2_hover') ?>!important;}
  311.    
  312.     /* Light Color */
  313.     <?php echo jsString($selectors['light_color']); ?>               { background-color: #<?php echo themeOptions('light_color') ?>; }
  314.        
  315.     <?php echo jsString($selectors['light_color_border']); ?>        { border-color: #<?php echo themeOptions('light_color') ?>; }
  316.      
  317.     /*  */
  318.     .fieldset .legend,
  319.     .dashboard .box .box-title,
  320.     .data-table thead, .data-table thead tr                          { background-color: #f5f5f5;}
  321.        
  322.     <?php echo jsString($selectors['light_color_color']); ?>         { color: #<?php echo themeOptions('light_color') ?>; }
  323.    
  324.     /* Fonts */    
  325.     h1, h2, h3, h4, h5, h6,
  326.     #nav > li > a > span,
  327.     .product-tabs li a,
  328.     .block .block-title strong                                       { font-family: Ebrima, Tahoma;}
  329.    
  330. </style>
  331.  
  332. <!-- ZOOM -->
  333. <?php $use_zoom = themeOptions('use_zoom'); ?>
  334. <?php if($use_zoom): ?>
  335.     <script type="text/javascript" src="<?php echo $this->getJsUrl('zoom/easyzoom.js'); ?>"></script>
  336.     <link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('css/easyzoom.css'); ?>" media="screen"/>
  337. <?php endif; ?>
  338.  
  339.  
  340. <?php $use_slideshow = themeOptions('use_slideshow'); ?>
  341. <?php if($use_slideshow): ?>
  342. <?php $speed = themeOptions('speed'); ?>
  343. <script type="text/javascript">
  344.  jQuery.noConflict();
  345.     if(slide_on){
  346.         jQuery(document).ready(function($) {
  347.             $('.iosSlider').iosSlider({
  348.                 desktopClickDrag: true,
  349.                 touchMoveThreshold:4,
  350.                 snapToChildren: true,
  351.                 infiniteSlider: false,
  352.                 autoSlide:true,
  353.                 autoSlideTimer:<?php echo ($speed) ? $speed : '3000'  ?>,
  354.                         navSlideSelector: '.sliderNavi .naviItem',                
  355.                 navNextSelector: '.iosSlider .next',
  356.                 navPrevSelector: '.iosSlider .prev',
  357.                         onSlideChange: slideContentChange,
  358.                         onSlideComplete: slideContentComplete,
  359.                         onSliderLoaded: slideContentLoaded
  360.             });
  361.                        
  362.         });        
  363.                
  364.     }
  365. </script>
  366. <?php endif; ?>
  367.  
  368.  
  369. <script type="text/javascript">
  370.         jQuery(document).ready(function (){
  371.                 jQuery('.toolbar').jqTransform({imgPath:'<?php echo $this->getSkinUrl('images/jqforms/'); ?>'});
  372.                 jQuery('.limiter').jqTransform({imgPath:'<?php echo $this->getSkinUrl('images/jqforms/'); ?>'});
  373.         });  
  374. </script>
  375.  
  376. <style type="">
  377.     body{
  378.         background-color:#<?php echo themeOptions('maincolor') ?>;
  379.         background-attachment: <?php echo themeOptions('bg_attachment') ?>;
  380.         background-position: <?php echo themeOptions('bg_position_y') ?> <?php echo themeOptions('bg_position_x') ?>;
  381.         background-repeat: <?php echo themeOptions('bg_repeat') ?>;
  382.     }  
  383. </style>
  384. <?php if(themeOptions('pattern') && themeOptions('pattern') != ''): ?>
  385.     <style type="text/css">
  386.         body{ background-image: url(<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'wysiwyg/decostore/'.themeOptions('pattern') ?>); }    
  387.     </style>
  388. <?php endif; ?>
  389. <script type="text/javascript">var bg_default = '<?php echo themeOptions('maincolor') ?>'; var pattern_default = 'url(<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'wysiwyg/decostore/'.themeOptions('pattern') ?>)';</script>