adminfuncs_php

Source Location: /cmsimple/adminfuncs.php

Functions 
pluginMenu  [line 485]

mixed pluginMenu( [string $add = ''], [string $link = ''], [string $target = ''], [string $text = ''], [array $style = array()]  )

Creates the menu of a plugin (add row, add tab), constructed as a table.

This is an object implemented with a procedural interface.

Parameters:
string   $add:  Add a ROW, a TAB or DATA (Userdefineable content). SHOW will return the menu.
string   $link:  The link, the TAB will lead to.
string   $target:  Target of the link (with(!) 'target=').
string   $text:  Description of the TAB.
array   $style:  Array with style-data for the containing table-cell

API Tags:
Global:   XH_ClassicPluginMenu $_XH_pluginMenu: The plugin menu builder.


[ Top ]
plugin_admin_common  [line 790]

string plugin_admin_common( bool $action, array $admin, bool $plugin, [bool $hint = array()]  )

プラグインのファイルの読み書き (例 en.php, config.php, stylesheet.css).

Parameters:
bool   $action:  Unused.
array   $admin:  Unused.
bool   $plugin:  Unused.
bool   $hint:  Unused.

API Tags:
Return:   Returns the created form or the result of saving the data.
Global:   string $action: The requested action.
Global:   string $admin: The requested admin-action.
Global:   string $plugin: The name of the currently loading plugin.
Global:   array $pth: The paths of system files and folders.

Information Tags:
Todo:   Deprecated unused parameters.

[ Top ]
print_plugin_admin  [line 761]

string print_plugin_admin( string $main  )

Returns the plugin menu.

onでadmin=plugin_main のタブメニューが追加される。
$plugin_tx['プラグイン名']['menu_main']が設定されいれば使用され、無ければ ~mainと表示される
Parameters:

string   $main:  Whether the main setting menu item should be shown ('ON'/'OFF').

API Tags:
Return:   (X)HTML.
Global:   XH_ClassicPluginMenu $_XH_pluginMenu: The plugin menu builder.

