Re: WebCatalog for guestbook ?

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10302
interpreted = N
texte = >> Has anyone used it for GuestBooks ? >> >>The permissions would have to be set pretty carefully, but given the ease >>with which web-based additions can be made, it would seem to be a natural >>to use WebCatalog for guest books if it is already being used for other >>catalogs anyway. > >While we're at it how about adapting webcatalog to do online polls - it's >pretty easy to see how one could set it up to accept the data but how about >turning it around and computing the results?This is tremendously easy and it takes only two templates! Here's the basic concept:Start with template #1 - the 'append' template. This is where you let your users vote. When they make their choices and click the 'Submit' button, this form appends the data to the 'votes.db'. For simplicity, let's say you give your voters a simple ballot with only two possible responses: Yes or No.When the user makes his/her choice and clicks the Submit button, WebCatalog 2.0 appends a new record to the votes.db database file which includes the 'choice made by that voter - either 'Yes' or 'No'. Now here's the fun part ...In template #2 - the 'results' template - you put two different [search] contexts. Make the first [search] retrieve all the records with a 'yes' vote in the 'votes.db', and put a [numfound] inside this search context like this: Number of 'Yes' votes = [numfound]Now, do the same thing with the other [search] context, but make this one retrieve all the records with a 'No' vote, and label this one: Number of 'No' votes = [numfound]. That's all there is to it!This example is very basic, of course, because it shows how to do it with just two choices. But you can expand this technique simply by adding another [search] context for every new choice you give your voters.If you have five different choices on your 'append' template, you put five different searches on your 'results' template ... :)Sincerely, Ken Associated Messages, from the most recent to the oldest:

    
  1. Re: WebCatalog for guestbook ? (Grant Hulbert 1997)
  2. Re: WebCatalog for guestbook ? (Grant Hulbert 1997)
  3. Re: WebCatalog for guestbook ? (Kenneth Grome 1997)
  4. Re: WebCatalog for guestbook ? (Rob Schmidt 1997)
  5. WebCatalog for guestbook ? (Sven U. Grenander 1997)
>> Has anyone used it for GuestBooks ? >> >>The permissions would have to be set pretty carefully, but given the ease >>with which web-based additions can be made, it would seem to be a natural >>to use WebCatalog for guest books if it is already being used for other >>catalogs anyway. > >While we're at it how about adapting webcatalog to do online polls - it's >pretty easy to see how one could set it up to accept the data but how about >turning it around and computing the results?This is tremendously easy and it takes only two templates! Here's the basic concept:Start with template #1 - the 'append' template. This is where you let your users vote. When they make their choices and click the 'Submit' button, this form appends the data to the 'votes.db'. For simplicity, let's say you give your voters a simple ballot with only two possible responses: Yes or No.When the user makes his/her choice and clicks the Submit button, WebCatalog 2.0 appends a new record to the votes.db database file which includes the 'choice made by that voter - either 'Yes' or 'No'. Now here's the fun part ...In template #2 - the 'results' template - you put two different [search] contexts. Make the first [search] retrieve all the records with a 'yes' vote in the 'votes.db', and put a [numfound] inside this search context like this: Number of 'Yes' votes = [numfound]Now, do the same thing with the other [search] context, but make this one retrieve all the records with a 'No' vote, and label this one: Number of 'No' votes = [numfound]. That's all there is to it!This example is very basic, of course, because it shows how to do it with just two choices. But you can expand this technique simply by adding another [search] context for every new choice you give your voters.If you have five different choices on your 'append' template, you put five different searches on your 'results' template ... :)Sincerely, Ken Kenneth Grome

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

[WriteFile] problems (1997) Authenticate (1997) [WebDNA] Terminate all threads (2010) Forcing price recalculation in shopping cart (1998) Setting up shop (1997) Date Formats (1997) [OT] test (2002) trigger firing at restart (2003) RE: is sku a REQUIRED field on NT (1997) Subject: Authenticating users without dialog box (1997) [WebDNA] Pretty URLS (2011) Webcat causing crashes left and right! (1997) Duplicate Cart Problem in Netscape (2000) Shared conversion under WebTen (1998) Up and running ... at last !! (1997) shell question (2004) Great product and great job ! (1997) Summing fields (1997) Grep all content between twp p tags (2006) multi-paragraph fields (1997)