Esempio n. 1
0
 protected static function initConfig()
 {
     ipAddCss('Ip/Internal/Core/assets/admin/admin.css');
     ipAddJs('Ip/Internal/Core/assets/js/jquery-ui/jquery-ui.js');
     ipAddJsVariable('ipTranslationSaving', __('Saving...', 'Ip-admin', false));
     ipAddJs('Ip/Internal/Design/assets/optionsBox.js');
     ipAddJsVariable('ipModuleDesignConfiguration', Helper::getConfigurationBoxHtml());
     if (file_exists(ipThemeFile(Model::INSTALL_DIR . 'Options.js'))) {
         ipAddJs(ipThemeUrl(Model::INSTALL_DIR . 'Options.js'));
     } elseif (file_exists(ipThemeFile(Model::INSTALL_DIR . 'options.js'))) {
         ipAddJs(ipThemeUrl(Model::INSTALL_DIR . 'options.js'));
     }
     $model = Model::instance();
     $theme = $model->getTheme(ipConfig()->theme());
     if (!$theme) {
         throw new \Ip\Exception("Theme doesn't exist");
     }
     $options = $theme->getOptionsAsArray();
     $fieldNames = array();
     foreach ($options as $option) {
         if (empty($option['name'])) {
             continue;
         }
         $fieldNames[] = $option['name'];
     }
     ipAddJsVariable('ipModuleDesignOptionNames', $fieldNames);
 }
Esempio n. 2
0
 public static function ipBeforeController()
 {
     $request = \Ip\ServiceLocator::request();
     $sessionLifetime = ini_get('session.gc_maxlifetime');
     if (!$sessionLifetime) {
         $sessionLifetime = 120;
     }
     if ($sessionLifetime > 30) {
         $sessionLifetime = $sessionLifetime - 20;
     }
     ipAddJsVariable('ipSessionRefresh', $sessionLifetime);
     if (ipConfig()->isDebugMode()) {
         ipAddJs('Ip/Internal/Core/assets/ipCore/jquery.js', null, 10);
         // default, global jQuery
         ipAddJs('Ip/Internal/Core/assets/ipCore/console.log.js', null, 10);
         ipAddJs('Ip/Internal/Core/assets/ipCore/functions.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/jquery.tools.form.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/color.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/file.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/richtext.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/repositoryFile.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/url.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/validator.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/widgets.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/ipCore.js');
     } else {
         ipAddJs('Ip/Internal/Core/assets/ipCore.min.js', null, 10);
     }
     //Form init
     $validatorTranslations = array('Ip-admin' => static::validatorLocalizationData('Ip-admin'), ipContent()->getCurrentLanguage()->getCode() => static::validatorLocalizationData('Ip'));
     ipAddJsVariable('ipValidatorTranslations', $validatorTranslations);
     if (ipAdminId() || \Ip\Internal\Admin\Model::isLoginPage() || \Ip\Internal\Admin\Model::isPasswordResetPage()) {
         if (ipConfig()->isDebugMode()) {
             ipAddJs('Ip/Internal/Core/assets/admin/managementMode.js');
             ipAddJs('Ip/Internal/Core/assets/admin/functions.js');
             ipAddJs('Ip/Internal/Core/assets/admin/validator.js');
             ipAddJs('Ip/Internal/Core/assets/admin/bootstrap/bootstrap.js');
             ipAddJs('Ip/Internal/Core/assets/admin/bootstrap-switch/bootstrap-switch.js');
         } else {
             ipAddJs('Ip/Internal/Core/assets/admin.min.js', null, 10);
         }
         ipAddJs('Ip/Internal/Core/assets/tinymce/pastePreprocess.js');
         ipAddJs('Ip/Internal/Core/assets/tinymce/default.js');
     }
     if (ipAdminId()) {
         ipAddJs('Ip/Internal/Core/assets/js/tiny_mce/jquery.tinymce.min.js');
         ipAddJs('Ip/Internal/Core/assets/js/tiny_mce/tinymce.min.js');
         ipAddJsVariable('ipBrowseLinkModalTemplate', ipView('view/browseLinkModal.php')->render());
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/plupload.full.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/plupload.browserplus.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/plupload.gears.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/jquery.plupload.queue/jquery.plupload.queue.js');
         if (is_file(ipThemeFile('setup/admin.js'))) {
             ipAddJs(ipThemeUrl('setup/admin.js'));
         }
         ipAddCss('Ip/Internal/Core/assets/admin/admin.css');
     }
 }
