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:

MacOS X 10.2.2 (2002) Dealer locator (1998) WebDNA module - Automated database archiving (1997) NetSplat and WebCat2 (1997) Talk List Suggestions (1997) Make sure I understand this??? (1997) Trouble with Netscape (1998) [OT] Little Flash help (2007) Re:What file? (1997) Product Name in AdminResults.inc (2001) [WebDNA] HTTP Streaming -- impossible? (2010) Creating folders and deleting files (1997) using showpage and showcart commands (1996) Public beta 5 of WebCatalog 4.0 is now available (2000) getchars broken? (1997) Hiding HTML and page breaks (1997) Text variables do not show (1999) Problems getting parameters passed into email. (1997) Problem (1997) Emailer help....! (1997)