public function display($tpl = null) { $tmpl = array(); JHtml::stylesheet('administrator/components/com_phocagallery/assets/phocagallery.css'); //JHTML::_('behavior.tooltip'); $tmpl['version'] = PhocaGalleryRenderInfo::getPhocaVersion(); $this->assignRef('tmpl', $tmpl); $this->addToolbar(); parent::display($tpl); }
public function display($tpl = null) { $this->t = PhocaGalleryUtils::setVars('cp'); $this->views = array('imgs' => $this->t['l'] . '_IMAGES', 'cs' => $this->t['l'] . '_CATEGORIES', 't' => $this->t['l'] . '_THEMES', 'ra' => $this->t['l'] . '_CATEGORY_RATING', 'raimg' => $this->t['l'] . '_IMAGE_RATING', 'cos' => $this->t['l'] . '_CATEGORY_COMMENTS', 'coimgs' => $this->t['l'] . '_IMAGE_COMMENTS', 'users' => $this->t['l'] . '_USERS', 'fbs' => $this->t['l'] . '_FB', 'tags' => $this->t['l'] . '_TAGS', 'efs' => $this->t['l'] . '_STYLES', 'in' => $this->t['l'] . '_INFO'); JHTML::stylesheet($this->t['s']); //JHTML::_('behavior.tooltip'); $this->t['version'] = PhocaGalleryRenderInfo::getPhocaVersion(); $this->addToolbar(); parent::display($tpl); }
function getPhocaIc($output) { $v = PhocaGalleryRenderInfo::getPhocaVersion(); $i = str_replace('.', '', substr($v, 0, 3)); $n = '<p> </p>'; $l = 'h' . 't' . 't' . 'p' . ':' . '/' . '/' . 'w' . 'w' . 'w' . '.' . 'p' . 'h' . 'o' . 'c' . 'a' . '.' . 'c' . 'z' . '/'; $p = 'P' . 'h' . 'o' . 'c' . 'a' . ' ' . 'G' . 'a' . 'l' . 'l' . 'e' . 'r' . 'y'; $im = 'i' . 'c' . 'o' . 'n' . '-' . 'p' . 'h' . 'o' . 'c' . 'a' . '-' . 'l' . 'o' . 'g' . 'o' . '-' . 's' . 'm' . 'a' . 'l' . 'l' . '.' . 'p' . 'n' . 'g'; $s = 's' . 't' . 'y' . 'l' . 'e' . '=' . '"' . 't' . 'e' . 'x' . 't' . '-' . 'd' . 'e' . 'c' . 'o' . 'r' . 'a' . 't' . 'i' . 'o' . 'n' . ':' . 'n' . 'o' . 'n' . 'e' . '"'; $b = 't' . 'a' . 'r' . 'g' . 'e' . 't' . '=' . '"' . '_' . 'b' . 'l' . 'a' . 'n' . 'k' . '"'; $im2 = 'i' . 'c' . 'o' . 'n' . '-' . 'p' . 'h' . 'o' . 'c' . 'a' . '-' . 'l' . 'o' . 'g' . 'o' . '-' . 's' . 'e' . 'a' . 'l' . '.' . 'p' . 'n' . 'g'; $i = (int) $i * (int) $i; $lg = ''; if ($output != $i) { $lg .= $n; $lg .= '<div style="text-align:center">'; } if ($output == 1) { $lg .= '<a href="' . $l . '" ' . $s . ' ' . $b . ' title="' . $p . '">' . JHTML::_('image', 'components/com_phocagallery/assets/images/' . $im, $p) . '</a>'; $lg .= ' <a href="http://www.phoca.cz/" ' . $s . ' ' . $b . ' title="' . $p . '">' . $v . '</a>'; } else { if ($output == 2 || $output == 3) { $lg .= '<a href="' . $l . '" ' . $s . ' ' . $b . ' title="' . $p . '">' . JHTML::_('image', 'components/com_phocagallery/assets/images/' . $im, $p) . '</a>'; } else { if ($output == 4) { $lg .= ' <a href="' . $l . '" ' . $s . ' ' . $b . ' title="' . $p . '">Phoca Gallery</a>'; } else { if ($output == 5) { $lg .= ' <a href="' . $l . '" ' . $s . ' ' . $s . ' ' . $b . ' title="' . $p . '">' . $p . ' ' . $v . '</a>'; } else { if ($output == 6) { $lg .= ' <a href="' . $l . '" ' . $s . ' ' . $b . ' title="' . $p . '">' . JHTML::_('image', 'components/com_phocagallery/assets/images/' . $im2, $p) . '</a>'; } else { if ($output == $i) { $lg .= '<!-- <a href="' . $l . '">site: www.phoca.cz | version: ' . $v . '</a> -->'; } else { $lg .= '<a href="' . $l . '" ' . $s . ' ' . $b . ' title="' . $p . '">' . JHTML::_('image', 'components/com_phocagallery/assets/images/' . $im, $p) . '</a>'; $lg .= ' <a href="http://www.phoca.cz/" ' . $s . ' ' . $b . ' title="' . $p . '">' . $v . '</a>'; } } } } } } if ($output != $i) { $lg .= '</div>' . $n; } return $lg; }
public function display($tpl = null) { $tmpl = array(); $params = JComponentHelper::getParams('com_phocagallery'); $this->sidebar = JHtmlSidebar::render(); JHTML::stylesheet('media/com_phocagallery/css/administrator/phocagallery.css'); $tmpl['version'] = PhocaGalleryRenderInfo::getPhocaVersion(); $tmpl['enablethumbcreation'] = $params->get('enable_thumb_creation', 1); $tmpl['paginationthumbnailcreation'] = $params->get('pagination_thumbnail_creation', 0); $tmpl['cleanthumbnails'] = $params->get('clean_thumbnails', 0); $tmpl['enablethumbcreationstatus'] = PhocaGalleryRenderAdmin::renderThumbnailCreationStatus((int) $tmpl['enablethumbcreation'], 1); //Main Function support // echo '<table border="1" cellpadding="5" cellspacing="5" style="border:1px solid #ccc;border-collapse:collapse">'; $function = array('getImageSize', 'imageCreateFromJPEG', 'imageCreateFromPNG', 'imageCreateFromGIF', 'imageRotate', 'imageCreateTruecolor', 'imageCopyResampled', 'imageFill', 'imageColorTransparent', 'imageColorAllocate', 'exif_read_data'); $fOutput = ''; foreach ($function as $key => $value) { if (function_exists($value)) { $bgStyle = 'class="alert alert-success"'; $icon = 'true'; $iconText = JText::_('COM_PHOCAGALLERY_ENABLED'); } else { $bgStyle = 'class="alert alert-error"'; $icon = 'false'; $iconText = JText::_('COM_PHOCAGALLERY_DISABLED'); } $fOutput .= '<tr ' . $bgStyle . '><td>' . JText::_('COM_PHOCAGALLERY_FUNCTION') . ' ' . $value . '</td>'; $fOutput .= '<td align="center">' . JHTML::_('image', 'media/com_phocagallery/images/administrator/icon-16-true.png', JText::_('COM_PHOCAGALLERY_ENABLED')) . '</td>'; $fOutput .= '<td align="center">' . JHTML::_('image', 'media/com_phocagallery/images/administrator/icon-16-' . $icon . '.png', JText::_($iconText)) . '</td></tr>'; } // PICASA $fOutput .= '<tr><td align="left"><b>' . JText::_('COM_PHOCAGALLERY_PICASA_SUPPORT') . '</b></td></tr>'; if (!PhocaGalleryUtils::iniGetBool('allow_url_fopen')) { $bgStyle = 'class="alert alert-error"'; $icon = 'false'; $iconText = JText::_('COM_PHOCAGALLERY_DISABLED'); } else { $bgStyle = 'class="alert alert-success"'; $icon = 'true'; $iconText = JText::_('COM_PHOCAGALLERY_ENABLED'); } $fOutput .= '<tr ' . $bgStyle . '><td>' . JText::_('COM_PHOCAGALLERY_PHP_SETTINGS_PARAM') . ' allow_url_fopen (' . JText::_('COM_PHOCAGALLERY_ENABLED_IF_CURL_DISABLED') . ')</td>'; $fOutput .= '<td align="center">' . JHTML::_('image', 'media/com_phocagallery/images/administrator/icon-16-true.png', JText::_('COM_PHOCAGALLERY_ENABLED')) . '</td>'; $fOutput .= '<td align="center">' . JHTML::_('image', 'media/com_phocagallery/images/administrator/icon-16-' . $icon . '.png', JText::_($iconText)) . '</td></tr>'; if (function_exists("curl_init")) { $bgStyle = 'class="alert alert-success"'; $icon = 'true'; $iconText = JText::_('COM_PHOCAGALLERY_ENABLED'); } else { $bgStyle = 'class="alert alert-error"'; $icon = 'false'; $iconText = JText::_('COM_PHOCAGALLERY_DISABLED'); } if (function_exists("json_decode")) { $bgStylej = 'class="alert alert-success"'; $iconj = 'true'; $iconTextj = JText::_('COM_PHOCAGALLERY_ENABLED'); } else { $bgStylej = 'class="alert alert-error"'; $iconj = 'false'; $iconTextj = JText::_('COM_PHOCAGALLERY_DISABLED'); } $fOutput .= '<tr ' . $bgStyle . '><td>' . JText::_('COM_PHOCAGALLERY_FUNCTION') . ' cURL (' . JText::_('COM_PHOCAGALLERY_ENABLED_IF_FOPEN_DISABLED') . ')</td>'; $fOutput .= '<td align="center">' . JHTML::_('image', 'media/com_phocagallery/images/administrator/icon-16-true.png', JText::_('COM_PHOCAGALLERY_ENABLED')) . '</td>'; $fOutput .= '<td align="center">' . JHTML::_('image', 'media/com_phocagallery/images/administrator/icon-16-' . $icon . '.png', JText::_($iconText)) . '</td></tr>'; $fOutput .= '<tr ' . $bgStylej . '><td>' . JText::_('COM_PHOCAGALLERY_FUNCTION') . ' json_decode</td>'; $fOutput .= '<td align="center">' . JHTML::_('image', 'media/com_phocagallery/images/administrator/icon-16-true.png', JText::_('COM_PHOCAGALLERY_ENABLED')) . '</td>'; $fOutput .= '<td align="center">' . JHTML::_('image', 'media/com_phocagallery/images/administrator/icon-16-' . $iconj . '.png', JText::_($iconTextj)) . '</td></tr>'; $this->assignRef('tmpl', $tmpl); $this->assignRef('foutput', $fOutput); $this->addToolbar(); parent::display($tpl); }