Thursday, February 22, 2007

Creating new article (code)

Now, that the project is ongoing, i need to make an alternative of generating contents through an article input box. I have to admit, some wiki codes are hard to understand because it has different parameter syntax. The wiki tags sometimes are annoying and patience should be applied in order to understand it and observe how it behaves in your sandbox. After 3 attempts, I finally made it work.


Here's the secret:

In order to make this work, the mediawiki accepts .php extensions inside the extensions folder. You need this in order to run your script.

heres the path:

C:\Program Files\Apache Group\Apache2\htdocs\yourwiki\extensions\inputbox.php


..then create a template inside a wiki page: how?

in the search textbox type:

Template:Add New Page


(this will tell (your wiki site) that you are making a template with "Add New Page" as the title of the template. Obviously it will tell you that the page does not exist, so click the "create this page").

in the editable text area (sandbox) copy the codes below:




then press preview and you will see the result instantly. If it is successful, save it.

Now, if you want to create new page and you would like to integrate your newly made template, just put the code below:


{{Add New Page}}


The {{ }} is the syntax that calls your template to execute inside the wiki page. Then once it is previewed, you will see your input box.

No comments: