Your IP : 216.73.216.190


Current Path : /proc/1908984/root/proc/thread-self/root/proc/3662834/cwd/
Upload File :
Current File : //proc/1908984/root/proc/thread-self/root/proc/3662834/cwd/com_jw_disqus.tar

jw_disqus.xml000064400000003272152344571560007316 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="2.5" method="upgrade">
	<name>JW_DISQUS</name>
	<author>JoomlaWorks</author>
	<authorEmail>please-use-the-contact-form@joomlaworks.net</authorEmail>
	<authorUrl>www.joomlaworks.net</authorUrl>
	<copyright>Copyright (c) 2006 - 2016 JoomlaWorks Ltd. All rights reserved.</copyright>
	<creationDate>April 11th, 2016</creationDate>
	<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
	<version>3.6.0</version>
	<description>Thank you for installing Disqus Comments (for Joomla) [by JoomlaWorks].</description>
	<installfile>install.jw_disqus.php</installfile>
	<uninstallfile>uninstall.jw_disqus.php</uninstallfile>
	<scriptfile>script.jw_disqus.php</scriptfile>
	<updateservers>
		<server type="extension" priority="1" name="Disqus Comments (for Joomla)">http://cdn.joomlaworks.org/updates/disqus.xml</server>
	</updateservers>
	<administration>
		<languages folder="administrator/language/en-GB">
			<language tag="en-GB">en-GB.com_jw_disqus.ini</language>
			<language tag="en-GB">en-GB.com_jw_disqus.menu.ini</language>
			<language tag="en-GB">en-GB.com_jw_disqus.sys.ini</language>
			<language tag="en-GB">en-GB.plg_content_jw_disqus.ini</language>
			<language tag="en-GB">en-GB.plg_content_jw_disqus.sys.ini</language>
			<language tag="en-GB">en-GB.plg_system_jw_disqus.ini</language>
			<language tag="en-GB">en-GB.plg_system_jw_disqus.sys.ini</language>
		</languages>
	</administration>
	<plugins>
		<plugin plugin="jw_disqus" group="content" />
		<plugin plugin="jw_disqus" group="system" />
	</plugins>
	<media folder="media" destination="jw_disqus">
		<filename>Disqus_300x128_24.png</filename>
	</media>
</extension>script.jw_disqus.php000064400000013425152344571560010611 0ustar00<?php
/**
 * @version    3.6.x
 * @package    Disqus Comments (for Joomla)
 * @author     JoomlaWorks - http://www.joomlaworks.net
 * @copyright  Copyright (c) 2006 - 2016 JoomlaWorks Ltd. All rights reserved.
 * @license    GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
 */

// no direct access
defined('_JEXEC') or die ;

class Com_jw_disqusInstallerScript
{
	public function postflight($type, $parent)
	{
		$db = JFactory::getDBO();
		$db->setQuery("UPDATE #__extensions SET enabled = 0 WHERE client_id = 1 AND element = ".$db->Quote($parent->get('element')));
		$db->query();
       	$status = new stdClass;
        $status->plugins = array();
        $src = $parent->getParent()->getPath('source');
        $manifest = $parent->getParent()->manifest;
        $plugins = $manifest->xpath('plugins/plugin');
        foreach ($plugins as $plugin)
        {
            $name = (string)$plugin->attributes()->plugin;
            $group = (string)$plugin->attributes()->group;
            $path = $src.'/plugins/'.$group.'/'.$name;
            $installer = new JInstaller;
            $result = $installer->install($path);
            if ($result)
            {
                if (JFile::exists(JPATH_SITE.'/plugins/'.$group.'/'.$name.'/'.$name.'.xml'))
                {
                    JFile::delete(JPATH_SITE.'/plugins/'.$group.'/'.$name.'/'.$name.'.xml');
                }
                JFile::move(JPATH_SITE.'/plugins/'.$group.'/'.$name.'/'.$name.'.j25.xml', JPATH_SITE.'/plugins/'.$group.'/'.$name.'/'.$name.'.xml');
            }
            $query = "UPDATE #__extensions SET enabled=1, ordering=99 WHERE type='plugin' AND element=".$db->Quote($name)." AND folder=".$db->Quote($group);
            $db->setQuery($query);
            $db->query();
            $status->plugins[] = array('name' => $name, 'group' => $group, 'result' => $result);
        }
        $this->installationResults($status);
       
	}
    public function uninstall($parent)
    {
        $db = JFactory::getDBO();
        $status = new stdClass;
        $status->plugins = array();
        $manifest = $parent->getParent()->manifest;
        $plugins = $manifest->xpath('plugins/plugin');
        foreach ($plugins as $plugin)
        {
            $name = (string)$plugin->attributes()->plugin;
            $group = (string)$plugin->attributes()->group;
            $query = "SELECT `extension_id` FROM #__extensions WHERE `type`='plugin' AND element = ".$db->Quote($name)." AND folder = ".$db->Quote($group);
            $db->setQuery($query);
            $extensions = $db->loadColumn();
            if (count($extensions))
            {
                foreach ($extensions as $id)
                {
                    $installer = new JInstaller;
                    $result = $installer->uninstall('plugin', $id);
                }
                $status->plugins[] = array('name' => $name, 'group' => $group, 'result' => $result);
            }
            
        }
        $this->uninstallationResults($status);
    }

