Revision history for UpdateCategoryActionInfo


Revision [19248]

Last edited on 2008-01-28 00:14:44 by MasinAlDujaili [Modified links pointing to docs server]

No Differences

Revision [17053]

Edited on 2007-06-06 12:52:14 by MasinAlDujaili [completed]
Additions:
~&As there won't be any page, where original and new syntax is used at the same time, this doesn't really matter. I only check, if the new syntax is used and convert only if this is not the case. **Done** --MasinAlDujaili, 2007-06-06, 18:50
~&It wasn't, it was preg_match_all and preg_replace. **Done** --MasinAlDujaili, 2007-06-06, 18:50
~&There is: ##SavePage($tag,$body$note)## -- works great. **Done** --MasinAlDujaili, 2007-06-06, 18:50
Deletions:
~&As there won't be any page, where original and new syntax is used at the same time, this doesn't really matter. I only check, if the new syntax is used and convert only if this is not the case. **Done**
~&It wasn't, it was preg_match_all and preg_replace. **Done**
~-There is: ##SavePage($tag,$body$note)## -- works great. **Done**


Revision [17052]

Edited on 2007-06-06 12:51:07 by MasinAlDujaili [completed]
Additions:
~&As there won't be any page, where original and new syntax is used at the same time, this doesn't really matter. I only check, if the new syntax is used and convert only if this is not the case. **Done**
~&It wasn't, it was preg_match_all and preg_replace. **Done**
~-There is: ##SavePage($tag,$body$note)## -- works great. **Done**
**Because of some unknown limitations, the action might time out. On my installation it did about 40 to 60 pages per run, so I had to run it about ten times to get all my pages converted -- I am thankful that not all pages were categorized, because any one run of this action took about 5 minutes.**


Revision [16646]

Edited on 2007-05-29 04:05:40 by MasinAlDujaili [first steps]
Additions:
=====Category Update Action Documentation=====
//Not included in Wikka//
Development: UpdateCategoryAction.>>This is the documentation page for the category update action.::c::
====Documentation====
===Short description===
This action is for converting categorizations to the scheme used in PageAndCategoryDivisioninACategory
===Parameters===
This action takes no parameters
===Long description===
Wikka has a very flexible category system -- with one major drawback: You cannot link to a category without putting the linking page into this category. Besides some other issues, PageAndCategoryDivisioninACategory solves this problem by an explicit categorization of pages using the linking pattern ##""[[(cat)NameOfCategoryPage]]""##. Just typing ##""NameOfCategoryPage""## just links to this page.
The problem now is that any Wikka already in use for some time might have a more or less complete categorization of all pages -- so how do we get this new category system? Search and replace is the answer.
The great thing about it is: I need SQL queries and regular expressions -- two topics of programming I never had any chance to develop some skills, so this might be buggy after all.
==Step 1: Acquire list of categories==
First, we need a list of all categories. This is because we need to know which links to convert. Currently, we know every link to a category is a categorization. **Done**
==Step 2: Process each page==
Second, we need to acquire a list of all pages. Every page will be loaded single (""LoadSingle"") and processed by its own to keep memory usage low. **Done**
==Step 3: Ensuring not to convert new syntax to newnew syntax==
After extending Wikka with PageAndCategoryDivisioninACategory, there might already be some new categorizations. These have to be preserved. I think, the code for this step might be dropped as soon as the action works fully and is linked by PageAndCategoryDivisioninACategory so that anyone extending an existing Wikka with it immediately uses this action. **This might be better as part of step 4. Or I need a regex which does exclude any links like ##""[[(cat)...""##**
==Step 4: Conversion from original syntax to new syntax==
I guess, preg_replace_callback will be my friend.
==Step 5: Storing page==
I hope, there's a function to simply store any page.
==Usage==
%%{{updatecategory}}%%
===Author===
MasinAlDujaili
::c::----
CategoryUsercontributions
Deletions:
[[WikkaDocumentation Wikka Documentation]]
----
=====xxxxx Action Documentation=====
//Included in Wikka since version X.X.X.X//
Development: xxxxxAction.>>This is the documentation page for the xxxxx action.::c::
//This page is a **template**. It belongs to CategoryTemplate (which contains more handy templates). To create an **action documentation** page, [[http://wikka.jsnx.com/ActionInfoTemplate/clone clone this page]] to a page called **xxxxxActionInfo** (where xxxxx is the (capitalized) name of the action), replace all occurrences of 'xxxxx' with the name of the action and replace this paragraph with the actual content.//
__Note__: Please **remove** the "Wikka Documentation" link at the top, the CategoryDocumentation at the bottom and the "included in Wikka" note unless and until the action is part of the official Wikka distribution!
===Documentation===
==Short description==
Describe your action in one sentence.
==Parameters==
""<table cellspacing="0" cellpadding="2" border="1">
<thead>
<tr><th scope="col">name</th><th scope="col">type</th><th scope="col">required?</th><th scope="col">default</th><th scope="col">description</th></tr>
</thead>
<tbody>
<tr><td>param1</td><td>string</td><td>optional</td><td>your_default</td><td>This is one of the params, your action uses. If yuopr action uses no params, remove this table</td></tr>
</tbody>
</table>""
==Long description==
//Place for a longer description.//
Usage:
%%{{action_name [optional_param="xxx"]}}%%
Example:
you can put in an example here.
==Author==
The name(s) of the person(s) who wrote this action.
----
CategoryDocumentation


Revision [16643]

The oldest known version of this page was created on 2007-05-29 03:01:18 by MasinAlDujaili [first steps]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki