Skip to content

Commit

Permalink
Added Resource class
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Nov 18, 2017
1 parent 57e0bef commit 1472e6d
Show file tree
Hide file tree
Showing 60 changed files with 22,347 additions and 2,821 deletions.
1 change: 1 addition & 0 deletions public_html/admin/clearctl.php
Expand Up @@ -45,3 +45,4 @@
*/
CTL_clearCache();
COM_redirect($_CONF['site_admin_url'] . '/index.php?msg=500');
Geeklog\Cache::clear();
82 changes: 57 additions & 25 deletions public_html/javascript/profile_editor.js
@@ -1,13 +1,11 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
// | Geeklog 1.6 |
// | Geeklog 2.2 |
// +---------------------------------------------------------------------------+
// | Copyright (C) 2003-2009 by the following authors: |
// | Version 1.0 Date: Jun 24, 2006 |
// | Authors: Blaine Lang - blaine@portalparts.com |
// | |
// | Javascript functions for Account Profile Editor |
// | |
// +---------------------------------------------------------------------------+
// | |
// | This program is free software; you can redistribute it and/or |
Expand All @@ -26,51 +24,85 @@
// | |
// +---------------------------------------------------------------------------+

// @param string selected Name of div that has been selected
// @param int selindex index id of the selected tab as in 1 - 7 used to set the selected tab
function showhideProfileEditorDiv(selected, selindex) {

// @param string selected Name of div that has been selected
// @param int selectedIndex index id of the selected tab as in 1 - 7 used to set the selected tab
function showhideProfileEditorDiv(selected, selectedIndex) {
'use strict';
// Reset the current selected navbar tab
var cnavbar = document.getElementById('current');
if (cnavbar) cnavbar.id = '';
var cNavbar = document.getElementById('current');

if (cNavbar) {
cNavbar.id = '';
}

// Cycle thru the navlist child elements - buiding an array of just the link items
// Cycle thru the navlist child elements - building an array of just the link items
var navbar = document.getElementById('navlist');
var menuitems = new Array(7);
var menuItems = new Array(7);
var item = 0;
for (var i=0 ;i < navbar.childNodes.length ; i++ ) {
if (navbar.childNodes[i].nodeName.toLowerCase() == 'li') {
menuitems[item] = navbar.childNodes[i];
for (var i = 0; i < navbar.childNodes.length; i++) {
if (navbar.childNodes[i].nodeName.toLowerCase() === 'li') {
menuItems[item] = navbar.childNodes[i];
item++;
}
}

// Now that I have just the link items I can set the selected tab using the passed selected Item number
// Set the <a tag to have an id called 'current'
var menuitem = menuitems[selindex];
for (var j=0 ;j < menuitem.childNodes.length ; j++ ) {
if (menuitem.childNodes[j].nodeName.toLowerCase() == 'a') menuitem.childNodes[j].id = 'current';
var menuItem = menuItems[selectedIndex];
for (var j = 0; j < menuItem.childNodes.length; j++) {
if (menuItem.childNodes[j].nodeName.toLowerCase() === 'a') {
menuItem.childNodes[j].id = 'current';
}
}

// Reset or show all the main divs - editor tab sections
// Object profilepanels defined in profile.thtml after page is generated
for( var divid in profilepanels){
if (selected != divid) {
document.getElementById(divid).style.display = 'none';
} else {
document.getElementById(divid).style.display = '';
for (var divId in window.profilepanels) {
if (window.profilepanels.hasOwnProperty(divId)) {
if (selected !== divId) {
document.getElementById(divId).style.display = 'none';
} else {
document.getElementById(divId).style.display = '';
}
}
}

document.getElementById('pe_preview').style.display = 'none';

if (selected != 'pe_preview') {
if (selected !== 'pe_preview') {
document.getElementById('save_button').style.display = '';
} else if (selected == 'pe_preview') {
} else if (selected === 'pe_preview') {
document.getElementById('pe_preview').style.display = '';
document.getElementById('save_button').style.display = 'none';
} else {
document.getElementById('pe_preview').style.display = '';
document.getElementById('save_button').style.display = 'none';
}

}

(function () {
'use strict';
/* Initially the navbar is hidden - in case JS is disabled. Enable it now */
document.getElementById('pe_navbar').style.display = '';

/* Now cycle through the profile tabs as the number in the template could have been modified (personalized)
If you add custom panels, just ensure you use the class jsenabled_hide or jsenabled_show
Build an object that can then be referenced in the function showhideProfileEditorDiv
*/

var profilePanels = {};
var el = document.getElementsByTagName("div");

for (var i = 0; i < el.length; i++) {
var divName = el[i].id;
if (el[i].className === "jsenabled_show") {
el[i].style.display = "";
profilePanels[divName] = "show";
} else if (el[i].className === "jsenabled_hide") {
el[i].style.display = "none";
profilePanels[divName] = "hidden";
}
}

window.profilepanels = profilePanels;
})();
12 changes: 5 additions & 7 deletions public_html/layout/denim/functions.php
Expand Up @@ -191,7 +191,11 @@ function theme_js_libs_denim()
array(
'library' => 'jquery',
'footer' => false // Not required, default = true
)
),
array(
'library' => 'uikit',
'footer' => false, // Not required, default = true
),
);
}

Expand All @@ -205,12 +209,6 @@ function theme_js_files_denim()
$theme_var = theme_config_denim();

$result = array();
$result[] = array(
'file' => '/vendor/uikit/js/uikit.js',
'footer' => false, // Not required, default = true
'priority' => 100 // Not required, default = 100
);

$result[] = array(
'file' => '/layout/' . $_CONF['theme'] . '/javascript/script.js',
'footer' => true, // Not required, default = true
Expand Down
1 change: 1 addition & 0 deletions public_html/siteconfig.php.dist
Expand Up @@ -66,6 +66,7 @@ $_CONF['site_enabled'] = true;
// $_CONF['developer_mode_log']['common'] = true; // lib-common.php
// $_CONF['developer_mode_log']['database'] = true; // lib-database.php
// $_CONF['developer_mode_log']['deprecated'] = true; // deprecated features
// $_CONF['developer_mode_log']['resource'] = true; // Resource class
// $_CONF['developer_mode_log']['security'] = true; // lib-security.php
// $_CONF['developer_mode_log']['session'] = true; // lib-session.php
// $_CONF['developer_mode_log']['template'] = true; // Template class
Expand Down
32 changes: 2 additions & 30 deletions public_html/usersettings.php
Expand Up @@ -2,13 +2,13 @@

/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
// | Geeklog 2.1 |
// | Geeklog 2.2 |
// +---------------------------------------------------------------------------+
// | usersettings.php |
// | |
// | Geeklog user settings page. |
// +---------------------------------------------------------------------------+
// | Copyright (C) 2000-2010 by the following authors: |
// | Copyright (C) 2000-2017 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
// | Mark Limburg - mlimburg AT users DOT sourceforge DOT net |
Expand Down Expand Up @@ -94,34 +94,6 @@ function edituser()
// Add JavaScript
$_SCRIPTS->setJavaScriptFile('profile_editor', '/javascript/profile_editor.js');

$js = '<!-- JS Functions which will execute only if JS enabled will un-hide the special features that enhance the profile editor -->
<script type="text/JavaScript">
//<![CDATA[
/* Initially the navbar is hidden - in case JS is disabled. Enable it now */
document.getElementById("pe_navbar").style.display="";
/* Now cycle through the profile tabs as the number in the template could have been modified (personalized)
If you add custom panels, just ensure you use the class jsenabled_hide or jsenabled_show
Build an object that can then be referenced in the functon showhideProfileEditorDiv
*/
var profilepanels = new Object;
var el;
el=document.getElementsByTagName("div");
for(i=0;i<el.length;i++) {
var divname = el[i].id
if(el[i].className == "jsenabled_show"){
el[i].style.display = "";
profilepanels[divname] = "show";
} else if(el[i].className == "jsenabled_hide"){
el[i].style.display = "none";
profilepanels[divname] = "hidden";
}
}
//]]>
</script>';
$_SCRIPTS->setJavaScript($js);

// some trickery to ensure alternating colors with the available options ...
if ($_CONF['allow_username_change'] == 1) {
$first = 1;
Expand Down
43 changes: 43 additions & 0 deletions public_html/vendor/jquery-ui/LICENSE.txt
@@ -0,0 +1,43 @@
Copyright jQuery Foundation and other contributors, https://jquery.org/

This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/jquery/jquery-ui

The following license applies to all parts of this software except as
documented below:

====

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

====

Copyright and related rights for sample code are waived via CC0. Sample
code is defined as all source code contained within the demos directory.

CC0: http://creativecommons.org/publicdomain/zero/1.0/

====

All files located in the node_modules and external directories are
externally maintained libraries used by this software which have their
own licenses; we recommend you read them, as their terms may differ from
the terms above.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1472e6d

Please sign in to comment.