プラグインのメニューのトップと同じ内容を表示する場合
例えば
     if ($admin == '' || $admin == 'plugin_main') {
        $o .= ...

[ Top ]
XH_absoluteUrlPath  [line 145]

string XH_absoluteUrlPath( string $path  )

正規化された絶対URLパスを返します

Parameters:
string   $path:  A relative path.

API Tags:
Global:   string $sn: The script name.

Information Tags:
Since:   1.6.1

[ Top ]
XH_adminJSLocalization  [line 1095]

string XH_adminJSLocalization( )

Returns SCRIPT element containing the localization for admin.js.


API Tags:
Return:   (X)HTML
Global:   array $tx: The localization of the core.

Information Tags:
Since:   1.6

[ Top ]
XH_adminMenu  [line 574]

string XH_adminMenu( [array $plugins = array()]  )

Returns the admin menu.

Parameters:
array   $plugins:  A list of plugins.

API Tags:
Return:   (X)HTML.
Global:   string $sn: The scipt name.
Global:   bool $edit: Whether edit mode is active.
Global:   int $s: The index of the current page.
Global:   array $u: The URLs of the pages.
Global:   array $cf: The configuration of the core.
Global:   array $tx: The localization of the core.
Global:   string $su: The URL of the current page.
Global:   array $plugin_tx: The localization of the plugins.

Information Tags:
Since:   1.6

[ Top ]
XH_adminMenuItem  [line 713]

string XH_adminMenuItem( array $item, [int $level = 0]  )

Returns the LI element of an admin menu item.

Parameters:
array   $item:  The menu item.
int   $level:  The level of the menu item.

Information Tags:
Since:   1.6

[ Top ]
XH_backupsView  [line 406]

string XH_backupsView( )

Returns the backup view.


API Tags:
Return:   The (X)HTML.
Global:   array $pth: The paths of system files and folders.
Global:   array $sn: The script name.
Global:   array $tx: The localization of the core.
Global:   object The $_XH_csrfProtection: CSRF protection object.

Information Tags:
Since:   1.6

[ Top ]
XH_contentEditor  [line 839]

string XH_contentEditor( )

Returns the content editor and activates it.


API Tags:
Return:   The (X)HTML.
Global:   string $sn: The script name.
Global:   string $su: The currently active page URL.
Global:   int $s: The index of the currently active page.
Global:   array $u: The URLs of the pages.
Global:   array $c: The content of the pages.
Global:   string $e: Error messages as (X)HTML fragment consisting of LI Elements.
Global:   array $cf: The configuration of the core.
Global:   array $tx: The localization of the core.
Global:   object The $_XH_csrfProtection: CSRF protection object.

Information Tags:
Since:   1.6

[ Top ]
XH_emptyContents  [line 1002]

void XH_emptyContents( )

Empties the contents.


API Tags:
Global:   array $c: The content of the pages.
Global:   int $cl: The number of pages.
Global:   array $pth: The paths of system files and folders.
Global:   array $e: An (X)HTML fragment with error messages.
Global:   object The $pd_router: pagedata router.


[ Top ] 
XH_extraBackup  [line 1071]

void XH_extraBackup( string $suffix  )

Creates an extra backup of the contents file.

Parameters:
string   $suffix:  A suffix for the filename.

Information Tags:
Since:   1.6

[ Top ]
XH_isAccessProtected  [line 180]

bool XH_isAccessProtected( string $path  )

Returns whether a resource is access protected.

Parameters:
string   $path:  A normalized absolute URL path.

API Tags:
Global:   string $sn: The script name.

Information Tags:
Since:   1.6.1

[ Top ]
XH_logFileView  [line 371]

string XH_logFileView( )

Returns the log file view.


API Tags:
Return:   (X)HTML.
Global:   array $pth: The paths of system files and folders.
Global:   array $tx: The localization of the core.
Global:   string $title: The title of the current page.

Information Tags:
Since:   1.6

[ Top ]
XH_pluginVersion  [line 30]

string XH_pluginVersion( string $plugin  )

Returns the readable version of a plugin.

Parameters:
string   $plugin:  Name of a plugin.

API Tags:
Global:   array $pth: The paths of system files and folders.

Information Tags:
Since:   1.6

[ Top ]
XH_registerPluginMenuItem  [line 536]

mixed XH_registerPluginMenuItem( string $plugin, [string $label = null], [string $url = null], [string $target = null]  )

Register a new plugin menu item, or returns the registered plugin menu items, if $label and $url are null.

Parameters:
string   $plugin:  A plugin name.
string   $label:  A menu item label.
string   $url:  A URL to link to.
string   $target:  A target attribute value.

API Tags:
Staticvar:   array $pluginMenu: The array of already registered menu items.

Information Tags:
Since:   1.6.2

[ Top ]
XH_registerStandardPluginMenuItems  [line 515]

void XH_registerStandardPluginMenuItems( bool $showMain  )

管理メニューのための標準的なプラグインのメニュー項目(プルダウンメニュー)の表示/非表示。

 XH_registerStandardPluginMenuItems(true)でデフォルトのプルダウンメニューが自動(強制)表示。
 XH_registerStandardPluginMenuItems(off)で翻訳ファイルに['menu_****]があればそのメニュー表示される
Parameters:
bool   $showMain:  Whether to display the main settings item.

Information Tags:
Since:   1.6.2

[ Top ]
XH_restore  [line 1036]

void XH_restore( string $filename  )

Restores a content backup. The current content.htm is backed up before.

Parameters:
string   $filename:  The filename.

API Tags:
Global:   array $pth: The paths of system files and folders.
Global:   array $e: An (X)HTML fragment with error messages.

Information Tags:
Since:   1.6

[ Top ]
XH_saveContents  [line 883]

bool XH_saveContents( )

Saves the current contents (including the page data), if edit mode is active.


API Tags:
Return:   Whether that succeeded
Global:   array $c: The content of the pages.
Global:   array $pth: The paths of system files and folders.
Global:   array $cf: The configuration of the core.
Global:   array $tx: The localization of the core.
Global:   array $edit: Whether edit mode is active.
Global:   object The $pd_router: page data router.

Information Tags:
Since:   1.6

[ Top ]
XH_saveEditorContents  [line 931]

void XH_saveEditorContents( string $text  )

Saves content.htm after submitting changes from the content editor.

Parameters:
string   $text:  The text to save.

API Tags:
Global:   array $pth: The paths of system files and folders.
Global:   array $cf: The configuation of the core.
Global:   array $tx: The localization of the core.
Global:   object The $pd_router: page data router.
Global:   array $c: The content of the pages.
Global:   int $s: The index of the active page.
Global:   array $u: The URLs of the pages.
Global:   string $selected: The URL of the active page.

Information Tags:
Since:   1.6

[ Top ]
XH_settingsView  [line 330]

string XH_settingsView( )

Returns the general settings view.


API Tags:
Return:   The (X)HTML.
Global:   string $sn: The script name.
Global:   array $tx: The localization of the core.

Information Tags:
Since:   1.6

[ Top ]
XH_sysinfo  [line 212]

string XH_sysinfo( )

Returns the system information view.


API Tags:
Return:   The (X)HTML.
Global:   array $pth: The paths of system files and folders.
Global:   array $tx: The localization of the core.
Global:   string $sn: The script name.

Information Tags:
Since:   1.6

[ Top ]
XH_systemCheck  [line 66]

string XH_systemCheck( array $data  )

Returns the result view of the system check.

Parameters:
array   $data:  The data ;)

API Tags:
Return:   The (X)HTML.
Global:   array $pth: The paths of system files and folders.
Global:   array $tx: The localization of the core.

Information Tags:
Link:   http://www.cmsimple-xh.org/wiki/doku.php/plugin_interfaces#system_check
Since:   1.5.4

[ Top ]
XH_wantsPluginAdministration  [line 1125]

bool XH_wantsPluginAdministration( string $pluginName  )

Returns whether the administration of a certain plugin is requested.

Parameters:
string   $pluginName:  A plugin name.

Information Tags:
Since:   1.6.3

[ Top ]