1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Merged upstream changes.

This commit is contained in:
Lóna Lore 2017-01-08 09:32:39 +01:00
commit 3dee2dc977
163 changed files with 4078 additions and 4212 deletions

View File

@ -2220,19 +2220,21 @@ class error_handler
//
global $_E107;
if(isset($_E107['debug']))
if(!empty($_E107['debug']))
{
$this->debug = true;
error_reporting(E_ALL);
return;
}
if(isset($_E107['cli']))
if(!empty($_E107['cli']))
{
error_reporting(E_ALL ^ E_NOTICE);
error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);
return;
}
if ((isset($_SERVER['QUERY_STRING']) && strpos($_SERVER['QUERY_STRING'], 'debug=') !== FALSE) || isset($_COOKIE['e107_debug_level']) && strpos($_SERVER['QUERY_STRING'], 'debug=-') !== TRUE )
if ((isset($_SERVER['QUERY_STRING']) && strpos($_SERVER['QUERY_STRING'], 'debug=') !== false) || isset($_COOKIE['e107_debug_level']) && strpos($_SERVER['QUERY_STRING'], 'debug=-') === false )
{
$this->debug = true;
error_reporting(E_ALL);

View File

@ -62,9 +62,9 @@ if(e_AJAX_REQUEST) // TODO improve security
}
if(varset($_GET['mode']) == 'delete' && vartrue($_POST['itemid']) && ADMIN)
if(varset($_GET['mode']) == 'delete' && !empty($_POST['id']) && ADMIN)
{
$status = e107::getComment()->deleteComment($_POST['itemid']);
$status = e107::getComment()->deleteComment($_POST['id'],$_POST['table'],$_POST['itemid']);
$ret['msg'] = ($status) ? 'Ok' : COMLAN_332;
$ret['error'] = ($status) ? false : true;
echo json_encode($ret);

View File

@ -102,7 +102,7 @@ if(isset($_POST['send-contactus']))
}
// Check subject line.
if(strlen(trim($subject)) < 2)
if(isset($_POST['subject']) && strlen(trim($subject)) < 2)
{
$error .= LANCONTACT_13."\\n";
}

View File

@ -103,12 +103,19 @@ class admin_start
private $allowed_types = null;
private $refresh = false;
private $exit = false;
private $deprecated = array();
function __construct()
{
if(!getperms('0')) // don't display this tuff to regular admins only main admin.
{
return null;
}
// Files that can cause comflicts and problems.
$this->deprecated = array(
e_ADMIN."ad_links.php",
e_PLUGIN."tinymce4/e_meta.php",
@ -127,7 +134,10 @@ class admin_start
e_PLUGIN."forum/forum_update_check.php",
e_PLUGIN."online_extended_menu/online_extended_menu.php",
e_PLUGIN."online_extended_menu/images/user.png",
e_PLUGIN."online_extended_menu/languages/English.php"
e_PLUGIN."online_extended_menu/languages/English.php",
e_PLUGIN."pm/sendpm.sc",
e_PLUGIN."pm/shortcodes/",
e_PLUGIN."social/e_header.php"
);
@ -138,18 +148,55 @@ class admin_start
$this->deleteDeprecated();
}
$this->checkNewInstall();
e107::getDb()->db_Mark_Time('Check Paths');
$this->checkPaths();
e107::getDb()->db_Mark_Time('Check Timezone');
$this->checkTimezone();
e107::getDb()->db_Mark_Time('Check Writable');
$this->checkWritable();
$this->checkHtmlarea();
e107::getDb()->db_Mark_Time('Check Incompatible Plugins');
$this->checkIncompatiblePlugins();
e107::getDb()->db_Mark_Time('Check Filetypes');
$this->checkFileTypes();
e107::getDb()->db_Mark_Time('Check Suspect Files');
$this->checkSuspiciousFiles();
e107::getDb()->db_Mark_Time('Check Deprecated');
$this->checkDeprecated();
$this->checkPasswordEncryption();
e107::getDb()->db_Mark_Time('Check HTMLArea');
$this->checkHtmlarea();
e107::getDb()->db_Mark_Time('Check Htaccess');
$this->checkHtaccess();
e107::getDb()->db_Mark_Time('Check Core Update');
$this->checkCoreUpdate();
if($this->exit === true)
{
return null;
}
e107::getDb()->db_Mark_Time('Check New Install');
$this->checkNewInstall();
e107::getDb()->db_Mark_Time('Check Plugin Update');
$this->checkPluginUpdate();
e107::getDb()->db_Mark_Time('Check Theme Update');
$this->checkThemeUpdate();
e107::getDb()->db_Mark_Time('Check Password Encryption');
$this->checkPasswordEncryption();
if($this->refresh == true)
{
e107::getRedirect()->go(e_SELF);
@ -197,6 +244,125 @@ class admin_start
}
private function checkCoreUpdate()
{
// auto db update
if ('0' != ADMINPERMS)
{
return null;
}
//$sc = e107::getScBatch('admin');
//echo $tp->parseTemplate('{ADMIN_COREUPDATE=alert}',true, $sc);
global $dont_check_update, $e107info;
global $dbupdate, $dbupdatep, $e107cache;
require_once(e_ADMIN.'update_routines.php');
if(update_check() === true)
{
if(e_DEBUG !== true)
{
$this->exit = true;
}
}
}
private function checkPluginUpdate()
{
require_once(e_HANDLER.'e_marketplace.php');
$mp = new e_marketplace(); // autodetect the best method
$versions = $mp->getVersionList('plugin');
$plugins = e107::getPref('plug_installed');
if(empty($plugins))
{
return null;
}
$tp = e107::getParser();
foreach($plugins as $folder=>$version)
{
if(!empty($versions[$folder]['version']) && version_compare( $version, $versions[$folder]['version'], '<'))
{
$link = "<a rel='external' href='".$versions[$folder]['url']."'>".$versions[$folder]['name']."</a>";
$dl = $mp->getDownloadModal('plugin', $versions[$folder]);
$caption = LAN_DOWNLOAD.": ".$versions[$folder]['name']." ".$versions[$folder]['version'];
$lans = array('x'=>$link, 'y'=>LAN_PLUGIN);
$message = $tp->lanVars(LAN_NEWER_VERSION_OF_X, $lans);
$message .= " <a href='".$dl."' class='e-modal' data-modal-caption=\"".$caption."\" title=\"".LAN_DOWNLOAD."\">".$tp->toGlyph('fa-cloud-download')."</a>";
e107::getMessage()->addInfo($message);
e107::getMessage()->addDebug("Local version: ".$version." Remote version: ".$versions[$folder]['version']);
}
}
}
private function checkThemeUpdate()
{
require_once(e_HANDLER.'e_marketplace.php');
$mp = new e_marketplace(); // autodetect the best method
$versions = $mp->getVersionList('theme');
$themes = scandir(e_THEME);
if(empty($themes))
{
return null;
}
$tp = e107::getParser();
$list = e107::getTheme()->getThemeList();
foreach($list as $data)
{
$folder = $data['path'];
$version = $data['version'];
if(!empty($versions[$folder]['version']) && version_compare( $version, $versions[$folder]['version'], '<'))
{
$link = "<a rel='external' href='".$versions[$folder]['url']."'>".$versions[$folder]['name']."</a>";
$lans = array('x'=>$link, 'y'=>LAN_THEME);
$dl = $mp->getDownloadModal('theme', $versions[$folder]);
$caption = LAN_DOWNLOAD.": ".$versions[$folder]['name']." ".$versions[$folder]['version'];
$message = $tp->lanVars(LAN_NEWER_VERSION_OF_X, $lans);
$message .= " <a href='".$dl."' class='e-modal' data-modal-caption=\"".$caption."\" title=\"".LAN_DOWNLOAD."\">".$tp->toGlyph('fa-cloud-download')."</a>";
e107::getMessage()->addInfo($message);
e107::getMessage()->addDebug("Local version: ".$version." Remote version: ".$versions[$folder]['version']);
}
}
}
/**
*
*/
@ -477,15 +643,7 @@ class admin_start
// ---------------------------------------------------------
// auto db update
if ('0' == ADMINPERMS)
{
$sc = e107::getScBatch('admin');
echo $tp->parseTemplate('{ADMIN_COREUPDATE=alert}',true, $sc);
require_once(e_ADMIN.'update_routines.php');
update_check();
}

View File

