名前空間 | |
XH | |
変数 | |
const | XH_URICHAR_SEPARATOR (preg_match('/cms.php/i', $_SERVER['PHP_SELF'])) '|' |
$title = '' | |
$o = '' | |
$e = '' | |
$hjs = '' | |
$bjs = '' | |
$onload = '' | |
$temp = null | |
$i = null | |
$j = null | |
const | CMSIMPLE_XH_VERSION 'CMSimple_XH 1.7.0' |
const | CMSIMPLE_XH_BUILD '2017070201' |
const | CMSIMPLE_XH_DATE '2017-07-02' |
$pth = array() | |
$pth ['file']['execute'] = './index.php' | |
$pth ['folder']['base'] = is_dir('./cmsimple') ? './' : '../' | |
$pth ['folder']['cmsimple'] = $pth['folder']['base'] . 'cmsimple/' | |
$pth ['folder']['classes'] = $pth['folder']['cmsimple'] . 'classes/' | |
$pth ['folder']['plugins'] = $pth['folder']['base'] . 'plugins/' | |
$pth ['file']['log'] = $pth['folder']['cmsimple'] . 'log.txt' | |
$pth ['file']['cms'] = $pth['folder']['cmsimple'] . 'cms.php' | |
$pth ['file']['config'] = $pth['folder']['cmsimple'] . 'config.php' | |
$_XH_controller = new XH\Controller() | |
$cf = XH_readConfiguration() | |
if(! $cf) | $cf ['security']['type'] = 'page' |
$cf ['scripting']['regexp'] = '#CMSimple (.*?)#' | |
$cf ['xhtml']['endtags'] = '' | |
$cf ['xhtml']['amp'] = 'true' | |
foreach(array('userfiles', 'downloads', 'images', 'media') as $temp) | $pth ['folder']['flags'] = $pth['folder']['images'] . 'flags/' |
if($cf['site']['compat']) | $errors = array() |
$pth ['folder']['language'] = $pth['folder']['cmsimple'] . 'languages/' | |
if(!isset($cf['folders']['content'])) if($cf['site']['timezone'] !=='' &&function_exists('date_default_timezone_set')) | $sl = null |
if(preg_match('/\/([A-z]{2})\/index.php$/', sv('SCRIPT_NAME'), $temp) &&XH_isLanguageFolder($temp=strtolower($temp[1]))) | else |
$pth ['folder']['content'] = $pth['folder']['base'] . $cf['folders']['content'] | |
$pth ['file']['content'] = $pth['folder']['content'] . 'content.htm' | |
$pth ['file']['pagedata'] = $pth['folder']['content'] . 'pagedata.php' | |
$pth ['file']['language'] = $pth['folder']['language'] . basename($sl) . '.php' | |
$pth ['folder']['corestyle'] = $pth['folder']['base'] . 'assets/css/' | |
$pth ['file']['corestyle'] = $pth['folder']['corestyle'] . 'core.css' | |
$pth ['file']['adminjs'] = $pth['folder']['base'] . 'assets/js/admin.min.js' | |
$tx = XH_readConfiguration(false, true) | |
$tx ['meta']['codepage'] ='UTF-8' | |
$txc = array('template' => $tx['template']) | |
$iis = strpos(sv('SERVER_SOFTWARE'), "IIS") | |
$cgi = (php_sapi_name() == 'cgi' || php_sapi_name() == 'cgi-fcgi') | |
$sn = preg_replace('/([^\?]*)\?.*/', '$1', sv(($iis ? 'SCRIPT_NAME' : 'REQUEST_URI'))) | |
$admin = null | |
$action = null | |
$function = null | |
$login = null | |
$keycut = null | |
$logout = null | |
$mailform = null | |
$download = null | |
$downloads = null | |
$images = null | |
$media = null | |
$userfiles = null | |
$edit = null | |
$normal = null | |
$print = null | |
$file = null | |
$search = null | |
$selected = null | |
$settings = null | |
$sitemap = null | |
$text = null | |
$validate = null | |
$xhpages = null | |
const | CMSIMPLE_ROOT ($temp as $i) XH_getRootFolder() |
const | CMSIMPLE_BASE $pth['folder']['base'] |
const | CMSIMPLE_URL 'http' . (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . $sn |
$su = '' | |
if($download !='') | $pth ['file']['search'] = $pth['folder']['cmsimple'] . 'search.php' |
$pth ['file']['mailform'] = $pth['folder']['cmsimple'] . 'mailform.php' | |
$adm = 0 | |
$f = '' | |
$_XH_pluginMenu = new XH\ClassicPluginMenu() | |
$plugin = null | |
foreach(XH_plugins() as $plugin) | $_XH_csrfProtection = null |
const | XH_ADM $adm |
$cl = 0 | |
$pd_router = null | |
$xh_publisher = null | |
$s = -1 | |
$c = null | |
$h = null | |
$u = null | |
$l = null | |
if(is_readable($pth['folder']['cmsimple'] . 'userfuncs.php')) | $cf ['site']['title'] = $tx['site']['title'] |
const | PLUGINLOADER ($function=='save') true |
const | PLUGINLOADER_VERSION 2.111 |
const | XH_FORM_NAMESPACE 'PL3bbeec384_' |
if(XH_ADM) | $pd_s = ($s == -1 && !$f && $o == '' && $su == '') ? $xh_publisher->getFirstPublishedPage() : $s |
$pd_current = $pd_router->find_page($pd_s) | |
$plugin_cf = new XH\PluginConfig() | |
$plugin_tx = new XH\PluginConfig(true) | |
switch($f) | $hc = array() |
$hl = -1 | |
$si = -1 | |
if($su==uenc('site/cms info')) if(XH_ADM) if($s==-1 &&! $f && $o=='' && $su=='') if(XH_ADM) | $output = null |
if($temp) if(! $i) | if (isset( $_XH_csrfProtection)) |
The main file of CMSimple_XH.
cms.php に定義があります。
foreach (XH_plugins() as $plugin) $_XH_csrfProtection = null |
$_XH_pluginMenu = new XH\ClassicPluginMenu() |
$action = null |
$adm = 0 |
$admin = null |
$bjs = '' |
$c = null |
$cf = XH_readConfiguration() |
基本的に 設定されたデータ config.phpの内容
※ そのページに設定されてる Meta-tagプラグイン、Page_paramsプラグイン の内容で上書きされる。
下記はMeta-tagプラグイン
/* * Set the meta tags contents. */ if ($pd_current['title']) { $cf['site']['title'] = $pd_current['title']; $cf['title']['format'] = "{SITE}"; } if ($pd_current['description']) { $tx['meta']['description'] = $pd_current['description']; } if ($pd_current['keywords']) { $tx['meta']['keywords'] = $pd_current['keywords']; } if ($pd_current['robots']) { $cf['meta']['robots'] = $pd_current['robots']; }
Should be treated as read-only.
array $cf
public
$cgi = (php_sapi_name() == 'cgi' || php_sapi_name() == 'cgi-fcgi') |
$cl = 0 |
$download = null |
$downloads = null |
$e = '' |
$edit = null |
if ( $cf[ 'site'][ 'compat']) $errors = array() |
$f = '' |
$file = null |
$function = null |
$h = null |
switch ( $f) $hc = array() |
$hjs = '' |
$i = null |
$iis = strpos(sv('SERVER_SOFTWARE'), "IIS") |
$images = null |
$j = null |
$keycut = null |
$l = null |
$login = null |
$logout = null |
$mailform = null |
$media = null |
$normal = null |
$o = '' |
$onload = '' |
$pd_current = $pd_router->find_page($pd_s) |
現在のページに関する情報.
The infos about the current page.
各ページに設定された Metaデータ等の 本体(本文)以外のデータが配列で入ってる。
※meta_tagsプラグインの内容も反映されてる 実際に表示されるデータ
ex. ["url"]
["last_edit"]
["description"]
["keywords"]
["title"]
["robots"] ナド
array(16) { ["url"]=> string(22) "Welcome-to-CMSimple_XH" ["last_edit"]=> string(10) "1475333693" ["description"]=> string(35) "ココハトップだけDescription( meta_tagsプラグインの内容)" ["keywords"]=> string(32) "ココハトップだけKeywords(meta_tagsプラグインの内容)" ["title"]=> string(18) "タイトル代替(meta_tagsプラグインの内容)" ["robots"]=> string(0) "" ["heading"]=> string(48) "H1(トップの大文字)の代替する" ["show_heading"]=> string(1) "1" ["template"]=> string(1) "0" ["published"]=> string(1) "1" ["show_last_edit"]=> string(1) "0" ["linked_to_menu"]=> string(1) "1" ["header_location"]=> string(0) "" ["use_header_location"]=> string(1) "0" ["publication_date"]=> string(0) "" ["expires"]=> string(0) "" }
Treat as read-only.
array $pd_current
public
$pd_router = null |
The page data router.
下記は CMSimple_XH Ver1.6
object(XH_PageDataRouter)#4 (3) { ["model"]=> object(XH_PageDataModel)#5 (5) { ["headings"]=> array(28) { [0]=> string(22) "Welcome to CMSimple_XH" [1]=> string(26) "Menu Levels & Headings" [2]=> string(23) "Menu Level 2 – Page 1" [3]=> string(23) "Menu Level 3 – Page 1" [4]=> string(23) "Menu Level 3 – Page 2" [5]=> string(23) "Menu Level 3 – Page 3" [6]=> string(23) "Menu Level 2 – Page 2" [7]=> string(23) "Menu Level 3 – Page 1" [8]=> string(23) "Menu Level 3 – Page 2" [9]=> string(23) "Menu Level 3 – Page 3" [10]=> string(23) "Menu Level 2 – Page 3" [11]=> string(23) "Menu Level 3 – Page 1" [12]=> string(23) "Menu Level 3 – Page 2" [13]=> string(23) "Menu Level 3 – Page 3" [14]=> string(23) "Templates & Plugins" [15]=> string(7) "gonzo-h" [16]=> string(5) "mini1" [17]=> string(13) "n6200tbisGPL3" [18]=> string(7) "photo11" [19]=> string(5) "praia" [20]=> string(14) "responsivehtml" [21]=> string(16) "structure1_black" [22]=> string(9) "Languages" [23]=> string(6) "News01" [24]=> string(6) "News02" [25]=> string(6) "News03" [26]=> string(6) "News04" [27]=> string(6) "News05" } ["params"]=> array(14) { [0]=> string(8) "keywords" [1]=> string(5) "title" [2]=> string(6) "robots" [3]=> string(7) "heading" [4]=> string(12) "show_heading" [5]=> string(8) "template" [6]=> string(9) "published" [7]=> string(14) "show_last_edit" [8]=> string(14) "linked_to_menu" [9]=> string(15) "header_location" [10]=> string(19) "use_header_location" [11]=> string(16) "publication_date" [12]=> string(7) "expires" [13]=> string(11) "description" } ["data"]=> array(28) { [0]=> array(16) { ["url"]=> string(22) "Welcome-to-CMSimple_XH" ["last_edit"]=> string(10) "1475333693" ["description"]=> string(35) "ココハトップだけDescription" ["keywords"]=> string(32) "ココハトップだけKeywords" ["title"]=> string(18) "タイトル代替" ["robots"]=> string(0) "" ["heading"]=> string(48) "H1(トップの大文字)の代替する" ["show_heading"]=> string(1) "1" ["template"]=> string(1) "0" ["published"]=> string(1) "1" ["show_last_edit"]=> string(1) "0" ["linked_to_menu"]=> string(1) "1" ["header_location"]=> string(0) "" ["use_header_location"]=> string(1) "0" ["publication_date"]=> string(0) "" ["expires"]=> string(0) "" } [1]=> array(16) { ["url"]=> string(30) "Menu_Levels_%26amp%3B_Headings" ["last_edit"]=> string(10) "1386262232" ["description"]=> string(0) "" ["keywords"]=> string(0) "" ["title"]=> string(0) "" ["robots"]=> string(0) "" ["heading"]=> string(0) "" ["show_heading"]=> string(1) "0" ["template"]=> string(1) "0" ["published"]=> string(1) "1" ["show_last_edit"]=> string(1) "0" ["linked_to_menu"]=> string(1) "0" ["header_location"]=> string(0) "" ["use_header_location"]=> string(1) "0" ["publication_date"]=> string(0) "" ["expires"]=> string(0) "" } ******** 略 ************* [27]=> array(16) { ["url"]=> string(6) "News05" ["last_edit"]=> string(10) "1377011870" ["description"]=> string(0) "" ["keywords"]=> string(0) "" ["title"]=> string(0) "" ["robots"]=> string(0) "" ["heading"]=> string(0) "" ["show_heading"]=> string(1) "0" ["template"]=> string(1) "0" ["published"]=> string(1) "1" ["show_last_edit"]=> string(1) "0" ["linked_to_menu"]=> string(1) "0" ["header_location"]=> string(0) "" ["use_header_location"]=> string(1) "0" ["publication_date"]=> string(0) "" ["expires"]=> string(0) "" } } ["temp_data"]=> array(14) { ["url"]=> string(6) "WebLog" ["last_edit"]=> string(10) "1322055182" ["description"]=> string(0) "" ["keywords"]=> string(0) "" ["title"]=> string(0) "" ["robots"]=> string(0) "" ["heading"]=> string(0) "" ["show_heading"]=> string(0) "" ["template"]=> string(0) "" ["published"]=> string(0) "" ["show_last_edit"]=> string(0) "" ["linked_to_menu"]=> string(1) "1" ["header_location"]=> string(0) "" ["use_header_location"]=> string(0) "" } ["tabs"]=> array(2) { ["Metaタグ"]=> string(37) "./plugins/meta_tags/Metatags_view.php" ["ページ設定"]=> string(41) "./plugins/page_params/Pageparams_view.php" } } ["current_page"]=> NULL ["currentInterests"]=> array(14) { [0]=> string(11) "description" [1]=> string(8) "keywords" [2]=> string(5) "title" [3]=> string(6) "robots" [4]=> string(7) "heading" [5]=> string(12) "show_heading" [6]=> string(8) "template" [7]=> string(9) "published" [8]=> string(16) "publication_date" [9]=> string(7) "expires" [10]=> string(14) "show_last_edit" [11]=> string(14) "linked_to_menu" [12]=> string(15) "header_location" [13]=> string(19) "use_header_location" }
Treat as read-only.
XH $pd_router
public
if (XH_ADM) $pd_s = ($s == -1 && !$f && $o == '' && $su == '') ? $xh_publisher->getFirstPublishedPage() : $s |
The index of the currently requested page.
Treat as read-only. Note that the index of the currently requested page is available in $s after the plugins have been loaded. During plugin loading you may use $pd_s, but this is not guaranteed to be correct, as it may be set to 0, even if $s might later be -1.
int $pd_s
public
$plugin = null |
$plugin_cf = new XH\PluginConfig() |
$plugin_tx = new XH\PluginConfig(true) |
$print = null |
$pth = array() |
重要なファイルやフォルダのパスを保持する2次元配列
A two dimensional array that holds the paths of important files and folders.
下記は Ver1.6
array(2) { ["file"]=> array(20) { ["execute"]=> string(11) "./index.php" ["log"]=> string(18) "./cmsimple/log.txt" ["cms"]=> string(18) "./cmsimple/cms.php" ["config"]=> string(21) "./cmsimple/config.php" ["content"]=> string(21) "./content/content.htm" ["pagedata"]=> string(22) "./content/pagedata.php" ["language"]=> string(27) "./cmsimple/languages/ja.php" ["corestyle"]=> string(19) "./core/css/core.css" ["adminjs"]=> string(18) "./core/js/admin.js" ["template"]=> string(30) "./templates/mini1/template.htm" ["stylesheet"]=> string(32) "./templates/mini1/stylesheet.css" ["search"]=> string(21) "./cmsimple/search.php" ["mailform"]=> string(23) "./cmsimple/mailform.php" ["plugin_index"]=> string(27) "./plugins/tinymce/index.php" ["plugin_admin"]=> string(27) "./plugins/tinymce/admin.php" ["plugin_language"]=> string(34) "./plugins/tinymce/languages/ja.php" ["plugin_classes"]=> string(46) "./plugins/tinymce/classes/required_classes.php" ["plugin_config"]=> string(35) "./plugins/tinymce/config/config.php" ["plugin_stylesheet"]=> string(36) "./plugins/tinymce/css/stylesheet.css" ["plugin_help"]=> string(34) "./plugins/tinymce/help/help_en.htm" } ["folder"]=> array(24) { ["base"]=> string(2) "./" ["cmsimple"]=> string(11) "./cmsimple/" ["classes"]=> string(19) "./cmsimple/classes/" ["plugins"]=> string(10) "./plugins/" ["userfiles"]=> string(12) "./userfiles/" ["downloads"]=> string(22) "./userfiles/downloads/" ["images"]=> string(19) "./userfiles/images/" ["media"]=> string(18) "./userfiles/media/" ["flags"]=> string(25) "./userfiles/images/flags/" ["language"]=> string(21) "./cmsimple/languages/" ["content"]=> string(10) "./content/" ["corestyle"]=> string(11) "./core/css/" ["templates"]=> string(12) "./templates/" ["template"]=> string(18) "./templates/mini1/" ["menubuttons"]=> string(23) "./templates/mini1/menu/" ["templateimages"]=> string(25) "./templates/mini1/images/" ["plugin"]=> string(18) "./plugins/tinymce/" ["plugin_classes"]=> string(26) "./plugins/tinymce/classes/" ["plugin_config"]=> string(25) "./plugins/tinymce/config/" ["plugin_content"]=> string(26) "./plugins/tinymce/content/" ["plugin_css"]=> string(22) "./plugins/tinymce/css/" ["plugin_help"]=> string(23) "./plugins/tinymce/help/" ["plugin_includes"]=> string(27) "./plugins/tinymce/includes/" ["plugin_languages"]=> string(28) "./plugins/tinymce/languages/" }
Should be treated as read-only.
array $pth
public
$s = -1 |
現在、要求されたページのインデックス・・何番目のデータか?
ex. $c[$s] でそのページのデータを取り出す
The index of the currently requested page.
Treat as read-only.
すべてのプラグインがロードされるまで $s は正しくスタートページに設定されていないことに注意してください。
あなたがロードをプラグイン時に、現在要求されているページのインデックスを知っている必要がある場合は、$ pd_s を使用することを検討してください
Note that $s is not properly set for the start page until all plugins are loaded. If you need the know the index of the currently requested page during plugin loading, consider to use $pd_s.
int $s
public
$search = null |
$selected = null |
$settings = null |
$si = -1 |
$sitemap = null |
if (!isset( $cf[ 'folders'][ 'content'])) if ( $cf[ 'site'][ 'timezone'] !=='' &&function_exists( 'date_default_timezone_set')) $sl = null |
$sn = preg_replace('/([^\?]*)\?.*/', '$1', sv(($iis ? 'SCRIPT_NAME' : 'REQUEST_URI'))) |
The relative path of the root folder, i.e. the script name.
例えば、 CMSimple のトップが http://cmsimple-jp.org/ なら / CMSimple のトップが
http://cmsimple-jp.org/test/ なら /test/
The relative path of the root folder, i.e. the script name.
Default value:
preg_replace(
'/([^\?]*)\?.*/', '$1',
sv(($iis ? 'SCRIPT_NAME' : 'REQUEST_URI')) )
Should be treated as read-only.
string $sn
public
if (!isset( $cf[ 'uri'][ 'length'])) $su = '' |
表示してるページのURL部分(selected URL).
http://cmsimple-jp.org/?Templates-and-Plugins なら Templates-and-Plugins
http://cmsimple-jp.org/?Templates-and-Plugins/aaa なら Templates-and-Plugins/aaa
http://cmsimple-jp.org/ (トップページ) なら 無シ(空欄)
The current page's URL (selected URL).
Should be treated as read-only.
string $su
public
$temp = null |
$text = null |
string $title = '' |
$tx = XH_readConfiguration(false, true) |
設定 → 言語編集の内容
ex.
$tx["title"]
$tx["meta"]["keywords"]
$tx["meta"]["description"]
$tx["template"]["text1"] "テキスト1 for templates requiring this text"
$tx["template"]["text2"] "テキスト 2 for templates requiring this text"
$tx["template"]["text3"]=>"テキスト3 for templates requiring this text"
※表示する際、各ページのMetaタブ(Metaプラグイン)で上書きされる。
ex. plugins/meta_tags/index.php Line50
/* * Set the meta tags contents. */ if ($pd_current['title']) { $cf['site']['title'] = $pd_current['title']; $cf['title']['format'] = "{SITE}"; } if ($pd_current['description']) { $tx['meta']['description'] = $pd_current['description']; } if ($pd_current['keywords']) { $tx['meta']['keywords'] = $pd_current['keywords']; } if ($pd_current['robots']) { $cf['meta']['robots'] = $pd_current['robots']; }
The localization of the core.
例えば、言語編集のMetaデータ $tx["meta"]["description"] に ようこそ と設定
トップページの Metaプラグイン:description に こんにちわ を設定した場合、
そのページの$tx["meta"]["description"] には こんにちわ が入る
※ $tx['subsite']['template'] :内部データにあり。用途が不明 2lang用?
$cf['site']['template'] より優先される(function initTemplatePaths)
Should be treated as read-only.
array $tx
public
$txc = array('template' => $tx['template']) |
$u = null |
ページのURL. 配列
The URLs of the pages.
[0]=> string(22) "Welcome-to-CMSimple_XH" [1]=> string(24) "Menu-Levels-and-Headings" [2]=> string(54) "Menu-Levels-and-Headings/Menu-Level-2-%E2%80%93-Page-1" [3]=> string(84) "Menu-Levels-and-Headings/Menu-Level-2-%E2%80%93-Page-1/Menu-Level-3-%E2%80%93-Page-1"
Treat as read-only.
array $u
public
$userfiles = null |
$validate = null |
$xh_publisher = null |
$xhpages = null |
Whether the page manager is requested.
This variable is initialized from a xhpages GET/POST parameter, and should only be used by page managers, which may treat it as read-write.
string $xhpages
public
http://www.cmsimple-xh.org/wiki/doku.php/plugin_interfaces#page_managers
const CMSIMPLE_BASE $pth['folder']['base'] |
const CMSIMPLE_ROOT( $temp as $i) XH_getRootFolder() |
const CMSIMPLE_URL 'http' . (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . $sn |
const CMSIMPLE_XH_BUILD '2017070201' |
const CMSIMPLE_XH_DATE '2017-07-02' |
const CMSIMPLE_XH_VERSION 'CMSimple_XH 1.7.0' |
if (sv( 'QUERY_STRING') !='') else |
if |
const PLUGINLOADER( $function=='save') true |
const PLUGINLOADER_VERSION 2.111 |
const XH_FORM_NAMESPACE 'PL3bbeec384_' |