Debian Codegraph @

doc/examples/dynamic_comments_in_slides/README

raw
1 How do I let people add comments to my slides dynamically?
2 ==========================================================
3
4 Some PHP code may be used to handle dynamic comments in slides.
5 The slide template in this directory should be used together with
6 llgal --php. It will generate PHP slides with comments stuff at the
7 bottom:
8 * slide_<x>.php displays the contents of comments_<x>.txt if it exists
9 * a form is available to add new comments in comments_<x>.txt
10 Look at the bottom of slidetemplate.html to see the relevant code.
11
12 The PHP script add_comments.php in this directory is executed when
13 the form Submit button is clicked. It will format the comment text,
14 add it to the corresponding comments_<x>.php, and go back to the
15 slide.
16
17 Of course, this is just a very simple example. It may be improved
18 a lot by adding other fields in the form (especially the name and
19 email of the author of the comment) and the date.
20 Right now, formatting is done when the comment is added. But some
21 people might want to keep comments_<x>.txt unformatted and have
22 slide_<x>.php format the text when displaying it.