@ -2,23 +2,12 @@
/*
* e107 website system
*
* Copyright (C) 2008-2012 e107 Inc (e107.org)
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Cron Administration
* Cron Administration - Scheduled Tasks
*
* $URL$
* $Id$
*
*/
/**
*
* @package e107
* @subpackage admin
* @version $Id$
* Admin-related functions for cron (Scheduler) management
*/
require_once('../class2.php');
@ -195,6 +184,8 @@ class cron_admin_ui extends e_admin_ui
$this->cronImportLegacy(); // Import Legacy Cron Tab Settings
}
$this->renderHelp();
}
@ -393,10 +384,10 @@ class cron_admin_ui extends e_admin_ui
$setpwd_message .= "</pre><small>". LAN_CRON_16."</small>";
if(e_DOMAIN && file_exists("/usr/local/cpanel/version"))
{
$setpwd_message .= "<div style='margin-top:10px'><a rel='external' class='btn btn-primary' href='".e_HTTP."cpanel'>Go to cPanel</a></div>";
$setpwd_message .= "<div style='margin-top:10px'><a rel='external' class='btn btn-primary' href='".e_HTTP."cpanel'>".LAN_CRON_60."</a></div>";
}
$setpwd_message .= "<br /><br />".$frm->admin_button('generate_pwd', 1, 'delete', 'Generate new cron password',array('class'=>'btn btn-small'));
$setpwd_message .= "<br /><br />".$frm->admin_button('generate_pwd', 1, 'delete', LAN_CRON_61 ,array('class'=>'btn btn-small'));
$setpwd_message .= $frm->close();
$mes->add($setpwd_message, E_MESSAGE_INFO);
@ -448,7 +439,7 @@ class cron_admin_ui extends e_admin_ui
$obj = new $class_name;
if (method_exists($obj, $method_name))
{
$message = str_replace('[x]', $class_name." : ".$method_name, "Executing config function [b][x][/b]");
$message = str_replace('[x]', $class_name." : ".$method_name, LAN_CRON_62);//Executing config function [b][x][/b]
$mes->add($message, E_MESSAGE_DEBUG);
if ($return == 'boolean')
{
@ -462,13 +453,18 @@ class cron_admin_ui extends e_admin_ui
}
else
{
$message = str_replace('[x]', $method_name."()", "Config function [b][x][/b] NOT found.");
$message = str_replace('[x]', $method_name."()", LAN_CRON_63 );//Config function [b][x][/b] NOT found.
$mes->add($message, E_MESSAGE_DEBUG);
}
}
return FALSE;
}
function renderHelp()
{
return array('caption'=>LAN_HELP, 'text'=>e107::getParser()->toHTML(LAN_CRON_64, true));
}
}
class cron_admin_form_ui extends e_admin_form_ui
@ -575,7 +571,7 @@ class cron_admin_form_ui extends e_admin_form_ui
{
$text = "<div class='btn-group'>";
$text .= $this->renderValue('options',$value,'',$id);
$text .= $this->submit_image('cron_execute['.$id.']', 1, 'execute', 'Execute');
$text .= $this->submit_image('cron_execute['.$id.']', 1, 'execute', LAN_RUN);
$text .= "</div>";
return $text;
}
@ -860,7 +856,7 @@ class cron
function cronExecute($class_func)
{
//TODO LANs
//TO/ DO L/ANs
list($class_name, $method_name) = explode("__", $class_func);
$mes = e107::getMessage();

View File

@ -68,7 +68,9 @@ if(isset($_POST['db_execute']))
if(isset($_POST['exportXmlFile']))
{
if(exportXmlFile($_POST['xml_prefs'],$_POST['xml_tables'],$_POST['package_images']))
if(exportXmlFile($_POST['xml_prefs'],$_POST['xml_tables'],$_POST['xml_plugprefs'], $_POST['package_images'], false))
{
$mes = e107::getMessage();
$mes->add(LAN_SUCCESS, E_MESSAGE_SUCCESS);
@ -192,7 +194,7 @@ class system_tools
if(isset($_POST['delplug']))
{
$this->delete_plugin_entry($_POST['pref_type']);
$this->delete_plugin_entry(); // $_POST['pref_type']
}
if(isset($_POST['upload']))
@ -1057,6 +1059,8 @@ class system_tools
e107::getCache()->clear();
}
return null;
}
private function delete_plugin_entry()
@ -1066,7 +1070,7 @@ class system_tools
$sql = e107::getDb();
$del = array_keys($_POST['delplug']);
if($sql->db_Delete("plugin", "plugin_id='".intval($del[0])."'"))
if($sql->delete("plugin", "plugin_id='".intval($del[0])."'"))
{
$mes->add(LAN_DELETED, E_MESSAGE_SUCCESS);
}
@ -1080,11 +1084,11 @@ class system_tools
/**
* Render Options
* @return none
* @return null
*/
private function render_options()
{
$frm = e107::getForm();
$mes = e107::getMessage();
$text = "
@ -1124,12 +1128,14 @@ class system_tools
";
*/
e107::getRender()->tablerender(DBLAN_10, $mes->render().$text);
return null;
}
/**
* Import XML Form
* @return none
* @return null
*/
private function importForm()
{
@ -1173,11 +1179,12 @@ class system_tools
e107::getRender()->tablerender(DBLAN_10.SEP.DBLAN_59, $mes->render().$text);
return null;
}
/**
* Export XML Dump
* @return none
* @return null
*/
private function exportXmlForm()
{
@ -1202,7 +1209,6 @@ class system_tools
<tbody>
";
//TODO Add support for plugin Prefs.
$pref_types = e107::getConfig()->aliases;
unset($pref_types['core_old'], $pref_types['core_backup']);
@ -1211,17 +1217,58 @@ class system_tools
foreach($pref_types as $key=>$description)
{
$data = e107::getConfig($key)->getPref();
$rows = count($data);
$checked = (vartrue($_POST['xml_prefs'][$key]) == $key) ? 1: 0;
$text .= "<tr>
<td>
".$frm->checkbox("xml_prefs[".$key."]", $key, $checked, array('label'=>LAN_PREFS.": ".$key))."
</td>
<td>&nbsp;</td>
<td class='text-right'>".intval($rows)."</td>
</tr>";
}
// Plugin Preferences ----------------------------
$pluglist = e107::pref('core','plug_installed');
$text .= "</tbody><thead><tr>
<th class='form-inline'>".$frm->checkbox_toggle('check-all-verify', 'xml_plugprefs')." &nbsp;Plugin ".LAN_PREFS."</th>
<th class='right'>".DBLAN_98."</th>
</tr></thead><tbody>";
ksort($pluglist);
foreach($pluglist as $plug=>$ver)
{
$data = e107::getPlugConfig($plug)->getPref();
$key = $plug;
$checked = false;
if(!empty($data))
{
$rows = count($data);
$text .= "<tr>
<td>
".$frm->checkbox("xml_plugprefs[".$key."]",$key, $checked, array('label'=>LAN_PREFS.": ".$key))."
</td>
<td class='text-right'>".$rows."</td>
</tr>";
}
}
$text .= "</tbody>
</table>
<table class='table adminlist'>
@ -1284,14 +1331,40 @@ class system_tools
</form> ";
// display differences between default and core prefs.
/*
$corePrefs = e107::pref('core');
$defaultArray = e107::getXml()->loadXMLfile(e_CORE."xml/default_install.xml", 'advanced');
$defaultPrefs = e107::getXml()->e107ImportPrefs($defaultArray);
$text .= "<table class='table'>";
foreach($defaultPrefs as $k=> $val)
{
if($val == $corePrefs[$k] || substr($k,-5) === '_list' || substr($k,0,9) == 'sitetheme')
{
continue;
}
$text .= "<tr>
<td>".$k."</td>
<td>".print_a($val,true)."<td><td>".print_a($corePrefs[$k],true)."</td>
</tr>";
}
$text .= "</table>";
*/
e107::getRender()->tablerender(DBLAN_10.SEP.DBLAN_102,$mes->render(). $text);
return null;
}
/**
* Import XML Dump
* @return none
* @return null
*/
private function importXmlFile()
{
@ -1306,11 +1379,14 @@ class system_tools
{
e107::getMessage()->addError(DBLAN_104." $table");
}
return null;
}
/**
* Optimize SQL
* @return none
* @param $mySQLdefaultdb
* @return null
*/
private function optimizesql($mySQLdefaultdb)
{
@ -1324,10 +1400,13 @@ class system_tools
$mes->addSuccess(e107::getParser()->lanVars(DBLAN_11, $mySQLdefaultdb));
e107::getRender()->tablerender(DBLAN_10.SEP.DBLAN_7, $mes->render());
return null;
}
/**
* Preferences Editor
* @param string $type
* @return string text for display
*/
private function pref_editor($type='core')
@ -1629,12 +1708,14 @@ function db_adminmenu() //FIXME - has problems when navigation is on the LEFT in
* @param object $debug [optional]
* @return none
*/
function exportXmlFile($prefs,$tables,$package=FALSE,$debug=FALSE)
function exportXmlFile($prefs,$tables=array(),$plugPrefs, $package=FALSE,$debug=FALSE)
{
$xml = e107::getXml();
$tp = e107::getParser();
$mes = e107::getMessage();
$desinationFolder = null;
if(vartrue($package))
{
@ -1652,12 +1733,13 @@ function exportXmlFile($prefs,$tables,$package=FALSE,$debug=FALSE)
{
$message = str_replace('[folder]', $desinationFolder, DBLAN_107);
$mes->add($message, E_MESSAGE_ERROR);
return ;
return false ;
}
}
$mode = ($debug === true) ? "debug" : false;
if($xml->e107Export($prefs,$tables,$debug))
if($xml->e107Export($prefs,$tables,$plugPrefs, $mode))
{
$mes->add(DBLAN_108." ".$desinationFolder."install.xml", E_MESSAGE_SUCCESS);
if(varset($xml->fileConvertLog))
@ -1676,8 +1758,10 @@ function exportXmlFile($prefs,$tables,$package=FALSE,$debug=FALSE)
}
}
}
}
return null;
}
@ -1697,10 +1781,12 @@ function table_list()
$exclude[] = "user_extended_country";
$exclude[] = "plugin";
$coreTables = e107::getDb()->db_TableList('nolan');
$coreTables = e107::getDb()->tables('nolan');
$tables = array_diff($coreTables,$exclude);
$tabs = array();
foreach($tables as $e107tab)
{
$count = e107::getDb()->gen("SELECT * FROM #".$e107tab);

View File

@ -24,183 +24,9 @@ $e_sub_cat = 'database';
require_once ("auth.php");
require_once ("update_routines.php");
//
// Carry out CORE updates
/*
function run_updates($dbupdate)
{
global $mes;
foreach($dbupdate as $func => $rmks)
{
if(function_exists('update_'.$func)) // Legacy Method.
{
$installed = call_user_func("update_".$func);
//?! (LAN_UPDATE == $_POST[$func])
if(varsettrue($_POST['update_core'][$func]) && !$installed)
{
if(function_exists("update_".$func))
{
$message = LAN_UPDATE_7." {$rmks}";
$error = call_user_func("update_".$func, "do");
if($error != '')
{
$mes->add($message, E_MESSAGE_ERROR);
$mes->add($error, E_MESSAGE_ERROR);
}
else $mes->add($message, E_MESSAGE_SUCCESS);
}
}
}
}
}
function run_updates_plugin($func,$check=TRUE) // New for {plugin}_setup.php
{
if(class_exists($func.'_setup'))
{
$class = $func.'_setup';
$setObj = new $class;
if(method_exists($setObj,'upgrade_post'))
{
return $setObj->upgrade_post($check);
}
// print_a($setObj);
// echo "<br />Found: ".$func;
}
}
function show_updates($dbupdate, $what)
{
global $frm;
$mes = e107::getMessage();
$caption = constant('LAN_UPDATE_CAPTION_'.strtoupper($what));
$text = "
<form method='post' action='".e_SELF."'>
<fieldset id='core-e107-update-{$what}'>
<legend>{$caption}</legend>
<table class='table adminlist'>
<colgroup>
<col style='width: 60%' />
<col style='width: 40%' />
</colgroup>
<thead>
<tr>
<th>".LAN_UPDATE_55."</th>
<th class='last'>".LAN_UPDATE_2."</th>
</tr>
</thead>
<tbody>
";
$updates = 0;
// asort($dbupdate);
foreach($dbupdate as $func => $rmks)
{
if(function_exists("update_".$func))
{
$text .= "<tr><td>{$rmks}</td>";
if(call_user_func("update_".$func))
{
$text .= "<td>".LAN_UPDATE_3."</td>";
}
else
{
$updates ++;
$text .= "<td>".$frm->admin_button('update_core['.$func.']', LAN_UPDATE, 'warning', '', "id=e-{$func}")."</td>";
}
$text .= "</tr>\n";
}
if(class_exists($func.'_setup')) // plugin_setup.php
{
$text .= "<tr><td>{$rmks}</td>";
$reason = run_updates_plugin($func,TRUE); // TRUE = Just check if needed.
if(!$reason)
{
$text .= "<td>".LAN_UPDATE_3."</td>";
}
else
{
$updates ++;
$mes->addDebug($reason);
$text .= "<td>".$frm->admin_button('update['.$func.']', LAN_UPDATE, 'warning')."</td>";
}
$text .= "</tr>\n";
}
}
$text .= "
</tbody>
</table>
</fieldset>
</form>
";
echo $text;
return $updates; // Number of updates to do
}
*/
new e107Update($dbupdate);
require_once ("footer.php");
/*
if(varset($_POST['update_core']) && is_array($_POST['update_core']))
{
$message = run_updates($dbupdate);
}
if(varset($_POST['update']) && is_array($_POST['update'])) // Do plugin updates
{
$func = key($_POST['update']);
run_updates_plugin($func,FALSE);
}
$total_updates = 0;
ob_start();
if(isset($dbupdatep))
{ // Show plugin updates done
$total_updates += show_updates($dbupdatep, 'plugin');
}
// Show core updates done
$total_updates += show_updates($dbupdate, 'core');
$text = ob_get_contents();
ob_end_clean();
$e107->ns->tablerender(LAN_UPDATE_56, $mes->render().$text);
if($total_updates == 0)
{ // No updates needed - clear the cache to be sure
$e107cache->set_sys("nq_admin_updatecheck", time().', 1, '.$e107info['e107_version'], TRUE);
}
*
*
*/
?>

View File

@ -2,7 +2,7 @@
/*
* e107 website system
*
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
@ -1250,7 +1250,7 @@ class file_inspector {
$data .= "| e107 website system\n";
$data .= "|\n";
$data .= "| Copyright (C) 2001-2002 Steve Dunstan (jalist@e107.org)\n";
$data .= "| Copyright (C) 2008-2010 e107 Inc (e107.org)\n";
$data .= "| Copyright (C) 2008-2016 e107 Inc (e107.org)\n";
$data .= "|\n";
$data .= "| Released under the terms and conditions of the\n";
$data .= "| GNU General Public License (http://gnu.org).\n";
@ -1356,15 +1356,15 @@ class file_inspector {
$gb = 1024 * $mb;
$tb = 1024 * $gb;
if ($size < $kb) {
return $size." b";
return $size." ".CORE_LAN_B;
} else if($size < $mb) {
return round($size/$kb)." kB";
return round($size/$kb)." ".CORE_LAN_KB;
} else if($size < $gb) {
return round($size/$mb, $dec)." MB";
return round($size/$mb, $dec)." ".CORE_LAN_MB;
} else if($size < $tb) {
return round($size/$gb, $dec)." GB";
return round($size/$gb, $dec)." ".CORE_LAN_GB;
} else {
return round($size/$tb, $dec)." TB";
return round($size/$tb, $dec)." ".CORE_LAN_TB;
}
}

View File

@ -25,33 +25,42 @@ if(!defined('USER_AREA'))
{
define("USER_AREA", FALSE);
}
e107::getDb()->db_Mark_Time('(Header Top)');
// Admin template
if (defined('THEME') && file_exists(THEME.'admin_template.php'))
{
require_once (THEME.'admin_template.php');
}
else
{
require_once (e_CORE.'templates/admin_template.php');
}
if(!deftrue('e_MENUMANAGER_ACTIVE'))
{
if (defined('THEME') && file_exists(THEME.'admin_template.php')) // Admin template
{
require_once (THEME.'admin_template.php');
}
else
{
require_once (e_CORE.'templates/admin_template.php');
}
// FIXME - remove ASAP
if (isset($pref['del_unv']) && $pref['del_unv'] && $pref['user_reg_veri'] != 2)
{
$threshold = (time() - ($pref['del_unv'] * 60));
e107::getDb()->delete("user", "user_ban = 2 AND user_join < '{$threshold}' ");
}
}
function loadJSAddons()
{
if(e_PAGE == 'menus.php' && vartrue($_GET['configure'])) // Quick fix for Menu Manager inactive drop-down problem.
if(deftrue('e_MENUMANAGER_ACTIVE'))
{
return;
}
// e107::js('core', 'bootstrap/js/bootstrap-modal.js', 'jquery', 2); // Special Version see: https://github.com/twitter/bootstrap/pull/4224
e107::css('core', 'bootstrap-select/bootstrap-select.min.css', 'jquery');
e107::js('core', 'bootstrap-select/bootstrap-select.min.js', 'jquery', 2);
@ -99,7 +108,6 @@ loadJSAddons();
// e107::js("core", "core/admin.js","prototype",3); // Load all default functions.
@ -138,12 +146,6 @@ loadJSAddons();
// A: Admin Defines and Links
//
// FIXME - remove ASAP
if (isset($pref['del_unv']) && $pref['del_unv'] && $pref['user_reg_veri'] != 2)
{
$threshold = (time() - ($pref['del_unv'] * 60));
e107::getDb()->db_Delete("user", "user_ban = 2 AND user_join < '{$threshold}' ");
}
//
// B: Send HTTP headers (these come before ANY html)
@ -156,35 +158,13 @@ if (isset($pref['del_unv']) && $pref['del_unv'] && $pref['user_reg_veri'] != 2)
//
// C: Send start of HTML
//
// HTML 5 default.
//if(!defined('XHTML4'))
{
echo "<!doctype html>\n";
echo "<html".(defined("TEXTDIRECTION") ? " dir='".TEXTDIRECTION."'" : "").(defined("CORE_LC") ? " lang=\"".CORE_LC."\"" : "").">\n";
echo "<head>\n";
echo "<meta charset='utf-8' />\n";
}
/*
else // XHTML
{
echo(defined("STANDARDS_MODE") ? "" : "<?xml version='1.0' encoding='utf-8' "."?".">\n")."<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n";
echo "<html xmlns='http://www.w3.org/1999/xhtml'".(defined("TEXTDIRECTION") ? " dir='".TEXTDIRECTION."'" : "").(defined("CORE_LC") ? " xml:lang=\"".CORE_LC."\"" : "").">\n";
echo "
<head>
<meta http-equiv='content-style-type' content='text/css' />\n";
echo(defined("CORE_LC")) ? "<meta http-equiv='content-language' content='".CORE_LC."' />\n" : "";
echo "<meta http-equiv='content-type' content='text/html; charset=utf-8' />\n";
}
*
*/
echo "<!doctype html>\n";
echo "<html".(defined("TEXTDIRECTION") ? " dir='".TEXTDIRECTION."'" : "").(defined("CORE_LC") ? " lang=\"".CORE_LC."\"" : "").">\n";
echo "<head>\n";
echo "<meta charset='utf-8' />\n";
echo "<meta name=\"viewport\" content=\"width=device-width, initial-scale=0.8, maximum-scale=1\" />\n"; // Works better for iOS but still has some issues.
// echo (defined("VIEWPORT")) ? "<meta name=\"viewport\" content=\"".VIEWPORT."\" />\n" : "";
echo "<title>".(defined("e_PAGETITLE") ? e_PAGETITLE." - " : (defined("PAGE_NAME") ? PAGE_NAME." - " : "")).LAN_HEADER_04." :: ".SITENAME."</title>\n";
// print_a(get_included_files());
//
// D: Send CSS
//
@ -198,8 +178,10 @@ if (!isset($no_core_css) || !$no_core_css)
$e_js->otherCSS('{e_WEB_CSS}e107.css');
}
// Register Plugin specific CSS
// DEPRECATED, use $e_js->pluginCSS('myplug', 'style/myplug.css'[, $media = 'all|screen|...']);
// Register Plugin specific CSS (BC)
if (isset($eplug_css) && $eplug_css)
{
e107::getMessage()->addDebug('Deprecated $eplug_css method detected. Use e107::css() in an e_header.php file instead.'.print_a($eplug_css,true));
@ -211,55 +193,60 @@ if (isset($eplug_css) && $eplug_css)
foreach($eplug_css as $kcss)
{
// echo ($kcss[0] == "<") ? $kcss : "<link rel='stylesheet' href='{$kcss}' type='text/css' />\n";
$e_js->otherCSS($kcss);
}
}
if(e107::getPref('admincss') == "admin_dark.css" && !vartrue($_GET['configure']) && e107::getPref('admintheme')!='bootstrap3')
{
$e_js->coreCSS('bootstrap/css/darkstrap.css');
}
//NEW - Iframe mod
if (!deftrue('e_IFRAME') && isset($pref['admincss']) && $pref['admincss'] && !vartrue($_GET['configure']))
{
$css_file = file_exists(THEME.'admin_'.$pref['admincss']) ? 'admin_'.$pref['admincss'] : $pref['admincss'];
//echo "<link rel='stylesheet' href='".$css_file."' type='text/css' />\n";
$e_js->themeCSS($css_file);
}
elseif (isset($pref['themecss']) && $pref['themecss'])
{
$css_file = (file_exists(THEME.'admin_'.$pref['themecss']) && !vartrue($_GET['configure'])) ? 'admin_'.$pref['themecss'] : $pref['themecss'];
//echo "<link rel='stylesheet' href='".$css_file."' type='text/css' />\n";
// $e_js->themeCSS($css_file); // Test with superhero.css for frontend bootstrap and 'dark' for backend bootstrap.
}
else
{
$css_file = (file_exists(THEME.'admin_style.css') && !vartrue($_GET['configure'])) ? 'admin_style.css' : 'style.css';
//echo "<link rel='stylesheet' href='".$css_file."' type='text/css' />\n";
$e_js->themeCSS($css_file);
}
if(e_PAGE == 'menus.php' && vartrue($_GET['configure'])) // Quick fix for Menu Manager inactive drop-down problem.
if(deftrue('e_MENUMANAGER_ACTIVE')) // load frontend style.css
{
$css_file = $pref['themecss'];
$e_js->themeCSS($css_file); // Test with superhero.css for frontend bootstrap and 'dark' for backend bootstrap.
// return;
}
else
else // backend css.
{
// $e_js->coreCSS('font-awesome/css/font-awesome.min.css');
$custom = e107::getThemeGlyphs();
foreach($custom as $val)
{
$e_js->otherCSS($val['path']);
}
//NEW - Iframe mod
if(!deftrue('e_IFRAME') && !empty($pref['admincss']))
{
$css_file = file_exists(THEME.'admin_'.$pref['admincss']) ? 'admin_'.$pref['admincss'] : $pref['admincss'];
//echo "<link rel='stylesheet' href='".$css_file."' type='text/css' />\n";
$e_js->themeCSS($css_file);
}
elseif(isset($pref['themecss']) && $pref['themecss'])
{
$css_file = (file_exists(THEME.'admin_'.$pref['themecss'])) ? 'admin_'.$pref['themecss'] : $pref['themecss'];
//echo "<link rel='stylesheet' href='".$css_file."' type='text/css' />\n";
// $e_js->themeCSS($css_file); // Test with superhero.css for frontend bootstrap and 'dark' for backend bootstrap.
}
else
{
$css_file = (file_exists(THEME.'admin_style.css')) ? 'admin_style.css' : 'style.css';
//echo "<link rel='stylesheet' href='".$css_file."' type='text/css' />\n";
$e_js->themeCSS($css_file);
}
}
// FIXME: TEXTDIRECTION compatibility CSS (marj?)
// TODO: probably better to externalise along with some other things above
// possibility to overwrite some CSS definition according to TEXTDIRECTION
@ -267,19 +254,17 @@ else
// see _blank theme for examples
if(defined('TEXTDIRECTION') && file_exists(THEME.'/'.strtolower(TEXTDIRECTION).'.css'))
{
//echo '
//<link rel="stylesheet" href="'.THEME_ABS.strtolower(TEXTDIRECTION).'.css" type="text/css" media="all" />';
$e_js->themeCSS(strtolower(TEXTDIRECTION).'.css');
}
// --- Load plugin Header files before all CSS nad JS zones. --------
if (vartrue($pref['e_header_list']) && is_array($pref['e_header_list']))
if (!empty($pref['e_header_list']) && is_array($pref['e_header_list']))
{
foreach($pref['e_header_list'] as $val)
{
// no checks fore existing file - performance
e107_include(e_PLUGIN.$val."/e_header.php");
e107_include_once(e_PLUGIN.$val."/e_header.php");
}
}
unset($e_headers);
@ -355,11 +340,14 @@ if (!empty($eplug_js))
}
//FIXME - theme.js/user.js should be registered/rendered through e_jsmanager
// BC Fix.
if (file_exists(THEME.'theme.js'))
{
e107::js('theme','theme.js',null,3);
// echo "<script type='text/javascript' src='".THEME_ABS."theme.js'></script>\n";
}
if (is_readable(e_FILE.'user.js') && filesize(e_FILE.'user.js'))
{
echo "<script type='text/javascript' src='".e_FILE_ABS."user.js'></script>\n";
@ -404,8 +392,7 @@ if (!USER && ($pref['user_tracking'] == "session") && varset($pref['password_CHA
}
//XXX - do we still need it? Now we have better way of doing this - admin tools (see below)
if (function_exists('headerjs'))
if (function_exists('headerjs'))// required for BC.
{
echo headerjs();
}
@ -458,6 +445,12 @@ if (defined('THEME_ONLOAD')) $js_body_onload[] = THEME_ONLOAD;
$body_onload='';
if (count($js_body_onload)) $body_onload = " onload=\"".implode(" ",$js_body_onload)."\"";
if(deftrue('e_MENUMANAGER_ACTIVE'))
{
$body_onload .= " id=\"layout-".e107::getForm()->name2id(THEME_LAYOUT)."\" ";
}
//
// J: Send end of <head> and start of <body>
//

View File

@ -38,7 +38,7 @@ if($_GET['action'] == 'youtube' )
}
// TODO use library manager
e107::js('core', 'plupload/plupload.full.js', 'jquery', 2);
e107::css('core', 'plupload/jquery.plupload.queue/css/jquery.plupload.queue.css', 'jquery');
e107::js('core', 'plupload/jquery.plupload.queue/jquery.plupload.queue.min.js', 'jquery', 2);
@ -272,7 +272,7 @@ class media_cat_ui extends e_admin_ui
// XXX temporary disable when there is no owners, discuss
if(!$new_data['media_cat_owner'])
{
e107::getMessage()->addError(IMALAN_173); // FIXME LAN
e107::getMessage()->addError(IMALAN_173);
return false;
}
//$replace = array("_"," ","'",'"',"."); //FIXME Improve
@ -1406,7 +1406,7 @@ class media_admin_ui extends e_admin_ui
);
//TODO FIXME Upgrade to bs3 when Bootstrap3 Admin is ready.
$items = array();
$bs2 = e107::getMedia()->getGlyphs('bs3','glyphicon-');
@ -1426,6 +1426,7 @@ class media_admin_ui extends e_admin_ui
$fa4 = e107::getMedia()->getGlyphs('fa4');
foreach($fa4 as $val)
{
$items[] = array(
@ -1439,19 +1440,65 @@ class media_admin_ui extends e_admin_ui
}
$custom = e107::getThemeGlyphs();
if(!empty($custom))
{
foreach($custom as $glyphConfig)
{
$tmp = e107::getMedia()->getGlyphs($glyphConfig,$glyphConfig['prefix']);
if(!empty($tmp))
{
foreach($tmp as $val)
{
$items[] = array(
'previewUrl' => $val,
'saveValue' => $val.'.glyph',
'thumbUrl' => $val,
'title' => $val,
'slideCaption' => ucfirst($glyphConfig['name']),
'slideCategory' => $glyphConfig['name']
);
}
}
}
}
if(vartrue($parm['search']))
{
$filtered = array();
foreach($items as $v)
if(!empty($items))
{
if(strpos($v['title'], $parm['search'])!==false)
foreach($items as $v)
{
$v['slideCaption'] = '';
$filtered[] = $v;
if(strpos($v['title'], $parm['search'])!==false)
{
$v['slideCaption'] = '';
$filtered[] = $v;
}
}
}
$items = $filtered;
}
@ -1671,13 +1718,13 @@ class media_admin_ui extends e_admin_ui
list($fileName,$bla) = explode("?", $fileName);
}
$uploadCaption = !empty($_POST['upload_caption']) ? $tp->filter($_POST['upload_caption'],'str') : '';
$fileName = str_replace(array('%','+'),'',$fileName);
// remove script extensions.
if(substr($fileName,-4) == ".php" || substr($fileName,-4) == ".htm" || substr($fileName,-5) == ".html" || substr($fileName,-4) == ".asp")
{
$fileName = empty($_POST['upload_caption']) ? str_replace(array(".php",".html",".asp",".htm"),'',$fileName)."_".time() : eHelper::dasherize(strtolower($_POST['upload_caption']));
$fileName = empty($uploadCaption) ? str_replace(array(".php",".html",".asp",".htm"),'',$fileName)."_".time() : eHelper::dasherize(strtolower($uploadCaption));
}
if(!$fl->getRemoteFile($tp->filter($_POST['upload_url'], 'file'), $fileName, 'import'))
@ -1686,8 +1733,8 @@ class media_admin_ui extends e_admin_ui
}
elseif($import == true)
{
$data = array('media_caption' => e107::getParser()->filter($_POST['upload_caption'],'str'));
$result = e107::getMedia()->importFile($fileName,$cat, null, $data);
$data = array('media_caption' => $uploadCaption);
e107::getMedia()->importFile($fileName,$cat, null, $data);
}
}
}
@ -2391,7 +2438,7 @@ class media_admin_ui extends e_admin_ui
$mes->add(IMALAN_113." <b> ".e_IMPORT."</b>", E_MESSAGE_INFO);
}
if(!count($files))
if(!count($files) )
{
if(!vartrue($_POST['batch_import_selected']))
{
@ -2403,6 +2450,7 @@ class media_admin_ui extends e_admin_ui
return;
}
$text = "
<form method='post' action='".e_SELF."?".e_QUERY."' id='batch_import'>
<fieldset id='core-mediamanager-batch'>
@ -2431,8 +2479,16 @@ class media_admin_ui extends e_admin_ui
<tbody>";
// $c = 0;
foreach($files as $f)
{
if(empty($f))
{
e107::getMessage()->addWarning("0 byte file found in: ".e_IMPORT."<br />Please remove before proceeding.");
////rename(e_IMPORT.$f['path'].$f['fname'],e_IMPOT.$f['path'].$f['fname']."-bad");
continue;
}
$default = $this->getFileXml($f['fname']);
$f = $fl->cleanFileName($f,true);
@ -2576,6 +2632,8 @@ class media_admin_ui extends e_admin_ui
function batchDelete()
{
$tp = e107::getParser();
foreach($_POST['batch_selected'] as $key=>$file)
{
if(trim($file) == '')
@ -2584,7 +2642,7 @@ class media_admin_ui extends e_admin_ui
}
// $oldpath = e_MEDIA."temp/".$file;
$oldpath = e_IMPORT.e107::getParser()->filter($file, 'file');
$oldpath = e_IMPORT . $tp->filter($file, 'file');
if(file_exists($oldpath))
{
unlink($oldpath);
@ -2890,14 +2948,18 @@ if (isset($_POST['submit_avdelete_multi']))
$avList = array();
$tmp = array();
$uids = array();
$tp = e107::getParser();
$sql = e107::getDb();
//Sanitize
$_POST['multiaction'] = $tp->filter($_POST['multiaction'], 'int');
$multiaction = $tp->filter($_POST['multiaction'], 'int');
//sql queries significant reduced
if(!empty($_POST['multiaction']) && $sql->db_Select("user", 'user_id, user_name, user_image', "user_id IN (".implode(',', $_POST['multiaction']).")"))
if(!empty($multiaction) && $sql->db_Select("user", 'user_id, user_name, user_image', "user_id IN (".implode(',', $multiaction).")"))
{
$search_users = $sql->db_getList('ALL', FALSE, FALSE, 'user_id');
foreach($_POST['multiaction'] as $uid)
foreach($multiaction as $uid)
{
if (vartrue($search_users[$uid]))
{

View File

@ -2,14 +2,12 @@
/*
* e107 website system
*
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Info panel admin view
*
* $URL$
* $Id$
*/
if (!defined('e107_INIT'))
@ -160,7 +158,6 @@ class adminstyle_infopanel
';
*/
//TODO LANs throughout.
$user_pref = $this->getUserPref();
@ -624,7 +621,7 @@ class adminstyle_infopanel
function render_infopanel_options($render = false) //TODO LAN
function render_infopanel_options($render = false)
{
$frm = e107::getForm();
$mes = e107::getMessage();
@ -771,26 +768,33 @@ class adminstyle_infopanel
{
$data = array();
$data['labels'] = array("January","February","March","April","May","June","July");
$months = e107::getDate()->terms('month');
$data['labels'] = array($months[0], //"January",
$months[1], //"February",
$months[2], //"March",
$months[3], //"April",
$months[4], //"May",
$months[5], //"June",
$months[6] //"July"
);
$data['datasets'][] = array(
'fillColor' => "rgba(220,220,220,0.5)",
'strokeColor' => "rgba(220,220,220,1)",
'pointColor ' => "rgba(220,220,220,1)",
'pointStrokeColor' => "#fff",
'data' => array(65,59,90,81,56,55,40),
'title' => "Visits"
'fillColor' => "rgba(220,220,220,0.5)",
'strokeColor' => "rgba(220,220,220,1)",
'pointColor ' => "rgba(220,220,220,1)",
'pointStrokeColor' => "#fff",
'data' => array(65,59,90,81,56,55,40),
'title' => ADLAN_168// "Visits"
);
$data['datasets'][] = array(
'fillColor' => "rgba(151,187,205,0.5)",
'strokeColor' => "rgba(151,187,205,1)",
'pointColor ' => "rgba(151,187,205,1)",
'pointStrokeColor' => "#fff",
'data' => array(28,48,40,19,96,27,100),
'title' => "Unique Visits"
'fillColor' => "rgba(151,187,205,0.5)",
'strokeColor' => "rgba(151,187,205,1)",
'pointColor ' => "rgba(151,187,205,1)",
'pointStrokeColor' => "#fff",
'data' => array(28,48,40,19,96,27,100),
'title' => ADLAN_169 //"Unique Visits"
);
return $data;
@ -955,21 +959,21 @@ class adminstyle_infopanel
if($type == 'demo')
{
$text .= "<div class='center'><small>These stats are for demonstration purposes only. <a class='btn btn-xs btn-mini' href='".e_ADMIN."plugin.php?avail'>Install Site Stats Plugin</a></small></div>";
$text .= "<div class='center'><small>".ADLAN_170."<a class='btn btn-xs btn-mini' href='".e_ADMIN."plugin.php?avail'>".ADLAN_171."</a></small></div>";
}
else
{
$text .= "<div class='center'><small>
<span style='color:rgba(220,220,220,0.5)'>&diams;</span> Visitors &nbsp;&nbsp;
<span style='color:rgba(151,187,205,1)'>&diams;</span> Unique Visitors
<span style='color:rgba(220,220,220,0.5)'>&diams;</span>".ADLAN_168."&nbsp;&nbsp;
<span style='color:rgba(151,187,205,1)'>&diams;</span>".ADLAN_169."
</small></div>";
}
return $text;
}
}
?>

View File

@ -1,9 +1,14 @@
<?php
/**
* @file
* Default layout for "flexpanel" admin dashboard style.
*/
/*
+ ----------------------------------------------------------------------------+
|
| e107 website system
| Copyright (C) 2008-2016 e107 Inc (e107.org)
| Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
| Default layout for "flexpanel" admin dashboard style.
+ ----------------------------------------------------------------------------+
*/
$FLEXPANEL_LAYOUT = '
<div class="row">
@ -14,7 +19,7 @@ $FLEXPANEL_LAYOUT = '
</div>
<div class="col-md-9 col-lg-10 admin-right-panel">
<div class="sidebar-toggle">
<a href="#" title="Toggle Sidebar" data-toggle-sidebar="true">&nbsp;</a>
<a href="#" title="'.ADLAN_185.'" data-toggle-sidebar="true">&nbsp;</a>
</div>
<div>

View File

@ -1,9 +1,15 @@
<?php
/*
+ ----------------------------------------------------------------------------+
|
| e107 website system
| Copyright (C) 2008-2016 e107 Inc (e107.org)
| Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
| Layout for "flexpanel" admin dashboard style.
+ ----------------------------------------------------------------------------+
*/
/**
* @file
* Layout for "flexpanel" admin dashboard style.
*/
$FLEXPANEL_LAYOUT = '
<div class="row">
@ -14,7 +20,7 @@ $FLEXPANEL_LAYOUT = '
</div>
<div class="col-md-9 col-lg-9 admin-right-panel">
<div class="sidebar-toggle">
<a href="#" title="Toggle Sidebar" data-toggle-sidebar="true">&nbsp;</a>
<a href="#" title="'.ADLAN_185.'" data-toggle-sidebar="true">&nbsp;</a>
</div>
<div>

View File

@ -25,46 +25,127 @@ if(isset($_GET['configure']))
@ini_set('display_errors', 0);
error_reporting(0);
define('e_MENUMANAGER_ACTIVE', true);
}
else
{
define('e_ADMIN_AREA', true);
define('e_MENUMANAGER_ACTIVE', false);
}
require_once("../class2.php");
if(e_MENUMANAGER_ACTIVE === false )
{
if(e_DEBUG_MENUMANAGER === true)
{
e107::css('inline', '
body { overflow:hidden }
');
}
else
{
e107::js('footer-inline',"
$('#menu_iframe').attr('scrolling','no');
$('#menu_iframe').load(function() {
// $('#menu_iframe').bind('load', function() {
var height = this.contentWindow.document.body.offsetHeight + 400 + 'px';
// $(this).css('overflow-y','visible');
$(this).css('height',height);
// alert(this.style.height);
});
");
}
e107::css('inline',"
.menu-manager-items { padding-right:15px}
.menu-manager-items div.item { padding:5px; margin:5px 0; border:1px solid rgba(255,255,255,0.3); border-radius:3px; cursor: move }
.menu-manager-sticky {
position: fixed;
padding-left: 15px;
padding-right: 15px;
left: 0;
top: 60px;
z-index: 100;
border-top: 0;
-moz-transition: fadeIn .4s;
-o-transition: fadeIn .4s;
-webkit-transition: fadeIn .4s;
transition: fadeIn .4s;
}
iframe#menu_iframe { overflow-x:hidden; width: 100%; height: 90vh; border-width: 3px; padding:0 }
.menu-selector ul li {
background-color: rgba(255,255,255,0.1);
padding: 5px 30px;
padding-right:2px;
margin-bottom:2px;
}
.menu-selector ul li:nth-child(odd){ background-color:rgba(0,0,0,0.2) }
.menu-selector { height:330px; display:block; padding-bottom:50px; overflow-y:scroll; margin-bottom:10px }
.menu-selector input:checked + span { color: white; }
@media all and (min-height: 1000px) {
.menu-selector { height:550px }
}
@media all and (max-height: 800px) {
.menu-selector { height:250px }
iframe#menu_iframe { height: 87vh }
.menu-selector ul li { font-size: 0.8em }
}
ul.dropdown-menu.e-mm-selector { padding: 10px; margin-top: -2px; margin-right:-2px; }
");
}
if (!getperms("2"))
{
e107::redirect('admin');
exit;
}
define('e_DEBUG', false);
e107::coreLan('menus', true);
e107::coreLan('admin', true);
e107::css('inline',"
.menu-manager-items { padding-right:15px}
.menu-manager-items div.item { padding:5px; margin:5px 0; border:1px solid rgba(255,255,255,0.3); border-radius:3px; cursor: move }
.menu-manager-sticky {
position: fixed;
padding-left: 15px;
padding-right: 15px;
left: 0;
top: 60px;
z-index: 100;
border-top: 0;
-moz-transition: fadeIn .4s;
-o-transition: fadeIn .4s;
-webkit-transition: fadeIn .4s;
transition: fadeIn .4s;
}
");
if(strpos(e_QUERY, 'configure') !== FALSE || vartrue($_GET['enc']))
if(e_MENUMANAGER_ACTIVE === true || vartrue($_GET['enc']))
{
@ -233,7 +314,20 @@ TEMPL;
.ui-sortable-placeholder { border: 1px dotted black; visibility: visible !important; height: 50px !important; }
.ui-sortable-placeholder * { visibility: hidden; }
[class^='icon-'], [class*=' icon-'] {
i.S16 {
background: url(".e_THEME."bootstrap3/images/adminicons_16.png) no-repeat top left;
display:inline-block; width:17px; height:16px;
*margin-right: .3em;
line-height: 14px;
vertical-align: text-top;
}
i.e-search-16 { background-position: -1344px 0; width: 16px; height: 16px; }
i.e-delete-16 { background-position: -525px 0; width: 16px; height: 16px; }
i.e-configure-16 { background-position: -378px 0; width: 16px; height: 16px; }
i.e-edit-16 { background-position: -609px 0; width: 16px; height: 16px; }
.e-mm-icon-search {
display: inline-block;
width: 14px;
height: 14px;
@ -245,13 +339,15 @@ TEMPL;
background-repeat: no-repeat;
}
.icon-search {
.e-mm-icon-search {
background-position: -48px 0;
}
.icon-align-justify {
/*
.e-mm-icon-align-justify {
background-position: -336px -48px;
}
*/
/* A little bit of bootstrap styling - loading /bootstrap.css could break some themes */
@ -333,11 +429,10 @@ TEMPL;
.menuOptions > select { max-width:100% }
.menu-options-buttons { }
.menu-options-buttons { display:block; text-align:right; }
select.menu-btn { text-align:left; display:block; width:100%; margin-left:3px }
#menu-manage-actions { width:50%; vertical-align:top; text-align:center; padding:15px }
select.menu-btn { text-align:left }
label { font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; color:black; line-height:14px }
label.input { margin-right:10px; }
@ -382,7 +477,7 @@ TEMPL;
color: #2F2F2F;
font-size: 13px;
font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif;
}
}
.menu-panel-header
{
@ -415,7 +510,7 @@ TEMPL;
.sortable li { border-radius: 4px }
.sortable li:hover { background-color: silver; box-shadow:3px 3px 3px silver }
.regularMenu { cursor:move; border-bottom:1px dotted silver; margin-bottom:6px; padding-left:3px; padding-right:3px; padding-top:10px; padding-bottom:10px;background-color: #E0EBF1; border-radius: 5px; }
.regularMenu { border-bottom:1px dotted silver; margin-bottom:6px; padding-left:3px; padding-right:3px; padding-top:10px; padding-bottom:10px;background-color: #E0EBF1; border-radius: 5px; }
.regularMenu span {padding:3px; font-weight:bold; color:#2F2F2F;text-align:left; }
.ui-draggable { background-color: rgb(245, 245, 245); min-width:100px;}
@ -425,8 +520,8 @@ TEMPL;
",'jquery');
e107::js('footer',"http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js");
e107::js('url', "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/jquery-ui.css");
// e107::js('footer',"http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js");
// e107::css('url', "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/jquery-ui.css");
e107::js('footer-inline','
$(function()
@ -453,7 +548,7 @@ TEMPL;
/*
$(".sortable").sortable({
connectWith: $("#area-1,#area-2,#area-3,#area-4,#area-5"),
@ -469,12 +564,14 @@ TEMPL;
});
/*
$( ".draggable", window.top.document).click(function()
{
alert("hi there");
});*/
});
// http://jsfiddle.net/DT764/2/
@ -498,7 +595,7 @@ TEMPL;
}
});
*/
// $( "ul, li", window.top.document ).disableSelection();
@ -554,7 +651,13 @@ else
$(window).scroll(function() { // and run it again every time you scroll
stickyNav();
});
});
});
@ -575,7 +678,7 @@ else
/*
if($_SERVER['E_DEV_MENU'] == 'true')
{
if(isset($_GET['configure']) || isset($_GET['iframe']))
@ -589,21 +692,35 @@ if($_SERVER['E_DEV_MENU'] == 'true')
require_once("auth.php");
require_once("footer.php");
exit;
}
}*/
// if($_SERVER['E_DEV_MENU'] == 'true')
//{
function e_help()
{
if(e_DEBUG === false)
if(e_DEBUG_MENUMANAGER !== true)
{
return null;
}
return e_menu_layout::menuSelector();
$p = e107::getPref('e_menu_list'); // new storage for xxxxx_menu.php list.
$sql = e107::getDb();
$text = '
<ul class="nav nav-tabs">
@ -667,10 +784,284 @@ if($_SERVER['E_DEV_MENU'] == 'true')
</div>";
return array('caption'=>'DragNDrop Items','text'=>$text);
return array('caption'=>MENLAN_57,'text'=>$text);
}
//}
// new v2.1.4
class e_menu_layout
{
function __construct()
{
}
static function getLayouts($theme=null)
{
if(empty($theme))
{
$theme = e107::pref('core','sitetheme');
}
$HEADER = null;
$FOOTER = null;
$LAYOUT = null;
$CUSTOMHEADER = null;
$CUSTOMFOOTER = null;
$file = e_THEME.$theme."/theme.php";
if(!is_readable($file))
{
return false;
}
e107::set('css_enabled',false);
e107::set('js_enabled',false);
require($file);
e107::set('css_enabled',true);
e107::set('js_enabled',true);
$head = array();
$foot = array();
if(isset($LAYOUT) && is_array($LAYOUT)) // $LAYOUT is a combined $HEADER,$FOOTER.
{
foreach($LAYOUT as $key=>$template)
{
if($key == '_header_' || $key == '_footer_' || $key == '_modal_')
{
continue;
}
if(strpos($template,'{---}') !==false)
{
list($hd,$ft) = explode("{---}",$template);
$head[$key] = isset($LAYOUT['_header_']) ? $LAYOUT['_header_'] . $hd : $hd;
$foot[$key] = isset($LAYOUT['_footer_']) ? $ft . $LAYOUT['_footer_'] : $ft ;
}
else
{
e107::getMessage()->addDebug('Missing "{---}" in $LAYOUT["'.$key.'"] ');
}
}
unset($hd,$ft);
}
if(is_string($CUSTOMHEADER))
{
$head['legacyCustom'] = $CUSTOMHEADER;
}
elseif(is_array($CUSTOMHEADER))
{
foreach($CUSTOMHEADER as $k=>$v)
{
$head[$k] = $v;
}
}
if(is_string($HEADER))
{
$head['legacyDefault'] = $HEADER;
}
elseif(is_array($HEADER))
{
foreach($HEADER as $k=>$v)
{
$head[$k] = $v;
}
}
if(is_string($CUSTOMFOOTER))
{
$foot['legacyCustom'] = $CUSTOMFOOTER;
}
elseif(is_array($CUSTOMFOOTER))
{
foreach($CUSTOMFOOTER as $k=>$v)
{
$foot[$k] = $v;
}
}
if(is_string($FOOTER))
{
$foot['legacyDefault'] = $FOOTER;
}
elseif(is_array($FOOTER))
{
foreach($FOOTER as $k=>$v)
{
$foot[$k] = $v;
}
}
$layout = array();
foreach($head as $k=>$v)
{
$template = $head[$k]."\n{---}".$foot[$k];
$layout['templates'][$k] = $template;
$layout['menus'][$k] = self::countMenus($template);
}
return $layout;
}
private static function countMenus($template)
{
if(preg_match_all("/\{MENU=([\d]{1,3})(:[\w\d]*)?\}/", $template, $matches))
{
sort($matches[1]);
return $matches[1];
}
return array();
}
static function menuSelector()
{
// $p = e107::getPref('e_menu_list'); // new storage for xxxxx_menu.php list.
$sql = e107::getDb();
$frm = e107::getForm();
$done = array();
$pageMenu = array();
$pluginMenu = array();
$sql->select("menus", "menu_name, menu_id, menu_pages, menu_path", "1 ORDER BY menu_name ASC");
while ($row = $sql->fetch())
{
if(in_array($row['menu_name'],$done))
{
continue;
}
$done[] = $row['menu_name'];
if(is_numeric($row['menu_path']))
{
$pageMenu[] = $row;
}
else
{
$pluginMenu[] = $row;
}
}
$tab1 = '<div class="menu-selector"><ul class="list-unstyled">';
foreach($pageMenu as $row)
{
$menuInf = (!is_numeric($row['menu_path'])) ? ' ('.substr($row['menu_path'],0,-1).')' : " (#".$row['menu_path'].")";
$tab1 .= "<li>".$frm->checkbox('menuselect[]',$row['menu_id'],'',array('label'=>"<span>".$row['menu_name']."<small>".$menuInf."</small></span>"))."</li>";
}
$tab1 .= '</ul></div>';
$tab2 = '<div class="menu-selector"><ul class=" list-unstyled">';
foreach($pluginMenu as $row)
{
$menuInf = (!is_numeric($row['menu_path'])) ? ' ('.substr($row['menu_path'],0,-1).')' : " (#".$row['menu_path'].")";
$tab2 .= "<li>".$frm->checkbox('menuselect[]',$row['menu_id'],'',array('label'=>"<span>".$row['menu_name']."<small>".$menuInf."</small></span>"))."</li>";
}
$tab2 .= '</ul></div>';
$tabs = array(
'custom' => array('caption'=>'<i title="'.MENLAN_49.'" class="S16 e-custom-16"></i>', 'text'=>$tab1),
'plugin' => array('caption'=>'<i title="'.ADLAN_CL_7.'" class="S16 e-plugins-16"></i>', 'text'=>$tab2)
);
$defLayout =e107::getRegistry('core/e107/menu-manager/curLayout');;
$text = '<form id="e-mm-selector" action="'.e_ADMIN_ABS.'menus.php?configure='.$defLayout.'" method="post" target="e-mm-iframe">';
$text .= "<input type='hidden' id='curLayout' value='".$defLayout."' />";
//TODO FIXME parse the theme file (or store it somewhere) to get the number of menu areas for each layout. ie. $menu_areas below.
$layouts = self::getLayouts();
// $text .= print_a($layouts['menus'],true);
$text .= '
<div class="dropdown pull-right">
<a class="btn btn-default btn-sm e-mm-selector " title="Activate">'.LAN_GO." ".e107::getParser()->toGlyph('fa-chevron-right').'</a>';
foreach($layouts['menus'] as $name=>$areas)
{
$text .= '<ul class="dropdown-menu e-mm-selector '.$name.'" >';
foreach ($areas as $menu_act)
{
$text .= "<li><input type='submit' class='btn btn-primary btn-block' name='menuActivate[".trim($menu_act)."]' value='".MENLAN_13." ".trim($menu_act)."' /></li>\n";
}
$text .= '</ul>';
}
$text .= '
</div>';
$text .= $frm->tabs($tabs);
$text .= '</form>';
$tp = e107::getParser();
$caption = MENLAN_22;
;
$diz = "The Menu-Manager allows you to place and arrange your menus within your theme template. Hover over the sub-areas to modify existing menu items. ";
$caption .= "<span class='pull-right'><a class='e-tip' title=\"".$tp->toAttribute($diz)."\">".ADMIN_INFO_ICON."</a></span>";
return array('caption'=>$caption,'text'=>$text);
}
}
// XXX Menu Manager Re-Write with drag and drop and multi-dimensional array as storage. ($pref)
// TODO Get Drag & Drop Working with the iFrame
@ -1143,7 +1534,7 @@ class e_layout
<table class='table adminform'>
<tr>
<td>
".MENLAN_4." ".
".LAN_VISIBLE_TO." ".
r_userclass('menu_class', intval($_GET['class']), "off", "public,member,guest,admin,main,classes,nobody")."
</td>
</tr>
@ -1314,7 +1705,7 @@ class e_layout
// $ns->frontend = false;
$ns->tablerender("Menu Layout",$text);
$ns->tablerender(MENLAN_55,$text);
}
@ -1377,21 +1768,19 @@ class e_layout
//include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
// FIXME - quick temporarry fix for missing icons on menu administration. We need different core style to be included (forced) here - e.g. e107_web/css/admin/sprite.css
if(e_IFRAME) //<-- Check config and delete buttons if modifying
if (!empty($pref['e_header_list']) && is_array($pref['e_header_list']))
{
//e107::js('core','bootstrap/js/bootstrap.min.js');
//e107::css('core','bootstrap/css/bootstrap.min.css');
e107::css('url','{e_THEME}/bootstrap3/admin_style.css');
foreach($pref['e_header_list'] as $val)
{
// no checks fore existing file - performance
e107_include_once(e_PLUGIN.$val."/e_header.php");
}
}
$e_sub_cat = 'menus';
require_once(e_HANDLER."file_class.php");
@ -1466,7 +1855,6 @@ if($_POST)
if (vartrue($message) != "")
{
echo $ns -> tablerender('Updated', "<div style='text-align:center'><b>".$message."</b></div><br /><br />");
@ -1486,6 +1874,7 @@ if($_POST)
}
else // Within the IFrame.
{
$men->menuRenderPage();
}
@ -1505,7 +1894,7 @@ if($_POST)
// -----------------------------------------------------------------------------
require_once("footer.php");
require_once("footer.php");
// -----------------------------------------------------------------------

View File

@ -162,6 +162,7 @@ class pluginmanager_form extends e_form
if ($this->plug['plugin_version'] != $this->plug_vars['@attributes']['version'] && $this->plug['plugin_installflag'])
{
// $text .= "<br /><input type='button' class='btn' onclick=\"location.href='".e_SELF."?upgrade.{$this->plug['plugin_id']}'\" title='".EPL_UPGRADE." to v".$this->plug_vars['@attributes']['version']."' value='".EPL_UPGRADE."' />";
e107::getMessage()->addInfo("<b>".$tp->toHtml($this->plug['plugin_name'],false,'TITLE')."</b> is ready to be upgraded. (see below)"); // TODO LAN
$text .= "<a class='btn btn-default' href='".e_SELF."?upgrade.{$this->plug['plugin_id']}' title=\"".EPL_UPGRADE." v".$this->plug_vars['@attributes']['version']."\" >".ADMIN_UPGRADEPLUGIN_ICON."</a>";
}
@ -616,7 +617,13 @@ class pluginManager{
if($total > $amount)
{
$parms = $total.",".$amount.",".$from.",".e_SELF.'?mode='.$_GET['mode'].'&amp;frm=[FROM]';
$parms = $total.",".$amount.",".$from.",".e_SELF.'?mode=online&amp;frm=[FROM]';
if(!empty($srch))
{
$parms .= '&amp;srch='.$srch;
}
$text .= "<div class='control-group form-inline input-inline' style='text-align:center;margin-top:10px'>".$tp->parseTemplate("{NEXTPREV=$parms}",TRUE)."</div>";
}
@ -686,13 +693,14 @@ class pluginManager{
define('e_IFRAME', true);
$frm = e107::getForm();
$mes = e107::getMessage();
$tp = e107::getParser();
// print_a($_GET);
$string = base64_decode($_GET['src']);
parse_str($string, $data);
if(e_DEBUG === true)
if(deftrue('e_DEBUG_MARKETPLACE'))
{
echo "<b>DEBUG MODE ACTIVE (no downloading)</b><br />";
echo '$_GET[src]: ';
@ -703,10 +711,14 @@ class pluginManager{
return false;
}
$pluginFolder = !empty($data['plugin_folder']) ? $tp->filter($data['plugin_folder']) : '';
$pluginUrl = !empty($data['plugin_url']) ? $tp->filter($data['plugin_url']) : '';
$pluginID = !empty($data['plugin_id']) ? $tp->filter($data['plugin_id']) : '';
$pluginMode = !empty($data['plugin_mode']) ? $tp->filter($data['plugin_mode']) : '';
if(!empty($data['plugin_price']))
{
e107::getRedirect()->go($data['plugin_url']);
e107::getRedirect()->go($pluginUrl);
return true;
}
@ -718,10 +730,10 @@ class pluginManager{
// Server flush useless. It's ajax ready state 4, we can't flush (sadly) before that (at least not for all browsers)
$mes->addSuccess(EPL_ADLAN_94);
if($mp->download($data['plugin_id'], $data['plugin_mode'], 'plugin'))
if($mp->download($pluginID, $pluginMode, 'plugin'))
{
$this -> pluginCheck(true); // rescan the plugin directory
$text = e107::getPlugin()->install($data['plugin_folder']);
$text = e107::getPlugin()->install($pluginFolder);
$mes->addInfo($text);
echo $mes->render('default', 'success');
@ -737,7 +749,7 @@ class pluginManager{
$text ="<iframe src='".$data['plugin_url']."' style='width:99%; height:500px; border:0px'>Loading...</iframe>";
$text ="<iframe src='".$pluginUrl."' style='width:99%; height:500px; border:0px'>Loading...</iframe>";
// print_a($data);
$text .= $frm->open('upload-url-form','post');
@ -1460,7 +1472,7 @@ class pluginManager{
$pgf->plug = $plug;
$text .= $pgf->renderTableRow($this->fields, $this->fieldpref, $data, 'plugin_id');
/*
$folder = $plug['plugin_path'];
if(!empty($versions[$folder]['version']) && version_compare( $plug['plugin_version'], $versions[$folder]['version'], '<'))
{
@ -1469,7 +1481,7 @@ class pluginManager{
$lan = "A newer version of [x] is available for download.";
e107::getMessage()->addInfo($tp->lanVars($lan,$link));
e107::getMessage()->addDebug("Local version: ".$plug['plugin_version']." Remote version: ".$versions[$folder]['version']);
}
}*/
}
}

View File

@ -1263,7 +1263,11 @@ $text .= "
<col class='col-label' />
<col class='col-control' />
</colgroup>
<tbody>
<tbody>";
if(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') // Only allow if an SSL login has been made.
{
$text .="
<tr>
<td><label for='ssl-enabled'>".PRFLAN_60."</label></td>
@ -1272,10 +1276,9 @@ $text .= "
<div class='field-help'>".PRFLAN_61."</div>
</td>
</tr>
<!-- Secure Image -->
";
";
}
// Secure Image/ Captcha
$secureImage = array('signcode'=>PRFLAN_76, 'logcode'=>PRFLAN_81, "fpwcode"=>PRFLAN_138,'admincode'=>PRFLAN_222);
foreach($secureImage as $key=>$label)
@ -1364,6 +1367,17 @@ $text .= "
<td >".$frm->text('cookie_name', $pref['cookie_name'], 20)."
<div class='field-help'>".PRFLAN_263.".</div></td></tr>
<tr>
<td><label for='session-lifetime'>".PRFLAN_272."</label></td>
<td>
".$frm->number('session_lifetime', $pref['session_lifetime'],6)."
<div class='smalltext field-help'>".PRFLAN_273."</div>
</td>
</tr>
<tr>
<td><label for='passwordencoding'>".PRFLAN_188.":</label></td>

View File

@ -74,10 +74,13 @@ if(!empty($_GET['action']))
*/
case 'info':
$string = base64_decode($_GET['src']);
parse_str($string,$p);
echo $themec->renderThemeInfo($p);
if(!empty($_GET['src']))
{
$string = base64_decode($_GET['src']);
parse_str($string,$p);
$themeInfo = e107::getSession()->get('thememanager/online/'.intval($p['id']));
echo $themec->renderThemeInfo($themeInfo);
}
break;
case 'preview':
@ -164,7 +167,7 @@ if($mode == 'download' && !empty($_GET['src']))
return true;
}
if(e_DEBUG === true)
if(deftrue('e_DEBUG_MARKETPLACE'))
{
echo "<b>DEBUG MODE ACTIVE (no downloading)</b><br />";
echo '$_GET: ';

View File

@ -59,7 +59,7 @@ $dbupdate = array(); // Array of core upgrade actions
global $e107cache;
if (is_readable(e_ADMIN.'ver.php'))
if(is_readable(e_ADMIN.'ver.php'))
{
include(e_ADMIN.'ver.php');
}
@ -168,7 +168,7 @@ class e107Update
if(varset($_POST['update_core']) && is_array($_POST['update_core']))
{
$func = key($_POST['update_core']);
$message = $this->updateCore($func);
$this->updateCore($func);
}
if(varset($_POST['update']) && is_array($_POST['update'])) // Do plugin updates
@ -177,10 +177,6 @@ class e107Update
$this->updatePlugin($func);
}
if(vartrue($message))
{
$mes->addSuccess($message);
}
$this->renderForm();
}
@ -246,16 +242,20 @@ class e107Update
{
if(!$list = e107::getPlugin()->updateRequired())
{
return;
return false;
}
$frm = e107::getForm();
$tp = e107::getParser();
$text = "";
foreach($list as $path=>$val)
{
$name = !empty($val['@attributes']['lan']) ? $tp->toHtml($val['@attributes']['lan'],false,'TITLE') : $val['@attributes']['name'];
$text .= "<tr>
<td>".$val['@attributes']['name']."</td>
<td>".$name."</td>
<td>".$frm->admin_button('update['.$path.']', LAN_UPDATE, 'warning', '', 'disabled='.$this->disabled)."</td>
</tr>";
}
@ -425,18 +425,27 @@ function update_check()
if ($update_needed === TRUE)
{
$frm = e107::getForm();
$label = LAN_UPDATE." ".e107::getParser()->toGlyph('fa-arrow-right');
$txt = "
$text = "
<form method='post' action='".e_ADMIN_ABS."e107_update.php'>
<div>
".ADLAN_120."
".$frm->admin_button('e107_system_update', LAN_UPDATE, 'other')."
</div>
<p>".ADLAN_120."</p>
".$frm->admin_button('e107_system_update', 'update', 'other', $label)."
</div><br />
</form>
";
$mes->addInfo($txt);
// $text = ADLAN_120. "<a class='btn btn-xs btn-inline' href='".e_ADMIN_ABS."e107_update.php'>". e107::getParser()->toGlyph('fa-chevron-circle-right')."</a>";
// $text .= "<hr />";
$mes->addInfo($text);
}
return $update_needed;
}
@ -603,7 +612,7 @@ function update_706_to_800($type='')
$ns = e107::getRender();
e107::getCache()->clearAll('db');
e107::getCache()->clearAll('system');
e107::getCache()->clear_sys('Config');
e107::getMessage()->setUnique();
@ -779,7 +788,7 @@ function update_706_to_800($type='')
// Move the maximum online counts from menu prefs to a separate pref - 'history'
e107::getCache()->clearAll('system');
e107::getCache()->clear_sys('Config');
$menuConfig = e107::getConfig('menu',true,true);
if ($menuConfig->get('most_members_online') || $menuConfig->get('most_guests_online') || $menuConfig->get('most_online_datestamp'))
@ -1184,9 +1193,7 @@ function update_706_to_800($type='')
// $notify_prefs = $sysprefs -> get('notify_prefs');
// $notify_prefs = $eArrayStorage -> ReadArray($notify_prefs);
e107::getCache()->clearAll('system');
e107::getCache()->clear_sys('Config');
$notify_prefs = e107::getConfig('notify',true,true)->getPref();
@ -1961,5 +1968,18 @@ function convert_serialized($serializedData, $type='')
return $data;
}
function theme_foot()
{
global $pref;
if(!empty($_POST['update_core']['706_to_800']))
{
$data = array('name'=>SITENAME, 'theme'=>$pref['sitetheme'], 'language'=>e_LANGUAGE, 'url'=>SITEURL, 'type'=>'upgrade');
$base = base64_encode(http_build_query($data, null, '&'));
$url = "http://e107.org/e-install/".$base;
return "<img src='".$url."' style='width:1px; height:1px;border:0' />";
}
}
?>

View File

@ -32,14 +32,16 @@ if(varset($_GET['mode']) == "ajax")
if($tableName)
{
$sql = e107::getDb();
$tp = e107::getParser();
$sub_action = '';
if(e_QUERY)
{
$tmp = explode(".", e_QUERY);
$action = $tmp[0];
$action = $tp->filter($tmp[0]);
$sub_action = varset($tmp[1], '');
$sub_action = $tp->filter($sub_action);
$id = varset($tmp[2], 0);
unset($tmp);
}
@ -1147,6 +1149,7 @@ $user = new users_ext;
$frm = e107::getForm();
$mes = e107::getMessage();
$tp = e107::getParser();
require_once(e_HANDLER.'user_extended_class.php');
require_once(e_HANDLER.'userclass_class.php');
@ -1159,15 +1162,17 @@ $message_type = E_MESSAGE_SUCCESS;
if (e_QUERY)
{
$tmp = explode(".", e_QUERY);
$action = $tmp[0];
$action = $tp->filter($tmp[0]);
$sub_action = varset($tmp[1],'');
$sub_action = $tp->filter($sub_action);
$id = varset($tmp[2],0);
unset($tmp);
}
// TODO $_POST['up_x'] check for the evil IE
$tmp = isset($_POST['up']) ? $_POST['up'] : false;
if ($tmp)
$tmp = isset($_POST['up']) ? $tp->filter($_POST['up']) : false;
if (is_array($tmp))
{
$tmp = array_values($tmp);
$qs = explode(".", $tmp[0]);
@ -1184,8 +1189,9 @@ if ($tmp)
}
// TODO $_POST['down_x'] check for the evil IE
$tmp = isset($_POST['down']) ? $_POST['down'] : false;
if ($tmp)
$tmp = isset($_POST['down']) ? $tp->filter($_POST['down']) : false;
if (is_array($tmp))
{
$tmp = array_values($tmp);
$qs = explode(".", $tmp[0]);
@ -1240,7 +1246,12 @@ if (isset($_POST['add_field']))
{
if($_POST['user_type']==EUF_DB_FIELD)
{
$_POST['user_values'] = array($_POST['table_db'],$_POST['field_id'],$_POST['field_value'],$_POST['field_order']);
$_POST['user_values'] = array(
$tp->filter($_POST['table_db']),
$tp->filter($_POST['field_id']),
$tp->filter($_POST['field_value']),
$tp->filter($_POST['field_order']),
);
}
if(!empty($_POST['sort_user_values']))
@ -1287,7 +1298,12 @@ if (isset($_POST['update_field']))
{
if($_POST['user_type']==EUF_DB_FIELD)
{
$_POST['user_values'] = array($_POST['table_db'],$_POST['field_id'],$_POST['field_value'],$_POST['field_order']);
$_POST['user_values'] = array(
$tp->filter($_POST['table_db']),
$tp->filter($_POST['field_id']),
$tp->filter($_POST['field_value']),
$tp->filter($_POST['field_order']),
);
}
if(!empty($_POST['sort_user_values']))
@ -1412,10 +1428,10 @@ if($message)
if(isset($_POST['table_db']) && !$_POST['add_field'] && !$_POST['update_field'])
{
$action = "continue";
$current['user_extended_struct_name'] = $_POST['user_field'];
$current['user_extended_struct_parms'] = $_POST['user_include']."^,^".$_POST['user_regex']."^,^".$_POST['user_regexfail']."^,^".$_POST['user_hide'];
$current['user_extended_struct_text'] = $_POST['user_text'];
$current['user_extended_struct_type'] = $_POST['user_type'];
$current['user_extended_struct_name'] = $tp->filter($_POST['user_field']);
$current['user_extended_struct_parms'] = $tp->filter($_POST['user_include']."^,^".$_POST['user_regex']."^,^".$_POST['user_regexfail']."^,^".$_POST['user_hide']);
$current['user_extended_struct_text'] = $tp->filter($_POST['user_text']);
$current['user_extended_struct_type'] = $tp->filter($_POST['user_type']);
$user->show_extended($current);
}

View File

@ -16,6 +16,6 @@
if (!defined('e107_INIT')) { exit; }
$e107info['e107_version'] = "2.1.3 (git)";
$e107info['e107_version'] = "2.1.4 (git)";
?>

View File

@ -29,11 +29,11 @@ class admin_shortcodes
if($parm=='alert')
{
$text = 'A new update is ready to install! Click to unzip and install v'.$cacheData.'</a>.
<a class="btn btn-success" href="'.$installUrl.'">Install</a>';
{ //TODO LANVARS
$text = ADLAN_122.' v'.$cacheData.'</a>.
<a class="btn btn-success" href="'.$installUrl.'">'.ADLAN_121.'</a>'; //Install
$mes->addInfo($text);
$mes->addInfo($text);
return; // $mes->render();
}
@ -41,17 +41,17 @@ class admin_shortcodes
{
return '<ul class="nav navbar pill navbar-nav">
<li class="dropdown">
<a class="dropdown-toggle" title="Messages" role="button" data-toggle="dropdown" href="#">
'.E_16_E107.' <b class="caret"></b>
</a>
<ul class="dropdown-menu" role="menu">
<li class="nav-header dropdown-header navbar-header">Update Available</li>
<li><a href="'.$installUrl.'">e107 v'.$cacheData.'</a></li>
</ul>
</li>
</ul>
';
<li class="dropdown">
<a class="dropdown-toggle" title="'.LAN_MESSAGES.'" role="button" data-toggle="dropdown" href="#">
'.E_16_E107.' <b class="caret"></b>
</a>
<ul class="dropdown-menu" role="menu">
<li class="nav-header dropdown-header navbar-header">'.LAN_UPDATE_AVAILABLE.'</li>
<li><a href="'.$installUrl.'">e107 v'.$cacheData.'</a></li>
</ul>
</li>
</ul>
';
}
@ -1162,7 +1162,7 @@ class admin_shortcodes
if($emls = $sql->count('mail_recipients', '(*)', "WHERE mail_status = 13"))
{
//$text .= "\n\t\t\t\t\t<div style='padding-bottom: 2px;'>".E_16_FAILEDLOGIN." <a href='".e_ADMIN_ABS."fla.php'>".ADLAN_146.": $flo</a></div>";
$oldconfigs['e-mailout'][0] = array('icon'=>E_16_MAIL, 'title'=>"Pending Mailshots", 'url'=>e_ADMIN_ABS."mailout.php?mode=pending&action=list", 'total'=>$emls);
$oldconfigs['e-mailout'][0] = array('icon'=>E_16_MAIL, 'title'=>ADLAN_167, 'url'=>e_ADMIN_ABS."mailout.php?mode=pending&action=list", 'total'=>$emls);
}
@ -1319,61 +1319,66 @@ Inverse 10 <span class="badge badge-inverse">10</span>
function sc_admin_update()
{
if (!ADMIN) { return ''; }
if (!ADMIN) { return null; }
global $e107cache,$ns, $pref;
if (!varset($pref['check_updates'], FALSE)) { return ''; }
$pref = e107::getPref();
if (is_readable(e_ADMIN.'ver.php'))
if(empty($pref['check_updates']))
{
include(e_ADMIN.'ver.php');
return null;
}
$feed = "http://sourceforge.net/export/rss2_projfiles.php?group_id=63748&rss_limit=5";
$e107cache->CachePageMD5 = md5($e107info['e107_version']);
$cacheTag = 'Update_core';
if($cacheData = $e107cache->retrieve('updatecheck', 3600, TRUE))
if(!$cached = e107::getCache()->retrieve($cacheTag, 1440, true, true))
{
return $ns -> tablerender(LAN_NEWVERSION, $cacheData);
e107::getDebug()->log("Checking for Core Update");
$status = e107::coreUpdateAvailable();
if($status === false)
{
$status = array('status'=>'not needed');
}
$cached = e107::serialize($status,'json');
e107::getCache()->set_sys($cacheTag, $cached,true,true);
}
else
{
e107::getDebug()->log("Using Cached Core Update Data");
}
$data = e107::unserialize($cached);
if($data === false || isset($data['status']))
{
return null;
}
// Don't check for updates if running locally (comment out the next line to allow check - but
// remember it can cause delays/errors if its not possible to access the Internet
if ((strpos(e_SELF,'localhost') !== FALSE) || (strpos(e_SELF,'127.0.0.1') !== FALSE)) { return ''; }
$xml = e107::getXml();
require_once(e_HANDLER."magpie_rss.php");
$ftext = '';
if($rawData = $xml -> getRemoteFile($feed))
if(e_DEBUG !== true)
{
$rss = new MagpieRSS( $rawData );
list($cur_version,$tag) = explode(" ",$e107info['e107_version']);
$c = 0;
foreach($rss->items as $val)
{
$search = array((strstr($val['title'], '(')), 'e107', 'released', ' v');
$version = trim(str_replace($search, '', $val['title']));
if(version_compare($version,$cur_version)==1)
{
$ftext = "<a rel='external' href='".$val['link']."' >e107 v".$version."</a><br />\n";
break;
}
$c++;
}
}
else
{ // Error getting data
$ftext = ADLAN_154;
if ((strpos(e_SELF,'localhost') !== false) || (strpos(e_SELF,'127.0.0.1') !== false)) { return null; }
}
$e107cache->set('updatecheck', $ftext, TRUE);
if($ftext)
{
return $ns -> tablerender(LAN_NEWVERSION, $ftext);
}
return '<ul class="core-update-available nav navbar-nav navbar-left">
<li class="dropdown open">
<a class="dropdown-toggle " title="Core Update Available" role="button" data-toggle="dropdown" href="#" aria-expanded="true">
<i class="fa fa-cloud-download text-success"></i>
</a>
<ul class="dropdown-menu" role="menu">
<li class="nav-header navbar-header dropdown-header">'.e107::getParser()->lanVars(LAN_NEWVERSION,$data['version']).'</li>
<li><a href="'.$data['url'].'" rel="external"><i class="fa fa-download" ></i> '.LAN_DOWNLOAD.'</a></li>
<li><a href="'.$data['infourl'].'" rel="external"><i class="fa fa-file-text-o "></i> Release Notes</a></li>
</ul>
</li>
</ul>';
}
// Does actually the same than ADMIN_SEL_LAN
@ -1887,7 +1892,7 @@ Inverse 10 <span class="badge badge-inverse">10</span>
$var[$key]['link'] = '#'.$key;
$var[$key]['link_class'] = ' menuManagerSelect';
$var[$key]['active'] = ($key==$pref['sitetheme_deflayout']) ? true: false;
$var[$key]['include'] = "data-url='".$url = e_SELF."?configure=".$key."'";
$var[$key]['include'] = " data-url='". e_SELF."?configure=".$key."' data-layout='".$key."' ";
}
$action = $pref['sitetheme_deflayout'];
@ -1895,7 +1900,9 @@ Inverse 10 <span class="badge badge-inverse">10</span>
$var = array($defLayout => $var[$defLayout]) + $var;
e107::getNav()->admin(ADLAN_6,$action, $var);
e107::setRegistry('core/e107/menu-manager/curLayout',$action);
return e107::getNav()->admin(ADLAN_6,$action, $var);

View File

@ -195,7 +195,10 @@ class comment_shortcodes extends e_shortcode
}
// TODO put into a <ul> drop-down format.
$text = "<a href='#' data-target='".e_HTTP."comment.php' id='e-comment-delete-".$this->var['comment_id']."' class='e-comment-delete btn btn-default btn-mini btn-xs'>".LAN_DELETE."</a> ";
e107::getDebug()->log($this->var);
$text = "<a href='#' data-target='".e_HTTP."comment.php' id='e-comment-delete-".$this->var['comment_id']."' data-type='".$this->var['comment_type']."' data-itemid='".$this->var['comment_item_id']."' class='e-comment-delete btn btn-default btn-mini btn-xs'>".LAN_DELETE."</a> ";
if($this->var['comment_blocked'] == 2) // pending approval.
{

View File

@ -112,22 +112,29 @@ class contact_shortcodes extends e_shortcode
function sc_contact_subject($parm='')
{
return "<input type='text' title='".LANCONTACT_19."' name='subject' required='required' size='30' class='tbox form-control' value=\"".varset($_POST['subject'])."\" />";
return "<input type='text' id='contactSubject' title='".LANCONTACT_19."' name='subject' required='required' size='30' class='tbox form-control' value=\"".varset($_POST['subject'])."\" />";
}
function sc_contact_body($parm='')
function sc_contact_body($parm=null)
{
parse_str($parm, $parm);
if(is_string($parm))
{
parse_str($parm, $parm);
}
$rows = vartrue($parm['rows'],10);
$cols = vartrue($parm['cols'],70);
$placeholder = !empty($parm['placeholder']) ? "placeholder=\"".$parm['placeholder']."\"" : "";
if($cols > 60)
{
$size = 'input-xxlarge';
}
return "<textarea cols='{$cols}' id='contactBody' rows='{$rows}' title='".LANCONTACT_20."' name='body' required='required' class='tbox {$size} form-control'>".stripslashes(varset($_POST['body']))."</textarea>";
return "<textarea cols='{$cols}' id='contactBody' rows='{$rows}' title='".LANCONTACT_20."' name='body' ".$placeholder." required='required' class='tbox {$size} form-control'>".stripslashes(varset($_POST['body']))."</textarea>";
}

View File

@ -357,6 +357,11 @@ class news_shortcodes extends e_shortcode
return $this->sc_newsimage($parm);
}
public function sc_news_related($parm=null)
{
return $this->sc_newsrelated($parm);
}
public function sc_news_visibility($parm=null)
{
$string= e107::getUserClass()->getIdentifier($this->news_item['news_class']);
@ -496,6 +501,7 @@ class news_shortcodes extends e_shortcode
$tp = e107::getParser();
if (ADMIN && getperms('H'))
{
//TODO - discuss - a pref for 'new browser window' loading, or a parm or leave 'new browser window' as default?
$default = (deftrue('BOOTSTRAP')) ? $tp->toGlyph('icon-edit',false) : "<img src='".e_IMAGE_ABS."admin_images/edit_16.png' alt=\"".LAN_EDIT."\" class='icon' />";
@ -504,7 +510,7 @@ class news_shortcodes extends e_shortcode
$class = varset($parm['class']);
return "<a class='e-tip ".$class." hidden-print' rel='external' href='".e_ADMIN_ABS."newspost.php?action=edit&amp;id=".$this->news_item['news_id']."' title=\"".LAN_EDIT."\">".$adop_icon."</a>\n";
return "<a class='e-tip e-instant-edit ".$class." hidden-print' rel='external' href='".e_ADMIN_ABS."newspost.php?action=edit&amp;id=".$this->news_item['news_id']."' title=\"".LAN_EDIT."\">".$adop_icon."</a>\n";
}
else
{
@ -848,6 +854,7 @@ class news_shortcodes extends e_shortcode
{
$src = $tp->thumbUrl($srcPath);
$dimensions = $tp->thumbDimensions();
$srcset = $tp->thumbSrcSet($srcPath,array('size'=>'2x'));
}
else
@ -876,6 +883,15 @@ class news_shortcodes extends e_shortcode
$style = !empty($this->param['thumbnail']) ? $this->param['thumbnail'] : '';
$imgParms = array(
'class'=>$class,
'alt'=>basename($src),
'style'=>$style
);
$imgTag = $tp->toImage($srcPath,$imgParms);
switch(vartrue($parm['type']))
{
case 'src':
@ -883,12 +899,12 @@ class news_shortcodes extends e_shortcode
break;
case 'tag':
return "<img class='{$class}' src='".$src."' alt='' style='".$style."' {$dimensions} {$srcset} />";
return $imgTag; // "<img class='{$class}' src='".$src."' alt='' style='".$style."' {$dimensions} {$srcset} />";
break;
case 'url':
default:
return "<a href='".e107::getUrl()->create('news/view/item', $this->news_item)."'><img class='{$class}' src='".$src."' alt='' style='".$style."' {$dimensions} {$srcset} /></a>";
return "<a href='".e107::getUrl()->create('news/view/item', $this->news_item)."'>".$imgTag."</a>";
break;
}
}

View File

@ -268,7 +268,14 @@ class cpage_shortcodes extends e_shortcode
return "<!-- Button Removed: No page text exists! -->";
}
parse_str($parm,$options);
if(is_string($parm))
{
parse_str($parm,$options);
}
else
{
$options= $parm;
}
$buttonText = (empty($this->var['menu_button_text'])) ? LAN_READ_MORE : $this->var['menu_button_text'];
$buttonUrl = (empty($this->var['menu_button_url'])) ? $url : $tp->replaceConstants($this->var['menu_button_url']);
@ -341,6 +348,11 @@ class cpage_shortcodes extends e_shortcode
function sc_cmenuicon($parm='')
{
if($parm === 'css')
{
return str_replace(".glyph", "", $this->var['menu_icon']);
}
return e107::getParser()->toIcon($this->var['menu_icon'], array('space'=>' '));
}

View File

@ -2,7 +2,7 @@
/*
* e107 website system
*
* Copyright (C) 2008-2012 e107 Inc (e107.org)
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
@ -32,8 +32,9 @@ class signup_shortcodes extends e_shortcode
return "
<form method='post' action='".e_SELF."?stage1' autocomplete='off'>\n
<div><br />
<input type='radio' name='coppa' value='0' checked='checked' /> ".LAN_NO."
<input type='radio' name='coppa' value='1' /> ".LAN_YES."<br />
<input type='radio' name='coppa' value='0' id='coppa_no' checked='checked' /> <label class='control-label' for='coppa_no'>".LAN_NO."</label>
<input type='radio' name='coppa' value='1' id='coppa_yes' /> <label class='control-label' for='coppa_yes'>".LAN_YES."</label>
<br />
<br />
<input class='btn btn-primary button' type='submit' name='newver' value=\"".LAN_CONTINUE."\" />
</div></form>
@ -88,7 +89,7 @@ class signup_shortcodes extends e_shortcode
// 'signup' Creates a new XUP user if not found, otherwise it logs the person in.
$button = (defset('FONTAWESOME') === 4) ? $tp->toGlyph('fa-'.$ic, array('size'=>$size)) : "<img class='e-tip' title='Register using your {$p} account' src='".e_IMAGE_ABS."xup/{$p}.png' alt='' />";
$button = (defset('FONTAWESOME') === 4) ? $tp->toGlyph('fa-'.$ic, array('size'=>$size)) : "<img class='e-tip' title='".$tp->lanVars(LAN_PLUGIN_SOCIAL_XUP_SIGNUP, $p)."' src='".e_IMAGE_ABS."xup/{$p}.png' alt='' />";
$text .= " <a title='".$tp->lanVars(LAN_PLUGIN_SOCIAL_XUP_SIGNUP, $p)." ' role='button' class='signup-xup btn btn-primary' href='".e107::getUrl()->create('system/xup/signup?provider='.$p.'&back='.base64_encode(e_REQUEST_URL))."'>".$button."</a> ";
}
//TODO different icon options. see: http://zocial.smcllns.com/
@ -103,7 +104,8 @@ class signup_shortcodes extends e_shortcode
function sc_signup_xup_signup($parm)
{
$pref = e107::getPref('social_login_active');
$tp = e107::getParser();
$tp = e107::getParser();
if(!empty($pref))
{
$text = "";
@ -129,7 +131,7 @@ class signup_shortcodes extends e_shortcode
$ic = 'windows';
}
$button = (defset('FONTAWESOME') === 4) ? "<span title='".$tp->lanVars(LAN_PLUGIN_SOCIAL_XUP_REG, $p)."'>".$tp->toGlyph('fa-'.$ic, array('size'=>$size))."</span>" : "<img class='e-tip' title='Register using your {$p} account' src='".e_IMAGE_ABS."xup/{$p}.png' alt='' />";
$button = (defset('FONTAWESOME') === 4) ? "<span title='".$tp->lanVars(LAN_PLUGIN_SOCIAL_XUP_REG, $p)."'>".$tp->toGlyph('fa-'.$ic, array('size'=>$size))."</span>" : "<img class='e-tip' title='".$tp->lanVars(LAN_PLUGIN_SOCIAL_XUP_SIGNUP, $p)."' src='".e_IMAGE_ABS."xup/{$p}.png' alt='' />";
$text .= " <a class='signup-xup ".$class."' role='button' href='".e107::getUrl()->create('system/xup/signup?provider='.$p.'&back='.base64_encode(e_REQUEST_URL))."'>".$button."</a> ";
}
@ -359,7 +361,7 @@ class signup_shortcodes extends e_shortcode
if ($pref)
{
return $rs->form_radio("hideemail", 1, $default_email_setting==1)." ".LAN_YES."&nbsp;&nbsp;".$rs->form_radio("hideemail", 0,$default_email_setting==0)." ".LAN_NO;
return $rs->form_radio("hideemail", 1, $default_email_setting==1)." <label for='hideemail1'>".LAN_YES."</label> &nbsp;&nbsp;".$rs->form_radio("hideemail", 0,$default_email_setting==0)." <label for='hideemail0'>".LAN_NO."</label>";
}
}
@ -556,6 +558,7 @@ class signup_shortcodes extends e_shortcode
function sc_signup_adminoptions()
{
if(getperms('0'))
{
$pref = e107::getPref();
@ -564,17 +567,17 @@ class signup_shortcodes extends e_shortcode
if(intval($pref['user_reg']) !== 1)
{
$adminMsg .= "<div class='form-group'><b>User registration is currently disabled.</b></div>";
$adminMsg .= "<div class='form-group'><b>".LAN_SIGNUP_114."</b></div>";
}
$adminMsg .= "<div class='form-group form-inline'>
<a class='btn btn-warning btn-danger btn-sm' href='".e_SELF."?preview'>Preview Activation Email</a>
<a class='btn btn-error btn-danger btn-sm' href='".e_SELF."?preview.aftersignup'>Preview After Form Submit</a>
<a class='btn btn-error btn-danger btn-sm e-tip' href='".e_SELF."?test' title=\"to ".USEREMAIL."\">Send a Test Activation</a>
<a class='btn btn-warning btn-danger btn-sm' href='".e_SELF."?preview'>".LAN_SIGNUP_115."</a>
<a class='btn btn-error btn-danger btn-sm' href='".e_SELF."?preview.aftersignup'>".LAN_SIGNUP_116."</a>
<a class='btn btn-error btn-danger btn-sm e-tip' href='".e_SELF."?test' title=\"".e107::getParser()->lanVars(LAN_SIGNUP_118,USEREMAIL)."\">".LAN_SIGNUP_117."</a>
</div>
";
$adminMsg .= $frm->checkbox('simulation',1, false, "Don't send email");
$adminMsg .= $frm->checkbox('simulation',1, false, LAN_SIGNUP_119);
return "<div class='alert alert-block alert-error alert-danger text-center'>".$adminMsg."</div>";

View File

@ -4,7 +4,7 @@ function wmessage_shortcode($parm='')
{
if($parm == 'hide')
{
return;
return null;
}
$e107 = e107::getInstance();
@ -43,6 +43,8 @@ function wmessage_shortcode($parm='')
if (strpos($front_url, 'http') === FALSE) $front_url = SITEURL.$front_url;
if (deftrue('e_FRONTPAGE') || ($parm == 'force') || ((e_SELF == $front_url) && (($parm == 'ignore_query') || (e_QUERY == $front_qry))))
{
// Actually want to display a welcome message here
@ -52,8 +54,7 @@ function wmessage_shortcode($parm='')
if($cacheData = $e107cache->retrieve('wmessage'))
{
echo $cacheData;
return;
return $cacheData;
}
if (!defined('WMFLAG'))
@ -80,7 +81,7 @@ function wmessage_shortcode($parm='')
if (isset($wmessage) && $wmessage)
{
ob_start();
$cache_data = '';
if(intval($pref['wm_enclose']) === 2) // carousel
{
$carousel= array();
@ -89,22 +90,24 @@ function wmessage_shortcode($parm='')
$carousel['slide-'.$k] = array('caption'=>$wmessageCaption[$k], 'text'=>$ns->tablerender($wmessageCaption[$k],$v, 'wm',true));
}
echo e107::getForm()->carousel('wmessage-carousel',$carousel);
$cache_data = e107::getForm()->carousel('wmessage-carousel',$carousel);
}
elseif(intval($pref['wm_enclose']) === 1)
{
$ns->tablerender($wmcaption, implode("<br />",$wmessage), 'wm');
$cache_data = $ns->tablerender($wmcaption, implode("<br />",$wmessage), 'wm', true);
}
else
{
echo "<div class='wmessage'>";
echo ($wmcaption) ? $wmcaption.'<br />' : '';
echo implode('<br />',$wmessage);
echo "</div>";
$text = "<div class='wmessage'>";
$text .= ($wmcaption) ? $wmcaption.'<br />' : '';
$text .= implode('<br />',$wmessage);
$text .= "</div>";
$cache_data = $text;
}
$cache_data = ob_get_flush();
$e107cache->set('wmessage', $cache_data);
return $cache_data;
}
}
}

View File

@ -12,15 +12,15 @@ if (!defined('e107_INIT')) { exit; }
$MENU_TEMPLATE['button']['body'] = '<div>{CMENUBODY}</div>{CPAGEBUTTON}';
$MENU_TEMPLATE['button']['end'] = '</div>';
$MENU_TEMPLATE['buttom-image']['start'] = '<div class="cpage-menu {CMENUNAME}">';
$MENU_TEMPLATE['buttom-image']['start'] = '<div class="cpage-menu {CMENUNAME}">{SETIMAGE: w=360}';
$MENU_TEMPLATE['buttom-image']['body'] = '<div>{CMENUIMAGE}</div>{CPAGEBUTTON}';
$MENU_TEMPLATE['buttom-image']['end'] = '</div>';
$MENU_TEMPLATE['image-only']['start'] = '<div class="cpage-menu {CMENUNAME}">';
$MENU_TEMPLATE['image-only']['start'] = '<div class="cpage-menu {CMENUNAME}">{SETIMAGE: w=360}';
$MENU_TEMPLATE['image-only']['body'] = '{CMENUIMAGE}';
$MENU_TEMPLATE['image-only']['end'] = '</div>';
$MENU_TEMPLATE['image-text-button']['start'] = '<div class="cpage-menu {CMENUNAME}">';
$MENU_TEMPLATE['image-text-button']['start'] = '<div class="cpage-menu {CMENUNAME}">{SETIMAGE: w=360}';
$MENU_TEMPLATE['image-text-button']['body'] = '{CMENUIMAGE}{CMENUBODY}{CPAGEBUTTON}';
$MENU_TEMPLATE['image-text-button']['end'] = '</div>';
?>

View File

@ -54,7 +54,7 @@ $NAVIGATION_TEMPLATE['main']['end'] = '</ul>';
// Sub menu
$NAVIGATION_TEMPLATE['main']['submenu_start'] = '
<ul class="dropdown-menu" role="menu" >
<ul class="dropdown-menu submenu-start submenu-level-{LINK_DEPTH}" role="menu" >
';
// Sub menu Link
@ -70,12 +70,17 @@ $NAVIGATION_TEMPLATE['main']['submenu_item_active'] = '
<a href="{LINK_URL}"{LINK_OPEN}>{LINK_ICON}{LINK_NAME}</a>
</li>
';
$NAVIGATION_TEMPLATE['main']['submenu_end'] = '</ul>';
// Sub menu
$NAVIGATION_TEMPLATE['main']['submenu_lowerstart'] = '
<ul class="dropdown-menu submenu-start lower submenu-level-{LINK_DEPTH}" role="menu" >
';
// Sub Menu Link which has a sub menu.
$NAVIGATION_TEMPLATE['main']['submenu_loweritem'] = '
<li role="menuitem" class="dropdown-submenu">
<li role="menuitem" class="dropdown-submenu lower">
<a href="{LINK_URL}"{LINK_OPEN}>{LINK_ICON}{LINK_NAME}</a>
<span class="caret"></span>
{LINK_SUB}
</li>
';
@ -83,13 +88,12 @@ $NAVIGATION_TEMPLATE['main']['submenu_loweritem'] = '
$NAVIGATION_TEMPLATE['main']['submenu_loweritem_active'] = '
<li role="menuitem" class="dropdown-submenu active">
<a href="{LINK_URL}"{LINK_OPEN}>{LINK_ICON}{LINK_NAME}</a>
<span class="caret"></span>
{LINK_SUB}
</li>
';
$NAVIGATION_TEMPLATE['main']['submenu_lowerend'] = '</ul>';
$NAVIGATION_TEMPLATE['main']['submenu_end'] = '</ul>';
// TEMPLATE FOR {NAVIGATION=side}

View File

@ -2,7 +2,7 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
@ -21,8 +21,8 @@ define("REQUIRED_FIELD_MARKER", "<span class='required'> *</span>");
$sc_style['SIGNUP_DISPLAYNAME']['pre'] = "
<tr>
<td class='forumheader3' style='width:30%;white-space:nowrap' >"
.LAN_SIGNUP_89."<span class='required'> *</span><br /><span class='smalltext'>".LAN_SIGNUP_90."</span>
<td class='forumheader3' style='width:30%;white-space:nowrap' ><label for='username'>"
.LAN_SIGNUP_89."<span class='required'> *</span><br /><span class='smalltext'>".LAN_SIGNUP_90."</span></label>
</td>
<td class='forumheader3' style='width:70%'>";
$sc_style['SIGNUP_DISPLAYNAME']['post'] = "
@ -31,8 +31,8 @@ $sc_style['SIGNUP_DISPLAYNAME']['post'] = "
$sc_style['SIGNUP_REALNAME']['pre'] = "
<tr>
<td class='forumheader3' style='width:30%;white-space:nowrap'>"
.LAN_SIGNUP_91."".req($pref['signup_option_realname'])."
<td class='forumheader3' style='width:30%;white-space:nowrap'><label for='realname'>"
.LAN_SIGNUP_91."".req($pref['signup_option_realname'])."</label>
</td>
<td class='forumheader3' style='width:70%' >";
$sc_style['SIGNUP_REALNAME']['post'] = "
@ -119,7 +119,7 @@ $SIGNUP_SIGNATURE_END = "
$sc_style['SIGNUP_SIGNATURE']['pre'] = "
<tr>
<td class='forumheader3' style='width:30%;white-space:nowrap;vertical-align:top' >".LAN_SIGNUP_93." ".req($pref['signup_option_signature'])."</td>
<td class='forumheader3' style='width:30%;white-space:nowrap;vertical-align:top' ><label for='signature'>".LAN_SIGNUP_93." ".req($pref['signup_option_signature'])."</label></td>
<td class='forumheader3' style='width:70%'>";
$sc_style['SIGNUP_SIGNATURE']['post'] = "
@ -128,7 +128,7 @@ $sc_style['SIGNUP_SIGNATURE']['post'] = "
$sc_style['SIGNUP_IMAGES']['pre'] = "
<tr>
<td class='forumheader3' style='width:30%; vertical-align:top;white-space:nowrap' >".LAN_SIGNUP_94.req($pref['signup_option_image'])."</td>
<td class='forumheader3' style='width:30%; vertical-align:top;white-space:nowrap' ><label for='avatar'>".LAN_SIGNUP_94.req($pref['signup_option_image'])."</label></td>
<td class='forumheader3' style='width:70%;vertical-align:top'>";
$sc_style['SIGNUP_IMAGES']['post'] = "
</td>
@ -136,7 +136,7 @@ $sc_style['SIGNUP_IMAGES']['post'] = "
$sc_style['SIGNUP_IMAGECODE']['pre'] = "
<tr>
<td class='forumheader3' style='width:30%'>".e107::getSecureImg()->renderLabel().req(2)."</td>
<td class='forumheader3' style='width:30%'><label for='code-verify'>".e107::getSecureImg()->renderLabel().req(2)."</label></td>
<td class='forumheader3' style='width:70%'>";
$sc_style['SIGNUP_IMAGECODE']['post'] = "
</td>
@ -144,7 +144,7 @@ $sc_style['SIGNUP_IMAGECODE']['post'] = "
$sc_style['SIGNUP_LOGINNAME']['pre'] = "
<tr>
<td class='forumheader3' style='width:30%'>".LAN_SIGNUP_81.req(2)."</td>
<td class='forumheader3' style='width:30%'><label for='loginname'>".LAN_SIGNUP_81.req(2)."</label></td>
<td class='forumheader3' style='width:70%'>";
$sc_style['SIGNUP_LOGINNAME']['post'] = "
</td>
@ -160,7 +160,7 @@ $sc_style['SIGNUP_HIDE_EMAIL']['post'] = "
$sc_style['SIGNUP_EMAIL_CONFIRM']['pre'] = "
<tr>
<td class='forumheader3' style='width:30%;white-space:nowrap'>".LAN_SIGNUP_39."</td>
<td class='forumheader3' style='width:30%;white-space:nowrap'><label for='email-confirm'>".LAN_SIGNUP_39."</label></td>
<td class='forumheader3' style='width:70%'>";
$sc_style['SIGNUP_EMAIL_CONFIRM']['post'] = "
</td>
@ -170,13 +170,13 @@ $sc_style['SIGNUP_XUP']['pre'] = "<div class='center' style='display:block;paddi
$sc_style['SIGNUP_XUP']['post'] = "<h2 class='signup-divider'><span>OR</span></h2></div>";
$sc_style['SIGNUP_PASSWORD1']['pre'] = "<tr>
<td class='forumheader3' style='width:30%;white-space:nowrap'>".LAN_SIGNUP_83."<span class='required'> *</span></td>
<td class='forumheader3' style='width:30%;white-space:nowrap'><label for='password1'>".LAN_SIGNUP_83."<span class='required'> *</span></label></td>
<td class='forumheader3' style='width:70%'>";
$sc_style['SIGNUP_PASSWORD1']['post'] = "</td>
</tr>";
$sc_style['SIGNUP_PASSWORD2']['pre'] = "<tr>
<td class='forumheader3' style='width:30%;white-space:nowrap'>".LAN_SIGNUP_84."<span class='required'> *</span></td>
<td class='forumheader3' style='width:30%;white-space:nowrap'><label for='password2'>".LAN_SIGNUP_84."<span class='required'> *</span></label></td>
<td class='forumheader3' style='width:70%'>";
$sc_style['SIGNUP_PASSWORD2']['post'] = "</td>
</tr>";
@ -229,7 +229,7 @@ if(!defined($SIGNUP_BODY))
{SIGNUP_LOGINNAME}
{SIGNUP_REALNAME}
<tr>
<td class='forumheader3' style='width:30%;white-space:nowrap'>".LAN_USER_60."{SIGNUP_IS_MANDATORY=email}</td>
<td class='forumheader3' style='width:30%;white-space:nowrap'><label for='email'>".LAN_USER_60."{SIGNUP_IS_MANDATORY=email}</label></td>
<td class='forumheader3' style='width:70%'>
{SIGNUP_EMAIL}
</td>

View File

@ -128,7 +128,7 @@ $sc_style['USER_SENDPM']['post'] = "</div><div class='f-right'>".LAN_USER_62."</
// Determine which other bits are installed; let photo span those rows (can't do signature - will vary with user)
$span = 4;
if ($tp->parseTemplate("{USER_SENDPM}", FALSE, $user_shortcodes)) $span++;
if (e107::getParser()->parseTemplate("{USER_SENDPM}", FALSE, $user_shortcodes)) $span++;
$span = " rowspan='".$span."' ";
//$sc_style['USER_PICTURE']['pre']="<td {$span} class='forumheader3 center middle' style='width:20%'>";

View File

@ -79,7 +79,7 @@ class core_news_url extends eUrlConfig
* - list/year?id=xxx -> ?year-id
* - list/nextprev?route=xxx -> PARSED_ROUTE.[FROM] (recursive parse() call)
*/
public function create($route, $params = array())
public function create($route, $params = array(),$options = array())
{
if(!$params) return 'news.php';
@ -175,7 +175,7 @@ class core_news_url extends eUrlConfig
return $url;
}
public function parse($request)
public function parse($pathInfo, $params = array(), eRequest $request = null, eRouter $router = null, $config = array())
{
// this config doesn't support parsing, it's done by the module entry script (news.php)
// this means News are not available via single entry point if this config is currently active

View File

@ -116,7 +116,7 @@ class core_page_url extends eUrlConfig
return $admin;
}
public function parse($pathInfo)
public function parse($pathInfo, $params = array(), eRequest $request = null, eRouter $router = null, $config = array())
{
// this config doesn't support parsing, it's done by the module entry script (news.php)
// this means News are not available via single entry point if this config is currently active

View File

@ -116,7 +116,7 @@ class core_user_url extends eUrlConfig
return $admin;
}
public function parse($pathInfo, $params = array(), $request = NULL, $router = NULL, $config = array())
public function parse($pathInfo, $params = array(), eRequest $request = NULL, eRouter $router = NULL, $config = array())
{
// this config doesn't support parsing, it's done by the module entry script (news.php)
// this means News are not available via single entry point if this config is currently active

View File

@ -243,6 +243,7 @@
</core>
<core name="search_highlight">1</core>
<core name="search_restrict">0</core>
<core name="session_lifetime">86400</core>
<core name="shortdate">%d %b %Y : %H:%M</core>
<core name="signcode">0</core>
<core name="signup_disallow_text"></core>

View File

@ -4512,8 +4512,8 @@ class e_admin_ui extends e_admin_controller_ui
{
$this->getTreeModel()->setMessages();
// FIXME lan
if($delcount) e107::getMessage()->addSuccess($tp->lanVars(RL_LAN_085, $delcount, true));
if($nfcount) e107::getMessage()->addError($tp->lanVars(RL_LAN_086, $nfcount,true));
if($delcount) e107::getMessage()->addSuccess($tp->lanVars(LAN_UI_DELETED, $delcount, true));
if($nfcount) e107::getMessage()->addError($tp->lanVars(LAN_UI_DELETED_FAILED, $nfcount,true));
}
//$this->redirect();
@ -6288,18 +6288,20 @@ class e_admin_form_ui extends e_form
<div id='admin-ui-list-batch' class='navbar navbar-inner left' >
<div class='span6 col-md-6'>";
if(!$this->getController()->getTreeModel()->isEmpty())
{
$text .= "
<div class='form-inline input-inline'>
$selectStart = "<div class='form-inline input-inline'>
<img src='".e_IMAGE_ABS."generic/branchbottom.gif' alt='' class='icon action' />
<div class='input-group input-append'>
".$this->select_open('etrigger_batch', array('class' => 'tbox form-control input-large select batch e-autosubmit reset', 'id' => false))."
".$this->option(LAN_BATCH_LABEL_SELECTED, '', false)."
".($allow_copy ? $this->option(LAN_COPY, 'copy', false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"')) : '')."
".($allow_delete ? $this->option(LAN_DELETE, 'delete', false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"')) : '')."
".($allow_url ? $this->option(LAN_UI_BATCH_CREATELINK, 'url', false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"')) : '')."
".($allow_featurebox ? $this->option(LAN_PLUGIN_FEATUREBOX_BATCH, 'featurebox', false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"')) : '');
".$this->option(LAN_BATCH_LABEL_SELECTED, '', false);
$selectOpt = '';
if(!$this->getController()->getTreeModel()->isEmpty())
{
$selectOpt .= ($allow_copy ? $this->option(LAN_COPY, 'copy', false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"')) : '');
$selectOpt .= ($allow_delete ? $this->option(LAN_DELETE, 'delete', false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"')) : '');
$selectOpt .= ($allow_url ? $this->option(LAN_UI_BATCH_CREATELINK, 'url', false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"')) : '');
$selectOpt .= ($allow_featurebox ? $this->option(LAN_PLUGIN_FEATUREBOX_BATCH, 'featurebox', false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"')) : '');
if(!empty($customBatchOptions))
{
@ -6308,16 +6310,18 @@ class e_admin_form_ui extends e_form
if(is_array($val))
{
$text .= $this->optgroup_open($key);
$selectOpt .= $this->optgroup_open($key);
foreach($val as $k=>$v)
{
$text .= $this->option($v, $k, false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"'));
$selectOpt .= $this->option($v, $k, false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"'));
}
$text .= $this->optgroup_close();
$selectOpt .= $this->optgroup_close();
}
else
{
$text .= $this->option($val, $key, false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"'));
$selectOpt .= $this->option($val, $key, false, array('class' => 'ui-batch-option class', 'other' => 'style="padding-left: 15px"'));
}
@ -6326,12 +6330,23 @@ class e_admin_form_ui extends e_form
}
$text .= "
".$this->renderBatchFilter('batch')."
".$this->select_close()."
<div class='input-group-btn input-append'>
$selectOpt .= $this->renderBatchFilter('batch');
if(!empty($selectOpt))
{
$text .= $selectStart;
$text .= $selectOpt;
$text .= $this->select_close();
$text .= "<div class='input-group-btn input-append'>
".$this->admin_button('e__execute_batch', 'e__execute_batch', 'batch e-hide-if-js', LAN_GO, array('id' => false))."
</div></div></div>
</div>";
}
$text .= "</div></div>
";
}

View File

@ -22,8 +22,10 @@ if (!defined('e107_INIT'))
*/
function avatar($avatar)
{
$data = array('user_image' => $avatar);
return e107::getParser()->parseTemplate("{USER_AVATAR=".$avatar."}",true);
return e107::getParser()->toAvatar($data, array('type'=>'url'));
// return e107::getParser()->parseTemplate("{USER_AVATAR=".$avatar."}",true);
/*
global $tp;

View File

@ -122,21 +122,24 @@ class ecache {
}
/**
* @return string
* @param string $query
* @param int $MaximumAge the time in minutes before the cache file 'expires'
* @param Forced check if cache is disabled.
* @desc Returns the data from the cache file associated with $query, else it returns false if there is no cache for $query.
* @scope public
*/
* Retrieve Cache data.
* @param $CacheTag
* @param bool|int $MaximumAge the time in minutes before the cache file 'expires'
* @param bool $ForcedCheck check even if cache pref is disabled.
* @param bool $syscache set to true when checking sys cache.
* @return string
* @desc Returns the data from the cache file associated with $query, else it returns false if there is no cache for $query.
* @scope public
*/
public function retrieve($CacheTag, $MaximumAge = false, $ForcedCheck = false, $syscache = false)
{
if(($ForcedCheck != false ) || ($syscache == false && $this->UserCacheActive) || ($syscache == true && $this->SystemCacheActive) && !e107::getParser()->checkHighlighting())
{
$cache_file = (isset($this) && $this instanceof ecache ? $this->cache_fname($CacheTag, $syscache) : self::cache_fname($CacheTag, $syscache));
if (file_exists($cache_file))
if(file_exists($cache_file))
{
if ($MaximumAge != false && (filemtime($cache_file) + ($MaximumAge * 60)) < time()) {
if ($MaximumAge !== false && (filemtime($cache_file) + ($MaximumAge * 60)) < time()) {
unlink($cache_file);
return false;
}
@ -147,13 +150,16 @@ class ecache {
{
$ret = substr($ret, strlen(self::CACHE_PREFIX));
}
else
elseif(substr($ret,0,5) == '<?php')
{
$ret = substr($ret, 5); // Handle the history for now
}
return $ret;
}
} else {
}
else
{
// e107::getDebug()->log("Couldn't find cache file: ".json_encode($cache_file));
return false;
}
}
@ -234,6 +240,7 @@ class ecache {
*/
public function clear($CacheTag = '', $syscache = false, $related = false)
{
$file = ($CacheTag) ? preg_replace("#\W#", "_", $CacheTag)."*.cache.php" : "*.cache.php";
e107::getEvent()->triggerAdminEvent('cache_clear', "cachetag=$CacheTag&file=$file&syscache=$syscache");
$ret = self::delete(e_CACHE_CONTENT, $file, $syscache);
@ -255,6 +262,8 @@ class ecache {
*/
function clear_sys($CacheTag = '', $related = false)
{
if(isset($this) && $this instanceof ecache)
{
return $this->clear($CacheTag, true, $related);

View File

@ -2,7 +2,7 @@
/*
* e107 website system
*
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
@ -333,8 +333,8 @@ class e_chart
$fName = 'draw'.ucfirst($id);
$js = " google.load('visualization', '1', {packages:['corechart']});
google.setOnLoadCallback(".$fName.");
$js = " google.charts.load('visualization', '1', {packages:['corechart']});
google.charts.setOnLoadCallback(".$fName.");
function ".$fName."() {
var data = google.visualization.arrayToDataTable(".$this->getData().");
@ -387,7 +387,7 @@ class e_chart
";
e107::js('footer','https://www.google.com/jsapi');
e107::js('footer','https://www.gstatic.com/charts/loader.js');
e107::js('footer-inline', $js);
return "<div class='e-graph e-chart' id='".$id."' style='width: ".$width."; height: ".$height."px;'></div>";

View File

@ -599,7 +599,13 @@ class comment
}
function deleteComment($id) // delete a single comment by comment id.
/**
* @param $id - comment_id to delete
* @param string $table - comment belongs to this table eg. 'news'
* @param string $itemid - corresponding item from the table. eg. news_id
* @return int|null|void
*/
function deleteComment($id, $table='', $itemid='') // delete a single comment by comment id.
{
if($this->engine != 'e107')
@ -609,9 +615,18 @@ class comment
if(!getperms('0') && !getperms("B"))
{
return;
return null;
}
return e107::getDb()->update("comments","comment_blocked=1 WHERE comment_id = ".intval($id)."");
$table = e107::getParser()->filter($table,'w');
$status = e107::getDb()->update("comments","comment_blocked=1 WHERE comment_id = ".intval($id)."");
$data = array('comment_id'=>intval($id), 'comment_type'=>$table, 'comment_item_id'=> intval($itemid));
e107::getEvent()->trigger('user_comment_deleted', $data);
return $status;
}
function approveComment($id) // appropve a single comment by comment id.

View File

@ -67,80 +67,27 @@ class _system_cron
*/
function checkCoreUpdate () // Check if there is an e107 Core update and email Site Admin if so
{
// Check if there's a core e107 update available
if(!$data = e107::coreUpdateAvailable())
{
return false;
}
// Get site version
if (is_readable(e_ADMIN."ver.php"))
{
include (e_ADMIN."ver.php"); // $e107info['e107_version'];
}
else
{
// Find alternate way to get local site version or throw an error
}
$pref = e107::getPref();
// Check for updates for currently installed version
$localVersion = (int) $e107info['e107_version'];
$message = "<p>There is a new version of e107 available.<br />
Please visit ".$data['infourl']." for further details.</p>
<a class='btn btn-primary' href=''>Download v".$data['version']."</a>";
switch ($localVersion) {
case 0:
// Local version is <= 0.7
// Run update routine for 0.x
break;
case 1:
// Local version is == 1.x
// Run update routine for 1.x
break;
case 2:
// Local version is == 2.x
// Run update routine for 2.x
$eml = array(
'subject' => "e107 v".$data['version']." is now available.",
'sender_name' => SITENAME . " Automation",
'html' => true,
'template' => 'default',
'body' => $message
);
// Get newest available release version
$xml = e107::getXml();
$file = "http://e107.org/releases.php?mode=2";
$xdata = $xml->loadXMLfile($file,true,false);
e107::getEmail()->sendEmail($pref['siteadminemail'], $pref['siteadmin'], $eml);
// Check for update
if ($e107info['e107_version'] < $xdata['core']['@attributes']['version'])
{
// If there is a new version of e107 available, notify Site Admin by email, make a log entry, and notify Admin in Admin Area, $versionTest = false
$pref = e107::getPref();
require_once(e_HANDLER.'mail.php');
$message = "There is a new version of e107 available. Please visit http://www.e107.org for further details.";
sendemail($pref['siteadminemail'], "e107 - Update(s) Available For " . $pref['sitename'], $message, $pref['siteadmin'],$pref['siteadminemail'], $pref['siteadmin']);
// Add entry to the log
e107::getAdminLog()->add("Update(s) Available", "There is a new version of e107 available. Please visit http://www.e107.org for further details.", 3);
$versionTest = $xdata['core']['@attributes']['version'];
}
else
{
// If there is not a new version of e107 available, $versionTest = false
$versionTest = false;
}
break;
}
//$versionTest = "{CHECK THE VERSION}"; // If out of date, return some text, if up-to-date , return false;
$che = e107::getCache();
$che->setMD5(e_LANGUAGE);
if($versionTest)
{
$che->set("releasecheck",$versionTest, TRUE);
return $versionTest;
// e107::getMessage()=>addInfo($versionTest);
}
else
{
$che->set("releasecheck", 'false', TRUE);
return false;
}
}

View File

@ -264,21 +264,36 @@ class e107_db_debug {
// Optionally list good queries
//
if ($okCount && E107_DBG_SQLDETAILS) {
if ($okCount && E107_DBG_SQLDETAILS)
{
$text .= "\n<table class='fborder table table-striped table-bordered'>\n";
$text .= "<tr><td class='fcaption' colspan='3'><b>".$this->countLabel($okCount)." Good Queries</b></td></tr>\n";
$text .= "<tr><td class='fcaption'><b>Index</b></td><td class='fcaption'><b>Qtime</b></td><td class='fcaption'><b>Query</b></td></tr>\n
<tr><td class='fcaption'>&nbsp;</td><td class='fcaption'><b>(msec)</b></td><td class='fcaption'>&nbsp;</td></tr>\n
";
$count = 0;
foreach ($this->aSQLdetails as $idx => $cQuery)
{
if ($cQuery['ok']) {
if($count > 500)
{
$text .= "<tr class='danger'><td colspan='6'><b>Too many queries. Ending... </b></td></tr>"; // NO LAN - debug only.
break;
}
if ($cQuery['ok'])
{
$text .= "<tr><td class='forumheader3' style='text-align:right'>{$idx}&nbsp;</td>
<td class='forumheader3' style='text-align:right'>".number_format($cQuery['time'] * 1000.0, 4)."&nbsp;</td>
<td class='forumheader3'>".$cQuery['query'].'<br />['.$cQuery['marker']." - ".$cQuery['caller']."]</td></tr>\n";
$count++;
}
}
$text .= "\n</table><br />\n";
}
@ -286,8 +301,11 @@ class e107_db_debug {
//
// Optionally list query details
//
if (E107_DBG_SQLDETAILS) {
foreach ($this->aSQLdetails as $idx => $cQuery) {
if (E107_DBG_SQLDETAILS)
{
$count = 0;
foreach ($this->aSQLdetails as $idx => $cQuery)
{
$text .= "\n<table class='fborder table table-striped table-bordered' style='width: 100%;'>\n";
$text .= "<tr><td class='forumheader3' colspan='".$cQuery['nFields']."'><b>".$idx.") Query:</b> [".$cQuery['marker']." - ".$cQuery['caller']."]<br />".$cQuery['query']."</td></tr>\n";
if (isset($cQuery['explain'])) {
@ -300,6 +318,15 @@ class e107_db_debug {
$text .= "<tr><td class='forumheader3' colspan='".$cQuery['nFields']."'><b>Query time:</b> ".number_format($cQuery['time'] * 1000.0, 4).' (ms)</td></tr>';
$text .= '</table><br />'."\n";
if($count > 500)
{
$text .= "<div class='alert alert-danger text-center'>Too many queries. Ending...</div>"; // NO LAN - debug only.
break;
}
$count++;
}
}

View File

@ -54,6 +54,8 @@ class db_verify
$pref = e107::getPref();
$mes = e107::getMessage();
$sql = e107::getDb();
$sql->gen('SET SQL_QUOTE_SHOW_CREATE = 1');
$this->backUrl = e_SELF;
@ -930,7 +932,7 @@ class db_verify
return false;
}
$sql->gen('SET SQL_QUOTE_SHOW_CREATE = 1');
// mysql_query('SET SQL_QUOTE_SHOW_CREATE = 1');
$qry = 'SHOW CREATE TABLE `' . $prefix . $tbl . "`";

View File

@ -120,6 +120,29 @@ class e107
*/
protected static $_plug_config_arr = array();
/**
* e107 theme config object storage
*
* @var array
*/
protected static $_theme_config_arr = array();
/**
* e107 e107::css() on/off flag.
*
* @var bool
*/
protected static $_css_enabled = true;
/**
* e107 e107::js() on/off flag.
*
* @var bool
*/
protected static $_js_enabled = true;
/**
* Core handlers array
* For new/missing handler add
@ -178,6 +201,7 @@ class e107
'e_ranks' => '{e_HANDLER}e_ranks_class.php',
'e_shortcode' => '{e_HANDLER}shortcode_handler.php',
'e_system_user' => '{e_HANDLER}user_model.php',
'e_theme' => '{e_HANDLER}theme_handler.php',
'e_upgrade' => '{e_HANDLER}e_upgrade_class.php',
'e_user_model' => '{e_HANDLER}user_model.php',
'e_user' => '{e_HANDLER}user_model.php',
@ -815,7 +839,7 @@ class e107
{
global $e107_debug, $_E107;
if(($e107_debug || isset($_E107['debug']) || (defined('e_DEBUG') && e_DEBUG === true) ))
if(($e107_debug || !empty($_E107['debug']) || (defined('e_DEBUG') && e_DEBUG === true) ))
{
require_once($path);
}
@ -1027,6 +1051,45 @@ class e107
return self::getPlugConfig($plug_name)->getPref($pref_name, $default, $index);
}
/**
* Retrieve theme config handlers.
* Multiple theme preference DB rows are supported
* Class overload is supported.
* Examples:
* - <code>e107::getTHemeConfig('mytheme');</code>
* will search for e107_plugins/myplug/e_pref/myplug_pref.php which
* should contain class 'e_plugin_myplug_pref' class (child of e_plugin_pref)
* - <code>e107::getPluginConfig('myplug', 'row2');</code>
* will search for e107_plugins/myplug/e_pref/myplug_row2_pref.php which
* should contain class 'e_plugin_myplug_row2_pref' class (child of e_plugin_pref)
*
* @param string $theme_name
* @param string $multi_row
* @param boolean $load load from DB on startup
* @return e_plugin_pref
*/
public static function getThemeConfig($theme_name=null, $multi_row = '', $load = true)
{
if(empty($theme_name))
{
$theme_name = self::getPref('sitetheme');
}
if(!isset(self::$_theme_config_arr[$theme_name.$multi_row]))
{
e107_require_once(e_HANDLER.'pref_class.php');
self::$_theme_config_arr[$theme_name.$multi_row] = new e_theme_pref($theme_name, $multi_row, $load);
}
return self::$_theme_config_arr[$theme_name.$multi_row];
}
/**
* Get current theme preference. $pref_name is parsed,
* so that $pref_name = 'x/y/z' will search for value pref_data[x][y][z]
@ -1040,10 +1103,21 @@ class e107
*/
public static function getThemePref($pref_name = '', $default = null, $index = null)
{
// new storage method in it's own core table row. eg. theme_bootstrap3
$theme_name = self::getPref('sitetheme');
if(self::getThemeConfig($theme_name)->hasData() === true)
{
return empty($pref_name) ? self::getThemeConfig($theme_name)->getPref() : self::getThemeConfig($theme_name)->get($pref_name, $default);
}
// old storage method in core prefs.
$legacy_pref_name = ($pref_name) ? $pref_name = '/'.$pref_name : '';
$tprefs = self::getConfig()->getPref('sitetheme_pref'.$legacy_pref_name, $default, $index);
if($pref_name) $pref_name = '/'.$pref_name;
$tprefs = self::getConfig()->getPref('sitetheme_pref'.$pref_name, $default, $index);
return !empty($tprefs) ? $tprefs : array();
}
/**
@ -1060,6 +1134,38 @@ class e107
return e107::getConfig()->updatePref('sitetheme_pref/'.$pref_name, $pref_value, false);
}
public static function getThemeGlyphs()
{
$custom = self::getConfig()->getPref('sitetheme_glyphicons', false);
$theme = self::getConfig()->getPref('sitetheme', false);
$arr = array();
if(!empty($custom))
{
foreach($custom as $glyphConfig)
{
if(substr($glyphConfig['path'],0,4) !== 'http')
{
$glyphConfig['path'] = e_THEME."$theme/".$glyphConfig['path'];
}
$arr[] = $glyphConfig;
}
}
return $arr;
}
/**
* Retrieve text parser singleton object
*
@ -1197,7 +1303,7 @@ class e107
}
/**
/**
* Retrieve rater singleton object
*
* @return rater
@ -1279,6 +1385,19 @@ class e107
return self::getSingleton('e_menu', true);
}
/**
* Retrieve rater singleton object
*
* @return e_theme
*/
public static function getTheme()
{
return self::getSingleton('e_theme', true);
}
/**
* Retrieve URL singleton object
*
@ -1756,6 +1875,22 @@ class e107
return e_jsmanager::getInstance();
}
public static function set($type=null, $val=true)
{
if($type === 'js_enabled')
{
self::$_js_enabled = (bool) $val;
}
if($type === 'css_enabled')
{
self::$_css_enabled = (bool) $val;
}
}
/**
* JS Common Public Function. Prefered is shortcode script path
* @param string $type core|theme|footer|inline|footer-inline|url or any existing plugin_name
@ -1765,6 +1900,11 @@ class e107
*/
public static function js($type, $data, $dep = null, $zone = null, $pre = '', $post = '')
{
if(self::$_js_enabled === false)
{
return null;
}
$jshandler = e107::getJs();
$jshandler->setDependency($dep);
@ -1858,6 +1998,11 @@ class e107
define("BOOTSTRAP", true);
}
if(self::$_css_enabled === false)
{
return null;
}
$jshandler = e107::getJs();
$jshandler->setDependency($dep);
@ -3388,7 +3533,7 @@ class e107
exit();
}
$regex = "/(wget |curl -o |fetch |lwp-download|onmouse)/i";
$regex = "/(wget |curl -o |lwp-download|onmouse)/i";
if(preg_match($regex,$input))
{
header('HTTP/1.0 400 Bad Request', true, 400);
@ -4495,4 +4640,66 @@ class e107
self::$_registry = null;
self::$_instance = null;
}
/**
* Check if there's a core e107 release available
* @return array|bool - return array of data or false if no update available.
*/
public static function coreUpdateAvailable()
{
// Get site version
$e107info= array();
if(is_readable(e_ADMIN."ver.php"))
{
include(e_ADMIN."ver.php"); // $e107info['e107_version'];
}
else
{
return false;
}
$xml = e107::getXml();
$file = "https://e107.org/releases.php";
if(!$xdata = $xml->loadXMLfile($file,true,false))
{
return false;
}
$curVersion = str_replace(' (git)', '', $e107info['e107_version']);
if(empty($xdata['core'][0]['@attributes']['version']))
{
return false;
}
else
{
$newVersion = $xdata['core'][0]['@attributes']['version'];
}
e107::getDebug()->log("New Version:".$newVersion);
if(version_compare($curVersion,$newVersion) === -1)
{
$data = array(
'name' => $xdata['core'][0]['@attributes']['name'],
'url' => $xdata['core'][0]['@attributes']['url'],
'date' => $xdata['core'][0]['@attributes']['date'],
'version' => $xdata['core'][0]['@attributes']['version'],
'infourl' => $xdata['core'][0]['@attributes']['infourl'],
'description' => $xdata['core'][0]['description'],
);
return $data;
}
return false;
}
}

View File

@ -225,6 +225,54 @@ class e_marketplace
}
/**
* @param $data - e107.org plugin/theme feed data.
*/
public function getDownloadModal($type='plugin',$data)
{
$url = false;
if($type === 'plugin')
{
$srcData = array(
'plugin_id' => $data['params']['id'],
'plugin_folder' => $data['folder'],
'plugin_price' => $data['price'],
'plugin_mode' => $data['params']['mode'],
'plugin_url' => $data['url'],
);
$d = http_build_query($srcData,false,'&');
$url = e_ADMIN.'plugin.php?mode=download&src='.base64_encode($d);
}
if($type === 'theme')
{
$srcData = array(
'id' => $data['params']['id'],
'url' => $data['url'],
'mode' => 'addon',
'price' => $data['price']
);
$d = http_build_query($srcData,false,'&');
$url = e_ADMIN.'theme.php?mode=download&src='.base64_encode($d);//$url.'&amp;action=download';
}
return $url;
}
public function getVersionList($type='plugin')
{
$cache = e107::getCache();
@ -408,7 +456,7 @@ abstract class e_marketplace_adapter_abstract
}
if($fl->unzipArchive($localfile,$type))
if($fl->unzipArchive($localfile,$type, true))
{
$mes->addSuccess(TPVLAN_82);
return true;

View File

@ -2,26 +2,14 @@
/*
* e107 website system
*
* Copyright (C) 2008-2011 e107 Inc (e107.org)
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Text processing and parsing functions
*
* $URL$
* $Id$
*
*/
/**
* @package e107
* @subpackage e107_handlers
* @version $Id$
*
* Text processing and parsing functions.
* Simple parse data model.
*/
if (!defined('e107_INIT')) { exit(); }
// Directory for the hard-coded utf-8 handling routines
@ -2561,17 +2549,21 @@ class e_parse extends e_parser
if(empty($parm['w']) && isset($parm['h']))
{
$parm['h'] = ($parm['h'] * $multiply) ;
return $this->thumbUrl($src, $parm)." h".$parm['h']." ".$multiply;
return $this->thumbUrl($src, $parm)." ".$parm['h']."h ".$multiply;
}
$width = (!empty($parm['w'])) ? ($parm['w'] * $multiply) : ($this->thumbWidth * $multiply);
$height = (!empty($parm['h'])) ? ($parm['h'] * $multiply) : ($this->thumbHeight * $multiply);
$width = (!empty($parm['w']) || !empty($parm['h'])) ? (intval($parm['w']) * $multiply) : ($this->thumbWidth * $multiply);
$height = (!empty($parm['h']) || !empty($parm['w'])) ? (intval($parm['h']) * $multiply) : ($this->thumbHeight * $multiply);
}
else
{
$height = (($this->thumbHeight * $width) / $this->thumbWidth);
}
if(!isset($parm['aw']))
{
$parm['aw'] = null;
@ -2598,6 +2590,8 @@ class e_parse extends e_parser
// $parms['x'] = $encode;
if(!empty($parm['return']) && $parm['return'] == 'src')
{
return $this->thumbUrl($src, $parms);
@ -3315,7 +3309,9 @@ class e_parser
'video' => array('autoplay', 'controls', 'height', 'loop', 'muted', 'poster', 'preload', 'src', 'width'),
'td' => array('id', 'style', 'class', 'colspan', 'rowspan'),
'th' => array('id', 'style', 'class', 'colspan', 'rowspan'),
'col' => array('id', 'span', 'class','style')
'col' => array('id', 'span', 'class','style'),
'embed' => array('id', 'src', 'style', 'class', 'wmode', 'type', 'title', 'width', 'height'),
);
protected $badAttrValues = array('javascript[\s]*?:','alert\(','vbscript[\s]*?:','data:text\/html', 'mhtml[\s]*?:', 'data:[\s]*?image');
@ -3614,7 +3610,7 @@ class e_parser
}
else
{
$prefix = 'icon-';
// $prefix = 'icon-';
$tag = 'i';
}
@ -3841,11 +3837,11 @@ class e_parser
return null;
}
e107::getDebug()->log($file);
e107::getDebug()->log($parm);
// e107::getDebug()->log($file);
// e107::getDebug()->log($parm);
if(strpos($file,'e_MEDIA')!==false || strpos($file,'e_THEME')!==false || strpos($file,'e_PLUGIN')!==false) //v2.x path.
if(strpos($file,'e_MEDIA')!==false || strpos($file,'e_THEME')!==false || strpos($file,'e_PLUGIN')!==false || strpos($file,'{e_IMAGE}')!==false) //v2.x path.
{
if(!isset($parm['w']) && !isset($parm['h']))
@ -4090,8 +4086,8 @@ class e_parser
e107::getFile()->getRemoteFile($thumbSrc, $filename,'media');
}
return "<a href='".$url."'><img class='video-responsive video-thumbnail' src='{e_MEDIA}".$filename."' alt='Youtube Video' title='Click to view on Youtube' />
<div class='video-thumbnail-caption'><small>Click to watch video</small></div></a>";
return "<a href='".$url."'><img class='video-responsive video-thumbnail' src='{e_MEDIA}".$filename."' alt='".LAN_YOUTUBE_VIDEO."' title='".LAN_CLICK_TO_VIEW."' />
<div class='video-thumbnail-caption'><small>".LAN_CLICK_TO_VIEW."</small></div></a>";
}
if($thumb == 'src')
@ -4121,7 +4117,7 @@ class e_parser
{
$thumbSrc = e_IMAGE_ABS."generic/playlist_120.png";
}
return "<img class='img-responsive' src='".$thumbSrc."' alt='Youtube Video Playlist' style='width:".vartrue($parm['w'],'80')."px'/>";
return "<img class='img-responsive' src='".$thumbSrc."' alt='".LAN_YOUTUBE_PLAYLIST."' style='width:".vartrue($parm['w'],'80')."px'/>";
}
@ -4651,6 +4647,7 @@ return;
$value = preg_replace('/^<pre[^>]*>/', '', $value);
$value = str_replace("</pre>", "", $value);
$value = str_replace('<br></br>', PHP_EOL, $value);
}
if($node->nodeName == 'code')
@ -4666,6 +4663,16 @@ return;
$newNode = $doc->createElement($node->nodeName);
$newNode->nodeValue = $value;
if($class = $node->getAttribute('class'))
{
$newNode->setAttribute('class',$class);
}
if($style = $node->getAttribute('style'))
{
$newNode->setAttribute('style',$style);
}
$node->parentNode->replaceChild($newNode, $node);
}

View File

@ -1003,24 +1003,27 @@ class e_file
*/
public function getUserDir($user, $create = false, $subDir = null)
{
$user = intval($user);
$tp = e107::getParser();
$baseDir = e_MEDIA.'plugins/'.e_CURRENT_PLUGIN.'/';
if(!empty($subDir))
{
$subDir = e107::getParser()->filter($subDir,'w');
$baseDir .= rtrim($subDir,'/').'/';
}
$baseDir .= ($user) ? "user_". $tp->leadingZeros($user, 6) : "anon";
if(is_numeric($user))
{
$baseDir .= ($user > 0) ? "user_". $tp->leadingZeros($user, 6) : "anon";
}
if($create == true && !is_dir($baseDir))
{
mkdir($baseDir, 0755, true); // recursively
}
$baseDir .= "/";
$baseDir = rtrim($baseDir,'/')."/";
return $baseDir;
}
@ -1195,7 +1198,7 @@ class e_file
{
require_once(e_HANDLER."upload_handler.php");
if($uploaddir == e_UPLOAD || $uploaddir == e_TEMP || $uploaddir = e_AVATAR_UPLOAD)
if($uploaddir == e_UPLOAD || $uploaddir == e_TEMP || $uploaddir == e_AVATAR_UPLOAD)
{
$path = $uploaddir;
}
@ -1318,7 +1321,7 @@ class e_file
* @param string $type - addon type, either 'plugin' or 'theme', (possibly 'language' in future).
* @return string unzipped folder name on success or false.
*/
public function unzipArchive($localfile, $type)
public function unzipArchive($localfile, $type, $overwrite=false)
{
$mes = e107::getMessage();
@ -1326,7 +1329,7 @@ class e_file
$dir = false;
if(class_exists('ZipArchive') && e_DEBUG === true) // PHP7 compat. method.
if(class_exists('ZipArchive')) // PHP7 compat. method.
{
$zip = new ZipArchive;
@ -1335,6 +1338,7 @@ class e_file
for($i = 0; $i < $zip->numFiles; $i++ )
{
$filename = $zip->getNameIndex($i);
$fileinfo = pathinfo($filename);
if($fileinfo['dirname'] === '.')
@ -1342,6 +1346,10 @@ class e_file
$dir = $fileinfo['basename'];
break;
}
elseif($fileinfo['basename'] === 'plugin.php' || $fileinfo['basename'] === 'theme.php')
{
$dir = $fileinfo['dirname'];
}
// $stat = $zip->statIndex( $i );
// print_a( $stat['name'] );
@ -1351,10 +1359,18 @@ class e_file
$zip->extractTo(e_TEMP);
chmod(e_TEMP.$dir, 0755);
if(empty($dir) && e_DEBUG)
{
print_a($fileinfo);
}
$zip->close();
}
}
else // Legacy Method.
{
@ -1374,15 +1390,30 @@ class e_file
if($dir && is_dir($destpath.$dir))
{
$mes->addError("(".ucfirst($type).") Already Downloaded - ".basename($destpath).'/'.$dir);
if(file_exists(e_TEMP.$localfile))
if($overwrite === true)
{
@unlink(e_TEMP.$localfile);
if(file_exists(e_TEMP.$localfile))
{
$time = date("YmdHi");
if(rename($destpath.$dir, e_BACKUP.$dir."_".$time))
{
$mes->addSuccess("Old folder moved to backup directory");
}
}
}
else
{
$this->removeDir(e_TEMP.$dir);
return false;
$mes->addError("(".ucfirst($type).") Already Downloaded - ".basename($destpath).'/'.$dir);
if(file_exists(e_TEMP.$localfile))
{
@unlink(e_TEMP.$localfile);
}
$this->removeDir(e_TEMP.$dir);
return false;
}
}
if(empty($dir))

View File

@ -8,9 +8,6 @@
*
* Form Handler
*
* $URL$
* $Id$
*
*/
if (!defined('e107_INIT')) { exit; }
@ -79,6 +76,7 @@ class e_form
function __construct($enable_tabindex = false)
{
e107_include_once(e_LANGUAGEDIR.e_LANGUAGE."/lan_form_handler.php");
$this->_tabindex_enabled = $enable_tabindex;
$this->_uc = e107::getUserClass();
$this->setRequiredString('<span class="required">*&nbsp;</span>');
@ -142,7 +140,7 @@ class e_form
else
{
$target = str_replace("&", "&amp;", $target);
$text = "\n<form {$class} action='{$target}' id='".$this->name2id($name)."' method = '{$method}'{$autoComplete}>\n";
$text = "\n<form {$class} action='{$target}' id='".$this->name2id($name)."' method='{$method}'{$autoComplete}>\n";
}
return $text;
}
@ -2889,7 +2887,22 @@ e107::getDebug()->log($sc_parameters);
}
/**
* Render a direct link admin-edit button on the frontend.
* @param $url
* @param string $perms
* @return string
*/
public function instantEditButton($url, $perms='0')
{
if(deftrue("BOOTSTRAP") && getperms($perms))
{
return "<span class='e-instant-edit hidden-print'><a target='_blank' title='".LAN_EDIT."' href='".$url."'>".e107::getParser()->toGlyph('fa-edit')."</a></span>";
}
return '';
}
@ -4333,8 +4346,7 @@ e107::getDebug()->log($sc_parameters);
case 'icon':
$parms['size'] = '2x';
$value = $tp->toIcon($value,$parms);
$value = "<span class='icon-preview'>".$tp->toIcon($value,$parms)."</span>";
break;

View File

@ -100,6 +100,8 @@ class eIPHandler
*/
private $ourIP = '';
private $serverIP = '';
private $debug = false;
/**
* Host name of current user
@ -168,6 +170,9 @@ class eIPHandler
$this->ourIP = $this->ipEncode($this->getCurrentIP());
$this->serverIP = $this->ipEncode($_SERVER['SERVER_ADDR']);
$this->makeUserToken();
$ipStatus = $this->checkIP($this->ourIP);
if ($ipStatus != 0)
@ -886,7 +891,7 @@ class eIPHandler
{
$ip = $this->getip(); // This will be in normalised IPV6 form
if ($ip != e107::LOCALHOST_IP && $ip != e107::LOCALHOST_IP2) // Check host name, user email to see if banned
if ($ip !== e107::LOCALHOST_IP && ($ip !== e107::LOCALHOST_IP2) && ($ip !== $this->serverIP)) // Check host name, user email to see if banned
{
$vals = array();
if (e107::getPref('enable_rdns'))

View File

@ -13,8 +13,6 @@
if (!defined('e107_INIT')) { exit; }
error_reporting(E_ALL);
// require_once(e_HANDLER.'user_handler.php'); //shouldn't be necessary
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_login.php');

View File

@ -2,20 +2,17 @@
/*
* e107 website system
*
* Copyright (C) e107 Inc (e107.org)
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Administration - Media Management Class
*
* $URL$
* $Id$
*
*/
if (!defined('e107_INIT')) { exit; }
//TODO LANS
class e_media
{
@ -486,6 +483,8 @@ class e_media
$query = "SELECT ".$fields." FROM #core_media WHERE `media_category` REGEXP '(^|,)".implode("|",$catArray)."(,|$)' AND `media_userclass` IN (".USERCLASS_LIST.") " ;
// $query = "SELECT ".$fields." FROM #core_media WHERE media_userclass IN (".USERCLASS_LIST.") AND ( ".implode(" OR ",$inc)." ) " ;
if($search)
{
$query .= " AND ( ".implode(" OR ",$searchinc)." ) " ;
@ -510,6 +509,9 @@ class e_media
{
$query .= " LIMIT ".$from." ,".$amount;
}
// e107::getDebug()->log($query);
e107::getDb()->gen($query);
while($row = e107::getDb()->fetch())
{
@ -573,7 +575,7 @@ class e_media
background-color:black;border:1px solid black;position:absolute; height:200px;width:205px;overflow-y:scroll; bottom:30px; right:100px'>";
$total = ($sql->gen("SELECT * FROM `#core_media` WHERE media_category = '_common' OR media_category = '".$cat."' ORDER BY media_category,media_datestamp DESC ")) ? TRUE : FALSE;
$text .= "<div style='font-size:120%;font-weight:bold;text-align:right;margin-right:10px'><a title='Close' style='text-decoration:none;color:white' href='#' onclick=\"expandit('{$formid}'); return false;\" >x</a></div>";
$text .= "<div style='font-size:120%;font-weight:bold;text-align:right;margin-right:10px'><a title='".LAN_CLOSE."' style='text-decoration:none;color:white' href='#' onclick=\"expandit('{$formid}'); return false;\" >x</a></div>";
while ($row = $sql->db_Fetch())
{
@ -869,13 +871,19 @@ class e_media
/**
* Get all Glyphs
* @param string|array $type
* @param $type['name']
* @param $type[['type']
* @param $type['path'] URL or e107 path {e_THEME} etc.
* @param $type['prefix']
* @param string $addPrefix
* @return array
*/
function getGlyphs($type='fa4',$prefix = '')
function getGlyphs($type='fa4', $addPrefix = '')
{
$icons = array();
if($type == 'bs2')
if($type === 'bs2')
{
$matches = array(
'glass','music','search','envelope','heart','star','star-empty','user','film','th-large','th','th-list','ok',
@ -897,13 +905,13 @@ class e_media
foreach($matches as $match)
{
$icons[] = $prefix.$match;
$icons[] = $addPrefix.$match;
}
return $icons;
}
if($type == 'bs3')
if($type === 'bs3')
{
$matches = array(
'adjust','align-center','align-justify','align-left','align-right','arrow-down','arrow-left','arrow-right','arrow-up','asterisk','backward','ban-circle','barcode','bell','bold','book
@ -922,42 +930,71 @@ class e_media
foreach($matches as $match)
{
$icons[] = $prefix.$match;
$icons[] = $addPrefix.$match;
}
return $icons;
}
$cache = e107::getCache();
$cachTag = !empty($prefix) ? "glyphs_".$prefix : "glyphs";
$cache->setMD5($cachTag, false);
if($data = $cache->retrieve($type,360,true))
if(is_array($type))
{
$prefix = $type['prefix'];
$pattern = $type['pattern'];
$path = $type['path'];
$type = $type['name'];
}
$cache = e107::getCache();
$cachTag = !empty($addPrefix) ? "Glyphs_".$addPrefix."_".$type : "Glyphs_".$type;
if($data = $cache->retrieve($cachTag ,360,true,true))
{
$cache->setMD5(null);
return e107::unserialize($data);
}
if($type == 'fa4')
if($type === 'fa4')
{
$pattern = '/\.(fa-(?:\w+(?:-)?)+):before/';
$subject = e107::getFile()->getRemoteContent('http://netdna.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.css');
// print_a($subject);
$subject = e107::getFile()->getRemoteContent('http://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css');
$prefix = 'fa-';
}
elseif($type == 'fa3')
elseif($type === 'fa3')
{
$pattern = '/\.(icon-(?:\w+(?:-)?)+):before/';
$subject = file_get_contents(e_WEB_JS.'font-awesome/css/font-awesome.css');
$prefix = 'fa-';
}
elseif(!empty($pattern) && !empty($path))
{
$pattern = '/'.$pattern.'/';
if(substr($path,0,4) === 'http')
{
$subject = e107::getFile()->getRemoteContent($path);
}
else
{
$path = e107::getParser()->replaceConstants($path);
$subject = file_get_contents($path);
}
}
$prefixLength = !empty($prefix) ? strlen($prefix) : 3;
preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER);
foreach($matches as $match)
{
$icons[] = $prefix.substr($match[1],3);
$icons[] = $addPrefix.substr($match[1],$prefixLength);
}
if(empty($icons)) // failed to produce a result so don't cache it. .
@ -967,14 +1004,15 @@ class e_media
$data = e107::serialize($icons);
$cache->set($type,$data,true);
$cache->setMD5(null);
$cache->set_sys($cachTag ,$data,true);
return $icons;
}
function getPath($mime, $path=null)
{
$mes = e107::getMessage();
@ -984,7 +1022,7 @@ class e_media
if(!vartrue($this->mimePaths[$pmime]))
{
$this->log("Couldn't detect mime-type ($mime).");
$text = $text = str_replace('[x]',$mime,IMALAN_111);
$text = $text = str_replace('[x]',$mime,IMALAN_111); //FIXME LAN IMALAN_112 is not generic. This method can be called from anywhere, not only e107_admin/image.php.
$mes->add($text, E_MESSAGE_ERROR);
return FALSE;
}

View File

@ -508,23 +508,16 @@ class e_menu
$text = $head.$tp->parseTemplate($template['body'], true, $page_shortcodes).$foot;
// echo "TEMPLATE= ($mpath)".$page['menu_template'];
$ns->setUniqueId('cmenu-'.$page['menu_name']);
$caption .= e107::getForm()->instantEditButton(e_ADMIN_ABS."cpage.php?mode=menu&action=edit&tab=2&id=".intval($page['page_id']),'J');
// if($template['noTableRender'] !==true) // XXX Deprecated - causes confusion while themeing. use {SETSTYLE=none} instead.
// {
$ns->setUniqueId('cmenu-'.$page['menu_name']);
$ns->tablerender($caption, $text, 'cmenu-'.$page['menu_template']);
// }
// else
// {
// echo $text;
// }
$ns->tablerender($caption, $text, 'cmenu-'.$page['menu_template']);
}
else
{
$text = $tp->toHTML($page['menu_text'], true, 'parse_sc, constants');
$ns->setUniqueId('cmenu-'.$page['menu_name']);
$ns->tablerender($caption, $text, 'cmenu');
}
@ -547,6 +540,9 @@ class e_menu
$id = e107::getForm()->name2id($mpath . $mname);
$ns->setUniqueId($id);
global $pref; // possibly used by plugin menu.
$e107_debug ? include(e_PLUGIN.$mpath.$mname.'.php') : @include(e_PLUGIN.$mpath.$mname.'.php');
}
e107::getDB()->db_Mark_Time("(After ".$mname.")");

File diff suppressed because it is too large Load Diff

View File

@ -1476,11 +1476,11 @@ class e_db_mysql
*
* @access public
*/
function fetch($type = 'assoc')
function fetch($type = null)
{
if (!is_int($type))
if(defined('e_LEGACY_MODE') && !is_int($type))
{
// $type='assoc';
$type='both';
}
if(defined('MYSQL_ASSOC'))
@ -1497,9 +1497,10 @@ class e_db_mysql
$type = ($this->pdo) ? PDO::FETCH_NUM : MYSQL_NUM;
break;
default:
case 'assoc':
case 1; //: // 1
default:
$type = ($this->pdo) ? PDO::FETCH_ASSOC : MYSQL_ASSOC;
break;
}

View File

@ -306,7 +306,7 @@ class e107plugin
$needed[$path] = $data;
}
if($curVal < $fileVal) // check pref version against file version.
if(version_compare($curVal,$fileVal,"<")) // check pref version against file version.
{
if($mode == 'boolean')
@ -543,6 +543,11 @@ class e107plugin
$this->rebuildUrlConfig();
e107::getConfig('core')->save(true,false,false);
}
// Triggering system (post) event.
e107::getEvent()->trigger('system_plugins_table_updated', array(
'mode' => $mode,
));
}
function manage_category($cat)

View File

@ -69,7 +69,7 @@ class e_pref extends e_front_model
* Constructor
*
* @param string $prefid
* @param string $alias
* @param string $alias Used by cache file.
* @param array $data
* @param boolean $sanitize_data
*/
@ -83,6 +83,7 @@ class e_pref extends e_front_model
{
$alias = $prefid;
}
$this->alias = preg_replace('/[^\w\-]/', '', $alias);
$this->loadData($data, $sanitize_data);
@ -965,7 +966,7 @@ class e_plugin_pref extends e_pref
{
$plugin_id = $plugin_id.'_'.$multi_row;
}
parent::__construct('plugin_'.$plugin_id, $this->plugin_id);
parent::__construct('plugin_'.$plugin_id, "plugin_".$this->plugin_id);
if($load && e107::findPref('plug_installed/'.$this->plugin_id))
{
$this->load();
@ -999,6 +1000,81 @@ class e_plugin_pref extends e_pref
}
}
/**
* Handle plugin preferences
*
* @package e107
* @category e107_handlers
* @version 1.0
* @author SecretR
* @copyright Copyright (c) 2009, e107 Inc.
*/
class e_theme_pref extends e_pref
{
/**
* Unique plugin name
*
* @var string
*/
protected $theme_id;
/**
* Constructor
* Note: object data will be loaded only if the plugin is installed (no matter of the passed
* $load value)
*
* @param string $theme_id unique plugin name
* @param string $multi_row additional field identifier appended to the $prefid
* @param boolean $load load on startup
*/
function __construct($theme_id, $multi_row = '', $load = true)
{
$this->theme_id = $theme_id;
if($multi_row)
{
$theme_id = $theme_id.'_'.$multi_row;
}
parent::__construct('theme_'.$theme_id, "theme_".$this->theme_id);
// if($load && e107::findPref('plug_installed/'.$this->theme_id))
{
$this->load();
}
}
/**
* Retrive unique plugin name
*
* @return string
*/
public function getPluginId()
{
return $this->theme_id;
}
/**
* Delete plugin preferences
* @see e107_handlers/e_pref#delete()
* @return boolean
*/
public function delete($ids, $destroy = true, $session_messages = false)
{
$ret = false;
if($this->theme_id)
{
$ret = e107::getDb($this->theme_id)->delete('core', "e107_name='{$this->theme_id}'");
$this->destroy();
}
return $ret;
}
}
/**
* DEPRECATED - see e107::getConfig(), e_core_pref and e_plugin_pref
*

View File

@ -1,14 +1,13 @@
<?php
/*
* e107 website system
*
* Copyright (C) e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* $URL$
* $Id$
*/
+ ----------------------------------------------------------------------------+
|
| e107 website system
| Copyright (C) 2008-2016 e107 Inc (e107.org)
| Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
+ ----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
@ -64,9 +63,9 @@ class rater {
$template = vartrue($options['template'], " STATUS |RATE|VOTES");
$TEMPLATE['STATUS'] = "&nbsp;<span class='e-rate-status e-rate-status-{$table}' id='e-rate-{$table}-{$id}' style='display:none'>".$label."</span>";
$TEMPLATE['RATE'] = "<div class='e-rate e-rate-{$table}' id='{$table}-{$id}' data-hint=\"{$datahint}\" data-readonly='{$readonly}' data-score='{$score}' data-url='".e_HTTP."rate.php' data-path='{$path}'></div>";
$TEMPLATE['VOTES'] = "<div class='muted e-rate-votes e-rate-votes-{$table}' id='e-rate-votes-{$table}-{$id}'><small>".$this->renderVotes($votes,$score)."</small></div>";
$TEMPLATE['STATUS'] = "&nbsp;<span class='e-rate-status e-rate-status-{$table}' id='e-rate-{$table}-{$id}' style='display:none'>".$label."</span>";
$TEMPLATE['RATE'] = "<div class='e-rate e-rate-{$table}' id='{$table}-{$id}' data-hint=\"{$datahint}\" data-readonly='{$readonly}' data-score='{$score}' data-url='".e_HTTP."rate.php' data-path='{$path}'></div>";
$TEMPLATE['VOTES'] = "<div class='muted e-rate-votes e-rate-votes-{$table}' id='e-rate-votes-{$table}-{$id}'><small>".$this->renderVotes($votes,$score)."</small></div>";
$tmp = explode("|",$template);
@ -188,7 +187,7 @@ class rater {
if($id == 0)
{
return "There is no item ID in the rating";
return RATELAN_10;
}
$sep = chr(1);
@ -270,8 +269,8 @@ class rater {
$p = ($perc) ? "%" : "";
$upImg = "<img class='e-tip' src='".e_IMAGE_ABS."rate/like_16.png' alt='' title='Like' />";
$upDown = "<img class='e-tip' src='".e_IMAGE_ABS."rate/dislike_16.png' alt='' title='Dislike' />";
$upImg = "<img class='e-tip' src='".e_IMAGE_ABS."rate/like_16.png' alt='' title='".RATELAN_7."' />";//like
$upDown = "<img class='e-tip' src='".e_IMAGE_ABS."rate/dislike_16.png' alt='' title='".RATELAN_8."' />";//dislike
if(deftrue('BOOTSTRAP'))
{
@ -397,7 +396,7 @@ class rater {
}
else
{
return "Error: ".print_a($qs,true);
return LAN_ERROR.": ".print_a($qs,true);
}
}
@ -425,7 +424,7 @@ class rater {
if(strpos($row['rate_voters'], ".".$voter.".") == true || strpos($row['rate_voters'], ".".USERID.".") == true)
{
return "You already voted|".$this->renderVotes($new_votes,$statR); // " newvotes = ".($statR). " =".$new_votes;
return RATELAN_9."|".$this->renderVotes($new_votes,$statR); // " newvotes = ".($statR). " =".$new_votes;
}
@ -435,7 +434,7 @@ class rater {
}
else
{
return "Error";
return LAN_ERROR;
}
}
@ -463,7 +462,7 @@ class rater {
}
elseif(getperms('0'))
{
return "Rating Failed ";
return RATELAN_11;
}
}

View File

@ -205,9 +205,9 @@ class e_session
{
$config['SavePath'] = e107::getPref('session_save_path', false); // FIXME - new pref
$config['SaveMethod'] = e107::getPref('session_save_method', 'files'); // FIXME - new pref
$options['lifetime'] = (integer) e107::getPref('session_lifetime', 86400); // FIXME - new pref
$options['lifetime'] = (integer) e107::getPref('session_lifetime', 86400); //
$options['path'] = e107::getPref('session_cookie_path', ''); // FIXME - new pref
$options['secure'] = e107::getPref('ssl_enabled', false); // FIXME - new pref
$options['secure'] = e107::getPref('ssl_enabled', false); //
}
if(defined('SESSION_SAVE_PATH')) // safer than a pref.

View File

@ -1468,10 +1468,10 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
foreach ($data as $_data)
{
$active = ($this->isActive($_data, $this->activeMainFound)) ? "_active" : "";
$sc->setDepth(0);
$sc->setVars($_data); // isActive is allowed to alter data
$itemTmpl = count($_data['link_sub']) > 0 ? $template['item_submenu'.$active] : $template['item'.$active];
$ret .= e107::getParser()->parseTemplate($itemTmpl, TRUE, $sc);
$ret .= e107::getParser()->parseTemplate($itemTmpl, true, $sc);
$sc->active = ($active) ? true : false;
if($sc->active)
{
@ -1498,7 +1498,9 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
$data = $sql->retrieve($query,true);
return $this->compile($data, $outArray);
$ret = $this->compile($data, $outArray);
return $ret;
}
@ -1556,8 +1558,10 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
if(include_once(e_PLUGIN.$path."/e_sitelink.php"))
{
$class = $path."_sitelink";
if($sublinkArray = e107::callMethod($class,$method,$parm)) //TODO Cache it.
if($sublinkArray = e107::callMethod($class,$method,$parm,$row)) //TODO Cache it.
{
return $sublinkArray;
}
}
@ -1665,6 +1669,7 @@ class navigation_shortcodes extends e_shortcode
public $template;
public $counter;
public $active;
public $depth = 0;
/**
@ -1693,6 +1698,17 @@ class navigation_shortcodes extends e_shortcode
return intval($this->var['link_id']);
}
function sc_link_depth($parm='')
{
return $this->depth;
}
function setDepth($val)
{
$this->depth = intval($val);
}
/**
* Return the name of the current link
@ -1864,9 +1880,13 @@ class navigation_shortcodes extends e_shortcode
return $this->var['link_sub'];
}
$this->depth++;
// Assume it's an array.
$text = e107::getParser()->parseTemplate(str_replace('{LINK_SUB}', '', $this->template['submenu_start']), true, $this);
$startTemplate = !empty($this->var['link_sub'][0]['link_sub']) && isset($this->template['submenu_lowerstart']) ? $this->template['submenu_lowerstart'] : $this->template['submenu_start'];
$endTemplate = !empty($this->var['link_sub'][0]['link_sub']) && isset($this->template['submenu_lowerstart']) ? $this->template['submenu_lowerend'] : $this->template['submenu_end'];
$text = e107::getParser()->parseTemplate(str_replace('{LINK_SUB}', '', $startTemplate), true, $this);
foreach($this->var['link_sub'] as $val)
{
@ -1877,7 +1897,7 @@ class navigation_shortcodes extends e_shortcode
if($active) $this->activeSubFound = true;
}
$text .= e107::getParser()->parseTemplate(str_replace('{LINK_SUB}', '', $this->template['submenu_end']), true, $this);
$text .= e107::getParser()->parseTemplate(str_replace('{LINK_SUB}', '', $endTemplate), true, $this);
return $text;
}

File diff suppressed because it is too large Load Diff

View File

@ -872,9 +872,9 @@ class xmlClass
* @param boolean $debug [optional]
* @return string text / file for download
*/
public function e107Export($xmlprefs, $tables, $debug = FALSE)
public function e107Export($xmlprefs, $tables, $plugPrefs, $mode = false)
{
error_reporting(0);
// error_reporting(0);
$e107info = array();
require_once(e_ADMIN."ver.php");
@ -904,7 +904,7 @@ class xmlClass
{
continue;
}
elseif($debug == true)
elseif($mode === 'debug')
{
echo "<div>Original/Modiied <b>".$key."</b>";
var_dump($default[$key],$val);
@ -921,6 +921,32 @@ class xmlClass
$text .= "\t</prefs>\n";
}
if(!empty($plugPrefs))
{
$text .= "\t<pluginPrefs>\n";
foreach($plugPrefs as $plug)
{
$prefs = e107::getPlugConfig($plug)->getPref();
foreach($prefs as $key=>$val)
{
if(isset($val))
{
$text .= "\t\t<".$plug." name=\"".$key."\">".$this->e107ExportValue($val)."</".$plug.">\n";
}
}
}
$text .= "\t</pluginPrefs>\n";
}
if(varset($tables))
{
$text .= "\t<database>\n";
@ -958,10 +984,16 @@ class xmlClass
$text .= "</e107Export>";
if($debug==TRUE)
if($mode === 'return')
{
return $text;
}
if($mode === 'debug')
{
echo "<pre>".htmlentities($text)."</pre>";
return TRUE;
return null;
}
else
{
@ -991,12 +1023,16 @@ class xmlClass
* Return an Array of core preferences from e107 XML Dump data
*
* @param array $XMLData Raw XML e107 Export Data
* @param string $prefType [optional] the type of core pref: core|emote|ipool|menu etc.
* @param string $prefType [optional] the type of core pref: core|emote|ipool|menu etc or plugin-folder name
* @param string $mode core|plugin
* @return array preference array equivalent to the old $pref global;
*/
public function e107ImportPrefs($XMLData, $prefType='core')
public function e107ImportPrefs($XMLData, $prefType='core', $mode='core')
{
if(!vartrue($XMLData['prefs'][$prefType]))
$key = ($mode === 'core') ? 'prefs' : 'pluginPrefs';
if(!vartrue($XMLData[$key][$prefType]))
{
return array();
}
@ -1004,7 +1040,7 @@ class xmlClass
//$mes = eMessage::getInstance();
$pref = array();
foreach($XMLData['prefs'][$prefType] as $val)
foreach($XMLData[$key][$prefType] as $val)
{
$name = $val['@attributes']['name'];
// if(strpos($val['@value'], 'array (') === 0)
@ -1052,7 +1088,9 @@ class xmlClass
$ret = array();
if(vartrue($xmlArray['prefs'])) // Save Core Prefs
// ----------------- Save Core Prefs ---------------------
if(!empty($xmlArray['prefs']))
{
foreach($xmlArray['prefs'] as $type=>$array)
{
@ -1080,6 +1118,40 @@ class xmlClass
}
}
// --------------- Save Plugin Prefs ---------------------
if(!empty($xmlArray['pluginPrefs']))
{
foreach($xmlArray['pluginPrefs'] as $type=>$array)
{
$pArray = $this->e107ImportPrefs($xmlArray,$type, 'plugin');
if($mode == 'replace') // merge with existing, add new
{
e107::getPlugConfig($type)->setPref($pArray);
}
else // 'add' only new prefs
{
foreach ($pArray as $pname => $pval)
{
e107::getPlugConfig($type)->add($pname, $pval); // don't parse x/y/z
}
}
if($debug == false)
{
e107::getPlugConfig($type)
->setParam('nologs', $noLogs)
->save(FALSE,TRUE);
}
}
}
if(vartrue($xmlArray['database']))
{
foreach($xmlArray['database']['dbTable'] as $val)

BIN
e107_images/logoHD.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

View File

@ -1,6 +1,10 @@
<?php
/*
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* e107 website system
*
* Copyright (C) 2008-2017 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* English language file - generic terms and system LAN
*
@ -61,6 +65,7 @@ define("LAN_WARNING", "Warning!");
define("LAN_ERROR", "Error");
define("LAN_ANONYMOUS", "Anonymous");
define("LAN_EMAIL_SUBS", "-email-");
define("LAN_ACTIVE","Active");
define("LAN_YES", "Yes");
define("LAN_NO", "No");
define("LAN_OK", "OK");
@ -72,6 +77,7 @@ define("LAN_ENTER_CODE", "Enter code");
define("LAN_INVALID_CODE", "Incorrect code entered.");
define("LAN_SEARCH", "Search");
define("LAN_VIEW", "View");
define("LAN_CLICK_TO_VIEW", "Click to View");//TODO elsewhere
define("LAN_SORT", "Sort");
define("LAN_ORDER_BY", "Order By");
define("LAN_ASCENDING", "Ascending");
@ -83,6 +89,7 @@ define("LAN_DESCRIPTION", "Description");
define("LAN_CANCEL","Cancel");
define("LAN_DATE","Date");
define("LAN_DATE_POSTED", "Date posted");
define("LAN_POSTED_BY", "Posted by");
define("LAN_JSCONFIRM","Are you sure?");
define("LAN_IP","IP");
define("LAN_IP_ADDRESS","IP Address");
@ -99,6 +106,8 @@ define("LAN_INCORRECT_PASSWORD", "Incorrect Password");
define("LAN_TYPE", "Type");
define("LAN_SCREENSHOT", "Screenshot");
define("LAN_FILE", "File");
define("LAN_YOUTUBE_VIDEO", "Youtube Video");
define("LAN_YOUTUBE_PLAYLIST", "Youtube Playlist");
define("LAN_FILETYPES", "Filetypes");
define("LAN_FILE_NOT_FOUND", "File Not Found");
define("LAN_FILES","Files");

View File

@ -16,6 +16,12 @@ if (!getperms("2"))
exit;
}
if(e_DEBUG_MENUMANAGER === true)
{
return;
}
$sql = e107::getDb();
$tp = e107::getParser();
$frm = e107::getForm();

View File

@ -1,6 +1,10 @@
<?php
/*
* Copyright (C) 2008-2016 e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* e107 website system
*
* Copyright (C) 2008-2017 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Admin Language File
*
@ -125,7 +129,7 @@ define("ADLAN_119", "Unchecked submitted links");
define("ADLAN_120", "There is a database update available, please click button to install ...");
define("ADLAN_121", "Install");
define("ADLAN_122", "A new update is ready to install! Click to unzip and install v [x]");
//define("ADLAN_123", "Unchecked submitted articles");
//define("ADLAN_124", "Unchecked submitted reviews");
@ -185,6 +189,14 @@ define("ADLAN_163", "A newer version of an installed plugin is available:");
define("ADLAN_164", "Successfully logged in as [x].");
define("ADLAN_165", "Powered by e107");
define("ADLAN_166", "Return to Website");
define("ADLAN_167", "Pending Mailshots");
define("ADLAN_168", "Visitors");//infopanel
define("ADLAN_169", "Unique Visitors");
define("ADLAN_170", "These stats are for demonstration purposes only.");
define("ADLAN_171", "Install Site Stats Plugin");
define("ADLAN_185", "Toggle Sidebar");
// define("ADLAN_CL_1", "Settings");
define("ADLAN_CL_2", "Users");
@ -226,13 +238,20 @@ Below is the list of files that could potentially be malicious:");
define("LAN_CREATE","Create");
define("LAN_MANAGE","Manage");
define("LAN_UPDATE","Update");
define("LAN_LAST_UPDATED","Last Updated");
define("LAN_UPDATE_AVAILABLE","Update Available");
define("LAN_ADD", "Add");
define("LAN_ADD_MORE", "Add More");
define("LAN_MULTIPLE_CHOICE", "Multiple Choice");
define("LAN_SAVE","Save");
define("LAN_SAVED","Saved");
define("LAN_SETSAVED","Your settings have been saved");
define("LAN_NOCHANGE_NOTSAVED", "Nothing changed - not saved");
define("LAN_CONFIRMDEL","Please confirm you wish to delete");
define("LAN_ERRORS", "Errors");
define("LAN_MESSAGES", "Messages");
define("LAN_DATA", "Data");
define("LAN_OPTIONS","Options");
define("LAN_PREFS","Preferences");
@ -298,7 +317,7 @@ define("LAN_LANG","Lang.");
define("LAN_APPROVE","Approve");
define("LAN_OPTIONAL", "optional");
define("LAN_INACTIVE","Inactive");
define("LAN_ACTIVE","Active");
//define("LAN_ACTIVE","Active");//English.php
define("LAN_ACCEPT","Accept");
define("LAN_PENDING","Pending");
define("LAN_SUBMITTED","Submitted");
@ -333,7 +352,7 @@ define("LAN_CONFIGURE", "Configure");
define("LAN_NOPERMISSION", "no permissions");
define("LAN_CREDITS","Credits");
define("LAN_NEWVERSION","New Version Available");
define("LAN_NEWVERSION","e107 v[x] Available");
define("LAN_CHECKALL", "Check All");
define("LAN_UNCHECKALL", "Uncheck All");
@ -365,6 +384,8 @@ define("LAN_ID", "ID");
define("LAN_VISIBILITY", "Visibility");
define("LAN_VISIBLE_TO", "Visible To");
define("LAN_ICON", "Icon");
define("LAN_LOADING", "Loading...");
@ -427,6 +448,8 @@ define("LAN_UI_PREF_LABEL", "Settings");
define("LAN_UI_DELETE_LABEL", "Confirm Delete");
define("LAN_UI_DELETE_WARNING", "You are about to delete [x] records. Please confirm to continue.");
define("LAN_UI_BATCH_CREATELINK", "Create Link");
define("LAN_UI_DELETED", "[x] record(s) successfully deleted!");
define("LAN_UI_DELETED_FAILED", "[x] records not found and not deleted!");
define("LAN_UI_USING_DATABASE_TABLE", "Using [x] database table");
define("LAN_UI_TOTAL_RECORDS", "Total Records: [x]");
@ -461,6 +484,7 @@ define("LAN_FOLDER", "Folder");
define("LAN_PERSONALIZE_ICONS", "Personalize Icons");
define("LAN_PERSONALIZE_MENUS", "Personalize Menus");
define("LAN_LATEST_COMMENTS", "Latest Comments");
define("LAN_COMMENTS_ALLOWED", "Comments Allowed");
define("LAN_PERSONALIZE", "Personalize");
define("LAN_SELECT_COLUMNS_TO_DISPLAY", "Select columns to display");
define("LAN_DISPLAY_COLUMNS", "Display Columns");
@ -478,3 +502,8 @@ define("LAN_GO_TO_LIST", "go to list");
define("LAN_CREATE_ANOTHER", "create another");
define("LAN_EDIT_CURRENT", "edit current");
define("LAN_MAINTENANCE", "Maintenance");
define("LAN_RETURN_TO_FRONT_PANEL", "Return to Front Panel");
define("LAN_CHANGE_LANGUAGE", "Change Language");
define("LAN_NEWER_VERSION_OF_X", "A newer version of the [x] [y] is available for download."); // x= Name y = Theme | Plugin

View File

@ -82,8 +82,6 @@ define("RL_LAN_081", "Mail bounces");
define("RL_LAN_082", "User bans");
define("RL_LAN_083", "Mail bounce resets");
define("RL_LAN_084", "Temporary accounts");
define("RL_LAN_085", "[x] record(s) successfully deleted!");
define("RL_LAN_086", "[x] records not found and not deleted!");
define("RL_LAN_087", "Details");
// Intentional gap

View File

@ -86,8 +86,19 @@ define("LAN_CRON_52", "Day(s):");
define("LAN_CRON_53", "Month(s):");
define("LAN_CRON_54", "Weekday(s):");
define("LAN_CRON_60", "Go to cPanel");
define("LAN_CRON_61", "Generate new cron password");
define("LAN_CRON_62", "Executing config function [b][x][/b]");
define("LAN_CRON_63", "Config function [b][x][/b] NOT found.");
define("LAN_CRON_64", "An administrator can automate tasks using e107 Schedule Tasks. [br]
In the Manage Tab, you can edit, delete and run tasks. [br]
When you edit a task you can set the minutes, hours, days, month or day of the week you want the task to run. Use * to run for each period. Use the Active property to Enabled the Task.[br]
Note: You are advised not to delete standard jobs.[br]
");
define("LAN_CRON_BACKUP", "Backup");
define("LAN_CRON_LOGGING", "Logging");
define("LAN_CRON_RUNNING", "Running")
define("LAN_CRON_RUNNING", "Running");
?>

View File

@ -43,7 +43,7 @@ define("IMALAN_15", "Show nothing");
// define("IMALAN_17", "Click here");
define("IMALAN_18", "Uploaded Avatar Images");
// define("IMALAN_19", "Show 'disabled' message");
define('IMALAN_20', "Nothing changed");
define("IMALAN_20", "Nothing changed");
define("IMALAN_21", "Used by");
define("IMALAN_22", "Image not in use");
define("IMALAN_23", "Avatars");
@ -77,123 +77,127 @@ define("IMALAN_51", "Avatar for ");
define("IMALAN_52", "Path to ImageMagick appears to be incorrect");
define("IMALAN_53", "Path to ImageMagick appears to be correct, but convert file may not be valid");
define("IMALAN_54", "GD version installed:");
define('IMALAN_55', "Not installed");
define("IMALAN_55", "Not installed");
//v0.8
//uploaded avatar list
define('IMALAN_56', "Click to select");
define('IMALAN_57', "Image too big - click to enlarge");
define("IMALAN_56", "Click to select");
define("IMALAN_57", "Image too big - click to enlarge");
//avatar check
// define('IMALAN_61', "Options");
define('IMALAN_62', "Reason");
define('IMALAN_65', "Nothing found");
define('IMALAN_66', "Filename");
define('IMALAN_68', "Close");
define('IMALAN_69', "Folder");
define('IMALAN_70', "Non-system folder is found!");
// define("IMALAN_61", "Options");
define("IMALAN_62", "Reason");
define("IMALAN_65", "Nothing found");
define("IMALAN_66", "Filename");
define("IMALAN_68", "Close");
define("IMALAN_69", "Folder");
define("IMALAN_70", "Non-system folder is found!");
// define("IMALAN_72", "Icons");
define('IMALAN_73', "Thumbnail Quality");
define('IMALAN_74', "Set this as low as possible before quality loss is apparent. Max. 100");
define('IMALAN_75', "Avatar Width");
define('IMALAN_76', "Avatar images will be constrained to these dimensions (in pixels)");
define('IMALAN_77', "Avatar Height");
define('IMALAN_78', "General");
define('IMALAN_79', "Resize-Image Dimensions");
define('IMALAN_80', "Watermark Activation");
define('IMALAN_81', "All images with a width or height greater than this value will be given a watermark during resizing.");
define('IMALAN_82', "Watermark Text");
define('IMALAN_83', "Optional Watermark Text");
define('IMALAN_84', "Watermark Font");
define('IMALAN_85', "Optional Watermark Font. Upload more .ttf fonts to the /fonts folder in your theme directory.");
define('IMALAN_86', "Watermark Size");
define('IMALAN_87', "Size of the font in pts");
define('IMALAN_88', "Watermark Position");
define('IMALAN_89', "Watermark");
define('IMALAN_90', "Watermark Margin");
define('IMALAN_91', "The distance that watermark will appear from the edge of the image.");
define('IMALAN_92', "Watermark Color");
define('IMALAN_93', "Color of the watermark eg. 000000");
define('IMALAN_94', "Watermark Shadow-Color");
define('IMALAN_95', "Shadow Color of the watermark eg. ffffff");
define('IMALAN_96', "Watermark Opacity");
define('IMALAN_97', "Enter a number between 1 and 100");
define('IMALAN_98', "Default YouTube account");
define('IMALAN_99', "Used by the Media-Manager Youtube browser. Enter account name. eg. e107inc");
define('IMALAN_100', "Show Related Videos");
define('IMALAN_101', "Show Video Info");
define('IMALAN_102', "Show Closed-Captions by default");
define('IMALAN_103', "Use Modest Branding");
define('IMALAN_104', "Make the YouTube bbcode responsive");
define('IMALAN_105', "Resize images during media import");
define('IMALAN_106', "Leave empty to disable");
define('IMALAN_107', "Couldn't generated path from upload data");
define('IMALAN_108', "Couldn't move file from [x] to [y]");
define('IMALAN_109', "Couldn't get path");
define('IMALAN_110', "Path");
define('IMALAN_111', "Couldn't detect mime-type([x]). Upload failed.");
define('IMALAN_112', "Couldn't create folder ([x]).");
define('IMALAN_113', "Scanning for new media (images, videos, files) in folder:");
define('IMALAN_114', "No media Found! Please upload some files.");
define('IMALAN_115', "Title (internal use)");
define('IMALAN_116', "Caption (seen by public)");
//define('IMALAN_117', "Author"); // use LAN_AUTHOR
define('IMALAN_118', "Mime Type");
define('IMALAN_119', "File Size");
define('IMALAN_120', "Dimensions");
define('IMALAN_121', "Preview"); // use LAN_PREVIEW
define('IMALAN_122', "[x] couldn't be renamed. Check file perms.");
define('IMALAN_123', "Import into Category:");
define('IMALAN_124', "Import Selected Files");
define('IMALAN_125', "Delete Selected Files");
define('IMALAN_126', "Please check at least one file.");
define('IMALAN_127', "Couldn't get file info from:");
define('IMALAN_128', "Importing Media:");
define('IMALAN_129', "You are about to delete [x] records and <strong>ALL CORRESPONDING FILES</strong>! Please confirm to continue!");
define('IMALAN_130', "Previous page");
define('IMALAN_131', "Next page");
define('IMALAN_132', "Tags/Keywords");
define('IMALAN_133', "Bottom Right");
define('IMALAN_134', "Bottom Left");
define('IMALAN_135', "Top Right");
define('IMALAN_136', "Top Left");
define('IMALAN_137', "Center");
define('IMALAN_138', "Right");
define('IMALAN_139', "Left");
define('IMALAN_140', "Top");
define('IMALAN_141', "Bottom");
define('IMALAN_142', "Tile");
define('IMALAN_143', "Image");
define('IMALAN_144', "File");
define('IMALAN_145', "From your computer");
define('IMALAN_146', "No HTML5 support.");
define('IMALAN_147', "From a remote location");
define('IMALAN_148', "Image/File URL");
define('IMALAN_149', "Start Upload");
define('IMALAN_150', "Upload a File");
define('IMALAN_151', "Choose from Library");
define('IMALAN_152', "Appearance");
define('IMALAN_153', "Image in use");
define('IMALAN_154', "Not in use");
define('IMALAN_155', "Avatar Pre-selection Folder");
define('IMALAN_156', "Delete all unused images");
define('IMALAN_157', "Text flow");
define('IMALAN_158', "Margin-Left");
define('IMALAN_159', "Margin-Right");
define('IMALAN_160', "Margin-Top");
define('IMALAN_161', "Margin-Bottom");
define('IMALAN_162', "Displaying [x] - [y] of [z] images.");
define('IMALAN_163', "Video");
define('IMALAN_164', "Deleted Icons from Media-Manager");
define('IMALAN_165', "No images");
define('IMALAN_166', "Upload images or files");
define('IMALAN_167', "No file");
define('IMALAN_168', "Click on the avatar to change it");
define('IMALAN_169', "No Avatars Available");
define('IMALAN_170', "Choose this avatar");
define('IMALAN_171', "Admin-Only Notice: The folder");
define('IMALAN_172', "is empty. Upload some default avatars images to this folder for users to choose avatars from.");
define('IMALAN_173', "No media owner found.");
define('IMALAN_174', "Youtube search requires a (free) YouTube v3 api key.[br]This key is not required unless you wish to perform a keyword, playlist or channel search.[br]Entering a Youtube video URL directly into the box above will still work without having an api key.[br][x]");
define('IMALAN_175', "Search Youtube. Paste any YouTube URL here for a specific video/playlist/channel");
define('IMALAN_176', "There was a problem grabbing the file");
define('IMALAN_177', "Click here for more information and to enter your api key");
?>
define("IMALAN_73", "Thumbnail Quality");
define("IMALAN_74", "Set this as low as possible before quality loss is apparent. Max. 100");
define("IMALAN_75", "Avatar Width");
define("IMALAN_76", "Avatar images will be constrained to these dimensions (in pixels)");
define("IMALAN_77", "Avatar Height");
define("IMALAN_78", "General");
define("IMALAN_79", "Resize-Image Dimensions");
define("IMALAN_80", "Watermark Activation");
define("IMALAN_81", "All images with a width or height greater than this value will be given a watermark during resizing.");
define("IMALAN_82", "Watermark Text");
define("IMALAN_83", "Optional Watermark Text");
define("IMALAN_84", "Watermark Font");
define("IMALAN_85", "Optional Watermark Font. Upload more .ttf fonts to the /fonts folder in your theme directory.");
define("IMALAN_86", "Watermark Size");
define("IMALAN_87", "Size of the font in pts");
define("IMALAN_88", "Watermark Position");
define("IMALAN_89", "Watermark");
define("IMALAN_90", "Watermark Margin");
define("IMALAN_91", "The distance that watermark will appear from the edge of the image.");
define("IMALAN_92", "Watermark Color");
define("IMALAN_93", "Color of the watermark eg. 000000");
define("IMALAN_94", "Watermark Shadow-Color");
define("IMALAN_95", "Shadow Color of the watermark eg. ffffff");
define("IMALAN_96", "Watermark Opacity");
define("IMALAN_97", "Enter a number between 1 and 100");
define("IMALAN_98", "Default YouTube account");
define("IMALAN_99", "Used by the Media-Manager Youtube browser. Enter account name. eg. e107inc");
define("IMALAN_100", "Show Related Videos");
define("IMALAN_101", "Show Video Info");
define("IMALAN_102", "Show Closed-Captions by default");
define("IMALAN_103", "Use Modest Branding");
define("IMALAN_104", "Make the YouTube bbcode responsive");
define("IMALAN_105", "Resize images during media import");
define("IMALAN_106", "Leave empty to disable");
define("IMALAN_107", "Couldn't generated path from upload data");
define("IMALAN_108", "Couldn't move file from [x] to [y]");
define("IMALAN_109", "Couldn't get path");
define("IMALAN_110", "Path");
define("IMALAN_111", "Couldn't detect mime-type([x]). Upload failed.");
define("IMALAN_112", "Couldn't create folder ([x]).");
define("IMALAN_113", "Scanning for new media (images, videos, files) in folder:");
define("IMALAN_114", "No media Found! Please upload some files.");
define("IMALAN_115", "Title (internal use)");
define("IMALAN_116", "Caption (seen by public)");
//define("IMALAN_117", "Author"); // use LAN_AUTHOR
define("IMALAN_118", "Mime Type");
define("IMALAN_119", "File Size");
define("IMALAN_120", "Dimensions");
define("IMALAN_121", "Preview"); // use LAN_PREVIEW
define("IMALAN_122", "[x] couldn't be renamed. Check file perms.");
define("IMALAN_123", "Import into Category:");
define("IMALAN_124", "Import Selected Files");
define("IMALAN_125", "Delete Selected Files");
define("IMALAN_126", "Please check at least one file.");
define("IMALAN_127", "Couldn't get file info from:");
define("IMALAN_128", "Importing Media:");
define("IMALAN_129", "You are about to delete [x] records and <strong>ALL CORRESPONDING FILES</strong>! Please confirm to continue!");
define("IMALAN_130", "Previous page");
define("IMALAN_131", "Next page");
define("IMALAN_132", "Tags/Keywords");
define("IMALAN_133", "Bottom Right");
define("IMALAN_134", "Bottom Left");
define("IMALAN_135", "Top Right");
define("IMALAN_136", "Top Left");
define("IMALAN_137", "Center");
define("IMALAN_138", "Right");
define("IMALAN_139", "Left");
define("IMALAN_140", "Top");
define("IMALAN_141", "Bottom");
define("IMALAN_142", "Tile");
define("IMALAN_143", "Image");
define("IMALAN_144", "File");
define("IMALAN_145", "From your computer");
define("IMALAN_146", "No HTML5 support.");
define("IMALAN_147", "From a remote location");
define("IMALAN_148", "Image/File URL");
define("IMALAN_149", "Start Upload");
define("IMALAN_150", "Upload a File");
define("IMALAN_151", "Choose from Library");
define("IMALAN_152", "Appearance");
define("IMALAN_153", "Image in use");
define("IMALAN_154", "Not in use");
define("IMALAN_155", "Avatar Pre-selection Folder");
define("IMALAN_156", "Delete all unused images");
define("IMALAN_157", "Text flow");
define("IMALAN_158", "Margin-Left");
define("IMALAN_159", "Margin-Right");
define("IMALAN_160", "Margin-Top");
define("IMALAN_161", "Margin-Bottom");
define("IMALAN_162", "Displaying [x] - [y] of [z] images.");
define("IMALAN_163", "Video");
define("IMALAN_164", "Deleted Icons from Media-Manager");
define("IMALAN_165", "No images");
define("IMALAN_166", "Upload images or files");
define("IMALAN_167", "No file");
define("IMALAN_168", "Click on the avatar to change it");
define("IMALAN_169", "No Avatars Available");
define("IMALAN_170", "Choose this avatar");
define("IMALAN_171", "Admin-Only Notice: The folder");
define("IMALAN_172", "is empty. Upload some default avatars images to this folder for users to choose avatars from.");
define("IMALAN_173", "No media owner found.");
define("IMALAN_174", "Youtube search requires a (free) YouTube v3 api key.[br]This key is not required unless you wish to perform a keyword, playlist or channel search.[br]Entering a Youtube video URL directly into the box above will still work without having an api key.[br][x]");
define("IMALAN_175", "Search Youtube. Paste any YouTube URL here for a specific video/playlist/channel");
define("IMALAN_176", "There was a problem grabbing the file");
define("IMALAN_177", "Click here for more information and to enter your api key");
define("IMALAN_178", "Avatars Folder (user selectable)");
define("IMALAN_179", "Avatars Folder (private)");

View File

@ -1,27 +1,27 @@
<?php
/*
* Copyright (C) 2008-2013 e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* Copyright (C) 2008-2016 e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
*
* Admin Language File
*
*/
define("MENLAN_1", "Visible to all");
define("MENLAN_2", "Visible to members only");
define("MENLAN_3", "Visible to administrators only");
define("MENLAN_4", "Only visible to:");
//define("MENLAN_1", "Visible to all");
//define("MENLAN_2", "Visible to members only");
//define("MENLAN_3", "Visible to administrators only");
//define("MENLAN_4", "Only visible to:");//LAN_VISIBLE_TO
// define("MENLAN_5", "class");
define("MENLAN_6", "Save visibility options");
//define("MENLAN_6", "Save visibility options");
define("MENLAN_7", "Configure visibility options for");
define("MENLAN_8", "Visibility options updated");
define("MENLAN_9", "New custom menu installed");
//define("MENLAN_8", "Visibility options updated");
//define("MENLAN_9", "New custom menu installed");
define("MENLAN_10", "New menu installed");
define("MENLAN_11", "Menu removed");
define("MENLAN_12", "Activate: choose area");
//define("MENLAN_12", "Activate: choose area");
define("MENLAN_13", "Activate in Area");
define("MENLAN_14", "Area");
define("MENLAN_15", "Deactivate");
// define("MENLAN_16", "Configure"); // now in lan_admin.php
//define("MENLAN_16", "Configure"); // now in lan_admin.php
define("MENLAN_17", "Move Up");
define("MENLAN_18", "Move Down");
define("MENLAN_19", "Move to Area");
@ -38,26 +38,39 @@ define("MENLAN_26", "This menu will only be [b]SHOWN[/b] on the following pages"
define("MENLAN_27", "This menu will only be [b]HIDDEN[/b] on the following pages");
define("MENLAN_28", "Enter one page per line, enter enough of the url to distinguish it properly. If you need the ending of the url to match exactly, use a ! at the end of the page name. For example: [b]page.php?1![/b]");
define("MENLAN_29", "Select Layout");
//define("MENLAN_29", "Select Layout");
define("MENLAN_30", "To see the menu areas and their positions for custom layouts, select the custom layout here.");
define("MENLAN_31", "Default Layout");
define("MENLAN_32", "Newsheader Layout");
//define("MENLAN_32", "Newsheader Layout");
define("MENLAN_33", "Custom Layout");
define("MENLAN_34", "Embedded");
// define("MENLAN_35", "Configure Menus"); now in lan_admin.php
//define("MENLAN_35", "Configure Menus"); now in lan_admin.php
define("MENLAN_36", "Choose the menu(s) to activate");
define("MENLAN_37", "and where to activate them.");
define("MENLAN_38", "Hold down CTRL to select multiple menus.");
//define("MENLAN_38", "Hold down CTRL to select multiple menus.");
// --
define("MENLAN_39", "Preset Area");
define("MENLAN_40", "Use Menu Presets");
define("MENLAN_41", "The position of all your menus for this layout will be lost. Do you still wish to continue?");
define("MENLAN_42", "Custom");
//define("MENLAN_42", "Custom");//LAN_CUSTOM
define("MENLAN_43", "Menu Preset Activated");
define("MENLAN_44", "Menu parameters");
define("MENLAN_45", "Parameters (query string format):");
define("MENLAN_46", "[x] object not found. Try re-scanning plugin directories in Tools > Database.");
define("MENLAN_47", "No Fields Set in");
define("MENLAN_48", "Menu could not be loaded");
define("MENLAN_49", "Your Menus");
define("MENLAN_50", "Plugin Menus");
define("MENLAN_51", "This layout does NOT contain any dynamic {MENU} areas.");
define("MENLAN_52", "It DOES contain the following custom menus: ");
define("MENLAN_53", "Go to Custom-Menu Area");
define("MENLAN_54", "Theme Layout");
define("MENLAN_55", "Menu Layout");
define("MENLAN_56", "Custom Pages");
define("MENLAN_57", "Drag-and-Drop Menus");
?>

View File

@ -58,8 +58,8 @@ define("PRFLAN_55", "Cookie/Session name");
define("PRFLAN_56", "Timezone");
define("PRFLAN_58", "Restrict website to members only");
define("PRFLAN_59", "ticking will restrict all areas apart from the front page and signup page to members only");
define("PRFLAN_60", "Enable SSL");
define("PRFLAN_61", "Only enable SSL if you are sure you know what you are doing!");
define("PRFLAN_60", "Use SSL only");
define("PRFLAN_61", "Redirect all traffic through SSL (https)");
define("PRFLAN_76", "Display CAPTCHA on signup page.");
define("PRFLAN_77", "Admin Display Options ");
define("PRFLAN_78", "Leave blank to disable");
@ -289,3 +289,6 @@ define("PRFLAN_268", "Frontend Inline-Editing");
define("PRFLAN_269", "Admins with this userclass (and the appropriate admin permissions) will be able to edit html directly via the frontend area.");
define("PRFLAN_270", "Contact Form Filtering");
define("PRFLAN_271", "Ignore form submissions containing these words or phrases. One per line.");
define("PRFLAN_272", "Session Lifetime");
define("PRFLAN_273", "Lifetime in seconds. 0 = until the browser is closed. ");

View File

@ -119,7 +119,7 @@ define("TPVLAN_83","Automated download not possible!");
define("TPVLAN_84","[Please Download Manually]");
define("TPVLAN_85","Connecting...");
define("TPVLAN_86","Could not change site theme.");
define("TPVLAN_87","Rendering Theme Config");
// define("TPVLAN_87","Rendering Theme Config"); //XXX Debug info
define("TPVLAN_88","Converter");
define("TPVLAN_89", "Apply dashboard preferences to all administrators");

View File

@ -26,7 +26,7 @@ define("LANCONTACT_07", "Email a copy of this message to your own address ");
define("LANCONTACT_08", "Send");
define("LANCONTACT_09", "Your message was sent.");
define("LANCONTACT_10", "There was a problem sending your message.");
define("LANCONTACT_11", "Your email address does not appear to be valid.\\nPlease check it and try again.");
define("LANCONTACT_11", "Please check your email address and resubmit the contact form.");
define("LANCONTACT_12", "Your message is too short.");
define("LANCONTACT_13", "Please include a subject.");

View File

@ -0,0 +1,12 @@
<?php
/**
* e107 website system
*
* Copyright (C) 2008-2017 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
define("LAN_EFORM_001", "");

View File

@ -50,4 +50,6 @@ define("LAN_NEWS_463", "There are no news items for the specified category - ple
define("LAN_NEWS_100", "On");
define("LAN_NEWS_307", "Total posts in this category: ");
define("LAN_NEWS_308", "Perhaps you're looking for one of the news items below?");
?>

View File

@ -1,13 +1,12 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/lan_rate.php,v $
| $Revision$
| $Date$
| $Author$
+----------------------------------------------------------------------------+
| e107 website system
| Copyright (C) 2008-2016 e107 Inc (e107.org)
| Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
+ ----------------------------------------------------------------------------+
*/
define("RATELAN_0", "Vote");
@ -16,7 +15,12 @@ define("RATELAN_2", "How do you rate this item?");
define("RATELAN_3", "Thanks for voting!");
define("RATELAN_4", "Not rated");
define("RATELAN_5", "Rate this:");
define("RATELAN_6", "Please login to rate this.");
define("RATELAN_6", "Please login to rate this.");
define("RATELAN_7", "Like");
define("RATELAN_8", "Dislike");
define("RATELAN_9", "You already voted");
define("RATELAN_10", "There is no item ID in the rating");
define("RATELAN_11", "Rating Failed ");
define("RATELAN_POOR","Poor");
define("RATELAN_FAIR","Fair");

View File

@ -2,7 +2,7 @@
/*
* e107 website system
*
* Copyright (C) 2008-2015 e107 Inc (e107.org)
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
@ -50,7 +50,7 @@ define("LAN_SIGNUP_13", "You can now log in from the Login box, or from [here]."
define("LAN_SIGNUP_14", "here");
define("LAN_SIGNUP_15", "Please contact the main site admin");
define("LAN_SIGNUP_16", "if you require assistance.");
define("LAN_SIGNUP_17", "Please certify you are 13 or over the age of 13.");
define("LAN_SIGNUP_17", "Please confirm that you are age 13 or over.");
define("LAN_SIGNUP_18", "Your registration has been received and created with the following login information:");
//define("LAN_SIGNUP_19", "Username:"); // now LAN_LOGINNAME
//define("LAN_SIGNUP_20", "Password:"); // now LAN_PASSWORD
@ -140,7 +140,6 @@ define("LAN_SIGNUP_103", "Too many users already using IP address: ");
define("LAN_SIGNUP_105", "Unable to action your request - please contact the site administrator"); // Two people with same password.
define("LAN_SIGNUP_106", "Unable to action your request - do you already have an account here?"); // Trying to set email same as existing
define("LAN_LOGINNAME", "Username");
//define("LAN_PASSWORD", "Password");
define("LAN_USERNAME", "Display Name");
@ -154,3 +153,10 @@ define("LAN_SIGNUP_112", "You are currently logged in as Main Admin.");
define("LAN_SIGNUP_113", "Subscription(s)");
define("LAN_SIGNUP_114", "User registration is currently disabled.");
define("LAN_SIGNUP_115", "Preview Activation Email");
define("LAN_SIGNUP_116", "Preview After Form Submit");
define("LAN_SIGNUP_117", "Send a Test Activation");
define("LAN_SIGNUP_118", "To [x]");
define("LAN_SIGNUP_119", "Don't send email");

View File

@ -25,7 +25,7 @@ e107::lan('banner');
$sql = e107::getDb();
$mes = e107::getMessage();
$frm = e107::getForm();

View File

@ -15,7 +15,7 @@
* @subpackage chatbox
*/
error_reporting(E_ALL);
if(isset($_POST['chatbox_ajax']))
{
define('e_MINIMAL',true);

View File

@ -76,7 +76,7 @@ if(strstr(e_QUERY, "mirror"))
exit();
}
$goUrl = e107::getUrl()->create('download/index')."?action=error&id=".$download_id;
$goUrl = e107::getUrl()->create('download/index')."?action=error&id=1";
e107::redirect($goUrl);
//header("Location: ".e_BASE."download.php?error.{$download_id}.1");
exit;
@ -249,7 +249,7 @@ if ($type == "file")
(strpos($pref['download_denied'],"signup.php") && USER == TRUE)
))
{
$goUrl = e107::getUrl()->create('download/index')."?action=error&id=".$id;
$goUrl = e107::getUrl()->create('download/index')."?action=error&id=1";
e107::redirect($goUrl);
exit();
}
@ -317,21 +317,24 @@ else
if ($table == "download")
{
require_once(HEADERF);
$imagecaption = ''; // TODO ?name or text Screenshot
$imagecaption = ''; // TODO ?name or text Screenshot
if (file_exists(e_FILE."download/{$image}"))
{
$disp = "<div style='text-align:center'><img src='".e_FILE."download/{$image}' alt='' /></div>";
$disp = "<div style='text-align:center'><img class='img-responsive' src='".e_FILE."download/{$image}' alt='' /></div>";
}
else if(file_exists(e_FILE."downloadimages/{$image}"))
{
$disp = "<div style='text-align:center'><img src='".e_FILE."downloadimages/{$image}' alt='' /></div>";
$disp = "<div style='text-align:center'><img class='img-responsive' src='".e_FILE."downloadimages/{$image}' alt='' /></div>";
}
else
{
$image = $tp->replaceConstants($image);
$disp = "<div style='text-align:center'><img src='".$image."' alt='' /></div>";
$image = $tp->replaceConstants($image);
$disp = "<div style='text-align:center'><img class='img-responsive' src='".$image."' alt='' /></div>";
}
$disp .= "<br /><div style='text-align:center'><a href='javascript:history.back(1)'>".LAN_BACK."</a></div>";
$ns->tablerender($imagecaption, $disp);
require_once(FOOTERF);
@ -383,7 +386,7 @@ function check_download_limits()
if($row['count'] >= $limits['gen_intdata'])
{
// Exceeded download count limit
$goUrl = e107::getUrl()->create('download/index')."?action=error&id=".$cutoff;
$goUrl = e107::getUrl()->create('download/index')."?action=error&id=2";
e107::redirect($goUrl);
// e107::redirect(e_BASE."download.php?error.{$cutoff}.2");
/* require_once(HEADERF);
@ -415,7 +418,7 @@ function check_download_limits()
if($row['total_bw'] / 1024 > $limit['gen_user_id'])
{ //Exceed bandwith limit
$goUrl = e107::getUrl()->create('download/index')."?action=error&id=".$cutoff;
$goUrl = e107::getUrl()->create('download/index')."?action=error&id=2";
e107::redirect($goUrl);
// e107::redirect(e_BASE."download.php?error.{$cutoff}.2");
/* require(HEADERF);

View File

@ -2,25 +2,16 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
/**
*
* @package e107
* @subpackage faqs
* @author e107inc
*
* FAQ plugin admin UI
*/
require_once("../../class2.php");
e107::lan('faqs', 'admin',true);
//TODO LANS
class faq_admin extends e_admin_dispatcher
{
@ -42,7 +33,7 @@ class faq_admin extends e_admin_dispatcher
protected $adminMenu = array(
'main/list' => array('caption'=> LAN_MANAGE, 'perm' => 'P'),
'main/create' => array('caption'=> LAN_CREATE_ITEM, 'perm' => 'P'),
'main/pending' => array('caption'=> "Unanswered", 'perm' => 'P', 'uri'=>"admin_config.php?mode=main&action=list&filter=pending"),
'main/pending' => array('caption'=> LANA_FAQ_UNANSWERED, 'perm' => 'P', 'uri'=>"admin_config.php?mode=main&action=list&filter=pending"),
'cat/list' => array('caption'=> LAN_CATEGORIES, 'perm' => 'P'),
'cat/create' => array('caption'=> LAN_CREATE_CATEGORY, 'perm' => 'P'),
@ -216,54 +207,57 @@ class faq_main_ui extends e_admin_ui
//TODO - finish 'user' type, set 'data' to all editable fields, set 'noedit' for all non-editable fields
protected $fields = array(
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
'faq_id' => array('title'=> LAN_ID, 'tab' => 0, 'type' => null, 'width' =>'5%', 'forced'=> TRUE),
'faq_id' => array('title'=> LAN_ID, 'tab' => 0, 'type' => null, 'width' =>'5%', 'forced'=> TRUE),
'faq_question' => array('title'=> LANA_FAQ_QUESTION, 'tab' => 0, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first', 'required'=>TRUE, 'readParms'=>'editable=1', 'writeParms'=>'maxlength=1000&size=block-level'),
'faq_answer' => array('title'=> LANA_FAQ_ANSWER, 'tab' => 0, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=1&truncate=50&bb=1'),
'faq_parent' => array('title'=> LAN_CATEGORY, 'tab' => 0, 'type' => 'dropdown', 'data'=> 'int', 'inline'=>true,'width' => '10%', 'filter'=>TRUE, 'batch'=>TRUE),
'faq_parent' => array('title'=> LAN_CATEGORY, 'tab' => 0, 'type' => 'dropdown', 'data'=> 'int', 'inline'=>true,'width' => '10%', 'filter'=>TRUE, 'batch'=>TRUE),
'faq_tags' => array('title'=> LANA_FAQ_TAGS, 'tab' => 1, 'type' => 'tags', 'data' => 'str', 'width' => 'auto', 'inline'=> true, 'help' => LANA_FAQ_TAGS_HELP), // User id
'faq_comment' => array('title'=> LANA_FAQ_COMMENT, 'tab' => 1, 'type' => 'userclass', 'data' => 'int', 'width' => 'auto', 'inline'=> true), // User id
'faq_comment' => array('title'=> LANA_FAQ_COMMENT, 'tab' => 1, 'type' => 'userclass', 'data' => 'int', 'width' => 'auto', 'inline'=> true), // user class who can make comments
'faq_datestamp' => array('title'=> LAN_DATE, 'tab' => 1, 'type' => 'datestamp', 'data'=> 'int','width' => 'auto', 'noedit' => false,'writeParms'=>'type=datetime&auto=1'),
'faq_author' => array('title'=> LAN_USER, 'tab' => 1, 'type' => 'user', 'data'=> 'int', 'width' => 'auto', 'thclass' => 'center', 'class'=>'center', 'writeParms' => 'currentInit=1', 'filter' => true, 'batch' => true, 'nolist' => true ), // Photo
'faq_author_ip' => array('title'=> LAN_IP, 'tab' => 1, 'type' => 'ip', 'readonly'=>2, 'data'=> 'str', 'width' => 'auto', 'thclass' => 'center', 'class'=>'center', 'writeParms' => 'currentInit=1', 'filter' => true, 'batch' => true, 'nolist' => true ), // Photo
'faq_datestamp' => array('title'=> LAN_DATE, 'tab' => 1, 'type' => 'datestamp', 'data'=> 'int','width' => 'auto', 'noedit' => false,'writeParms'=>'type=datetime&auto=1'),
'faq_author' => array('title'=> LAN_AUTHOR, 'tab' => 1, 'type' => 'user', 'data'=> 'int', 'width' => 'auto', 'thclass' => 'center', 'class'=>'center', 'writeParms' => 'currentInit=1', 'filter' => true, 'batch' => true, 'nolist' => true ), // Photo
'faq_author_ip' => array('title'=> LAN_IP, 'tab' => 1, 'type' => 'ip', 'readonly'=>2, 'data'=> 'str', 'width' => 'auto', 'thclass' => 'center', 'class'=>'center', 'writeParms' => 'currentInit=1', 'filter' => true, 'batch' => true, 'nolist' => true ), // Photo
'u.user_name' => array('title'=> LAN_USER, 'tab' => 1, 'type' => 'user', 'width' => 'auto', 'noedit' => true, 'readParms'=>'idField=faq_author&link=1'), // User name
'u.user_loginname' => array('title'=> LANA_FAQ_ULOGINNAME, 'tab' => 1, 'type' => 'user', 'width' => 'auto', 'noedit' => true, 'readParms'=>'idField=faq_author&link=1'), // User login name
'faq_order' => array('title'=> LAN_ORDER, 'tab' => 1, 'type' => 'number', 'data'=> 'int','width' => '5%', 'thclass' => 'center','nolist' => false, 'noedit'=>false, 'readParms'=>'editable=1'),
'u.user_name' => array('title'=> LANA_FAQ_UNAME, 'tab' => 1, 'type' => 'user', 'width' => 'auto', 'noedit' => true, 'readParms'=>'idField=faq_author&link=1'), // User name
'u.user_loginname' => array('title'=> LANA_FAQ_ULOGINNAME, 'tab' => 1, 'type' => 'user', 'width' => 'auto', 'noedit' => true, 'readParms'=>'idField=faq_author&link=1'), // User login name
'faq_order' => array('title'=> LAN_ORDER, 'tab' => 1, 'type' => 'number', 'data'=> 'int','width' => '5%', 'thclass' => 'center','nolist' => false, 'noedit'=>false, 'readParms'=>'editable=1'),
'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center','readParms'=>array('sort'=>1)),
'pending' => array('title' => 'internal', 'type' => 'hidden', 'data'=>false, 'writeParms'=>array()),
'pending' => array('title' => 'internal', 'type' => 'hidden', 'data'=>false, 'writeParms'=>array()),
);
protected $fieldpref = array('checkboxes', 'faq_question', 'faq_answer', 'faq_parent', 'faq_datestamp', 'options');
protected $preftabs = array("General", LAN_ADMIN );
protected $preftabs = array(LAN_GENERAL, LAN_PLUGIN_FAQS_NAME , LAN_CATEGORIES);
// optional, if $pluginName == 'core', core prefs will be used, else e107::getPluginConfig($pluginName);
protected $prefs = array(
'add_faq' => array('title'=> LANA_FAQ_PREF_1, 'tab'=>0, 'type'=>'userclass' ),
'add_faq' => array('title'=> LANA_FAQ_PREF_1, 'tab'=>0, 'type'=>'userclass' ),
'submit_question' => array('title'=> LANA_FAQ_PREF_2, 'tab'=>0, 'type'=>'userclass' ),
'submit_question_limit' => array('title'=> "'Ask a Question' limit per user", 'tab'=>0, 'type'=>'number', 'data'=>'int', 'help'=>'0 = no limit'),
'submit_question_char_limit' => array('title'=> "'Ask a Question' character limit", 'tab'=>0, 'type'=>'number', 'data'=>'int', 'help'=>'0 = no limit', 'writeParms'=>array('max'=>255, 'default'=>255)),
'submit_question_limit' => array('title'=> "'Ask a Question' limit per user", 'tab'=>0, 'type'=>'number', 'data'=>'int', 'help'=>'0 = no limit'),
'submit_question_char_limit' => array('title'=> "'Ask a Question' character limit", 'tab'=>0, 'type'=>'number', 'data'=>'int', 'help'=>'0 = no limit', 'writeParms'=>array('max'=>255, 'default'=>255)),
'submit_question_language' => array('title'=> "'Ask a Question' limited to", 'tab'=>0,'type'=>'dropdown' ),
'submit_question_acknowledgement' => array('title'=> "Submitted Questions Acknowledgement", 'type'=>'textarea', 'help'=>'Leave blank to use default' ),
'submit_question_acknowledgement' => array('title'=> "Submitted Questions Acknowledgement", 'type'=>'textarea', 'help'=>'Leave blank to use default' ),
'classic_look' => array('title'=> LANA_FAQ_PREF_3,'tab'=>0, 'type'=>'boolean' ),
'list_type' => array('title'=> "List Type", 'tab'=>0,'type'=>'dropdown', 'writeParms'=>array('ul'=>'Unordered List', 'ol'=>'Ordered List') ),
'page_title' => array('title'=> "Page Title", 'tab'=>0,'type'=>'text', 'multilan'=>true, 'help'=>'Leave blank to use default' ),
'new' => array('title'=> "'New' FAQs are no more than", 'tab'=>0,'type'=>'number', 'writeParms'=>'size=mini&default=0&post=days old', 'help'=>'Leave blank to use default' ),
'display_total' => array('title'=> "Display FAQ total", 'tab'=>0,'type'=>'boolean', 'data'=>'int' ),
'display_datestamp' => array('title'=> "Display Datestamp", 'tab'=>0,'type'=>'boolean', 'data'=>'int' ),
'classic_look' => array('title'=> LANA_FAQ_PREF_3, 'tab'=>0, 'type'=>'boolean' ),
'list_type' => array('title'=> "List Type", 'tab'=>0,'type'=>'dropdown', 'writeParms'=>array('ul'=>'Unordered List', 'ol'=>'Ordered List') ),
'page_title' => array('title'=> "Page Title", 'tab'=>0,'type'=>'text', 'multilan'=>true, 'help'=>'Leave blank to use default' ),
'new' => array('title'=> "'New' FAQs are no more than", 'tab'=>0,'type'=>'number', 'writeParms'=>'size=mini&default=0&post=days old', 'help'=>'Leave blank to use default' ),
'display_total' => array('title'=> "Display FAQ total", 'tab'=>0,'type'=>'boolean', 'data'=>'int' ),
'display_datestamp' => array('title'=> "Display Datestamp", 'tab'=>0,'type'=>'boolean', 'data'=>'int' ),
'display_social' => array('title'=> "Display Social buttons", 'tab'=>0,'type'=>'boolean', 'data'=>'int' ),
'orderby' => array('title'=> LAN_ORDER, 'tab'=>0,'type'=>'dropdown', 'writeParms'=>array('faq_order-ASC'=>"Specified Order", 'faq_id-ASC'=>'ID ASC', 'faq_id-DESC'=>'ID DESC', 'faq_datestamp-ASC'=>'Date ASC', 'faq_datestamp-DESC'=>'Date DESC')),
'orderby' => array('title'=> LAN_ORDER, 'tab'=>0,'type'=>'dropdown', 'writeParms'=>array('faq_order-ASC'=>"Specified Order", 'faq_id-ASC'=>'ID ASC', 'faq_id-DESC'=>'ID DESC', 'faq_datestamp-ASC'=>'Date ASC', 'faq_datestamp-DESC'=>'Date DESC')),
'admin_faq_create' => array('title'=> "Create FAQ", 'tab'=>1, 'type'=>'userclass', 'writeParms'=>'default=254&classlist=main,admin,classes,no-excludes' ),
'admin_faq_edit' => array('title'=> "Edit FAQ", 'tab'=>1, 'type'=>'userclass', 'writeParms'=>'default=254&classlist=main,admin,classes,no-excludes' ),
'admin_faq_delete' => array('title'=> "Delete FAQ", 'tab'=>1, 'type'=>'userclass', 'writeParms'=>'default=254&classlist=main,admin,classes,no-excludes' ),
'admin_faq_create' => array('title'=> LAN_CREATE_ITEM, 'tab'=>1, 'type'=>'userclass', 'writeParms'=>'default=254&classlist=main,admin,classes,no-excludes' ),
'admin_faq_edit' => array('title'=> LAN_EDIT, 'tab'=>1, 'type'=>'userclass', 'writeParms'=>'default=254&classlist=main,admin,classes,no-excludes' ),
'admin_faq_delete' => array('title'=> LAN_DELETE, 'tab'=>1, 'type'=>'userclass', 'writeParms'=>'default=254&classlist=main,admin,classes,no-excludes' ),
'admin_cat_create' => array('title'=> "Create Category", 'tab'=>1, 'type'=>'userclass' , 'writeParms'=>'default=254&classlist=main,admin,classes,no-excludes' ),
'admin_cat_edit' => array('title'=> "Edit Category", 'tab'=>1, 'type'=>'userclass' , 'writeParms'=>'default=254&classlist=main,admin,classes,no-excludes' ),
'admin_cat_delete' => array('title'=> "Delete category", 'tab'=>1, 'type'=>'userclass' , 'writeParms'=>'default=254&classlist=main,admin,classes,no-excludes' ),
'admin_cat_create' => array('title'=> LAN_CREATE_CATEGORY, 'tab'=>2, 'type'=>'userclass' , 'writeParms'=>'default=254&classlist=main,admin,classes,no-excludes' ),
'admin_cat_edit' => array('title'=> LAN_EDIT, 'tab'=>2, 'type'=>'userclass' , 'writeParms'=>'default=254&classlist=main,admin,classes,no-excludes' ),
'admin_cat_delete' => array('title'=> LAN_DELETE, 'tab'=>2, 'type'=>'userclass' , 'writeParms'=>'default=254&classlist=main,admin,classes,no-excludes' ),
);
protected $categories = array();

View File

@ -2,16 +2,12 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2017 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* FAQ Core Plugin
*
*
* $Source: /cvs_backup/e107_0.8/e107_plugins/faqs/faqs.php,v $
* $Revision$
* $Date$
* $Author$
*/
if (!defined('e107_INIT'))
@ -126,7 +122,7 @@ if (isset($_POST['commentsubmit']))
$faqpref = e107::getPlugConfig('faqs')->getPref();
if ($action == "" || $action == "main")
if (empty($action) || $action == "main")
{
if(vartrue($faqpref['classic_look']))
{
@ -137,7 +133,7 @@ if (isset($_POST['commentsubmit']))
{
$srch = vartrue($_GET['srch']);
$ftmp = $faq->view_all($srch);
$caption = FAQLAN_FAQ;
$caption = LAN_FAQS_FAQ;
}
@ -182,7 +178,7 @@ if (isset($_POST['commentsubmit']))
if($action == "cat" && $idx)
{
$ftmp = $faq->view_faq($idx) ;
define("e_PAGETITLE",FAQLAN_FAQ." - ". $ftmp['title']);
define("e_PAGETITLE",LAN_FAQS_FAQ." - ". $ftmp['title']);
require_once(HEADERF);
$ns -> tablerender($ftmp['caption'], $ftmp['text']);
}
@ -233,7 +229,7 @@ class faq
if(!empty($this->pref['submit_question_limit']) && $existing >= $this->pref['submit_question_limit'])
{
e107::getMessage()->setTitle('Sorry',E_MESSAGE_INFO)->addInfo("You have reached the maximum number of new questions. You may ask more once your existing questions have been answered.");
e107::getMessage()->setTitle(LAN_WARNING,E_MESSAGE_INFO)->addInfo(LAN_FAQS_LIMIT_REACHED);
return;
}
@ -288,7 +284,7 @@ class faq
$text .= $tp->parseTemplate($template['end'], true, $this->sc); // footer
$ret['title'] = FAQLAN_FAQ;
$ret['title'] = LAN_FAQS_FAQ;
$ret['text'] = $text;
if (!empty($this->pref['page_title'][e_LANGUAGE]))
@ -333,7 +329,7 @@ class faq
$insert = " AND (f.faq_question LIKE '%".$srch."%' OR f.faq_answer LIKE '%".$srch."%' OR FIND_IN_SET ('".$srch."', f.faq_tags) ) ";
$message = "<span class='label label-lg label-info'>".$srch." <a class='e-tip' title='Remove' href='".$removeUrl."'>×</a></span>";
$message = "<span class='label label-lg label-info'>".$srch." <a class='e-tip' title='".LAN_FAQS_REMOVE."' href='".$removeUrl."'>×</a></span>";
e107::getMessage()->setClose(false,E_MESSAGE_INFO)->setTitle(LAN_FAQS_FILTER_ACTIVE,E_MESSAGE_INFO)->addInfo($message);
$text = e107::getMessage()->render();
@ -359,7 +355,7 @@ class faq
$insert = " AND FIND_IN_SET ('".$srch."', f.faq_tags) ";
$message = "<span class='label label-lg label-info'>".$srch." <a class='e-tip' title='Remove' href='".$removeUrl."'>×</a></span>";
$message = "<span class='label label-lg label-info'>".$srch." <a class='e-tip' title='".LAN_FAQS_REMOVE."' href='".$removeUrl."'>×</a></span>";
e107::getMessage()->setClose(false,E_MESSAGE_INFO)->setTitle(LAN_FAQS_FILTER_ACTIVE,E_MESSAGE_INFO)->addInfo($message);
$text = e107::getMessage()->render();
@ -372,8 +368,8 @@ class faq
if(!$data = $sql->retrieve($query, true))
{
$message = (!empty($srch)) ? "<b>".$srch."</b> was not found in search results. <a class='e-tip' title='Reset' href='".$removeUrl."'>Reset</a>" : LAN_FAQS_NONE_AVAILABLE;
return "<div class='alert alert-warning alert-block'>".$message."</div>" ; //TODO LAN
$message = (!empty($srch)) ? e107::getParser()->lanVars(LAN_FAQS_X_NOT_FOUND, $srch)."<a class='e-tip' title='".LAN_FAQS_RESET."' href='".$removeUrl."'>".LAN_FAQS_RESET."</a>" : LAN_FAQS_NONE_AVAILABLE;
return "<div class='alert alert-warning alert-block'>".$message."</div>" ;
}
// -----------------
@ -383,8 +379,8 @@ class faq
$prevcat = "";
$sc = e107::getScBatch('faqs', true);
$sc->counter = 1;
$sc->tag = htmlspecialchars($tag, ENT_QUOTES, 'utf-8');
$sc->category = $category;
$sc->tag = htmlspecialchars(varset($tag), ENT_QUOTES, 'utf-8');
$sc->category = varset($category);
if(!empty($_GET['id'])) // expand one specific FAQ.
{
@ -474,12 +470,12 @@ class faq
{
$sc->setVars($rw);
$text .= $tp->parseTemplate($FAQ_LIST_LOOP, true);
$caption = "&nbsp;Category: <b>".$rw['faq_info_title']."</b>";
$caption = "&nbsp;".LAN_CATEGORY.": <b>".$rw['faq_info_title']."</b>";
}
$text .= $tp->parseTemplate($FAQ_LIST_END, true);
$ret['title'] = FAQLAN_FAQ." - ".$category_title;
$ret['title'] = LAN_FAQS_FAQ." - ".$category_title;
$ret['text'] = $text.$this->faq_footer($id);
$ret['caption'] = $caption;
return $ret;
@ -605,7 +601,7 @@ class faq
if (ADMIN && getperms("B"))
{
// bkwon 05-Jun-2004 fix URL to moderate comment
echo "<div style='text-align:right'><a href='".e_ADMIN."modcomment.php?faq.$faq_id'>moderate comments</a></div><br />";
echo "<div style='text-align:right'><a href='".e_ADMIN."modcomment.php?faq.$faq_id'>".LAN_FAQS_MODERATE_COMMENTS."</a></div><br />";
}
}
$cobj->form_comment($action, $table, $idx.".".$id, $subject, $content_type);
@ -618,10 +614,10 @@ class faq
{
global $faqpref,$timing_start,$tp,$cust_footer, $CUSTOMPAGES, $CUSTOMHEADER, $CUSTOMHEADER;
$text_menu .= "<div style='text-align:center;' ><br />
&nbsp;&nbsp;[&nbsp;<a href=\"faqs.php?main\">Back to Categories</a>&nbsp;]&nbsp;&nbsp;";
&nbsp;&nbsp;[&nbsp;<a href='faqs.php?main'>".LAN_FAQS_BACK_TO_CATEGORIES."</a>&nbsp;]&nbsp;&nbsp;";
if(check_class($faqpref['add_faq'])){
$text_menu .="[&nbsp;<a href=\"faqs.php?new.$id\">Submit a Question</a>&nbsp;]";
$text_menu .="[&nbsp;<a href='faqs.php?new.$id'>".LAN_FAQS_ASK_A_QUESTION."</a>&nbsp;]";
}
$text_menu .="</div>";
@ -649,7 +645,7 @@ class faq
<table class='fborder' style=\"width:100%\">
<tr>
<td class='fcaption' style=\"width:70%\">".FAQ_ADLAN_49."</td>
<td class='fcaption' style='text-align:center'>Options</td></tr>
<td class='fcaption' style='text-align:center'>".LAN_SETTINGS."</td></tr>
";
while ($rw = $sql->db_Fetch())
{
@ -681,8 +677,8 @@ class faq
<tr>
<td class='fcaption' colspan='2' style='text-align:center'>";
$text .= (is_numeric($id)) ? "Edit" : "Add";
$text .= " an FAQ</td></tr>";
$text .= (is_numeric($id)) ? LAN_EDIT : LAN_ADD; //LAN_ADD may not exist on the front end, but I dont think this code is used - Mikey.
$text .= " FAQ</td></tr>";
$text .= "
<tr>
@ -763,7 +759,7 @@ class faq
$row = $sql->db_Fetch();
extract($row);
}
$ns->tablerender("Frequently asked Questions".$faq_info_title, "<div style='text-align:center'>".$text."</div>".$this->faq_footer());
$ns->tablerender( LAN_PLUGIN_FAQS_FRONT_NAME.$faq_info_title, "<div style='text-align:center'>".$text."</div>".$this->faq_footer());
}

View File

@ -2,7 +2,7 @@
/*
* e107 website system
*
* Copyright (c) 2008-2013 e107 Inc (e107.org)
* Copyright (c) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
@ -31,7 +31,7 @@ class faqs_setup
";
$status = ($sql->db_Select_gen($query)) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add("Adding Default table data to table: faqs",$status);
$mes->add(LAN_DEFAULT_TABLE_DATA.": faqs", $status);
$query2 = "INSERT INTO #faqs_info (`faq_info_id`, `faq_info_title`, `faq_info_about`, `faq_info_parent`, `faq_info_class`, `faq_info_order`, `faq_info_icon`, `faq_info_metad`, `faq_info_metak`) VALUES
@ -40,7 +40,7 @@ class faqs_setup
";
$status = ($sql->db_Select_gen($query2)) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
$mes->add("Adding Default table data to table: faqs_info",$status);
$mes->add(LAN_DEFAULT_TABLE_DATA.": faqs_info", $status);
}
/*

View File

@ -5,13 +5,11 @@
*
* "FAQ plugin" admin-area language definitions
*/
define("LANA_FAQ_QUESTION", "Question");
define("LANA_FAQ_ANSWER", "Answer");
define("LANA_FAQ_COMMENT", "Comment"); //FIXME Use generic
define("LANA_FAQ_UNAME", "User name"); //FIXME Use generic
define("LANA_FAQ_UNANSWERED", "Unanswered");
define("LANA_FAQ_COMMENT", "Comment Class");
//define("LANA_FAQ_UNAME", "User name"); //LAN_USER
define("LANA_FAQ_ULOGINNAME", "User login"); //FIXME Use generic
define("LANA_FAQ_TAGS", "Tags");
define("LANA_FAQ_TAGS_HELP", "Comma separated tag list");

View File

@ -1,12 +1,24 @@
<?php
/*
* Copyright (c) e107 Inc 2008-2015 - e107.org,
* Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
*
* 'FAQ plugin' global language definitions
*/
/*
* e107 website system
*
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* FAQ Plugin Global Language Definitions
*
*/
define("LAN_FAQS_TAGS", "Tags");
define("LAN_FAQS_FILTER_ACTIVE", "Filter Active");
define("LAN_FAQS_NONE_AVAILABLE", "There are currently no FAQs available.");
define("LAN_FAQS_ASKQUESTION_AFTER", "Thank you. Your question has been saved and will be answered as soon as possible.");
define("LAN_FAQS_LIMIT_REACHED", "You have reached the maximum number of new questions. You may ask more once your existing questions have been answered.");
define("LAN_FAQS_REMOVE", "Remove");
define("LAN_FAQS_RESET", "Reset");
define("LAN_FAQS_X_NOT_FOUND", "[x]: Not found in search results.");
define("LAN_FAQS_MODERATE_COMMENTS", "moderate comments");
define("LAN_FAQS_BACK_TO_CATEGORIES", "Back to Categories");
define("LAN_FAQS_ASK_A_QUESTION", "Ask a Question");
define("LAN_FAQS_FAQ", "FAQ");

View File

@ -54,7 +54,10 @@ class featurebox_shortcodes// must match the plugin's folder name. ie. [PLUGIN_F
$ctemplate = $mod;
}
parse_str($parm, $parm);
if(is_string($parm))
{
parse_str($parm, $parm);
}
$category = $this->getCategoryModel($ctemplate, (vartrue($parm['force']) ? true : false));
$defopt = array(

View File

@ -203,7 +203,7 @@ class plugin_featurebox_item extends e_model
public function sc_featurebox_counter($parm=1)
{
$count = $this->getParam('counter', 1);
return ($parm == 0) ? $count - 1 : $count;
return (empty($parm)) ? $count - 1 : $count;
}
/**

View File

@ -330,7 +330,7 @@ if(empty($FORUM_TEMPLATE))
}
}
if(is_array($FORUM_TEMPLATE) && deftrue('BOOTSTRAP',false)) // new v2.x format.
if(is_array($FORUM_TEMPLATE)) // new v2.x format.
{
if(varset($FORUM_TEMPLATE['main-start'])) // correction of previous v2.x setup.

View File

@ -19,7 +19,7 @@ if (!getperms('P'))
exit ;
}
error_reporting(E_ALL);
require_once (e_PLUGIN . 'forum/forum_class.php');
require_once (e_ADMIN . 'auth.php');

View File

@ -804,7 +804,7 @@ function sc_buttonsx()
}
$replyUrl = "<a class='btn btn-primary".($url ?"":" disabled")."' "
.($url?"":" data-toggle='tooltip' title='".LAN_FORUM_0046."'
style='cursor: not-allowed; pointer-events: all !important;'")." href='".($url ?:"#")."'>".LAN_FORUM_2006."</a>";
style='cursor: not-allowed; pointer-events: all !important;'")." href='".($url ?:"#")."'>".LAN_FORUM_2006."</a>".($url?"":"<span>&nbsp;</span>");
if ($forum->checkPerm($this->var['thread_forum_id'], 'post'))
{

View File

@ -96,6 +96,7 @@
'" class="btn btn-primary'.($this->var['ntUrl'] ?"":" disabled").'"'
.($this->var['ntUrl'] ?"":" data-toggle='tooltip' title='".LAN_FORUM_0006."'
style='cursor: not-allowed; pointer-events: all !important;'").'>'.LAN_FORUM_1018.'</a>
'.($this->var['ntUrl'] ?"":"<span>&nbsp;</span>").'
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
<span class="sr-only">Toggle Dropdown</span>

View File

@ -1,14 +1,11 @@
<?php
/**
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* @author e107coders
*
* @file
* Class installations to handle configuration forms on Admin UI.
*/
@ -272,7 +269,7 @@ class gallery_cat_admin_ui extends e_admin_ui
* Edit/create form tabs.
*/
protected $preftabs = array(
LAN_GALLERY_ADMIN_02,
LAN_GENERAL,
LAN_GALLERY_ADMIN_03,
LAN_GALLERY_ADMIN_32,
);
@ -457,7 +454,7 @@ class gallery_cat_admin_ui extends e_admin_ui
'tab' => 2,
),
'pp_theme' => array(
'title' => LAN_GALLERY_ADMIN_45,
'title' => LAN_THEME,
'type' => 'dropdown',
'data' => 'str',
'writeParms' => array(

View File

@ -83,9 +83,39 @@ class plugin_gallery_index_controller extends eControllerFront
}
}
public function actionCategory()
private function getTemplate()
{
$template = e107::getTemplate('gallery');
$oldKeys = array(
'list_start', 'list_item', 'list_caption', 'list_end',
'cat_start', 'cat_item', 'cat_caption', 'cat_end'
);
if(isset($template['list_start']))
{
foreach($oldKeys as $k)
{
list($main,$sub) = explode("_",$k);
$template[$main][$sub] = $template[$k];
unset($template[$k]);
}
}
return $template;
}
public function actionCategory()
{
// print_a("Hi there");
$template = $this->getTemplate();
$template = array_change_key_case($template);
$sc = e107::getScBatch('gallery', true);
@ -96,19 +126,19 @@ class plugin_gallery_index_controller extends eControllerFront
$template['cat_start'] = str_replace('row', 'row-fluid', $template['cat_start']);
}
$text = e107::getParser()->parseTemplate($template['cat_start'], true, $sc);
$text = e107::getParser()->parseTemplate($template['cat']['start'], true, $sc);
foreach($this->catList as $val)
{
$sc->setVars($val);
$text .= e107::getParser()->parseTemplate($template['cat_item'], true);
$text .= e107::getParser()->parseTemplate($template['cat']['item'], true);
}
$text .= e107::getParser()->parseTemplate($template['cat_end'], true, $sc);
$text .= e107::getParser()->parseTemplate($template['cat']['end'], true, $sc);
if(isset($template['cat_caption']))
{
$title = e107::getParser()->parseTemplate($template['cat_caption'], true, $sc);
$title = e107::getParser()->parseTemplate($template['cat']['caption'], true, $sc);
$this->addTitle($title)->addBody($text);
}
@ -151,7 +181,7 @@ class plugin_gallery_index_controller extends eControllerFront
}
$tp = e107::getParser();
$template = e107::getTemplate('gallery');
$template = $this->getTemplate();
$template = array_change_key_case($template);
$sc = e107::getScBatch('gallery', true);
@ -178,22 +208,22 @@ class plugin_gallery_index_controller extends eControllerFront
$sc->setVars($row)
->addVars($cat);
$inner .= $tp->parseTemplate($template['list_item'], true, $sc);
$inner .= $tp->parseTemplate($template['list']['item'], true, $sc);
}
$text = $tp->parseTemplate($template['list_start'], true, $sc);
$text = $tp->parseTemplate($template['list']['start'], true, $sc);
$text .= $inner;
$text .= $tp->parseTemplate($template['list_end'], true, $sc);
$text .= $tp->parseTemplate($template['list']['end'], true, $sc);
if(isset($template['list_caption']))
{
$title = $tp->parseTemplate($template['list_caption'], true, $sc);
$title = $tp->parseTemplate($template['list']['caption'], true, $sc);
$this->addTitle($title)->addBody($text);
}
else
{
$this->addTitle($catname)
->addTitle(LAN_PLUGIN_GALLERY_TITLE)
$this->addTitle(LAN_PLUGIN_GALLERY_TITLE)
->addTitle($catname)
->addBody($text);
}

View File

@ -38,13 +38,21 @@ class gallery_shortcodes extends e_shortcode
function sc_gallery_caption($parm = '')
{
$tp = e107::getParser();
if($parm === 'text')
{
return $tp->toAttribute($this->var['media_caption']);
}
e107_require_once(e_PLUGIN . 'gallery/includes/gallery_load.php');
// Load prettyPhoto settings and files.
gallery_load_prettyphoto();
$plugPrefs = e107::getPlugConfig('gallery')->getPref();
$hook = varset($plugPrefs['pp_hook'], 'data-gal');
$tp = e107::getParser();
$text = "<a class='gallery-caption' title='" . $tp->toAttribute($this->var['media_caption']) . "' href='" . $tp->thumbUrl($this->var['media_url'], $this->attFull) . "' " . $hook . "='prettyPhoto[slide]' >"; // Erase rel"lightbox.Gallery2" - Write "prettyPhoto[slide]"
$text .= $this->var['media_caption'];
$text .= "</a>";
@ -210,8 +218,9 @@ class gallery_shortcodes extends e_shortcode
function sc_gallery_portfolio($parms = '')
{
$ns = e107::getRender();
$tp = e107::getParser();
$parm = eHelper::scParams($parms);
$cat = (!empty($parm['category'])) ? $parm['category'] : vartrue(e107::getPlugPref('gallery', 'slideshow_category'), 1); //TODO Separate pref?
$cat = (!empty($parm['category'])) ? $parm['category'] : vartrue(e107::getPlugPref('gallery', 'slideshow_category'), false); //TODO Separate pref?
$tmpl = e107::getTemplate('gallery', 'gallery');
$limit = vartrue($parm['limit'], 6);
@ -219,7 +228,11 @@ class gallery_shortcodes extends e_shortcode
$plugPrefs = e107::getPlugConfig('gallery')->getPref();
$orderBy = varset($plugPrefs['orderby'], 'media_id DESC');
$list = e107::getMedia()->getImages('gallery_image|gallery_' . $cat . '|gallery_image_' . $cat, 0, $limit, null, $orderBy);
$imageQry = (empty($cat) || $cat==1) ? "gallery_image|gallery_image_1|gallery_1" : 'gallery_' . $cat . '|gallery_image_' . $cat;
$list = e107::getMedia()->getImages($imageQry, 0, $limit, null, $orderBy);
if(count($list) < 1 && vartrue($parm['placeholder']))
{
@ -231,12 +244,37 @@ class gallery_shortcodes extends e_shortcode
}
}
$template = e107::getTemplate('gallery', 'gallery', 'portfolio');
if(!empty($template['start']))
{
$text = $tp->parseTemplate($template['start'],true, $this);
}
else
{
$text = '';
}
//NOTE: Using tablerender() allows the theme developer to set the number of columns etc using col-xx-xx
$text = '';
foreach($list as $val)
{
$this->var = $val;
$text .= $ns->tablerender('', $this->sc_gallery_thumb('class=gallery_thumb img-responsive img-home-portfolio'), 'gallery_portfolio', true);
if(empty($template['item']))
{
$text .= $ns->tablerender('', $this->sc_gallery_thumb('class=gallery_thumb img-responsive img-home-portfolio'), 'gallery_portfolio', true);
}
else
{
$text .= $tp->parseTemplate($template['item'],true,$this);
}
}
if(!empty($template['end']))
{
$text .= $tp->parseTemplate($template['end'],true, $this);
}
return $text;

View File

@ -54,9 +54,41 @@ class gallery
}
}
function listCategories()
/**
* Convert legacy template from ['list_start'] etc. to ['list']['start']
* @return array|string
*/
private function getTemplate()
{
$template = e107::getTemplate('gallery');
$oldKeys = array(
'list_start', 'list_item', 'list_caption', 'list_end',
'cat_start', 'cat_item', 'cat_caption', 'cat_end'
);
if(isset($template['list_start']))
{
foreach($oldKeys as $k)
{
list($main,$sub) = explode("_",$k);
$template[$main][$sub] = $template[$k];
unset($template[$k]);
}
}
return $template;
}
function listCategories()
{
$template = $this->getTemplate();
$template = array_change_key_case($template);
$sc = e107::getScBatch('gallery', true);
@ -65,17 +97,17 @@ class gallery
$template['cat_start'] = str_replace('row', 'row-fluid', $template['cat_start']);
}
$text = e107::getParser()->parseTemplate($template['cat_start'], true, $sc);
$text = e107::getParser()->parseTemplate($template['cat']['start'], true, $sc);
foreach($this->catList as $val)
{
$sc->setVars($val);
$text .= e107::getParser()->parseTemplate($template['cat_item'], true, $sc);
$text .= e107::getParser()->parseTemplate($template['cat']['item'], true, $sc);
}
$text .= e107::getParser()->parseTemplate($template['cat_end'], true, $sc);
$text .= e107::getParser()->parseTemplate($template['cat']['end'], true, $sc);
$caption = e107::getParser()->parseTemplate($template['cat_caption'], true, $sc);
$caption = e107::getParser()->parseTemplate($template['cat']['caption'], true, $sc);
e107::getRender()->tablerender($caption, $text);
}
@ -86,7 +118,7 @@ class gallery
$plugPrefs = e107::getPlugConfig('gallery')->getPref();
$mes = e107::getMessage();
$tp = e107::getParser();
$template = e107::getTemplate('gallery');
$template = $this->getTemplate();
$template = array_change_key_case($template);
$sc = e107::getScBatch('gallery', true);
@ -109,14 +141,14 @@ class gallery
foreach($list as $row)
{
$sc->setVars($row);
$inner .= $tp->parseTemplate($template['list_item'], true, $sc);
$inner .= $tp->parseTemplate($template['list']['item'], true, $sc);
}
$text = $tp->parseTemplate($template['list_start'], true, $sc);
$text = $tp->parseTemplate($template['list']['start'], true, $sc);
$text .= $inner;
$text .= $tp->parseTemplate($template['list_end'], true, $sc);
$text .= $tp->parseTemplate($template['list']['end'], true, $sc);
$caption = $tp->parseTemplate($template['list_caption'], true, $sc);
$caption = $tp->parseTemplate($template['list']['caption'], true, $sc);
e107::getRender()->tablerender($caption, $mes->render() . $text);

View File

@ -1,12 +1,16 @@
<?php
/**
* @file
/*
* e107 website system
*
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Language file for "gallery" plugin.
*/
define("LAN_GALLERY_ADMIN_01", "[x] is active. Simply import and assign images to the gallery categories using the [y]");
define("LAN_GALLERY_ADMIN_02", "General");
//define("LAN_GALLERY_ADMIN_02", "General");//LAN_GENERAL
define("LAN_GALLERY_ADMIN_03", "Slideshow Menu");
define("LAN_GALLERY_ADMIN_04", "Image Max. Width");
define("LAN_GALLERY_ADMIN_05", "Images will be auto-resized if greater than the width given here");
@ -50,7 +54,7 @@ define("LAN_GALLERY_ADMIN_41", "Default width");
define("LAN_GALLERY_ADMIN_42", "Default height");
define("LAN_GALLERY_ADMIN_43", "Counter separator label");
define("LAN_GALLERY_ADMIN_44", "The separator for the gallery counter 1 \"of\" 2");
define("LAN_GALLERY_ADMIN_45", "Theme");
//define("LAN_GALLERY_ADMIN_45", "Theme");//LAN_THEME
define("LAN_GALLERY_ADMIN_46", "Horizontal padding");
define("LAN_GALLERY_ADMIN_47", "The padding on each side of the picture.");
define("LAN_GALLERY_ADMIN_48", "Hide flash");

View File

@ -6,3 +6,4 @@
*/
define("LAN_GALLERY_FRONT_01", "Right-click > Save Link As");
define("LAN_GALLERY_FRONT_02", "Expand the image");

View File

@ -1,20 +1,21 @@
<?php
/**
* Copyright (c) 2012 e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
/*
* e107 website system
*
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* @file
* Templates for "gallery" plugin.
*/
$GALLERY_TEMPLATE['list']['caption'] = LAN_PLUGIN_GALLERY_TITLE;
$GALLERY_TEMPLATE['list_caption'] = LAN_PLUGIN_GALLERY_TITLE;
$GALLERY_TEMPLATE['list_start'] = '{GALLERY_BREADCRUMB}
$GALLERY_TEMPLATE['list']['start'] = '{GALLERY_BREADCRUMB}
<div class="row gallery">
';
$GALLERY_TEMPLATE['list_item'] = '
$GALLERY_TEMPLATE['list']['item'] = '
<div class="span2 col-xs-6 col-md-3">
<div class="thumbnail">
{GALLERY_THUMB=w=300&h=200}
@ -23,7 +24,7 @@ $GALLERY_TEMPLATE['list_item'] = '
</div>
';
$GALLERY_TEMPLATE['list_end'] = '
$GALLERY_TEMPLATE['list']['end'] = '
</div>
<div class="center">
<div class="gallery-list-nextprev">{GALLERY_NEXTPREV}</div>
@ -34,13 +35,13 @@ $GALLERY_TEMPLATE['list_end'] = '
';
// Bootstrap3 Compatible.
$GALLERY_TEMPLATE['cat_caption'] = LAN_PLUGIN_GALLERY_TITLE;
$GALLERY_TEMPLATE['cat']['caption'] = LAN_PLUGIN_GALLERY_TITLE;
$GALLERY_TEMPLATE['cat_start'] = '{GALLERY_BREADCRUMB}
$GALLERY_TEMPLATE['cat']['start'] = '{GALLERY_BREADCRUMB}
<div class="row gallery-cat">
';
$GALLERY_TEMPLATE['cat_item'] = '
$GALLERY_TEMPLATE['cat']['item'] = '
<div class="span3 col-xs-6 col-md-3">
<div>
{GALLERY_CAT_THUMB}
@ -49,7 +50,7 @@ $GALLERY_TEMPLATE['cat_item'] = '
</div>
';
$GALLERY_TEMPLATE['cat_end'] = '
$GALLERY_TEMPLATE['cat']['end'] = '
</div>
';
@ -93,7 +94,7 @@ $GALLERY_TEMPLATE['prettyphoto']['content'] = '
<div class="pp_content">
<div class="pp_loaderIcon"></div>
<div class="pp_fade">
<a href="#" class="pp_expand" title="Expand the image">' . LAN_EXPAND . '</a>
<a href="#" class="pp_expand" title="'.LAN_GALLERY_FRONT_02.'">'.LAN_EXPAND.'</a>
<div class="pp_hoverContainer">
<a class="pp_next" href="#">' . LAN_NEXT . '</a>
<a class="pp_previous" href="#">' . LAN_PREVIOUS . '</a>
@ -179,3 +180,16 @@ $GALLERY_TEMPLATE['prettyphoto']['social_item'] = '
</div>
</div>
';
/*
$GALLERY_TEMPLATE['portfolio']['start'] = '<-- start portfolio -->';
$GALLERY_TEMPLATE['portfolio']['item'] = '<img src="{GALLERY_THUMB: w=1080&h=720&thumbsrc}" class="img-responsive" alt="{GALLERY_CAPTION=text}">';
$GALLERY_TEMPLATE['portfolio']['end'] = '<-- end portfolio -->';
*/

View File

@ -86,7 +86,7 @@
'linkword_id' => array ( 'title' => LAN_ID, 'data' => 'int', 'width' => '5%', 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
'linkword_word' => array ( 'title' => LWLAN_21, 'type' => 'tags', 'data' => 'str', 'width' => 'auto', 'inline' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'class' => 'left', 'thclass' => 'left', ),
'linkword_link' => array ( 'title' => LWLAN_6, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'inline' => true, 'help' => '', 'readParms' => '', 'writeParms' => 'size=xxlarge', 'class' => 'left', 'thclass' => 'left', ),
'linkword_active' => array ( 'title' => LAN_ACTIVE, 'type' => 'dropdown', 'data' => 'int', 'width' => 'auto', 'batch' => true, 'filter' => true, 'inline' => true, 'help' => '', 'readParms' => '', 'writeParms' => '', 'left' => 'center', 'thclass' => 'left', ),
'linkword_active' => array ( 'title' => LAN_ACTIVE, 'type' => 'dropdown', 'data' => 'int', 'width' => 'auto', 'batch' => true, 'filter' => true, 'inline' => true, 'help' => '', 'readParms' => '', 'writeParms' => array(), 'left' => 'center', 'thclass' => 'left', ),
'linkword_tooltip' => array ( 'title' => LWLAN_50, 'type' => 'textarea', 'data' => 'str', 'width' => 'auto', 'inline' => true, 'help' => '', 'readParms' => '', 'writeParms' => array('size'=>'xxlarge'), 'class' => 'left', 'thclass' => 'left', ),
'linkword_limit' => array ( 'title' => "Max. links/tips", 'type' => 'number', 'data' => 'int', 'width' => '10%', 'help' => LWLAN_63, 'readParms' => '', 'writeParms' => array('default'=>3), 'class' => 'right', 'thclass' => 'right', ),
@ -132,7 +132,7 @@
// ------- Customize Create --------
public function beforeCreate($new_data)
public function beforeCreate($new_data, $old_data)
{
return $new_data;
}

View File

@ -139,7 +139,14 @@ class e_tohtml_linkwords
$lwlist = explode(',',$lw);
foreach ($lwlist as $lw)
{
$this->word_list[] = trim($lw);
$lw = trim($lw);
if(empty($lw))
{
continue;
}
$this->word_list[] = $lw;
$this->word_class[] = 'lw-'.$frm->name2id($lw);
$this->word_limit[] = vartrue($row['linkword_limit'],3);
@ -152,6 +159,14 @@ class e_tohtml_linkwords
}
else
{
$lw = trim($lw);
if(empty($lw))
{
continue;
}
$this->word_list[] = $lw;
$this->word_class[] = 'lw-'.$frm->name2id($lw);
$this->word_limit[] = vartrue($row['linkword_limit'],3);
@ -176,8 +191,6 @@ class e_tohtml_linkwords
}
}
}
@ -245,9 +258,10 @@ class e_tohtml_linkwords
// Consider next line - stripos is PHP5, and mb_stripos is PHP >= 5.2 - so may well often require handling
// while (($first < $limit) && (stripos($text,$this->word_list[$first]) === FALSE)) { $first++; }; // *utf (stripos is PHP5 - compatibility handler implements)
$needle = $this->word_list[$first];
while (($first < $limit) && (strpos($tp->ustrtolower($text), $needle) === false))
while (($first < $limit) && (strpos($tp->ustrtolower($text),$this->word_list[$first]) === false))
{
$first++;
} // *utf

View File

@ -1,5 +1,5 @@
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
//22/10/2009 9.58.12
//general list of implementaion and

Some files were not shown because too many files have changed in this diff Show More