Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4471a91
Showing
76 changed files
with
16,576 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<IfModule mod_rewrite.c> | ||
RewriteEngine on | ||
RewriteRule ^zkrss\.php$ index.php?target=rss [QSA,L] | ||
RewriteRule ^zkapi\.php$ index.php?target=api [QSA,L] | ||
RewriteRule ^ssoLogin\.php$ index.php?target=sso [QSA,L] | ||
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
### Contributing | ||
|
||
1. Fork the repo and apply your changes in a feature branch. | ||
2. Issue a pull request. | ||
|
||
|
||
### Getting Started | ||
|
||
1. Fork Zookeeper Online | ||
2. Clone Zookeeper from your fork | ||
3. Create and check out a new branch for your feature or enhancement | ||
4. Edit config/config.php as appropriate | ||
5. Apply and test your changes. Please keep the source code style | ||
as consistent as possible with the existing codebase. Zookeeper | ||
Online uses the [PSR-2 coding style](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) | ||
with a couple of exceptions: | ||
|
||
* Opening braces for classes go on the SAME line. | ||
* Opening braces for methods go on the SAME line. | ||
|
||
6. Push your changes to your branch at github. | ||
7. Create a pull request | ||
|
||
|
||
### Tour | ||
|
||
The following is an overview of the source code directory structure: | ||
|
||
project-root/ | ||
assets/ | ||
JavaScript source for the js directory | ||
config/ | ||
config.php | ||
This is the main configuration file. It includes | ||
settings for the database, SSO setup (if any), | ||
e-mail, hyperlinks, branding, etc. | ||
engine_config.php | ||
Model configuration. This maps the model interfaces | ||
onto the concrete implementations. | ||
ui_config.php | ||
Controller configuration. Maps request targets | ||
onto the controllers and handles menu items. | ||
controllers/ | ||
Controllers are responsible for processing requests | ||
that are received by the application. Controllers are | ||
instantiated and invoked by the Dispatcher, whose | ||
operation is specified via metadata in | ||
config/ui_config.php. | ||
css/ | ||
CSS files | ||
engine/ | ||
Business operations, configuration, and session | ||
management. | ||
Business operations are defined by interfaces. | ||
Each interface represents a logic grouping of | ||
operations. The pattern is to call Engine::api | ||
for the interface you want to use. Engine::api is | ||
a factory which instantiates a concrete | ||
implementation for a given interface. You can | ||
then invoke the methods on the object instance returned | ||
by Engine::api. The interface to concrete implementation | ||
bindings are metadata driven, via config/engine_config.php. | ||
Session state is application-managed; access the | ||
current session state through the singleton | ||
Engine::session. | ||
Configuration file data is accessible through | ||
various methods on the Engine class. | ||
engine/impl/ | ||
Concrete implementations of the business operations. | ||
Classes in this directory should never be referenced | ||
nor accessed directly; all access should be mediated | ||
through the respective interfaces. See 'engine', | ||
above, for a discussion of the Engine::api pattern. | ||
img/ | ||
image files | ||
js/ | ||
minified JavaScript files (from assets) | ||
ui/ | ||
UI rendering. Menu items and their mappings are specified | ||
in metadata, via config/ui_config.php. | ||
index.php | ||
main endpoint for the application | ||
.htaccess | ||
maps virtual endpoints onto index.php | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
## Zookeeper Online | ||
|
||
Zookeeper Online is a music database and charting application for | ||
college and independent radio. | ||
|
||
A snapshot of the master branch is maintained at | ||
https://zookeeper.ibinx.com/master/ | ||
|
||
|
||
### Requirements | ||
|
||
* PHP 5.6 or later with MySQL PDO driver | ||
* MySQL/MariaDB | ||
|
||
|
||
### Getting Started | ||
|
||
1. Clone the repository; | ||
2. Create a database and populate it using the scripts in the 'db' directory; | ||
3. Edit the config/config.php file to point to your newly created database. | ||
|
||
|
||
### Contributing | ||
|
||
Your contributions are welcome. Please see [CONTRIBUTING](CONTRIBUTING.md) | ||
for more information. | ||
|
||
|
||
### License | ||
|
||
**Zookeeper Online** is released under the | ||
**GNU GENERAL PUBLIC LICENSE Version 3 (GPL)**. | ||
http://www.gnu.org/licenses/gpl-3.0.html | ||
|
||
Copyright © 1997-2018 Jim Mason. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
JS_ASSETS="zooscript zootext" | ||
TARGET_DIR=../js | ||
|
||
command -v jsmin >/dev/null 2>&1 || { echo >&2 "jsmin is required but does not appear to be installed. Aborting."; exit 1; } | ||
|
||
for asset in ${JS_ASSETS}; do | ||
jsmin "Jim Mason <jmason@ibinx.com>" "Copyright (C) 1997-2018 Jim Mason. All Rights Reserved." < ${asset}.src.js > ${TARGET_DIR}/${asset}.js | ||
echo >> ${TARGET_DIR}/${asset}.js | ||
done | ||
|
||
echo JavaScript assets minified and deployed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// | ||
// Zookeeper Online | ||
// | ||
// @author Jim Mason <jmason@ibinx.com> | ||
// @copyright Copyright (C) 1997-2018 Jim Mason <jmason@ibinx.com> | ||
// @link https://zookeeper.ibinx.com/ | ||
// @license GPL-3.0 | ||
// | ||
// This code is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License, version 3, | ||
// as published by the Free Software Foundation. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License, | ||
// version 3, along with this program. If not, see | ||
// http://www.gnu.org/licenses/ | ||
// | ||
|
||
function loadXMLDoc(url,selected) { | ||
var req=false; | ||
if(window.XMLHttpRequest) { | ||
// native XMLHttpRequest object | ||
try { | ||
req = new XMLHttpRequest(); | ||
} catch(e) { | ||
req = false; | ||
} | ||
} else if(window.ActiveXObject) { | ||
// IE/Windows ActiveX version | ||
try { | ||
req = new ActiveXObject("Msxml2.XMLHTTP"); | ||
} catch(e) { | ||
try { | ||
req = new ActiveXObject("Microsoft.XMLHTTP"); | ||
} catch(e) { | ||
req = false; | ||
} | ||
} | ||
} | ||
|
||
if(req && typeof(req.readyState) != "undefined" ) { | ||
req.open("GET", url, true); | ||
req.onreadystatechange = function() { processReqChange(req,selected); } | ||
if(typeof(req.setRequestHeader) == "function") | ||
req.setRequestHeader('If-Modified-Since', 'Sat, 1 Jan 2000 00:00:00 GMT'); | ||
req.send(null); | ||
return false; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
function getNodeValue(node) { | ||
return (node&&node[0]&&node[0].firstChild)?node[0].firstChild.nodeValue:''; | ||
} | ||
|
||
function urlEncode(url) { | ||
return escape(url).replace(/\+/g, '%2B'); | ||
} | ||
|
||
function createNamedElement(tag, name) { | ||
var element = null; | ||
try { | ||
// IE requires named elements to be created thusly: | ||
element = document.createElement('<'+tag+' name="'+name+'">'); | ||
} catch(e) {} | ||
|
||
if(!element || element.tagName != tag) { | ||
// Failed, so probably not IE; create it the standard way | ||
element = document.createElement(tag); | ||
element.name = name; | ||
} | ||
return element; | ||
} |
Oops, something went wrong.