private function displayResults($data) { require_once JPATH_ROOT . '/administrator/components/com_jcomments/version.php'; $version = new JCommentsVersion(); ?> <style type="text/css"> .adminform tr th { display: none; } #jcomments-installer { margin: 10px auto; padding: 8px; width: 700px; min-height: 48px; background-color: #fff; border: 1px solid #ccc; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; } #jcomments-installer .status-error { color: red; } #jcomments-installer .status-ok { color: green; } #jcomments-installer .extension-copyright { color: #777; display: block; margin-top: 12px; } #jcomments-installer .extension-name { color: #FF9900; font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold; } #jcomments-installer .extension-date { color: #FF9900; font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: normal; } #jcomments-installer .installer-messages-header { margin: 10px 0; color: #FF9900; font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold; } #jcomments-installer ul { padding: 0 0 0 20px; margin: 0 0 10px 0; } #jcomments-installer table { padding: 0; margin: 0; border: none; } #jcomments-installer table td { vertical-align: top; } #jcomments-installer .btn { display: inline-block; *display: inline; *zoom: 1; padding: 4px 14px; margin-bottom: 0; font-size: 13px; line-height: 18px; *line-height: 18px; text-align: center; vertical-align: middle; cursor: pointer; color: #333; text-shadow: 0 1px 1px rgba(255,255,255,0.75); background-color: #f5f5f5; background-image: -moz-linear-gradient(top,#fff,#e6e6e6); background-image: -webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6)); background-image: -webkit-linear-gradient(top,#fff,#e6e6e6); background-image: -o-linear-gradient(top,#fff,#e6e6e6); background-image: linear-gradient(to bottom,#fff,#e6e6e6); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe5e5e5', GradientType=0); border-color: #e6e6e6 #e6e6e6 #bfbfbf; border-color: rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); *background-color: #e6e6e6; filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); border: 1px solid #bbb; *border: 0; border-bottom-color: #a2a2a2; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; *margin-left: .3em; -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); } #jcomments-installer .btn:hover, #jcomments-installer .btn:active, #jcomments-installer .btn.active { color: #333; text-decoration: none; background-color: #e6e6e6; *background-color: #d9d9d9; background-position: 0 -15px; -webkit-transition: background-position .1s linear; -moz-transition: background-position .1s linear; -o-transition: background-position .1s linear; transition: background-position .1s linear; } #jcomments-installer .btn:active, #jcomments-installer .btn.active { background-color: #cccccc \9; } </style> <div id="jcomments-installer"> <table width="95%" cellpadding="0" cellspacing="0"> <tbody> <tr> <td width="50px"> <img src="http://www.joomlatune.com/images/logo/jcomments.png" alt=""/> </td> <td> <div> <span class="extension-name"><?php echo $version->getLongVersion(); ?> </span> <span class="extension-date">[<?php echo $version->getReleaseDate(); ?> ]</span> </div> <div class="extension-copyright"> © 2006-<?php echo date('Y'); ?> smart (<a href="http://www.joomlatune.ru">JoomlaTune.ru</a> | <a href="http://www.joomlatune.com">JoomlaTune.com</a>). <?php echo JText::_('A_ABOUT_COPYRIGHT'); ?> </div> <div class="installer-messages-header"> <?php echo $data->title; ?> </div> <div> <ul> <?php if (count($data->messages)) { ?> <?php foreach ($data->messages as $message) { $class = $message['result'] ? 'status-ok' : 'status-error'; $text = $message['result'] ? JText::_('A_INSTALL_STATE_OK') : JText::_('A_INSTALL_STATE_ERROR'); ?> <li> <?php echo $message['text']; ?> : <span class="<?php echo $class; ?> "><?php echo $text; ?> </span> </li> <?php } ?> <?php } ?> <li> <span style="color: green"><strong><?php echo $data->finish; ?> </strong></span> </li> </ul> </div> <?php if (!empty($data->next)) { ?> <div> <div class="jcomments-installer-next"> <a href="<?php echo $data->next; ?> " class="btn"> <?php echo JText::_('A_INSTALL_BUTTON_NEXT'); ?> </a> </div> </div> <?php } ?> </td> </tr> </tbody> </table> </div> <?php }
function com_uninstall() { require_once dirname(__FILE__) . DS . 'version.php'; $version = new JCommentsVersion(); ?> <style type="text/css"> div#jc {width: 600px;margin: 0 auto;} span.copyright {color: #777;display: block;margin-top: 12px;} div#element-box span.componentname {color: #FF9900;font-family: Arial, Helvetica, sans-serif;font-size: 16px;font-weight: bold;} div#element-box span.componentdate {color: #FF9900;font-family: Arial, Helvetica, sans-serif;font-size: 16px;font-weight: normal;} div#element-box span.installheader {color: #FF9900;font-family: Arial, Helvetica, sans-serif;font-size: 16px;font-weight: bold;} div#jc table td {padding: 0} </style> <div id="jc"> <div id="element-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <table width="95%" border="0" cellpadding="0" cellspacing="0"> <tr valign="top" align="left"> <td width="50px"><img src="http://www.joomlatune.com/images/logo/jcomments.png" width="48" height="48" border="0" alt="" /></td> <td><span class="componentname"><?php echo $version->getLongVersion(); ?> </span> <span class="componentdate">[<?php echo $version->getReleaseDate(); ?> ]</span><br /> <span class="copyright">© 2006-<?php echo date('Y'); ?> smart (<a href="http://www.joomlatune.ru" target="_blank">JoomlaTune.ru</a> | <a href="http://www.joomlatune.com" target="_blank">JoomlaTune.com</a>). <?php echo JText::_('A_ABOUT_COPYRIGHT'); ?> <br /></span></td> </tr> <tr valign="top" align="left"> <td> </td> <td> </td> </tr> <tr valign="top" align="left"> <td> </td> <td><span class="installheader"><?php echo JText::_('A_UNINSTALL_LOG'); ?> </span></td> </tr> <tr valign="top" align="left"> <td> </td> <td> <ul style="padding: 0 0 0 20px; margin: 0;"> <?php JCommentsInstallerHelper::uninstallPlugin('jcomments', 'content'); ?> <li><?php echo JText::_('A_UNINSTALL_PLUGIN_CONTENT'); ?> : <span style="color: green">OK</span></li> <?php JCommentsInstallerHelper::uninstallPlugin('jcomments', 'search'); ?> <li><?php echo JText::_('A_UNINSTALL_PLUGIN_SEARCH'); ?> : <span style="color: green">OK</span></li> <?php JCommentsInstallerHelper::uninstallPlugin('jcomments', 'system'); ?> <li><?php echo JText::_('A_UNINSTALL_PLUGIN_SYSTEM'); ?> : <span style="color: green">OK</span></li> <?php JCommentsInstallerHelper::uninstallPlugin('jcommentson', 'editors-xtd', array('jcommentson.gif')); JCommentsInstallerHelper::uninstallPlugin('jcommentsoff', 'editors-xtd', array('jcommentsoff.gif')); ?> <li><?php echo JText::_('A_UNINSTALL_PLUGIN_EDITORS_XTD'); ?> : <span style="color: green">OK</span></li> <?php if (JCOMMENTS_JVERSION == '1.0') { global $mainframe; $app = $mainframe; } else { JCommentsInstallerHelper::uninstallPlugin('jcomments', 'user'); $app = JFactory::getApplication('administrator'); } // Clean all caches for components with comments if ($app->getCfg('caching') == 1) { $db = JCommentsFactory::getDBO(); $db->setQuery("SELECT DISTINCT(object_group) AS name FROM #__jcomments"); $rows = $db->loadObjectList(); foreach ($rows as $row) { $cache = JCommentsFactory::getCache($row->name); $cache->clean(); } unset($rows); ?> <li><?php echo JText::_('A_UNINSTALL_CLEAN_CACHE'); ?> : <span style="color: green">OK</span></li> <?php } ?> <li><span style="color: green"><strong><?php echo JText::_('A_UNINSTALL_COMPLETE'); ?> </strong></span></li> </ul> </td> </tr> </table> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div> </div> <?php if (JCOMMENTS_JVERSION == '1.0') { global $mainframe; $componentPath = $mainframe->getCfg('absolute_path') . DS . 'components' . DS . 'com_jcomments'; require_once $componentPath . DS . 'libraries' . DS . 'joomlatune' . DS . 'filesystem.php'; $files = JoomlaTuneFS::readDirectory($componentPath . DS . 'languages', '\\.ini', false, true); foreach ($files as $file) { if (!preg_match('/[a-z]{2}-[A-Z]{2}\\.com_jcomments/', (string) $file)) { @unlink((string) $file); } } } }
function showInstallLog() { $app = JCommentsFactory::getApplication('administrator'); require_once dirname(__FILE__) . DS . 'version.php'; $version = new JCommentsVersion(); if (version_compare(phpversion(), '5.1.0') >= 0) { date_default_timezone_set('UTC'); } if (JCOMMENTS_JVERSION == '1.7') { JHtml::_('behavior.framework'); } ?> <script type="text/javascript"> <!-- <?php if (JCOMMENTS_JVERSION == '1.7') { ?> Joomla.submitbutton = function (task) { Joomla.submitform(task, document.getElementById('adminForm')); }; <?php } else { ?> function submitbutton(task) { submitform(task); } <?php } ?> //--> </script> <link rel="stylesheet" href="<?php echo $app->getCfg('live_site'); ?> /administrator/components/com_jcomments/assets/style.css?v=<?php echo $version->getVersion(); ?> " type="text/css" /> <div id="jc"> <div class="jcomments-box"> <div class="m"> <table width="95%" cellpadding="0" cellspacing="0"> <tr> <td width="50px"><img src="<?php echo $app->getCfg('live_site'); ?> /administrator/components/com_jcomments/assets/icon-48-jcomments.png" border="0" alt="" /></td> <td><span class="componentname"><?php echo $version->getLongVersion(); ?> </span> <span class="componentdate">[<?php echo $version->getReleaseDate(); ?> ]</span><br /> <span class="copyright">© 2006-<?php echo date('Y'); ?> smart (<a href="http://www.joomlatune.ru" target="_blank">JoomlaTune.ru</a> | <a href="http://www.joomlatune.com" target="_blank">JoomlaTune.com</a>). <?php echo JText::_('A_ABOUT_COPYRIGHT'); ?> <br /></span></td> </tr> <tr> <td> </td> <td> </td> </tr> <?php if (count($this->messages)) { ?> <tr> <td> </td> <td><span class="installheader"><?php echo JText::_('A_INSTALL_LOG'); ?> </span> </td> </tr> <tr> <td> </td> <td> <ul> <?php foreach ($this->messages as $message) { $class = $message['status'] ? 'status-ok' : 'status-error'; $text = $message['status'] ? JText::_('A_INSTALL_STATE_OK') : JText::_('A_INSTALL_STATE_ERROR'); ?> <li><?php echo $message['text']; ?> : <span class="<?php echo $class; ?> "><?php echo $text; ?> </span></li> <?php } ?> <li><span class="status-ok"><strong><?php echo JText::_('A_INSTALL_COMPLETE'); ?> </strong></span></li> </ul> </td> </tr> <tr> <td></td> <td align="center" style="text-align: right;"> <div class="button-left"><div class="next"><a href="<?php echo $app->getCfg('live_site'); ?> /administrator/<?php echo JCOMMENTS_INDEX; ?> ?option=com_jcomments&task=settings"><?php echo JText::_('A_INSTALL_BUTTON_NEXT'); ?> </a></div></div> </td> </tr> <?php } ?> </table> </div> </div> <form action="<?php echo JCOMMENTS_INDEX; ?> " method="post" name="adminForm" id="adminForm"> <input type="hidden" name="option" value="com_jcomments" /> <input type="hidden" name="task" value="" /> </form> <?php }