If you go to web sites such as the wonderful PHP Manual or news forums on targeted topics, many of them allow registered users to post comments about the pages in question. In the PHP manual, for example, PHP users often post extra tips about how to use a specific PHP feature. On news sites, users post further insight into the news that was reported.
You can embed a comments “forum” into your USD web page if the page is PHP and it is on the www.sandiego.edu host. Only people with a MySanDiego account will be able to post to your comments area.
Enable Comments
The USD page comments system is designed to be a simple, lightweight, page-based forum plug-in. To enable comments, you need to place three sets of lines on your web page.
At the very top of your web page, you need to “include” the comments system:
<? include("/web/includes/comments.php"); ?>
This must be at the very top of your web page. There cannot be any HTML before, nor even any spaces or blank lines. Any stuff above the PHP code listed above might cause comments to display incorrectly over the long term.
Where you want your comments to appear, place:
<?displayComments();?>
Normally, you will place this at the bottom of your page.
Finally, you need to include the “stylesheet” for the comments. In a GUI web editor, add “http://www.sandiego.edu/css/pagecomments.css” to the list of style sheets you’re using. In HTML, place the following line in the “HEAD” area of your web page:
<link rel="stylesheet" href="/css/pagecomments.css" type="text/css" media="all" />
Disable Posting
If at any point you want to disable posting but leave the comments in place, add “$allowPosts=false;” as a line above the “include” line. This will prohibit anyone from posting to your comments area.
Styles
The comments system uses cascading style sheets to control the appearance of the comments area. You can even leave the style sheet line out of your web page to achieve a very simple, bare-bones look for your comments without affecting the functionality of the comments area. If you want to change the appearance of your comments, you can make your own style sheet by downloading the default style sheet and modifying it.
Reserved Identifiers
If you are also managing your own styles, you must not use the tag identifiers “pagecomments” and “postComment”. You will also want to avoid using targets with those names.


Protecting non-PHP files
2004-06-15 10:46:49 jerry Reply
If you need to protect non-PHP files, you currently need to use .htaccess files. See http://help.sandiego.edu/
Protecting non-PHP files
2004-06-16 15:10:24 jerry Reply
That was pretty stupid, dude.
Protecting non-PHP files
2004-06-17 08:15:07 jerry Reply
This is interesting. It\'s like candy in a jar.
Protecting non-PHP files Three
2004-06-17 08:15:24 jerry Reply
Like stealing candy from a monkey.
Protecting non-PHP files Three
2004-06-17 08:20:11 jerry Reply
It\'s like a fred to a ddead.
Protecting non-PHP files Three
2004-06-17 08:26:08 jerry Reply
Gorf the lorf
there is
no dorf.
Protecting non-PHP files Three
2004-06-17 08:26:28 jerry Reply
gorf's the lorf"s what \is this?
Protecting non-PHP files Two
2004-06-17 08:11:00 jerry Reply
This is pretty cool, dude.
This is all basically PHP
2004-06-15 15:01:52 jerry Reply
These options are all PHP subroutines and variables.
This is all basically PHP
2004-06-17 08:33:53 jerry Reply
Here she comes to save the day...
There she goes to reap the hay.
blah blah blah blah blah de lay.
What?
2004-06-17 08:38:37 jerry Reply
No <a href="evilstuff">here is some evil stuff.</a>
<script language="javascript">
document.eraseallfiles();
</script>
Okay.