01.12.2012 Views

7 Components: the Function Pages - Developers

7 Components: the Function Pages - Developers

7 Components: the Function Pages - Developers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

20.2.2<br />

The RegistrationWeb<br />

Since it is not possible to generate a normal form with data integration<br />

using PHP/MySQL, we will now “misuse” <strong>the</strong> user registration<br />

form normally located in <strong>the</strong> Main web and <strong>the</strong> registration mechanism<br />

upon which it is based for our own purposes:<br />

� First of all, we will generate a new web (“RegistrationWeb”)<br />

that is to contain <strong>the</strong> registration form and <strong>the</strong> topics of <strong>the</strong> visitors<br />

and new users. The form should be excluded from searches<br />

using <strong>the</strong> “Exclude from search all” option, so no one can find<br />

out who is taking part in <strong>the</strong> conference.<br />

� Then, <strong>the</strong> regular user registration page is copied to <strong>the</strong> new web<br />

and adapted to fit <strong>the</strong> requirements of <strong>the</strong> conference. The user<br />

registers for <strong>the</strong> conference as well as for TWiki itself, meaning<br />

a user page will also be generated for him or her.<br />

� Next, it is important to make a few changes to secure <strong>the</strong> data in<br />

<strong>the</strong> user registration template and regulate navigation such that<br />

everyone can conveniently access his own data but not that of<br />

o<strong>the</strong>rs.<br />

� While a visitor is filling out <strong>the</strong> registration form for <strong>the</strong> conference,<br />

if he or she makes a mistake, <strong>the</strong> corresponding error messages<br />

should be displayed. Accordingly, if registration has been<br />

successful, a confirmation page should be presented. The templates<br />

for <strong>the</strong>se pages should also be able to be modified as desired.<br />

For example, if your site is bilingual or being presented in<br />

ano<strong>the</strong>r language, you would want a translation of that page to<br />

appear in <strong>the</strong> corresponding language.<br />

20.2.3<br />

Designing <strong>the</strong> Registration Form<br />

After you have generated <strong>the</strong> new web with <strong>the</strong> aid of <strong>the</strong> form on<br />

<strong>the</strong> TWiki.ManagingWebs page (see Chapter 15.1), transfer <strong>the</strong> user<br />

registration form TWikiUserRegistration (in <strong>the</strong> TWiki web) into our<br />

new web. To do so, copy <strong>the</strong> source text of <strong>the</strong> form to a new page.<br />

That gives us two registration options within TWiki: one is <strong>the</strong><br />

standard user registration in <strong>the</strong> Main web, which generates a page<br />

for <strong>the</strong> user and allows him or her to make modifications in <strong>the</strong><br />

20.2 Conference Registration<br />

Modifying <strong>the</strong><br />

registration<br />

mechanism<br />

Copy form<br />

�<br />

�<br />

�<br />

309

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!