1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-24 22:39:49 +01:00

Merge pull request #39 from e107inc/master

.
This commit is contained in:
rica-carv 2017-01-20 20:36:26 +00:00 committed by GitHub
commit dc43dd91a0
161 changed files with 6363 additions and 662 deletions

View File

@ -823,6 +823,7 @@ if (!function_exists('checkvalidtheme'))
{
// arg1 = theme to check
//global $ADMIN_DIRECTORY, $tp, $e107;
global $sql;
$e107 = e107::getInstance();
$tp = e107::getParser();
$ADMIN_DIRECTORY = $e107->getFolder('admin');
@ -846,15 +847,27 @@ if (!function_exists('checkvalidtheme'))
define('PREVIEWTHEMENAME', $themeArray[$id]);
define('THEME', e_THEME.$themeArray[$id].'/');
define('THEME_ABS', e_THEME_ABS.$themeArray[$id].'/');
$legacy = (file_exists( e_THEME_ABS.$themeArray[$id].'/theme.xml') === false);
define('THEME_LEGACY',$legacy);
return;
}
$sql->db_Mark_time("Theme Check");
if (@fopen(e_THEME.$theme_check.'/theme.php', 'r'))
// if (is_readable(e_THEME.$theme_check.'/theme.php'))
{
define('THEME', e_THEME.$theme_check.'/');
define('THEME_ABS', e_THEME_ABS.$theme_check.'/');
$legacy = (file_exists(e_THEME.$theme_check.'/theme.xml') === false);
define('THEME_LEGACY',$legacy);
$e107->site_theme = $theme_check;
}
else
@ -889,6 +902,8 @@ if (!function_exists('checkvalidtheme'))
}
}
$sql->db_Mark_time("Theme Check End");
$themes_dir = $e107->getFolder('themes');
$e107->http_theme_dir = "{$e107->server_path}{$themes_dir}{$e107->site_theme}/";
}
@ -916,6 +931,8 @@ if (!class_exists('e107table', false))
private $adminThemeClass = '';
public $frontend = null;
private $uniqueId = null;
private $content = array();
private $contentTypes = array('header','footer','text','title','image', 'list');
function __construct()
@ -944,6 +961,23 @@ if (!class_exists('e107table', false))
}
/**
* Set Advanced Menu content (beyond just $caption and $text)
* @param string $type header|footer|text|title|image
* @param string $val
*/
public function setContent($type, $val)
{
if(!in_array($type,$this->contentTypes))
{
return false;
}
$this->content[$type] = (string) $val;
}
/**
* @param $caption string caption text
* @param $text string
@ -1017,17 +1051,27 @@ if (!class_exists('e107table', false))
{
$thm = new $this->themeClass();
}
$options = $this->content;
$options['uniqueId'] = $this->uniqueId;
$options['menuArea'] = $this->eMenuArea;
$options['menuCount'] = $this->eMenuCount;
$options['menuTotal'] = varset($this->eMenuTotal[$this->eMenuArea]);
$options['setStyle'] = $this->eSetStyle;
if(is_object(vartrue($thm)))
{
$thm->tablestyle($caption, $text, $mode, array('uniqueId'=>$this->uniqueId, 'menuArea'=>$this->eMenuArea, 'menuCount'=>$this->eMenuCount, 'menuTotal'=>varset($this->eMenuTotal[$this->eMenuArea]), 'setStyle'=>$this->eSetStyle));
$thm->tablestyle($caption, $text, $mode, $options);
}
else
{
tablestyle($caption, $text, $mode, array('uniqueId'=>$this->uniqueId, 'menuArea'=>$this->eMenuArea,'menuCount'=>$this->eMenuCount,'menuTotal'=>varset($this->eMenuTotal[$this->eMenuArea]),'setStyle'=>$this->eSetStyle));
tablestyle($caption, $text, $mode, $options);
}
$this->uniqueId = null;
$this->content = array();
}
@ -1673,10 +1717,31 @@ function save_prefs($table = 'core', $uid = USERID, $row_val = '')
e107::getMessage()->addDebug('Deprecated save_prefs() backtrace:<pre>'."\n".print_r($backtrace, true).'</pre>');
}
switch($table)
{
case 'core':
//brute load, force update
if(count($pref) < 100) // precaution for old plugins
{
$backtrace = debug_backtrace(false);
e107::getAdminLog()->add(
'Core pref corruption avoided',
"Call to deprecated function save_prefs() (class2.php) with too few prefs. Backtrace:\n".print_r($backtrace, true),
E_LOG_INFORMATIVE,
'DEPRECATED'
);
e107::getMessage()->addDebug('Core-pref corruption avoided. Too few prefs sent to save_prefs(). Backtrace:<pre>'."\n".print_r($backtrace, true).'</pre>');
return false;
}
return e107::getConfig()->loadData($pref, false)->save(false, true);
break;
@ -1869,6 +1934,7 @@ function init_session()
define('USERIMAGE', $user->get('user_image'));
define('USERPHOTO', $user->get('user_sess'));
define('USERJOINED', $user->get('user_join'));
define('USERCURRENTVISIT', $user->get('user_currentvisit'));
define('USERVISITS', $user->get('user_visits'));
define('USERSIGNATURE', $user->get('user_signature'));

View File

@ -110,7 +110,7 @@ class admin_start
function __construct()
{
if(!getperms('0')) // don't display this tuff to regular admins only main admin.
if(!getperms('0') || varset($_GET['mode']) === 'customize') // don't display this tuff to regular admins only main admin.
{
return null;
}
@ -303,7 +303,7 @@ class admin_start
$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>";
$message .= " <a href='".$dl."' class='e-modal' data-modal-caption=\"".$caption."\" title=\"".LAN_DOWNLOAD."\">".$tp->toGlyph('fa-arrow-circle-o-down')."</a>";
e107::getMessage()->addInfo($message);
@ -350,7 +350,7 @@ class admin_start
$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>";
$message .= " <a href='".$dl."' class='e-modal' data-modal-caption=\"".$caption."\" title=\"".LAN_DOWNLOAD."\">".$tp->toGlyph('fa-arrow-circle-o-down')."</a>";
e107::getMessage()->addInfo($message);
@ -568,7 +568,7 @@ class admin_start
if (count($this->allowed_types) == 0)
{
$this->allowed_types = array('zip' => 1, 'gz' => 1, 'jpg' => 1, 'png' => 1, 'gif' => 1, 'pdf'=>1);
$mes->addInfo("Setting default filetypes: ".implode(', ',array_keys($this->allowed_types)));
$mes->addDebug("Setting default filetypes: ".implode(', ',array_keys($this->allowed_types)));
}
}

View File

@ -10,14 +10,6 @@
*
*/
/**
*
* @package e107
* @subpackage admin
*
* Handle display of the various system logs
*/
/*
* Preferences:
* 'sys_log_perpage' - number of events per page
@ -37,11 +29,8 @@ if(! getperms('S'))
exit();
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
// Main language file should automatically be loaded
// Load language files for log messages
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_log_messages.php'); //... for core functions
e107::coreLan('admin_log', true);
e107::coreLan('log_messages', true);
if(is_array($pref['lan_log_list'])) //... and for any plugins which support it
{

View File

@ -23,7 +23,7 @@ if(isset($_POST['go_back']))
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('administrator', true);
$e_sub_cat = 'admin';
require_once('auth.php');

View File

@ -8,29 +8,10 @@
*
* Ban List Management
*
* $URL$
* $Id$
*
*/
/**
* e107 Banlist administration
*
* @package e107
* @subpackage admin
* @version $Id$;
*/
require_once('../class2.php');
/*
@todo should this be here?
if(count($_POST) && !varset($_POST['e-token']))
{
die('Access denied - bl');
}
*/
if (!getperms('4'))
{
@ -38,11 +19,9 @@ if (!getperms('4'))
exit();
}
require_once(e_HANDLER.'iphandler_class.php'); // This is probably already loaded in class2.php
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('banlist', true);
e107::js('footer-inline', "
@ -53,11 +32,9 @@ e107::js('footer-inline', "
event.preventDefault();
});
");
class banlist_admin extends e_admin_dispatcher
{

View File

@ -8,16 +8,6 @@
*
* Banlist export
*
* $URL$
* $Id$
*/
/**
* e107 Banlist administration
*
* @package e107
* @subpackage admin
* @version $Id$;
*/
require_once('../class2.php');

View File

@ -8,8 +8,6 @@
*
* Admin BootLoader
*
* $URL$
* $Id$
*/
if (!defined('e107_INIT'))
@ -115,7 +113,7 @@ if(ADMIN && e_AJAX_REQUEST && varset($_GET['mode']) == 'addons' )
$text .= '<div class="media">';
$text .= '<div class="media-left">
<a href="'.$link.'">
<img class="media-object img-rounded" src="'.$img.'" style="width:100px">
<img class="media-object img-rounded rounded" src="'.$img.'" style="width:100px">
</a>
</div>
<div class="media-body">
@ -165,16 +163,10 @@ e107::coreLan('footer', true);
}
// Get Icon constants, theme override (theme/templates/admin_icons_template.php) is allowed
include_once(e107::coreTemplatePath('admin_icons'));
if(!defset('e_ADMIN_UI') && !defset('e_PAGETITLE'))
{
$array_functions = e107::getNav()->adminLinks('legacy'); // replacement see e107_handlers/sitelinks.php
@ -478,4 +470,4 @@ if (!function_exists("parse_admin"))
}
}
}
}
}

View File

