Revision history for AdminActions


Revision [23346]

Last edited on 2016-05-20 07:38:47 by OlivierBorowski [Replaces old-style internal links with new pipe-split links.]
Additions:
- [[http://docs.wikkawiki.org/UsingActions | UsingActions]]
The UI is based on UserAdmin and [[PageAdminAction | PageAdmin]] style.
Deletions:
- [[http://docs.wikkawiki.org/UsingActions UsingActions]]
The UI is based on UserAdmin and [[PageAdminAction PageAdmin]] style.


Revision [19876]

Edited on 2008-04-23 16:34:46 by OlivierBorowski [Replaces old-style internal links with new pipe-split links.]
Additions:
'importance' => 2
'importance' => 1
'importance' => 1
importance=2
importance=1
importance=1
<importance>2</importance>
<importance>1</importance>
<importance>1</importance>
PRIMARY KEY (`tag`)
`importance` tinyint(1) NOT NULL,
PRIMARY KEY (`action_tag`,`name`)
**Field "importance" :**
- it is only used by WikkaEdit
- values : 0=none, 1=default, 2=mandatory
- when adding an action, the "mandatory" and "default" parameters are added automatically. If a "mandatory" parameter is removed, the editor will display a warning.
===When metadata cache is updated ?===
The ACLs are currently not used (see following chapiter "Actions ACLs")
""<h3 id="hn_Actions_Administration">Actions Administration</h3>
<fieldset>
<legend>Filter view:</legend>
<label for="q">Search action:</label> <input type ="text" id="q" name="q" title="Enter a search string" size="20" maxlength="50" value=" "/> <input type="submit" value="Submit" /><br />
<label for="l">Show</label>
<select name="l" id="l" title="Select records-per-page limit">
<option value="5">5</option>
<option value="10">10</option>
<option value="15" selected="selected">15</option>
<option value="20">20</option>
<option value="25">25</option>
<option value="28">28</option>
</select> <label for="l">records per page</label> <input type="submit" value="Apply" /><br />
Records (28): 1-15 | <a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage&l=15&sort=time&d=desc&s=15&q=&start_ts=&end_ts=" title="Show records from 16 to 28">16-28</a>
<br />
<span class="sortorder">Sorted by: <tt>tag, asc</tt></span>
</fieldset>
<table id="adminactions" summary="List of possible actions" border="1px" class="data">
<th style="text-align:center"><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage&l=10&sort=tag&d=desc" title="Sort by action tag">Action Tag</a></th>
<th style="text-align:center"><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage&l=10&sort=title&d=asc" title="Sort by action title">Action Title</a></th>
<th colspan="2" style="text-align:center"><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage&l=10&sort=acl&d=asc" title="Sort by ACLS">ACLS</a></th>
<tr>
<td>adminpages</td><td>Pages administration</td><td>JohnDoe</td><td><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage/actionacls&action=adminpages">edit</a></td>
<td>adminusers</td><td>Users administration</td><td>*</td><td><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage/actionacls&action=adminusers">edit</a></td>
<td>backlinks</td><td>Backlinks</td><td>*</td><td><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage/actionacls&action=backlinks">edit</a></td>
<td>calendar</td><td>Calendar</td><td>*</td><td><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage/actionacls&action=calendar">edit</a></td>
<td>category</td><td>Category</td><td>*</td><td><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage/actionacls&action=category">edit</a></td>
<td>checkversion</td><td>Version checker</td><td>*</td><td><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage/actionacls&action=checkversion">edit</a></td>
<td>color</td><td>Text color</td><td>*</td><td><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage/actionacls&action=color">edit</a></td>
<td>contact</td><td>Administrator email address</td><td>*</td><td><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage/actionacls&action=contact">edit</a></td>
<td>countcomments</td><td>Count comments</td><td>*</td><td><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage/actionacls&action=countcomments">edit</a></td>
<td>countowned</td><td>Count owned</td><td>*</td><td><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage/actionacls&action=countowned">edit</a></td>
<td>countpages</td><td>Count pages</td><td>*</td><td><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage/actionacls&action=countpages">edit</a></td>
<td>countusers</td><td>Count users</td><td>*</td><td><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage/actionacls&action=countusers">edit</a></td>
<td>emailpassword</td><td>Lost password form</td><td>*</td><td><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage/actionacls&action=emailpassword">edit</a></td>
<td>image</td><td>Image</td><td>*</td><td><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage/actionacls&action=image">edit</a></td>
<td>usersettings</td><td>My user settings</td><td>*</td><td><a href="http://127.0.0.1/wikkaprojet/wikka.php?wakka=AdminPage/actionacls&action=usersettings">edit</a></td>
===Actions ACLs===
The main idea of ACLs is to allow the admin to disable non-safe actions like "files" or "iframe", or allow only some users to use them.
For basic actions, these ACLs are really useless (eg: "color", "image", "table"...)
Ideas :
- ACLs could be used to replace the hardcoded "if ($this->IsAdmin($this->GetUser()))" in some actions
Problems :
- "wikka_actions" and "wikka_action_params" tables are not always up-to-date (only updated when the AdminActions action is called)
- the ACLs are currently ignored by the core (and can't be added due to the 1st problem)
Deletions:
'mandatory' => 1
'default' => 1
'default' => 1
mandatory=1
default=1
default=1
<mandatory>1</mandatory>
<default>1</default>
<default>1</default>
`id` int(10) unsigned NOT NULL auto_increment,
PRIMARY KEY (`id`),
UNIQUE KEY `tag` (`tag`),
KEY `category` (`category`)
`id` int(10) unsigned NOT NULL auto_increment,
`is_default` tinyint(1) NOT NULL,
`is_mandatory` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
KEY `name` (`name`),
KEY `action_tag` (`action_tag`)
"is_default" and "is_mandatory" could be stored in the same field (0=none, 1=default, 2=mandatory)
===When metadata cache is updated===
""<table id="adminactions" summary="List of possible actions" border="1px" class="data">
<th><a href="#" title="Sort by action tag">Action Tag</a></th>
<th><a href="#" title="Sort by action title">Action Title</a></th>
<th><a href="#" title="Sort by ACLS">ACLS</a></th>
<td>adminpages</td><td>Pages administration</td><td>* <a href="#">edit</a></td>
<td>adminusers</td><td>Users administration</td><td>* <a href="#">edit</a></td>
<td>backlinks</td><td>Backlinks</td><td>* <a href="#">edit</a></td>
<td>calendar</td><td>Calendar</td><td>* <a href="#">edit</a></td>
<td>checkversion</td><td>Version checker</td><td>* <a href="#">edit</a></td>
<td>color</td><td>Text color</td><td>* <a href="#">edit</a></td>
<td>contact</td><td>Administrator email address</td><td>* <a href="#">edit</a></td>
<td>countpages</td><td>Count pages</td><td>* <a href="#">edit</a></td>
<td>countusers</td><td>Count users</td><td>* <a href="#">edit</a></td>
<td>emailpassword</td><td>Lost password form</td><td>* <a href="#">edit</a></td>
<td>image</td><td>Image</td><td>* <a href="#">edit</a></td>
<td>usersettings</td><td>My user settings</td><td>* <a href="#">edit</a></td>
<td>countcomments</td><td>Count comments</td><td>* <a href="#">edit</a></td>
<td>countowned</td><td>Count owned</td><td>* <a href="#">edit</a></td>
<td>category</td><td>Category</td><td>* <a href="#">edit</a></td>


Revision [19873]

Edited on 2008-04-19 11:27:47 by OlivierBorowski [Replaces old-style internal links with new pipe-split links.]
Additions:
+ fastest
- may introduce some errors (especially with comma or parentheses)
+ easiest to read and write
- no hierarchical structure (action and parameters data are mixed together)
- give headaches to read or write
- slow to parse


Revision [19872]

Edited on 2008-04-19 07:54:52 by OlivierBorowski [Replaces old-style internal links with new pipe-split links.]
Additions:
===Where metadata are stored===
===Caching metadata===
Solution : add to the database two tables : "wikka_actions" and "wikka_action_params"
%%(sql)
CREATE TABLE `wikka_actions` (
`id` int(10) unsigned NOT NULL auto_increment,
`tag` varchar(75) NOT NULL,
`title` varchar(75) NOT NULL,
`summary` varchar(200) NOT NULL,
`usage_infos` varchar(400) NOT NULL,
`category` varchar(75) NOT NULL,
`acl` text NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `tag` (`tag`),
KEY `category` (`category`)
) ENGINE=MyISAM;%%
%%(sql)
CREATE TABLE `wikka_action_params` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(75) NOT NULL,
`description` varchar(400) NOT NULL,
`default_value` varchar(75) NOT NULL,
`is_default` tinyint(1) NOT NULL,
`is_mandatory` tinyint(1) NOT NULL,
`action_tag` varchar(75) NOT NULL,
PRIMARY KEY (`id`),
KEY `name` (`name`),
KEY `action_tag` (`action_tag`)
) ENGINE=MyISAM;%%
"is_default" and "is_mandatory" could be stored in the same field (0=none, 1=default, 2=mandatory)
===When metadata cache is updated===
These databases are currently updated each time AdminAction is called (an "update action list" link may be a better solution)
===User interface===
The UI is based on UserAdmin and [[PageAdminAction PageAdmin]] style.
""<table id="adminactions" summary="List of possible actions" border="1px" class="data">
<thead>
<tr>
<th><a href="#" title="Sort by action tag">Action Tag</a></th>
<th><a href="#" title="Sort by action title">Action Title</a></th>
<th><a href="#" title="Sort by ACLS">ACLS</a></th>
</tr>
</thead>
<tbody>
<tr>
<td>adminpages</td><td>Pages administration</td><td>* <a href="#">edit</a></td>
</tr><tr class="alt">
<td>adminusers</td><td>Users administration</td><td>* <a href="#">edit</a></td>
</tr><tr>
<td>backlinks</td><td>Backlinks</td><td>* <a href="#">edit</a></td>
</tr><tr class="alt">
<td>calendar</td><td>Calendar</td><td>* <a href="#">edit</a></td>
</tr><tr>
<td>checkversion</td><td>Version checker</td><td>* <a href="#">edit</a></td>
</tr><tr class="alt">
<td>color</td><td>Text color</td><td>* <a href="#">edit</a></td>
</tr><tr>
<td>contact</td><td>Administrator email address</td><td>* <a href="#">edit</a></td>
</tr><tr class="alt">
<td>countpages</td><td>Count pages</td><td>* <a href="#">edit</a></td>
</tr><tr>
<td>countusers</td><td>Count users</td><td>* <a href="#">edit</a></td>
</tr><tr class="alt">
<td>emailpassword</td><td>Lost password form</td><td>* <a href="#">edit</a></td>
</tr><tr>
<td>image</td><td>Image</td><td>* <a href="#">edit</a></td>
</tr><tr class="alt">
<td>usersettings</td><td>My user settings</td><td>* <a href="#">edit</a></td>
</tr><tr>
<td>countcomments</td><td>Count comments</td><td>* <a href="#">edit</a></td>
</tr><tr class="alt">
<td>countowned</td><td>Count owned</td><td>* <a href="#">edit</a></td>
</tr><tr>
<td>category</td><td>Category</td><td>* <a href="#">edit</a></td>
</tr>
</tbody>
</table>""
Deletions:
===How metadata are updated===
===How metadata are stored===
We may add an "action" table to the database.


Revision [19770]

Edited on 2008-04-11 05:31:44 by OlivierBorowski [Replaces old-style internal links with new pipe-split links.]
Additions:
- header in action file
- separate data file (best method?)
Each action directory contains an additional file "actionname.inc.php".
__Data formats :__
1) PHP array (best method?)
%%(php)
<?php
$action_infos = array(
'category' => 'hidden',
'tag' => 'image',
'title' => 'Image',
'summary' => 'Display an image.',
'usage' => '',
'params' => array(
'url' => array(
'default_value' => 'url',
'description' => 'Image URL. Can be relative (images/img.png) or external (http://example.com/example.jpg)',
'mandatory' => 1
),
'title' => array(
'default_value' => 'text',
'description' => 'Image title',
'default' => 1
),
'alt' => array(
'default_value' => 'text',
'description' => 'Alternate text when image can\'t be displayed',
'default' => 1
),
'class' => array(
'default_value' => 'className',
'description' => 'Class name (defined in the CSS file)'
),
'link' => array(
'default_value' => 'url',
'description' => 'Add a link to the image'
)
)
);
?>
%%
2) INI-file
%%(ini)
[action]
category=hidden
tag=image
title=Image
summary=Display an image.
usage=
[url]
default_value=url
description=Image URL. Can be relative (images/img.png) or external (http://example.com/example.jpg)
mandatory=1
[title]
default_value=text
description=Image title
default=1
[alt]
default_value=text
description=Alternate text when image can't be displayed
default=1
[class]
default_value=className
description=Class name (defined in the CSS file)
[link]
default_value=url
description=Image title
%%
3) XML
%%(xml)
<action>
<category>hidden</category>
<tag>image</tag>
<title>Image</title>
<summary>Display an image.</summary>
<usage></usage>
<params>
<url>
<default_value>url</default_value>
<description>Image URL. Can be relative (images/img.png) or external (http://example.com/example.jpg)</description>
<mandatory>1</mandatory>
</url>
<title>
<default_value>text</default_value>
<description>Image title</description>
<default>1</default>
</title>
<alt>
<default_value>text</default_value>
<description>Alternate text when image can't be displayed</description>
<default>1</default>
</alt>
<class>
<default_value>className</default_value>
<description>Class name (defined in the CSS file)</description>
</class>
<link>
<default_value>url</default_value>
<description>Image title</description>
</link>
</params>
</action>
%%


Revision [19659]

Edited on 2008-03-17 12:57:41 by OlivierBorowski [Replaces old-style internal links with new pipe-split links.]
Additions:
===Main goals of this module===
===Needed metadata===
~- action short name = tag name (eg : "files")
~- action name (eg : "File upload form")
~- action description (eg : "Display a form with file attachments to the current page.")
~- parameter 1 short name (eg : "download")
~- parameter 1 description (eg : "prints a link to the file specified in the string")
~- parameter 1 mandatory (or optional) (boolean)
===How metadata are updated===
For each action in "/action" directory, the header of the action file is read (eg : "/action/image/image.php")
Action file header contains all the required metadata, prefixed by a specific tag.
===How metadata are stored===
Parsing the "/action" directory on each request is too slow. Moreover, additional data like action ACLs can't be stored in the file itself.
We may add an "action" table to the database.
Deletions:
The main goals of this module are:


Revision [19636]

Edited on 2008-03-10 13:17:56 by DarTar [layout, category link]
Additions:
>>This is the development page for the action administration module.
The main goals of this module are:
~- allow finegrained access control on actions (preferably based on ACLs)
~- make the "intranet" directory obsolete
~- allow WikkaEdit to retrieve the list of installed actions and for each action its description, parameters...
----
CategoryDevelopment
Deletions:
This is the development page for the actions administration.
The main goals are :
- allow some actions to be disabled (preferably based on ACLs)
- make the "intranet" directory obsolete
- allow WikkaEdit to retrieve actions list and for each one its description, parameters...


Revision [19635]

The oldest known version of this page was created on 2008-03-10 12:19:43 by OlivierBorowski [layout, category link]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki