Permalink
Browse files

Initial commit with README and LICENSE.

  • Loading branch information...
davidstutz committed Nov 3, 2014
0 parents commit 5a7495a48609a284c8d4dcb930ef6c7423f4e8d5
Showing 1,084 changed files with 38,877 additions and 0 deletions.
@@ -0,0 +1,18 @@
Copyright 2014 David Stutz
The plugin is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The plugin 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.
See <http://www.gnu.org/licenses/>.
For further informations see help/help_en.htm.
David Stutz
davidstutz@web.de
@@ -0,0 +1,38 @@
# CMSimple BBClone
CMSimple BBClone is a CMSimple plugin to use [BBClone](http://bbclone.de/) as web counter.
Documentation: [http://davidstutz.github.io/cmsimple-bbclone/help/help_en.htm](http://davidstutz.github.io/cmsimple-bbclone/help/help_en.htm).
Other CMSimple plugins:
* [CMSimple News](https://github.com/davidstutz/cmsimple-news): allows to publish and manage news - can also be used to provide blog-like functionality.
* [CMSimple Pictures](https://github.com/davidstutz/cmsimple-pictures): allows to create and manage image galleries and sliders.
* [CMSimple Youtube](https://github.com/davidstutz/cmsimple-youtube): allows to create and manage youtube video galleries.
## Installation
1. Copy the `bbclone` folder of the download into the CMSimple root.
2. In your `plugins` folder create a new folder called `bbclone`.
3. Copy the downloaded files into the created folder.
**Before going live with the CMSImple system, go to the `bbclone` folder within CMSimple's root and replace the `var` folder with the folder contained in `var.zip`.**
## Requirements & Compatibility
**Recommended: [CMSimple XH](http://www.cmsimple-xh.org/) 1.5 or higher!**
Also tested on:
* CMSimple XH 1.4.2 and 1.1.4.
* CMSimple Realblog 1.5 or higher.
## License
Copyright 2014 David Stutz
The plugin is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The plugin 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.
See [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).
@@ -0,0 +1,89 @@
<?php
/* utf8-marker = äöüß */
/**
* @file admin.php
* @brief Admin area.
*
* @author David Stutz
* @license GPLv3
* @package bbclone
* @see http://sourceforge.net/projects/cmsimplebbclone/
*
* This file is part of the bbclone plugin for CMSimple.
*
* The plugin is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The plugin 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.
*
* @see <http://www.gnu.org/licenses/>.
*/
if (!defined('CMSIMPLE_XH_VERSION')) {
header('HTTP/1.0 403 Forbidden');
exit;
}
if (!class_exists('BBClone')) require dirname(__FILE__)."/bbclone.php";
if (isset($bbclone))
{
global $sn, $plugin_tx;
$f = "bbclone";
/* initvar() for POST AND GET support. */
initvar('admin');
$o .= print_plugin_admin('ON');
/* Plugin info. */
if ($admin === '')
{
$o .= '<p class="bbclone-head"><b>' . BBClone::name() . '</b></p>'
. '<div class="bbclone-notice">'
. 'Version: <b>' . BBClone::VERSION . '</b><br />'
. '</div>'
. '<div class="bbclone-help">'
. 'Released: ' . BBClone::release_date() . '<br />'
. 'Author: ' . BBClone::author() . '<br />'
. 'Website: ' . BBClone::website() . '<br />'
. 'GitHub Repository: ' . BBCLone::github() . '<br />'
. BBClone::description() . '<br />'
. BBClone::legal() . '<br />'
. '</div>';
}
if ($admin == 'plugin_main')
{
$action = isset($_GET['action']) ? $_GET['action'] : 'plugin_text';
$help = isset($_GET['help']) ? TRUE : FALSE;
$o .= '<p class="bbclone-head"><b>' . $plugin_tx["bbclone"]["See your statistics"] . '</b><span style="float: right;"><a href="' . page_url() . '&help"><img src="' . $pth['folder']['plugins'] . 'bbclone/images/help.png" /></a></span></p>'
.'<p>';
if ($help)
{
$o .= '<p class="bbclone-help">' . $plugin_tx['bbclone']['The statistics will be displayed using an external tool to get the best possible overview over the user\'s behaviour on your website.'] . '</p>';
}
$o .= '<a class="bbclone-statistics" target="_blank" href="' . $sn . 'bbclone">' . $plugin_tx['bbclone']['Go to statistics.'] . '</a>';
$o .= '</p>';
}
if ($admin != 'plugin_main')
{
$hint = array(
'mode_donotshowvarnames' => FALSE,
);
$o .= plugin_admin_common($action, $admin, $plugin, $hint);
}
}
@@ -0,0 +1,215 @@
<?php
/* utf8-marker = äöüß */
/**
* @file bbclone.php
* @brief Containing class BBClone.
*
* @author David Stutz
* @license GPLv3
* @package bbclone
* @see http://sourceforge.net/projects/cmsimplebbclone/
*
* This file is part of the bbclone plugin for CMSimple.
*
* The plugin is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The plugin 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.
*
* @see <http://www.gnu.org/licenses/>.
*/
/*! \mainpage CMSimple BBClone
*
* This plugin integrated BBClone with CMSimple.
*
* This is a generated documentation of the plugin.
*
* \mainpage
*/
if (!function_exists('page_url'))
{
/**
* Detect root.
*
* @return <string> root
*/
function page_url()
{
$url = 'http';
if (isset($_SERVER["HTTPS"])
AND $_SERVER["HTTPS"] == "on")
{
$url .= "s";
}
$url .= "://";
if ($_SERVER["SERVER_PORT"] != "80")
{
$url .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
}
else
{
$url .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
}
return $url;
}
}
/**
* @class BBClone
*
* BBClone class for genheral plugin information and trakcing initialization.
*
* @author David Stutz
* @since 1.0.0
* @package bbclone
*/
class BBClone {
/**
* Version.
*/
const VERSION = '1.0.0';
/**
* @static
* @public
* Get plugin's name.
*
* @return <string> name
*/
public static function name()
{
return "BBClone Plugin";
}
/**
* @static
* @public
* Get plugin's release date.
*
* @return <string> release date.
*/
public static function release_date()
{
return "3th November 2014";
}
/**
* @static
* @public
* Get plugin's author.
*
* @return <string> author.
*/
public static function author()
{
return "David Stutz";
}
/**
* @static
* @public
* Get plugin's website.
*
* @return <string> website link
*/
public static function website()
{
return '<a href="http://davidstutz.de/projects/cmsimple/" target="_blank">Project\'s Website</a>';
}
/**
* @static
* @public
* Get plugin's website.
*
* @return <string> website link
*/
public static function github()
{
return '<a href="https://github.com/davidstutz/cmsimple-bbclone" target="_blank">GitHub Repository</a>';
}
/**
* @static
* @public
* Get plugin's description.
*
* @return <string> description
*/
public static function description()
{
return 'This plugin integrate BBClonse with CMSimple.';
}
/**
* @static
* @public
* Get plugin's legal.
*
* @return <string> legal
*/
public static function legal()
{
return 'This plugin is published under the GNU Public License version 3. See <a href="http://www.gnu.org/licenses/">Licenses</a> for more information.';
}
/**
* @static
* @public
* Get bbclone's legal.
*
* @return <string> legal
*/
public static function bbclone_legal()
{
return 'BBClone is published under the GNU Public License. See <a href="http://www.gnu.org/licenses/">Licenses</a>.';
}
/**
* @public
* @static
* Main tracking initialization.
*/
public static function init()
{
global $pth, $txc, $adm, $plugin_cf, $h, $s;
static $bbclone_initialized = FALSE;
if (!$bbclone_initialized
AND !defined('_BBCLONE_DIR')
AND (!$adm
OR $plugin_cf['bbclone']['track_backend'] == 'true'))
{
if ($s >= 0)
{
define("_BBC_PAGE_NAME", $h[$s]);
}
elseif (isset($h[0]))
{
define("_BBC_PAGE_NAME", $h[0]);
}
else
{
define("_BBC_PAGE_NAME", $txc['site']['title']);
}
define('_BBCLONE_DIR', $pth['folder']['base'] . 'bbclone/');
define('COUNTER', _BBCLONE_DIR . 'mark_page.php');
if (is_readable(COUNTER))
{
include_once(COUNTER);
}
$bbclone_initialized = TRUE;
}
}
}
?>
@@ -0,0 +1 @@
Deny from all
Oops, something went wrong.

0 comments on commit 5a7495a

Please sign in to comment.