Help:WikiPlugin to easily create new pages, optionally with default content. Since v1.3.8

This allows you to create a page geting the new pagename from a forms-based interface, and optionally with the initial content from some template.

Put a "<?plugin-form CreatePage ?>" at some page, browse this page, enter the name of the page to create, then click the button.

Usage

     <?plugin-form CreatePage ?>
     <?plugin-form CreatePage template=CategoryHomePage ?>
     <?plugin-form CreatePage template=SomeTemplatePage vars="year=2004&name=None" ?>

Plugin Arguments

s: The pagename, which will passed to the plugin. Default: ""
initial_content: The new page will be pre-filled with this content. Default: ""
template: The new page will be pre-filled with the content of this page. Default: ""
vars: variables to be expanded. Default: ""
overwrite: Whether to overwrite an existing page. Default: ""

Known Problems

None

Variable Expansion

The content (either initial_content or template) might hold some variables, which will be expanded on creation. Unassigned variables will stay as %%<var>%%, assigned variables without matching %%<var>%% placeholder will be ignored, without any warning.

A variable in a template is denoted as %%var%%, which will be expanded by the value of var given to the vars argument (in urlencoded php notation).

Some special variables are automatically assigned:

%%ctime%% $WikiTheme?->formatDateTime(time())
%%author%% $user->getId()

This forms together with page templates and the PhpWiki:WikiFormRichPlugin and optionally the PhpWiki:SqlResultPlugin a framework to create templated pages.

Authors

Dan Frankowski, Reini Urban

Examples

See also PhpWiki:EasilyCreateNewPages, PhpWiki:WikiFormRichPlugin, PhpWiki:SqlResultPlugin


PhpWikiDocumentation Help:WikiPlugin

Valid XHTML 1.0! Valid CSS!
L'exécution de la page a pris real: 0,165, user: 0,120, sys: 0,020 seconds

Fatal Error:

lib/WikiDB/backend/PearDB.php:1059 Error[256]: wikidb_backend_peardb_mysql: fatal database error



Erreur Fatale de PhpWiki

lib/WikiDB/backend/PearDB.php:1059 Error[256]: wikidb_backend_peardb_mysql: fatal database error


Fatal error: wikidb_backend_peardb_mysql: fatal database error DB Error: insufficient permissions (UPDATE session SET sess_data='wiki_user|O:9:\"_anonuser\":5:{s:7:\"_userid\";s:0:\"\";s:6:\"_level\";i:0;s:6:\"_prefs\";O:15:\"userpreferences\":1:{s:6:\"_prefs\";a:14:{s:6:\"userid\";O:15:\"_userpreference\":1:{s:13:\"default_value\";s:0:\"\";}s:6:\"passwd\";O:15:\"_userpreference\":1:{s:13:\"default_value\";s:0:\"\";}s:9:\"autologin\";O:20:\"_userpreference_bool\":1:{s:13:\"default_value\";b:0;}s:5:\"email\";O:21:\"_userpreference_email\":1:{s:13:\"default_value\";s:0:\"\";}s:11:\"notifyPages\";O:22:\"_userpreference_notify\":1:{s:13:\"default_value\";s:0:\"\";}s:5:\"theme\";O:21:\"_userpreference_theme\":1:{s:13:\"default_value\";s:7:\"smaller\";}s:4:\"lang\";O:24:\"_userpreference_language\":1:{s:13:\"default_value\";s:2:\"fr\";}s:9:\"editWidth\";O:19:\"_userpreference_int\":3:{s:13:\"default_value\";d:80;s:7:\"_minval\";d:30;s:7:\"_maxval\";d:150;}s:11:\"noLinkIcons\";O:20:\"_userpreference_bool\":1:{s:13:\"default_va in /homez.32/autonomie/www/wiki/lib/WikiDB/backend/PearDB.php on line 1059