mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
Theme layout (Visibility Filter) detection enhanced. Help information improved.
This commit is contained in:
parent
345c0ec959
commit
3d9ed2b040
@ -1367,7 +1367,7 @@ if(!defined("THEME_LAYOUT"))
|
||||
$pref = e107::getPref();
|
||||
$cusPagePref = (!empty($user_pref['sitetheme_custompages'])) ? $user_pref['sitetheme_custompages'] : varset($pref['sitetheme_custompages'],array());
|
||||
$cusPageDef = (empty($user_pref['sitetheme_deflayout'])) ? varset($pref['sitetheme_deflayout'],'') : $user_pref['sitetheme_deflayout'];
|
||||
$deflayout = e107::getTheme()->getThemeLayout($cusPagePref, $cusPageDef, e_REQUEST_URL, defset('e_PAGE',''));
|
||||
$deflayout = e107::getTheme()->getThemeLayout($cusPagePref, $cusPageDef, e_REQUEST_URL, $_SERVER['SCRIPT_FILENAME']);
|
||||
|
||||
define("THEME_LAYOUT",$deflayout);
|
||||
|
||||
|
@ -130,7 +130,8 @@ class admin_start
|
||||
e_PLUGIN."tinymce4/e_meta.php",
|
||||
e_THEME."bootstrap3/css/bootstrap_dark.css",
|
||||
e_PLUGIN."search_menu/languages/English.php",
|
||||
e_LANGUAGEDIR."English/lan_parser_functions.php",
|
||||
e_LANGUAGEDIR.e_LANGUAGE."/lan_parser_functions.php",
|
||||
e_LANGUAGEDIR.e_LANGUAGE."/admin/help/theme.php",
|
||||
e_HANDLER."np_class.php",
|
||||
e_CORE."shortcodes/single/user_extended.sc",
|
||||
e_ADMIN."download.php",
|
||||
|
@ -629,6 +629,43 @@ class theme_admin_ui extends e_admin_ui
|
||||
{
|
||||
return $this->GridAjaxPage();
|
||||
}
|
||||
|
||||
|
||||
public function renderHelp()
|
||||
{
|
||||
|
||||
$tp = e107::getParser();
|
||||
|
||||
$type= $this->getMode()."/".$this->getAction();
|
||||
|
||||
switch($type)
|
||||
{
|
||||
case "main/main":
|
||||
$text = "<b>".TPVLAN_56."</b><br />"; // Visbility Filter
|
||||
$text .= "<br />".$tp->toHTML(TPVLANHELP_03,true);
|
||||
$text .= "<ul style='padding-left:10px;margin-top:10px'><li>".$tp->toHTML(TPVLANHELP_04,true)."</li>";
|
||||
$text .= "<li>".$tp->toHTML(TPVLANHELP_05,true)."</li></ul>";
|
||||
break;
|
||||
|
||||
case "label2":
|
||||
// code
|
||||
break;
|
||||
|
||||
default:
|
||||
$text = TPVLANHELP_01."<br /><br />".TPVLANHELP_02;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return array('caption'=>LAN_HELP, 'text'=>$text);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -322,7 +322,8 @@ class e_theme
|
||||
*
|
||||
* @param array $cusPagePref
|
||||
* @param string $defaultLayout
|
||||
* @param string $request_url (optional) defaults to e_REQUEST_URL;
|
||||
* @param string $request_url (optional) defaults to e_REQUEST_URL
|
||||
* @param string $request_script $_SERVER['SCRIPT_FILENAME'];
|
||||
* @return int|string
|
||||
*/
|
||||
public function getThemeLayout($cusPagePref, $defaultLayout, $request_url = null, $request_script = null)
|
||||
@ -378,7 +379,7 @@ class e_theme
|
||||
if($lastChar === '$') // script name match.
|
||||
{
|
||||
$kpage = rtrim($kpage, '$');
|
||||
if(!empty($request_script) && $kpage === $request_script)
|
||||
if(!empty($request_script) && strpos($request_script, '/'.$kpage) !== false)
|
||||
{
|
||||
return $lyout;
|
||||
}
|
||||
@ -2367,7 +2368,7 @@ class themeHandler
|
||||
$itext .= ($mode == self::RENDER_SITEPREFS) ? "<th class='center top'>".TPVLAN_55."</th>" : "";
|
||||
$itext .= "
|
||||
<th>".TPVLAN_52."</th>
|
||||
<th>".TPVLAN_56."</th>
|
||||
<th>".TPVLAN_56." <a href='#' class='e-tip' title=\"".TPVLAN_96."\">".ADMIN_INFO_ICON."</a></th>
|
||||
<th class='text-right' style='text-align:right'>".TPVLAN_54."</th>
|
||||
|
||||
</tr>\n";
|
||||
@ -2401,7 +2402,7 @@ class themeHandler
|
||||
{
|
||||
foreach ($pref['sitetheme_custompages'][$key] as $cp)
|
||||
{
|
||||
$custompage_diz .= "<a href='#element-to-be-shown-{$key}' title=' ".TPVLAN_72." ' class='e-tip btn btn-default btn-secondary btn-xs btn-mini e-expandit'>".trim($cp)."</a> ";
|
||||
$custompage_diz .= "<a href='#element-to-be-shown-{$key}' class='btn btn-default btn-secondary btn-xs btn-mini e-expandit'>".trim($cp)."</a> ";
|
||||
if($count > 4)
|
||||
{
|
||||
$custompage_diz .= "...";
|
||||
@ -2412,7 +2413,7 @@ class themeHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
$custompage_diz = "<a href='#element-to-be-shown-{$key}' title=' ".TPVLAN_72." ' class='e-tip btn btn-xs btn-default btn-secondary btn-mini e-expandit'>".LAN_NONE."</a> ";
|
||||
$custompage_diz = "<a href='#element-to-be-shown-{$key}' class='e-tip btn btn-xs btn-default btn-secondary btn-mini e-expandit'>".LAN_NONE."</a> ";
|
||||
}
|
||||
|
||||
|
||||
@ -2430,6 +2431,7 @@ class themeHandler
|
||||
<textarea style='width:97%' rows='6' placeholder='usersettings.php' cols='20' name='custompages[".$key."]' >".(isset($pref['sitetheme_custompages'][$key]) ? implode("\n", $pref['sitetheme_custompages'][$key]) : "")."</textarea>";
|
||||
|
||||
|
||||
|
||||
//TODO Later.
|
||||
if(e_DEBUG === true)
|
||||
{
|
||||
|
@ -1,20 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/help/theme.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
$text = "The theme manager allows you to set your site's public theme and your admin areas theme.<br /><br />Look at the tooltips (when available) for description ";
|
||||
$ns -> tablerender("Theme Manager Help", $text);
|
@ -131,3 +131,11 @@ define("TPVLAN_93", "Selection");
|
||||
define("TPVLAN_94", "Site theme changed to [x].");
|
||||
define("TPVLAN_95", "Skin");
|
||||
|
||||
define("TPVLAN_96", "Set URLs/script-paths which should automatically use this layout. One per line.");
|
||||
|
||||
define("TPVLANHELP_01", "The theme manager allows you to set your site's public theme and your admin areas theme.");
|
||||
define("TPVLANHELP_02", "Look at the tooltips (when available) for more details.");
|
||||
|
||||
define("TPVLANHELP_03", "By default, the visibility filter will change the theme's layout based on a partial URL match.");
|
||||
define("TPVLANHELP_04", "End lines with a [b]![/b] to exactly match against the end of URL.");
|
||||
define("TPVLANHELP_05", "End lines with a [b]$[/b] to exactly match against the end of script path.");
|
6
page.php
6
page.php
@ -744,7 +744,10 @@ class pageClass
|
||||
if($this->cacheData['COMMENT_FLAG'])
|
||||
{
|
||||
$vars = new e_vars(array('comments' => $this->pageComment(true)));
|
||||
$comments = e107::getScBatch('page',null,'cpage')->setVars($vars)->cpagecomments();
|
||||
/** @var cpage_shortcodes $sc */
|
||||
$sc = e107::getScBatch('page',null,'cpage');
|
||||
$sc->setVars($vars);
|
||||
$comments = $sc->cpagecomments();
|
||||
}
|
||||
define('e_PAGETITLE', eHelper::formatMetaTitle($this->cacheData['TITLE']));
|
||||
define('META_DESCRIPTION', $this->cacheData['META_DSCR']);
|
||||
@ -996,6 +999,7 @@ class pageClass
|
||||
|
||||
if (isset($_POST['commentsubmit']))
|
||||
{
|
||||
$pid = null; //FIXME ?
|
||||
$cobj->enter_comment($_POST['author_name'], $_POST['comment'], "page", $this->pageID, $pid, $_POST['subject']);
|
||||
$e107cache = e107::getCache();
|
||||
$e107cache->clear("comment.page.".$this->pageID);
|
||||
|
Loading…
x
Reference in New Issue
Block a user