feat(deployed): add Smart Shoutbox 3.0.6 (no-source, vetted live)
Smart Shoutbox (The Krotek); no repo -> deployed files. Signed-off-by: LÁZÁR Imre <imre@illusion.hu> Assisted-by: claude-code@claude-opus-4-8
This commit is contained in:
parent
6cb5a14565
commit
f73c4b41e2
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<access component="com_smartshoutbox">
|
||||
<section name="component">
|
||||
<action name="admin.view" title="COM_SMARTSHOUTBOX_PERMISSIONS_ADMIN_VIEW" description="COM_SMARTSHOUTBOX_PERMISSIONS_ADMIN_VIEW_DESC" />
|
||||
<action name="admin.create" title="COM_SMARTSHOUTBOX_PERMISSIONS_ADMIN_CREATE" description="COM_SMARTSHOUTBOX_PERMISSIONS_ADMIN_CREATE_DESC" />
|
||||
<action name="admin.edit" title="COM_SMARTSHOUTBOX_PERMISSIONS_ADMIN_EDIT" description="COM_SMARTSHOUTBOX_PERMISSIONS_ADMIN_EDIT_DESC" />
|
||||
<action name="admin.state" title="COM_SMARTSHOUTBOX_PERMISSIONS_ADMIN_EDIT_STATE" description="COM_SMARTSHOUTBOX_PERMISSIONS_ADMIN_EDIT_STATE_DESC" />
|
||||
<action name="admin.delete" title="COM_SMARTSHOUTBOX_PERMISSIONS_ADMIN_DELETE" description="COM_SMARTSHOUTBOX_PERMISSIONS_ADMIN_DELETE_DESC" />
|
||||
<action name="admin.options" title="COM_SMARTSHOUTBOX_PERMISSIONS_ADMIN_OPTIONS" description="COM_SMARTSHOUTBOX_PERMISSIONS_ADMIN_OPTIONS_DESC" />
|
||||
|
||||
<action name="site.view" title="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_VIEW" description="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_VIEW_DESC" />
|
||||
<action name="site.use" title="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_USE" description="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_USE_DESC" />
|
||||
|
||||
<action name="site.edit" title="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_EDIT" description="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_EDIT_DESC" />
|
||||
<action name="site.edit.own" title="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_EDIT_OWN" description="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_EDIT_OWN_DESC" />
|
||||
<action name="site.edit.name" title="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_EDIT_NAME" description="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_EDIT_NAME_DESC" />
|
||||
<action name="site.edit.announce" title="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_EDIT_ANNOUNCE" description="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_EDIT_ANNOUNCE_DESC" />
|
||||
|
||||
<action name="site.delete" title="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_DELETE" description="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_DELETE_DESC" />
|
||||
<action name="site.delete.own" title="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_DELETE_OWN" description="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_DELETE_OWN_DESC" />
|
||||
|
||||
<action name="site.ban" title="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_BAN" description="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_BAN_DESC" />
|
||||
<action name="site.like" title="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_LIKE" description="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_LIKE_DESC" />
|
||||
<action name="site.attach" title="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_ATTACH" description="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_ATTACH_DESC" />
|
||||
|
||||
<action name="site.interval" title="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_INTERVAL" description="COM_SMARTSHOUTBOX_PERMISSIONS_SITE_INTERVAL_DESC" />
|
||||
</section>
|
||||
</access>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,191 @@
|
||||
|
||||
.home .extension-header
|
||||
{
|
||||
margin: auto;
|
||||
max-width: 900px;
|
||||
}
|
||||
|
||||
.home .stats-actions
|
||||
{
|
||||
margin: 50px auto 50px auto;
|
||||
max-width: 900px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.home .item-container
|
||||
{
|
||||
display: inline-block;
|
||||
width: 200px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.home .stats-container
|
||||
{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.home .stats-container h1
|
||||
{
|
||||
font-size: 60px;
|
||||
margin: 10px 0;
|
||||
text-shadow: 2px 2px 0 #eeeeee;
|
||||
}
|
||||
|
||||
.home .categories .stats-container h1
|
||||
{
|
||||
color: #71c76b;
|
||||
}
|
||||
|
||||
.home .shouts .stats-container h1
|
||||
{
|
||||
color: #6b78c7;
|
||||
}
|
||||
|
||||
.home .users .stats-container h1
|
||||
{
|
||||
color: #c7b76b;
|
||||
}
|
||||
|
||||
.home .banned .stats-container h1
|
||||
{
|
||||
color: #c76bc2;
|
||||
}
|
||||
|
||||
.home .stats-container span
|
||||
{
|
||||
font-weight: 700;
|
||||
color: #555555;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.home .stats-actions a:link,
|
||||
.home .stats-actions a:visited
|
||||
{
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
.home .stats-actions .action-content
|
||||
{
|
||||
border: 1px solid #f1f1f1;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
float: left;
|
||||
padding: 5px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.home .stats-actions .action-content:hover
|
||||
{
|
||||
box-shadow: 0 2px 4px #eeeeee;
|
||||
}
|
||||
|
||||
.home .stats-actions .action-icon
|
||||
{
|
||||
padding: 10px 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
|
||||
.home .stats-actions .categories .action-icon
|
||||
{
|
||||
background: #71c76b;
|
||||
border-bottom: 2px solid #3c9e35;
|
||||
}
|
||||
|
||||
.home .stats-actions .shouts .action-icon
|
||||
{
|
||||
background: #6b78c7;
|
||||
border-bottom: 2px solid #334193;
|
||||
}
|
||||
|
||||
.home .stats-actions .users .action-icon
|
||||
{
|
||||
background: #c7b76b;
|
||||
border-bottom: 2px solid #948334;
|
||||
}
|
||||
|
||||
.home .stats-actions .banned .action-icon
|
||||
{
|
||||
background: #c76bc2;
|
||||
border-bottom: 2px solid #9c3a96;
|
||||
}
|
||||
|
||||
.home .stats-actions .action-icon i
|
||||
{
|
||||
color: #ffffff;
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
.home .stats-actions .action-info
|
||||
{
|
||||
background-color: #fafafa;
|
||||
border: 1px solid #fafafa;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
min-height: 150px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.home .stats-actions .action-content:hover .action-info
|
||||
{
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.home .stats-actions .action-info h3
|
||||
{
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 20px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.home .stats-actions .categories .action-info h3
|
||||
{
|
||||
color: #71c76b;
|
||||
}
|
||||
|
||||
.home .stats-actions .shouts .action-info h3
|
||||
{
|
||||
color: #6b78c7;
|
||||
}
|
||||
|
||||
.home .stats-actions .users .action-info h3
|
||||
{
|
||||
color: #948334;
|
||||
}
|
||||
|
||||
.home .stats-actions .banned .action-info h3
|
||||
{
|
||||
color: #9c3a96;
|
||||
}
|
||||
|
||||
/* Shouts */
|
||||
|
||||
.shouts td.message
|
||||
{
|
||||
text-align: justify;
|
||||
line-height: 125%;
|
||||
-ms-word-break: break-all;
|
||||
word-break: break-all;
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
-ms-hyphens: auto;
|
||||
hyphens: auto;
|
||||
}
|
||||
|
||||
.shouts td.message .shout-smiley
|
||||
{
|
||||
height: auto;
|
||||
margin: 0 2px;
|
||||
vertical-align: middle;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.placeholder .cell-inner
|
||||
{
|
||||
float: none
|
||||
margin-bottom: 0
|
||||
line-height: 100%
|
||||
border-left-color: #000000;
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<config></config>
|
||||
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxController extends JControllerLegacy
|
||||
{
|
||||
var $db, $app, $post, $params, $smileypath, $sysmodel, $syshelper;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->db = JFactory::getDBO();
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->post = $this->app->input->post;
|
||||
$this->params = JComponentHelper::getParams(SCOMPONENT);
|
||||
$this->smileypath = JPATH_ROOT."/components/com_smartshoutbox/assets/smileys";
|
||||
$this->storage = JPATH_ROOT.'/media/'.SMAINCLASS.'/';
|
||||
|
||||
$this->sysmodel = new \SmartShoutbox\Model(array('str' => SSTR, 'component' => SCOMPONENT));
|
||||
$this->syshelper = new \SmartShoutbox\Helper(array('str' => SSTR, 'component' => SCOMPONENT));
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
public function display($cachable = false, $urlparams = false)
|
||||
{
|
||||
$view = $this->app->input->get('view', '', 'cmd');
|
||||
|
||||
if (!$view) {
|
||||
$this->app->input->set('view', 'home');
|
||||
$view = 'home';
|
||||
}
|
||||
|
||||
parent::display();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxControllerBanned extends SmartShoutboxController
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
public function bannedDelete()
|
||||
{
|
||||
$cids = $this->post->get('cid', array(), 'array');
|
||||
|
||||
if ($cids) {
|
||||
$this->sysmodel->itemsDelete('banned', array('id' => $cids));
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_DELETED'), 'message');
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_NOT_SELECTED'), 'error');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function bannedEmpty()
|
||||
{
|
||||
$this->sysmodel->itemsEmpty('banned');
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_EMPTIED'), 'message');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,130 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxControllerCategories extends SmartShoutboxController
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
public function categoriesAdd()
|
||||
{
|
||||
$this->setRedirect("index.php?option=".SCOMPONENT."&view=category");
|
||||
}
|
||||
|
||||
public function categoriesEdit()
|
||||
{
|
||||
$cids = $this->post->get('cid', array(), 'array');
|
||||
|
||||
if ($cids) {
|
||||
$this->setRedirect("index.php?option=".SCOMPONENT."&view=category&id=".$cids[0]);
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_NOT_SELECTED'), 'error');
|
||||
}
|
||||
}
|
||||
|
||||
public function categoriesCopy()
|
||||
{
|
||||
$cids = $this->post->get('cid', array(), 'array');
|
||||
|
||||
if ($cids) {
|
||||
foreach ($cids as $cid) {
|
||||
$parentid = $this->sysmodel->itemsCopy('categories', array('id' => $cid), array('title', 'description'));
|
||||
$this->sysmodel->itemsUpdate('categories', array('id' => $parentid), array('added' => time()));
|
||||
}
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_COPIED'), 'message');
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_NOT_SELECTED'), 'error');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function categoriesPublish()
|
||||
{
|
||||
$cids = $this->post->get('cid', array(), 'array');
|
||||
|
||||
if ($cids) {
|
||||
$this->sysmodel->itemsUpdate('categories', array('id' => $cids), array('status' => '1'));
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_PUBLISHED'), 'message');
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_NOT_SELECTED'), 'error');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function categoriesUnpublish()
|
||||
{
|
||||
$cids = $this->post->get('cid', array(), 'array');
|
||||
|
||||
if ($cids) {
|
||||
$this->sysmodel->itemsUpdate('categories', array('id' => $cids), array('status' => '0'));
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_UNPUBLISHED'), 'message');
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_NOT_SELECTED'), 'error');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function categoriesDelete()
|
||||
{
|
||||
$cids = $this->post->get('cid', array(), 'array');
|
||||
|
||||
if ($cids) {
|
||||
$this->sysmodel->itemsDelete('categories', array('id' => $cids));
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_DELETED'), 'message');
|
||||
|
||||
if ($this->params->get('deleteshouts', 0)) {
|
||||
$this->sysmodel->itemsDelete('shouts', array('category_id' => $cids));
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_SHOUTS_DELETED'), 'message');
|
||||
} else {
|
||||
$this->sysmodel->itemsUpdate('shouts', array('category_id' => $cids), array('category_id' => '0'));
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_SHOUTS_UPDATED'), 'message');
|
||||
}
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_NOT_SELECTED'), 'error');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function categoriesEmpty()
|
||||
{
|
||||
$this->sysmodel->itemsEmpty('categories');
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_EMPTIED'), 'message');
|
||||
|
||||
if ($this->params->get('deleteshouts', 0)) {
|
||||
$this->sysmodel->itemsEmpty('shouts');
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_SHOUTS_DELETED'), 'message');
|
||||
} else {
|
||||
$this->sysmodel->itemsUpdate('shouts', array(), array('category_id' => '0'));
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_SHOUTS_UPDATED'), 'message');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxControllerCategory extends SmartShoutboxController
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
public function categorySave()
|
||||
{
|
||||
$data = $this->updateCategory();
|
||||
|
||||
if (!$data['errors']) {
|
||||
$this->setRedirect("index.php?option=".SCOMPONENT."&view=categories");
|
||||
} else {
|
||||
foreach ($data['errors'] as $error) {
|
||||
$this->app->enqueueMessage($error, 'error');
|
||||
}
|
||||
|
||||
$this->setRedirect("index.php?option=".SCOMPONENT."&view=category".($data['id'] ? "&id=".$data['id'] : ""));
|
||||
}
|
||||
}
|
||||
|
||||
public function categoryApply()
|
||||
{
|
||||
$data = $this->updateCategory();
|
||||
|
||||
if ($data['errors']) {
|
||||
foreach ($data['errors'] as $error) {
|
||||
$this->app->enqueueMessage($error, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
$this->setRedirect("index.php?option=".SCOMPONENT."&view=category".($data['id'] ? "&id=".$data['id'] : ""));
|
||||
}
|
||||
|
||||
public function updateCategory()
|
||||
{
|
||||
$data = array(
|
||||
'id' => $this->post->get('id', 0, 'int'),
|
||||
'groups' => $this->post->get('groups', array(), 'array'),
|
||||
'title' => $this->post->get('title', '', 'string'),
|
||||
'description' => trim($this->post->get('description', '', 'raw')),
|
||||
'icon' => $this->post->get('icon', '', 'string'),
|
||||
'ordering' => $this->post->get('ordering', 0, 'int'),
|
||||
'added' => strtotime($this->post->get('added', '', 'raw')),
|
||||
'status' => $this->post->get('status', 0, 'int'));
|
||||
|
||||
$errors = array();
|
||||
|
||||
$data['groups'] = json_encode($data['groups']);
|
||||
|
||||
if ($data['id']) {
|
||||
$this->sysmodel->itemsUpdate('categories', array('id' => $data['id']), $data);
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_UPDATED'), 'message');
|
||||
} else {
|
||||
$data['id'] = $this->sysmodel->addItem('categories', $data);
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_ADDED'), 'message');
|
||||
}
|
||||
|
||||
$data['errors'] = $errors;
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function categoryCancel()
|
||||
{
|
||||
$this->setRedirect("index.php?option=".SCOMPONENT."&view=categories");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxControllerHome extends SmartShoutboxController
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,107 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxControllerOptions extends SmartShoutboxController
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
public function optionsUpdate()
|
||||
{
|
||||
$data = array(
|
||||
'id' => JComponentHelper::getComponent(SCOMPONENT)->id,
|
||||
'params' => $this->post->get('params', array(), 'array'),
|
||||
'rules' => $this->post->get('rules', array(), 'array'));
|
||||
|
||||
if (!empty($data['params']['license'])) {
|
||||
$postdata = array(
|
||||
'source' => 'joomla',
|
||||
'url' => JURI::root(),
|
||||
'product_type' => 'files',
|
||||
'product_id' => '304',
|
||||
'order_id' => $data['params']['license']);
|
||||
|
||||
$curl = curl_init();
|
||||
|
||||
curl_setopt($curl, CURLOPT_URL, 'https://thekrotek.com/index.php?option=com_smartseller&task=checklicense');
|
||||
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
|
||||
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($postdata));
|
||||
|
||||
$response = curl_exec($curl);
|
||||
$status = strval(curl_getinfo($curl, CURLINFO_HTTP_CODE));
|
||||
|
||||
if (($response !== false) || (!$status != '0')) {
|
||||
$result = json_decode($response, true);
|
||||
|
||||
if (!is_null($result)) {
|
||||
if (!isset($result['error']) || ($result['error']['code'] != 3)) {
|
||||
if (isset($result['error'])) {
|
||||
$data['params']['license_result'] = $result['error']['message'];
|
||||
|
||||
$this->app->enqueueMessage($result['error']['message'], 'error');
|
||||
} else {
|
||||
$data['params']['license_result'] = '';
|
||||
}
|
||||
|
||||
$result = $this->syshelper->saveOptions($data);
|
||||
|
||||
if (!isset($result['error'])) {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_OPTIONS_SAVED'), 'message');
|
||||
} else {
|
||||
$this->app->enqueueMessage($result['error'], 'error');
|
||||
}
|
||||
} else {
|
||||
$this->app->enqueueMessage($result['error']['message'], 'error');
|
||||
}
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_RESPONSE'), 'error');
|
||||
}
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::sprintf(SSTR.'ERROR_CURL', curl_errno($curl), curl_error($curl)), 'error');
|
||||
}
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_LICENSE_EMPTY'), 'error');
|
||||
}
|
||||
|
||||
$this->syshelper->cleanCache('_system', 0);
|
||||
$this->syshelper->cleanCache('_system', 1);
|
||||
|
||||
$this->setRedirect("index.php?option=".SCOMPONENT."&view=options");
|
||||
}
|
||||
|
||||
public function optionsReset()
|
||||
{
|
||||
$data = array(
|
||||
'id' => JComponentHelper::getComponent(SCOMPONENT)->id,
|
||||
'params' => $this->post->get('params', array(), 'array'));
|
||||
|
||||
$result = $this->syshelper->resetOptions($data);
|
||||
|
||||
if (empty($result['error'])) {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_OPTIONS_RESET'), 'message');
|
||||
} else {
|
||||
$this->app->enqueueMessage($result['error'], 'error');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,111 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxControllerShout extends SmartShoutboxController
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
public function shoutSave()
|
||||
{
|
||||
$data = $this->shoutUpdate();
|
||||
|
||||
if (!$data['errors']) {
|
||||
$this->setRedirect("index.php?option=".SCOMPONENT."&view=shouts");
|
||||
} else {
|
||||
foreach ($data['errors'] as $error) {
|
||||
$this->app->enqueueMessage($error, 'error');
|
||||
}
|
||||
|
||||
$this->setRedirect("index.php?option=".SCOMPONENT."&view=shout".($data['id'] ? "&id=".$data['id'] : ""));
|
||||
}
|
||||
}
|
||||
|
||||
public function shoutApply()
|
||||
{
|
||||
$data = $this->shoutUpdate();
|
||||
|
||||
if ($data['errors']) {
|
||||
foreach ($data['errors'] as $error) {
|
||||
$this->app->enqueueMessage($error, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
$this->setRedirect("index.php?option=".SCOMPONENT."&view=shout".($data['id'] ? "&id=".$data['id'] : ""));
|
||||
}
|
||||
|
||||
public function shoutUpdate()
|
||||
{
|
||||
$data = array(
|
||||
'id' => $this->post->get('id', 0, 'int'),
|
||||
'author_id' => $this->post->get('author_id', 0, 'int'),
|
||||
'author' => $this->post->get('author', '', 'string'),
|
||||
'category_id' => $this->post->get('category_id', 0, 'int'),
|
||||
'message' => trim($this->post->get('message', '', 'html')),
|
||||
'ip' => $this->post->get('ip', '', 'string'),
|
||||
'added' => strtotime($this->post->get('added', '', 'string')),
|
||||
'status' => $this->post->get('status', 0, 'int'));
|
||||
|
||||
$errors = array();
|
||||
|
||||
if ($data['message']) {
|
||||
if (!$data['author'] && $data['author_id']) {
|
||||
$user = JFactory::getUser($data['author_id']);
|
||||
$data['author'] = $user->name;
|
||||
}
|
||||
|
||||
if ($data['author']) {
|
||||
if ($data['id']) {
|
||||
$this->sysmodel->itemsUpdate('shouts', array('id' => $data['id']), $data);
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_UPDATED'), 'message');
|
||||
} else {
|
||||
$data['id'] = $this->sysmodel->addItem('shouts', $data);
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_ADDED'), 'message');
|
||||
}
|
||||
|
||||
$attachments = $this->post->get('attachments', array(), 'array');
|
||||
$this->sysmodel->itemsDelete('attachments', array('shout_id' => $data['id']));
|
||||
|
||||
if (!empty($_FILES['uploaded']['name'][0])) {
|
||||
$uploaded = $this->syshelper->processAttachments($_FILES['uploaded'], $this->params->get('filetypes'));
|
||||
$attachments = array_merge($attachments, $uploaded['uploaded']);
|
||||
}
|
||||
|
||||
foreach ($attachments as $attachment) {
|
||||
$querydata = array(
|
||||
'shout_id' => $data['id'],
|
||||
'attachment' => $attachment);
|
||||
|
||||
$this->sysmodel->addItem('attachments', $querydata);
|
||||
}
|
||||
} else {
|
||||
$errors[] = JText::_(SSTR.'ERROR_EMPTY_AUTHOR');
|
||||
}
|
||||
} else {
|
||||
$errors[] = JText::_(SSTR.'ERROR_EMPTY_MESSAGE');
|
||||
}
|
||||
|
||||
$data['errors'] = $errors;
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function shoutCancel()
|
||||
{
|
||||
$this->setRedirect("index.php?option=".SCOMPONENT."&view=shouts");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,118 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxControllerShouts extends SmartShoutboxController
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
public function shoutsAdd()
|
||||
{
|
||||
$this->setRedirect("index.php?option=".SCOMPONENT."&view=shout");
|
||||
}
|
||||
|
||||
public function shoutsCopy()
|
||||
{
|
||||
$cids = $this->post->get('cid', array(), 'array');
|
||||
|
||||
if ($cids) {
|
||||
foreach ($cids as $cid) {
|
||||
$parentid = $this->sysmodel->itemsCopy('shouts', array('id' => $cid), array('category_id', 'author_id', 'author', 'message', 'ip'));
|
||||
$this->sysmodel->itemsUpdate('shouts', array('id' => $parentid), array('added' => time()));
|
||||
}
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_COPIED'), 'message');
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_NOT_SELECTED'), 'error');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function shoutsEdit()
|
||||
{
|
||||
$cids = $this->post->get('cid', array(), 'array');
|
||||
|
||||
if ($cids) {
|
||||
$this->setRedirect("index.php?option=".SCOMPONENT."&view=shout&id=".$cids[0]);
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_NOT_SELECTED'), 'error');
|
||||
}
|
||||
}
|
||||
|
||||
public function shoutsPublish()
|
||||
{
|
||||
$cids = $this->post->get('cid', array(), 'array');
|
||||
|
||||
if ($cids) {
|
||||
$this->sysmodel->itemsUpdate('shouts', array('id' => $cids), array('status' => '1'));
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_PUBLISHED'), 'message');
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_NOT_SELECTED'), 'error');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function shoutsUnpublish()
|
||||
{
|
||||
$cids = $this->post->get('cid', array(), 'array');
|
||||
|
||||
if ($cids) {
|
||||
$this->sysmodel->itemsUpdate('shouts', array('id' => $cids), array('status' => '0'));
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_PUBLISHED'), 'message');
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_NOT_SELECTED'), 'error');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function shoutsDelete()
|
||||
{
|
||||
$cids = $this->post->get('cid', array(), 'array');
|
||||
|
||||
if ($cids) {
|
||||
$this->sysmodel->itemsDelete('shouts', array('id' => $cids));
|
||||
|
||||
$attachments = $this->sysmodel->getItems('attachments', array('shout_id' => $cids));
|
||||
|
||||
foreach ($attachments as $attachment) {
|
||||
unlink($this->storage.$attachment['attachment']);
|
||||
}
|
||||
|
||||
$this->sysmodel->itemsDelete('attachments', array('shout_id' => $cids));
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_DELETED'), 'message');
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_NOT_SELECTED'), 'error');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function shoutsEmpty()
|
||||
{
|
||||
$this->sysmodel->itemsEmpty('shouts');
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_EMPTIED'), 'message');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,130 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxControllerSmileys extends SmartShoutboxController
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
public function smileysSave()
|
||||
{
|
||||
$cids = $this->post->get('cid', array(), 'array');
|
||||
|
||||
if ($cids) {
|
||||
$typed = $this->post->get('typed', array(), 'array');
|
||||
$titles = $this->post->get('titles', array(), 'array');
|
||||
|
||||
foreach ($cids as $cid) {
|
||||
$data = array(
|
||||
'typed' => json_encode($typed[$cid]),
|
||||
'title' => $titles[$cid]);
|
||||
|
||||
$this->sysmodel->itemsUpdate('smileys', array('id' => $cid), $data);
|
||||
}
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_SAVED'), 'message');
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_NOT_SELECTED'), 'error');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function smileysPublish()
|
||||
{
|
||||
$cids = $this->post->get('cid', array(), 'array');
|
||||
|
||||
if ($cids) {
|
||||
$this->sysmodel->itemsUpdate('smileys', array('id' => $cids), array('status' => '1'));
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_UNPUBLISHED'), 'message');
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_NOT_SELECTED'), 'error');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function smileysUnpublish()
|
||||
{
|
||||
$cids = $this->post->get('cid', array(), 'array');
|
||||
|
||||
if ($cids) {
|
||||
$this->sysmodel->itemsUpdate('smileys', array('id' => $cids), array('status' => '0'));
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_UNPUBLISHED'), 'message');
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_NOT_SELECTED'), 'error');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function smileysDelete()
|
||||
{
|
||||
$cids = $this->post->get('cid', array(), 'array');
|
||||
|
||||
if ($cids) {
|
||||
foreach ($cids as $cid) {
|
||||
$smiley = $this->sysmodel->getItem('smileys', array('id' => $cid));
|
||||
|
||||
if ($smiley['image'] && file_exists($this->smileypath."/".$smiley['folder']."/".$smiley['image'])) {
|
||||
unlink($this->smileypath."/".$smiley['folder']."/".$smiley['image']);
|
||||
}
|
||||
}
|
||||
|
||||
$this->sysmodel->itemsDelete('smileys', array('id' => $cids));
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_DELETED'), 'message');
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_NOT_SELECTED'), 'error');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function smileysEmpty()
|
||||
{
|
||||
$this->sysmodel->itemsEmpty('smileys');
|
||||
|
||||
$folders = array_diff(scandir($this->smileypath), array('.', '..'));
|
||||
|
||||
foreach ($folders as $folder) {
|
||||
if (is_dir($this->smileypath."/".$folder)) {
|
||||
$this->syshelper->unlinkFolder($this->smileypath."/".$folder);
|
||||
}
|
||||
}
|
||||
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_EMPTIED'), 'message');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function smileysScan()
|
||||
{
|
||||
$model = $this->getModel('smileys');
|
||||
$added = $model->smileysScan();
|
||||
|
||||
if ($added) {
|
||||
$this->app->enqueueMessage(sprintf(JText::_(SSTR.'MESSAGE_SMILEYS_ADDED'), $added), 'message');
|
||||
} else {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'MESSAGE_SMILEYS_NONEW'), 'message');
|
||||
}
|
||||
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
$this->categoriescolumns = array(
|
||||
array('value' => '*', 'text' => JText::_(SSTR.'ALL_COLUMNS')),
|
||||
array('value' => 'id', 'text' => JText::_(SSTR.'COLUMN_ID'), 'sort' => true, 'width' => '1%', 'class' => 'nowrap center'),
|
||||
array('value' => 'status', 'text' => JText::_(SSTR.'COLUMN_STATUS'), 'sort' => false, 'width' => '1%', 'class' => 'nowrap center'),
|
||||
array('value' => 'icon', 'text' => JText::_(SSTR.'COLUMN_ICON'), 'sort' => false, 'width' => '1%', 'class' => 'center'),
|
||||
array('value' => 'title', 'text' => JText::_(SSTR.'COLUMN_TITLE'), 'sort' => true, 'width' => '', 'class' => 'nowrap'),
|
||||
array('value' => 'description', 'text' => JText::_(SSTR.'COLUMN_DESCRIPTION'), 'sort' => false, 'width' => ''),
|
||||
array('value' => 'groups', 'text' => JText::_(SSTR.'COLUMN_GROUPS'), 'sort' => false, 'width' => '10%', 'class' => 'wrap center'),
|
||||
array('value' => 'shouts', 'text' => JText::_(SSTR.'COLUMN_SHOUTS'), 'sort' => true, 'width' => '10%', 'class' => 'nowrap center'),
|
||||
array('value' => 'ordering', 'text' => JText::_(SSTR.'COLUMN_ORDERING'), 'sort' => true, 'width' => '5%', 'class' => 'nowrap center'),
|
||||
array('value' => 'added', 'text' => JText::_(SSTR.'COLUMN_ADDED'), 'sort' => true, 'width' => '10%', 'class' => 'center'),
|
||||
array('value' => 'actions', 'text' => JText::_(SSTR.'COLUMN_ACTIONS'), 'sort' => false, 'width' => '7%', 'class' => 'nowrap center'));
|
||||
|
||||
$this->shoutscolumns = array(
|
||||
array('value' => '*', 'text' => JText::_(SSTR.'ALL_COLUMNS')),
|
||||
array('value' => 'id', 'text' => JText::_(SSTR.'COLUMN_ID'), 'sort' => true, 'width' => '1%', 'class' => 'nowrap center'),
|
||||
array('value' => 'status', 'text' => JText::_(SSTR.'COLUMN_STATUS'), 'sort' => false, 'width' => '1%', 'class' => 'nowrap center'),
|
||||
array('value' => 'author', 'text' => JText::_(SSTR.'COLUMN_AUTHOR'), 'sort' => true, 'width' => '10%', 'class' => 'nowrap'),
|
||||
array('value' => 'message', 'text' => JText::_(SSTR.'COLUMN_MESSAGE'), 'sort' => true),
|
||||
array('value' => 'category', 'text' => JText::_(SSTR.'COLUMN_CATEGORY'), 'sort' => false, 'width' => '15%', 'class' => 'nowrap'),
|
||||
array('value' => 'added', 'text' => JText::_(SSTR.'COLUMN_ADDED'), 'sort' => true, 'width' => '10%', 'class' => 'center'),
|
||||
array('value' => 'ip', 'text' => JText::_(SSTR.'COLUMN_IP'), 'sort' => true, 'width' => '10%', 'class' => 'center'),
|
||||
array('value' => 'actions', 'text' => JText::_(SSTR.'COLUMN_ACTIONS'), 'sort' => false, 'width' => '7%', 'class' => 'nowrap center'));
|
||||
|
||||
$this->bannedcolumns = array(
|
||||
array('value' => '*', 'text' => JText::_(SSTR.'ALL_COLUMNS')),
|
||||
array('value' => 'id', 'text' => JText::_(SSTR.'COLUMN_ID'), 'sort' => true, 'width' => '1%', 'class' => 'nowrap center'),
|
||||
array('value' => 'shout_id', 'text' => JText::_(SSTR.'COLUMN_SHOUT_ID'), 'sort' => true, 'width' => '5%', 'class' => 'nowrap center'),
|
||||
array('value' => 'author_id', 'text' => JText::_(SSTR.'COLUMN_AUTHOR_ID'), 'sort' => true, 'width' => '', 'class' => 'nowrap'),
|
||||
array('value' => 'author', 'text' => JText::_(SSTR.'COLUMN_AUTHOR'), 'sort' => true, 'width' => '', 'class' => 'nowrap'),
|
||||
array('value' => 'email', 'text' => JText::_(SSTR.'COLUMN_EMAIL'), 'sort' => true, 'width' => '15%', 'class' => 'nowrap'),
|
||||
array('value' => 'ip', 'text' => JText::_(SSTR.'COLUMN_IP'), 'sort' => true, 'width' => '10%', 'class' => 'center'),
|
||||
array('value' => 'added', 'text' => JText::_(SSTR.'COLUMN_ADDED'), 'sort' => true, 'width' => '10%', 'class' => 'center'),
|
||||
array('value' => 'actions', 'text' => JText::_(SSTR.'COLUMN_ACTIONS'), 'sort' => false, 'width' => '7%', 'class' => 'nowrap center'));
|
||||
|
||||
$this->smileyscolumns = array(
|
||||
array('value' => '*', 'text' => JText::_(SSTR.'ALL_COLUMNS')),
|
||||
array('value' => 'id', 'text' => JText::_(SSTR.'COLUMN_ID'), 'sort' => true, 'width' => '1%', 'class' => 'nowrap center'),
|
||||
array('value' => 'status', 'text' => JText::_(SSTR.'COLUMN_STATUS'), 'sort' => false, 'width' => '1%', 'class' => 'nowrap center'),
|
||||
array('value' => 'image', 'text' => JText::_(SSTR.'COLUMN_IMAGE'), 'sort' => false, 'width' => '5%', 'class' => 'nowrap'),
|
||||
array('value' => 'folder', 'text' => JText::_(SSTR.'COLUMN_FOLDER'), 'sort' => false, 'width' => '15%', 'class' => 'nowrap'),
|
||||
array('value' => 'title', 'text' => JText::_(SSTR.'COLUMN_TITLE'), 'sort' => false, 'width' => '15%', 'class' => 'nowrap'),
|
||||
array('value' => 'typed', 'text' => JText::_(SSTR.'COLUMN_TYPED'), 'sort' => true, 'width' => '', 'class' => 'nowrap'),
|
||||
array('value' => 'actions', 'text' => JText::_(SSTR.'COLUMN_ACTIONS'), 'sort' => false, 'width' => '7%', 'class' => 'nowrap center'));
|
||||
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body style="background-color: #000;"></body></html>
|
||||
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
||||
// Lightbox
|
||||
|
||||
jQuery(".kui .container-main").on("click", ".shout-image", function()
|
||||
{
|
||||
jQuery.featherlight(jQuery(this).attr("href"));
|
||||
jQuery(".kui .container-main .featherlight .shout-image").removeClass("image-thumb");
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery(".kui .container-main").on("click", ".shout-video", function()
|
||||
{
|
||||
jQuery.featherlight(jQuery(jQuery(this).attr("rel")));
|
||||
jQuery(".kui .container-main .featherlight .shout-image").removeClass("image-thumb");
|
||||
return false;
|
||||
});
|
||||
|
||||
</script>
|
||||
@ -0,0 +1,145 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
require_once(JPATH_COMPONENT.'/helpers/columns.php');
|
||||
require_once(JPATH_SITE.'/components/'.SCOMPONENT.'/helpers/events.php');
|
||||
require_once(JPATH_SITE.'/components/'.SCOMPONENT.'/helpers/helper.php');
|
||||
|
||||
JHtml::_('jquery.framework', true, true);
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
JHtml::_('bootstrap.popover');
|
||||
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->session = JFactory::getSession();
|
||||
|
||||
$this->view = $this->app->input->get('view', '', 'cmd');
|
||||
$this->action = $this->view;
|
||||
|
||||
$this->params = JComponentHelper::getParams(SCOMPONENT);
|
||||
$this->user = JFactory::getUser();
|
||||
|
||||
$sysmodel = new \SmartShoutbox\Model(array('str' => SSTR, 'component' => SCOMPONENT));
|
||||
$syshelper = new \SmartShoutbox\Helper(array('str' => SSTR, 'component' => SCOMPONENT));
|
||||
$sysevents = new \SmartShoutboxEvents();
|
||||
|
||||
$helper = new SmartShoutboxHelper();
|
||||
|
||||
$document = JFactory::getDocument();
|
||||
|
||||
$document->addStyleSheet(JURI::base().'components/'.SCOMPONENT.'/assets/css/style.css');
|
||||
$document->addStyleSheet(JURI::root().'components/'.SCOMPONENT.'/system/assets/fontawesome/css/fontawesome.css');
|
||||
|
||||
$assets = array('datepicker', 'featherlight', 'lightbox', 'nicefileinput', 'select', 'sortable', 'style');
|
||||
|
||||
foreach ($assets as $asset) {
|
||||
if (file_exists(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/css/'.$asset.'.css')) {
|
||||
$document->addStyleSheet(JURI::base().'components/'.SCOMPONENT.'/kui/css/'.$asset.'.css');
|
||||
}
|
||||
|
||||
if (file_exists(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/js/'.$asset.'.js')) {
|
||||
$document->addScript(JURI::base().'components/'.SCOMPONENT.'/kui/js/'.$asset.'.js');
|
||||
}
|
||||
}
|
||||
|
||||
$this->kui = JURI::base()."components/".SCOMPONENT."/kui/";
|
||||
|
||||
if (version_compare(JVERSION, '3.1', '>=')) {
|
||||
$this->useractions = JHelperContent::getActions(SCOMPONENT);
|
||||
$users = JHelperContent::getActions('com_users');
|
||||
$this->useractions->set('user.edit', $users->get('core.edit'));
|
||||
} else {
|
||||
$this->useractions = new JObject;
|
||||
$actions = JAccess::getActions(SCOMPONENT);
|
||||
|
||||
foreach ($actions as $action) {
|
||||
$this->useractions->set($action->name, $this->user->authorise($action->name, SCOMPONENT));
|
||||
}
|
||||
|
||||
$this->useractions->set('user.edit', $this->user->authorise('core.edit', 'com_users'));
|
||||
}
|
||||
|
||||
JToolBarHelper::title(JText::_(SCOMPONENT)." : ".JText::_(SSTR.''.$this->view."_PAGE"), 'generic.png');
|
||||
|
||||
$model = $this->getModel($this->view);
|
||||
|
||||
$params = $sysmodel->checkParams(SCOMPONENT);
|
||||
|
||||
if (empty($params) || ($params == "{}")) {
|
||||
$this->app->enqueueMessage(JText::_(SSTR.'ERROR_OPTIONS'), 'error');
|
||||
}
|
||||
|
||||
$this->messages = $this->app->getMessageQueue();
|
||||
|
||||
$this->menutypes = $sysmodel->getMenus($this->params->get('menutypes'), true);
|
||||
array_unshift($this->menutypes, array('value' => "*", 'text' => JText::_(SSTR.'ALL_TYPES')));
|
||||
|
||||
$this->menus = $sysmodel->getMenus($this->params->get('menutypes'));
|
||||
array_unshift($this->menus, array('value' => "", 'text' => JText::_(SSTR.'SELECT_MENU')));
|
||||
|
||||
$this->users = $sysmodel->getUsers();
|
||||
array_unshift($this->users, array('value' => "", 'text' => JText::_(SSTR.'SELECT_USER')));
|
||||
|
||||
$this->groups = $sysmodel->getGroups();
|
||||
array_unshift($this->groups, array('value' => "all", 'text' => JText::_(SSTR.'ALL_GROUPS')));
|
||||
|
||||
$this->articles = $sysmodel->getArticles();
|
||||
array_unshift($this->articles, array('value' => "", 'text' => JText::_(SSTR.'SELECT_ARTICLE')));
|
||||
|
||||
$this->yesno = array(
|
||||
array('value' => '1', 'text' => JText::_('JYES'), 'class' => 'yes'),
|
||||
array('value' => '0', 'text' => JText::_('JNO'), 'class' => 'no'));
|
||||
|
||||
$this->status = array(
|
||||
array('value' => '1', 'text' => JText::_(SSTR.'PUBLISHED'), 'class' => 'yes'),
|
||||
array('value' => '0', 'text' => JText::_(SSTR.'UNPUBLISHED'), 'class' => 'no'));
|
||||
|
||||
for ($i = 5; $i <= 30; $i += 5) {
|
||||
$this->limits[] = array('value' => $i, 'text' => $i);
|
||||
}
|
||||
|
||||
$this->limits[] = array('value' => '50', 'text' => '50');
|
||||
$this->limits[] = array('value' => '100', 'text' => '100');
|
||||
$this->limits[] = array('value' => '0', 'text' => JText::_('JALL'));
|
||||
|
||||
$this->filters['limit'] = array('class' => 'input-mini', 'items' => $this->limits);
|
||||
|
||||
$this->editor = JEditor::getInstance(JFactory::getConfig()->get('editor'));
|
||||
|
||||
$languages = JLanguage::getKnownLanguages();
|
||||
$this->sitelanguage = JComponentHelper::getParams('com_languages')->get('site','en-GB');
|
||||
|
||||
usort($languages, function ($a, $b) { return strcmp($a['name'], $b['name']); });
|
||||
|
||||
$this->languages = array();
|
||||
|
||||
foreach ($languages as $language) {
|
||||
if ($language['tag'] == $this->sitelanguage) {
|
||||
array_unshift($this->languages, array('value' => $language['tag'], 'text' => $language['name']));
|
||||
} else {
|
||||
$this->languages[] = array('value' => $language['tag'], 'text' => $language['name']);
|
||||
}
|
||||
}
|
||||
|
||||
/* Extension specific */
|
||||
|
||||
$this->menu = array(
|
||||
array('view' => 'home', 'icon' => 'fas fa-home'),
|
||||
array('view' => 'categories', 'icon' => 'fas fa-server'),
|
||||
array('view' => 'shouts', 'icon' => 'fas fa-comments'),
|
||||
array('view' => 'banned', 'icon' => 'fas fa-ban'),
|
||||
array('view' => 'smileys', 'icon' => 'far fa-smile'),
|
||||
array('view' => 'options', 'icon' => 'fas fa-cog'),
|
||||
array('view' => 'help', 'icon' => 'fas fa-question-circle', 'link' => 'https://thekrotek.com/joomla-extensions/smart-shoutbox'));
|
||||
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Featherlight - ultra slim jQuery lightbox
|
||||
* Version 1.7.9 - http://noelboss.github.io/featherlight/
|
||||
*
|
||||
* Copyright 2017, Noël Raoul Bossart (http://www.noelboss.com)
|
||||
* MIT Licensed.
|
||||
**/
|
||||
@media all{html.with-featherlight{overflow:hidden}.featherlight{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483647;text-align:center;white-space:nowrap;cursor:pointer;background:#333;background:rgba(0,0,0,0)}.featherlight:last-of-type{background:rgba(0,0,0,.8)}.featherlight:before{content:'';display:inline-block;height:100%;vertical-align:middle}.featherlight .featherlight-content{position:relative;text-align:left;vertical-align:middle;display:inline-block;overflow:auto;padding:25px 25px 0;border-bottom:25px solid transparent;margin-left:5%;margin-right:5%;max-height:95%;background:#fff;cursor:auto;white-space:normal}.featherlight .featherlight-inner{display:block}.featherlight link.featherlight-inner,.featherlight script.featherlight-inner,.featherlight style.featherlight-inner{display:none}.featherlight .featherlight-close-icon{position:absolute;z-index:9999;top:0;right:0;line-height:25px;width:25px;cursor:pointer;text-align:center;font-family:Arial,sans-serif;background:#fff;background:rgba(255,255,255,.3);color:#000;border:0;padding:0}.featherlight .featherlight-close-icon::-moz-focus-inner{border:0;padding:0}.featherlight .featherlight-image{width:100%}.featherlight-iframe .featherlight-content{border-bottom:0;padding:0;-webkit-overflow-scrolling:touch;overflow-y:scroll}.featherlight iframe{border:0}.featherlight *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}}@media only screen and (max-width:1024px){.featherlight .featherlight-content{margin-left:0;margin-right:0;max-height:98%;padding:10px 10px 0;border-bottom:10px solid transparent}}@media print{@page{size:landscape}html.with-featherlight>*>:not(.featherlight){display:none}}
|
||||
|
||||
.inputbox #toolbar-main .input-selected
|
||||
{
|
||||
padding-left: 20px
|
||||
font-size: 85%
|
||||
float: none
|
||||
line-height: 100%
|
||||
border: none
|
||||
margin-top: 30px
|
||||
background-color: #000000;
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
.nice
|
||||
{
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 1px 0 #FFFFFF, 0 -1px 0 rgba(0, 0, 0, 0.1);
|
||||
font-family: arial;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.nice .NFI-button
|
||||
{
|
||||
background-color: #0192DD;
|
||||
background-image: -moz-linear-gradient(center bottom , #1774A3 0%, #0194DD 56%);
|
||||
border-bottom-left-radius: 3px;
|
||||
border-color: #0172BD #0172BD #00428D;
|
||||
border-image: none;
|
||||
border-style: solid;
|
||||
border-top-left-radius: 3px;
|
||||
border-width: 1px;
|
||||
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset;
|
||||
color: #FFFFFF;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-shadow: 0 -1px 0 #0172BD;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.nice .NFI-button:hover
|
||||
{
|
||||
background: none repeat scroll 0 0 #333333;
|
||||
border: 1px solid #000000;
|
||||
text-shadow: 0 -1px 0 #111111;
|
||||
transition: all 0.5s ease-out 0s;
|
||||
}
|
||||
|
||||
.nice .NFI-filename
|
||||
{
|
||||
border-radius: 0;
|
||||
background: none repeat scroll 0 0 #FFFFFF;
|
||||
border-bottom-right-radius: 3px;
|
||||
border-color: #777777 #777777 #777777 -moz-use-text-color;
|
||||
border-image: none;
|
||||
border-style: solid solid solid none;
|
||||
border-top-right-radius: 3px;
|
||||
border-width: 1px 1px 1px medium;
|
||||
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05) inset;
|
||||
color: #777777;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-shadow: 0 1px 0 #FFFFFF;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.table .inputbox
|
||||
{
|
||||
display: block
|
||||
width: auto
|
||||
margin-top: 30px
|
||||
float: none
|
||||
border: none
|
||||
padding-left: 20px
|
||||
outline-color: #000000;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,45 @@
|
||||
ul.sortable
|
||||
{
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
ul.sortable.active
|
||||
{
|
||||
background-color: #abe2a5;
|
||||
}
|
||||
|
||||
ul.sortable li
|
||||
{
|
||||
border: none;
|
||||
margin: 0 5px 0 0;
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
box-sizing: border-box;
|
||||
vertical-align: top;
|
||||
float: left;
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
ul.sortable li.placeholder
|
||||
{
|
||||
border: 1px dotted #dddddd;
|
||||
border-radius: 3px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#container .modform .content
|
||||
{
|
||||
line-height: 100%
|
||||
float: none
|
||||
margin-bottom: 0
|
||||
font-size: 85%
|
||||
padding-left: 20px
|
||||
margin-top: 30px
|
||||
color: #000000;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,204 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# The Krotek UI
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<div class="fields-container">
|
||||
<?php
|
||||
foreach ($fields as $field => $data) {
|
||||
if (($data['type'] != 'icon') && !empty($data)) {
|
||||
if ($this->view == 'options') {
|
||||
$value = $this->params->get($field);
|
||||
$name = "params[".$field."]";
|
||||
} else {
|
||||
if (isset($this->{$this->view}[$field])) $value = $this->{$this->view}[$field];
|
||||
else $value = "";
|
||||
|
||||
$name = $field;
|
||||
$fieldset = "FIELD";
|
||||
}
|
||||
|
||||
if (!isset($value) || ($value == "")) {
|
||||
$value = !empty($data['value']) ? $data['value'] : $data['default'];
|
||||
}
|
||||
|
||||
if (is_object($value)) $value = (array) $value;
|
||||
|
||||
$text = !empty($data['text']) ? $data['text'] : JText::_(SSTR.$fieldset.'_'.$field);
|
||||
$hint = !empty($data['hint']) ? $data['hint'] : JText::_(SSTR.$fieldset.'_'.$field.'_DESC');
|
||||
$class = !empty($data['class']) ? $data['class'] : "";
|
||||
|
||||
$classes = array($field);
|
||||
|
||||
if ($data['type'] == 'hidden') $classes[] = 'hidden';
|
||||
|
||||
if (!empty($data['class']) && strpos($data['class'], 'required') !== false) {
|
||||
$classes[] = 'required';
|
||||
$hint .= JText::_(SSTR.'REQUIRED');
|
||||
}
|
||||
|
||||
$classes = implode(' ', $classes);
|
||||
|
||||
?>
|
||||
<?php if ($data['type'] == 'title') { ?>
|
||||
<div class="fields-title <?php echo $class; ?>"><h4><?php echo $text; ?></h4></div>
|
||||
<?php } elseif (($data['type'] == 'message') && !empty($value)) { ?>
|
||||
<div class="fields-message <?php echo $class; ?>">
|
||||
<div class="message-text"><?php echo $value; ?></div>
|
||||
<div class="message-actions"><a class="action-close" title="<?php echo JText::_(SSTR.'BUTTON_CLOSE_TITLE'); ?>"><i class="far fa-times"> </i></a></div>
|
||||
</div>
|
||||
<?php } elseif ($data['type'] == 'hidden') { ?>
|
||||
<?php if (!is_array($value)) { ?>
|
||||
<input type="hidden" name="<?php echo $name; ?>" value="<?php echo $value; ?>" />
|
||||
<?php } else { ?>
|
||||
<?php foreach ($value as $key => $value) { ?>
|
||||
<input type="hidden" name="<?php echo $name; ?>[<?php echo $key; ?>]" value="<?php echo $value; ?>" />
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } elseif ($data['type'] == 'cleantext') { ?>
|
||||
<div class="fields-item <?php echo $classes; ?>">
|
||||
<div class="fields-label"><label for="<?php echo $field; ?>" title="<?php echo $text; ?>" class="hasPopover" data-content="<?php echo $hint; ?>" title="<?php echo $hint; ?>"><?php echo $text; ?></label></div>
|
||||
<div class="fields-field">
|
||||
<span class="fields-text <?php echo $class; ?>"><?php echo $value; ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php } elseif ($data['type'] == 'html') { ?>
|
||||
<div class="fields-item <?php echo $classes; ?>">
|
||||
<div class="fields-label"><label for="<?php echo $field; ?>" title="<?php echo $text; ?>" class="hasPopover" data-content="<?php echo $hint; ?>"><?php echo $text; ?></label></div>
|
||||
<div class="fields-field">
|
||||
<?php echo $data['value']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } elseif (($data['type'] == 'text') || ($data['type'] == 'multitext')) { ?>
|
||||
<div class="fields-item <?php echo $classes; ?>">
|
||||
<div class="fields-label"><label for="<?php echo $field; ?>" title="<?php echo $text; ?>" class="hasPopover" data-content="<?php echo $hint; ?>"><?php echo $text; ?></label></div>
|
||||
<div class="fields-field">
|
||||
<?php if ($data['type'] == 'multitext') { ?>
|
||||
<?php foreach ($this->languages as $language) { ?>
|
||||
<?php $langvalue = (is_array($value) ? (!empty($value[$language['value']]) ? $value[$language['value']] : '') : $value); ?>
|
||||
<?php $langcodes = explode('-', $language['value']); ?>
|
||||
<span class="fields-group"><span class="fields-language"><img src="<?php echo JURI::root().'media/mod_languages/images/'.reset($langcodes).'.gif'; ?>"></span><input type="text" name="<?php echo $name; ?>[<?php echo $language['value']; ?>]" id="<?php echo $field; ?>-<?php echo $language['value']; ?>" class="fields-input <?php echo $class; ?>" value="<?php echo htmlspecialchars($langvalue, ENT_QUOTES, 'UTF-8'); ?>" /></span>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<input type="text" name="<?php echo $name; ?>" id="<?php echo $field; ?>" class="fields-input <?php echo $class; ?>" value="<?php echo htmlspecialchars($value, ENT_QUOTES, 'UTF-8'); ?>" />
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } elseif ($data['type'] == 'date') { ?>
|
||||
<div class="fields-item <?php echo $classes; ?>">
|
||||
<div class="fields-label"><label for="<?php echo $field; ?>" title="<?php echo $text; ?>" class="hasPopover" data-content="<?php echo $hint; ?>"><?php echo $text; ?></label></div>
|
||||
<div class="fields-field">
|
||||
<input class="fields-input <?php echo $class; ?>" type="text" name="<?php echo $name; ?>" id="<?php echo $field; ?>" value="<?php echo (!empty($value) ? date(JText::_(SSTR.'FILTER_DATETIME'), $value) : ''); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<?php } elseif ($data['type'] == 'textarea') { ?>
|
||||
<div class="fields-item <?php echo $classes; ?>">
|
||||
<div class="fields-label"><label for="<?php echo $field; ?>" title="<?php echo $hint; ?>"><?php echo $text; ?></label></div>
|
||||
<div class="fields-field">
|
||||
<textarea class="fields-input <?php echo $class; ?>" name="<?php echo $name; ?>" id="<?php echo $field; ?>" /><?php echo $value; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<?php } elseif ($data['type'] == 'checkbox') { ?>
|
||||
<?php if (!is_array($data['data'])) { ?>
|
||||
<div class="fields-item <?php echo $classes; ?>">
|
||||
<div class="fields-label"><label for="<?php echo $field; ?>" title="<?php echo $text; ?>" class="hasPopover" data-content="<?php echo $hint; ?>"><?php echo $text; ?></label></div>
|
||||
<div class="fields-field">
|
||||
<input type="checkbox" name="<?php echo $name; ?>" id="<?php echo $field; ?>" class="fields-input <?php echo $class; ?>" value="<?php echo $value; ?>"<?php echo ($data['data'] == $value ? " checked='true'" : ""); ?> /><label></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<?php foreach ($data['data'] as $key => $item) { ?>
|
||||
<?php if (!empty($item)) { ?>
|
||||
<div class="fields-item <?php echo $classes; ?>">
|
||||
<div class="fields-label"><label for="<?php echo $field.$key; ?>" title="<?php echo !empty($item['text']) ? $item['text'] : $text; ?>" class="hasPopover" data-content="<?php echo isset($item['hint']) ? $item['hint'] : $hint; ?>" title=""><?php echo !empty($item['text']) ? $item['text'] : $text; ?></label></div>
|
||||
<div class="fields-field">
|
||||
<input type="checkbox" name="<?php echo $name; ?>[<?php echo (isset($item['key']) ? $item['key'] : ''); ?>]" id="<?php echo $field.$key; ?>" class="fields-input <?php echo $class; ?>" value="<?php echo $item['value']; ?>"<?php echo (in_array($item['value'], $value) ? " checked='true'" : ""); ?> /><label for="<?php echo $field.$key; ?>"></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } elseif (($data['type'] == 'radio') && !empty($data['data'])) { ?>
|
||||
<div class="fields-item <?php echo $classes; ?>">
|
||||
<div class="fields-label"><label for="<?php echo $field; ?>" title="<?php echo $text; ?>" class="hasPopover" data-content="<?php echo $hint; ?>"><?php echo $text; ?></label></div>
|
||||
<div class="fields-field">
|
||||
<fieldset id="radio-<?php echo $field; ?>" class="radio-buttons">
|
||||
<?php foreach ($data['data'] as $key => $item) { ?>
|
||||
<input type="radio"<?php echo ($value == $item['value'] ? " checked='checked'" : ""); ?> value="<?php echo $item['value']; ?>" name="<?php echo $name; ?>" id="<?php echo $field.$key; ?>" /><label for="<?php echo $field.$key; ?>" class="radio-label <?php echo (!empty($item['class']) ? $item['class'] : ''); ?><?php echo ($value == $item['value'] ? ' selected' : ''); ?>"><span><?php echo $item['text']; ?></span></label>
|
||||
<?php } ?>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<?php } elseif ((($data['type'] == 'select') || ($data['type'] == 'multiple')) && !empty($data['data'])) { ?>
|
||||
<?php $multiple = ($data['type'] == 'multiple' ? true : false); ?>
|
||||
<div class="fields-item <?php echo $classes; ?>">
|
||||
<div class="fields-label"><label for="<?php echo $field; ?>" title="<?php echo $text; ?>" class="hasPopover" data-content="<?php echo $hint; ?>"><?php echo $text; ?></label></div>
|
||||
<div class="fields-field">
|
||||
<select class="fields-input <?php echo $class; ?>" name="<?php echo $name; ?><?php echo ($multiple ? '[]' : ''); ?>"<?php echo ($multiple ? ' multiple="multiple"' : ''); ?>>
|
||||
<?php foreach ($data['data'] as $item) { ?>
|
||||
<?php if (strtolower($item['value']) == "<optgroup>") { ?>
|
||||
<optgroup label="<?php echo $item['text']; ?>">
|
||||
<?php } elseif (strtolower($item['value']) == "</optgroup>") { ?>
|
||||
</optgroup>
|
||||
<?php } else { ?>
|
||||
<option value="<?php echo $item['value']; ?>"<?php echo (($multiple && in_array($item['value'], $value)) || ($item['value'] == $value) ? " selected='selected'" : ""); ?>><?php echo $item['text']; ?></option>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php } elseif (($data['type'] == 'editor') || ($data['type'] == 'multieditor')) { ?>
|
||||
<div class="fields-item <?php echo $classes; ?>">
|
||||
<div class="fields-label"><label for="<?php echo $field; ?>" title="<?php echo $text; ?>" class="hasPopover" data-content="<?php echo $hint; ?>"><?php echo $text; ?></label></div>
|
||||
<div class="fields-field">
|
||||
<?php if ($data['type'] == 'multieditor') { ?>
|
||||
<ul class="language-tabs" id="<?php echo $field; ?>-languages">
|
||||
<?php foreach ($this->languages as $key => $language) { ?>
|
||||
<?php $langcodes = explode('-', $language['value']); ?>
|
||||
<li><a data-tab="<?php echo $field; ?>-language-<?php echo $language['value']; ?>"<?php echo ($key == 0 ? ' class="active"' : ''); ?>><img src="<?php echo JURI::root().'media/mod_languages/images/'.reset($langcodes).'.gif'; ?>" /> <?php echo $language['text']; ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<div class="language-content">
|
||||
<?php foreach ($this->languages as $key => $language) { ?>
|
||||
<?php $langvalue = (is_array($value) ? (!empty($value[$language['value']]) ? $value[$language['value']] : '') : $value); ?>
|
||||
<div class="tab-pane<?php echo ($key == 0 ? ' active' : ''); ?>" id="<?php echo $field; ?>-language-<?php echo $language['value']; ?>">
|
||||
<?php echo $this->editor->display($name.'['.$language['value'].']', $langvalue, $this->params->get('editorwidth', '100%'), $this->params->get('editorheight', '300'), '100', '25', true, $field.'-'.$language['value'], $class); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<?php echo $this->editor->display($name, $value, $this->params->get('editorwidth', '100%'), $this->params->get('editorheight', '300'), '100', '25', true, $field); ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } elseif ($data['type'] == 'file') { ?>
|
||||
<div class="fields-item <?php echo $classes; ?>">
|
||||
<div class="fields-label"><label for="<?php echo $field; ?>" title="<?php echo $text; ?>" class="hasPopover" data-content="<?php echo $hint; ?>"><?php echo $text; ?></label></div>
|
||||
<div class="fields-field">
|
||||
<input type="file" class="nice" id="uploaded" name="uploaded[]" multiple />
|
||||
|
||||
<?php if (!empty($value)) { ?>
|
||||
<div class="files-container">
|
||||
<?php $files = is_array($value) ? $value : json_decode($value, true); ?>
|
||||
<?php foreach ($files as $filekey => $file) { ?>
|
||||
<div class="attached-file">
|
||||
<input type="checkbox" id="file-<?php echo $filekey; ?>" name="<?php echo $name; ?>[<?php echo $filekey; ?>]" value="<?php echo $file; ?>" checked="checked" /><label for="file-<?php echo $filekey; ?>" title="<?php echo JText::_(SSTR.'ATTACHED_REMOVE'); ?>"><a href="<?php echo JURI::root().'media/'.SMAINCLASS.'/'.$file; ?>" target="_blank" title="<?php echo JText::_(SSTR.'ATTACHED_VIEW'); ?>"><?php echo $file; ?></a></label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 323 B |
Binary file not shown.
|
After Width: | Height: | Size: 538 B |
Binary file not shown.
|
After Width: | Height: | Size: 738 B |
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,322 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# The Krotek UI
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<div id="messages" class="system-messages" style="display: none;">
|
||||
<?php if (!empty($this->messages) && ($this->params->get('messages') != 'none')) { ?>
|
||||
<?php foreach ($this->messages as $key => $message) { ?>
|
||||
<?php if (($this->params->get('messages') != 'errors') || ($message['type'] == 'error')) { ?>
|
||||
<div id="message-<?php echo $key; ?>" class="message-container <?php echo $message['type']; ?>">
|
||||
<div class="message-text">
|
||||
<?php echo $message['message']; ?>
|
||||
</div>
|
||||
<div class="message-actions">
|
||||
<a title="<?php echo JText::_(SSTR.'BUTTON_CLOSE_TITLE'); ?>" class="action-close"><i class="fas fa-times-circle"> </i></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="footnote"><?php echo sprintf(JText::_(SSTR.'COPYRIGHT'), date("Y", time())); ?></div>
|
||||
<script type="text/javascript">
|
||||
|
||||
jQuery(document).ready(function()
|
||||
{
|
||||
<?php if (!empty($this->messages) && ($this->params->get('messages') != 'none')) { ?>
|
||||
jQuery(".kui .main-container").before(jQuery("#messages"));
|
||||
jQuery("#messages").fadeIn('fast');
|
||||
<?php } ?>
|
||||
|
||||
if (jQuery(".kui input.datepicker").length) {
|
||||
jQuery(".kui input.datepicker").datetimepicker({
|
||||
timepicker: true,
|
||||
format: "<?php echo JText::_(SSTR.'FILTER_DATETIME'); ?>"});
|
||||
|
||||
jQuery.datetimepicker.setLocale("<?php echo substr(JFactory::getLanguage()->getTag(), 0, 2); ?>");
|
||||
}
|
||||
|
||||
preload([
|
||||
"<?php echo $this->kui; ?>images/checkbox.png",
|
||||
"<?php echo $this->kui; ?>images/tick.png",
|
||||
"<?php echo $this->kui; ?>images/chosen-sprite.png",
|
||||
"<?php echo $this->kui; ?>images/chosen-sprite@2x.png"
|
||||
]);
|
||||
});
|
||||
|
||||
jQuery('.kui').on('focus', '.empty', function()
|
||||
{
|
||||
jQuery(this).removeClass('empty');
|
||||
});
|
||||
|
||||
// File input
|
||||
|
||||
if (jQuery(".kui input[type='file']").length > 0) {
|
||||
jQuery(".kui input[type='file']").nicefileinput();
|
||||
}
|
||||
|
||||
// Chosen select
|
||||
|
||||
if (jQuery(".kui select").length > 0) {
|
||||
jQuery(".kui select").chosen({
|
||||
width: 'auto',
|
||||
inherit_select_classes: true,
|
||||
hide_results_on_select: false,
|
||||
search_contains: true,
|
||||
disable_search_threshold: 30,
|
||||
no_results_text: "<?php echo JText::_(SSTR.'MESSAGE_SELECT_NO_RESULTS'); ?>",
|
||||
placeholder_text_multiple: "<?php echo JText::_(SSTR.'MESSAGE_SELECT_SOME'); ?>",
|
||||
placeholder_text_single: "<?php echo JText::_(SSTR.'MESSAGE_SELECT_ONE'); ?>"
|
||||
});
|
||||
}
|
||||
|
||||
jQuery(".kui select[multiple='multiple']").on('change', function(evt, params)
|
||||
{
|
||||
value = jQuery(this).val();
|
||||
|
||||
if (params.selected == "*") {
|
||||
values = jQuery.grep(value, function(value) {
|
||||
return value == '*';
|
||||
});
|
||||
} else if (value) {
|
||||
values = jQuery.grep(value, function(value) {
|
||||
return value != '*';
|
||||
});
|
||||
} else {
|
||||
values = '*';
|
||||
}
|
||||
|
||||
jQuery(this).val(values).trigger('chosen:updated');
|
||||
});
|
||||
|
||||
// Close message container
|
||||
|
||||
jQuery(".kui").on("click", ".message-actions a", function()
|
||||
{
|
||||
if (jQuery(this).hasClass('action-close')) {
|
||||
jQuery(this).parent().parent().fadeOut('fast');
|
||||
}
|
||||
});
|
||||
|
||||
// Switch options tab
|
||||
|
||||
jQuery(".kui").on("click", ".options-tab", function()
|
||||
{
|
||||
tabsid = jQuery(this).closest(".options-tabs").attr('id');
|
||||
groupid = jQuery(".kui #" + tabsid + " + div > .options-group").parent().attr('id');
|
||||
|
||||
jQuery(".kui #" + groupid + " > .options-group").hide();
|
||||
jQuery(".kui #" + tabsid + " .options-tab").removeClass("active");
|
||||
|
||||
jQuery(".kui #" + tabsid + " #" + this.id).toggleClass("active");
|
||||
jQuery(".kui #" + groupid + " #" + this.id + "-tab").show();
|
||||
});
|
||||
|
||||
// Switch language tab
|
||||
|
||||
jQuery(".kui").on("click", ".language-tabs a", function()
|
||||
{
|
||||
parentid = jQuery(this).closest('ul').attr('id');
|
||||
values = parentid.split('-');
|
||||
field = values[0];
|
||||
|
||||
contentid = jQuery(this).attr('data-tab');
|
||||
|
||||
jQuery(".kui ." + field + " .language-tabs a").removeClass("active");
|
||||
jQuery(".kui ." + field + " .language-content .tab-pane").removeClass("active");
|
||||
|
||||
jQuery(this).toggleClass("active");
|
||||
jQuery(".kui ." + field + " .language-content #" + contentid).toggleClass("active");
|
||||
});
|
||||
|
||||
// Switch radio buttons
|
||||
|
||||
jQuery(".kui .radio-buttons").on('click', 'label', function()
|
||||
{
|
||||
id = jQuery(this).parent().attr('id');
|
||||
input = jQuery(this).attr('for');
|
||||
|
||||
jQuery(".kui #" + id + " label").removeClass('selected');
|
||||
jQuery(".kui #" + id + " input[type='radio']").attr('checked', false);
|
||||
|
||||
jQuery(this).toggleClass('selected');
|
||||
jQuery(".kui #" + id + " #" + input).attr('checked', true);
|
||||
});
|
||||
|
||||
// Submenu button click
|
||||
|
||||
jQuery(".kui .menu-actions").on("click", "a", function()
|
||||
{
|
||||
if (!jQuery(this).hasClass('disabled') && !jQuery(this).hasClass('skip')) {
|
||||
values = jQuery("#<?php echo SMAINCLASS; ?>").attr('class');
|
||||
classes = values.split(" ");
|
||||
page = classes[0];
|
||||
action = this.id;
|
||||
task = page + action;
|
||||
submit = true;
|
||||
|
||||
if (jQuery(this).hasClass('select') && (jQuery(".kui input[name*='cid']:checked").length == 0) && (page != 'options')) {
|
||||
alert("<?php echo JText::_(SSTR.'WARNING_SELECT'); ?>");
|
||||
submit = false;
|
||||
} else if ((action == 'reset') && (page == 'options')) {
|
||||
if (!confirm("<?php echo JText::_(SSTR.'WARNING_RESET_SETTINGS'); ?>")) {
|
||||
submit = false;
|
||||
}
|
||||
} else if (action == 'empty') {
|
||||
if (!confirm("<?php echo JText::_(SSTR.'WARNING_EMPTY'); ?>")) {
|
||||
submit = false;
|
||||
}
|
||||
} else if (action != 'cancel') {
|
||||
jQuery(".kui .fields-field .required").each(function(i) {
|
||||
if (this.value == "") {
|
||||
addMessage("<?php echo JText::_(SSTR.'ERROR_EMPTY'); ?>");
|
||||
jQuery("#" + this.id).toggleClass('empty');
|
||||
submit = false;
|
||||
|
||||
groupid = jQuery(this).closest(".options-group").attr('id');
|
||||
tabsid = jQuery(".kui #" + groupid.replace("-tab", "")).closest(".options-tabs").attr('id');
|
||||
|
||||
jQuery(".kui #options > .options-group").hide();
|
||||
jQuery(".kui #" + tabsid + " .options-tab").removeClass("active");
|
||||
|
||||
jQuery(".kui #" + tabsid + " #" + groupid.replace("-tab", "")).toggleClass("active");
|
||||
jQuery(".kui #" + groupid).show();
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if (submit && (jQuery(".kui input[name='email']").length > 0) && !validateEmail(jQuery(".kui input[name='email']").val())) {
|
||||
addMessage("<?php echo JText::_(SSTR.'ERROR_INVALID_EMAIL'); ?>");
|
||||
jQuery(this).toggleClass('empty');
|
||||
submit = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (jQuery(this).hasClass('selectall')) {
|
||||
jQuery(".kui input[name='selectall']").trigger('click');
|
||||
}
|
||||
|
||||
if (submit) {
|
||||
jQuery(".kui input[name='task']").val(task);
|
||||
jQuery(".kui form[name='adminForm']").submit();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Search and filters
|
||||
|
||||
jQuery(".kui #filters").keydown(function(e)
|
||||
{
|
||||
if (e.keyCode == 13) {
|
||||
jQuery(".kui #filters .search").trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
jQuery(".kui #filters").on("click", ".search-buttons a", function()
|
||||
{
|
||||
if (jQuery(this).hasClass('clear')) {
|
||||
jQuery(".kui .search-input input").val("");
|
||||
}
|
||||
|
||||
jQuery(".kui form[name='adminForm']").submit();
|
||||
});
|
||||
|
||||
jQuery(".kui #filters").on("change", ".filter-items", function()
|
||||
{
|
||||
jQuery(".kui form[name='adminForm']").submit();
|
||||
});
|
||||
|
||||
// Items list
|
||||
|
||||
<?php if (!empty($this->items)) { ?>
|
||||
|
||||
jQuery(".kui input[name='selectall']").click(function()
|
||||
{
|
||||
jQuery(".kui input[name*='cid']").attr('checked', this.checked);
|
||||
});
|
||||
|
||||
jQuery(".kui table").on("click", "td.status a, td.block a, td.actions a", function()
|
||||
{
|
||||
checkbox = jQuery(this).closest("tr").find("input[type='checkbox']");
|
||||
|
||||
if (jQuery(this).hasClass("published")) {
|
||||
task = "unpublish";
|
||||
} else if (jQuery(this).hasClass("unpublished") || jQuery(this).hasClass("unapproved")) {
|
||||
task = "publish";
|
||||
} else if (jQuery(this).hasClass("toggle")) {
|
||||
if (jQuery(this).closest("tr").find(".status a").hasClass("unpublished")) task = "publish";
|
||||
else task = "unpublish";
|
||||
} else if (jQuery(this).hasClass("active")) {
|
||||
task = "block";
|
||||
} else if (jQuery(this).hasClass("blocked")) {
|
||||
task = "unblock";
|
||||
} else {
|
||||
id = this.id;
|
||||
values = id.split("-");
|
||||
task = values[1];
|
||||
}
|
||||
|
||||
if (!checkbox.is(":checked")) checkbox.prop("checked", true);
|
||||
|
||||
jQuery(".kui .menu-actions a." + task).trigger('click');
|
||||
});
|
||||
|
||||
Joomla.orderTable = function()
|
||||
{
|
||||
if (document.getElementById("sortTable").length) {
|
||||
table = document.getElementById("sortTable");
|
||||
direction = document.getElementById("directionTable");
|
||||
ordering = table.options[table.selectedIndex].value;
|
||||
|
||||
if (ordering != '<?php echo $this->ordering; ?>') {
|
||||
direction = 'desc';
|
||||
} else {
|
||||
direction = direction.options[direction.selectedIndex].value;
|
||||
}
|
||||
|
||||
Joomla.tableOrdering(ordering, direction, '');
|
||||
}
|
||||
}
|
||||
|
||||
<?php } ?>
|
||||
|
||||
// Functions
|
||||
|
||||
function preload(sources)
|
||||
{
|
||||
jQuery(sources).each(function () {
|
||||
jQuery("<img />").attr("src", this).appendTo("body").hide();
|
||||
});
|
||||
}
|
||||
|
||||
function validateEmail(email)
|
||||
{
|
||||
var pattern = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,6})+$/;
|
||||
return pattern.test(email);
|
||||
}
|
||||
|
||||
function addMessage(text)
|
||||
{
|
||||
html = "<div id='message-0' class='message-container error'>";
|
||||
html += "<div class='message-text'>" + text + "</div>";
|
||||
html += "<div class='message-actions'>";
|
||||
html += "<a title='" + "<?php echo JText::_(SSTR.'BUTTON_CLOSE_TITLE'); ?>" + "' class='action-close'><i class='fas fa-times-circle'> </i></a>";
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
|
||||
jQuery(".kui .main-container").before(jQuery("#messages"));
|
||||
jQuery("#messages").html(html).fadeIn('fast');
|
||||
}
|
||||
|
||||
</script>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
!function(a){a.fn.nicefileinput=function(b){var c={label:"Browse...",fullPath:!1};return b&&a.extend(c,b),this.each(function(){var b=this;if(void 0===a(b).attr("data-styled")){var d=Math.round(1e4*Math.random()),e=new Date,f=e.getTime()+d.toString(),g=a('<input type="text" readonly="readonly">').css({display:"block","float":"left",margin:0,padding:"0 5px"}).addClass("NFI-filename NFI"+f),h=a("<div>").css({overflow:"hidden",position:"relative",display:"block","float":"left","white-space":"nowrap","text-align":"center"}).addClass("NFI-button NFI"+f).html(c.label);a(b).after(g),a(b).wrap(h),a(".NFI"+f).wrapAll('<div class="NFI-wrapper" id="NFI-wrapper-'+f+'" />'),a(".NFI-wrapper").css({overflow:"auto",display:"inline-block"}),a("#NFI-wrapper-"+f).addClass(a(b).attr("class")),a(b).css({opacity:0,position:"absolute",border:"none",margin:0,padding:0,top:0,right:0,cursor:"pointer",height:"60px"}).addClass("NFI-current"),a(b).on("change",function(){var d=a(b).val();if(c.fullPath)g.val(d);else{var e=d.split(/[/\\]/);g.val(e[e.length-1])}}),a(b).attr("data-styled",!0)}})}}(jQuery);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# The Krotek UI
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<div class="menu-main">
|
||||
<ul>
|
||||
<?php foreach ($this->menu as $item) { ?>
|
||||
<?php
|
||||
|
||||
$classes = array('menu-item');
|
||||
|
||||
if (!empty($item['submenu'])) {
|
||||
$classes[] = 'dropdown';
|
||||
|
||||
if (in_array($this->view, $item['submenu'])) {
|
||||
$classes[] = 'active';
|
||||
}
|
||||
} else {
|
||||
if ($this->view == $item['view']) {
|
||||
$classes[] = 'active';
|
||||
}
|
||||
} ?>
|
||||
<li class="<?php echo implode(' ', $classes); ?>">
|
||||
<?php if (!empty($item['link'])) { ?>
|
||||
<a href="<?php echo $item['link']; ?>" target="_blank"><?php if (!empty($item['icon'])) { ?><i class="<?php echo $item['icon']; ?>"></i><?php } ?><?php echo JText::_(SSTR.'BUTTON_'.$item['view']); ?></a>
|
||||
<?php } else { ?>
|
||||
<?php if (empty($item['submenu'])) { ?>
|
||||
<a href="<?php echo JRoute::_('index.php?option='.SCOMPONENT).'&view='.$item['view']; ?>"><?php if (!empty($item['icon'])) { ?><i class="<?php echo $item['icon']; ?>"></i><?php } ?><?php echo JText::_(SSTR.'BUTTON_'.$item['view']); ?></a>
|
||||
<?php } else { ?>
|
||||
<span><?php if (!empty($item['icon'])) { ?><i class="<?php echo $item['icon']; ?>"></i><?php } ?><?php echo JText::_(SSTR.'BUTTON_'.$item['view']); ?></span>
|
||||
<div class="submenu-main">
|
||||
<ul>
|
||||
<?php foreach ($item['submenu'] as $submenuitem) { ?>
|
||||
<li><a href="<?php echo JRoute::_('index.php?option='.SCOMPONENT).'&view='.$submenuitem; ?>"><?php echo JText::_(SSTR.'BUTTON_'.$submenuitem); ?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# The Krotek UI
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
$buttons = array(
|
||||
'add' => array('permission' => 'create', 'icon' => 'fas fa-plus-circle', 'class' => 'green'),
|
||||
'copy' => array('permission' => 'create', 'icon' => 'far fa-copy', 'class' => 'select'),
|
||||
'refresh' => array('permission' => 'edit', 'icon' => 'fas fa-sync', 'class' => 'select'),
|
||||
'edit' => array('permission' => 'view', 'icon' => 'fas fa-edit', 'class' => 'select'),
|
||||
'publish' => array('permission' => 'state', 'icon' => 'far fa-check-circle', 'class' => 'select'),
|
||||
'unpublish' => array('permission' => 'state', 'icon' => 'far fa-times-circle', 'class' => 'select'),
|
||||
'delete' => array('permission' => 'delete', 'icon' => 'fas fa-times', 'class' => 'brown select'),
|
||||
'empty' => array('permission' => 'delete', 'icon' => 'fas fa-trash-alt', 'class' => 'red'),
|
||||
'scan' => array('permission' => 'edit', 'icon' => 'fas fa-sync', 'class' => ''),
|
||||
'save' => array('permission' => 'edit', 'icon' => 'fas fa-save', 'class' => 'green'),
|
||||
'apply' => array('permission' => 'edit', 'icon' => 'fas fa-check', 'class' => ''),
|
||||
'cancel' => array('permission' => '', 'icon' => 'fas fa-ban', 'class' => ''),
|
||||
'update' => array('permission' => 'options', 'icon' => 'fas fa-save', 'class' => 'green'),
|
||||
'export' => array('permission' => 'options', 'icon' => 'fas fa-download', 'class' => 'green'),
|
||||
'resend' => array('permission' => 'options', 'icon' => 'fas fa-envelope', 'class' => ''),
|
||||
'rates' => array('permission' => 'options', 'icon' => 'fas fa-chart-bar', 'class' => ''),
|
||||
'renew' => array('permission' => 'options', 'icon' => 'fas fa-sync', 'class' => ''),
|
||||
'reset' => array('permission' => 'options', 'icon' => 'fas fa-undo', 'class' => 'red'));
|
||||
|
||||
if (!empty($this->submenu)) { ?>
|
||||
<div class="menu-actions">
|
||||
<ul>
|
||||
<?php
|
||||
|
||||
foreach ($this->submenu as $button) {
|
||||
$class = array();
|
||||
|
||||
$data = $buttons[$button];
|
||||
|
||||
if (!$data['permission'] || $this->useractions->get('admin.'.$data['permission'])) {
|
||||
$class[] = $button;
|
||||
$title = JText::_(SSTR.'BUTTON_'.$button.'_TITLE');
|
||||
} else {
|
||||
$class[] = 'disabled';
|
||||
$title = JText::_(SSTR.'BUTTON_DISABLED_TITLE');
|
||||
}
|
||||
|
||||
if (!empty($data['class'])) $class[] = $data['class'];
|
||||
|
||||
?>
|
||||
<li><a id="<?php echo $button; ?>" class="hasTooltip <?php echo implode(' ', $class); ?>" title="<?php echo $title; ?>"><i class="<?php echo $data['icon']; ?>"></i><span><?php echo JText::_(SSTR.'BUTTON_'.$button); ?></span></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
@ -0,0 +1,116 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# The Krotek UI
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
$columns = 1;
|
||||
$restricted = array("", "*");
|
||||
$available = $this->params->get($this->view.'columns', array());
|
||||
|
||||
$actions = array(
|
||||
'copy' => array('permission' => 'create', 'icon' => 'far fa-copy'),
|
||||
'edit' => array('permission' => 'view', 'icon' => 'fas fa-pencil-alt', 'class' => 'blue'),
|
||||
'delete' => array('permission' => 'delete', 'icon' => 'fas fa-times', 'class' => 'red'),
|
||||
'toggle' => array('permission' => 'state', 'icon' => 'far fa-dot-circle'));
|
||||
|
||||
?>
|
||||
<table class="table table-striped adminlist">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%" class="center">
|
||||
<input type="checkbox" name="selectall" value="" title="<?php echo JText::_(SSTR.'SELECT_ALL'); ?>" />
|
||||
</th>
|
||||
|
||||
<?php foreach ($this->{$this->view.'columns'} as $column) { ?>
|
||||
<?php if (!in_array($column['value'], $restricted) && (!$available || in_array('*', $available) || in_array($column['value'], $available))) { ?>
|
||||
<?php $class = array($column['value']); ?>
|
||||
<?php if (!empty($column['class'])) $class[] = $column['class']; ?>
|
||||
<?php $width = (!empty($column['width']) ? ' width="'.$column['width'].'"' : ''); ?>
|
||||
<th class="<?php echo implode(' ', $class); ?>"<?php echo $width; ?>>
|
||||
<?php if ($column['sort']) { ?>
|
||||
<?php echo JHtml::_('grid.sort', SSTR.'COLUMN_'.$column['value'], $column['value'], $this->direction, $this->ordering); ?>
|
||||
<?php } else { ?>
|
||||
<?php echo JText::_(SSTR.'COLUMN_'.$column['value']); ?>
|
||||
<?php } ?>
|
||||
</th>
|
||||
<?php $columns++; ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<?php foreach ($this->items as $key => $item) { ?>
|
||||
<tr id="item-<?php echo $item->id; ?>" class="row<?php echo $key % 2; ?>">
|
||||
<td class="center">
|
||||
<input type="checkbox" value="<?php echo $item->id; ?>" name="cid[]">
|
||||
</td>
|
||||
|
||||
<?php foreach ($this->{$this->view.'columns'} as $column) { ?>
|
||||
<?php if (!in_array($column['value'], $restricted) && (!$available || in_array('*', $available) || in_array($column['value'], $available))) { ?>
|
||||
<?php $class = array($column['value']); ?>
|
||||
<?php if (!empty($column['class'])) $class[] = $column['class']; ?>
|
||||
<td class="<?php echo implode(' ', $class); ?>"><?php if ($column['value'] == 'actions') { ?>
|
||||
<?php if (!empty($this->actions)) {
|
||||
foreach ($this->actions as $action) {
|
||||
$class = array();
|
||||
|
||||
$data = $actions[$action];
|
||||
|
||||
if (!$data['permission'] || $this->useractions->get('admin.'.$data['permission'])) {
|
||||
$class[] = $action;
|
||||
$title = JText::_(SSTR.'BUTTON_'.$action.'_ITEM');
|
||||
} else {
|
||||
$class[] = 'disabled';
|
||||
$title = JText::_(SSTR.'BUTTON_DISABLED_TITLE');
|
||||
}
|
||||
|
||||
if (!empty($data['class'])) $class[] = $data['class'];
|
||||
|
||||
?><a id="actions-<?php echo $action; ?>-<?php echo $item->id; ?>" title="<?php echo $title; ?>" class="actions <?php echo implode(' ', $class); ?> hasTooltip"><i class="<?php echo $data['icon']; ?>"></i></a><?php } ?>
|
||||
<?php } ?>
|
||||
<?php } elseif (($column['value'] == 'status') || ($column['value'] == 'block')) { ?>
|
||||
<?php if ($item->{$column['value']} == 1) { ?>
|
||||
<a id="actions-<?php echo $column['value']; ?>-<?php echo $item->id; ?>" class="status <?php echo ($column['value'] == 'status' ? 'published' : 'active'); ?>" title="<?php echo JText::_(SSTR.'BUTTON_'.($column['value'] == 'status' ? 'UNPUBLISH' : 'BLOCK')); ?>"><i class="far fa-check-circle"></i></a>
|
||||
<?php } elseif ($item->{$column['value']} == 2) { ?>
|
||||
<a id="actions-<?php echo $column['value']; ?>-<?php echo $item->id; ?>" class="status unapproved" title="<?php echo JText::_(SSTR.'BUTTON_APPROVE'); ?>"><i class="fas fa-warning"></i></a>
|
||||
<?php } else { ?>
|
||||
<a id="actions-<?php echo $column['value']; ?>-<?php echo $item->id; ?>" class="status <?php echo ($column['value'] == 'status' ? 'unpublished' : 'blocked'); ?>" title="<?php echo JText::_(SSTR.'BUTTON_'.($column['value'] == 'status' ? 'PUBLISH' : 'UNBLOCK')); ?>"><i class="fas fa-times-circle"></i></a>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<?php if (!empty($item->{$column['value']})) { ?>
|
||||
<?php echo $item->{$column['value']}; ?>
|
||||
<?php } else { ?>
|
||||
<?php if (!empty($data['error'])) { ?>
|
||||
<span class="wrong"><?php echo $data['error']; ?></span>
|
||||
<?php } else { ?>
|
||||
—
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
|
||||
<?php if ($this->pagination->pagesTotal > 1) { ?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="<?php echo $columns; ?>"><?php echo $this->pagination->getListFooter(); ?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<?php } else { ?>
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
<?php } ?>
|
||||
</table>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# The Krotek UI
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<div id="<?php echo SMAINCLASS; ?>" class="<?php echo $this->view; ?> kui">
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/menu.php'); ?>
|
||||
<div class="main-container">
|
||||
<?php if ($this->useractions->get('admin.view')) { ?>
|
||||
<form action="<?php echo JRoute::_('index.php?option='.SCOMPONENT.'&view='.$this->view); ?>" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data" class="edit">
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/submenu.php'); ?>
|
||||
<?php $fields = $this->fields; ?>
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/fields.php'); ?>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/js.php'); ?>
|
||||
<?php if (file_exists(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/helpers/js.php')) { ?>
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/helpers/js.php'); ?>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<div class="restricted"><?php echo JText::_(SSTR.'ERROR_PERMISSIONS_VIEW'); ?></div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# The Krotek UI
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<div id="<?php echo SMAINCLASS; ?>" class="<?php echo $this->view; ?> kui">
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/menu.php'); ?>
|
||||
<div class="main-container">
|
||||
<?php if ($this->useractions->get('admin.view')) { ?>
|
||||
<form action="<?php echo JRoute::_('index.php?option='.SCOMPONENT.'&view='.$this->view); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/submenu.php'); ?>
|
||||
<div id="filters">
|
||||
<div class="search-input pull-left">
|
||||
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_(SSTR.'SEARCH'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JText::_(SSTR.'SEARCH_'.$this->view); ?>" />
|
||||
</div>
|
||||
<div class="search-buttons btn-group pull-left fltlft">
|
||||
<a class="search btn hasTooltip" title="<?php echo JText::_(SSTR.'BUTTON_SEARCH'); ?>"><i class="fas fa-search"> </i></a>
|
||||
<a class="clear btn hasTooltip" title="<?php echo JText::_(SSTR.'BUTTON_CLEAR'); ?>"><i class="fas fa-eraser"> </i></a>
|
||||
</div>
|
||||
<?php foreach ($this->filters as $key => $filter) { ?>
|
||||
<div class="filter-<?php echo $key; ?> pull-right fltrt">
|
||||
<select name="filter_<?php echo $key; ?>" class="<?php echo $filter['class']; ?>" onchange="this.form.submit()">
|
||||
<?php foreach ($filter['items'] as $item) { ?>
|
||||
<option value="<?php echo $item['value']; ?>"<?php echo ($item['value'] == $this->state->get('filter.'.$key) ? ' selected' : ''); ?>>
|
||||
<?php echo $item['text']; ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php if (!empty($this->items)) { ?>
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/table.php'); ?>
|
||||
<?php } else { ?>
|
||||
<div class="noresults">
|
||||
<?php echo JText::_(SSTR.'MESSAGE_NORESULTS'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->ordering; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->direction; ?>" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/js.php'); ?>
|
||||
<?php if (file_exists(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/helpers/js.php')) { ?>
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/helpers/js.php'); ?>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<div class="restricted"><?php echo JText::_(SSTR.'ERROR_PERMISSIONS_VIEW'); ?></div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,81 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxModelBanned extends JModelList
|
||||
{
|
||||
var $db, $app;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->db = JFactory::getDBO();
|
||||
$this->app = JFactory::getApplication();
|
||||
|
||||
if (empty($config['filter_fields'])) {
|
||||
$config['filter_fields'] = array(
|
||||
'id', 'b.id',
|
||||
'shout', 'b.shout_id',
|
||||
'author_id', 'b.author_id',
|
||||
'author', 'b.author',
|
||||
'email', 'u.email',
|
||||
'ip', 'b.ip',
|
||||
'added', 'b.added');
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
protected function populateState($ordering = 'id', $direction = 'desc')
|
||||
{
|
||||
$search = $this->getUserStateFromRequest($this->context.'.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$this->setState('list.ordering', $ordering);
|
||||
$this->setState('list.direction', $direction);
|
||||
|
||||
parent::populateState($ordering, $direction);
|
||||
|
||||
$limit = $this->getUserStateFromRequest($this->context.'.list.limit', 'filter_limit', $this->app->getCfg('list_limit'), 'uint');
|
||||
$this->setState('filter.limit', $limit);
|
||||
$this->setState('list.limit', $limit);
|
||||
|
||||
$start = $this->getUserStateFromRequest($this->context.'.limitstart', 'limitstart', 0, 'uint');
|
||||
$this->setState('list.start', $start);
|
||||
}
|
||||
|
||||
protected function getListQuery()
|
||||
{
|
||||
$query = $this->db->getQuery(true);
|
||||
|
||||
$query->select("b.*, u.email");
|
||||
$query->from(SPREFIX."banned AS b");
|
||||
$query->leftJoin("#__users AS u ON u.id = b.author_id");
|
||||
|
||||
$search = $this->getState('filter.search');
|
||||
|
||||
if ($search) {
|
||||
if ((substr($search, 0, 1) == '"') && (substr($search, -1) == '"')) {
|
||||
$search = $this->db->quote($this->db->escape(trim($search, '"'), true), false);
|
||||
} else {
|
||||
$search = $this->db->quote('%'.$this->db->escape(trim($search, '"'), true).'%', false);
|
||||
}
|
||||
|
||||
$query->where('b.author LIKE '.$search.' OR b.author_id LIKE '.$search.' OR b.ip LIKE '.$search.' OR u.email LIKE '.$search);
|
||||
}
|
||||
|
||||
$query->order($this->db->escape($this->getState('list.ordering', 'b.id')).' '.$this->db->escape($this->getState('list.direction', 'DESC')));
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxModelCategories extends JModelList
|
||||
{
|
||||
var $db, $app;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->db = JFactory::getDBO();
|
||||
$this->app = JFactory::getApplication();
|
||||
|
||||
if (empty($config['filter_fields'])) {
|
||||
$config['filter_fields'] = array(
|
||||
'id', 'c.id',
|
||||
'title', 'c.title',
|
||||
'shouts', 'shouts',
|
||||
'added', 'c.added');
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
protected function populateState($ordering = 'added', $direction = 'desc')
|
||||
{
|
||||
$search = $this->getUserStateFromRequest($this->context.'.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$status = $this->getUserStateFromRequest($this->context.'.filter.status', 'filter_status', '', 'string');
|
||||
$this->setState('filter.status', $status);
|
||||
|
||||
$this->setState('list.ordering', $ordering);
|
||||
$this->setState('list.direction', $direction);
|
||||
|
||||
parent::populateState($ordering, $direction);
|
||||
|
||||
$limit = $this->getUserStateFromRequest($this->context.'.list.limit', 'filter_limit', $this->app->getCfg('list_limit'), 'uint');
|
||||
$this->setState('filter.limit', $limit);
|
||||
$this->setState('list.limit', $limit);
|
||||
|
||||
$start = $this->getUserStateFromRequest($this->context.'.limitstart', 'limitstart', 0, 'uint');
|
||||
$this->setState('list.start', $start);
|
||||
}
|
||||
|
||||
protected function getListQuery()
|
||||
{
|
||||
$query = $this->db->getQuery(true);
|
||||
|
||||
$query->select("c.*, (SELECT COUNT(id) FROM ".SPREFIX."shouts WHERE category_id = c.id) AS shouts");
|
||||
$query->from(SPREFIX."categories AS c");
|
||||
|
||||
$search = $this->getState('filter.search');
|
||||
|
||||
if (!empty($search)) {
|
||||
if ((substr($search, 0, 1) == '"') && (substr($search, -1) == '"')) {
|
||||
$search = $this->db->quote($this->db->escape(trim($search, '"'), true), false);
|
||||
$description = "MATCH (c.description) AGAINST (".$search." IN BOOLEAN MODE)";
|
||||
} else {
|
||||
$search = $this->db->quote('%'.$this->db->escape(trim($search, '"'), true).'%', false);
|
||||
$description = "c.description LIKE ".$search;
|
||||
}
|
||||
|
||||
$query->where($description." OR c.title LIKE ".$search);
|
||||
}
|
||||
|
||||
$status = $this->getState('filter.status');
|
||||
|
||||
if (is_numeric($status)) $query->where('c.status = '.(int)$status);
|
||||
|
||||
$query->group('c.id');
|
||||
$query->order($this->db->escape($this->getState('list.ordering', 'c.title')).' '.$this->db->escape($this->getState('list.direction', 'asc')));
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxModelCategory extends JModelLegacy
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxModelHome extends JModelLegacy
|
||||
{
|
||||
var $db;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->db = JFactory::getDBO();
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
public function getStats()
|
||||
{
|
||||
$this->db->setQuery("SELECT (SELECT COUNT(id) FROM `".SPREFIX."categories`) AS categories, (SELECT COUNT(id) FROM `".SPREFIX."shouts`) AS shouts, (SELECT COUNT(DISTINCT(author_id)) FROM `".SPREFIX."shouts`) AS users, (SELECT COUNT(id) FROM `".SPREFIX."shouts` WHERE author_id = 0) AS guests, (SELECT COUNT(id) FROM `".SPREFIX."banned`) AS banned");
|
||||
$stats = $this->db->loadAssoc();
|
||||
|
||||
return $stats;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxModelOptions extends JModelList
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxModelShout extends JModelLegacy
|
||||
{
|
||||
public function __construct($config = array())
|
||||
{
|
||||
parent::__construct($config);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxModelShouts extends JModelList
|
||||
{
|
||||
var $db, $app;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->db = JFactory::getDBO();
|
||||
$this->app = JFactory::getApplication();
|
||||
|
||||
if (empty($config['filter_fields'])) {
|
||||
$config['filter_fields'] = array(
|
||||
'id', 's.id',
|
||||
'author', 's.author',
|
||||
'message', 's.message',
|
||||
'ip', 's.ip',
|
||||
'added', 's.added');
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
protected function populateState($ordering = 'added', $direction = 'desc')
|
||||
{
|
||||
$search = $this->getUserStateFromRequest($this->context.'.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$status = $this->getUserStateFromRequest($this->context.'.filter.status', 'filter_status', '', 'string');
|
||||
$this->setState('filter.status', $status);
|
||||
|
||||
$category = $this->getUserStateFromRequest($this->context.'.filter.category', 'filter_category', '', 'string');
|
||||
$this->setState('filter.category', $category);
|
||||
|
||||
$this->setState('list.ordering', $ordering);
|
||||
$this->setState('list.direction', $direction);
|
||||
|
||||
parent::populateState($ordering, $direction);
|
||||
|
||||
$limit = $this->getUserStateFromRequest($this->context.'.list.limit', 'filter_limit', $this->app->getCfg('list_limit'), 'uint');
|
||||
$this->setState('filter.limit', $limit);
|
||||
$this->setState('list.limit', $limit);
|
||||
|
||||
$start = $this->getUserStateFromRequest($this->context.'.limitstart', 'limitstart', 0, 'uint');
|
||||
$this->setState('list.start', $start);
|
||||
}
|
||||
|
||||
protected function getListQuery()
|
||||
{
|
||||
$query = $this->db->getQuery(true);
|
||||
|
||||
$query->select("s.*, c.title AS category");
|
||||
$query->from(SPREFIX."shouts AS s");
|
||||
$query->leftJoin(SPREFIX."categories AS c ON c.id = s.category_id");
|
||||
|
||||
$search = $this->getState('filter.search');
|
||||
|
||||
if (!empty($search)) {
|
||||
if (substr($search, 0, 1) == '"' && substr($search, -1) == '"') {
|
||||
$message = "MATCH (s.message) AGAINST ('".$search."' IN BOOLEAN MODE)";
|
||||
$search = $this->db->quote($this->db->escape(trim($search, '"'), true), false);
|
||||
} else {
|
||||
$message = "s.message LIKE '%".$search."%'";
|
||||
$search = $this->db->quote('%'.$this->db->escape(trim($search, '"'), true).'%', false);
|
||||
}
|
||||
|
||||
$query->where($message.' OR c.title LIKE '.$search.' OR s.author LIKE '.$search.' OR s.ip LIKE '.$search);
|
||||
}
|
||||
|
||||
$state = $this->getState('filter.status');
|
||||
|
||||
if (is_numeric($state)) $query->where('s.status = '.(int)$state);
|
||||
|
||||
$category = $this->getState('filter.category');
|
||||
|
||||
if (is_numeric($category)) $query->where('s.category_id = '.(int)$category);
|
||||
|
||||
$query->order($this->db->escape($this->getState('list.ordering', 's.added')).' '.$this->db->escape($this->getState('list.direction', 'DESC')));
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,149 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxModelSmileys extends JModelList
|
||||
{
|
||||
var $db, $app;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->db = JFactory::getDBO();
|
||||
$this->path = JPATH_ROOT."/components/".SCOMPONENT."/assets/smileys";
|
||||
|
||||
if (empty($config['filter_fields'])) {
|
||||
$config['filter_fields'] = array(
|
||||
'id', 'id',
|
||||
'image', 'image',
|
||||
'typed', 'typed',
|
||||
'title', 'title',
|
||||
'folder', 'folder');
|
||||
}
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
protected function populateState($ordering = 'id', $direction = 'asc')
|
||||
{
|
||||
$search = $this->getUserStateFromRequest($this->context.'.filter.search', 'filter_search');
|
||||
$this->setState('filter.search', $search);
|
||||
|
||||
$folder = $this->getUserStateFromRequest($this->context.'.filter.folder', 'filter_folder', '', 'string');
|
||||
$this->setState('filter.folder', $folder);
|
||||
|
||||
$status = $this->getUserStateFromRequest($this->context.'.filter.status', 'filter_status', '', 'string');
|
||||
$this->setState('filter.status', $status);
|
||||
|
||||
$this->setState('list.ordering', $ordering);
|
||||
$this->setState('list.direction', $direction);
|
||||
|
||||
parent::populateState($ordering, $direction);
|
||||
|
||||
$limit = $this->getUserStateFromRequest($this->context.'.list.limit', 'filter_limit', $this->app->getCfg('list_limit'), 'uint');
|
||||
$this->setState('filter.limit', $limit);
|
||||
$this->setState('list.limit', $limit);
|
||||
|
||||
$start = $this->getUserStateFromRequest($this->context.'.limitstart', 'limitstart', 0, 'uint');
|
||||
$this->setState('list.start', $start);
|
||||
}
|
||||
|
||||
protected function getListQuery()
|
||||
{
|
||||
$query = $this->db->getQuery(true);
|
||||
|
||||
$query->select("*");
|
||||
$query->from(SPREFIX."smileys");
|
||||
|
||||
$search = $this->getState('filter.search');
|
||||
|
||||
if (!empty($search)) {
|
||||
if (substr($search, 0, 1) == '"' && substr($search, -1) == '"') {
|
||||
$search = $this->db->quote($this->db->escape(trim($search, '"'), true), false);
|
||||
} else {
|
||||
$search = $this->db->quote('%'.$this->db->escape(trim($search, '"'), true).'%', false);
|
||||
}
|
||||
|
||||
$query->where('image LIKE '.$search.' OR typed LIKE '.$search.' OR title LIKE '.$search);
|
||||
}
|
||||
|
||||
$folder = $this->getState('filter.folder');
|
||||
|
||||
if (!empty($folder)) $query->where('folder = '.$this->db->Quote($folder));
|
||||
|
||||
$state = $this->getState('filter.status');
|
||||
|
||||
if (is_numeric($state)) $query->where('status = '.(int)$state);
|
||||
|
||||
$query->order($this->db->escape($this->getState('list.ordering', 'image')).' '.$this->db->escape($this->getState('list.direction', 'DESC')));
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
public function smileysScan()
|
||||
{
|
||||
$added = 0;
|
||||
$folders = array();
|
||||
|
||||
$folders = array_diff(scandir($this->path), array('.', '..', 'index.html'));
|
||||
|
||||
foreach ($folders as $folder) {
|
||||
$path = $this->path."/".$folder;
|
||||
|
||||
if (is_dir($path)) {
|
||||
$smileys = array_diff(scandir($path), array('.', '..', 'index.html'));
|
||||
|
||||
if (!empty($smileys)) {
|
||||
$allowed = array("jpg", "png", "gif");
|
||||
|
||||
$this->db->setQuery("SELECT image FROM ".SPREFIX."smileys WHERE folder = ".$this->db->Quote($folder)." GROUP BY image");
|
||||
$images = $this->db->loadColumn();
|
||||
|
||||
foreach ($smileys as $key => $smiley) {
|
||||
if (!in_array($smiley, $images)) {
|
||||
$fileinfo = pathinfo($path."/".$smiley);
|
||||
|
||||
if (is_file($path."/".$smiley) && in_array(strtolower($fileinfo['extension']), $allowed)) {
|
||||
$typed = array(':'.$fileinfo['filename'].':', '', '');
|
||||
|
||||
$this->db->setQuery("INSERT INTO ".SPREFIX."smileys (image, typed, title, folder) VALUES (".$this->db->Quote($smiley).", ".$this->db->Quote(json_encode($typed)).", '', ".$this->db->Quote($folder).")");
|
||||
$this->db->query();
|
||||
|
||||
$added++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $added;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!function_exists('iemplString'))
|
||||
{
|
||||
function iemplString()
|
||||
{
|
||||
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
$str = '';
|
||||
|
||||
for ($i = 0; $i < 10; $i++) {
|
||||
$str = $characters[rand(0, 0)];
|
||||
}
|
||||
|
||||
return $str;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,242 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class com_smartshoutboxInstallerScript
|
||||
{
|
||||
var $app, $redirect;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->redirect = 'index.php?option=com_smartshoutbox';
|
||||
}
|
||||
|
||||
public function install($parent)
|
||||
{
|
||||
$parent->getParent()->setRedirectURL($this->redirect);
|
||||
}
|
||||
|
||||
public function uninstall($parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function update($parent)
|
||||
{
|
||||
$lang = JFactory::getLanguage();
|
||||
$lang->load('com_smartshoutbox', JPATH_ADMINISTRATOR);
|
||||
|
||||
$db = JFactory::getDBO();
|
||||
|
||||
// 3.0.0
|
||||
|
||||
// Categories
|
||||
|
||||
if ($this->checkTable("smartshoutbox_categories")) {
|
||||
if (!$this->checkField('smartshoutbox_categories', 'groups')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_categories ADD `groups` VARCHAR(255) NOT NULL");
|
||||
$db->query();
|
||||
}
|
||||
|
||||
if (!$this->checkField('smartshoutbox_categories', 'icon')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_categories ADD `icon` VARCHAR(30) NOT NULL");
|
||||
$db->query();
|
||||
}
|
||||
|
||||
if (!$this->checkField('smartshoutbox_categories', 'ordering')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_categories ADD `ordering` INT(11) NOT NULL");
|
||||
$db->query();
|
||||
}
|
||||
|
||||
if (!$this->checkIndex('smartshoutbox_categories', 'description', 'FULLTEXT')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_categories ADD FULLTEXT (`description`)");
|
||||
$db->query();
|
||||
}
|
||||
}
|
||||
|
||||
// Shouts
|
||||
|
||||
if ($this->checkTable("smartshoutbox_shouts")) {
|
||||
if ($this->checkField('smartshoutbox_shouts', 'catid')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_shouts CHANGE `catid` `category_id` INT(11) NOT NULL");
|
||||
$db->query();
|
||||
}
|
||||
|
||||
if ($this->checkField('smartshoutbox_shouts', 'mid')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_shouts CHANGE `mid` `author_id` INT(11) NOT NULL");
|
||||
$db->query();
|
||||
}
|
||||
|
||||
if ($this->checkField('smartshoutbox_shouts', 'name')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_shouts CHANGE `name` `author` VARCHAR(255) NOT NULL");
|
||||
$db->query();
|
||||
}
|
||||
|
||||
if ($this->checkField('smartshoutbox_shouts', 'files')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_shouts DROP `files`");
|
||||
$db->query();
|
||||
}
|
||||
|
||||
if (!$this->checkIndex('smartshoutbox_shouts', 'category_id')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_shouts ADD INDEX (`category_id`)");
|
||||
$db->query();
|
||||
}
|
||||
|
||||
if (!$this->checkIndex('smartshoutbox_shouts', 'author_id')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_shouts ADD INDEX (`author_id`)");
|
||||
$db->query();
|
||||
}
|
||||
}
|
||||
|
||||
// Banned
|
||||
|
||||
if ($this->checkTable("smartshoutbox_banned")) {
|
||||
if ($this->checkField('smartshoutbox_banned', 'shout')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_banned CHANGE `shout` `shout_id` INT(11) NOT NULL");
|
||||
$db->query();
|
||||
}
|
||||
|
||||
if ($this->checkField('smartshoutbox_banned', 'user')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_banned CHANGE `user` `author_id` INT(11) NOT NULL");
|
||||
$db->query();
|
||||
}
|
||||
|
||||
if ($this->checkField('smartshoutbox_banned', 'name')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_banned CHANGE `name` `author` VARCHAR(255) NOT NULL");
|
||||
$db->query();
|
||||
}
|
||||
|
||||
if (!$this->checkIndex('smartshoutbox_banned', 'shout_id')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_banned ADD INDEX (`shout_id`)");
|
||||
$db->query();
|
||||
}
|
||||
|
||||
if (!$this->checkIndex('smartshoutbox_banned', 'author_id')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_banned ADD INDEX (`author_id`)");
|
||||
$db->query();
|
||||
}
|
||||
}
|
||||
|
||||
// Likes
|
||||
|
||||
if ($this->checkTable("smartshoutbox_likes")) {
|
||||
if ($this->checkField('smartshoutbox_likes', 'sid')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_likes CHANGE `sid` `shout_id` INT(11) NOT NULL");
|
||||
$db->query();
|
||||
}
|
||||
|
||||
if ($this->checkField('smartshoutbox_likes', 'mid')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_likes CHANGE `mid` `author_id` INT(11) NOT NULL");
|
||||
$db->query();
|
||||
}
|
||||
|
||||
if (!$this->checkIndex('smartshoutbox_likes', 'shout_id')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_likes ADD INDEX (`shout_id`)");
|
||||
$db->query();
|
||||
}
|
||||
|
||||
if (!$this->checkIndex('smartshoutbox_likes', 'author_id')) {
|
||||
$db->setQuery("ALTER TABLE #__smartshoutbox_likes ADD INDEX (`author_id`)");
|
||||
$db->query();
|
||||
}
|
||||
}
|
||||
|
||||
// Process SQL-file
|
||||
|
||||
if (method_exists($parent, 'extension_root')) {
|
||||
$sqlfile = $parent->getPath('extension_root').'/sql/install.sql';
|
||||
} else {
|
||||
$sqlfile = $parent->getParent()->getPath('extension_root').'/sql/install.sql';
|
||||
}
|
||||
|
||||
$buffer = file_get_contents($sqlfile);
|
||||
|
||||
if ($buffer !== false) {
|
||||
jimport('joomla.installer.helper');
|
||||
$queries = JInstallerHelper::splitSql($buffer);
|
||||
|
||||
if (count($queries) != 0) {
|
||||
foreach ($queries as $query) {
|
||||
$query = trim($query);
|
||||
|
||||
if (($query != '') && ($query{0} != '#')) {
|
||||
$db->setQuery($query);
|
||||
|
||||
try {
|
||||
$db->query();
|
||||
} catch(Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$parent->getParent()->setRedirectURL($this->redirect);
|
||||
}
|
||||
|
||||
public function preflight($type, $parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function postflight($type, $parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private function checkTable($table)
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$db->setQuery("SHOW TABLES LIKE '".$db->getPrefix().$table."'");
|
||||
$result = $db->loadResult();
|
||||
|
||||
if ($result) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
private function checkField($table, $field)
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$db->setQuery("SHOW FIELDS FROM #__".$table);
|
||||
$results = $db->loadObjectList();
|
||||
|
||||
foreach ($results as $result) {
|
||||
if ($result->Field == $field) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function checkType($table, $field, $type)
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$db->setQuery("SHOW FIELDS FROM #__".$table." WHERE Field = ".$db->Quote($field));
|
||||
$result = $db->loadAssoc();
|
||||
|
||||
if (strtolower($result['Type']) == strtolower($type)) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
private function checkIndex($table, $name, $type = '')
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$db->setQuery("SHOW INDEX FROM #__".$table." WHERE Key_name = ".$db->Quote($name).($type ? " AND Index_type = ".$db->Quote($type) : ''));
|
||||
$result = $db->loadResult();
|
||||
|
||||
if ($result) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
require_once(JPATH_SITE.'/components/com_smartshoutbox/system/loader.php');
|
||||
|
||||
if (!class_exists('SmartShoutboxEvents')) {
|
||||
include(JPATH_SITE.'/components/'.SCOMPONENT.'/helpers/events.php');
|
||||
}
|
||||
|
||||
require_once(JPATH_COMPONENT.'/controller.php');
|
||||
|
||||
$view = JFactory::getApplication()->input->get('view', 'home', 'cmd');
|
||||
|
||||
require_once(JPATH_COMPONENT.'/controllers/'.$view.'.php');
|
||||
|
||||
$controllerClass = 'SmartShoutboxController'.ucfirst($view);
|
||||
$controller = new $controllerClass;
|
||||
|
||||
$controller->execute(JFactory::getApplication()->input->get('task', 'display', 'cmd'));
|
||||
$controller->redirect();
|
||||
|
||||
?>
|
||||
@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.0" method="upgrade">
|
||||
<name>Smart Shoutbox</name>
|
||||
<version>3.0.6</version>
|
||||
<creationDate>November 2018</creationDate>
|
||||
<author>The Krotek</author>
|
||||
<authorEmail>support@thekrotek.com</authorEmail>
|
||||
<authorUrl>https://thekrotek.com</authorUrl>
|
||||
<copyright>The Krotek</copyright>
|
||||
<license>GNU General Public License</license>
|
||||
<description>Flexible chat component with lots of options and mobile devices support.</description>
|
||||
<media destination="smartshoutbox" folder="site/media">
|
||||
<filename>index.html</filename>
|
||||
</media>
|
||||
<install>
|
||||
<sql>
|
||||
<file charset="utf8" driver="mysql">sql/install.sql</file>
|
||||
</sql>
|
||||
</install>
|
||||
<administration>
|
||||
<menu>com_smartshoutbox</menu>
|
||||
<submenu>
|
||||
<menu view="categories">com_smartshoutbox_categories</menu>
|
||||
<menu view="shouts">com_smartshoutbox_shouts</menu>
|
||||
<menu view="banned">com_smartshoutbox_banned</menu>
|
||||
<menu view="smileys">com_smartshoutbox_smileys</menu>
|
||||
<menu view="options">com_smartshoutbox_options</menu>
|
||||
</submenu>
|
||||
<files folder="admin">
|
||||
<folder>assets</folder>
|
||||
<folder>controllers</folder>
|
||||
<folder>helpers</folder>
|
||||
<folder>kui</folder>
|
||||
<folder>models</folder>
|
||||
<folder>sql</folder>
|
||||
<folder>views</folder>
|
||||
<filename>access.xml</filename>
|
||||
<filename>config.xml</filename>
|
||||
<filename>controller.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<filename>smartshoutbox.php</filename>
|
||||
</files>
|
||||
<languages folder="languages/admin">
|
||||
<language tag="en-GB">en-GB.com_smartshoutbox.ini</language>
|
||||
<language tag="en-GB">en-GB.com_smartshoutbox.sys.ini</language>
|
||||
</languages>
|
||||
</administration>
|
||||
<files folder="site">
|
||||
<folder>assets</folder>
|
||||
<folder>helpers</folder>
|
||||
<folder>models</folder>
|
||||
<folder>system</folder>
|
||||
<folder>tmpl</folder>
|
||||
<folder>views</folder>
|
||||
<filename>controller.php</filename>
|
||||
<filename>index.html</filename>
|
||||
<filename>router.php</filename>
|
||||
<filename>smartshoutbox.php</filename>
|
||||
</files>
|
||||
<languages folder="languages/site">
|
||||
<language tag="en-GB">en-GB.com_smartshoutbox.ini</language>
|
||||
</languages>
|
||||
<scriptfile>script.php</scriptfile>
|
||||
<updateservers>
|
||||
<server type="extension" priority="1" name="Smart Shoutbox"><![CDATA[https://thekrotek.com/index.php?option=com_smartseller&task=updates&type=component&element=com_smartshoutbox&id=304]]></server>
|
||||
</updateservers>
|
||||
</extension>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,71 @@
|
||||
CREATE TABLE IF NOT EXISTS `#__smartshoutbox_categories` (
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`groups` VARCHAR(255) NOT NULL,
|
||||
`title` VARCHAR(255) NOT NULL,
|
||||
`description` TEXT NOT NULL,
|
||||
`icon` varchar(30) NOT NULL,
|
||||
`ordering` INT(11) NOT NULL,
|
||||
`added` INT(11) NOT NULL,
|
||||
`status` TINYINT(1) NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (`id`),
|
||||
FULLTEXT KEY `description` (`description`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `#__smartshoutbox_shouts` (
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`category_id` INT(11) NOT NULL,
|
||||
`author_id` INT(11) NOT NULL,
|
||||
`recipient_id` INT(11) NOT NULL,
|
||||
`author` VARCHAR(255) NOT NULL,
|
||||
`message` TEXT NOT NULL,
|
||||
`ip` VARCHAR(32) NOT NULL,
|
||||
`added` INT(11) NOT NULL,
|
||||
`status` TINYINT(1) NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (`id`),
|
||||
FULLTEXT KEY `message` (`message`),
|
||||
KEY (`category_id`),
|
||||
KEY (`author_id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `#__smartshoutbox_banned` (
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`shout_id` INT(11) NOT NULL,
|
||||
`author_id` INT(11) NOT NULL,
|
||||
`author` VARCHAR(255) NOT NULL,
|
||||
`ip` VARCHAR(32) NOT NULL,
|
||||
`added` INT(11) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`shout_id`),
|
||||
KEY (`author_id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `#__smartshoutbox_smileys` (
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`typed` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`image` VARCHAR(128) NOT NULL DEFAULT '',
|
||||
`title` VARCHAR(32) NOT NULL DEFAULT '',
|
||||
`folder` VARCHAR(64) NOT NULL DEFAULT 'default',
|
||||
`status` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `#__smartshoutbox_likes` (
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`shout_id` INT(11) NOT NULL,
|
||||
`author_id` INT(11) NOT NULL,
|
||||
`ip` VARCHAR(32) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`shout_id`),
|
||||
KEY (`author_id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `#__smartshoutbox_attachments` (
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`shout_id` INT(11) NOT NULL,
|
||||
`attachment` VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`shout_id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `#__smartshoutbox_connections` (
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`author_id` INT(11) NOT NULL,
|
||||
`user_id` INT(11) NOT NULL,
|
||||
`action` VARCHAR(32) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY (`author_id`),
|
||||
KEY (`user_id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/tmpl/items.php');
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxViewBanned extends JViewLegacy
|
||||
{
|
||||
protected $items;
|
||||
protected $pagination;
|
||||
protected $state;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
include(JPATH_COMPONENT.'/helpers/view.php');
|
||||
|
||||
$this->submenu = array('delete', 'empty');
|
||||
$this->actions = array('delete');
|
||||
|
||||
$this->items = $this->get('Items');
|
||||
$this->state = $this->get('State');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->ordering = $this->state->get('list.ordering');
|
||||
$this->direction = $this->state->get('list.direction');
|
||||
|
||||
if (!empty($this->items)) {
|
||||
foreach ($this->items as $key => $item) {
|
||||
$item->added = $syshelper->formatDate(JText::_(SSTR.'FILTER_DATETIME'), $item->added);
|
||||
|
||||
$this->items[$key] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/tmpl/items.php');
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxViewCategories extends JViewLegacy
|
||||
{
|
||||
protected $items;
|
||||
protected $pagination;
|
||||
protected $state;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
include(JPATH_COMPONENT.'/helpers/view.php');
|
||||
|
||||
$this->submenu = array('add', 'copy', 'edit', 'publish', 'unpublish', 'delete', 'empty');
|
||||
$this->actions = array('copy', 'edit', 'delete');
|
||||
|
||||
$this->items = $this->get('Items');
|
||||
$this->state = $this->get('State');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->ordering = $this->state->get('list.ordering');
|
||||
$this->direction = $this->state->get('list.direction');
|
||||
|
||||
if (!empty($this->items)) {
|
||||
foreach ($this->items as $key => $item) {
|
||||
if (@json_decode($item->groups, true)) {
|
||||
$usergroups = $sysmodel->getGroups(json_decode($item->groups, true));
|
||||
|
||||
$item->groups = implode(', ', array_column($usergroups, 'title'));
|
||||
} else {
|
||||
$item->groups = JText::_(SSTR.'ALL_GROUPS');
|
||||
}
|
||||
|
||||
$item->added = $syshelper->formatDate(JText::_(SSTR.'FILTER_DATETIME'), $item->added);
|
||||
$item->icon = ($item->icon ? "<i class='".$item->icon."'></i>" : "");
|
||||
|
||||
$this->items[$key] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
array_unshift($this->status, array('value' => "", 'text' => JText::_(SSTR.'FILTER_STATUS')));
|
||||
|
||||
$this->filters['status'] = array('class' => 'input-medium', 'items' => $this->status);
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/tmpl/item.php');
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxViewCategory extends JViewLegacy
|
||||
{
|
||||
public function display($tpl = null)
|
||||
{
|
||||
include(JPATH_COMPONENT.'/helpers/view.php');
|
||||
|
||||
$this->submenu = array('save', 'apply', 'cancel');
|
||||
|
||||
$id = $this->app->input->get('id', 0, 'int');
|
||||
|
||||
if ($id) {
|
||||
$this->category = $sysmodel->getItem('categories', array('id' => $id));
|
||||
|
||||
if ($this->category['groups']) $this->category['groups'] = json_decode($this->category['groups'], true);
|
||||
} else {
|
||||
$this->category = array();
|
||||
}
|
||||
|
||||
$this->action = "categories";
|
||||
|
||||
$usergroups = $sysmodel->getGroups();
|
||||
|
||||
if (empty($usergroups)) {
|
||||
$usergroups = array(array('value' => '', 'text' => JText::_(CSTR.'ERROR_NO_USERGROUPS')));
|
||||
}
|
||||
|
||||
$this->fields = array(
|
||||
'id' => array('type' => 'hidden', 'default' => ''),
|
||||
'added' => array('type' => 'date', 'default' => time(), 'class' => 'input-medium datepicker'),
|
||||
'groups' => array('type' => 'multiple', 'default' => array(), 'data' => $usergroups, 'class' => 'input-xlarge'),
|
||||
'title' => array('type' => 'text', 'default' => '', 'class' => 'input-xlarge required'),
|
||||
'description' => array('type' => 'editor', 'default' => ''),
|
||||
'icon' => array('type' => 'text', 'default' => '', 'class' => 'input-medium'),
|
||||
'ordering' => array('type' => 'text', 'default' => '', 'class' => 'input-mini center'),
|
||||
'status' => array('type' => 'radio', 'default' => '0', 'data' => $this->status));
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,96 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<div id="<?php echo SMAINCLASS; ?>" class="<?php echo $this->view; ?> kui">
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/menu.php'); ?>
|
||||
<div class="main-container">
|
||||
<?php if ($this->useractions->get('admin.view')) { ?>
|
||||
<form action="<?php echo JRoute::_('index.php?option='.SCOMPONENT); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/submenu.php'); ?>
|
||||
<div class="extension-header">
|
||||
<span class="header-name"><?php echo JText::_(SCOMPONENT); ?></span>
|
||||
<span class="header-author"><span>The Krotek</span></span>
|
||||
<span class="header-description"><?php echo JText::_(SSTR.'DESCRIPTION'); ?></span>
|
||||
</div>
|
||||
<div class="stats-actions">
|
||||
<div class="item-container categories">
|
||||
<div class="stats-container">
|
||||
<h1><?php echo $this->stats['categories']; ?></h1>
|
||||
<span><?php echo JText::_(SSTR.'CATEGORIES'); ?><span>
|
||||
</div>
|
||||
<a href="index.php?option=<?php echo SCOMPONENT; ?>&view=category">
|
||||
<div class="action-content">
|
||||
<div class="action-icon"><i class="fas fa-paper-plane"></i></div>
|
||||
<div class="action-info">
|
||||
<h3><?php echo JText::_(SSTR.'HOME_CATEGORIES_TITLE'); ?></h3>
|
||||
<span><?php echo JText::_(SSTR.'HOME_CATEGORIES_TEXT'); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="item-container shouts">
|
||||
<div class="stats-container">
|
||||
<h1><?php echo $this->stats['shouts']; ?></h1>
|
||||
<span><?php echo JText::_(SSTR.'SHOUTS'); ?></span>
|
||||
</div>
|
||||
<a href="index.php?option=<?php echo SCOMPONENT; ?>&view=shout">
|
||||
<div class="action-content">
|
||||
<div class="action-icon"><i class="fas fa-file-alt"></i></div>
|
||||
<div class="action-info">
|
||||
<h3><?php echo JText::_(SSTR.'HOME_SHOUTS_TITLE'); ?></h3>
|
||||
<span><?php echo JText::_(SSTR.'HOME_SHOUTS_TEXT'); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="item-container users">
|
||||
<div class="stats-container">
|
||||
<h1><?php echo $this->stats['users']; ?></h1>
|
||||
<span><?php echo JText::_(SSTR.'USERS'); ?><span>
|
||||
</div>
|
||||
<a href="index.php?option=com_users&task=user.add">
|
||||
<div class="action-content">
|
||||
<div class="action-icon"><i class="fas fa-tasks"></i></div>
|
||||
<div class="action-info">
|
||||
<h3><?php echo JText::_(SSTR.'HOME_USERS_TITLE'); ?></h3>
|
||||
<span><?php echo JText::_(SSTR.'HOME_USERS_TEXT'); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="item-container banned">
|
||||
<div class="stats-container">
|
||||
<h1><?php echo $this->stats['banned']; ?></h1>
|
||||
<span><?php echo JText::_(SSTR.'BANNED'); ?><span>
|
||||
</div>
|
||||
<a href="index.php?option=<?php echo SCOMPONENT; ?>&view=banned">
|
||||
<div class="action-content">
|
||||
<div class="action-icon"><i class="fas fa-envelope"></i></div>
|
||||
<div class="action-info">
|
||||
<h3><?php echo JText::_(SSTR.'HOME_BANNED_TITLE'); ?></h3>
|
||||
<span><?php echo JText::_(SSTR.'HOME_BANNED_TEXT'); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/js.php'); ?>
|
||||
<?php } else { ?>
|
||||
<div class="restricted"><?php echo JText::_(SSTR.'ERROR_PERMISSIONS_VIEW'); ?></div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxViewHome extends JViewLegacy
|
||||
{
|
||||
public function display($tpl = null)
|
||||
{
|
||||
include(JPATH_COMPONENT.'/helpers/view.php');
|
||||
|
||||
$this->stats = $model->getStats();
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,125 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<div id="<?php echo SMAINCLASS; ?>" class="<?php echo $this->view; ?> kui">
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/menu.php'); ?>
|
||||
<div class="main-container">
|
||||
<?php if ($this->useractions->get('admin.view')) { ?>
|
||||
<form action="<?php echo JRoute::_('index.php?option='.SCOMPONENT.'&view=options'); ?>" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data" class="edit">
|
||||
<div class="version <?php echo $this->class; ?>">
|
||||
<i class='<?php echo $this->icon; ?>'> </i> <?php echo $this->version; ?>
|
||||
</div>
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/submenu.php'); ?>
|
||||
|
||||
<!-- Options -->
|
||||
|
||||
<div id="options-menu" class="options-tabs">
|
||||
<ul>
|
||||
<?php foreach ($this->options as $fieldset => $fields) { ?>
|
||||
<?php if (!empty($fields)) { ?>
|
||||
<?php $icon = in_array('icon', array_keys($fields)) ? $fields['icon']['default'] : ''; ?>
|
||||
<li id="<?php echo $fieldset; ?>" class="options-tab<?php $keys = array_keys($this->options); echo ($fieldset == reset($keys) ? ' active' : ''); ?>"><a><?php if ($icon) { ?><i class="<?php echo $icon; ?>"></i><?php } ?><?php echo JText::_(SSTR.$fieldset); ?></a></li>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!empty($this->permissions)) { ?>
|
||||
<li id="permissions" class="options-tab"><a><i class="fas fa-users"></i><?php echo JText::_(SSTR.'PERMISSIONS');?></a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="options">
|
||||
<?php foreach ($this->options as $fieldset => $fields) { ?>
|
||||
<?php if (!empty($fields)) { ?>
|
||||
<div id="<?php echo $fieldset; ?>-tab" class="options-group"<?php $keys = array_keys($this->options); echo ($fieldset != reset($keys) ? ' style="display: none;"' : ''); ?>>
|
||||
<div class="options-note">
|
||||
<?php echo JText::_(SSTR.$fieldset.'_NOTE'); ?>
|
||||
</div>
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/fields.php'); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<!-- Permissions -->
|
||||
|
||||
<div id="permissions-tab" class="options-group" style="display: none;">
|
||||
<div class="options-note">
|
||||
<?php echo JText::_(SSTR.'PERMISSIONS_NOTE'); ?>
|
||||
</div>
|
||||
<div id="permissions-menu" class="options-tabs">
|
||||
<?php echo $this->permissions->menu; ?>
|
||||
</div>
|
||||
<div id="permissions-data" class="permissions-container">
|
||||
<div class="permissions-header">
|
||||
<div class="fields-label"><?php echo JText::_('JLIB_RULES_ACTION'); ?></div>
|
||||
<div class="fields-field"><?php echo JText::_('JLIB_RULES_SELECT_SETTING'); ?></div>
|
||||
<div class="fields-field"><?php echo JText::_('JLIB_RULES_CALCULATED_SETTING'); ?></div>
|
||||
</div>
|
||||
<?php if ($this->permissions) { ?>
|
||||
<?php foreach ($this->permissions->rules as $key => $group) { ?>
|
||||
<div id="permissions-<?php echo $group->id; ?>-tab" class="options-group"<?php echo ($key != reset($this->permissions->rules)->id ? " style='display: none;'" : ""); ?>>
|
||||
<?php foreach ($group->actions as $action) { ?>
|
||||
<div class="fields-item">
|
||||
<div class="fields-label">
|
||||
<label for="rules-<?php echo str_replace('.', '-', $action->name); ?>-<?php echo $group->id; ?>" title="<?php echo JText::_($action->title); ?>" class="hasPopover" data-content="<?php echo JText::_($action->description); ?>">
|
||||
<?php echo JText::_($action->title); ?>
|
||||
</label>
|
||||
</div>
|
||||
<div class="fields-field">
|
||||
<select class="fields-input input-medium" name="rules[<?php echo $action->name; ?>][<?php echo $group->id; ?>]" id="rules-<?php echo str_replace('.', '-', $action->name); ?>-<?php echo $group->id; ?>">
|
||||
<option value=""<?php echo ($action->asset === null ? ' selected="selected"' : ''); ?>><?php echo JText::_(empty($group->parent) ? 'JLIB_RULES_NOT_SET' : 'JLIB_RULES_INHERITED'); ?></option>
|
||||
<option value="1"<?php echo ($action->asset === true ? ' selected="selected"' : ''); ?>><?php echo JText::_('JLIB_RULES_ALLOWED'); ?></option>
|
||||
<option value="0"<?php echo ($action->asset === false ? ' selected="selected"' : ''); ?>><?php echo JText::_('JLIB_RULES_DENIED'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="fields-field">
|
||||
<?php if ($action->admin !== true) { ?>
|
||||
<?php if ($action->inherited === null) { ?>
|
||||
<span class="label label-important"><?php echo JText::_('JLIB_RULES_NOT_ALLOWED'); ?></span>
|
||||
<?php } elseif ($action->inherited === true) { ?>
|
||||
<span class="label label-success"><?php echo JText::_('JLIB_RULES_ALLOWED'); ?></span>
|
||||
<?php } elseif ($action->inherited === false) { ?>
|
||||
<?php if ($action->asset === false) { ?>
|
||||
<span class="label label-important"><?php echo JText::_('JLIB_RULES_NOT_ALLOWED'); ?></span>
|
||||
<?php } else { ?>
|
||||
<span class="label"><i class="icon-lock icon-white"></i><?php echo JText::_('JLIB_RULES_NOT_ALLOWED_LOCKED'); ?></span>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<span class="label label-success"><?php echo JText::_('JLIB_RULES_ALLOWED_ADMIN'); ?></span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="permissions-error">
|
||||
<?php if (($action->asset === true) && ($action->inherited === false)) { ?>
|
||||
<?php echo JText::_('JLIB_RULES_CONFLICT'); ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="permissions-note"><?php echo JText::_('JLIB_RULES_SETTING_NOTES'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/js.php'); ?>
|
||||
<?php include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/helpers/js.php'); ?>
|
||||
<?php } else { ?>
|
||||
<div class="restricted"><?php echo JText::_(SSTR.'ERROR_PERMISSIONS_VIEW'); ?></div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,193 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxViewOptions extends JViewLegacy
|
||||
{
|
||||
public function display($tpl = null)
|
||||
{
|
||||
include(JPATH_COMPONENT.'/helpers/view.php');
|
||||
|
||||
$xml = simplexml_load_file(JPATH_ADMINISTRATOR."/components/".SCOMPONENT."/".substr(SCOMPONENT, 4).".xml");
|
||||
$current = $xml->version;
|
||||
|
||||
if ($this->params->get('version', 0)) {
|
||||
$latest = $syshelper->checkVersion('304');
|
||||
|
||||
if (empty($latest['error'])) {
|
||||
if (version_compare($current, $latest['version'], '=')) {
|
||||
$this->version = sprintf(JText::_(SSTR.'VERSION_LATEST'), $current);
|
||||
$this->class = "latest";
|
||||
$this->icon = "fas fa-check-circle";
|
||||
} elseif (version_compare($current, $latest['version'], '<')) {
|
||||
$this->version = sprintf(JText::_(SSTR.'VERSION_UPDATE'), $latest['version']);
|
||||
$this->class = "update";
|
||||
$this->icon = "fas fa-exclamation-circle";
|
||||
} elseif (version_compare($current, $latest['version'], '>')) {
|
||||
$this->version = sprintf(JText::_(SSTR.'VERSION_FUTURE'), $current);
|
||||
$this->class = "future";
|
||||
$this->icon = "fas fa-rocket";
|
||||
}
|
||||
} else {
|
||||
$this->version = !empty($latest['error']) ? $latest['error'] : JText::_(SSTR.'ERROR_VERSION');
|
||||
$this->class = "error";
|
||||
$this->icon = "fas fa-exclamation-triangle";
|
||||
}
|
||||
} else {
|
||||
$this->version = sprintf(JText::_(SSTR.'VERSION_CURRENT'), $current);
|
||||
$this->class = "future";
|
||||
$this->icon = "fas fa-info-circle";
|
||||
}
|
||||
|
||||
$this->submenu = array('update', 'reset');
|
||||
|
||||
if (!$this->params->get('secret')) {
|
||||
$this->params->set('secret', $syshelper->generateSecret());
|
||||
}
|
||||
|
||||
$this->cron = JURI::root()."index.php?option=".SCOMPONENT."&task=cron&secret=".$this->params->get('secret');
|
||||
|
||||
$folders = array_unique($sysmodel->getItems('smileys', array(), 'folder', 'folder'), SORT_REGULAR);
|
||||
|
||||
$this->folders = array();
|
||||
|
||||
foreach ($folders as $item) {
|
||||
$this->folders[] = array('value' => $item['folder'], 'text' => $item['folder']);
|
||||
}
|
||||
|
||||
array_unshift($this->menus, array('value' => "", 'text' => JText::_(SSTR.'MENU_DEFAULT')));
|
||||
|
||||
$this->sources = array(
|
||||
array('value' => 'local', 'text' => JText::_(SSTR.'GENERAL_SOURCE_LOCAL')),
|
||||
array('value' => 'external', 'text' => JText::_(SSTR.'GENERAL_SOURCE_EXTERNAL')));
|
||||
|
||||
$this->nametypes = array(
|
||||
array('value' => 'name', 'text' => JText::_(SSTR.'SHOUTS_NAMETYPE_NAME')),
|
||||
array('value' => 'username', 'text' => JText::_(SSTR.'SHOUTS_NAMETYPE_USERNAME')));
|
||||
|
||||
$this->ordering = array(
|
||||
array('value' => 'desc', 'text' => JText::_(SSTR.'SHOUTS_ORDERING_DSC')),
|
||||
array('value' => 'asc', 'text' => JText::_(SSTR.'SHOUTS_ORDERING_ASC')));
|
||||
|
||||
$this->sendkeys = array(
|
||||
array('value' => 'enter', 'text' => JText::_(SSTR.'GENERAL_SENDKEY_ENTER')),
|
||||
array('value' => 'ctrlenter', 'text' => JText::_(SSTR.'GENERAL_SENDKEY_CTRLENTER')));
|
||||
|
||||
$this->providers = array(
|
||||
array('value' => 'generic', 'text' => JText::_(SSTR.'SHOUTS_PROFILES_GENERIC')),
|
||||
array('value' => 'jo', 'text' => 'Joomla'),
|
||||
array('value' => 'k2', 'text' => 'K2'),
|
||||
array('value' => 'js', 'text' => 'JomSocial'),
|
||||
array('value' => 'es', 'text' => 'EasySocial'),
|
||||
array('value' => 'cb', 'text' => 'Community Builder'),
|
||||
array('value' => 'ku', 'text' => 'Kunena'),
|
||||
array('value' => 'gr', 'text' => 'Gravatar'));
|
||||
|
||||
$this->imagelinks = array(
|
||||
array('value' => 'thumb', 'text' => JText::_(SSTR.'PARSER_IMAGELINKS_THUMB')),
|
||||
array('value' => 'link', 'text' => JText::_(SSTR.'PARSER_IMAGELINKS_LINK')));
|
||||
|
||||
$this->videolinks = array(
|
||||
array('value' => 'player', 'text' => JText::_(SSTR.'PARSER_VIDEOLINKS_PLAYER')),
|
||||
array('value' => 'link', 'text' => JText::_(SSTR.'PARSER_VIDEOLINKS_LINK')));
|
||||
|
||||
$this->messagetypes = array(
|
||||
array('value' => 'all', 'text' => JText::_(SSTR.'ADMIN_MESSAGES_ALL')),
|
||||
array('value' => 'errors', 'text' => JText::_(SSTR.'ADMIN_MESSAGES_ERRORS'), 'class' => 'no'),
|
||||
array('value' => 'none', 'text' => JText::_(SSTR.'ADMIN_MESSAGES_NONE'), 'class' => 'unsure'));
|
||||
|
||||
$editorgroups = array(
|
||||
array('value' => '*', 'text' => JText::_(SSTR.'ALL_GROUPS')),
|
||||
array('value' => 'style', 'text' => JText::_(SSTR.'GENERAL_EDITORGROUPS_STYLE')),
|
||||
array('value' => 'link', 'text' => JText::_(SSTR.'GENERAL_EDITORGROUPS_LINK')),
|
||||
array('value' => 'list', 'text' => JText::_(SSTR.'GENERAL_EDITORGROUPS_LIST')),
|
||||
array('value' => 'justify', 'text' => JText::_(SSTR.'GENERAL_EDITORGROUPS_JUSTIFY')),
|
||||
array('value' => 'color', 'text' => JText::_(SSTR.'GENERAL_EDITORGROUPS_COLOR')),
|
||||
array('value' => 'format', 'text' => JText::_(SSTR.'GENERAL_EDITORGROUPS_FORMAT')),
|
||||
array('value' => 'extra', 'text' => JText::_(SSTR.'GENERAL_EDITORGROUPS_EXTRA')));
|
||||
|
||||
$chatbuttons = array(
|
||||
array('value' => '*', 'text' => JText::_(SSTR.'ALL_BUTTONS')),
|
||||
array('value' => 'smileys', 'text' => JText::_(SSTR.'GENERAL_CHATBUTTONS_SMILEYS')),
|
||||
array('value' => 'attach', 'text' => JText::_(SSTR.'GENERAL_CHATBUTTONS_ATTACH')),
|
||||
array('value' => 'refresh', 'text' => JText::_(SSTR.'GENERAL_CHATBUTTONS_REFRESH')),
|
||||
array('value' => 'sounds', 'text' => JText::_(SSTR.'GENERAL_CHATBUTTONS_SOUNDS')),
|
||||
array('value' => 'read', 'text' => JText::_(SSTR.'GENERAL_CHATBUTTONS_READ')));
|
||||
|
||||
$this->buttons = array(array('value' => "*", 'text' => JText::_(SSTR.'ALL_BUTTONS')));
|
||||
|
||||
$this->options = array(
|
||||
'general' => array(
|
||||
'icon' => array('type' => 'icon', 'default' => 'fas fa-cog'),
|
||||
'announce' => array('type' => 'text', 'default' => '', 'class' => 'input-xlarge'),
|
||||
'editorgroups' => array('type' => 'multiple', 'default' => array('*'), 'data' => $editorgroups, 'class' => 'input-xlarge'),
|
||||
'chatbuttons' => array('type' => 'multiple', 'default' => array('*'), 'data' => $chatbuttons, 'class' => 'input-xlarge'),
|
||||
'source' => array('type' => 'radio', 'default' => 'local', 'data' => $this->sources),
|
||||
'feedback' => array('type' => 'radio', 'default' => 'all', 'data' => $this->messagetypes),
|
||||
'sounds' => array('type' => 'radio', 'default' => '1', 'data' => $this->yesno),
|
||||
'sidebarwidth' => array('type' => 'text', 'default' => '450', 'class' => 'input-mini center'),
|
||||
'autorefresh' => array('type' => 'text', 'default' => '60', 'class' => 'input-mini center'),
|
||||
'interval' => array('type' => 'text', 'default' => '10', 'class' => 'input-mini center'),
|
||||
'showdescription' => array('type' => 'radio', 'default' => '1', 'data' => $this->yesno),
|
||||
'smileyfolder' => array('type' => 'select', 'default' => 'default', 'data' => $this->folders, 'class' => 'input-medium'),
|
||||
'sendkey' => array('type' => 'radio', 'default' => 'ctrlenter', 'data' => $this->sendkeys),
|
||||
'attachments' => array('type' => 'text', 'default' => '1', 'class' => 'input-mini center'),
|
||||
'filetypes' => array('type' => 'text', 'default' => 'jpg,jpeg,gif,png,zip,gzip,rar,tar,txt,doc,docx,xls,xlsx,pdf', 'class' => 'input-xlarge')),
|
||||
'shouts' => array(
|
||||
'icon' => array('type' => 'icon', 'default' => 'fas fa-list'),
|
||||
'profiles' => array('type' => 'select', 'default' => 'generic', 'data' => $this->providers, 'class' => 'input-xmedium'),
|
||||
'limit' => array('type' => 'text', 'default' => '50', 'class' => 'input-mini center'),
|
||||
'ordering' => array('type' => 'radio', 'default' => 'desc', 'data' => $this->ordering),
|
||||
'combine' => array('type' => 'radio', 'default' => '0', 'data' => $this->yesno),
|
||||
'duplicates' => array('type' => 'radio', 'default' => '0', 'data' => $this->yesno),
|
||||
'shoutlength' => array('type' => 'text', 'default' => '', 'class' => 'input-mini center'),
|
||||
'nametype' => array('type' => 'radio', 'default' => 'name', 'data' => $this->nametypes),
|
||||
'generatename' => array('type' => 'radio', 'default' => '1', 'data' => $this->yesno),
|
||||
'namelength' => array('type' => 'text', 'default' => '', 'class' => 'input-mini center'),
|
||||
'html' => array('type' => 'radio', 'default' => '1', 'data' => $this->yesno),
|
||||
'allowedtags' => array('type' => 'text', 'default' => '', 'class' => 'input-xlarge')),
|
||||
'external' => array(
|
||||
'icon' => array('type' => 'icon', 'default' => 'fas fa-database'),
|
||||
'driver' => array('type' => 'text', 'default' => 'mysqli'),
|
||||
'host' => array('type' => 'text', 'default' => 'localhost'),
|
||||
'user' => array('type' => 'text', 'default' => ''),
|
||||
'password' => array('type' => 'text', 'default' => ''),
|
||||
'database' => array('type' => 'text', 'default' => ''),
|
||||
'port' => array('type' => 'text', 'default' => ''),
|
||||
'socket' => array('type' => 'text', 'default' => ''),
|
||||
'prefix' => array('type' => 'text', 'default' => ''),
|
||||
'url' => array('type' => 'text', 'default' => '')),
|
||||
'admin' => array(
|
||||
'icon' => array('type' => 'icon', 'default' => 'fas fa-tachometer-alt'),
|
||||
'license' => array('type' => 'text', 'default' => '', 'class' => 'input-xmedium required'),
|
||||
'license_result' => array('type' => 'hidden', 'default' => ''),
|
||||
'messages' => array('type' => 'radio', 'default' => 'all', 'data' => $this->messagetypes),
|
||||
'categoriescolumns' => array('type' => 'multiple', 'default' => array('*'), 'data' => $this->categoriescolumns, 'class' => 'input-xlarge'),
|
||||
'shoutscolumns' => array('type' => 'multiple', 'default' => array('*'), 'data' => $this->shoutscolumns, 'class' => 'input-xlarge'),
|
||||
'bannedcolumns' => array('type' => 'multiple', 'default' => array('*'), 'data' => $this->bannedcolumns, 'class' => 'input-xlarge'),
|
||||
'smileyscolumns' => array('type' => 'multiple', 'default' => array('*'), 'data' => $this->smileyscolumns, 'class' => 'input-xlarge'),
|
||||
'deleteshouts' => array('type' => 'radio', 'default' => '0', 'data' => $this->yesno),
|
||||
'secret' => array('type' => 'text', 'default' => '', 'class' => 'input-medium'),
|
||||
'cron' => array('type' => 'cleantext', 'value' => '<a href="'.$this->cron.'" target="_blank">'.$this->cron.'</a>'),
|
||||
'shoutlife' => array('type' => 'text', 'default' => '', 'class' => 'input-mini center'),
|
||||
'orphans' => array('type' => 'radio', 'default' => '0', 'data' => $this->yesno),
|
||||
'version' => array('type' => 'radio', 'default' => '1', 'data' => $this->yesno),
|
||||
'report' => array('type' => 'radio', 'default' => '0', 'data' => $this->yesno),
|
||||
'debug' => array('type' => 'radio', 'default' => '0', 'data' => $this->yesno)));
|
||||
|
||||
$this->permissions = $sysmodel->getPermissions(SCOMPONENT);
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/tmpl/item.php');
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxViewShout extends JViewLegacy
|
||||
{
|
||||
public function display($tpl = null)
|
||||
{
|
||||
include(JPATH_COMPONENT.'/helpers/view.php');
|
||||
|
||||
$this->submenu = array('save', 'apply', 'cancel');
|
||||
|
||||
$id = $this->app->input->get('id', 0, 'int');
|
||||
|
||||
if ($id) {
|
||||
$this->shout = $sysmodel->getItem('shouts', array('id' => $id));
|
||||
$attachments = $sysmodel->getItems('attachments', array('shout_id' => $id));
|
||||
|
||||
$this->shout['attachments'] = array();
|
||||
|
||||
foreach ($attachments as $attachment) {
|
||||
$this->shout['attachments'][$attachment['id']] = $attachment['attachment'];
|
||||
}
|
||||
} else {
|
||||
$this->shout = array();
|
||||
}
|
||||
|
||||
$this->action = "shouts";
|
||||
|
||||
$categories = $sysmodel->getItems('categories', array(), '*', 'title');
|
||||
|
||||
$this->categories = array();
|
||||
|
||||
if (!empty($categories)) {
|
||||
$this->categories[] = array('value' => "0", 'text' => JText::_(SSTR.'UNCATEGORIZED'));
|
||||
|
||||
foreach ($categories as $category) {
|
||||
$this->categories[] = array('value' => $category['id'], 'text' => $category['title']);
|
||||
}
|
||||
}
|
||||
|
||||
$this->fields = array(
|
||||
'id' => array('type' => 'hidden', 'default' => '0'),
|
||||
'ip' => array('type' => 'hidden', 'default' => $syshelper->getIpAddress()),
|
||||
'author_id' => array('type' => 'select', 'default' => '', 'data' => $this->users, 'class' => 'input-large'),
|
||||
'author' => array('type' => 'text', 'default' => '', 'class' => 'input-large'),
|
||||
'added' => array('type' => 'date', 'default' => time(), 'class' => 'datepicker input-medium'),
|
||||
'category_id' => array('type' => 'select', 'default' => '0', 'data' => $this->categories, 'class' => 'input-large'),
|
||||
'message' => array('type' => 'editor', 'default' => '', 'class' => 'required'),
|
||||
'attachments' => array('type' => 'file', 'default' => array()),
|
||||
'status' => array('type' => 'radio', 'default' => '0', 'data' => $this->status));
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/tmpl/items.php');
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxViewShouts extends JViewLegacy
|
||||
{
|
||||
protected $items;
|
||||
protected $pagination;
|
||||
protected $state;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
include(JPATH_COMPONENT.'/helpers/view.php');
|
||||
|
||||
$this->submenu = array('add', 'copy', 'edit', 'publish', 'unpublish', 'delete', 'empty');
|
||||
$this->actions = array('copy', 'edit', 'delete');
|
||||
|
||||
$this->items = $this->get('Items');
|
||||
$this->state = $this->get('State');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->ordering = $this->state->get('list.ordering');
|
||||
$this->direction = $this->state->get('list.direction');
|
||||
|
||||
if (!empty($this->items)) {
|
||||
foreach ($this->items as $key => $item) {
|
||||
$item->message = $helper->parseSmileys($item->message);
|
||||
|
||||
if (!empty($item->attachments)) {
|
||||
$attachments = json_decode($item->attachments, true);
|
||||
$item->message = $helper->parseAttachments($item->message, $attachments);
|
||||
}
|
||||
|
||||
$item->added = $syshelper->formatDate(JText::_(SSTR.'FILTER_DATETIME'), $item->added);
|
||||
|
||||
$this->items[$key] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
array_unshift($this->status, array('value' => "", 'text' => JText::_(SSTR.'FILTER_STATUS')));
|
||||
|
||||
$this->filters['status'] = array('class' => 'input-medium', 'items' => $this->status);
|
||||
|
||||
$categories = $sysmodel->getItems('categories', array(), '*', 'title');
|
||||
|
||||
$this->categories = array();
|
||||
|
||||
if (!empty($categories)) {
|
||||
$this->categories[] = array('value' => "", 'text' => JText::_(SSTR.'FILTER_CATEGORY'));
|
||||
$this->categories[] = array('value' => "0", 'text' => JText::_(SSTR.'UNCATEGORIZED'));
|
||||
|
||||
foreach ($categories as $category) {
|
||||
$this->categories[] = array('value' => $category['id'], 'text' => $category['title']);
|
||||
}
|
||||
|
||||
$this->filters['category'] = array('class' => 'input-large', 'items' => $this->categories);
|
||||
}
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
include(JPATH_ADMINISTRATOR.'/components/'.SCOMPONENT.'/kui/tmpl/items.php');
|
||||
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/*------------------------------------------------------------------------
|
||||
# Smart Shoutbox
|
||||
# ------------------------------------------------------------------------
|
||||
# The Krotek
|
||||
# Copyright (C) 2011-2018 The Krotek. All Rights Reserved.
|
||||
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
|
||||
# Website: https://thekrotek.com
|
||||
# Support: support@thekrotek.com
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
class SmartShoutboxViewSmileys extends JViewLegacy
|
||||
{
|
||||
protected $items;
|
||||
protected $pagination;
|
||||
protected $state;
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
include(JPATH_ADMINISTRATOR.'/components/com_smartshoutbox/helpers/view.php');
|
||||
|
||||
$this->submenu = array('save', 'publish', 'unpublish', 'delete', 'empty', 'scan');
|
||||
$this->actions = array('delete');
|
||||
|
||||
$this->items = $this->get('Items');
|
||||
$this->state = $this->get('State');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->ordering = $this->state->get('list.ordering');
|
||||
$this->direction = $this->state->get('list.direction');
|
||||
|
||||
if (!empty($this->items)) {
|
||||
foreach ($this->items as $key => $item) {
|
||||
$typed = json_decode($item->typed, true);
|
||||
|
||||
if (empty($typed) || !is_array($typed)) $typed = array(':'.$item->image.':', '', '');
|
||||
|
||||
$item->typed = "";
|
||||
|
||||
foreach ($typed as $typekey => $typevalue) {
|
||||
if ($typekey != 0) {
|
||||
$item->typed .= "<input type='text' name='typed[".$item->id."][".$typekey."]' value='".$typevalue."' class='fields-input input-mini center' />";
|
||||
} else {
|
||||
$item->typed .= "<input type='text' name='[".$item->id."][default]' class='fields-input input-medium center' value='".$typevalue."' disabled />";
|
||||
$item->typed .= "<input type='hidden' name='typed[".$item->id."][".$typekey."]' value='".$typevalue."' />";
|
||||
}
|
||||
}
|
||||
|
||||
$item->image = "<img src='".JURI::root().'components/com_smartshoutbox/assets/smileys/'.$item->folder.'/'.$item->image."'>";
|
||||
$item->title = "<input type='text' class='fields-input input-xmedium' name='titles[".$item->id."]' value='".$item->title."'>";
|
||||
|
||||
$this->items[$key] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
array_unshift($this->status, array('value' => "", 'text' => JText::_(SSTR.'FILTER_STATUS')));
|
||||
|
||||
$this->filters['status'] = array('class' => 'input-medium', 'items' => $this->status);
|
||||
|
||||
$path = JPATH_ROOT."/components/".SCOMPONENT."/assets/smileys/";
|
||||
$folders = array_diff(scandir($path), array('.', '..', 'index.html'));
|
||||
|
||||
foreach ($folders as $key => $folder) {
|
||||
$smileys = array_diff(scandir(JPATH_ROOT."/components/".SCOMPONENT."/assets/smileys/".$folder), array('.', '..', 'index.html'));
|
||||
|
||||
if (empty($smileys)) unset($folders[$key]);
|
||||
}
|
||||
|
||||
$this->folders = array();
|
||||
|
||||
if (!empty($folders)) {
|
||||
if (empty($this->items)) {
|
||||
$model->smileysScan();
|
||||
$this->app->redirect("index.php?option=".SCOMPONENT."&view=smileys");
|
||||
}
|
||||
|
||||
$this->folders[] = array('value' => "", 'text' => JText::_(SSTR.'SELECT_FOLDER'));
|
||||
|
||||
foreach ($folders as $folder) {
|
||||
$this->folders[] = array('value' => $folder, 'text' => $folder);
|
||||
}
|
||||
|
||||
$this->filters['folder'] = array('class' => 'input-medium', 'items' => $this->folders);
|
||||
}
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Featherlight - ultra slim jQuery lightbox
|
||||
* Version 1.7.9 - http://noelboss.github.io/featherlight/
|
||||
*
|
||||
* Copyright 2017, Noël Raoul Bossart (http://www.noelboss.com)
|
||||
* MIT Licensed.
|
||||
**/
|
||||
@media all{html.with-featherlight{overflow:hidden}.featherlight{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483647;text-align:center;white-space:nowrap;cursor:pointer;background:#333;background:rgba(0,0,0,0)}.featherlight:last-of-type{background:rgba(0,0,0,.8)}.featherlight:before{content:'';display:inline-block;height:100%;vertical-align:middle}.featherlight .featherlight-content{position:relative;text-align:left;vertical-align:middle;display:inline-block;overflow:auto;padding:25px 25px 0;border-bottom:25px solid transparent;margin-left:5%;margin-right:5%;max-height:95%;background:#fff;cursor:auto;white-space:normal}.featherlight .featherlight-inner{display:block}.featherlight link.featherlight-inner,.featherlight script.featherlight-inner,.featherlight style.featherlight-inner{display:none}.featherlight .featherlight-close-icon{position:absolute;z-index:9999;top:0;right:0;line-height:25px;width:25px;cursor:pointer;text-align:center;font-family:Arial,sans-serif;background:#fff;background:rgba(255,255,255,.3);color:#000;border:0;padding:0}.featherlight .featherlight-close-icon::-moz-focus-inner{border:0;padding:0}.featherlight .featherlight-image{width:100%}.featherlight-iframe .featherlight-content{border-bottom:0;padding:0;-webkit-overflow-scrolling:touch;overflow-y:scroll}.featherlight iframe{border:0}.featherlight *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}}@media only screen and (max-width:1024px){.featherlight .featherlight-content{margin-left:0;margin-right:0;max-height:98%;padding:10px 10px 0;border-bottom:10px solid transparent}}@media print{@page{size:landscape}html.with-featherlight>*>:not(.featherlight){display:none}}
|
||||
|
||||
.table .modform .content .system-message
|
||||
{
|
||||
font-weight: normal
|
||||
width: auto
|
||||
line-height: 100%
|
||||
float: none
|
||||
border: none
|
||||
background-color: #000000;
|
||||
}
|
||||
@ -0,0 +1,149 @@
|
||||
@charset "utf-8";
|
||||
/*! fileicon.css v1.0.0 | MIT License | github.com/picturepan2/fileicon.css */
|
||||
/* fileicon.basic */
|
||||
.file-icon {
|
||||
font-family: Arial, Tahoma, sans-serif;
|
||||
font-weight: 300;
|
||||
display: block;
|
||||
width: 24px;
|
||||
height: 32px;
|
||||
background: #018FEF;
|
||||
position: relative;
|
||||
border-radius: 2px;
|
||||
text-align: left;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
.file-icon::before {
|
||||
display: block;
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-bottom-left-radius: 2px;
|
||||
border-width: 5px;
|
||||
border-style: solid;
|
||||
border-color: #FFF #FFF rgba(255,255,255,.35) rgba(255,255,255,.35);
|
||||
}
|
||||
.file-icon::after {
|
||||
display: block;
|
||||
content: attr(data-type);
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
font-size: 10px;
|
||||
color: #fff;
|
||||
text-transform: lowercase;
|
||||
width: 100%;
|
||||
padding: 2px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
/* fileicons */
|
||||
.file-icon-xs {
|
||||
width: 12px;
|
||||
height: 16px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.file-icon-xs::before {
|
||||
border-bottom-left-radius: 1px;
|
||||
border-width: 3px;
|
||||
}
|
||||
.file-icon-xs::after {
|
||||
content: "";
|
||||
border-bottom: 2px solid rgba(255,255,255,.45);
|
||||
width: auto;
|
||||
left: 2px;
|
||||
right: 2px;
|
||||
bottom: 3px;
|
||||
}
|
||||
.file-icon-sm {
|
||||
width: 18px;
|
||||
height: 24px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.file-icon-sm::before {
|
||||
border-bottom-left-radius: 2px;
|
||||
border-width: 4px;
|
||||
}
|
||||
.file-icon-sm::after {
|
||||
font-size: 7px;
|
||||
padding: 2px;
|
||||
}
|
||||
.file-icon-lg {
|
||||
width: 48px;
|
||||
height: 64px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.file-icon-lg::before {
|
||||
border-bottom-left-radius: 2px;
|
||||
border-width: 8px;
|
||||
}
|
||||
.file-icon-lg::after {
|
||||
font-size: 16px;
|
||||
padding: 4px 6px;
|
||||
}
|
||||
.file-icon-xl {
|
||||
width: 96px;
|
||||
height: 128px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.file-icon-xl::before {
|
||||
border-bottom-left-radius: 4px;
|
||||
border-width: 16px;
|
||||
}
|
||||
.file-icon-xl::after {
|
||||
font-size: 24px;
|
||||
padding: 4px 10px;
|
||||
}
|
||||
/* fileicon.types */
|
||||
.file-icon[data-type=zip],
|
||||
.file-icon[data-type=rar] {
|
||||
background: #ACACAC;
|
||||
}
|
||||
.file-icon[data-type^=doc] {
|
||||
background: #307CF1;
|
||||
}
|
||||
.file-icon[data-type^=xls] {
|
||||
background: #0F9D58;
|
||||
}
|
||||
.file-icon[data-type^=ppt] {
|
||||
background: #D24726;
|
||||
}
|
||||
.file-icon[data-type=pdf] {
|
||||
background: #E13D34;
|
||||
}
|
||||
.file-icon[data-type=txt] {
|
||||
background: #5EB533;
|
||||
}
|
||||
.file-icon[data-type=mp3],
|
||||
.file-icon[data-type=wma],
|
||||
.file-icon[data-type=m4a],
|
||||
.file-icon[data-type=flac] {
|
||||
background: #8E44AD;
|
||||
}
|
||||
.file-icon[data-type=mp4],
|
||||
.file-icon[data-type=wmv],
|
||||
.file-icon[data-type=mov],
|
||||
.file-icon[data-type=avi],
|
||||
.file-icon[data-type=mkv] {
|
||||
background: #7A3CE7;
|
||||
}
|
||||
.file-icon[data-type=bmp],
|
||||
.file-icon[data-type=jpg],
|
||||
.file-icon[data-type=jpeg],
|
||||
.file-icon[data-type=gif],
|
||||
.file-icon[data-type=png] {
|
||||
background: #F4B400;
|
||||
}
|
||||
|
||||
.input-selected .cell-inner .system-message
|
||||
{
|
||||
margin-top: 30px
|
||||
width: auto
|
||||
font-weight: normal
|
||||
line-height: 100%
|
||||
padding-left: 20px
|
||||
background-color: #000000;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user