[Pmwiki-users] Forms / KnowledgeBase

John Feezell JohnFeezell
Thu Jul 15 09:55:50 CDT 2004


I've uploaded a new version of FTS to the cookbook.  Please download
it so that you have the latest code.  Then do the following:

1.  Place the FTS-0.2.2.php file in your local directory.
2.  Add the following lines to bottom of your config.php
      file in the local directory.

$EnableXHTMLinFTS=1;
$TemplateDir = "wiki.d";
include_once("local/FTS-0.2.2.php"};

3.  Edit http://po.3wplace.com/wiki6/Forms/Design-CiaranKnowledgeBase
and copy its content to a page on your system and save your page.

4.  Use the "prepform" link in the page on your sustem.

5.  Start a new page on your system in the KnowledgeBase group.

If all goes as planned, you should get a form for data entry.

Let me know if this does not work.

If it does work, then you might want to do the following for
the KnowledgeBase/HomePage

Point your browser to
www.your.site/wherePmwiki/KnowledgeBase?template=none&auth=yes

This should give you an standard edit page for only the HomePage
that you can edit as you like.

/JF


On Thu, 15 Jul 2004 15:45:21 +0100, Ciaran <ciaranj at gmail.com> wrote:

> OK that looks like a great starting point,  my problem is setting up
> the default template I think,   at the minute in the local folder I
> have a knowledge.php file for the knowledge group that contains the
> following :
>
> <?php
>     $FormTemplatePage = '$Group.Template';
>     if ($action=="edit") {
>       $formpage = ReadPage(FmtPageName($FormTemplatePage,$pagename));
>       $DefaultPageTextFmt = $formpage['text'];
>     }
>     include_once("local/FTS-0.2.1.php");
> ?>
>
> And Knowledge/Template contains a form definition page, but when I
> edit any new pages, nothing seems to happen, I suspect its in the
> definition fields where I've gone wrong,
>
> My 'Template page' at the start contains :
> <--------------------------------------------
> /* This page is used to design a form for a Pm Wiki page. Comments,
> such as this one, may enclose multiple lines or be placed at the last
> of a line. A page like this one, when used in conjunction with the
> Form Template System will define and attach a form to a PmWiki page.
> */
>
> ThisPage:?action=prepform <= click to prepare form
>
> First, associate a "name" with the field type "template".
> And then, attach the new template called "name" to "Group.PageName" */
> /* EDIT "TemplateNameYouChoose" IN THE NEXT LINE */
>
>     * Define "Knowledge Base Template?" as "template"
>     * Show "fields"
>
> /* EDIT "TemplateNameYouChoose AND "SampleForm" IN THE NEXT LINE */
>
>     * Attach "Knowledge Base Template?" to "Forms.Sample Form"
>
> ------------------------------------------------- >
>
> Is this correct?
>
>
> Also I have to include the FTS in the knowledge.php or else if I
> include it in local/config.php my wiki hangs on the front page :( Is
> this normal behaviour ?
>
> Thank you very much for you help !
>  -Ciaran
>
>
> On Thu, 15 Jul 2004 09:12:33 -0500, John Feezell
> <johnfeezell at 3wplace.com> wrote:
>>
>>
>> On Thu, 15 Jul 2004 07:25:06 +0100, Ciaran <ciaranj at gmail.com> wrote:
>>
>> > Hi, I'd like to write some sort of simple KnowledgeBase as part of my
>> > PMWiki.   I'd hoped that I could use the FormTemplateSystem to do
>> > this, but seem to have some problems with it, For starters if I put
>> > the main .php in local/config the wiki home page just timesouts but if
>> > I put it in a group specific config its fine and secondly it just
>> > doesn't seem to do what I expected.  Is it possible to use it provide
>> > a default form for users to input information into for a Group of
>> > pages ?
>> >
>> > I.e. whenever a page is created in my 'Knowledge' Group I'd like the
>> > user to be shown a form that asks roughly :
>> >   What is the problem ? [                            ]
>> >   What is the solution? [                             ]
>> >   What OS is this for ?   Windows/Linux/Other
>> >
>>
>> Hi Ciaran,
>>
>> Sorry you're having trouble with the FTS.  It does have a bit of
>> a learning curve. I'll see if I can help you.
>>
>> First, I've created a form guide that you can check out at this URL:
>> http://po.3wplace.com/wiki6/Forms/Design-CiaranKnowledgeBase
>>
>> This form guide is the way to define a form.
>>
>> Second, this form guide is set as the default form for the group
>> KnowledgeBase (you can access it via the menu).  Any new page
>> for this group will use the form guide defined in the page
>> at the above URL.  So if you make changes in that page, click
>> prepform, and then access an old page in KnowledgeBase group or
>> create a new form in that group and the updated form guide will be
>> applied.
>>
>> Please feel free to experiment with the setup and let me know if you
>> have questions.  When you have it the way you want it, I'll work with
>> you to get it working on your setup.
>>
>> Because the FTS includes a number of options, there is somewhat of
>> a learning curve with it.  But, once you understand the system you
>> can create and modify forms quickly. I haven't created a form in  
>> sometime
>> but it only required about 15 minutes to set this one up.
>>
>> BTW, if you want to be the only person who can change the form, then
>> you simply password protect the page that defines the form guide.
>>
>> Also, please understand that the FTS is still being changed and  
>> developed
>> and should probably be consider experimental.
>>
>> /JF
>>
>>
>
>



--



More information about the pmwiki-users mailing list