Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • semplon/GeniXCMS
1 result
Show changes
Commits on Source (3)
Showing
with 195 additions and 59 deletions
Loading
Loading
@@ -199,6 +199,17 @@ if (isset($data['post'])) {
var bufferText = ((e.originalEvent || e).clipboardData || window.clipboardData).getData(\'Text\');
e.preventDefault();
document.execCommand(\'insertText\', false, bufferText);
},
onChange: function(e) {
var characteres = $(".note-editable").text();
var wordCount = characteres.trim().split(\' \').length;
if (characteres.length == 0) {
$(\'.note-statusbar\').html(\'&nbsp; 0 word <div class="note-resizebar"> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> </div>\');
return;
}
//Update value
$(".note-statusbar").html(\'&nbsp; \'+wordCount+\' words <div class="note-resizebar"> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> </div>\');
}
},
popover: {
Loading
Loading
Loading
Loading
@@ -176,6 +176,17 @@ if (isset($data['post'])) {
var bufferText = ((e.originalEvent || e).clipboardData || window.clipboardData).getData(\'Text\');
e.preventDefault();
document.execCommand(\'insertText\', false, bufferText);
},
onChange: function(e) {
var characteres = $(".note-editable").text();
var wordCount = characteres.trim().split(\' \').length;
if (characteres.length == 0) {
$(\'.note-statusbar\').html(\'&nbsp; 0 word <div class="note-resizebar"> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> </div>\');
return;
}
//Update value
$(".note-statusbar").html(\'&nbsp; \'+wordCount+\' words <div class="note-resizebar"> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> </div>\');
}
},
popover: {
Loading
Loading
Loading
Loading
@@ -65,6 +65,17 @@ if (isset($GLOBALS['editor']) && $GLOBALS['editor'] == true) {
var bufferText = ((e.originalEvent || e).clipboardData || window.clipboardData).getData(\'Text\');
e.preventDefault();
document.execCommand(\'insertText\', false, bufferText);
},
onChange: function(e) {
var characteres = $(".note-editable").text();
var wordCount = characteres.trim().split(\' \').length;
if (characteres.length == 0) {
$(\'.note-statusbar\').html(\'&nbsp; 0 word <div class="note-resizebar"> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> </div>\');
return;
}
//Update value
$(".note-statusbar").html(\'&nbsp; \'+wordCount+\' words <div class="note-resizebar"> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> </div>\');
}
},
popover: {
Loading
Loading
Loading
Loading
@@ -88,10 +88,10 @@
<!-- Logo -->
<a href="index.php" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini img-responsive"><?=Site::logo('', '20px');?></span>
<span class="logo-mini img-responsive"><?=Site::logo('', '28px');?></span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg img-responsive">
<?=Site::logo('', '22px');?>
<?=Site::logo('', '33px');?>
</span>
</a>
 
Loading
Loading
Loading
Loading
@@ -49,7 +49,7 @@ if (User::access(0)) {
$data['alertDanger'] = $alertDanger;
} else {
$menus = Options::v('menus');
$menus = json_decode(Options::v('menus'), true);
$menus = json_decode($menus, true);
//echo "<pre>"; print_r($menus); echo "</pre>";
// $menu = array(
// $_POST['id'] => array(
Loading
Loading
@@ -69,20 +69,25 @@ if (User::access(0)) {
// }
// echo "<pre>"; print_r($menu); echo "</pre>";
//$menu = $menus;
$menu[$_POST['id']]['menu'] = $menus[$_POST['id']]['menu'];
$menu[$_POST['id']]['menu'][] = array(
'parent' => $_POST['parent'],
'menuid' => Typo::strip($_POST['id']),
'name' => Typo::cleanX($_POST['name']),
'type' => $_POST['type'],
'value' => $_POST[$_POST['type']],
$parent = Typo::int(Typo::filterXSS($_POST['parent']));
$menuid = Typo::cleanX(Typo::filterXSS($_POST['id']));
$name = Typo::cleanX(Typo::filterXSS($_POST['name']));
$type = Typo::cleanX(Typo::filterXSS($_POST['type']));
$class = Typo::cleanX(Typo::filterXSS($_POST['class']));
$menu[$menuid]['menu'] = $menus[$menuid]['menu'];
$menu[$menuid]['menu'][] = array(
'parent' => $parent,
'menuid' => $menuid,
'name' => $name,
'type' => $type,
'value' => Typo::cleanX($_POST[$type]),
'sub' => '',
);
$menu = array(
$_POST['id'] => array(
'name' => $menus[$_POST['id']]['name'],
'class' => $menus[$_POST['id']]['class'],
'menu' => $menu[$_POST['id']]['menu'],
$menuid => array(
'name' => $menus[$menuid]['name'],
'class' => $menus[$menuid]['class'],
'menu' => $menu[$menuid]['menu'],
),
);
if (is_array($menus)) {
Loading
Loading
@@ -94,12 +99,12 @@ if (User::access(0)) {
//Options::update('menus', $menu);
 
$vars = array(
'parent' => $_POST['parent'],
'menuid' => $_POST['id'],
'name' => Typo::cleanX($_POST['name']),
'class' => Typo::cleanX($_POST['class']),
'type' => $_POST['type'],
'value' => $_POST[$_POST['type']],
'parent' => $parent,
'menuid' => $menuid,
'name' => $name,
'class' => $class,
'type' => $type,
'value' => $_POST[$type],
);
Menus::insert($vars);
$data['alertSuccess'][] = 'Menu Added';
Loading
Loading
@@ -114,7 +119,7 @@ if (User::access(0)) {
}
//$data['abc'] = "abc";
if (isset($_GET['id'])) {
$menuid = $_GET['id'];
$menuid = Typo::cleanX(Typo::filterXSS($_POST['id']));
} else {
$menuid = '';
}
Loading
Loading
@@ -143,13 +148,18 @@ if (User::access(0)) {
if (isset($alertDanger)) {
$data['alertDanger'] = $alertDanger;
} else {
$parent = Typo::int(Typo::filterXSS($_POST['parent']));
$menuid = Typo::cleanX(Typo::filterXSS($_POST['id']));
$name = Typo::cleanX(Typo::filterXSS($_POST['name']));
$type = Typo::cleanX(Typo::filterXSS($_POST['type']));
$class = Typo::cleanX(Typo::filterXSS($_POST['class']));
$vars = array(
'parent' => Typo::int($_POST['parent']),
'menuid' => Typo::strip($_POST['id']),
'name' => Typo::cleanX($_POST['name']),
'class' => Typo::cleanX($_POST['class']),
'type' => Typo::cleanX($_POST['type']),
'value' => $_POST[$_POST['type']],
'parent' => $parent,
'menuid' => $menuid,
'name' => $name,
'class' => $class,
'type' => $type,
'value' => $_POST[$type],
);
$vars = array(
'id' => $itemid,
Loading
Loading
@@ -167,7 +177,7 @@ if (User::access(0)) {
}
 
if (isset($_GET['id'])) {
$menuid = Typo::cleanX($_GET['id']);
$menuid = Typo::cleanX(Typo::filterXSS($_GET['id']));
} else {
$menuid = '';
}
Loading
Loading
@@ -286,10 +296,14 @@ if (User::access(0)) {
if (isset($alertDanger)) {
$data['alertDanger'] = $alertDanger;
} else {
$menuid = Typo::cleanX(Typo::strip(Typo::filterXSS($_POST['id'])));
$name = Typo::cleanX(Typo::strip(Typo::filterXSS($_POST['name'])));
$class = Typo::cleanX(Typo::filterXSS($_POST['class']));
$menu = array(
$_POST['id'] => array(
'name' => Typo::cleanX($_POST['name']),
'class' => Typo::cleanX($_POST['class']),
$menuid => array(
'name' => $name,
'class' => $class,
'menu' => array(),
),
);
Loading
Loading
Loading
Loading
@@ -49,7 +49,7 @@ class Files
<script src="'.Vendor::url()."/studio-42/elfinder/js/proxy/elFinderSupportVer1.js\"></script>
 
<script>
$(document).ready(function() {
$('#elfinder').elfinder({
url : '".$url."',
height : '500',
Loading
Loading
@@ -64,7 +64,7 @@ class Files
customData : {answer : 42},
 
});
});
 
function elfinderDialog() {
var fm = $('<div/>').dialogelfinder({
Loading
Loading
Loading
Loading
@@ -155,7 +155,7 @@ class Http
}
// print_r($options);
@curl_setopt_array($ch, $options);
$fetch = curl_exec($ch);
$fetch = @curl_exec($ch);
@curl_close($ch);
} else {
$fetch = @file_get_contents($url);
Loading
Loading
Loading
Loading
@@ -157,7 +157,7 @@ class Mod
$mods = array();
}
//print_r($mods);
$arr = '';
$arr = [];
for ($i = 0; $i < count($mods); ++$i) {
if ($mods[$i] == $mod) {
//unset($mods[$i]);
Loading
Loading
Loading
Loading
@@ -470,7 +470,7 @@ class Posts
$tags_x = explode(',', $tags);
$tag = [];
foreach ($tags_x as $t) {
$tag[] = '<a href="'.Url::tag($t)."\">{$t}</a>";
$tag[] = '<a href="'.Url::tag($t)."\">{$t} (".Tags::count($t).")</a>";
}
$tag = implode(', ', $tag);
 
Loading
Loading
Loading
Loading
@@ -53,13 +53,13 @@ class Router
'category/([0-9]+)/(.*)/' => array('cat' => '1'),
'tag/(.*)/paging/([0-9]+)/' => array('tag' => '1', 'paging' => '2'),
'tag/(.*)/' => array('tag' => '1'),
'([a-z]+)/mod/(.*)'.GX_URL_PREFIX => array('mod' => '2', 'lang' => '1'),
'[a-z]{2}/mod/(.*)'.GX_URL_PREFIX => array('mod' => '2', 'lang' => '1'),
// '/(.[a-z]+)/(.+)'.GX_URL_PREFIX => array('page' => '2', 'lang' => '1'),
'mod/(.*)'.GX_URL_PREFIX => array('mod' => '1'),
// '/(.+)'.GX_URL_PREFIX => array('page' => '1'),
'paging/([0-9]+)/' => array('default', 'paging' => '1'),
'error/([0-9]+)/' => array('error' => '1'),
'([a-z]+)/(.*)'.GX_URL_PREFIX => array('post' => '2', 'lang' => '1'),
'[a-z]{2}/(.*)'.GX_URL_PREFIX => array('post' => '2', 'lang' => '1'),
'(.*)'.GX_URL_PREFIX => array('post' => '1'),
'ajax/(.*)/(.*)' => array('ajax' => '1', 'token' => '2'),
'thumb/size/([0-9]+)/(.*)' => array('thumb' => '2', 'size' => '1'),
Loading
Loading
Loading
Loading
@@ -76,16 +76,21 @@ class Session
public static function val($vars)
{
$val = $_SESSION['gxsess']['val'];
foreach ($val as $k => $v) {
switch ($k) {
case $vars:
return $v;
break;
default:
//echo "no value";
break;
if (is_array($val)) {
# code...
foreach ($val as $k => $v) {
switch ($k) {
case $vars:
return $v;
break;
default:
//echo "no value";
break;
}
}
} else {
return null;
}
}
 
Loading
Loading
Loading
Loading
@@ -383,6 +383,17 @@ class Site
var bufferText = ((e.originalEvent || e).clipboardData || window.clipboardData).getData(\'Text\');
e.preventDefault();
document.execCommand(\'insertText\', false, bufferText);
},
onChange: function(e) {
var characteres = $(".note-editable").text();
var wordCount = characteres.trim().split(\' \').length;
if (characteres.length == 0) {
$(\'.note-statusbar\').html(\'&nbsp; 0 word <div class="note-resizebar"> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> </div>\');
return;
}
//Update value
$(".note-statusbar").html(\'&nbsp; \'+wordCount+\' words <div class="note-resizebar"> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> <div class="note-icon-bar"></div> </div>\');
}
},
popover: {
Loading
Loading
Loading
Loading
@@ -180,6 +180,34 @@ class Tags
{
return Categories::slug($id);
}
public static function count($tag)
{
$tag = Typo::cleanX($tag);
$sql = "SELECT * FROM `posts_param` WHERE `param` = 'tags' AND `value` LIKE '%%{$tag}%%' ";
$q = Db::result($sql);
return Db::$num_rows;
}
public static function cloud()
{
// get all tags first
$sql = "SELECT * FROM `cat` WHERE `type` = 'tag'";
$q = Db::result($sql);
$tags = [];
foreach ($q as $key => $value) {
$tags[$value->name] = self::count($value->name);
}
arsort($tags);
$cloud = "";
foreach ($tags as $key => $value) {
$cloud .= "<a class='tag-cloud' href='".Url::tag($key)."'>{$key} <span class='tag-count'>{$value}</span></a> ";
}
return $cloud;
}
}
 
/* End of file Categories.class.php */
Loading
Loading
Loading
Loading
@@ -351,11 +351,11 @@ class Url
$align = ($align != '') ? 'align/'.$align.'/' : '';
 
$inFold = (Options::v('permalink_use_index_php') == 'on') ? 'index.php/' : '';
$url = Site::$url.$inFold.'thumb/'.$type.$size.$align.$vars;
$url = Site::$cdn.$inFold.'thumb/'.$type.$size.$align.$vars;
break;
 
default:
$url = Site::$url."?thumb={$vars}&type={$type}&size={$size}&align={$align}";
$url = Site::$cdn."?thumb={$vars}&type={$type}&size={$size}&align={$align}";
break;
}
 
Loading
Loading
@@ -366,7 +366,7 @@ class Url
{
$theme = Options::v('themes');
 
return Site::$url.'inc/themes/'.$theme.'/';
return Site::$cdn.'inc/themes/'.$theme.'/';
}
 
public static function author($vars, $type='')
Loading
Loading
Loading
Loading
@@ -21,7 +21,8 @@ class Contact
{
 
if ($data[0]['mod'] == 'contactPage') {/* this is to filter only appear when the mod is the same*/
switch ($_POST['sendMessage']){
$sendMessage = isset($_POST['sendMessage']) ? $_POST['sendMessage']: '';
switch ($sendMessage){
case true:
$token = Typo::cleanX($_POST['token']);
if (!isset($_POST['token']) || !Token::validate($token)){
Loading
Loading
<?=Hooks::run('contact_page_notification', $data);?>
<h2 class="blog-post-title">Contact Us
<hr>
</h2>
<form action="" method="post">
<div class="form-group">
<label>Name</label>
Loading
Loading
Loading
Loading
@@ -537,7 +537,28 @@ pre {
font-size: 4em;
}
 
.tag-cloud {
background-color: #999;
padding: 0 10px;
border-radius: 25px!important;
line-height: 25px;
white-space: pre;
}
 
.tag-cloud a {
color: #333!important;
margin: 2px!important;
}
.tag-cloud a:hover {
color: #666!important;
}
.tag-count {
background-color: #333;
border: 0px;
border-radius: 25px!important;
padding: 0 5px;
font-size: 0.7em;
}
/* MEDIA QUERIES */
/* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
Loading
Loading
Loading
Loading
@@ -2,11 +2,17 @@
<footer>
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="col-md-3">
<h4>Navigation</h4>
<?php
echo Menus::getMenu('footer', 'list-unstyled', true);
?>
</div>
<div class="col-md-4">
<div class="col-md-5">
<h4>Tags</h4>
<?php
echo Tags::cloud();
?>
</div>
<div class="col-md-4">
 
Loading
Loading
Loading
Loading
@@ -118,10 +118,23 @@ class Gneex
 
public static function introIg($url)
{
$dom = explode('/', $url);
if (strpos($dom[2], 'youtube') || strpos($dom[2], 'youtu.be')) {
$hash = (strpos($dom[2], 'youtu.be')) ? $dom[3] : str_replace('watch?v=', '', $dom[3]);
if (strpos($url, 'youtube') || strpos($url, 'youtu.be')) {
if (strpos($url, 'youtube')) {
parse_str( parse_url( $url, PHP_URL_QUERY ), $dom );
} else {
$dom = explode('/', $url);
}
$hash = (strpos($url, 'youtu.be')) ? $dom[3] : $dom['v'];
$html = '<iframe width="560" height="315" src="https://www.youtube.com/embed/'.$hash.'?rel=0&amp;controls=0&amp;showinfo=0" class="center-block" frameborder="0" allowfullscreen></iframe>';
} elseif(strpos($url, 'vimeo')) {
$dom = explode('/', $url);
$html = '<iframe src="https://player.vimeo.com/video/'.$dom[3].'?byline=0&portrait=0" width="640" height="267" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
} elseif(strpos($url, 'dailymotion') || strpos($url, 'dai.ly')) {
$dom = explode('/', $url);
$hash = (strpos($url, 'dai.ly')) ? $dom[3]: $dom[4];
$html = '<iframe frameborder="0" width="480" height="270" src="//www.dailymotion.com/embed/video/'.$hash.'" allowfullscreen></iframe>';
} else {
$html = '<img src="'.$url.'" class="img-responsive center-block">';
}
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@
<div class="col-md-8">
<div class=" blog-lists clearfix">
<article class="blog-post">
<article class="blog-post col-md-12">
<?php
if (Gneex::opt('adsense') != '') {
echo '<div class="row"><div class="col-md-12">'.Gneex::opt('adsense').'</div></div><hr />';
Loading
Loading