Tags:
create new tag
view all tags

Question

I'd like to create a sophisticated book review site. There are several major elements:

  • Books. A web form controls editing.
  • Reviews. Reviews should be editable by the author, and need to be assocated with a book.
  • Books and reviews. A way of looking at both the book info and the review info on one page. This is a derived page that can't be edited, so if you click on "edit", you should go to a page that offers you a list of elements (1 book, 0 or more reviews) that you could edit.
  • A topic tree. A set of derived pages that take forms info and use it to create webpages. (An example is at http://www.pbm.com/~lindahl/pbm_list/, but the details of what I want to create aren't very important, just that it's a big set of uneditable pages.)

It looks to me that a TWikiForm is good enough for the book, although I'm a bit concerned that diffs of something composed entirely of TWikiForm data might not be intelligible enough yet (I haven't looked.)

What I don't know how to do is how to create the review associated with a book. I suppose a simple script can then create the derived page which is a book with 0 or more reviews.

Comments? Suggestions?

-- GregLindahl - 25 Nov 2001

Answer

The TWikiForms should be suitable to give a structure to the book entries.

For reviews you could do something similar to Sandbox.ItemToDo where you have one topic per review and an embedded search showing all reviews inline.

You could offer a simple [ Add review ] button to the book topic and hide the topic name for new reviews by automatically generating a random topic name (based on topic name of the book and timestamp), i.e. have a hidden field for the review topic name. Example:

<form name="new" action="%.SCRIPTURLPATH%/edit%.SCRIPTSUFFIX%/%.WEB%/">
<input type="hidden" name="topic" value="%.TOPIC%%.GMTIME{"$year$mo$day$hours$minutes$seconds"}%" />
<input type="hidden" name="templatetopic" value="NewReviewTemplate" />
<input type="hidden" name="topicparent" value="%.TOPIC%" />
<input type="submit" value=" Add review "/ >
</form>

(for the variables, remove the dot after the percent sign)

The %SEARCH{...}% displaying all notes could look something like this:

| *Review:* | *Who:* |
%SEARCH{"HowToDoBookReviews20[0-9][0-9]" scope="topic" regex="on" nosearch="on" casesensitive="on" format="| $summary {[[$topic][view]]} | $wikiusername |"}%

This just shows the summary, but you could use a pattern="..." regular expression to extract all (or parts) of the review topic.

Topic tree: You could use topic names that simulate the tree, i.e. Root_BranchA_SubBranchX. The underscore is the separator. Those topic names can still be linked with the double bracked rule. Creating a new node could be based on a form embedded in a tree node where you can create a new topic. The form asks for the new topic name like <input type="text" size="60" name="topic" value="%TOPIC%_" /> so that the user can add the name of the node to the topic.

See also TWiki.FormattedSearch, TWiki.TWikiForms, TWiki.TWikiTemplates

-- PeterThoeny - 25 Nov 2001

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2001-11-26 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.