Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
itxchandan committed Jun 19, 2018
1 parent 3f764b1 commit 8adb586
Show file tree
Hide file tree
Showing 10,855 changed files with 1,550,656 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
153 changes: 153 additions & 0 deletions bundle/installer.script.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<?php
/**
* @package Helix Ultimate Framework
* @author JoomShaper https://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2018 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/

defined ('_JEXEC') or die();

class plgSystemTmp_helixultInstallerScript
{

public function postflight($type, $parent)
{
$src = $parent->getParent()->getPath('source');
$manifest = $parent->getParent()->manifest;
$plugins = $manifest->xpath('plugins/plugin');

foreach ($plugins as $key => $plugin)
{
$name = (string)$plugin->attributes()->plugin;
$group = (string)$plugin->attributes()->group;
$installer = new JInstaller;

$path = $src.'/plugins/'.$group;
if (JFolder::exists($src.'/plugins/'.$group.'/'.$name))
{
$path = $src.'/plugins/'.$group.'/'.$name;
}

$plugin_info = $this->getPluginInfoByName($name, $group);
if($plugin_info)
{
$manifest_cache = json_decode($plugin_info->manifest_cache);
$cache_version = $manifest_cache->version;

$plg_manifest = $installer->parseXMLInstallFile($path.'/'.$name.'.xml');
$version = $plg_manifest['version'];

if($version < $cache_version)
{
continue;
}
}

$result = $installer->install($path);
if ($result)
{
$this->activeInstalledPlugin($name, $group);
}
}

$template_path = $src.'/template';
if (JFolder::exists( $template_path ))
{
$installer = new JInstaller;
$result = $installer->install($template_path);
}
$templates = $manifest->xpath('template');

foreach($templates as $key => $template)
{
$tmpl_name = (string)$template->attributes()->name;
$tmpl_info = $this->getTemplateInfoByName($tmpl_name);

$params = json_decode($tmpl_info->params);
$params_array = (array)$params;

if(empty($params_array))
{
$options_default = file_get_contents($template_path .'/options.json');

$db = JFactory::getDBO();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('params') . ' = ' . $db->quote($options_default)
);

$conditions = array(
$db->quoteName('client_id') . ' = 0',
$db->quoteName('template') . ' = ' . $db->quote($tmpl_name)
);

$query->update($db->quoteName('#__template_styles'))->set($fields)->where($conditions);
$db->setQuery($query);
$db->execute();
}
}

$conf = JFactory::getConfig();
$conf->set('debug', false);
$parent->getParent()->abort();
}

private function getTemplateInfoByName($name)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__template_styles'));
$query->where($db->quoteName('client_id') . ' = 0');
$query->where($db->quoteName('template') . ' = ' . $db->quote( $name ));

$db->setQuery($query);

return $db->loadObject();
}

private function activeInstalledPlugin($name, $group)
{
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('enabled') . ' = 1'
);

$conditions = array(
$db->quoteName('type') . ' = ' . $db->quote('plugin'),
$db->quoteName('element') . ' = ' . $db->quote($name),
$db->quoteName('folder') . ' = ' . $db->quote($group)
);

$query->update($db->quoteName('#__extensions'))->set($fields)->where($conditions);
$db->setQuery($query);
$db->execute();
}

private function getPluginInfoByName($name, $group)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__extensions'));
$query->where($db->quoteName('type') . ' = ' . $db->quote('plugin'));
$query->where($db->quoteName('element') . ' = ' . $db->quote( $name ));
$query->where($db->quoteName('folder') . ' = ' . $db->quote( $group ));

$db->setQuery($query);

return $db->loadObject();
}


public function abort($msg = null, $type = null){
if ($msg) {
JError::raiseWarning(100, $msg);
}
foreach ($this->packages as $package) {
$package['installer']->abort(null, $type);
}
}
}
13 changes: 13 additions & 0 deletions bundle/installer.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<extension version="3.8" type="plugin" group="system" method="upgrade">
<name>JD Austin</name>
<description>JD Austin - Free Business Joomla Template</description>
<scriptfile>installer.script.php</scriptfile>
<files>
<filename plugin="tmp_helixult">installer.script.php</filename>
</files>
<plugins>
<plugin plugin="helixultimate" group="system" />
</plugins>
<template name="jd_austin"/>
</extension>
90 changes: 90 additions & 0 deletions bundle/plugins/system/assets/css/admin/blog-options.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/**
* @package Helix Ultimate Framework
* @author JoomShaper https://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2018 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/

.helix-ultimate-image-upload-wrapper:empty {
display: none;
}

.helix-ultimate-image-upload-wrapper {
width: 200px;
display: block;
margin-bottom: 20px;
}

.helix-ultimate-image-upload-wrapper:not(.loading) {
height: 200px;
background: #f5f5f5;
padding: 5px;
border: 1px solid #e5e5e5;
}

.helix-ultimate-image-upload-wrapper img {
display: block;
height: 100%;
width: 100%;
}

.helix-ultimate-image-item-loader {
line-height: 200px;
text-align: center;
font-size: 24px;
}

.btn.btn-helix-ultimate-image-remove,
.btn.btn-helix-ultimate-image-upload {
display: none;
}

.helix-ultimate-image-field-empty .btn-helix-ultimate-image-upload {
display: inline-block;
}

.helix-ultimate-image-field-has-image .btn-helix-ultimate-image-remove {
display: inline-block;
}

/*Gallery*/
.btn.btn-helix-ultimate-gallery-item-upload {
padding: 11px 19px;
font-size: 16.25px;
border-radius: 4px;
}

.helix-ultimate-gallery-items {
display: none;
list-style: none;
padding: 0;
margin: -10px;
}

.helix-ultimate-gallery-items:not(:empty) {
margin-bottom: 15px;
display: block;
}

.helix-ultimate-gallery-items li {
position: relative;
display: inline-block;
margin: 10px;
cursor: move;
border-radius: 3px;
overflow: hidden;
}

.helix-ultimate-gallery-items li.loading {
width: 200px;
}

.helix-ultimate-gallery-items li.loading .progress {
margin-bottom: 0;
}

.btn-helix-ultimate-remove-gallery-image {
position: absolute;
top: 10px;
right: 10px;
}
25 changes: 25 additions & 0 deletions bundle/plugins/system/assets/css/admin/details.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* @package Helix Ultimate Framework
* @author JoomShaper https://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2018 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/

.helix-ultimate-options {
background: #05D21F;
border-radius: 3px;
color:#fff;
padding:20px 30px;
font-size:16px;
font-weight: 700;
display: inline-block;
margin-top: 10px;
}

.helix-ultimate-options:hover,
.helix-ultimate-options:focus,
.helix-ultimate-options:active {
text-decoration: none;
color: #fff;
background: #05BB1B;
}
Loading

0 comments on commit 8adb586

Please sign in to comment.