/** * @param string $languageCode * @param int $parentId * @return array */ protected static function getList($languageCode, $parentId) { $pages = ipDb()->selectAll('page', '*', array('parentId' => $parentId, 'isDeleted' => 0), 'ORDER BY `pageOrder`'); $answer = array(); //generate jsTree response array foreach ($pages as $page) { $pageData = array(); $pageData['state'] = 'closed'; $jsTreeId = 'page_' . $page['id']; if (!empty($_SESSION['Pages.nodeOpen'][$jsTreeId])) { $pageData['state'] = 'open'; } $children = self::getList($languageCode, $page['id']); if (count($children) === 0) { $pageData['children'] = false; $pageData['state'] = 'leaf'; } $pageData['children'] = $children; if ($page['isVisible']) { $icon = ''; } else { $icon = ipFileUrl('Ip/Internal/Pages/assets/img/file_hidden.png'); } $pageData['li_attr'] = array('id' => $jsTreeId, 'rel' => 'page', 'languageId' => $languageCode, 'pageId' => $page['id']); $pageData['data'] = array('title' => $page['title'] . '', 'icon' => $icon); //transform null into empty string. Null break JStree into infinite loop $pageData['text'] = htmlspecialchars($page['title']); $answer[] = $pageData; } return $answer; }
public function generateManagedImage($key, $defaultValue = null, $options = array(), $cssClass = null) { $defaultPlaceholder = ipFileUrl('Ip/Internal/InlineManagement/assets/empty.gif'); if (isset($options['languageId'])) { $languageId = $options['languageId']; } else { $languageId = ipContent()->getCurrentLanguage()->getId(); } if (isset($options['pageId'])) { $pageId = $options['pageId']; } else { if (ipContent()->getCurrentPage()) { $pageId = ipContent()->getCurrentPage()->getId(); } else { $pageId = null; } } // if default value is not defined, we'll add it if (empty($defaultValue)) { $defaultValue = $defaultPlaceholder; } $imageStr = $this->dao->getValue(Dao::PREFIX_IMAGE, $key, $languageId, $pageId); $image = new Entity\Image($imageStr, $defaultValue); $data = array('value' => $image->getImage(), 'defaultValue' => $defaultValue, 'empty' => $image->getImage() == '' || $image->getImage() == $defaultPlaceholder, 'key' => $key, 'options' => $options, 'cssClass' => $cssClass); if (ipIsManagementState()) { $view = ipView('view/management/image.php', $data); } else { $view = ipView('view/display/image.php', $data); } return $view->render(); }
/** * @param array|string $data * @param null $defaultImage */ public function __construct($data, $defaultImage = null) { if (is_string($data)) { $data = $this->parseStr($data); } if (!empty($data['imageOrig']) && file_exists(ipFile('file/repository/' . $data['imageOrig']))) { $this->imageOrig = $data['imageOrig']; if (isset($data['x1']) && isset($data['y1']) && isset($data['x2']) && isset($data['y2'])) { $this->x1 = $data['x1']; $this->y1 = $data['y1']; $this->x2 = $data['x2']; $this->y2 = $data['y2']; if (empty($data['requiredWidth'])) { $data['requiredWidth'] = $this->x2 - $this->x1; } if (empty($data['requiredHeight'])) { $data['requiredHeight'] = $this->y2 - $this->y1; } $this->requiredWidth = $data['requiredWidth']; $this->requiredHeight = $data['requiredHeight']; $transform = array('type' => 'crop', 'x1' => $this->getX1(), 'y1' => $this->getY1(), 'x2' => $this->getX2(), 'y2' => $this->getY2(), 'width' => $this->getRequiredWidth(), 'height' => $this->getRequiredHeight()); $this->image = ipFileUrl(ipReflection($this->getImageOrig(), $transform, null)); } } else { $this->image = $defaultImage; } if (!empty($data['id'])) { $this->id = $data['id']; } else { $this->id = mt_rand(2, 2147483647); //1 used for inline logo } }
public static function ipHead($head) { $vars = array('siteName' => ipGetOptionLang('Config.websiteTitle')); $defaultTitle = ipGetOptionLang('FacebookTags.defaultTitle'); if ($defaultTitle) { $vars['title'] = $defaultTitle; } $defaultImage = array(ipGetOptionLang('FacebookTags.defaultImage')); if ($defaultImage) { $vars['images'] = $defaultImage; } $adminId = ipGetOptionLang('FacebookTags.adminId'); if ($adminId) { $vars['adminId'] = $adminId; } $pageTags = Service::facebookTags(); if (!empty($pageTags['images'])) { foreach ($pageTags['images'] as &$image) { $image = ipFileUrl('file/repository/' . $image); } } else { unset($pageTags['images']); } $vars = array_merge($vars, $pageTags); $tags = ipView('view/tags.php', $vars)->render(); $head .= $tags; return $head; }
protected static function concatenate($urls, $ext) { $key = md5(json_encode($urls)); $path = 'file/concatenate/' . $key . '.' . $ext; if (!is_file(ipFile($path))) { $concatenated = ''; foreach ($urls as $url) { $urlContent = self::fetchContent($url); if ($urlContent === false) { //break if at least one of the assets can't be downloaded return false; } if ($ext == 'css') { $urlContent = self::replaceUrls($url, $urlContent); $concatenated .= "\n" . '/*' . $url . "*/\n" . $urlContent; } if ($ext == 'js') { $urlContent .= ';'; $concatenated .= "\n" . '//' . $url . "\n" . $urlContent; } } if (!is_dir(ipFile('file/concatenate'))) { mkdir(ipFile('file/concatenate')); } file_put_contents(ipFile($path), $concatenated); } return ipFileUrl($path); }
public static function ipJs($jsFiles) { if (ipGetOption('ConcatenateJsCss.disableInAdmin', 1) && ipAdminId() || ipStorage()->get('ConcatenateJsCss', 'concatenationInProgress') > time()) { return $jsFiles; } ipStorage()->set('ConcatenateJsCss', 'concatenationInProgress', time() + 60); //if some CSS / JS links to the website itself, we may have an infinite recursion. So we have to disable ourself during the concatenation $tinymceUrl = ipFileUrl('Ip/Internal/Core/assets/js/tiny_mce'); $answer = array('concatenateJsCss_tinymce_fix' => array('type' => 'content', 'value' => "var tinyMCEPreInit = {\n suffix: '.min',\n base: '" . $tinymceUrl . "',\n query: ''\n};", 'attributes' => array(), 'cacheFix' => false)); $chunk = array(); foreach ($jsFiles as &$file) { if ($file['type'] == 'content') { //we have faced a piece of inline JS. It can't be concatenated. We have to split concatenated JS in to two parts. if (!empty($chunk)) { $answer = array_merge($answer, self::concatenateChunk($chunk)); } $chunk = array(); //add current inline content JS $answer[] = $file; } else { $chunk[] = $file; } } if (!empty($chunk)) { $answer = array_merge($answer, self::concatenateChunk($chunk)); } ipStorage()->remove('ConcatenateJsCss', 'concatenationInProgress'); return $answer; }
protected function pluginIcon($pluginName) { if (file_exists(ipFile('Plugin/' . $pluginName . '/assets/icon.svg'))) { return ipFileUrl('Plugin/' . $pluginName . '/assets/icon.svg'); } if (file_exists(ipFile('Plugin/' . $pluginName . '/assets/icon.png'))) { return ipFileUrl('Plugin/' . $pluginName . '/assets/icon.png'); } }
public static function showImage($value, $recordData = null) { if ($value) { $transform = array('type' => 'fit', 'width' => 100, 'height' => 100); $thumbnailUrl = ipReflection($value, $transform, 'preview.jpg'); $imageHtml = '<a href="' . ipFileUrl('file/repository/' . $value) . '" target="blank"><img src="' . $thumbnailUrl . '" alt="' . esc($value) . '"></a>'; return $imageHtml; } else { return false; } }
public function getThumbnailUrl() { if ($this->thumbnail) { if ($this->url) { $image = $this->url . $this->name . '/' . Model::INSTALL_DIR . $this->thumbnail; } else { $image = ipFileUrl('Theme/' . $this->name . '/' . Model::INSTALL_DIR . $this->thumbnail); } } else { $image = ipFileUrl('Ip/Internal/Design/assets/theme.png'); } return $image; }
/** * Render field * * @param string $doctype * @param $environment * @return string */ public function render($doctype, $environment) { $captcha = new \Ip\Lib\HnCaptcha\HnCaptcha($this->captchaInit, true); $captcha->make_captcha(); $_SESSION['developer']['form']['field']['captcha'][$this->getId()]['public_key'] = $captcha->public_key; return ' <div class="captcha"> <input ' . $this->getAttributesStr($doctype) . ' class="form-control ' . implode(' ', $this->getClasses()) . '" name="' . htmlspecialchars($this->getName()) . '[code]" ' . $this->getValidationAttributesStr($doctype) . ' type="text" /> <input type="hidden" name="' . htmlspecialchars($this->getName()) . '[id]" value="' . $this->getId() . '" /> <img src="' . ipFileUrl($captcha->get_filename_url()) . '" alt="Captcha"/> </div> '; }
public static function ipBeforeController() { $configModel = ConfigModel::instance(); if ($configModel->isInPreviewState()) { ipAddJsVariable('ipRepositoryUrl', ipFileUrl('file/repository/')); static::initConfig(); } $lessCompiler = LessCompiler::instance(); if (ipConfig()->isDevelopmentEnvironment()) { if ($lessCompiler->shouldRebuild(ipConfig()->theme())) { $lessCompiler->rebuild(ipConfig()->theme()); } } }
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}\"/>"; }
public static function bkgImage($data) { $imageFiles = Service::pageImages(); $images = array(); foreach ($imageFiles as $image) { $file = $image; $options = array('type' => 'copy'); $copiedImage = ipReflection($file, $options); if (!$copiedImage) { echo ipReflectionException(); } else { $images[] = ipFileUrl($copiedImage); } } $answer = ipView('view/slot2.php', array('images' => $images))->render(); return $answer; }
public function generateHtml($revisionId, $widgetId, $data, $skin) { if (empty($data['files']) || !is_array($data['files'])) { $data['files'] = array(); } $newData = array(); foreach ($data['files'] as $file) { if (!isset($file['fileName'])) { continue; } $newFile = array(); $newFile['url'] = ipFileUrl('file/repository/' . $file['fileName']); $newFile['path'] = ipFile('file/repository/' . $file['fileName']); $newFile['title'] = isset($file['title']) ? $file['title'] : $file['fileName']; $newData['files'][] = $newFile; } return parent::generateHtml($revisionId, $widgetId, $newData, $skin); }
public function generateHtml($revisionId, $widgetId, $data, $skin) { $items = Model::widgetItems($widgetId); // If it has not been configured yet, sets some default values if (empty($data['options'])) { $data['options'] = array('gutter' => 10, 'columnWidth' => 320, 'isFitWidth' => true, 'isOriginLeft' => true); } $image_options = array('type' => 'width', 'width' => $data['options']['columnWidth'] - 10); foreach ($items as $key => $item) { // Clean Up the URL $link = ''; if ($item['url'] != '') { $protocol = parse_url($item['url'], PHP_URL_SCHEME); $target = '_self'; $base_url = ipConfig()->baseUrl(); // If it is an absolute URL don't make any transformation if ($protocol == 'http' or $protocol == 'https') { $link = $item['url']; // If the URL is pointing to another domain, open in a new page. if (strpos($link, $base_url) === false) { $target = '_blank'; } } else { // Asume it is a reference to a local page $link = ipFileUrl($item['url']); } $items[$key]['link_target'] = $target; } $items[$key]['clean_url'] = $link; // Create Image path $items[$key]['image_url'] = ipFileUrl(ipReflection($item['image'], $image_options)); } $data['container_id'] = "masonry_wd_{$widgetId}"; $data['widgetId'] = $widgetId; $data['items'] = $items; return parent::generateHtml($revisionId, $widgetId, $data, $skin); }
if (!empty($data['blog']['info']['category']) && $data['blog']['info']['category'] == 1 && !empty($data['pages']['categories'][$page['parentId']]['title'])) { ?> <?php echo esc($data['pages']['categories'][$page['parentId']]['title']); ?> <?php } ?> </div> <div class="asdBlog-intro"> <?php if (!empty($page['image']['imageOriginal']) && !empty($data['blog']['image']['enable'])) { ?> <div class="asd-blog-image"> <?php echo '<img src="' . ipFileUrl(ipReflection($page['image']['imageOriginal'], $imageOptions)) . '" alt="' . $page['title'] . '" />'; ?> </div> <?php } ?> <?php echo $page['intro']; ?> </div> <div class="asdBlog-info-bottom"> <?php if (!empty($data['blog']['info']['date']) && $data['blog']['info']['date'] == 2) { ?> <?php echo date(ipGetOption('AsdBlog.dateFormat'), strtotime($page['createdAt']));
public function logout() { Model::instance()->logout(); return new \Ip\Response\Redirect(ipFileUrl('admin/')); }
/** * Get widget icon URL * * Widget icon is displayed in widget toolbar of administration page. * * @return string Icon URL */ public function getIcon() { if ($this->core) { if (file_exists(ipFile($this->widgetAssetsDir . 'icon.svg'))) { return ipFileUrl($this->widgetAssetsDir . 'icon.svg'); } if (file_exists(ipFile($this->widgetAssetsDir . 'icon.png'))) { return ipFileUrl($this->widgetAssetsDir . 'icon.png'); } } else { if (file_exists(ipFile($this->widgetAssetsDir . 'icon.svg'))) { return ipFileUrl($this->widgetAssetsDir . 'icon.svg'); } if (file_exists(ipFile($this->widgetAssetsDir . 'icon.png'))) { return ipFileUrl($this->widgetAssetsDir . 'icon.png'); } } return ipFileUrl('Ip/Internal/Content/assets/img/iconWidget.svg'); }
_e('Your user credentials were automatically generated.', 'Ip-admin'); ?> </p> <p><?php _e('You were automatically logged in with the following details.', 'Ip-admin'); ?> </p> <p class="alert alert-info"> <?php _e('URL to log in', 'Ip-admin'); ?> : <a href="<?php echo ipFileUrl('admin'); ?> "><?php echo ipFileUrl('admin'); ?> </a><br> <?php _e('Administrator username', 'Ip-admin'); ?> : <strong><?php echo $adminUsername; ?> </strong><br> <?php _e('Administrator password', 'Ip-admin'); ?> : <strong><?php echo $adminPassword; ?>
class="btn btn-default ipsSelect ipsFileAddButton" href="#"><?php _e('Select', 'Ip-admin'); ?> </a> <div class="ipsFiles"> <?php if ($value && is_array($value)) { ?> <?php foreach ($value as $file) { ?> <div class="_file ipsFile"> <button type="button" class="close ipsRemove">×</button> <div><a target="_blank" class="ipsLink ipsFileName" href="<?php echo ipFileUrl('file/repository/' . $file); ?> "><?php echo esc($file); ?> </a></div> <input type="hidden" name="<?php echo escAttr($inputName); ?> []" value="<?php echo escAttr($file); ?> "/> </div> <?php
protected function generateLessVariables($options, $config) { $less = ''; foreach ($options as $option) { if (isset($option['addToLess']) && !$option['addToLess']) { continue; } if (empty($option['name']) || empty($option['type'])) { continue; // ignore invalid nodes } if (isset($config[$option['name']])) { $rawValue = $config[$option['name']]; } elseif (isset($option['default'])) { $rawValue = $option['default']; } else { $rawValue = ''; //continue; } switch ($option['type']) { case 'select': case 'Select': case 'color': case 'Color': $lessValue = $rawValue; break; case 'RepositoryFile': $lessValue = $rawValue; $lessValue = "'" . ipFileUrl('file/repository/' . escAttr($lessValue)) . "'"; break; default: case 'hidden': case 'Hidden': case 'range': case 'Range': $lessValue = $rawValue; if (!empty($option['units'])) { $lessValue .= $option['units']; } if (!isset($option['escape']) || $option['escape']) { $lessValue = "'" . preg_replace('~[\\r\\n]+~', '\\r\\n', escAttr($lessValue)) . "'"; } break; } $less .= "\n@{$option['name']}: {$lessValue};"; } return $less; }
protected function cropSmallImage($curImage) { $smallImageUrl = null; if (isset($curImage['cropX1']) && isset($curImage['cropY1']) && isset($curImage['cropX2']) && isset($curImage['cropY2'])) { $transformSmall = array('type' => 'crop', 'x1' => $curImage['cropX1'], 'y1' => $curImage['cropY1'], 'x2' => $curImage['cropX2'], 'y2' => $curImage['cropY2'], 'width' => ipGetOption('Content.widgetGalleryWidth'), 'height' => ipGetOption('Content.widgetGalleryHeight'), 'quality' => ipGetOption('Content.widgetGalleryQuality')); } else { $transformSmall = array('type' => 'center', 'width' => ipGetOption('Content.widgetGalleryWidth'), 'height' => ipGetOption('Content.widgetGalleryHeight'), 'quality' => ipGetOption('Content.widgetGalleryQuality')); } $smallImageUrl = ipFileUrl(ipReflection($curImage['imageOriginal'], $transformSmall, $curImage['title'])); return $smallImageUrl; }
public function generateHtml($revisionId, $widgetId, $data, $skin) { if (isset($data['imageOriginal'])) { $desiredName = isset($data['title']) ? $data['title'] : null; $transformBig = array('type' => 'copy'); $data['imageBig'] = ipFileUrl(ipReflection($data['imageOriginal'], $transformBig, $desiredName)); if (!empty($data['url']) && !preg_match('/^((http|https):\\/\\/)/i', $data['url'])) { $data['url'] = 'http://' . $data['url']; } if (isset($data['cropX1']) && isset($data['cropY1']) && isset($data['cropX2']) && isset($data['cropY2']) && $data['cropY2'] - $data['cropY1'] > 0) { if (!empty($data['width'])) { $width = $data['width']; } else { $width = ipGetOption('Content.widgetImageWidth', 1200); } if ($width <= 0) { $width = 1200; } //calc height $ratio = ($data['cropX2'] - $data['cropX1']) / ($data['cropY2'] - $data['cropY1']); if ($ratio == 0) { $ratio = 1; } $height = round($width / $ratio); $transform = array('type' => 'crop', 'x1' => $data['cropX1'], 'y1' => $data['cropY1'], 'x2' => $data['cropX2'], 'y2' => $data['cropY2'], 'width' => $width, 'height' => $height, 'forced' => true); $data['imageSmall'] = ipFileUrl(ipReflection($data['imageOriginal'], $transform, $desiredName)); } else { $forced = false; if (!empty($data['width'])) { $width = $data['width']; $forced = true; } else { $width = ipGetOption('Content.widgetImageWidth', 1200); } if (!empty($data['height'])) { $height = $data['height']; $forced = true; } else { $height = ipGetOption('Content.widgetImageHeight', 900); } $transform = array('type' => 'fit', 'width' => $width, 'height' => $height, 'forced' => $forced); } $data['imageSmall'] = ipFileUrl(ipReflection($data['imageOriginal'], $transform, $desiredName)); if (empty($data['type'])) { $data['type'] = 'lightbox'; } if (empty($data['url'])) { $data['url'] = ''; } if (empty($data['blank'])) { $data['blank'] = ''; } if (empty($data['nofollow'])) { $data['nofollow'] = ''; } if (empty($data['title'])) { $data['title'] = ''; } if (empty($data['description'])) { $data['description'] = ''; } } return parent::generateHtml($revisionId, $widgetId, $data, $skin); }
> <a <?php if (!$item->isDisabled()) { echo 'href="' . $item->getUrl() . '"'; } echo $item->getBlank() ? 'target="_blank"' : ''; ?> > <?php if (!empty($data['icon']['enable'])) { ?> <?php if (ipIsManagementState()) { $defaultImage = "http://dummyimage.com/{$data['icon']['width']}x{$data['icon']['height']}/f5f5f5/888"; } elseif (!empty($data['icon']['empty'])) { $defaultImage = ipFileUrl('Plugin/AsdMenuWidget/Widget/Menu/assets/empty.png'); } else { $defaultImage = ''; } $title = $item->getTitle(); $image = ipSlot('image', array('id' => "asd-menu-item-image-{$data['menu']['name']}-{$item->getId()}", 'pageId' => $data['menu']['pageId'], 'height' => $data['icon']['height'], 'width' => $data['icon']['width'], 'default' => $defaultImage, 'alt' => $title, 'title' => $title)); ?> <?php if (!empty($image)) { ?> <span class="icon-place"><?php echo $image; ?> </span> <?php }
public function generateHtml($revisionId, $widgetId, $data, $skin) { $data['widgetId'] = $widgetId; if (isset($data['images']) && is_array($data['images'])) { //loop all current images foreach ($data['images'] as &$curImage) { if (empty($curImage['imageOriginal'])) { continue; } $desiredName = isset($curImage['title']) ? $curImage['title'] : null; //create big image reflection $bigWidth = !empty($data['options']['width']) ? $data['options']['width'] : ipGetOption('AsdSlider.imageWidth'); $bigHeight = !empty($data['options']['height']) ? $data['options']['height'] : ipGetOption('AsdSlider.imageHeight'); $transformBig = array('type' => 'fit', 'width' => ipGetOption('AsdSlider.bigImageWidth'), 'height' => ipGetOption('AsdSlider.bigImageHeight')); $curImage['imageBig'] = ipFileUrl(ipReflection($curImage['imageOriginal'], $transformBig, $desiredName)); if (isset($curImage['cropX1']) && isset($curImage['cropY1']) && isset($curImage['cropX2']) && isset($curImage['cropY2'])) { $transformSmall = array('type' => 'crop', 'x1' => $curImage['cropX1'], 'y1' => $curImage['cropY1'], 'x2' => $curImage['cropX2'], 'y2' => $curImage['cropY2'], 'width' => $bigWidth, 'height' => $bigHeight, 'quality' => ipGetOption('Content.widgetGalleryQuality')); } else { $transformSmall = array('type' => 'center', 'width' => $bigWidth, 'height' => $bigHeight, 'quality' => ipGetOption('Content.widgetGalleryQuality')); } $curImage['imageSmall'] = ipFileUrl(ipReflection($curImage['imageOriginal'], $transformSmall, $curImage['title'])); if (empty($curImage['type'])) { $curImage['type'] = 'lightbox'; } if (empty($curImage['url'])) { $curImage['url'] = ''; } else { if (!preg_match('/^((http|https):\\/\\/)/i', $curImage['url'])) { $curImage['url'] = 'http://' . $curImage['url']; } } if (empty($curImage['blank'])) { $curImage['blank'] = ''; } if (empty($curImage['title'])) { $curImage['title'] = ''; } } } return parent::generateHtml($revisionId, $widgetId, $data, $skin); }
public static function imageView($value, $recordData) { $thumb_options = array('type' => 'fit', 'width' => 100, 'height' => 100); $thumbnail = ipFileUrl(ipReflection($value, $thumb_options)); return "<img src='{$thumbnail}' border='0'/>"; }
public function __construct($content = null, $headers = null, $statusCode = 200) { $this->setFavicon(ipFileUrl('favicon.ico')); $this->setCharset(ipConfig()->get('charset')); parent::__construct($content, $headers, $statusCode); }
if (!empty($data['pages']['pages'])) { ?> <?php foreach ($data['pages']['pages'] as $page) { ?> <div class="asdBlog-post <?php echo $animation; ?> "> <div class="asdBlog-intro"> <?php if (!empty($page['image']['imageOriginal']) && !empty($data['blog']['image']['enable'])) { ?> <div class="asd-blog-image"> <?php echo '<img src="' . ipFileUrl(ipReflection($page['image']['imageOriginal'], array('type' => 'center', 'width' => 980, 'height' => 360, 'quality' => 80, 'forced' => false))) . '" alt="' . $page['title'] . '" />'; ?> </div> <?php } ?> </div> <h2> <?php if (!empty($data['blog']['options']['titlelink'])) { ?> <a href="<?php echo $page['urlPath']; ?> "><?php echo esc($page['title']);
/** * Get preview file for file browser * @param string $file * @return string */ private function createPreview($file) { $pathInfo = pathinfo($file); $ext = strtolower(isset($pathInfo['extension']) ? $pathInfo['extension'] : ''); $baseName = $pathInfo['basename']; if (in_array($ext, $this->supportedImageExtensions)) { $transform = array('type' => 'fit', 'width' => 140, 'height' => 140, 'forced' => true); $reflection = ipReflection($file, $transform, $baseName); if ($reflection) { return ipFileUrl($reflection); } } return ipFileUrl('Ip/Internal/Repository/assets/icons/general.png'); }
<div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel"><?php _e('ImpressPages Terms of Use', 'Install'); ?> </h4> </div> <div class="modal-body" style="max-height: 270px; overflow: auto;"> <h2>Legal</h2> <p>Copyright <?php echo date("Y"); ?> by <a href="http://www.impresspages.org">ImpressPages, UAB</a></p> <p>This program is free software: you can re-distribute it and/or modify it under the terms of the <a href="<?php echo ipFileUrl('license.html'); ?> ">GNU General Public License or MIT License</a>.</p> <p>This program is distributed hoping it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p> <p>You are required to keep these "Appropriate Legal Notices" intact as specified in GPL3 section 5(d) and 7(b) and MIT.</p> <h2>Usage statistics</h2> <p>Your website is configured to share usage statistics with ImpressPages to help us make the software better in the future. We may periodically send notifications or promotional materials related to your website, our products and services to the administrators of the website.</p> <p class="alert alert-warning">Website content is NOT transferred.</p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </div> </div>