File manager - Edit - /home/jardides/www/Jardi-design/old/administrator/components/com_templateck/views/template/tmpl/ajaxtemplatecss.php
Back
<?php /** * @name Template Creator CK 3 * @package com_templateck * @copyright Copyright (C) 2013. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr */ // No direct access to this file defined('_JEXEC') or die('Restricted access'); $input = new JInput(); $templatename = $input->get('templatename', '', 'string'); $templateid = $input->get('templateid', '', 'int'); $column1width = $input->get('column1width', '', 'float'); $column2ratio = (100 - $column1width) / 100; $column2widthnoleft = $input->get('column2width', '', 'float'); $column2width = $column2widthnoleft / $column2ratio; $joomlaversion = $input->get('joomlaversion'); $blocs = $input->get('blocs', '', 'html'); $blocs = str_replace("|di|", "#", $blocs); // ne pas mettre stripslashes $blocs = json_decode($blocs); $loadBootstrap = (isset($blocs[0]->blocloadboostrap) && $blocs[0]->blocloadboostrap == '1') ? true : false; $responsivevalues = $input->get('responsivevalues', '524,758,950,1024', 'string'); $responsivevalues = explode( ',', $responsivevalues); $responsiverange = (isset($blocs[0]->responsiverange)) ? $blocs[0]->responsiverange : 'between'; $responsiveminivalue = (isset($blocs[0]->responsiveminivalue)) ? $blocs[0]->responsiveminivalue : '292'; $htmlcode_responsive = $input->get('htmlcode_responsive', '', 'html'); // refactor the blocs array $blocsbyname = array(); foreach ($blocs as $bloc) { $blocsbyname[$bloc->ckid] = $bloc; } // define the widths $mainwidth = 100 - $column1width; $centerwidth = 100 - $column2width; $centerwidthnoleft = 100 - $column2widthnoleft; $path = JPATH_ROOT . '/components/com_templateck/projects/' . $templatename; // define path to file $templatecssdest = $path . '/css/template.css'; $templatecss_rtldest = $path . '/css/template_rtl.css'; $templatecss_mobiledest = $path . '/css/mobile.css'; $templatecsstext = ''; // create css standard styles $templatecsstext .= '/* --------------------------------------- Standard styles formatting created with Template Creator on http://www.template-creator.com -----------------------------------------*/ html { height: 101/100%; } body { margin: 0; padding: 0; } * { padding: 0; margin: 0; } .flexiblecolumn { min-height: 1px; } .clr { clear : both; } audio, canvas, img, svg, video { max-width: 100%; height: auto; box-sizing: border-box; } table img { max-width: none; } '.($column1width ? ' .column.column1 { width: ' . $column1width . '%; } ' : '') . ' .column.column2 { width: ' . $column2width . '%; } '.($column1width ? ' .column.main { width: ' . $mainwidth . '%; } ' : '') . ' .column.center { width: ' . $centerwidth . '%; } '.($column1width ? ' .noleft .center.column { width: ' . $centerwidthnoleft . '%; } .noleft .column2 { width: ' . $column2widthnoleft . '%; } .noleft .main { width: 100%; } ' : '') . ' .noright .column.center { width: 100%; } .flexiblemodule, .column, .logobloc, .flexiblecolumn { float: left; } .rtl .flexiblemodule, .rtl .column, .rtl .logobloc, .rtl .flexiblecolumn { float: right; } /* for equalheights */ .equalheights > .inner > .clr { display: none; } .equalheights > .inner, .equalheights .maincenter > .inner { display: flex; } .equalheights .flexiblemodule, .equalheights .column { display: flex; } .equalheights .flexiblemodule > .inner, .equalheights .column > .inner { max-width:100%; width: 100%; box-sizing: border-box; } .videobackground { position: absolute; top: 50%; left: 50%; min-width: 100%; min-height: 100%; width: auto; height: auto; /*z-index: -1;*/ z-index: 0; -webkit-transform: translateX(-50%) translateY(-50%); transform: translateX(-50%) translateY(-50%); /*background: url(polina.jpg) no-repeat;*/ background-size: cover; object-fit: cover; } .videobackground + * { position: relative; z-index: 1; } .hasvideobackground { position: relative; overflow: hidden; } #finder-search .in.collapse { overflow: visible; } '; if ($joomlaversion == 'j3' && !$loadBootstrap) { $templatecsstext .= '/* --------------------------------------- specific to images -----------------------------------------*/ ul.actions { margin: 0; } ul.actions li a { text-decoration: none; } '; if (isset($blocs[0]->printsystemimageurl) && $blocs[0]->printsystemimageurl) $templatecsstext .= ".print-icon { list-style: none; display: inline-block; height: 16px; line-height: 16px; padding-left: 20px; background: url(../images/system/printButton.png) left center no-repeat; } "; if (isset($blocs[0]->emailsystemimageurl) && $blocs[0]->emailsystemimageurl) $templatecsstext .= ".email-icon { list-style: none; display: inline-block; height: 16px; line-height: 16px; padding-left: 20px; background: url(../images/system/emailButton.png) left center no-repeat; } "; if (isset($blocs[0]->editsystemimageurl) && $blocs[0]->editsystemimageurl) $templatecsstext .= ".edit-icon { list-style: none; display: inline-block; height: 16px; line-height: 16px; padding-left: 20px; background: url(../images/system/edit.png) left center no-repeat; } "; } // Add the layouts css $layouts = array('error404'); foreach ($layouts as $layout) { $templatecsstext .= ' /* --------------------------------------- ' . ucfirst($layout) . ' -----------------------------------------*/ '; $layoutstyletext = @file_get_contents(TEMPLATECREATORCK_PATH . '/style_' . $layout . '.css'); $templatecsstext .= $layoutstyletext; $layoutcsstext = $input->get('layout' . $layout . 'css', '', 'string'); $templatecsstext .= str_replace('|ID| ', '', $layoutcsstext) . "\n"; // load the custom layout features include_once(TEMPLATECREATORCK_PATH . '/views/template/tmpl/layout_' . $layout . '.php'); } $templatecsstext .= '/* --------------------------------------- Custom styling -----------------------------------------*/ '; $template_rtlcsstext = str_replace("float: left;", "float: right;", $templatecsstext); $cssstyles = new CssStyles(); // create css for mobile responsive design $cssmobilestyles = new CssMobileStyles(); $templatemobilecsstext = $cssmobilestyles->create($blocs, $column1width, $column2width, $templateid, $htmlcode_responsive); // create css for each bloc foreach ($blocs as $bloc) { if (stristr($bloc->class, 'flexiblemodules')) { // $flexiblemodulesCss = $cssstyles->createFlexiblemodulesCss($bloc, $bloc->ckid, 'archive'); $templatecsstext .= $cssstyles->createFlexiblemodulesCss($bloc, $bloc->ckid, 'archive'); $template_rtlcsstext .= $cssstyles->createFlexiblemodulesCss($bloc, $bloc->ckid, 'archive'); } if (!isset($bloc->isdisabled) || (isset($bloc->isdisabled) && $bloc->isdisabled != 'true') || (isset($bloc->ishidden) && $bloc->ishidden != 'true')) { $templatecsstext .= $cssstyles->create($bloc, $bloc->ckid, 'archive', ''); $template_rtlcsstext .= $cssstyles->create($bloc, $bloc->ckid, 'archive', '', 'rtl'); } } // write CSS for mobile $templatecss_mobiletext = ' /* --------------------------------------- Responsive design code -----------------------------------------*/ @media screen and (min-width: ' . ((int)$responsivevalues[3]+1) . 'px) { .hidemobile5 { display: none !important; } ' . $templatemobilecsstext->resolution5 . ' } @media screen ' . ($responsiverange == 'between' ? 'and (min-width: ' . ((int)$responsivevalues[2]+1) . 'px) ' : '') . 'and (max-width: ' . (int)$responsivevalues[3] . 'px) { img { max-width: 100%; height: auto; } .container { width: ' . (int)$responsivevalues[2] . 'px; } .hidemobile4 { display: none !important; } ' . $templatemobilecsstext->resolution4 . ' } @media screen ' . ($responsiverange == 'between' ? 'and (min-width: ' . ((int)$responsivevalues[1]+1) . 'px) ' : '') . 'and (max-width: ' . (int)$responsivevalues[2] . 'px) { img { max-width: 100%; height: auto; } .container { width: ' . (int)$responsivevalues[1] . 'px; } .hidemobile3 { display: none !important; } ' . $templatemobilecsstext->resolution3 . ' } @media screen ' . ($responsiverange == 'between' ? 'and (min-width: ' . ((int)$responsivevalues[0]+1) . 'px) ' : '') . 'and (max-width: ' . (int)$responsivevalues[1] . 'px) { img { max-width: 100%; height: auto; } .container { width: ' . (int)$responsivevalues[0] . 'px; } .hidemobile2 { display: none !important; } ' . $templatemobilecsstext->resolution2 . ' } @media screen and (max-width: ' . (int)$responsivevalues[0] . 'px) { img { max-width: 100%; height: auto; } .container { width: ' . (int)$responsiveminivalue . 'px; } .hidemobile1 { display: none !important; } ' . $templatemobilecsstext->resolution1 . ' } '; // create the file template.css if (!JFile::write($templatecssdest, $templatecsstext)) { $msg = '<p class="errorck">' . JText::_('CK_ERROR_CREATING_TEMPLATECSS') . '</p>'; } else { $msg = '<p class="successck">' . JText::_('CK_SUCCESS_CREATING_TEMPLATECSS') . '</p>'; } echo $msg; // create the file template_rtl.css if (!JFile::write($templatecss_rtldest, $template_rtlcsstext)) { $msg = '<p class="errorck">' . JText::_('CK_ERROR_CREATING_TEMPLATERTLCSS') . '</p>'; } else { $msg = '<p class="successck">' . JText::_('CK_SUCCESS_CREATING_TEMPLATERTLCSS') . '</p>'; } echo $msg; // create the file mobile.css if (!JFile::write($templatecss_mobiledest, $templatecss_mobiletext)) { $msg = '<p class="errorck">' . JText::_('CK_ERROR_CREATING_TEMPLATEMOBILECSS') . '</p>'; } else { $msg = '<p class="successck">' . JText::_('CK_SUCCESS_CREATING_TEMPLATEMOBILECSS') . '</p>'; } echo $msg;
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings