[pmwiki-users] PMWIKI WEBSITE MEMBER MANAGEMENT PROBLEMS

The Editor editor at fast.st
Tue Jul 31 09:54:35 CDT 2007


On 7/31/07, JOE MWANGI <joemwangii at yahoo.com> wrote:
> WEBSITEHallo!My names are Joe Irungu.I am a 22 year old Kenyan citizen who
> has developed a wiki based website using Pmwiki package.
>
> Unfortunately,my member management system is manual.I have created a html
> form which new users who want to register can fill.This form links to  a php
> form  that pasts data to a MySQL database.I then open the Site.AuthUser page
> where I manually insert the  username and password.
>
> As you can see,this manual member management system is not efficient.This is
> why I turned to the use of  ZAP but I have encountered problems.Lets go
> through what I have done step by step.
>
> 1)    I download zap into my cookbook from the PmWiki website and enabled it
> in a local config file by adding this line:
> include_once("$FarmD/cookbook/zap.php");
> 2) To verify that I  had ZAP properly installed on your system, copy this
> snippet to a new page that I created in my wiki and clicked the button.
> (:zapform key=check:)(:zapget:)
> (:zap Install="Installation Successful" check:)
> (:zap passdata="Install" check:)
> (:input submit value="Test Install":) {$Install}
> (:zapend:)
>
> The "Installation Successful" text appeared.
>
> 3)I then created a new page called Register and entered the text below in
> this page so as to create a Registration form.
>
> [[#ID]]
> (:messages:)
> (:zapform:)
> ||Member Name:%red%*%% ||(:input text Member:)
> ||Password:%red%*%% ||(:input password Password:)
> ||Real Name: ||(:input text RealName:)
> ||Email: ||(:input text Email:)
> ||Country: ||(:input text Country:)
> ||Gender: ||(:input select Gender Male:) (:input select Gender Female:)
> || ||(:input submit value="Create Account":)
> (:zap register="Email,Password,RealName,Country,Gender":)
> (:zap login="auto":)
> (:zapend:)
> [[#ID]]
> I then saved the form,entered data and clicked the create account button.A
> message "Form Submitted" appeared.
>
>
> In an effort to view data on the page I tried to edit the form above by
> adding the following
>
> Field 1: {$:Member}
> Field 2: {$:Password}
> Field 3: {$:RealName}
> Field 4: {$:Email}
> Field 5: {$:Country}
> Field 6: {$:Gender}
>
> Thus the entire Registration page looked as below.
>
> [[#ID]]
> (:messages:)
> (:zapform:)
> ||Member Name:%red%*%% ||(:input text Member:)
> ||Password:%red%*%% ||(:input password Password:)
> ||Real Name: ||(:input text RealName:)
> ||Email: ||(:input text Email:)
> ||Country: ||(:input text Country:)
> ||Gender: ||(:input select Gender Male:) (:input select Gender Female:)
> || ||(:input submit value="Create Account":)
> (:zap register="Email,Password,RealName,Country,Gender":)
> (:zap login="auto":)
> (:zapend:)
> [[#ID]]
>  Field 1: {$:Member}
> Field 2: {$:Password}
> Field 3: {$:RealName}
> Field 4: {$:Email}
> Field 5: {$:Country}
> Field 6: {$:Gender}

The reason the data values don't show up is that they are stored in
the profile page for each individual. The PTV's you put here are
looking for a data value on the same page, and it doesn't exist.



> I then saved it and entered data.The data I put was not shown on the page.
>
> I tried editing the page as follows(I prefer having the page as below with
> test Member,Real Name etc instead of Field 1  Field 2 etc.
> [[#ID]]
> (:messages:)
> (:zapform:)
> ||Member Name:%red%*%% ||(:input text Member:)
> ||Password:%red%*%% ||(:input password Password:)
> ||Real Name: ||(:input text RealName:)
> ||Email: ||(:input text Email:)
> ||Country: ||(:input text Country:)
> ||Gender: ||(:input select Gender Male:) (:input select Gender Female:)
> || ||(:input submit value="Create Account":)
> (:zap
> register="Member,Password,RealName,Email,Country,Gender":)
> (:zap login="auto":)
> (:zapend:)
> [[#ID]]
>
>
> Member: {$:Member}
> Password: {$:Password}
> RealName: {$:RealName}
> Email: {$:Email}
> Country: {$:Country}
> Gender: {$:Gender}
>
>
> The following error resulted
>
> Fatal error: Maximum execution time of 30 seconds exceeded in
> c:\wamp\www\pmwiki5\pmwiki.php on line 719

The error here is because this throws PmWiki into an infinite loop.
You can't write it this way unless the PTV's are defined in the
page... It's a known problem in PmWiki.


> How can I solve this problem?
>
> 4) I then Created a page in my wiki called Site.ZAPConfig and copied the
> following text to the same page and saved it.
>  ZAP Version ZAP: {$ZAPversion}
>  ZAPtoolbox: {$ZAPtoolboxversion}
>
> ZAP Groups
>  Login: Profiles
>  Profiles: Profiles
>  EmailList: Profiles
>  NewsList:
 NewsList
>  NewsQueue: NewsQueue
>
> Several links were created i.e ZAPToolbox, EmailList, NewsList, NewsQueue.I
> placed all the text in ZAPToolbox.php in the ZAPToolbox page that was
> created after I clicked the ZAPToolbox link.

I don't know what you mean by this. Just entering this text in the
page should not produce any links Nor should you need to put any text
in the toolbox file. You actually don't even need this page unless you
want to change the default settings--not recommended.


> 5)I also tried to create a user Login system by creating a login page and
> putting in the text below.
>
> [[#ID]]
> (:messages:)
> (:zapform:)
> (:zap login="":)
> ||Member Name: ||(:input text Member:)
> ||Password: ||(:input password Password:) (:input submit value="Login!":)
> (:zapend:)
> [[#ID]]
>
> When I tried to login with the Member and password that I inserted in the
> Register form that is explained above,nothing happens.What is the problem
> with it and how do I solve it?

If you copied the text properly it should work, This assumes you have
the ZAPtoolbox enabled in your site as well as ZAP. ZAP by itself
cannot do member management. Are both PHP scripts enabled in your
config file? Are both in your cookbook directory?


> In general I would like solutions to the above and a user management system
> as below.
>
> 1)A new user registers using the Register form.After,he clicks on create
> account button.This prompts system to search if the username and password
> has already been used by another user.If this is so,the user receives a
> message that username and /or password already taken.If the username and
> password are not taken,the user gets message that the form is submitted and
> the data values he has entered are shown on the page.An e-mail with a
> default text that I would write is sent to the user's e-mail address
> welcoming him as a member and showing his username and password.

ZAP can do all of this but you will have to learn the syntax a bit.
Try starting with some of the simpler snippets until you understand
how it works.


> 2)Immediately,after the user registers his account,he should be able to log
> in into the website.By,logging in the user should be able to edit existing
> pages and create new pages.He should also be able to log out.

He should be logged in OK, but you will then have to give him
permissions using PmWiki's permissions system which you will need to
understand. You may also need to understand how groups work, if you
are assigning different permissions to different individuals.

> 3)I also need a way of viewing the user records created and the ability to
> delete a user record.

Once you understand better how ZAP works you can create these kinds of
forms easily. I believe there may even be a profiles snippet you can
study.

Unfortunately I'm limited in the amount of support I can continue
giving to ZAP as I'm using a different wiki engine at the moment, than
handles some of these things more easily.

Cheers,
Dan



More information about the pmwiki-users mailing list