Esempio n. 3
0
 function img($varname, $default, $width, $height, $class = '', $tagname = 'img')
 {
     $varname = $this->num != -1 ? $varname . '-' . $this->num : $varname;
     $defaultval = ipThemeUrl('assets/') . $default;
     if (array_key_exists($varname, $this->data)) {
         $fileName = $this->data[$varname]['fileName'];
         $transform = array('type' => 'crop', 'x1' => $this->data[$varname]['crop']['x1'], 'y1' => $this->data[$varname]['crop']['y1'], 'x2' => $this->data[$varname]['crop']['x2'], 'y2' => $this->data[$varname]['crop']['y2'], 'width' => $width, 'height' => $height);
         $url = ipFileUrl(ipReflection($fileName, $transform, $fileName));
         $imgdata = escAttr(json_encode($this->data[$varname]));
     } else {
         $url = $defaultval;
         $imgdata = "";
     }
     return "<{$tagname} class=\"ipsEditable {$class}\" data-type=\"Image\" data-varname=\"{$varname}\"\n\t\t\t\t\tdata-cssclass=\"{$class}\" data-image=\"{$imgdata}\" src=\"{$url}\"/>";
 }
Esempio n. 4
0
<?php

echo ipView('_header.php')->render();
?>
    <div id="ww">
	    <div class="container">
			<div class="row">
				<div class="col-lg-8 col-lg-offset-2 centered">
					<?php 
$options = array('id' => 'homeImage', 'width' => '155', 'height' => '155', 'class' => '', 'default' => ipThemeUrl('assets/img/user.png'));
echo ipSlot('image', $options);
?>
				<h1><?php 
echo ipSlot('text', array('id' => 'text1', 'default' => "Hi My name is Okeowo Aderemi"));
?>
 </h1>
					<?php 
echo ipSlot('text', array('id' => 'text2', 'default' => "Hello everybody. I'm Stanley, a free handsome bootstrap theme coded by BlackTie.co. A really simple theme for those wanting to showcase their work with a cute & clean style.\n\nPlease, consider to register to our newsletter to be updated with our latest themes and freebies. Like always, you can use this theme in any project freely. Share it with your friends."));
?>
 


				
				</div><!-- /col-lg-8 -->
			</div><!-- /row -->
	    </div> <!-- /container -->
	</div>
	<div class="container">
<div class="row mt centered">
		<?php 
echo ipBlock('home1')->render();
Esempio n. 5
0
 public function generateHead()
 {
     $cacheVersion = $this->getCacheVersion();
     $cssFiles = $this->getCss();
     $inDesignPreview = false;
     $data = ipRequest()->getRequest();
     if (!empty($data['ipDesign']['pCfg']) || !empty($data['restoreDefault'])) {
         $inDesignPreview = \Ip\Internal\Design\ConfigModel::instance()->isInPreviewState();
     }
     if ($inDesignPreview) {
         $themeAssetsUrl = ipThemeUrl(\Ip\Application::ASSETS_DIR . '/');
         $designService = \Ip\Internal\Design\Service::instance();
         $theme = ipConfig()->theme();
         foreach ($cssFiles as &$file) {
             if (strpos($file['value'], $themeAssetsUrl) === 0) {
                 $pathinfo = pathinfo($file['value']);
                 if ($pathinfo['extension'] == 'css' && $themeAssetsUrl . $pathinfo['basename'] == $file['value']) {
                     $themeFile = \Ip\Application::ASSETS_DIR . '/' . $pathinfo['filename'] . '.less';
                     if (file_exists(ipThemeFile($themeFile))) {
                         $file['value'] = $designService->getRealTimeUrl($theme, $themeFile);
                         $file['cacheFix'] = false;
                     }
                 }
             }
             if ($file['cacheFix']) {
                 $file['value'] .= (strpos($file['value'], '?') !== false ? '&' : '?') . $cacheVersion;
             }
         }
     } else {
         foreach ($cssFiles as &$file) {
             if ($file['cacheFix']) {
                 $file['value'] .= (strpos($file['value'], '?') !== false ? '&' : '?') . $cacheVersion;
             }
         }
     }
     $cssFiles = ipFilter('ipCss', $cssFiles);
     $response = ipResponse();
     $data = array('title' => $response->getTitle(), 'keywords' => $response->getKeywords(), 'description' => $response->getDescription(), 'favicon' => $response->getFavicon(), 'charset' => $response->getCharset(), 'css' => $cssFiles);
     $head = ipView('Ip/Internal/Config/view/head.php', $data)->render();
     $head = ipFilter('ipHead', $head);
     return $head;
 }
Esempio n. 6
0
?>
                </h2>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="box">
            <div class="col-lg-12">
                <hr>
                <?php 
echo ipSlot('text', array('id' => 'intro-text', 'tag' => 'h2', 'class' => 'intro-text text-center', 'default' => 'Build a website worth visiting'));
?>
                <hr>
                <?php 
$options = array('id' => 'imgHome', 'width' => '250', 'height' => '150', 'class' => 'img-responsive img-border img-left', 'default' => ipThemeUrl('assets/img/intro-pic.jpg'));
echo ipSlot('image', $options);
?>
                <hr class="visible-xs">
                <?php 
echo ipContent()->generateBlock('textContent')->render();
?>
          </div>
        </div>
    </div>

    <div class="row">
        <div class="box">
            <div class="col-lg-12">
                <hr>
                <?php 
Esempio n. 7
0
<?php

echo ipView('_header.php')->render();
?>
<div id="white">
    <div class="container">
        <div class="row">
<div class="col-lg-8 col-lg-offset-2 centered">
<?php 
$options = array('id' => 'contact', 'width' => '155', 'height' => '155', 'class' => 'cssclass(optional)', 'default' => ipThemeUrl('assets/img/user.png'));
echo ipSlot('image', $options);
?>

					
					<h1>About</h1>
					<p><?php 
echo ipSlot('text', array('id' => 'contactText', 'default' => 'The default text'));
?>
 
</p>
				
				</div>
				</div>
				</div>
				</div>
<?php 
echo ipView('_footer.php')->render();
?>
				
Esempio n. 8
0
include_once 'modules/header.php';
?>

<div class="container">
    <div class="row">
        <div class="box">
            <div class="col-lg-12">
                <hr>
                <?php 
echo ipSlot('text', array('id' => 'intro-text3', 'tag' => 'h2', 'class' => 'intro-text text-center', 'default' => 'Build a website worth visiting'));
?>
                <hr>
            </div>
            <div class="col-md-6">
                <?php 
$options = array('id' => 'imgContent', 'width' => '540', 'height' => '258', 'class' => 'img-responsive img-border img-left', 'default' => ipThemeUrl('assets/img/slide-2.jpg'));
echo ipSlot('image', $options);
?>
            </div>
            <div class="col-md-6">
                <?php 
echo ipContent()->generateBlock('other-content');
?>
             </div>
            <div class="clearfix"></div>
        </div>
    </div>
    <div class="row">
        <div class="box">
            <div class="col-lg-12">
                <hr>
Esempio n. 9
0
?>
    <?php 
echo ipHead();
?>
    <meta name="robots" content="NOINDEX,NOFOLLOW">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>

<div class="ip">
    <div class="container">
        <div class="row">
            <div class="col-md-8 col-md-offset-2">
                <div class="page-header">
                    <img src="<?php 
echo ipThemeUrl('assets/impresspages_logo.png');
?>
" alt="ImpressPages">
                    <?php 
$languages = \Plugin\Install\Helper::getInstallationLanguages();
$currentLanguage = isset($_SESSION['installationLanguage']) ? $_SESSION['installationLanguage'] : \Plugin\Install\Helper::$defaultLanguageCode;
?>
                    <div class="pull-right dropdown">
                        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                            <?php 
echo mb_strtoupper($currentLanguage);
?>
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu">
                            <?php