CMSimple_XH
Functions
adminfuncs.php File Reference

Admin only functions. More...

Functions

 XH_pluginVersion ($plugin)
 Returns the readable version of a plugin. More...
 
 XH_systemCheck (array $data)
 Returns the result view of the system check. More...
 
 XH_systemCheckLi ($class, $state, $text)
 Returns a single <li> of the system check. More...
 
 XH_absoluteUrlPath ($path)
 Returns the normalized absolute URL path. More...
 
 XH_isAccessProtected ($path)
 Returns whether a resource is access protected. More...
 
 XH_sysinfo ()
 Returns the system information view. More...
 
 XH_settingsView ()
 Returns the general settings view. More...
 
 XH_logFileView ()
 Returns the log file view. More...
 
 XH_backupsView ()
 Returns the backup view. More...
 
 XH_pluginsView ()
 Returns the plugins view. More...
 
 pluginMenu ($add='', $link='', $target='', $text='', array $style=array())
 Creates the menu of a plugin (add row, add tab), constructed as a table. More...
 
 XH_registerStandardPluginMenuItems ($showMain)
 Registers the standard plugin menu items for the admin menu. More...
 
 XH_registerPluginMenuItem ($plugin, $label=null, $url=null, $target=null)
 Register a new plugin menu item, or returns the registered plugin menu items, if $label and $url are null. More...
 
 XH_adminMenu (array $plugins=array())
 Returns the admin menu. More...
 
 XH_adminMenuItem (array $item, $level=0)
 Returns the LI element of an admin menu item. More...
 
 print_plugin_admin ($main)
 Returns the plugin menu. More...
 
 plugin_admin_common ()
 Handles reading and writing of plugin files (e.g. More...
 
 XH_contentEditor ()
 Returns the content editor and activates it. More...
 
 XH_saveContents ()
 Saves the current contents (including the page data), if edit mode is active. More...
 
 XH_saveEditorContents ($text)
 Saves content.htm after submitting changes from the content editor. More...
 
 XH_emptyContents ()
 Empties the contents. More...
 
 XH_restore ($filename)
 Restores a content backup. More...
 
 XH_extraBackup ($suffix)
 Creates an extra backup of the contents file. More...
 
 XH_adminJSLocalization ()
 Returns SCRIPT element containing the localization for admin.min.js. More...
 
 XH_wantsPluginAdministration ($pluginName)
 Returns whether the administration of a certain plugin is requested. More...
 

Detailed Description

Admin only functions.

Author
Peter Harteg peter.nosp@m.@har.nosp@m.teg.d.nosp@m.k
The CMSimple_XH developers devs@.nosp@m.cmsi.nosp@m.mple-.nosp@m.xh.o.nosp@m.rg
See also
http://cmsimple-xh.org/

Function Documentation

◆ plugin_admin_common()

plugin_admin_common ( )

Handles reading and writing of plugin files (e.g.

en.php, config.php, stylesheet.css).

Returns
string Returns the created form or the result of saving the data.

◆ pluginMenu()

pluginMenu (   $add = '',
  $link = '',
  $target = '',
  $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$addAdd a ROW, a TAB or DATA (Userdefineable content). SHOW will return the menu.
string$linkThe link, the TAB will lead to.
string$targetTarget of the link (with(!) 'target=').
string$textDescription of the TAB.
array$styleArray with style-data for the containing table-cell
Returns
mixed

◆ print_plugin_admin()

print_plugin_admin (   $main)

Returns the plugin menu.

Parameters
string$mainWhether the main setting menu item should be shown ('ON'/'OFF').
Returns
string HTML

◆ XH_absoluteUrlPath()

XH_absoluteUrlPath (   $path)

Returns the normalized absolute URL path.

Parameters
string$pathA relative path.
Returns
string
Since
1.6.1

◆ XH_adminJSLocalization()

XH_adminJSLocalization ( )

Returns SCRIPT element containing the localization for admin.min.js.

Returns
string HTML
Since
1.6

◆ XH_adminMenu()

XH_adminMenu ( array  $plugins = array())

Returns the admin menu.

Parameters
array$pluginsA list of plugins.
Returns
string HTML
Since
1.6

◆ XH_adminMenuItem()

XH_adminMenuItem ( array  $item,
  $level = 0 
)

Returns the LI element of an admin menu item.

Parameters
array$itemThe menu item.
int$levelThe level of the menu item.
Returns
string
Since
1.6

◆ XH_backupsView()

XH_backupsView ( )

Returns the backup view.

Returns
string HTML
Since
1.6

◆ XH_contentEditor()

XH_contentEditor ( )

Returns the content editor and activates it.

Returns
string HTML
Since
1.6

◆ XH_emptyContents()

XH_emptyContents ( )

Empties the contents.

Returns
void

◆ XH_extraBackup()

XH_extraBackup (   $suffix)

Creates an extra backup of the contents file.

Parameters
string$suffixA suffix for the filename.
Returns
void
Since
1.6

◆ XH_isAccessProtected()

XH_isAccessProtected (   $path)

Returns whether a resource is access protected.

Parameters
string$pathA normalized absolute URL path.
Returns
bool
Since
1.6.1

◆ XH_logFileView()

XH_logFileView ( )

Returns the log file view.

Returns
string HTML
Since
1.6

◆ XH_pluginsView()

XH_pluginsView ( )

Returns the plugins view.

Returns
string HTML
Since
1.7

◆ XH_pluginVersion()

XH_pluginVersion (   $plugin)

Returns the readable version of a plugin.

Parameters
string$pluginName of a plugin.
Returns
string
Since
1.6

◆ XH_registerPluginMenuItem()

XH_registerPluginMenuItem (   $plugin,
  $label = null,
  $url = null,
  $target = null 
)

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

Parameters
string$pluginA plugin name.
string$labelA menu item label.
string$urlA URL to link to.
string$targetA target attribute value.
Returns
mixed
Since
1.6.2

◆ XH_registerStandardPluginMenuItems()

XH_registerStandardPluginMenuItems (   $showMain)

Registers the standard plugin menu items for the admin menu.

Parameters
bool$showMainWhether to display the main settings item.
Returns
void
Since
1.6.2

◆ XH_restore()

XH_restore (   $filename)

Restores a content backup.

The current content.htm is backed up before.

Parameters
string$filenameThe filename.
Returns
void
Since
1.6

◆ XH_saveContents()

XH_saveContents ( )

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

Returns
bool Whether that succeeded
Since
1.6

◆ XH_saveEditorContents()

XH_saveEditorContents (   $text)

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

Parameters
string$textThe text to save.
Returns
void
Since
1.6

◆ XH_settingsView()

XH_settingsView ( )

Returns the general settings view.

Returns
string HTML
Since
1.6

◆ XH_sysinfo()

XH_sysinfo ( )

Returns the system information view.

Returns
string HTML
Since
1.6

◆ XH_systemCheck()

XH_systemCheck ( array  $data)

Returns the result view of the system check.

Parameters
array$dataThe data ;)
Returns
string HTML
See also
http://www.cmsimple-xh.org/wiki/doku.php/plugin_interfaces#system_check
Since
1.5.4

◆ XH_systemCheckLi()

XH_systemCheckLi (   $class,
  $state,
  $text 
)

Returns a single <li> of the system check.

Parameters
string$classA CSS class.
string$stateA state.
string$textA message text.
Returns
string
Since
1.7.0

◆ XH_wantsPluginAdministration()

XH_wantsPluginAdministration (   $pluginName)

Returns whether the administration of a certain plugin is requested.

Parameters
string$pluginNameA plugin name.
Returns
bool
Since
1.6.3