@ -8,28 +8,17 @@
*
* Cache Administration Area
*
* $URL$
* $Id$
*
*/
/**
* Admin page - cache management
*
* @package e107
* @subpackage admin
* @version $Id$;
* @author e107 Inc
*/
require_once("../class2.php");
if (!getperms("C"))
{
e107::redirect('admin');
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('cache', true);
$e_sub_cat = 'cache';

View File

@ -73,7 +73,7 @@ class comments_admin_ui extends e_admin_ui
'comment_type' => array('title'=> LAN_TYPE, 'type' => 'method', 'width' => '10%', 'filter'=>TRUE),
'comment_item_id' => array('title'=> LAN_ITEM." ".LAN_ID, 'type' => 'text', 'readonly'=>2, 'data'=>'int', 'width' => '5%'),
'comment_item_id' => array('title'=> LAN_ITEM, 'type' => 'text', 'readonly'=>2, 'data'=>'int', 'width' => '5%'),
'comment_subject' => array('title'=> LAN_SUBJECT, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first', 'writeParms'=>array('size'=>'xxlarge')), // Display name
'comment_comment' => array('title'=> LAN_COMMENTS, 'type' => 'textarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1', 'writeParms'=>'size=xxlarge'), // Display name
'comment_author_id' => array('title'=> LAN_AUTHOR, 'type' => 'user', 'data' => 'int', 'width' => 'auto', 'writeParms' => 'nameField=comment_author_name'), // User id

View File

@ -9,7 +9,7 @@
* Custom Menus/Pages Administration
* Admin-related functions for custom page and menu creation
*/
define('e_MINIMAL',true);
//define('e_MINIMAL',true);
require_once('../class2.php');
if (!getperms("5|J")) { e107::redirect('admin'); exit; }
@ -19,12 +19,11 @@ e107::css('inline',"
.e-wysiwyg { height: 400px }
");
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('cpage', true);
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_page.php');
$e_sub_cat = 'custom';
class page_admin extends e_admin_dispatcher
{
@ -78,6 +77,19 @@ class page_admin extends e_admin_dispatcher
);
protected $menuTitle = ADLAN_42;
function init()
{
}
}
class page_admin_form_ui extends e_admin_form_ui
@ -160,13 +172,13 @@ class page_chapters_ui extends e_admin_ui
'chapter_name' => array('title'=> CUSLAN_53, 'type' => 'method', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE, 'writeParms'=>'size=xxlarge'),
'chapter_template' => array('title'=> LAN_TEMPLATE, 'type' => 'dropdown', 'width' => 'auto','filter' => true, 'batch'=>true, 'inline'=>true, 'writeParms'=>''),
'chapter_meta_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'textarea', 'width' => 'auto', 'thclass' => 'left','readParms' => 'expand=...&truncate=150&bb=1', 'readonly'=>FALSE),
'chapter_meta_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'textarea', 'width' => 'auto', 'thclass' => 'left','readParms' => 'expand=...&truncate=150&bb=1', 'writeParms'=>'size=xxlarge', 'readonly'=>FALSE),
'chapter_meta_keywords' => array('title'=> LAN_KEYWORDS, 'type' => 'tags', 'inline'=>true, 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE),
'chapter_sef' => array('title'=> LAN_SEFURL, 'type' => 'text', 'width' => 'auto', 'readonly'=>FALSE, 'inline'=>true, 'writeParms'=>'size=xxlarge&inline-empty=1'), // Display name
'chapter_sef' => array('title'=> LAN_SEFURL, 'type' => 'text', 'width' => 'auto', 'readonly'=>FALSE, 'inline'=>true, 'writeParms'=>'size=xxlarge&inline-empty=1&sef=chapter_name'), // Display name
'chapter_manager' => array('title'=> CUSLAN_55, 'type' => 'userclass', 'inline'=>true, 'width' => 'auto', 'data' => 'int','batch'=>TRUE, 'filter'=>TRUE),
'chapter_order' => array('title'=> LAN_ORDER, 'type' => 'text', 'width' => 'auto', 'thclass' => 'right', 'class'=> 'right' ),
'chapter_visibility' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'inline'=>true, 'width' => 'auto', 'data' => 'int','batch'=>TRUE, 'filter'=>TRUE),
'chapter_fields' => array('title', 'hidden', 'type'=>'hidden'),
'options' => array('title'=> LAN_OPTIONS, 'type' => 'method', 'width' => '10%', 'forced'=>TRUE, 'thclass' => 'center last', 'class' => 'left', 'readParms'=>'sort=1')
);
@ -178,6 +190,15 @@ class page_chapters_ui extends e_admin_ui
function init()
{
if(e_DEBUG === true)
{
e107::getMessage()->addWarning("Experimental: Custom Fields");
$this->tabs = array(LAN_GENERAL,"Custom Fields");
$this->fields['chapter_fields'] = array('title'=>"Fields", 'tab'=>1, 'type'=>'method', 'data'=>'json', 'writeParms'=>array('nolabel'=>2));
}
if($this->getAction() == 'list')
{
$this->fields['chapter_parent']['title'] = CUSLAN_56;
@ -238,7 +259,38 @@ class page_chapters_ui extends e_admin_ui
public function beforeUpdate($new_data, $old_data, $id)
{
// return $this->beforeCreate($new_data);
// return $this->beforeCreate($new_data);
$new_data['chapter_fields'] = $this->processCustomFields($new_data['chapter_fields']);
return $new_data;
}
private function processCustomFields($newdata)
{
if(empty($newdata))
{
return null;
}
$new = array();
foreach($newdata as $fields)
{
if(empty($fields['key']) || empty($fields['type']))
{
continue;
}
$key = $fields['key'];
unset($fields['key']);
$new[$key] = $fields;
}
return $new;
}
}
@ -281,7 +333,72 @@ class page_chapters_form_ui extends e_admin_form_ui
}
function chapter_fields($curVal,$mode,$parm)
{
$frm = e107::getForm();
if($mode == 'read')
{
}
if($mode == 'write')
{
$value= array();
if(!empty($curVal))
{
$curVal = e107::unserialize($curVal);
$i = 0;
foreach($curVal as $k=>$v)
{
$v['key'] = $k;
$value[$i] = $v;
$i++;
}
}
$text = "<table class='table table-striped table-bordered'>
<colgroup>
<col />
<col />
<col />
<col style='width:40%' />
</colgroup>
<tbody>
<tr><th>".LAN_NAME."</th><th>".LAN_TITLE."</th><th>".LAN_TYPE."</th><th>Params</th></tr>
";
for ($i = 0; $i <= 10; $i++)
{
$fieldName = $this->text('chapter_fields['.$i.'][key]',$value[$i]['key'],30, array('pattern'=>'^[a-z0-9-]*'));
$fieldTitle = $this->text('chapter_fields['.$i.'][title]',$value[$i]['title'], 80);
$fieldType = $this->select('chapter_fields['.$i.'][type]',$this->getFieldTypes(),$value[$i]['type'], 'useValues=1&default=blank');
$fieldParms = $this->text('chapter_fields['.$i.'][writeParms]',$value[$i]['writeParams'], 80, array('size'=>'xxlarge'));
$text .= "<tr><td>".$fieldName."</td><td>".$fieldTitle."</td><td>".$fieldType."</td><td>".$fieldParms."</td></tr>";
}
$text .= "</tbody></table>";
// $text .= print_a($value,true);
return $text;
}
if($mode == 'filter')
{
return;
}
if($mode == 'batch')
{
return;
}
}
@ -474,14 +591,14 @@ class page_admin_ui extends e_admin_ui
// PAGE LIST/EDIT and MENU EDIT modes.
protected $fields = array(
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'3%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
'page_id' => array('title'=> LAN_ID, 'type' => 'text', 'tab' => 0, 'width'=>'5%', 'forced'=> TRUE, 'readParms'=>'link=sef&target=dialog'),
'page_id' => array('title'=> LAN_ID, 'type' => 'text', 'tab' => 0, 'width'=>'5%', 'forced'=> TRUE, 'readParms'=>'link=sef&target=blank'),
'page_title' => array('title'=> LAN_TITLE, 'tab' => 0, 'type' => 'text', 'inline'=>true, 'width'=>'25%', 'writeParms'=>'size=block-level'),
'page_chapter' => array('title'=> CUSLAN_63, 'tab' => 0, 'type' => 'dropdown', 'width' => '20%', 'filter' => true, 'batch'=>true, 'inline'=>true),
'page_template' => array('title'=> LAN_TEMPLATE, 'tab' => 0, 'type' => 'dropdown', 'width' => 'auto','filter' => true, 'batch'=>true, 'inline'=>true, 'writeParms'=>''),
'page_template' => array('title'=> LAN_TEMPLATE, 'tab' => 0, 'type' => 'dropdown', 'width' => 'auto','filter' => true, 'batch'=>true, 'inline'=>true, 'writeParms'=>array()),
'page_author' => array('title'=> LAN_AUTHOR, 'tab' => 0, 'type' => 'user', 'inline'=>true, 'data'=>'int','width' => 'auto', 'thclass' => 'left'),
'page_text' => array('title'=> CUSLAN_9, 'tab' => 0, 'type' => 'bbarea', 'data'=>'str', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1', 'writeParms'=>'media=page&template=page'),
'page_text' => array('title'=> CUSLAN_9, 'tab' => 0, 'type' => 'bbarea', 'data'=>'str', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1', 'writeParms'=>array('media'=>'page', 'template'=>'page')),
// Options Tab.
@ -495,7 +612,9 @@ class page_admin_ui extends e_admin_ui
'page_metadscr' => array('title'=> CUSLAN_11, 'tab' => 1, 'type' => 'text', 'width' => 'auto', 'writeParms'=>'size=xxlarge'),
'page_order' => array('title'=> LAN_ORDER, 'tab' => 1, 'type' => 'number', 'width' => 'auto', 'inline'=>true),
'page_fields' => array('title'=>'Custom Fields', 'tab'=>4, 'type'=>'hidden', 'data'=>'json', 'width'=>'auto'),
// Menu Tab XXX 'menu_name' is 'menu_name' - not caption.
'menu_name' => array('title'=> CUSLAN_64, 'tab' => 2, 'type' => 'text', 'width' => 'auto','nolist'=>true, "help"=>"Will be listed in the Menu-Manager under this name or may be called using {CMENU=name} in your theme. Must use ASCII characters only and be all lowercase."),
'menu_title' => array('title'=> CUSLAN_65, 'nolist'=>true, 'tab' => 2, 'type' => 'text', 'inline'=>true, 'width'=>'25%', "help"=>"Caption displayed on the menu item.", 'writeParms'=>'size=xxlarge'),
@ -529,9 +648,13 @@ class page_admin_ui extends e_admin_ui
protected $books = array();
protected $cats = array(0 => LAN_NONE);
protected $templates = array();
protected $chapterFields = array();
function init()
{
if(vartrue($_POST['menu_delete'])) // Delete a Menu (or rather, remove it's data )
{
@ -544,7 +667,7 @@ class page_admin_ui extends e_admin_ui
}
// USED IN Menu LIST/INLINE-EDIT MODE ONLY.
if($this->getMode() == 'menu' && ($this->getACtion() == 'list' || $this->getACtion() == 'inline'))
if($this->getMode() == 'menu' && ($this->getAction() == 'list' || $this->getAction() == 'inline'))
{
$this->listQry = "SELECT SQL_CALC_FOUND_ROWS p.*,u.user_id,u.user_name FROM #page AS p LEFT JOIN #user AS u ON p.page_author = u.user_id WHERE p.menu_name != '' "; // without any Order or Limit.
@ -594,7 +717,18 @@ class page_admin_ui extends e_admin_ui
$this->parseAliases();
}
if($this->getAction() == 'create' && e_DEBUG === true)
{
$tmp = e107::getCoreTemplate('page', 'default');
if(!empty($tmp['editor']))
{
$this->fields['page_text']['writeParms']['default'] = $tmp['editor'];
}
}
$this->templates = e107::getLayouts('', 'page', 'front', '', true, false);
unset($this->templates['panel'], $this->templates['nav']);
@ -619,8 +753,8 @@ class page_admin_ui extends e_admin_ui
$sql = e107::getDb();
$sql->gen("SELECT chapter_id,chapter_name,chapter_parent FROM #page_chapters ORDER BY chapter_parent asc, chapter_order");
$chapterFields = array();
$sql->gen("SELECT chapter_id,chapter_name,chapter_parent, chapter_fields FROM #page_chapters ORDER BY chapter_parent asc, chapter_order");
while($row = $sql->fetch())
{
$cat = $row['chapter_id'];
@ -633,16 +767,173 @@ class page_admin_ui extends e_admin_ui
{
$book = $row['chapter_parent'];
$this->cats[$cat] = $this->books[$book] . " : ".$row['chapter_name'];
}
}
if(!empty($row['chapter_fields']))
{
$this->chapterFields[$cat] = e107::unserialize($row['chapter_fields']);
}
}
// asort($this->cats);
$this->fields['page_chapter']['writeParms']['optArray'] = $this->cats;
$this->fields['page_chapter']['writeParms']['size'] = 'xxlarge';
if(e_DEBUG !== false && $this->getAction() === 'create')
{
$this->fields['page_chapter']['writeParms']['ajax'] = array('src'=>e_SELF."?mode=page&action=chapter-change",'target'=>'tabadditional');
}
if(e_AJAX_REQUEST && isset($_POST['page_chapter']) ) //&& $this->getAction() === 'chapter-change'
{
$this->initCustomFields($_POST['page_chapter']);
$elid = 'core-page-create';
$model = $this->getModel();
$tabId = 'additional';
$data = array(
'tabs' => $this->getTabs(),
'legend' => '',
'fields' => $this->getFields(),
);
$text = $this->getUI()->renderCreateFieldset($elid, $data, $model, $tabId);
if(empty($text))
{
$text = "<div class='alert alert-info alert-block'>There are no additional fields for the selected chapter</div>";
}
$ajax = e107::getAjax();
$commands = array();
$commands[] = $ajax->commandInvoke('#tabadditional', 'html', array($text));
$ajax->response($commands);
exit;
}
}
private function initCustomFields($chap=null)
{
$this->tabs['additional'] = "Additional Fields";
if(!empty($this->chapterFields[$chap]))
{
if(!empty($this->chapterFields[$chap]))
{
foreach($this->chapterFields[$chap] as $key=>$fld)
{
$fld['tab'] = 'additional';
$fld['data'] = false;
$this->fields['page_fields__'.$key] = $fld;
}
}
}
}
private function loadCustomFieldsData()
{
$row = e107::getDb()->retrieve('page', 'page_chapter, page_fields', 'page_id='.$this->getId());
$chap = intval($row['page_chapter']);
$this->getModel()->set('page_fields', null);
$curVal = e107::unserialize($row['page_fields']);
if(!empty($this->chapterFields[$chap]))
{
foreach($this->chapterFields[$chap] as $key=>$fld)
{
$this->getModel()->set('page_fields__'.$key, $curVal[$key]);
}
}
}
function CreateObserver()
{
parent::CreateObserver();
$this->initCustomFields(0);
}
// Override default so we can alter the field db table data after it is loaded. .
function EditObserver()
{
parent::EditObserver();
if(!deftrue('e_DEBUG'))
{
return;
}
$row = e107::getDb()->retrieve('page', 'page_chapter, page_fields', 'page_id='.$this->getId());
$chap = intval($row['page_chapter']);
$this->initCustomFields($chap);
$this->loadCustomFieldsData();
}
/**
* Filter/Process Posted page_field data;
* @param $new_data
* @return null
*/
private function processCustomFieldData($new_data)
{
if(empty($new_data))
{
return null;
}
unset($new_data['page_fields']); // Reset.
foreach($new_data as $k=>$v)
{
if(substr($k,0,11) === "page_fields")
{
list($tmp,$newkey) = explode("__",$k);
$new_data['page_fields'][$newkey] = $v;
unset($new_data[$k]);
}
}
return $new_data;
}
/**
* Overrid
*/
@ -711,7 +1002,10 @@ class page_admin_ui extends e_admin_ui
$newdata['page_sef'] = eHelper::secureSef($newdata['page_sef']);
}
// $newdata = $this->processCustomFieldData($newdata);
$sef = e107::getParser()->toDB($newdata['page_sef']);
if(isset($newdata['page_title']) && isset($newdata['menu_name']) && empty($newdata['page_title']) && empty($newdata['menu_name']))
@ -732,11 +1026,17 @@ class page_admin_ui extends e_admin_ui
function beforeUpdate($newdata,$olddata, $id)
{
$newdata = $this->processCustomFieldData($newdata);
if(isset($newdata['menu_name']))
{
$newdata['menu_name'] = preg_replace('/[^\w-*]/','',$newdata['menu_name']);
}
return $newdata;
}
@ -771,6 +1071,8 @@ class page_admin_ui extends e_admin_ui
}
public function afterDelete($deleted_data, $id, $deleted_check)
{
$sql = e107::getDb();

View File

@ -50,7 +50,7 @@ require_once(e_ADMIN."auth.php");
Nuvolo Icons, PHPMailer, TCPDF, PHP UTF8
</p>
<div class="copyright">Copyright <a href="http://e107.org/content/About-Us:The-Team" title="e107 Team">e107 Inc.</a> 2008-2013</div>
<div class="copyright">Copyright <a href="http://e107.org/content/About-Us:The-Team" title="e107 Team">e107 Inc.</a> 2008-2017</div>
</div>
</div>
</div>

View File

@ -17,9 +17,7 @@ if (!getperms('U'))
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('cron', true);
class cron_admin extends e_admin_dispatcher
{
@ -269,7 +267,7 @@ class cron_admin_ui extends e_admin_ui
if(!$sql->insert('cron',$insert))
{
e107::getMessage()->add(LAN_CRON_6, E_MESSAGE_ERROR);
e107::getMessage()->addDebug(LAN_CRON_6);
}
else
{

View File

@ -26,9 +26,7 @@ if(isset($_POST['back']))
exit();
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('db', true);
$e_sub_cat = 'database';

View File

@ -8,10 +8,6 @@
*
* Docs
*
* $Source: /cvs_backup/e107_0.8/e107_admin/docs.php,v $
* $Revision$
* $Date$
* $Author$
*
*/
require_once("../class2.php");
@ -20,7 +16,7 @@ if (!ADMIN) {
exit;
}
e107::lan('core','docs',true);
e107::coreLan('docs', true);
define('DOC_PATH', e_DOCS.e_LANGUAGE.'/');
define('DOC_PATH_ALT', e_DOCS.'English/');

View File

@ -18,7 +18,7 @@ if (!getperms("F"))
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('emoticon', true);
$e_sub_cat = 'emoticon';

View File

@ -8,8 +8,6 @@
*
* URL and front controller Management
*
* $URL$
* $Id$
*/
require_once('../class2.php');

View File

@ -14,11 +14,9 @@ header('Content-Encoding: none'); // turn off gzip.
ob_implicit_flush(true);
ob_end_flush();
require_once('../class2.php');
e107::lan('core','fileinspector', true);
e107::coreLan('fileinspector', true);
if (!getperms('Y'))
{

View File

@ -25,7 +25,7 @@ if(! getperms('G'))
exit();
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('frontpage', true);
$e_sub_cat = 'frontpage';
require_once ('auth.php');

View File

@ -98,7 +98,17 @@ function loadJSAddons()
e107::css('core', 'core/all.jquery.css', 'jquery');
e107::js("core", "core/all.jquery.js","jquery",4); // Load all default functions.
$plUpload = "plupload/i18n/".e_LAN.".js";
if(e_LAN != 'en' && file_exists(e_WEB_JS.$plUpload))
{
e107::js('core', $plUpload);
}
}
loadJSAddons();

View File

@ -8,8 +8,6 @@
*
* Image Administration Area
*
* $URL$
* $Id$
*
*/
@ -53,7 +51,7 @@ if(isset($_POST['submit_cancel_show']))
exit();
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('image', true);
if($_GET['action'] == 'dialog')
{
@ -1484,7 +1482,7 @@ class media_admin_ui extends e_admin_ui
if(vartrue($parm['search']))
if(!empty($parm['search']))
{
$filtered = array();
if(!empty($items))
@ -2137,7 +2135,7 @@ class media_admin_ui extends e_admin_ui
$img_src = "
<div class='thumbnail'>
<label for='".$for."' ><img class='img-responsive' src='".$img_path."' alt='{$image_name}' title='".IMALAN_66.": {$image_name}' /></label>
<label for='".$for."' ><img class='img-responsive img-fluid' src='".$img_path."' alt='{$image_name}' title='".IMALAN_66.": {$image_name}' /></label>
</div>
";

View File

@ -6,12 +6,6 @@
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/index.php,v $
* $Revision$
* $Date$
* $Author$
*/
header('Location: admin.php');

View File

@ -22,7 +22,7 @@ if (!getperms("L"))
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_lancheck.php');
e107::coreLan('lancheck', true);
$e_sub_cat = 'language';
// require_once("auth.php");

View File

@ -2,7 +2,7 @@
/*
* e107 website system
*
* Copyright (C) 2008-2013 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)
*
@ -15,7 +15,7 @@ if (!getperms('L'))
e107::redirect('admin');
exit;
}
//include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('language', true);
$e_sub_cat = 'language';
@ -25,11 +25,6 @@ if(!empty($_GET['iframe']))
define('e_IFRAME', true);
}
class language_admin extends e_admin_dispatcher
{
@ -1091,7 +1086,7 @@ class lanDeveloper
function disableUnused($data)
{
$data = str_replace("2008-2010","2008-2013", $data);
$data = str_replace("2008-2010","2008-2017", $data);
$data = str_replace(' * $URL$
* $Revision$
* $Id$
@ -1166,21 +1161,29 @@ class lanDeveloper
// print_a($_SESSION['languageTools_lanFileList']);
$text .= "
<tr>
<td><div class='alert-info alert alert-block'>".e107::getParser()->toHTML(LANG_LAN_140, true)."</div></td>
<td class='form-inline'>
<select name='deprecatedLans[]' multiple style='height:200px'>
<option value=''>".LANG_LAN_141."</option>";
$text .= " <tr>
<td><div class='alert-info alert alert-block'>".e107::getParser()->toHTML(LANG_LAN_140, true)."</div></td>
</tr>
<tr>
<td class='form-inline'>
<select name='deprecatedLans[]' multiple style='height:200px'>
<option value=''>".LANG_LAN_141."</option>";
$omit = array('languages','\.png','\.gif','handlers');
$lans = $fl->get_files(e_ADMIN,'.php','standard',0);
asort($lans);
$fl->setFileFilter(array("^e_"));
$root = $fl->get_files(e_BASE,'.*?/?.*?\.php',$omit,0);
asort($root);
$templates = $fl->get_files(e_CORE."templates",'.*?/?.*?\.php',$omit,0);
asort($templates);
$shortcodes = $fl->get_files(e_CORE."shortcodes",'.*?/?.*?\.php',$omit,1);
asort($shortcodes);
$exclude = array('lan_admin.php');
$srch = array(e_ADMIN,e_PLUGIN, e_CORE, e_BASE );
@ -1261,7 +1264,7 @@ class lanDeveloper
$selected = ($_POST['deprecatedLanFile'][0] == 'auto') ? "selected='selected'" :"";
$text .= "<option value='auto' {$selected}>".LANG_LAN_142."</option><optgroup label='".LANG_LAN_143."'>\n";//Auto-Detect
asort($_SESSION['languageTools_lanFileList']);
foreach($_SESSION['languageTools_lanFileList'] as $val)
{
if(strstr($val,e_SYSTEM))

View File

@ -2,25 +2,16 @@
/*
* e107 website system
*
* Copyright (C) 2008-2012 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)
*
* Site navigation administration
*
* $URL$
* $Id$
*/
/**
* @package e107
* @subpackage admin
* @version $Id$
*
* Manage site navigation links
*/
require_once("../class2.php");
if (!getperms("I"))
{
e107::redirect('admin');
@ -77,13 +68,13 @@ class links_admin_ui extends e_admin_ui
public $sublink_data = null;
protected $fields = array(
'checkboxes' => array('title'=> '', 'width' => '3%','forced' => true, 'thclass' => 'center first','class' => 'center first'),
'link_button' => array('title'=> LAN_ICON, 'type'=>'icon', 'width'=>'5%', 'thclass' => 'center', 'class'=>'center', 'writeParms'=>'glyphs=1'),
'link_id' => array('title'=> LAN_ID, 'type'=>'method','readParms'=>'','noedit'=>TRUE),
'link_name' => array('title'=> LCLAN_15, 'width'=>'auto','type'=>'text', 'inline'=>true, 'required' =>false, 'validate' => false), // not required as only an icon may be used.
'link_category' => array('title'=> LAN_TEMPLATE, 'type' => 'dropdown', 'inline'=>true, 'batch'=>true, 'filter'=>true, 'width' => 'auto'),
'link_parent' => array('title'=> LCLAN_104, 'type' => 'method', 'data'=>'int', 'width' => 'auto', 'batch'=>true, 'filter'=>true, 'thclass' => 'left first'),
'checkboxes' => array('title'=> '', 'width' => '3%', 'forced' => true, 'thclass'=>'center first', 'class'=>'center first'),
'link_button' => array('title'=> LAN_ICON, 'type'=>'icon', 'width'=>'5%', 'thclass'=>'center', 'class'=>'center', 'writeParms'=>'glyphs=1'),
'link_id' => array('title'=> LAN_ID, 'type'=>'method', 'readParms'=>'', 'noedit'=>TRUE),
'link_name' => array('title'=> LAN_NAME, 'type'=>'text', 'inline'=>true, 'required'=>false, 'validate'=>false, 'width'=>'auto'), // not required as only an icon may be used.
'link_category' => array('title'=> LAN_TEMPLATE, 'type'=>'dropdown', 'inline'=>true, 'batch'=>true, 'filter'=>true, 'width'=>'auto'),
'link_parent' => array('title'=> LAN_PARENT, 'type' => 'method', 'data'=>'int', 'width'=>'auto', 'batch'=>true, 'filter'=>true, 'thclass'=>'left first'),
'link_url' => array('title'=> LAN_URL, 'width'=>'auto', 'type'=>'method', 'inline'=>true, 'required'=>true,'validate' => true, 'writeParms'=>'size=xxlarge'),
'link_sefurl' => array('title'=> LAN_SEFURL, 'type' => 'method', 'inline'=>false, 'width' => 'auto', 'help'=>LCLAN_107),
'link_class' => array('title'=> LAN_USERCLASS, 'type' => 'userclass','inline'=>true, 'writeParms' => 'classlist=public,guest,nobody,member,classes,admin,main', 'batch'=>true, 'filter'=>true, 'width' => 'auto'),

View File

@ -10,14 +10,6 @@
*
*/
/**
* e107 Mail handling - Admin
*
* @package e107
* @subpackage admin
*/
/*
Features:
1. Additional sources of email addresses for mailouts can be provided via plugins, and can be enabled via the mailout preferences page
@ -74,9 +66,9 @@ if (!getperms('W'))
e107::redirect('admin');
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_users.php');
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_mailout.php');
// e107::lan('core','signup');
e107::coreLan('users', true);
e107::coreLan('mailout', true);
require_once(e_HANDLER.'ren_help.php');
@ -242,7 +234,7 @@ class mailout_admin extends e_admin_dispatcher
'main/list' => array('caption'=> LAN_MANAGE, 'perm'=> 'W'),
'main/create' => array('caption'=> LAN_CREATE, 'perm' => 'W'),
'recipients/list' => array('caption'=> "Recipients", 'perm' => 'W'),
'recipients/list' => array('caption'=> Recipients, 'perm' => 'W'),
// 'main/send' => array('caption'=> "Send", 'perm' => 'W'),
'other' => array('divider'=> true),
// 'saved/list' => array('caption'=> LAN_MAILOUT_191, 'perm' => 'W'),
@ -252,7 +244,7 @@ class mailout_admin extends e_admin_dispatcher
'other2' => array('divider'=> true),
'prefs/prefs' => array('caption'=> LAN_PREFS, 'perm' => '0'),
'maint/maint' => array('caption'=> ADLAN_40, 'perm' => '0'),
'main/templates' => array('caption'=> 'Template Preview', 'perm' => '0'),
'main/templates' => array('caption'=> LAN_MAILOUT_262, 'perm' => '0'),
);
@ -298,7 +290,7 @@ class mailout_main_ui extends e_admin_ui
'mail_bcopy_to' => array('title' => LAN_MAILOUT_152,'tab'=>1, 'type'=>'method','data'=>false),
'mail_subject' => array('title' => LAN_MAILOUT_06, 'type'=>'text', 'forced' => TRUE,'data'=>'str', 'inline'=>true, 'writeParms'=>'size=xxlarge&required=1'),
'mail_content_status' => array('title' => LAN_MAILOUT_136, 'tab'=>1, 'type'=> 'dropdown', 'data'=>'int', 'filter'=>false, 'inline'=>false, 'thclass' => 'left', 'class'=>'left'),
'mail_total_count' => array('title' => "Total Recipients", 'noedit'=>true, 'type'=>'number'),
'mail_total_count' => array('title' => LAN_MAILOUT_263, 'noedit'=>true, 'type'=>'number'),
'mail_sent_count' => array('title' => LAN_MAILOUT_82, 'noedit'=>true, 'type'=>'number'),
'mail_togo_count' => array('title' => LAN_MAILOUT_83, 'noedit'=>true, 'type'=>'number'),
@ -315,7 +307,7 @@ class mailout_main_ui extends e_admin_ui
'mail_attach' => array('title' => LAN_MAILOUT_153, 'tab'=>1, 'type'=>'method','data'=>false),
'mail_include_images' => array('title' => LAN_MAILOUT_224, 'tab'=>1, 'type'=>'boolean','data'=>false, 'proc' => 'yesno'),
'mail_send_style' => array('title' => LAN_MAILOUT_154,'type'=>'method','data'=>false),
'mail_media' => array('title' => 'Embed Media', 'type' => 'images', 'data' => 'array', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => 'video=1', 'class' => 'center', 'thclass' => 'center', ),
'mail_media' => array('title' => LAN_MAILOUT_264, 'type' => 'images', 'data' => 'array', 'width' => 'auto', 'help' => '', 'readParms' => '', 'writeParms' => 'video=1', 'class' => 'center', 'thclass' => 'center', ),
'mail_body' => array('title' => LAN_MAILOUT_100, 'type'=>'bbarea', 'proc' => 'trunc200'),
'mail_body_templated' => array('title' => LAN_MAILOUT_257, 'noedit'=>true, 'proc' => 'chars'),
@ -412,7 +404,7 @@ class mailout_main_ui extends e_admin_ui
define('MAIL_STATUS_TEMP', 22); // Tags entries which aren't yet in any list
*/
$types = array(10=>'Pending',20=>"Saved", 21=>"Held", 0=>'Sent', 1=>'Bounced', 2=>'Cancelled', 3=> 'Partial', 5=>'Failed', 19 => "Max Active", 22=>"Temp");
$types = array(10=>LAN_MAILOUT_265,20=>LAN_SAVED, 21=>LAN_MAILOUT_217, 0=>LAN_MAILOUT_211, 1=>LAN_MAILOUT_213, 2=>LAN_MAILOUT_218, 3=>LAN_MAILOUT_219, 5=>LAN_MAILOUT_212, 19 => LAN_MAILOUT_266, 22=>"Temp");
$qr = array('saved'=>20,'pending'=>10,'held'=>21,'sent'=>0);
@ -1182,8 +1174,8 @@ class mailout_main_ui extends e_admin_ui
if(function_exists('openssl_pkey_new') && deftrue('e_DEVELOPER'))
{
$text .= "<tr><td>DomainKeys Identified Mail (DKIM)</td><td class='form-inline'>".$frm->button('DKIM_generate',1,'primary','Generate Public/Private keys')."
<span class='label label-warning'>Developer Mode Only</span></td></tr>";
$text .= "<tr><td>DomainKeys Identified Mail (DKIM)</td><td class='form-inline'>".$frm->button('DKIM_generate',1,'primary',LAN_MAILOUT_267)."
<span class='label label-warning'>".LAN_MAILOUT_268."</span></td></tr>";
}
@ -1593,8 +1585,8 @@ class mailout_admin_form_ui extends e_admin_form_ui
$link = e_SELF."?mode=main&action=send&id=".$id;
$preview = e_SELF."?mode=main&action=preview&id=".$id;
$text .= "<span class='btn-group'>";
$text .= "<a href='".$link."' class='btn btn-default' title='Send Mail'>".E_32_MAIL."</a>";
$text .= "<a rel='external' class='btn btn-default e-modal' data-modal-caption='Email preview' href='".$preview."' title='Preview'>".E_32_SEARCH."</a>";
$text .= "<a href='".$link."' class='btn btn-default' title='".LAN_MAILOUT_08."'>".E_32_MAIL."</a>";
$text .= "<a rel='external' class='btn btn-default e-modal' data-modal-caption='Email preview' href='".$preview."' title='".LAN_PREVIEW."'>".E_32_SEARCH."</a>";
$text .= $this->renderValue('options',$value,$attributes,$id);
@ -1608,8 +1600,8 @@ class mailout_admin_form_ui extends e_admin_form_ui
$preview = e_SELF."?mode=main&action=preview&id=".$id.'&user='.$user;
$text = "<span class='btn-group'>";
$text .= "<a href='".$link."' class='btn btn-default e-modal' data-modal-caption='Recipients for Mail #".$id."' title='Recipients'>".E_32_USER."</a>";
$text .= "<a rel='external' class='btn btn-default e-modal' data-modal-caption='Email preview' href='".$preview."' title='Preview'>".E_32_SEARCH."</a>";
$text .= "<a href='".$link."' class='btn btn-default e-modal' data-modal-caption='Recipients for Mail #".$id."' title='".LAN_MAILOUT_173."'>".E_32_USER."</a>";
$text .= "<a rel='external' class='btn btn-default e-modal' data-modal-caption='Email preview' href='".$preview."' title='".LAN_PREVIEW."'>".E_32_SEARCH."</a>";
$attributes['readParms']['editClass'] = e_UC_NOBODY;
$text .= $this->renderValue('options',$value,$attributes,$id);
@ -2644,4 +2636,4 @@ function headerjs()
return $text;
}
?>
?>

View File

@ -16,15 +16,18 @@ if(isset($_GET['configure']))
define("USER_AREA", true);
//Switch to desired layout
define('THEME_LAYOUT', $_GET['configure']);
define('e_DEBUG', false);
define('E107_DEBUG_LEVEL', 0);
if(function_exists('xdebug_disable'))
{
xdebug_disable();
}
@ini_set('display_errors', 0);
error_reporting(0);
if(empty($_GET['debug']))
{
define('e_DEBUG', false);
define('E107_DEBUG_LEVEL', 0);
if(function_exists('xdebug_disable'))
{
xdebug_disable();
}
@ini_set('display_errors', 0);
error_reporting(0);
}
define('e_MENUMANAGER_ACTIVE', true);
}
@ -41,15 +44,11 @@ if(e_MENUMANAGER_ACTIVE === false )
{
if(!deftrue("e_DEBUG_MENUMANAGER"))
{
e107::css('inline', '
e107::getJs()->inlineCSS('
body { overflow:hidden }
');
}
else
@ -73,7 +72,7 @@ if(e_MENUMANAGER_ACTIVE === false )
}
e107::css('inline',"
e107::getJs()->inlineCSS("
.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 }
@ -108,7 +107,7 @@ if(e_MENUMANAGER_ACTIVE === false )
@media all and (min-height: 1000px) {
.menu-selector { height:550px }
.menu-selector { height:500px }
}
@media all and (max-height: 800px) {
@ -121,12 +120,9 @@ if(e_MENUMANAGER_ACTIVE === false )
ul.dropdown-menu.e-mm-selector { padding: 10px; margin-top: -2px; margin-right:-2px; }
");
}
if (!getperms("2"))
{
e107::redirect('admin');
@ -134,17 +130,10 @@ if (!getperms("2"))
}
e107::coreLan('menus', true);
e107::coreLan('admin', true);
if(e_MENUMANAGER_ACTIVE === true || vartrue($_GET['enc']))
{
@ -210,9 +199,9 @@ $JSMODAL = <<<TEMPL
TEMPL;
e107::js('inline', $JSMODAL );
e107::getJs()->footerInline( $JSMODAL );
e107::js('inline', "
e107::getJs()->footerInline("
$(function() {
// Visibility/Instance Options etc.
@ -303,7 +292,7 @@ TEMPL;
");
e107::css('inline'," .column { width:100%; padding-bottom: 100px; }
e107::getJs()->inlineCSS(" .column { width:100%; padding-bottom: 100px; }
#core-menumanager-main th {color: silver; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size:14px; font-weight: bold; line-height:24px; background-color:#2F2F2F }
@ -523,7 +512,7 @@ TEMPL;
// 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','
e107::getJs()->footerInline('
$(function()
{
// post the form back to this script.
@ -626,7 +615,7 @@ TEMPL;
else
{
/*
e107::js('footer-inline', "
@ -667,7 +656,7 @@ else
");
*/
@ -709,19 +698,7 @@ if($_SERVER['E_DEV_MENU'] == 'true')
return e_menu_layout::menuSelector();
/*
$text = '
<ul class="nav nav-tabs">
<li class="active"><a href="#plugins" data-toggle="tab">'.ADLAN_CL_7.'</a></li>
@ -784,7 +761,7 @@ if($_SERVER['E_DEV_MENU'] == 'true')
</div>";
return array('caption'=>MENLAN_57,'text'=>$text);
return array('caption'=>MENLAN_57,'text'=>$text);*/
}
//}
@ -1043,7 +1020,7 @@ class e_menu_layout
;
$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. ";
$diz = MENLAN_58;
$caption .= "<span class='pull-right'><a class='e-tip' title=\"".$tp->toAttribute($diz)."\">".ADMIN_INFO_ICON."</a></span>";
@ -1935,4 +1912,4 @@ function menus_adminmenu()
}
?>
?>

View File

@ -6,17 +6,11 @@
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/message.php,v $
* $Revision$
* $Date$
* $Author$
*/
require_once("../class2.php");
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('message', true);
$e_sub_cat = 'message';
require_once("auth.php");

View File

@ -11,12 +11,14 @@
*
*/
require_once("../class2.php");
if (!getperms("T")) {
if (!getperms("T"))
{
e107::redirect('admin');
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('meta', true);
$e_sub_cat = 'meta';
require_once("auth.php");
@ -94,12 +96,12 @@ $text = "
</tr>
<tr>
<td>".LAN_COPYRIGHT."</td>
<td><input class='tbox input-text' size='70' type='text' name='meta_copyright' value=\"".varset($meta_copyright[e_LANGUAGE])."\" /></td>
<td><input class='tbox input-text' size='70' type='text' name='meta_copyright' value=\"".$meta_copyright[e_LANGUAGE]."\" /></td>
</tr>
<tr>
<td>".LAN_AUTHOR."</td>
<td><input class='tbox input-text' size='70' type='text' name='meta_author' value=\"".varset($meta_author[e_LANGUAGE])."\" /></td>
<td><input class='tbox input-text' size='70' type='text' name='meta_author' value=\"".$meta_author[e_LANGUAGE]."\" /></td>
</tr>
<tr>

View File

@ -9,13 +9,14 @@
*/
require_once("../class2.php");
if (!getperms("B")) {
if (!getperms("B"))
{
e107::redirect('admin');
exit;
}
$tmp = explode(".", e_QUERY);
$table = $tmp[0];
$id = intval($tmp[1]);

View File

@ -27,9 +27,6 @@ e107::css('inline', "
");
class news_admin extends e_admin_dispatcher
{
@ -509,6 +506,9 @@ class news_admin_ui extends e_admin_ui
$new_data['news_sef'] = empty($new_data['news_sef']) ? eHelper::title2sef($new_data['news_title']) : eHelper::secureSef($new_data['news_sef']);
$this->checkSEFSimilarity($new_data);
$tmp = explode(chr(35), $new_data['news_author']);
$new_data['news_author'] = intval($tmp[0]);
@ -566,6 +566,9 @@ class news_admin_ui extends e_admin_ui
$new_data['news_sef'] = eHelper::title2sef($new_data['news_title']);
}
$this->checkSEFSimilarity($new_data);
if(!empty($new_data['news_author']))
{
$tmp = explode(chr(35), $new_data['news_author']);
@ -581,6 +584,30 @@ class news_admin_ui extends e_admin_ui
}
/**
* Display a warning if there is a mismatch with the SEF Url.
* @param $new_data
*/
private function checkSEFSimilarity($new_data)
{
if(e_LANGUAGE === "Japanese" || e_LANGUAGE === "Korean")
{
return null;
}
$expectedSEF = eHelper::title2sef($new_data['news_title']);
similar_text($expectedSEF,$new_data['news_sef'],$percSimilar);
if($percSimilar < 60)
{
e107::getMessage()->addWarning(LAN_NEWS_108); // The SEF URL is unlike the title of your news item.
}
}
public function afterCreate($new_data, $old_data, $id)
{

View File

@ -8,23 +8,15 @@
*
*/
/**
* @package e107
* @subpackage admin
*
* 'Notify' admin page - selects action on various events
*/
require_once('../class2.php');
if (!getperms('O'))
{
e107::redirect('admin');
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('notify', true);
class plugin_notify_admin extends e_admin_dispatcher
{

View File

@ -6,16 +6,11 @@
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/phpinfo.php,v $
* $Revision$
* $Date$
* $Author$
*/
require_once("../class2.php");
if (!getperms("0"))
if(!getperms("0"))
{
e107::redirect('admin');
exit;

View File

@ -11,7 +11,8 @@
*/
require_once("../class2.php");
if (!getperms("Z"))
if(!getperms("Z"))
{
e107::redirect('admin');
exit;

View File

@ -9,6 +9,7 @@
* Administration - Site Preferences
*
*/
require_once ("../class2.php");
if(isset($_POST['newver']))
@ -17,17 +18,17 @@ if(isset($_POST['newver']))
exit();
}
if(! getperms("1"))
if(!getperms("1"))
{
e107::redirect('admin');
exit();
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('prefs', true);
$e_sub_cat = 'prefs';
e107::lan('core','mailout','admin');
//e107::lan('core','mailout','admin');
e107::coreLan('mailout', true);
require_once (e_ADMIN."auth.php");

View File

@ -17,15 +17,13 @@ if (!getperms('X'))
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('search', true);
$e_sub_cat = 'search';
require_once('auth.php');
require_once(e_HANDLER.'userclass_class.php');
require_once(e_HANDLER.'search_class.php');
$frm = e107::getForm();
$mes = e107::getMessage();
$e_userclass = new user_class();

View File

@ -6,22 +6,17 @@
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/theme.php,v $
* $Revision$
* $Date$
* $Author$
*/
require_once("../class2.php");
if (!getperms("1"))
{
e107::redirect('admin');
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('theme', true);
$e_sub_cat = 'theme_manage';

View File

@ -10,6 +10,7 @@
*
*/
require_once ('../class2.php');
if(!getperms('9'))
{
e107::redirect('admin');
@ -18,7 +19,7 @@ if(!getperms('9'))
$e_sub_cat = 'maintain';
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('ugflag', true);
$mes = e107::getMessage();
$frm = e107::getForm();

View File

@ -1,26 +1,14 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| Copyright (C) 2008-2010 e107 Inc (e107.org)
| http://e107.org
|
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $URL$
| $Revision$
| $Id$
| $Author$
+----------------------------------------------------------------------------+
*/
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
/**
* @package e107
* @subpackage admin
* @version $Id$;
*
* Update routines from older e107 versions to current.
*

View File

@ -36,10 +36,13 @@ if (isset($_POST['update_settings']))
$userData['data']['user_password'] = $sql->escape($userMethods->HashPassword($_POST['a_password'], $currentUser['user_loginname']), FALSE);
unset($_POST['a_password']);
unset($_POST['a_password2']);
if (vartrue($pref['allowEmailLogin']))
{
$new_pass = e107::getParser()->filter($_POST['a_password']);
$user_prefs = e107::getArrayStorage()->unserialize($currentUser['user_prefs']);
$user_prefs['email_password'] = $userMethods->HashPassword($new_pass, $email);
$user_prefs['email_password'] = $userMethods->HashPassword($new_pass, USEREMAIL);
$userData['data']['user_prefs'] = e107::getArrayStorage()->serialize($user_prefs);
}

View File

@ -10,25 +10,15 @@
*
*/
/**
* e107 Userclass handling - Admin
*
* @package e107
* @subpackage admin
* @version $Id$;
*/
require_once('../class2.php');
if (!getperms('4'))
{
e107::redirect('admin');
exit;
}
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
e107::coreLan('userclass2', true);
class uclass_admin extends e_admin_dispatcher

View File

@ -16,8 +16,7 @@ if (!getperms('4'))
exit;
}
include_lan(e_LANGUAGEDIR . e_LANGUAGE . '/admin/lan_' . e_PAGE);
e107::coreLan('users_extended', true);
if(varset($_GET['mode']) == "ajax")
{

View File

@ -6,16 +6,10 @@
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/ver.php,v $
* $Revision$
* $Date$
* $Author$
*/
if (!defined('e107_INIT')) { exit; }
$e107info['e107_version'] = "2.1.4 (git)";
$e107info['e107_version'] = "2.1.5 (git)";
?>

View File

@ -15,7 +15,7 @@ if (!getperms("M"))
exit;
}
e107::lan('core','wmessage',true);
e107::coreLan('wmessage', true);
class wmessage_admin extends e_admin_dispatcher

View File

@ -133,7 +133,7 @@ class bb_img extends e_bb_base
$imgParms['title'] = $imgParms['alt'] ;
$imgParms['class'] = "img-rounded bbcode ".e107::getBB()->getClass('img');; // This will be overridden if a new class is specified
$imgParms['class'] = "img-rounded rounded bbcode ".e107::getBB()->getClass('img');; // This will be overridden if a new class is specified
if($mode == 'string')
{

View File

@ -491,14 +491,14 @@ class admin_shortcodes
$allconfigs = multiarray_sort($allconfigs,'title'); //XXX FIXME - not sorting correctly.
$text = "<ul id='e-latest' class='unstyled list-unstyled'>";
$text = "<ul id='e-latest' class='list-group'>";
foreach($allconfigs as $k=>$v)
{
foreach($v as $val)
{
$class = admin_shortcodes::getBadge($val['total']);
$link = "<a href='".$val['url']."'>".str_replace(":"," ",$val['title'])." <span class='".$class."'>".$val['total']."</span></a>";
$text .= "<li class='clearfix'>".$val['icon']." ".$link."</li>\n";
$link = "<a href='".$val['url']."'>".$val['icon']." ".str_replace(":"," ",$val['title'])." <span class='".$class."'>".$val['total']."</span></a>";
$text .= "<li class='list-group-item clearfix'>".$link."</li>\n";
}
}
$text .= "</ul>";
@ -707,7 +707,7 @@ class admin_shortcodes
{
if(e_DEBUG !== false)
{
return "<div class='navbar-right navbar-text'><span class='label label-warning'>DEBUG MODE</span>&nbsp;</div>";
return "<div class='navbar-right navbar-text admin-icon-debug' title='DEBUG MODE ACTIVE'>".e107::getParser()->toGlyph('fa-bug')."&nbsp;</div>";
}
}
@ -1199,15 +1199,15 @@ class admin_shortcodes
$allconfigs = multiarray_sort($allconfigs,'title'); //XXX FIXME - not sorting correctly.
$text = "<ul id='e-status' class='unstyled list-unstyled'>";
$text = "<ul id='e-status' class='list-group'>";
foreach($allconfigs as $k=>$v)
{
foreach($v as $val)
{
$type = empty($val['invert']) ? 'latest' : 'invert';
$class = admin_shortcodes::getBadge($val['total'], $type);
$link = "<a href='".$val['url']."'>".str_replace(":"," ",$val['title'])." <span class='".$class."'>".$val['total']."</span></a>";
$text .= "<li>".$val['icon']." ".$link."</li>\n";
$link = "<a href='".$val['url']."'>".$val['icon']." ".str_replace(":"," ",$val['title'])." <span class='".$class."'>".$val['total']."</span></a>";
$text .= "<li class='list-group-item'>".$link."</li>\n";
}
}
$text .= "</ul>";
@ -1774,9 +1774,9 @@ Inverse 10 <span class="badge badge-inverse">10</span>
$tmp[8]['image_large_src'] = '';
$tmp[8]['link_class'] = '';
$menu_vars['logout']['text'] = ADMINNAME; // ""; // ADMINNAME;
$menu_vars['logout']['text'] = ''; // ADMINNAME; // ""; // ADMINNAME;
$menu_vars['logout']['link'] = '#';
$menu_vars['logout']['image'] = $tp->toGlyph('fa-user'); // "<i class='icon-user'></i>"; // "<img src='".E_16_NAV_LGOT."' alt='".ADLAN_151."' class='icon S16' />";
$menu_vars['logout']['image'] = $tp->toAvatar(null, array('w'=>30,'h'=>30,'crop'=>1, 'shape'=>'circle')); // $tp->toGlyph('fa-user'); // "<i class='icon-user'></i>"; // "<img src='".E_16_NAV_LGOT."' alt='".ADLAN_151."' class='icon S16' />";
$menu_vars['logout']['image_src'] = LAN_LOGOUT;
$menu_vars['logout']['sub'] = $tmp;
}

View File

@ -364,7 +364,7 @@ class comment_shortcodes extends e_shortcode
if ($pref['allowCommentEdit'] && USER && $this->var['user_id'] == USERID && ($this->var['comment_lock'] < 1))
{
$adop_icon = (file_exists(THEME."images/commentedit.png") ? "<img src='".THEME_ABS."images/commentedit.png' alt='".COMLAN_318."' title='".COMLAN_318."' class='icon' />" : "Edit");
$adop_icon = (file_exists(THEME."images/commentedit.png") ? "<img src='".THEME_ABS."images/commentedit.png' alt='".COMLAN_318."' title='".COMLAN_318."' class='icon' />" : LAN_EDIT);
//Searching for '.' is BAD!!! It breaks mod rewritten requests. Why is this needed at all?
if (strstr(e_QUERY, "&"))
{

View File

@ -439,7 +439,7 @@ class news_shortcodes extends e_shortcode
}
// When news_allow_comments = 1 then it is disabled. Backward, but that's how it is in v1.x
$text = ($this->news_item['news_allow_comments'] ? $this->param['commentoffstring'] : "<a title='".$this->sc_newscommentcount()." comments' class='e-tip".$class."' href='".e107::getUrl()->create('news/view/item', $this->news_item)."'>".$this->param['commentlink'].'</a>');
$text = ($this->news_item['news_allow_comments'] ? $this->param['commentoffstring'] : "<a title='".$this->sc_newscommentcount()." ".LAN_COMMENTS."' class='e-tip".$class."' href='".e107::getUrl()->create('news/view/item', $this->news_item)."'>".$this->param['commentlink'].'</a>');
return $text;
}
@ -510,7 +510,7 @@ class news_shortcodes extends e_shortcode
$class = varset($parm['class']);
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";
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";
}
else
{
@ -693,7 +693,7 @@ class news_shortcodes extends e_shortcode
break;
default:
return "<a href='".e107::getUrl()->create('news/view/item', $this->news_item)."'><img class='news_image img-responsive img-rounded ".$class."' src='".$src."' alt='' style='".$style."' {$dimensions} {$srcset} /></a>";
return "<a href='".e107::getUrl()->create('news/view/item', $this->news_item)."'><img class='news_image img-responsive img-fluid img-rounded rounded ".$class."' src='".$src."' alt='' style='".$style."' {$dimensions} {$srcset} /></a>";
break;
}
}
@ -734,7 +734,7 @@ class news_shortcodes extends e_shortcode
$parm['item'] = ($parm['item'] +1);
if(empty($parm['class']))
{
$parm['class'] = 'img-responsive news-media news-media-'.$parm['item'];
$parm['class'] = 'img-responsive img-fluid news-media news-media-'.$parm['item'];
}
return $this->sc_newsimage($parm);
}
@ -811,7 +811,7 @@ class news_shortcodes extends e_shortcode
* Display News Images (but not video thumbnails )
* @param $parm array
* @example {NEWSIMAGE: type=src&placeholder=true}
* @example {NEWSIMAGE: class=img-responsive}
* @example {NEWSIMAGE: class=img-responsive img-fluid}
*/
function sc_newsimage($parm = null)
{
@ -826,7 +826,7 @@ class news_shortcodes extends e_shortcode
$tmp = $this->handleMultiple($parm);
$srcPath = $tmp['file'];
$class = (!empty($parm['class'])) ? $parm['class'] : "news_image news-image img-responsive img-rounded";
$class = (!empty($parm['class'])) ? $parm['class'] : "news_image news-image img-responsive img-fluid img-rounded rounded";
$class .= ' news-image-'.$tmp['count'];
$dimensions = null;
$srcset = null;

View File

@ -33,9 +33,17 @@ class cpage_shortcodes extends e_shortcode
foreach($books as $row)
{
$id = $row['chapter_id'];
if(!empty($row['chapter_fields']))
{
$row['chapter_fields'] = e107::unserialize($row['chapter_fields']);
}
$this->chapterData[$id] = $row;
}
}
@ -596,5 +604,57 @@ class cpage_shortcodes extends e_shortcode
return "<a rel='external' title=\"".LAN_EDIT."\" data-modal-caption=\"".LAN_EDIT."\" class='btn btn-default ".$modal."' href='".e_ADMIN_ABS."cpage.php?action=edit&id=".$this->var['page_id'].$iframe."' >".$icon."</a>";
}
/**
* Return raw HTML-usable values from page fields.
* @experimental subject to change without notice.
* @param null $parm
* @return mixed
*/
function sc_cpagefield($parm=null)
{
if(empty($parm['name']) || empty($this->var['page_fields']))
{
return null;
}
$tp = e107::getParser();
$chap = $this->var['page_chapter'];
$key = $parm['name'];
$fields = $this->chapterData[$chap]['chapter_fields'];
$fieldData = e107::unserialize($this->var['page_fields']);
$type = $fields[$key]['type'];;
// @todo Move this part to form_handler somewhere.
if(isset($fieldData[$key]))
{
$value = $fieldData[$key];
switch($type)
{
case "image":
return $tp->toImage($value);
break;
case "icon":
return $tp->toIcon($value);
break;
default:
return $tp->toHtml($value);
}
}
}
}

View File

@ -15,12 +15,12 @@ if(deftrue('BOOTSTRAP'))
elseif (defined("ICONMAIL") && file_exists(THEME."images/".ICONMAIL))
{
$icon = THEME_ABS."images/".ICONMAIL;
$img = "<img src='".$icon."' style='border:0' alt='{$parms[0]}' />";
$img = "<img src='".$icon."' style='border:0' alt='{$parms[0]}' class='icon S16 action' />";
}
else
{
$icon = e_IMAGE_ABS."generic/email.png";
$img = "<img src='".$icon."' style='border:0' alt='{$parms[0]}' />";
$img = "<img src='".$icon."' style='border:0' alt='{$parms[0]}' class='icon S16 action' />";
}
// message^source^other_parms

View File

@ -10,12 +10,12 @@ if(deftrue('BOOTSTRAP'))
elseif (defined("ICONPRINT") && file_exists(THEME."images/".ICONPRINT))
{
$icon = THEME_ABS."images/".ICONPRINT;
$img = "<img src='".$icon."' style='border:0' alt='{$parms[0]}' />";
$img = "<img src='".$icon."' style='border:0' alt='{$parms[0]}' class='icon S16 action' />";
}
else
{
$icon = e_IMAGE_ABS."generic/printer.png";
$img = "<img src='".$icon."' style='border:0' alt='{$parms[0]}' />";
$img = "<img src='".$icon."' style='border:0' alt='{$parms[0]}' class='icon S16 action' />";
}

View File

@ -387,6 +387,7 @@ CREATE TABLE page (
page_ip_restrict text,
page_template varchar(50) NOT NULL default '',
page_order int(4) unsigned NOT NULL default '9999',
page_fields mediumtext,
menu_name varchar(50) NOT NULL default '',
menu_title varchar(250) NOT NULL default '',
menu_text mediumtext,
@ -418,6 +419,7 @@ CREATE TABLE page_chapters (
chapter_order int(6) unsigned NOT NULL default '0',
chapter_template varchar(50) NOT NULL default '',
chapter_visibility tinyint(3) unsigned NOT NULL default '0',
chapter_fields mediumtext,
PRIMARY KEY (chapter_id),
KEY chapter_order (chapter_order)
) ENGINE=MyISAM;

View File

@ -440,14 +440,25 @@ if (!defined('E_16_FAILEDLOGIN')) {
define("E_32_TRUE", "<i class='S32 e-true-32'></i>");
/*
define("ADMIN_TRUE_ICON", "<i class='fa fa-check text-success'></i>");
define("ADMIN_FALSE_ICON", "<i class='fa fa-times text-danger'></i>");
define("ADMIN_WARNING_ICON", "<i class='fa fa-warning text-warning'></i>");
define("ADMIN_EDIT_ICON", "<i class='fa fa-edit fa-2x fa-fw'></i>");
define("ADMIN_DELETE_ICON", "<i class='fa fa-trash fa-2x fa-fw'></i>");
define("ADMIN_EXECUTE_ICON", "<i class='fa fa-power-off fa-2x fa-fw'></i>");
define("ADMIN_SORT_ICON", "<i class='fa fa-sort fa-2x fa-fw'></i>");
*/
define("ADMIN_TRUE_ICON", "<i class='S16 e-true-16'></i>");
define("ADMIN_FALSE_ICON", "<i class='S16 e-false-16'></i>");
define("ADMIN_WARNING_ICON", "<i class='S16 e-warning-16'></i>");
define("ADMIN_EDIT_ICON", "<i class='S32 e-edit-32'></i>");
define("ADMIN_DELETE_ICON", "<i class='S32 e-delete-32'></i>");
define("ADMIN_ADD_ICON", "<i class='S32 e-add-32'></i>");
define("ADMIN_INFO_ICON", "<i class='S16 e-info-16'></i>");
define("ADMIN_CONFIGURE_ICON", "<i class='S32 e-settings-32'></i>");
@ -463,6 +474,7 @@ define("E_32_TRUE", "<i class='S32 e-true-32'></i>");
define("ADMIN_EXECUTE_ICON", "<i class='S32 e-execute-32'></i>");
// FOR BC
define("ADMIN_EDIT_ICON_PATH", e_IMAGE_ABS."admin_images/edit_32.png");

View File

@ -51,7 +51,11 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
<div class="clear"><!-- --></div>
{CPAGERATING|default}
{CPAGEEDIT}
';
';
// {CPAGEFIELD: name=image}
$PAGE_WRAPPER['default']['CPAGEEDIT'] = "<div class='text-right'>{---}</div>";
@ -100,7 +104,7 @@ $sc_style['CPAGENAV|default']['post'] = '</div>';
$PAGE_TEMPLATE['default']['related']['item'] = '<div class="col-md-4"><a href="{RELATED_URL}">{RELATED_IMAGE}</a><h3><a href="{RELATED_URL}">{RELATED_TITLE}</a></h3></div>';
$PAGE_TEMPLATE['default']['related']['end'] = '</div>';
// $PAGE_TEMPLATE['default']['editor'] = '<ul class="fa-ul"><li><i class="fa fa-li fa-edit"></i> Level 1</li><li><i class="fa fa-li fa-cog"></i> Level 2</li></ul>';
#### No table render example template ####

View File

@ -8,7 +8,7 @@
<core name="admincss">admin_dark.css</core>
<core name="adminlanguage"></core>
<core name="adminpwordchange">0</core>
<core name="adminstyle">infopanel</core>
<core name="adminstyle">flexpanel</core>
<core name="admintheme">bootstrap3</core>
<core name="allowCommentEdit">0</core>
<core name="allowEmailLogin">2</core>

View File

@ -605,7 +605,7 @@ class e107_db_debug {
$inc = array(
'BOOTSTRAP','HEADERF','FOOTERF','FILE_UPLOADS','FLOODPROTECT','FLOODTIMEOUT','CHARSET',
'GUESTS_ONLINE','MEMBERS_ONLINE','PAGE_NAME','STANDARDS_MODE','TIMEOFFSET',
'TOTAL_ONLINE','THEME','THEME_ABS','THEME_LAYOUT','THEME_STYLE','META_OG','META_DESCRIPTION','MPREFIX','VIEWPORT','BODYTAG','CSSORDER'
'TOTAL_ONLINE','THEME','THEME_ABS','THEME_LAYOUT', 'THEME_LEGACY','THEME_STYLE','META_OG','META_DESCRIPTION','MPREFIX','VIEWPORT','BODYTAG','CSSORDER'
);
$userCon = get_defined_constants(true);

View File

@ -144,15 +144,18 @@ class e107_debug {
$aDVal = explode('.',$dVals); // support multiple values, OR'd together
$dVal = 0;
foreach ($aDVal as $curDVal)
{
if (isset($this->aDebugShortcuts[$curDVal]))
{
$dVal |= $this->aDebugShortcuts[$curDVal];
}
}
else
{
$dVal |= $curDVal;
$dVal |= intval($curDVal);
}
}

View File

@ -2778,9 +2778,11 @@ class e107
return false;
}
self::getMessage()->addDebug("Couldn't load language file: ".$path);
$path = str_replace(e_LANGUAGE, 'English', $path);
self::getDebug()->log("Couldn't load language file: ".$path);
if(!is_readable($path))
{
return false;

View File

@ -3536,7 +3536,7 @@ class e_parser
public function toGlyph($text, $space=" ")
{
if(!deftrue('BOOTSTRAP') || empty($text))
if(empty($text))
{
return false;
}
@ -3655,12 +3655,19 @@ class e_parser
$linkStart = '';
$linkEnd = '';
if(!empty($options['h']))
{
$height = intval($options['h']);
}
if($userData === null && USERID)
{
$userData = array();
$userData['user_id'] = USERID;
$userData['user_image'] = USERIMAGE;
$userData['user_name'] = USERNAME;
$userData['user_name'] = USERNAME;
$userData['user_currentvisit'] = USERCURRENTVISIT;
}
@ -3703,7 +3710,7 @@ class e_parser
}
$title = (ADMIN) ? $image : $tp->toAttribute($userData['user_name']);
$shape = (!empty($options['shape'])) ? "img-".$options['shape'] : "img-rounded";
$shape = (!empty($options['shape'])) ? "img-".$options['shape'] : "img-rounded rounded";
if(!empty($options['type']) && $options['type'] == 'url')
{
@ -3714,8 +3721,10 @@ class e_parser
$heightInsert = empty($height) ? '' : "height='".$height."'";
$id = (!empty($options['id'])) ? "id='".$options['id']."' " : "";
$classOnline = (!empty($userData['user_currentvisit']) && intval($userData['user_currentvisit']) > (time() - 300)) ? " user-avatar-online" : '';
$text = $linkStart;
$text .= "<img ".$id."class='".$shape." user-avatar' alt=\"".$title."\" src='".$img."' width='".$width."' ".$heightInsert." />";
$text .= "<img ".$id."class='".$shape." user-avatar".$classOnline."' alt=\"".$title."\" src='".$img."' width='".$width."' ".$heightInsert." />";
$text .= $linkEnd;
// return $img;
return $text;
@ -3894,7 +3903,7 @@ class e_parser
$id = (!empty($parm['id'])) ? "id=\"".$parm['id']."\" " : "" ;
$class = (!empty($parm['class'])) ? $parm['class'] : "img-responsive";
$class = (!empty($parm['class'])) ? $parm['class'] : "img-responsive img-fluid";
$alt = (!empty($parm['alt'])) ? $tp->toAttribute($parm['alt']) : basename($file);
$style = (!empty($parm['style'])) ? "style=\"".$parm['style']."\" " : "" ;
$srcset = (!empty($parm['srcset'])) ? "srcset=\"".$parm['srcset']."\" " : "";
@ -4071,7 +4080,7 @@ class e_parser
if($thumb == 'tag')
{
return "<img class='img-responsive' src='".$thumbSrc."' alt='Youtube Video' style='width:".vartrue($parm['w'],'80')."px'/>";
return "<img class='img-responsive img-fluid' src='".$thumbSrc."' alt='Youtube Video' style='width:".vartrue($parm['w'],'80')."px'/>";
}
if($thumb == 'email')
@ -4117,7 +4126,7 @@ class e_parser
{
$thumbSrc = e_IMAGE_ABS."generic/playlist_120.png";
}
return "<img class='img-responsive' src='".$thumbSrc."' alt='".LAN_YOUTUBE_PLAYLIST."' style='width:".vartrue($parm['w'],'80')."px'/>";
return "<img class='img-responsive img-fluid' src='".$thumbSrc."' alt='".LAN_YOUTUBE_PLAYLIST."' style='width:".vartrue($parm['w'],'80')."px'/>";
}

View File

@ -67,6 +67,13 @@ class e_form
protected $_tabindex_enabled = true;
protected $_cached_attributes = array();
private $fields = array(
'number', 'email', 'url', 'password', 'text', 'tags', 'textarea',
'bbarea', 'image', 'file', 'icon', 'datestamp', 'checkboxes', 'dropdown', 'radio',
'userclass', 'user', 'boolean', 'checkbox', 'hidden', 'lanlist', 'language', 'country'
);
/**
* @var user_class
*/
@ -982,13 +989,13 @@ class e_form
if($localonly == true)
{
$text = "<input class='tbox' style='width:80%' id='{$idinput}' type='hidden' name='image' value='{$curVal}' />";
$text .= "<img src='".$img."' id='{$previnput}' class='img-rounded e-expandit e-tip avatar' style='cursor:pointer; width:".$pref['im_width']."px; height:".$pref['im_height']."px' title='".LAN_EFORM_001."' alt='Click on the avatar to change it' />";
$text .= "<img src='".$img."' id='{$previnput}' class='img-rounded rounded e-expandit e-tip avatar' style='cursor:pointer; width:".$pref['im_width']."px; height:".$pref['im_height']."px' title='".LAN_EFORM_001."' alt='Click on the avatar to change it' />";
}
else
{
$text = "<input class='tbox' style='width:80%' id='{$idinput}' type='text' name='image' size='40' value='$curVal' maxlength='100' title=\"".LAN_SIGNUP_111."\" />";
$text .= "<img src='".$img."' id='{$previnput}' style='display:none' />";
$text .= "<input class='img-rounded btn btn-default button e-expandit' type ='button' style='cursor:pointer' size='30' value=\"".LAN_EFORM_002."\" />";
$text .= "<input class='img-rounded rounded btn btn-default button e-expandit' type ='button' style='cursor:pointer' size='30' value=\"".LAN_EFORM_002."\" />";
}
$avFiles = e107::getFile()->get_files(e_AVATAR_DEFAULT,".jpg|.png|.gif|.jpeg|.JPG|.GIF|.PNG");
@ -1028,9 +1035,9 @@ class e_form
if(ADMIN)
{
$EAVATAR = "<b>".e_AVATAR_DEFAULT."</b>";
$EAVATAR = e_AVATAR_DEFAULT;
$text .= "<div class='alert alert-danger'>";
$text .= e107::getParser()->lanVars(LAN_EFORM_006, array('x'=>$EAVATAR));
$text .= e107::getParser()->lanVars(e107::getParser()->toHTML(LAN_EFORM_006, true), array('x'=>$EAVATAR));
$text .= "</div>";
}
@ -1105,7 +1112,7 @@ class e_form
}
e107::getDebug()->log($sc_parameters);
// e107::getDebug()->log($sc_parameters);
$default_thumb = $default;
$class = '';
@ -1181,7 +1188,7 @@ e107::getDebug()->log($sc_parameters);
$thpath = empty($default) || !empty($video) ? $default_url : $tp->thumbUrl($default_thumb, $att, true);
//isset($sc_parameters['nothumb']) || vartrue($hide) ?
$label = "<img id='{$name_id}_prev' src='".$thpath."' alt='{$default_url}' class='well well-small image-selector img-responsive' style='display:block;' />";
$label = "<img id='{$name_id}_prev' src='".$thpath."' alt='{$default_url}' class='well well-small image-selector img-responsive img-fluid' style='display:block;' />";
if($cat != 'news' && $cat !='page' && $cat !='' && strpos($cat,'_image')===false)
{
@ -2763,29 +2770,29 @@ e107::getDebug()->log($sc_parameters);
switch ($image)
{
case 'edit':
$icon = "e-edit-32";
$icon = (e_ADMIN_AREA === true) ? ADMIN_EDIT_ICON : $tp->toIcon("e-edit-32");
$options['class'] = $options['class'] == 'action' ? 'btn btn-default action edit' : $options['class'];
break;
case 'delete':
$icon = (e_ADMIN_AREA === true) ? "e-delete-32" : 'fa-trash.glyph';
$icon = (e_ADMIN_AREA === true) ? ADMIN_DELETE_ICON : $tp->toIcon('fa-trash.glyph');
$options['class'] = $options['class'] == 'action' ? 'btn btn-default action delete' : $options['class'];
$options['other'] = 'data-confirm="'.LAN_JSCONFIRM.'"';
break;
case 'execute':
$icon = "e-execute-32";
$icon = (e_ADMIN_AREA === true) ? ADMIN_EXECUTE_ICON : $tp->toIcon('fa-power-off.glyph');
$options['class'] = $options['class'] == 'action' ? 'btn btn-default action execute' : $options['class'];
break;
case 'view':
$icon = "e-view-32";
$icon = $tp->toIcon("e-view-32");
$options['class'] = $options['class'] == 'action' ? 'btn btn-default action view' : $options['class'];
break;
}
$options['title'] = $title;//shorthand
return "<button type='submit' name='{$name}' data-placement='left' value='{$value}'".$this->get_attributes($options, $name, $value)." >".$tp->toIcon($icon)."</button>";
return "<button type='submit' name='{$name}' data-placement='left' value='{$value}'".$this->get_attributes($options, $name, $value)." >".$icon."</button>";
}
@ -3011,6 +3018,15 @@ e107::getDebug()->log($sc_parameters);
return false;
}
protected function getFieldTypes()
{
asort($this->fields);
return $this->fields;
}
/**
* Helper function to get default button class by action.
*
@ -4850,9 +4866,11 @@ e107::getDebug()->log($sc_parameters);
$ajaxParms['data-src'] = varset($parms['ajax']['src']);
$ajaxParms['data-target'] = varset($parms['ajax']['target']);
$ajaxParms['data-method'] = varset($parms['ajax']['method'], 'html');
$ajaxParms['data-loading'] = varset($parms['ajax']['loading'], $tp->toGlyph('fa-spinner', array('spin'=>1)));
$ajaxParms['data-loading'] = varset($parms['ajax']['loading'], 'fa-spinner'); //$tp->toGlyph('fa-spinner', array('spin'=>1))
unset($attributes['writeParms']['ajax']);
// e107::getDebug()->log($parms['ajax']);
}
if(!empty($attributes['multilan']))
@ -5574,7 +5592,7 @@ e107::getDebug()->log($sc_parameters);
".$this->token()."
";
foreach ($form['fieldsets'] as $elid => $data) //XXX rename 'fieldsets' to 'forms' ?
foreach ($form['fieldsets'] as $elid => $data)
{
$elid = $form['id'].'-'.$elid;
@ -5593,6 +5611,12 @@ e107::getDebug()->log($sc_parameters);
{
$active = (strval($tabId) === $curTab) ? 'active' : '';
$text .= '<div class="tab-pane '.$active.'" id="tab'.$tabId.'">';
// e107::getDebug()->log('elid: '.$elid. " tabid: ".$tabId);
// e107::getDebug()->log($data);
// e107::getDebug()->log($model);
$text .= $this->renderCreateFieldset($elid, $data, $model, $tabId);
$text .= "</div>";
}
@ -5632,12 +5656,13 @@ e107::getDebug()->log($sc_parameters);
* @param string $id field id
* @param array $fdata fieldset data
* @param object $model
* @return string
* @return string | false
*/
function renderCreateFieldset($id, $fdata, $model, $tab=0)
{
$text = vartrue($fdata['fieldset_pre'])."
$start = vartrue($fdata['fieldset_pre'])."
<fieldset id='{$id}-".$tab."'>
<legend>".vartrue($fdata['legend'])."</legend>
".vartrue($fdata['table_pre'])."
@ -5649,6 +5674,8 @@ e107::getDebug()->log($sc_parameters);
<tbody>
";
$text = '';
// required fields - model definition
$model_required = $model->getValidationRules();
$required_help = false;
@ -5770,7 +5797,7 @@ e107::getDebug()->log($sc_parameters);
$text .= "
<tr><td colspan='2'>";
$text .= "<div style='padding-bottom:8px'>".$leftCell."</div>";
$text .= (isset($writeParms['nolabel']) && $writeParms['nolabel'] == 2) ? '' : "<div style='padding-bottom:8px'>".$leftCell."</div>" ;
$text .= $rightCell."
</td>
@ -5814,17 +5841,27 @@ e107::getDebug()->log($sc_parameters);
$required_help = '<div class="form-note">'.$this->getRequiredString().' - required fields</div>'; //TODO - lans
}
$text .= "
if(!empty($text) || !empty($hidden_fields))
{
$text = $start.$text;
$text .= "
</tbody>
</table>";
$text .= implode("\n", $hidden_fields);
$text .= implode("\n", $hidden_fields);
$text .= "</fieldset>";
$text .= vartrue($fdata['fieldset_post']);
return $text;
}
$text .= "</fieldset>";
$text .= vartrue($fdata['fieldset_post']);
return $text;
return false;
/*
$text .= "

View File

@ -787,7 +787,7 @@ class e107Email extends PHPMailer
{
$size = isset($mediaParms[$nk]) ? "?w=".$mediaParms[$nk]['w'] : '';
//echo $nk.": ".$val['path'].$size."<br />";
$eml['shortcodes'][$id] = "<div class='media media-image'><img class='img-responsive ".strtolower($id)."' src='".$val['path'].$size."' alt='' /></div>";
$eml['shortcodes'][$id] = "<div class='media media-image'><img class='img-responsive img-fluid ".strtolower($id)."' src='".$val['path'].$size."' alt='' /></div>";
}
}

View File

@ -1267,7 +1267,7 @@ class e_media
if($data['type'] == 'image')
{
$text .= '<img class="img-responsive" alt="" src="'.$data['thumbUrl'].'" style="width:100%;display:inline-block" />';
$text .= '<img class="img-responsive img-fluid" alt="" src="'.$data['thumbUrl'].'" style="width:100%;display:inline-block" />';
}
elseif($data['type'] == 'glyph')
{

View File

@ -451,6 +451,8 @@ class e_menu
public function renderMenu($mpath, $mname='', $parm = '', $return = false)
{
// global $sql; // required at the moment.
global $sc_style, $e107_debug;
@ -540,7 +542,8 @@ class e_menu
$id = e107::getForm()->name2id($mpath . $mname);
$ns->setUniqueId($id);
global $pref; // possibly used by plugin menu.
$pref = e107::getPref(); // possibly used by plugin menu.
$e107_debug ? include(e_PLUGIN.$mpath.$mname.'.php') : @include(e_PLUGIN.$mpath.$mname.'.php');

View File

@ -1489,10 +1489,11 @@ class e_menuManager {
}
else if(strstr($str, "MENU"))
{
$matches = array();
if(preg_match_all("/\{MENU=([\d]{1,3})(:[\w\d]*)?\}/", $str, $matches))
{
$menuText = "";
foreach($matches[1] as $menu)
{
@ -1501,7 +1502,7 @@ class e_menuManager {
{
$menuText .= $sc_style['MENU']['pre'];
}
// ---------------
$menuText .= "\n\n<!-- START AREA ".$menu." -->";
@ -1569,10 +1570,13 @@ class e_menuManager {
}
$ns->tablerender('', varset($menuText));
echo $menuText;
// $ns->tablerender('', varset($menuText)); // Could fail with a badly built theme.
}
else
{
echo $tp->parseTemplate($str,true);
}

View File

@ -1097,12 +1097,14 @@ class e_model extends e_object
$data = &$this->{$data_src};
for ($i = 0, $l = count($keyArr); $i < $l; $i++)
{
$k = $keyArr[$i];
if (!isset($data[$k]))
if (!isset($data[$k]) || empty($data[$k])) // PHP7.1 fix. Reset to empty array() if $data[$k] is an empty string. Reason for empty string still unknown.
{
$data[$k] = array();
}
$data = &$data[$k];
}
@ -2657,6 +2659,10 @@ class e_front_model extends e_model
return $tp->toDB($value);
break;
case 'json':
return e107::serialize($value,'json');
break;
case 'code':
return $tp->toDB($value, false, false, 'pReFs');
break;

View File

@ -2,14 +2,10 @@
/*
* 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)
*
*
*
* $URL$
* $Id$
*/
if (!defined('e107_INIT')) { exit; }
@ -683,8 +679,8 @@ class e_navigation
$this->admin_cat['title'][1] = LAN_SETTINGS;
$this->admin_cat['id'][1] = 'setMenu';
$this->admin_cat['img'][1] = $tp->toGlyph('e-settings-16');
$this->admin_cat['lrg_img'][1] = $tp->toGlyph('e-settings-32');
$this->admin_cat['img'][1] = 'fa-cogs.glyph';
$this->admin_cat['lrg_img'][1] = 'e-settings-32.glyph';
$this->admin_cat['sort'][1] = true;
/*
@ -701,26 +697,26 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
$this->admin_cat['title'][2] = ADLAN_CL_2;
$this->admin_cat['id'][2] = 'userMenu';
$this->admin_cat['img'][2] = $tp->toGlyph('e-cat_users-16');
$this->admin_cat['img'][2] = 'fa-users.glyph'; // $tp->toGlyph('e-cat_users-16');
$this->admin_cat['lrg_img'][2] = $tp->toGlyph('e-cat_users-32');
$this->admin_cat['sort'][2] = true;
$this->admin_cat['title'][3] = ADLAN_CL_3;
$this->admin_cat['id'][3] = 'contMenu';
$this->admin_cat['img'][3] = $tp->toGlyph('e-cat_content-16');
$this->admin_cat['img'][3] = 'file-text-o.glyph'; // $tp->toGlyph('e-cat_content-16');
$this->admin_cat['lrg_img'][3] = $tp->toGlyph('e-cat_content-32');
$this->admin_cat['sort'][3] = true;
$this->admin_cat['title'][4] = ADLAN_CL_6;
$this->admin_cat['id'][4] = 'toolMenu';
$this->admin_cat['img'][4] = $tp->toGlyph('e-cat_tools-16');
$this->admin_cat['img'][4] = 'wrench.glyph'; // $tp->toGlyph('e-cat_tools-16');
$this->admin_cat['lrg_img'][4] = $tp->toGlyph('e-cat_tools-32');
$this->admin_cat['sort'][4] = true;
// Manage
$this->admin_cat['title'][5] = LAN_MANAGE;
$this->admin_cat['id'][5] = 'managMenu';
$this->admin_cat['img'][5] = $tp->toGlyph('e-manage-16');
$this->admin_cat['img'][5] = 'fa-desktop.glyph' ; // $tp->toGlyph('e-manage-16');
$this->admin_cat['lrg_img'][5] = $tp->toGlyph('e-manage-32');
$this->admin_cat['sort'][5] = TRUE;
@ -728,7 +724,7 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
{
$this->admin_cat['title'][6] = ADLAN_CL_7;
$this->admin_cat['id'][6] = 'plugMenu';
$this->admin_cat['img'][6] = $tp->toGlyph('e-cat_plugins-16');
$this->admin_cat['img'][6] = 'fa-puzzle-piece.glyph'; // $tp->toGlyph('e-cat_plugins-16');
$this->admin_cat['lrg_img'][6] = $tp->toGlyph('e-cat_plugins-32');
$this->admin_cat['sort'][6] = false;
}
@ -737,7 +733,7 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
// Misc.
$this->admin_cat['title'][6] = ADLAN_CL_8;
$this->admin_cat['id'][6] = 'miscMenu';
$this->admin_cat['img'][6] = ''; // E_16_CAT_MISC;
$this->admin_cat['img'][6] = 'fa-puzzle-piece.glyph'; ; // E_16_CAT_MISC;
$this->admin_cat['lrg_img'][6] = ''; // E_32_CAT_MISC;
$this->admin_cat['sort'][6] = TRUE;
}
@ -745,7 +741,7 @@ i.e-cat_users-32{ background-position: -555px 0; width: 32px; height: 32px; }
//About menu - No 20 - leave space for user-categories.
$this->admin_cat['title'][20] = LAN_ABOUT;
$this->admin_cat['id'][20] = 'aboutMenu';
$this->admin_cat['img'][20] = ''; // E_16_CAT_ABOUT;//E_16_NAV_DOCS
$this->admin_cat['img'][20] = 'fa-info-circle.glyph'; // E_16_CAT_ABOUT;//E_16_NAV_DOCS
$this->admin_cat['lrg_img'][20] = ''; // E_32_CAT_ABOUT;
$this->admin_cat['sort'][20] = false;

View File

@ -1422,7 +1422,7 @@ class themeHandler
$text .= "<div class='col-md-6'>
<img class='img-responsive' src='".$picFull."' alt=\"".$theme['name']."\" />
<img class='img-responsive img-fluid' src='".$picFull."' alt=\"".$theme['name']."\" />
</div>";
}
@ -2347,8 +2347,8 @@ class themeHandler
if($core->save())
{
$mes->addDebug(MENLAN_31.": ".$deflayout);
$mes->addDebug(MENLAN_56.": ".print_a($customPages,true));
$mes->addDebug("Default Layout: ".$deflayout);
$mes->addDebug("Custom Pages: ".print_a($customPages,true));
$med = e107::getMedia();
$med->import('_common_image', e_THEME.$name, "^.*?logo.*?(\.png|\.jpeg|\.jpg|\.JPG|\.GIF|\.PNG)$");

View File

@ -406,7 +406,7 @@ define("LAN_TEMPLATES","Templates");
define("LAN_CATEGORIES", "Categories");
define("LAN_DEMO_FORBIDDEN", "Changes on this page are not possible in demo mode.");
define("LAN_COPYRIGHT", "Copyright");
define("LAN_MANAGER", "Manage Permissions");
define("LAN_MANAGEPERMS", "Manage Permissions");
define("LAN_PING", "Ping");
define("LAN_START", "Start");
define("LAN_END", "End");

View File

@ -61,6 +61,8 @@ define("LANG_LAN_141", "Select Script...");
define("LANG_LAN_142", "Auto-Detect");
define("LANG_LAN_143", "Specific LAN file:");
define("LANG_LAN_144", "Must be re-enabled");
define("LANG_LAN_148", "Normal Mode");
define("LANG_LAN_149", "Value");
define("LANG_LAN_150", "[b]Search ENTIRE core before commenting out ANY LAN from ANY language file.[/b]");
?>

View File

@ -1,10 +1,14 @@
<?php
/*
* Copyright (C) 2008-2013 e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* e107 website system
*
* Admin Language File
* 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)
*
*/
* Language file - Site Links Admin
*
*/
// define("LCLAN_1", "Options Saved");
// define("LCLAN_2", "Saving link to database.");
@ -14,7 +18,7 @@
// define("LCLAN_8", "Site Navigation Links");
// define("LCLAN_12", "Link Rendertype");
// define("LCLAN_13", "Render");
define("LCLAN_15", "Link Name");
//define("LCLAN_15", "Link Name");//LAN_NAME
// define("LCLAN_16", "Link URL");
// define("LCLAN_17", "Link Description");
// define("LCLAN_18", "Link Button / Icon");
@ -57,7 +61,7 @@ define("LCLAN_81", "Sub-menus will display only after clicking their parent. (Li
// define("LCLAN_102", "New 600x400");
// define("LCLAN_103", "New 800x600");
define("LCLAN_104", "Sublink of");
//define("LCLAN_104", "Sublink of");//LAN_PARENT
define("LCLAN_105", "Function");
define("LCLAN_106", "Owned by");
define("LCLAN_107", "Enable to override URL with a dynamically created Search-Engine-Friendly URL");
@ -78,4 +82,4 @@ define("LINKLAN_9", "Download Categories");
// define("LINKLAN_10", "Create Sublink");
// define('LINKLAN_11', 'Nothing changed - not updated');
?>
?>

View File

@ -280,7 +280,13 @@ define("LAN_HOLD", "Hold");
define("LAN_MAILOUT_260", "User-Type");
define("LAN_MAILOUT_261", "SMTP Port");
define("LAN_MAILOUT_262", "Template Preview");
define("LAN_MAILOUT_263", "Total Recipients");
define("LAN_MAILOUT_264", "Embed Media");
define("LAN_MAILOUT_265", "Pending");
define("LAN_MAILOUT_266", "Max Active");
define("LAN_MAILOUT_267", "Generate Public/Private keys");
define("LAN_MAILOUT_268", "Developer Mode Only");
//define("LAN_SUBMIT", "Do it!"); LAN_RUN
?>
?>

View File

@ -72,5 +72,5 @@ define("MENLAN_54", "Theme Layout");
define("MENLAN_55", "Menu Layout");
define("MENLAN_56", "Custom Pages");
define("MENLAN_57", "Drag-and-Drop Menus");
define("MENLAN_58", "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.");
?>

View File

@ -232,4 +232,7 @@ define("LAN_NEWS_105", "Email notification triggered!");
define("LAN_NEWS_106", "News item visibility must include 'everyone' for email notifications to work.");
define("LAN_NEWS_107", "Checking for Ping Status");
?>
//v2.1.4
define("LAN_NEWS_108", "The SEF URL is unlike the title of your news item.");
?>

View File

@ -14,7 +14,7 @@ define("LAN_EFORM_002", "Choose Avatar");
define("LAN_EFORM_003", "OR");
define("LAN_EFORM_004", "Choose this avatar");
define("LAN_EFORM_005", "No Avatars Available");
define("LAN_EFORM_006", "Admin-Only Notice: The folder [x] is empty. Upload some default avatars images to this folder for users to choose avatars from.");
define("LAN_EFORM_006", "Admin-Only Notice:[br]The folder [b][x][/b] is empty.[br]Upload some default avatars images to this folder for users to choose avatars from.");
define("LAN_EFORM_007", "Media Manager");
define("LAN_EFORM_008", "Select columns to display");
define("LAN_EFORM_009", "Display Columns");
@ -25,3 +25,4 @@ define("LAN_EFORM_013", "go to list");
define("LAN_EFORM_014", "create another");
define("LAN_EFORM_015", "edit current");
define("LAN_EFORM_016", "After submit:");
?>

View File

@ -1,27 +1,26 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/lan_print.php,v $
| $Revision$
| $Date$
| $Author$
+----------------------------------------------------------------------------+
* 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 - Printer Friendly Page
*
*/
if (!defined("PAGE_NAME")) { define("PAGE_NAME", "Printer Friendly"); }
define("LAN_PRINT_86", "Category:");
define("LAN_PRINT_87", "by ");
define("LAN_PRINT_94", "Posted by");
define("LAN_PRINT_135", "News Item: ");
//define("LAN_PRINT_86", "Category:");//LAN_CATEGORY // NOT USED
//efine("LAN_PRINT_87", "by ");//NOT USED
//define("LAN_PRINT_94", "Posted by");//LAN_POSTED_BY//NOT USED
//define("LAN_PRINT_135", "News Item: ");//NOT USED
define("LAN_PRINT_303", "This news item is from ");
//define("LAN_PRINT_304", "Title: ");//LAN_TITLE
define("LAN_PRINT_305", "Subheading: ");
define("LAN_PRINT_306", "This is from: ");
define("LAN_PRINT_307", "Print this page");
//define("LAN_PRINT_305", "Subheading: ");//NOT USED
//define("LAN_PRINT_306", "This is from: ");//NOT USED
define("LAN_PRINT_1", "printer friendly");
define("LAN_PRINT_307", "Print this page");//TODO LANS GENERIC CANDIDATE
define("LAN_PRINT_1", "printer friendly");//TODO LANS GENERIC CANDIDATE
?>
?>

View File

@ -1,15 +1,16 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/lan_sitelinks.php,v $
| $Revision$
| $Date$
| $Author$
+----------------------------------------------------------------------------+
* 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 - for site links
*
*/
define("LAN_SITELINKS_183", "Main Menu");
define("LAN_SITELINKS_502", "Admin Area");
?>
define("LAN_SITELINKS_183", "Main Menu");
//define("LAN_SITELINKS_502", "Admin Area");//NOT USED
?>

View File

@ -83,7 +83,7 @@ class banner_shortcodes extends e_shortcode
default:
$class = empty($parm['class']) ? "e-banner img-responsive" : $parm['class'];
$class = empty($parm['class']) ? "e-banner img-responsive img-fluid" : $parm['class'];
$ban_ret = $tp->toImage($row['banner_image'], array('class'=> $class , 'alt'=>basename($row['banner_image']), 'legacy'=>'{e_IMAGE}banners'));
break;

View File

@ -327,7 +327,7 @@ class download_shortcodes extends e_shortcode
{
$opts = array(
'legacy' => "{e_FILE}downloadthumbs/",
'class' => 'download-image img-responsive',
'class' => 'download-image img-responsive img-fluid',
'alt' => $this->var['download_name']
);
@ -583,7 +583,7 @@ class download_shortcodes extends e_shortcode
{
$opts = array(
'legacy' => "{e_FILE}downloadthumbs/",
'class' => 'download-image dl_image img-responsive'
'class' => 'download-image dl_image img-responsive img-fluid'
);
$image = $tp->toImage($this->var['download_thumb'], $opts);
@ -610,7 +610,7 @@ class download_shortcodes extends e_shortcode
$opts = array(
'legacy' => "{e_FILE}downloadimages/",
'class' => 'download-image dl_image download-view-image img-responsive '.vartrue($parm['class']),
'class' => 'download-image dl_image download-view-image img-responsive img-fluid '.vartrue($parm['class']),
'alt' => basename($this->var['download_image'])
);

View File

@ -321,16 +321,16 @@ else
if (file_exists(e_FILE."download/{$image}"))
{
$disp = "<div style='text-align:center'><img class='img-responsive' src='".e_FILE."download/{$image}' alt='' /></div>";
$disp = "<div style='text-align:center'><img class='img-responsive img-fluid' src='".e_FILE."download/{$image}' alt='' /></div>";
}
else if(file_exists(e_FILE."downloadimages/{$image}"))
{
$disp = "<div style='text-align:center'><img class='img-responsive' src='".e_FILE."downloadimages/{$image}' alt='' /></div>";
$disp = "<div style='text-align:center'><img class='img-responsive img-fluid' src='".e_FILE."downloadimages/{$image}' alt='' /></div>";
}
else
{
$image = $tp->replaceConstants($image);
$disp = "<div style='text-align:center'><img class='img-responsive' src='".$image."' alt='' /></div>";
$disp = "<div style='text-align:center'><img class='img-responsive img-fluid' src='".$image."' alt='' /></div>";
}
$disp .= "<br /><div style='text-align:center'><a href='javascript:history.back(1)'>".LAN_BACK."</a></div>";

View File

@ -156,7 +156,7 @@ class plugin_featurebox_item extends e_model
{
return $src;
}
$tag = '<img id="featurebox-image-'.$this->getId().'" src="'.$src.'" alt="'.$tp->toAttribute($this->get('fb_title')).'" class="featurebox img-responsive" />';
$tag = '<img id="featurebox-image-'.$this->getId().'" src="'.$src.'" alt="'.$tp->toAttribute($this->get('fb_title')).'" class="featurebox img-responsive img-fluid" />';
if(isset($parm['nourl']) || !$this->get('fb_imageurl'))
{
return $tag;

View File

@ -309,28 +309,33 @@ str_replace("[x]", ($total_topics+$total_replies), LAN_FORUM_0031)." ($total_top
if(empty($FORUM_TEMPLATE))
{
// include(e_PLUGIN.'forum/templates/forum_template.php');
// Override with theme template
if (file_exists(THEME.'forum_template.php')) //v1.x fallback.
if(THEME_LEGACY !== true) //v2.x
{
$FORUM_TEMPLATE = e107::getTemplate('forum','forum'); // required to use v2.x wrapper shortcode wrappers.
}
elseif (file_exists(THEME.'forum_template.php')) //v1.x fallback.
{
include(e_PLUGIN.'forum/templates/forum_template.php');
include_once(THEME.'forum_template.php');
}
elseif(file_exists(THEME.'templates/forum/forum_template.php'))
{
$FORUM_TEMPLATE = e107::getTemplate('forum','forum');
// $FORUM_TEMPLATE = e107::getTemplate('forum','forum');
require_once(THEME.'templates/forum/forum_template.php');
}
else //v2.x
else
{
$FORUM_TEMPLATE = e107::getTemplate('forum','forum'); // required to use v2.x wrapper shortcode wrappers.
require_once(e_PLUGIN.'forum/templates/forum_template.php');
}
}
if(is_array($FORUM_TEMPLATE)) // new v2.x format.
if(is_array($FORUM_TEMPLATE) && THEME_LEGACY !== true) // new v2.x format.
{
if(varset($FORUM_TEMPLATE['main-start'])) // correction of previous v2.x setup.

View File

@ -18,10 +18,7 @@ if (!defined('e107_INIT')) { exit; }
e107::js('forum', 'js/forum.js', 'jquery', 5);
e107::css('forum','forum.css');
e107::lan('forum','English_front');
e107::lan('forum', "front", true);
// include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum.php');
if(!defined('IMAGE_new') && !defined('IMAGE_e'))

View File

@ -1228,7 +1228,7 @@ class forum_post_handler
if($postResult === -1 || $newPostId === -1) //Duplicate post
{
require_once(HEADERF);
$message = LAN_FORUM_3006."<br ><a class='btn btn-default' href='".$_SERVER['HTTP_REFERER']."'>Return</a>";
$message = LAN_FORUM_3006."<br ><a class='btn btn-default' href='".$_SERVER['HTTP_REFERER']."'>".LAN_FORUM_8028."</a>";
$text = e107::getMessage()->addError($message)->render();
e107::getRender()->tablerender(LAN_PLUGIN_FORUM_NAME, $text); // change to forum-title pref.
require_once(FOOTERF);
@ -1282,7 +1282,7 @@ class forum_post_handler
$txt = e107::getParser()->parseTemplate($txt,true, $SHORTCODES);
e107::getRender()->tablerender('Forums', e107::getMessage()->render().$txt);
e107::getRender()->tablerender(e_PAGETITLE, e107::getMessage()->render().$txt);
require_once(FOOTERF);
exit;
}

View File

@ -131,7 +131,7 @@ $forumInfo = $forum->forumGet($forumId);
if (empty($FORUM_VIEW_START))
{
if(deftrue('BOOTSTRAP'))
if(THEME_LEGACY !== true)
{
$FORUM_VIEWFORUM_TEMPLATE = e107::getTemplate('forum','forum_viewforum');
}
@ -141,11 +141,11 @@ if (empty($FORUM_VIEW_START))
{
require_once(THEME.'templates/forum/forum_viewforum_template.php');
}
elseif (file_exists(THEME.'forum_viewforum_template.php'))
elseif (file_exists(THEME.'forum_viewforum_template.php')) //v1.x
{
require_once(THEME.'forum_viewforum_template.php');
}
elseif (file_exists(THEME.'forum_template.php'))
elseif (file_exists(THEME.'forum_template.php')) //v1.x
{
require_once(THEME.'forum_template.php');
}
@ -160,7 +160,7 @@ if (empty($FORUM_VIEW_START))
}
if(!empty($FORUM_VIEWFORUM_TEMPLATE) && is_array($FORUM_VIEWFORUM_TEMPLATE) && deftrue('BOOTSTRAP',false)) // New v2.x bootstrap Template.
if(!empty($FORUM_VIEWFORUM_TEMPLATE) && is_array($FORUM_VIEWFORUM_TEMPLATE) && THEME_LEGACY !== true) // New v2.x bootstrap Template.
{
$FORUM_VIEW_CAPTION = $FORUM_VIEWFORUM_TEMPLATE['caption'];

View File

@ -205,7 +205,7 @@ if(file_exists(THEME.'forum_design.php')) // legacy file
// New in v2.x
if(deftrue('BOOTSTRAP',false))
if(THEME_LEGACY !== true)
{
$FORUM_VIEWTOPIC_TEMPLATE = e107::getTemplate('forum','forum_viewtopic');
@ -220,7 +220,7 @@ if(deftrue('BOOTSTRAP',false))
}
else
{
if (!vartrue($FORUMSTART))
if (empty($FORUMSTART))
{
if(file_exists(THEME.'forum_viewtopic_template.php'))
{
@ -606,7 +606,7 @@ if ($thread->threadInfo['thread_lastpost'] > USERLV && !in_array($thread->thread
else
{
$ret = array('lastpost'=>$thread->threadInfo['thread_lastpost'], 'lastvisit'=>USERLV, 'thread'=>$thread->threadId, 'viewed'=>$threadsViewed);
$mes->addDebug(print_a($ret,true));
e107::getDebug()->log($ret);
unset($ret);
}

View File

@ -343,6 +343,8 @@ define("LAN_FORUM_8024", "Failed to open thread");
define("LAN_FORUM_8025", "Failed to stick thread");
define("LAN_FORUM_8026", "Failed to unstick thread");
define("LAN_FORUM_8027", "No action selected");
define("LAN_FORUM_8028", "Return");
define("LAN_FORUM_8029", "New topic created!");
/* THIS WILL BE DELETED ONCE THE REWRITE IS DONE
==================================================

View File

@ -45,7 +45,7 @@ class forum_newforumposts_menu // plugin folder + menu name (without the .php)
$qry = "
SELECT
p.post_user, p.post_id, p.post_datestamp, p.post_user_anon, p.post_entry,
t.thread_id, t.thread_datestamp, t.thread_name, u.user_name, f.forum_sef
t.thread_id, t.thread_datestamp, t.thread_name, u.user_id, u.user_name, u.user_image, u.user_currentvisit, f.forum_sef
FROM `#forum_post` as p
LEFT JOIN `#forum_thread` AS t ON t.thread_id = p.post_thread
@ -67,14 +67,25 @@ class forum_newforumposts_menu // plugin folder + menu name (without the .php)
$pref = e107::getPref();
$qry = $this->getQuery();
$ns = e107::getRender();
$list = null;
$text = null;
if($results = $sql->gen($qry))
{
$text = "<ul class='newforumposts-menu'>";
if($tp->thumbWidth() > 250) // Fix for unset image size.
{
$tp->setThumbSize(40,40,true);
}
$list = "<ul class='media-list newforumposts-menu'>";
while($row = $sql->fetch())
{
$datestamp = $tp->toDate($row['post_datestamp'], 'relative');
$id = $row['thread_id'];
$topic = ($row['thread_datestamp'] == $row['post_datestamp'] ? '' : 'Re:');
@ -116,22 +127,32 @@ class forum_newforumposts_menu // plugin folder + menu name (without the .php)
));
$text .= "<li>";
$list .= "<li class='media'>";
$list .= "<div class='media-left'>";
$list .= "<a href='".$url."'>".$tp->toAvatar($row, array('shape'=>'circle'))."</a>";
$list .= "</div>";
$list .= "<div class='media-body'>";
if (!empty($this->menuPref['title']))
{
$text .= "<a href='{$url}'>{$topic}</a><br />{$post}<br /><small class='text-muted muted'>".LAN_FORUM_MENU_001." {$poster} {$datestamp}</small>";
$list .= "<h4 class='media-header'><a href='{$url}'>{$topic}</a></h4>{$post}<br /><small class='text-muted muted'>".LAN_FORUM_MENU_001." {$poster} {$datestamp}</small>";
}
else
{
$text .= "<a href='{$url}'>".LAN_FORUM_MENU_001."</a> {$poster} <small class='text-muted muted'>{$datestamp}</small><br />{$post}<br />";
$list .= "<a href='{$url}'>".LAN_FORUM_MENU_001."</a> {$poster} <small class='text-muted muted'>{$datestamp}</small><br />{$post}<br />";
}
$text .= "</li>";
$list .= "</div></li>";
}
$text .= "</ul>";
$list .= "</ul>";
$text = $list;
}
else
{
@ -150,7 +171,7 @@ class forum_newforumposts_menu // plugin folder + menu name (without the .php)
// e107::debug('menuPref', $this->menuPref);
e107::getRender()->tablerender($caption, $text, 'nfp_menu');
$ns->tablerender($caption, $text, 'nfp_menu');
}

View File

@ -434,6 +434,29 @@ class plugin_forum_post_shortcodes extends e_shortcode
return $_tmp['breadcrumb'];
}
function sc_forum_post_caption()
{
// global $forumInfo;
$tp = e107::getParser();
// var_dump ($this);
//$this->forumObj->threadGet($this->id, false)
if ($this->var['action'] == "rp")
{
$pre = LAN_FORUM_1003;
$name = $tp->toHTML($this->var['thread_name'], false, 'no_hook, emotes_off');
$url = e107::url('forum', 'topic', $this->var);
$post = LAN_FORUM_2006;
}
if ($this->var['action'] == "nt")
{
$pre = LAN_FORUM_1001;
$name = $tp->toHTML($this->var['forum_name'], false, 'no_hook, emotes_off');
$url = e107::url('forum', 'forum', $this->var);
$post = LAN_FORUM_2005;
}
return $pre.($url?": <a {$title} href='".$url."'>{$name}</a> - ":$name).$post;
}
function sc_noemotes()
{
if(vartrue($eaction) == true) { return null; }

View File

@ -802,7 +802,13 @@
}
function sc_threadname()
/**
*
* @outdated use {TOPIC_TITLE} or {TOPIC_URL}
* @param null $parm
* @return string
*/
function sc_threadname($parm=null)
{
global $menu_pref, $forum;
$tp = e107::getParser();
@ -845,9 +851,43 @@
$this->addVars($temp);
$url = e107::url('forum', 'topic', $this->var);
if($parm === 'url')
{
return $url;
}
if($parm === 'title')
{
return $thread_name;
}
return "<a {$title} href='" . $url . "'>{$thread_name}</a>";
}
//v2.1.4
function sc_topic_title($parm=null)
{
return $this->sc_threadname('title');
}
//v2.1.4
function sc_topic_url($parm=null)
{
return $this->sc_threadname('url');
}
//v2.1.4
function sc_topic_date($parm=null)
{
return $this->sc_threaddate();
}
//@todo more topic_xxxx shortcode aliases.
function sc_pages()
{

View File

@ -65,7 +65,7 @@ define('IMAGE_untrack', '<img src="'.img_path('untrack.png').'" alt="'.LAN_FORU
// User info
define('IMAGE_website', '<img src="'.img_path('website.png').'" alt="'.LAN_FORUM_2034.'" title="'.LAN_FORUM_2034.'" />');
define('IMAGE_email', '<img src="'.img_path('email.png').'" alt="'.LAN_FORUM_2044.'" title="'.LAN_FORUM_2044.'" />');
define('IMAGE_email', '<img src="'.img_path('email.png').'" alt="'.LAN_FORUM_2044.'" title="'.LAN_FORUM_2044.'" class="icon S16 action" />');
define('IMAGE_profile', '<img src="'.img_path('profile.png').'" alt="'.LAN_FORUM_4007.'" title="'.LAN_FORUM_4007.'" />');
// action

View File

@ -12,7 +12,7 @@ if (!defined('e107_INIT')) { exit; }
// New in v2.x - requires a bootstrap theme be loaded.
//$FORUM_POST_TEMPLATE['caption'] = "Custom caption";
//$FORUM_POST_TEMPLATE['caption'] = "{FORUM_POST_CAPTION}";
$FORUM_POST_TEMPLATE['form'] = "
{FORUM_POST_FORM_START}
<div class='row-fluid'>

View File

@ -66,13 +66,13 @@ $FORUMREPLYPOSTED = "
$FORUM_POSTED_TEMPLATE['poll'] = $FORUMPOLLPOSTED;
$FORUM_POSTED_TEMPLATE['thread'] = "<div class='alert alert-success'>
<h4>New topic created.</h4>
<h4>".LAN_FORUM_8029."</h4>
<a class='btn btn-primary' href='{THREADLINK}'>".LAN_FORUM_3048."</a>
<a class='btn btn-primary' href='{FORUMLINK}'>".LAN_FORUM_2022."</a>
</div>";
$FORUM_POSTED_TEMPLATE['reply'] = "<div class='alert alert-success'>
<h4>New reply created.</h4>
<h4>".LAN_FORUM_3049."</h4>
<a class='btn btn-primary' href='{THREADLINK}'>".LAN_FORUM_3048."</a>
<a class='btn btn-primary' href='{FORUMLINK}'>".LAN_FORUM_2022."</a>
</div>";
@ -82,4 +82,4 @@ $FORUM_POSTED_TEMPLATE['reply'] = "<div class='alert alert-success'>
?>
?>

View File

@ -27,7 +27,7 @@ if (!isset($FORUM_MAIN_FORUM))
{
$SC_WRAPPER['LASTPOST:type=date'] = "{---}<br>";
$SC_WRAPPER['LASTPOST:type=url'] = " <a href='{---}'>".IMAGE_post2."</a>";
$FORUM_MAIN_FORUM = "<tr>\n<td style='width:5%; text-align:center' class='forumheader2'>{NEWFLAG}</td>\n<td style='width:55%' class='forumheader2'>{FORUMNAME}<br /><span class='smallblacktext'>{FORUMDESCRIPTION}</span>{FORUMSUBFORUMS}</td>\n<td style='width:10%; text-align:center' class='forumheader3'>{THREADS}</td>\n<td style='width:10%; text-align:center' class='forumheader3'>{REPLIES}</td>\n<td style='width:20%; text-align:center' class='forumheader3'><span class='smallblacktext'>{LASTPOST:type=date}{LASTPOSTUSER}{LASTPOST:type=url}</span></td>\n</tr>";
$FORUM_MAIN_FORUM = "<tr>\n<td style='width:5%; text-align:center' class='forumheader2'>{NEWFLAG}</td>\n<td style='width:55%' class='forumheader2'>{FORUMNAME}<br /><span class='smallblacktext'>{FORUMDESCRIPTION}</span>{FORUMSUBFORUMS}</td>\n<td style='width:10%; text-align:center' class='forumheader3'>{THREADS}</td>\n<td style='width:10%; text-align:center' class='forumheader3'>{REPLIES}</td>\n<td style='width:20%; text-align:center' class='forumheader3'><span class='smallblacktext'>{LASTPOST}</span></td>\n</tr>";
}
if (!isset($FORUM_MAIN_END))
{

View File

@ -70,7 +70,7 @@ if(empty($FORUM_VIEW_START_CONTAINER))
";
}
// XXX These templates should remain unchanged.
if (empty($FORUM_VIEW_FORUM)) {
$SC_WRAPPER['LASTPOST:type=date'] = "{---}<br>";
$SC_WRAPPER['LASTPOST:type=url'] = " <a href='{---}'>".IMAGE_post2."</a>";
@ -91,7 +91,7 @@ if (empty($FORUM_VIEW_FORUM)) {
<td style='vertical-align:middle; text-align:center; width:20%' class='forumheader3'>{POSTER}<br />{THREADDATE}</td>
<td style='vertical-align:middle; text-align:center; width:5%' class='forumheader3'>{REPLIES}</td>
<td style='vertical-align:middle; text-align:center; width:5%' class='forumheader3'>{VIEWS}</td>
<td style='vertical-align:middle; text-align:center; width:20%' class='forumheader3'>{LASTPOST:type=date}{LASTPOSTUSER}{LASTPOST:type=url}</td>
<td style='vertical-align:middle; text-align:center; width:20%' class='forumheader3'>{LASTPOST}</td>
</tr>";
}

View File

@ -103,7 +103,7 @@ class gallery_shortcodes extends e_shortcode
$w = vartrue($parms['w']) ? $parms['w'] : $tp->thumbWidth(); // 190; // 160;
$h = vartrue($parms['h']) ? $parms['h'] : $tp->thumbHeight(); // 130;
$class = ($this->slideMode == true) ? 'gallery-slideshow-thumb img-responsive img-rounded' : varset($parms['class'], 'gallery-thumb img-responsive');
$class = ($this->slideMode == true) ? 'gallery-slideshow-thumb img-responsive img-fluid img-rounded rounded' : varset($parms['class'], 'gallery-thumb img-responsive img-fluid');
$rel = ($this->slideMode == true) ? 'prettyPhoto[pp_gal]' : 'prettyPhoto[pp_gal]';
//$att = array('aw'=>$w, 'ah'=>$h, 'x'=>1, 'crop'=>1);
@ -186,7 +186,7 @@ class gallery_shortcodes extends e_shortcode
}
$text = "<a class='thumbnail' href='" . $url . "'>";
$text .= "<img class='img-responsive' data-src='holder.js/" . $w . "x" . $h . "' src='" . e107::getParser()->thumbUrl($this->var['media_cat_image'], $att) . "' alt='' />";
$text .= "<img class='img-responsive img-fluid' data-src='holder.js/" . $w . "x" . $h . "' src='" . e107::getParser()->thumbUrl($this->var['media_cat_image'], $att) . "' alt='' />";
$text .= "</a>";
return $text;
}
@ -263,7 +263,7 @@ class gallery_shortcodes extends e_shortcode
if(empty($template['item']))
{
$text .= $ns->tablerender('', $this->sc_gallery_thumb('class=gallery_thumb img-responsive img-home-portfolio'), 'gallery_portfolio', true);
$text .= $ns->tablerender('', $this->sc_gallery_thumb('class=gallery_thumb img-responsive img-fluid img-home-portfolio'), 'gallery_portfolio', true);
}
else
{

View File

@ -122,9 +122,18 @@ if(false === $cached)
$menu_text[] = $tp->simpleParse($template['item'], $vars);
}
$cached = $template['start'].implode(varset($template['separator'],''), $menu_text).$template['end'];
$ns->setContent('text', $cached);
if($cached)
{
if(!$parms['showarchive']) $cached .= '<div class="e-menu-link news-menu-archive"><a class="btn btn-default btn-sm" href="'.e_PLUGIN_ABS.'blogcalendar_menu/archive.php">'.BLOGCAL_L2.'</a></div>';
if(!$parms['showarchive'])
{
$footer = '<div class="e-menu-link news-menu-archive"><a class="btn btn-default btn-sm" href="'.e_PLUGIN_ABS.'blogcalendar_menu/archive.php">'.BLOGCAL_L2.'</a></div>';
$ns->setContent('footer', $footer);
$cached .= $footer;
}
$cached = $ns->tablerender(BLOGCAL_L1." ".$req_year, $cached, 'news_months_menu', true);
}
e107::getCache()->set($cString, $cached);

View File

@ -124,7 +124,7 @@ $NEWS_MENU_TEMPLATE['carousel']['end'] = '
$NEWS_MENU_TEMPLATE['carousel']['item'] = '<!-- Start Item -->
<div class="item {ACTIVE}">{SETIMAGE: w=800&h=370&crop=1}
{NEWS_IMAGE: class=img-responsive}
{NEWS_IMAGE: class=img-responsive img-fluid}
<div class="carousel-caption">
<small>{NEWS_DATE=dd MM, yyyy}</small>
<h1>{NEWS_TITLE}</h1>

View File

@ -534,25 +534,28 @@ class pm_extended extends private_message
}
if(check_class($this->pmPrefs['attach_class']))
if(!empty($_POST['uploaded']))
{
$_POST['uploaded'] = $this->processAttachments();
foreach($_POST['uploaded'] as $var)
if(check_class($this->pmPrefs['attach_class']))
{
if(!empty($var['message']))
$_POST['uploaded'] = $this->processAttachments();
foreach($_POST['uploaded'] as $var)
{
$msg .= $var['message']."<br />";
if(!empty($var['message']))
{
$msg .= $var['message']."<br />";
}
}
}
else
{
$msg .= LAN_PM_23.'<br />';
unset($_POST['uploaded']);
}
}
else
{
$msg .= LAN_PM_23.'<br />';
unset($_POST['uploaded']);
}
$_POST['from_id'] = USERID;

View File

@ -10,4 +10,4 @@ CREATE TABLE rss (
rss_limit tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (rss_id),
KEY rss_name (rss_name)
) ENGINE=MyISAM;
) ENGINE=MyISAM;

View File

@ -173,7 +173,7 @@ class siteinfo_shortcodes // must match the folder name of the plugin.
$dimensions = getimagesize($path);
}
$opts = array('alt'=>SITENAME, 'class'=>'logo img-responsive');
$opts = array('alt'=>SITENAME, 'class'=>'logo img-responsive img-fluid');
if(!empty($dimensions[0]))
{

View File

@ -20,7 +20,7 @@ if (!defined('e107_INIT')) { exit; }
$text = "
<div id='powered-by-menu' class='text-center'>
<a href='http://e107.org' rel='external'>
<img class='img-responsive' src='".e_IMAGE_ABS."admin_images/credits_logo.png' alt='e107' style='max-width:100%' />
<img class='img-responsive img-fluid' src='".e_IMAGE_ABS."admin_images/credits_logo.png' alt='e107' style='max-width:100%' />
</a>
</div>
";

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