1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 22:57:14 +02:00

Legacy clock_menu plugin removed.

This commit is contained in:
Cameron
2021-01-24 07:38:19 -08:00
parent 0846285277
commit f6290ed533
6 changed files with 1 additions and 324 deletions

View File

@@ -1360,7 +1360,7 @@ class e107plugin
protected $core_plugins = array( protected $core_plugins = array(
"_blank","admin_menu","banner","blogcalendar_menu", "_blank","admin_menu","banner","blogcalendar_menu",
"chatbox_menu", "clock_menu","comment_menu", "chatbox_menu", "comment_menu",
"contact", "download", "featurebox", "forum","gallery", "contact", "download", "featurebox", "forum","gallery",
"gsitemap","hero", "import", "linkwords", "list_new", "log", "login_menu", "gsitemap","hero", "import", "linkwords", "list_new", "log", "login_menu",
"metaweblog", "newforumposts_main", "news", "newsfeed", "metaweblog", "newforumposts_main", "news", "newsfeed",

View File

@@ -1,93 +0,0 @@
function tick(e107_datepref, e107_dateformat, e107_datesuff1, e107_datesuff2, e107_datesuff3, e107_datesuff4) {
if (e107_datepref === undefined) {
e107_datepref = '';
}
if (e107_datesuff1 === undefined) {
e107_datesuff1 = '';
}
if (e107_datesuff2 === undefined) {
e107_datesuff2 = '';
}
if (e107_datesuff3 === undefined) {
e107_datesuff3 = '';
}
if (e107_datesuff4 === undefined) {
e107_datesuff4 = '';
}
var hours, minutes, seconds, ap;
var intHours, intMinutes, intSeconds, today;
var intDay, intDate, intMonth, intYear, timeString;
today = new Date();
intDay = today.getDay();
intDate = today.getDate();
intMonth = today.getMonth();
intYear = today.getYear();
intHours = today.getHours();
intMinutes = today.getMinutes();
intSeconds = today.getSeconds();
timeString = DayNam[intDay] + " " + e107_datepref + " " + intDate;
if (intDate == 1 || intDate == 21 || intDate == 31) {
timeString = timeString + e107_datesuff1 + " ";
} else if (intDate == 2 || intDate == 22) {
timeString = timeString + e107_datesuff2 + " ";
} else if (intDate == 3 || intDate == 23) {
timeString = timeString + e107_datesuff3 + " ";
} else {
timeString = timeString + e107_datesuff4 + " ";
}
if (intYear < 2000) {
intYear += 1900;
}
timeString = timeString + " " + MnthNam[intMonth] + " " + intYear;
if (e107_dateformat == 1) {
if (intHours == 0) {
hours = "12:";
ap = "am.";
} else if (intHours < 12) {
hours = intHours + ":";
ap = "am.";
} else if (intHours == 12) {
hours = "12:";
ap = "pm.";
} else {
intHours = intHours - 12
hours = intHours + ":";
ap = "pm.";
}
} else {
if (intHours < 10) {
hours = "0" + intHours + ":";
} else {
hours = intHours + ":";
}
ap = '';
}
if (intMinutes < 10) {
minutes = "0" + intMinutes;
} else {
minutes = intMinutes;
}
if (intSeconds < 10) {
seconds = ":0" + intSeconds;
} else {
seconds = ":" + intSeconds;
}
timeString = (document.all) ? timeString + ", " + hours + minutes + seconds + " " + ap : timeString + " " + hours + minutes + " " + ap;
var clock = (document.all) ? document.all("Clock") : document.getElementById("Clock");
clock.innerHTML = timeString;
(document.all) ? window.setTimeout("tick('" + e107_datepref + "','" + e107_dateformat + "','" + e107_datesuff1 + "','" + e107_datesuff2 + "','" + e107_datesuff3 + "','" + e107_datesuff4 + "');", 1000) : window.setTimeout("tick('" + e107_datepref + "','" + e107_dateformat + "','" + e107_datesuff1 + "','" + e107_datesuff2 + "','" + e107_datesuff3 + "','" + e107_datesuff4 + "');", 6000);
}
tick();

View File

@@ -1,60 +0,0 @@
<?php
/*
+---------------------------------------------------------------+
| e107 Clock Menu
| /clock_menu.php
|
| Compatible with the e107 content management system
| http://e107.org
|
| Originally written by jalist, modified for greater
| detail and cross browser compatiblity by Caveman
| Last modified 19:11 08/04/2003
|
| Works with Mozilla 1.x, NS6, NS7, IE5, IE5.5, Opera 7
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
+---------------------------------------------------------------+
*/
//FIXME looks pretty much to be 0.6 compatible
if (!defined('e107_INIT')) { exit(); }
e107::lan('clock_menu',false);
$menu_pref = e107::getConfig('menu')->getPref('');
$indexArray = array('clock_dateprefix','clock_format','clock_datesuffix1','clock_datesuffix2','clock_datesuffix3','clock_datesuffix4');
foreach($indexArray as $ind)
{
if(!isset($menu_pref[$ind]))
{
$menu_pref[$ind]='';
}
}
$ec_dir = e_PLUGIN.'clock_menu/';
$text = "\n\n<!-- ### clock ### //-->\n<div id='Clock'>&nbsp;</div>\n";
if (!isset($clock_flat) || !$clock_flat) {
$ns->tablerender($menu_pref['clock_caption'], "<div style='text-align:center'>".$text."</div>", 'clock');
} else {
echo $text;
}
?>
<script type="text/javascript">
<!--
var DayNam = new Array(
"<?php echo isset($LAN_407)?$LAN_407:"".CLOCK_MENU_L11; ?>","<?php echo isset($LAN_401)?$LAN_401:"".CLOCK_MENU_L5; ?>","<?php echo isset($LAN_402)?$LAN_402:"".CLOCK_MENU_L6; ?>","<?php echo isset($LAN_403)?$LAN_403:"".CLOCK_MENU_L7; ?>","<?php echo isset($LAN_404)?$LAN_404:"".CLOCK_MENU_L8; ?>","<?php echo isset($LAN_405)?$LAN_405:"".CLOCK_MENU_L9; ?>","<?php echo isset($LAN_406)?$LAN_406:"".CLOCK_MENU_L10; ?>");
var MnthNam = new Array(
"<?php echo isset($LAN_411)?$LAN_411:"".CLOCK_MENU_L12; ?>","<?php echo isset($LAN_412)?$LAN_412:"".CLOCK_MENU_L13; ?>","<?php echo isset($LAN_413)?$LAN_413:"".CLOCK_MENU_L14; ?>","<?php echo isset($LAN_414)?$LAN_414:"".CLOCK_MENU_L15; ?>","<?php echo isset($LAN_415)?$LAN_415:"".CLOCK_MENU_L16; ?>","<?php echo isset($LAN_416)?$LAN_416:"".CLOCK_MENU_L17; ?>","<?php echo isset($LAN_417)?$LAN_417:"".CLOCK_MENU_L18; ?>","<?php echo isset($LAN_418)?$LAN_418:"".CLOCK_MENU_L19; ?>","<?php echo isset($LAN_419)?$LAN_419:"".CLOCK_MENU_L20; ?>","<?php echo isset($LAN_420)?$LAN_420:"".CLOCK_MENU_L21; ?>","<?php echo isset($LAN_421)?$LAN_421:"".CLOCK_MENU_L22; ?>","<?php echo isset($LAN_422)?$LAN_422:"".CLOCK_MENU_L23; ?>");
//-->
</script>
<?php
echo "
<script type='text/javascript' src='".e_PLUGIN_ABS."clock_menu/clock.js'></script>
<script type=\"text/javascript\">\nwindow.setTimeout(\"tick('".$menu_pref['clock_dateprefix']."', '".$menu_pref['clock_format']."', '".$menu_pref['clock_datesuffix1']."', '".$menu_pref['clock_datesuffix2']."', '".$menu_pref['clock_datesuffix3']."', '".$menu_pref['clock_datesuffix4']."')\",150);\n</script>
<!-- ### end clock ### //-->\n\n";
?>

View File

@@ -1,106 +0,0 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Plugin Administration - Clock menu
*
*/
$eplug_admin = TRUE;
require_once(__DIR__.'/../../class2.php');
if (!getperms('1'))
{
e107::redirect('admin');
exit ;
}
require_once(e_ADMIN.'auth.php');
e107::includeLan(e_PLUGIN.'clock_menu/languages/admin/'.e_LANGUAGE.'.php');
$frm = e107::getForm();
$mes = e107::getMessage();
$menu_pref = e107::getConfig('menu')->getPref();
if (isset($_POST['update_menu']))
{
$temp = array();
foreach($_POST as $key=>$value)
{
if ($key != 'update_menu')
{
$temp[$key] = $value;
}
}
if ($_POST['clock_format'] != 1)
{
$temp['clock_format'] = 0;
}
if (e107::getLog()->logArrayDiffs($temp,$menu_pref,'MISC_05'))
{
$menuPref = e107::getConfig('menu');
foreach ($temp as $k => $v)
{
$menuPref->setPref($k, $v);
}
$menuPref->save(false, true, false);
}
}
e107::getRender()->tablerender(null, $mes->render());
$text = "
<form method='post' action='".e_SELF."?".e_QUERY."' name='menu_conf_form'>
<table class='table adminform'>
<colgroup span='2'>
<col class='col-label' />
<col class='col-control' />
</colgroup>
<tr>
<td>".CLOCK_AD_L2.": </td>
<td><input class='tbox' type='text' name='clock_caption' size='20' value='".varset($menu_pref['clock_caption'])."' maxlength='100' /> </td>
</tr>
<tr>
<td>".CLOCK_AD_L5.": </td>
<td>".$frm->checkbox('clock_format', 1, varset($menu_pref['clock_format'], 0))."<span class='field-help'>".CLOCK_AD_L6."</span></td>
</tr>
<tr>
<td>".CLOCK_AD_L7.": </td>
<td><input class='tbox' type='text' name='clock_dateprefix' size='10' value='".varset($menu_pref['clock_dateprefix'])."' maxlength='50' /><span class='field-help'>".CLOCK_AD_L8."</span></td>
</tr>
<tr>
<td>".CLOCK_AD_L9.": </td>
<td><input class='tbox' type='text' name='clock_datesuffix1' size='10' value='".varset($menu_pref['clock_datesuffix1'])."' maxlength='50' /><span class='field-help'>".CLOCK_AD_L13."</span></td>
</tr>
<tr>
<td>".CLOCK_AD_L10.": </td>
<td><input class='tbox' type='text' name='clock_datesuffix2' size='10' value='".varset($menu_pref['clock_datesuffix2'])."' maxlength='50' /><span class='field-help'>".CLOCK_AD_L13."</span></td>
</tr>
<tr>
<td>".CLOCK_AD_L11.": </td>
<td><input class='tbox' type='text' name='clock_datesuffix3' size='10' value='".varset($menu_pref['clock_datesuffix3'])."' maxlength='50' /><span class='field-help'>".CLOCK_AD_L13."</span></td>
</tr>
<tr>
<td>".CLOCK_AD_L12.": </td>
<td><input class='tbox' type='text' name='clock_datesuffix4' size='10' value='".varset($menu_pref['clock_datesuffix4'])."' maxlength='50' /><span class='field-help'>".CLOCK_AD_L13."</span></td>
</tr>
</table>
<div class='buttons-bar center'>
".$frm->admin_button('update_menu', LAN_UPDATE, 'update')."
</div>
</form>
";
e107::getRender()->tablerender(CLOCK_AD_L4, $text);
require_once(e_ADMIN."footer.php");

View File

@@ -1,40 +0,0 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/clock_menu/languages/English.php,v $
* $Revision$
* $Date$
* $Author$
*/
define("CLOCK_MENU_L1", "Clock menu configuration saved");
define("CLOCK_MENU_L2", "Caption");
define("CLOCK_MENU_L3", "Update Menu Settings");
define("CLOCK_MENU_L4", "Clock Menu Config");
define("CLOCK_MENU_L5", "Monday,");
define("CLOCK_MENU_L6", "Tuesday,");
define("CLOCK_MENU_L7", "Wednesday,");
define("CLOCK_MENU_L8", "Thursday,");
define("CLOCK_MENU_L9", "Friday,");
define("CLOCK_MENU_L10", "Saturday,");
define("CLOCK_MENU_L11", "Sunday,");
define("CLOCK_MENU_L12", "January");
define("CLOCK_MENU_L13", "February");
define("CLOCK_MENU_L14", "March");
define("CLOCK_MENU_L15", "April");
define("CLOCK_MENU_L16", "May");
define("CLOCK_MENU_L17", "June");
define("CLOCK_MENU_L18", "July");
define("CLOCK_MENU_L19", "August");
define("CLOCK_MENU_L20", "September");
define("CLOCK_MENU_L21", "October");
define("CLOCK_MENU_L22", "November");
define("CLOCK_MENU_L23", "December");
// define("CLOCK_MENU_L24", "");

View File

@@ -1,24 +0,0 @@
<?php
/*
* e107 website system
*
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
//define("CLOCK_AD_L1", "Clock menu configuration saved");
define("CLOCK_AD_L2", "Caption");
//define("CLOCK_AD_L3", "Update Menu Settings");
define("CLOCK_AD_L4", "Clock Menu Config");
define("CLOCK_AD_L5", "AM/PM");
define("CLOCK_AD_L6", "If checked, it will display time with US format (0-12 AM/PM format). Unchecked it will display a 'military' format 0-24 format");
define("CLOCK_AD_L7", "Date Prefix");
define("CLOCK_AD_L8", "If your language requires a short word before the date (e.g. 'le' for French or 'den' for German...), use this field. If not required, leave blank.");
define("CLOCK_AD_L9", "Suffix 1");
define("CLOCK_AD_L10", "Suffix 2");
define("CLOCK_AD_L11", "Suffix 3");
define("CLOCK_AD_L12", "Suffix 4 and more");
define("CLOCK_AD_L13", "If your language requires to display a suffix just after numbers for date, fill these fields with suffix only (Example: 'st' for 1, 'nd' for 2, 'rd' for 3 and 'th' for 4 and more - for English users). If not required leave blank.");