    private function installationResults($status)
    {
        $language = JFactory::getLanguage();
        $language->load('com_jw_disqus');
        $rows = 0;

		?>
		<style>
			@import url("http://yui.yahooapis.com/pure/0.5.0/pure-min.css");
			.pure-table {width:80%;}
		</style>
		
		<h2><?php echo JText::_('COM_JW_DISQUS_INSTALLATION_STATUS'); ?></h2>
		<table class="pure-table pure-table-striped">
			<thead>
				<tr>
					<th colspan="2"><?php echo JText::_('COM_JW_DISQUS_EXTENSION'); ?></th>
					<th><?php echo JText::_('COM_JW_DISQUS_STATUS'); ?></th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="3"></td>
				</tr>
			</tfoot>
			<tbody>
				<tr>
					<td colspan="2"><?php echo JText::_('COM_JW_DISQUS_COMPONENT'); ?></td>
					<td><strong><?php echo JText::_('COM_JW_DISQUS_INSTALLED'); ?></strong></td>
				</tr>
				<?php if (count($status->plugins)): ?>
				<tr>
					<td><?php echo JText::_('COM_JW_DISQUS_PLUGIN'); ?></td>
					<td><?php echo JText::_('COM_JW_DISQUS_GROUP'); ?></td>
					<td></td>
				</tr>
				<?php foreach ($status->plugins as $plugin): ?>
				<tr>
					<td><?php echo ucfirst($plugin['name']); ?></td>
					<td><?php echo ucfirst($plugin['group']); ?></td>
					<td><strong><?php echo ($plugin['result']) ? JText::_('COM_JW_DISQUS_INSTALLED') : JText::_('COM_JW_DISQUS_NOT_INSTALLED'); ?></strong></td>
				</tr>
				<?php endforeach; ?>
				<?php endif; ?>
			</tbody>
		</table>
		<?php
	}

	private function uninstallationResults($status)
	{
		$language = JFactory::getLanguage();
		$language->load('com_jw_disqus');
		$rows = 0;
		
		?>
		<style>
			@import url("http://yui.yahooapis.com/pure/0.5.0/pure-min.css");
			.pure-table {width:80%;}
		</style>
		
		<h2><?php echo JText::_('COM_JW_DISQUS_REMOVAL_STATUS'); ?></h2>
		<table class="pure-table pure-table-striped">
			<thead>
				<tr>
					<th colspan="2"><?php echo JText::_('COM_JW_DISQUS_EXTENSION'); ?></th>
					<th><?php echo JText::_('COM_JW_DISQUS_STATUS'); ?></th>
				</tr>
			</thead>
			<tfoot>
				<tr>
					<td colspan="3"></td>
				</tr>
			</tfoot>
			<tbody>
				<tr>
					<td colspan="2"><?php echo JText::_('COM_JW_DISQUS_COMPONENT'); ?></td>
					<td><strong><?php echo JText::_('COM_JW_DISQUS_REMOVED'); ?></strong></td>
				</tr>
				<?php if (count($status->plugins)): ?>
				<tr>
					<td><?php echo JText::_('COM_JW_DISQUS_PLUGIN'); ?></td>
					<td><?php echo JText::_('COM_JW_DISQUS_GROUP'); ?></td>
					<td></td>
				</tr>
				<?php foreach ($status->plugins as $plugin): ?>
				<tr>
					<td><?php echo ucfirst($plugin['name']); ?></td>
					<td><?php echo ucfirst($plugin['group']); ?></td>
					<td><strong><?php echo ($plugin['result']) ? JText::_('COM_JW_DISQUS_REMOVED') : JText::_('COM_JW_DISQUS_NOT_REMOVED'); ?></strong></td>
				</tr>
				<?php endforeach; ?>
				<?php endif; ?>
			</tbody>
		</table>
		<?php
	}

}