User Notes
Deprecated feature
The NOTES system is a deprecated feature at Mozdev.org. Because of this some documentation here may be outdated or inaccurate. If you would like to maintain documentation and allow comments on the content please consider setting up a drupal wiki.
NOTES Intro
User Notes adds a forum-like feature to a page that allows people to post feedback and comments.
An example of a page with User Notes should be included in the templates for all new projects in the notes.html file.
| [0] Submitted by: Example Poster Saturday December 28th 2002 |
|
Example Post |
NOTES Enabling
To add User Notes to your page, you can either modify a copy of the notes.html file or you can simply add the following PHP code to one of your pages:
<?php require(NOTES2); ?>
As a spam prevention measure, all notes forms are disabled by default. If you wish to turn it on, apply the following to your local.conf file(s).
$local_conf_show_notes_form = ON;
Or alternatively this can be done on a per-notes basis:
<?php $local_conf_show_notes_form = ON; require(NOTES); ?>
NOTES Features
- requires that posters verify their intent to post by presenting them with a verification alert.
- screens messages for profanity, substituting random ASCII
-
can convert various types of link into a hyperlink:
- http://www.mozdev.org becomes <a href="http://www.mozdev.org">http://www.mozdev.org</a>
- ditto for ftp://, and https://
- mailto:cdn@mozdev.org becomes <a href="mailto:cdn@mozdev.org">cdn@mozdev.org</a>
-
converts bug and comment references:
- mozdev bugzilla references: bug 2570, bug %2570 or bug #2570 to
<a href="http://mozdev.org/bugs/show_bug.cgi?id=2570">bug 2570</a>,
<a href="http://mozdev.org/bugs/show_bug.cgi?id=2570">bug %2570</a> or
<a href="http://mozdev.org/bugs/show_bug.cgi?id=2570">bug #2570</a> - mozilla bugzilla references: mozbug 2570, mozbug %2570 or mozbug #2570 to
<a href="http://bugzilla.mozilla.org/show_bug.cgi?id=2570">mozbug 2570</a>,
<a href="http://bugzilla.mozilla.org/bugs/show_bug.cgi?id=2570">mozbug %2570</a> or
<a href="http://bugzilla.mozilla.org/bugs/show_bug.cgi?id=2570">mozbug #2570</a> - in page comment references: comment 2, comment %2 or comment #2 to
<a href="http://<PROJECT>.mozdev.org/<PAGE>#2">comment 2</a>,
<a href="http://<PROJECT>.mozdev.org/<PAGE>#2">comment %2</a> or
<a href="http://<PROJECT>.mozdev.org/<PAGE>#2">comment #2</a>
- mozdev bugzilla references: bug 2570, bug %2570 or bug #2570 to
- per comment named anchors (and associated links) allowing reference to a particular comment
-
can be styled by overriding the
following CSS values
from http://www.mozdev.org/skin/default/default.css
/************* NOTES *******************/
.NOTEheader {
}
.NOTEbody {
}
.NOTE-date,
.NOTE-link {
}
#NOTESheader,
#NOTEStextControl,
.NOTEbodyText {
}
#NOTES-table {
}
#NOTES-table td {
}
#NOTESdisclaimer {
}
#NOTESsubmit {
}
/************* NOTES *******************/
e.g.:
[0] Submitted by: Example Poster Saturday December 28th 2002 Example Post
The notes do not allow the addition of any HTML to your page, however URIs, comment and bug links are automatically turned into links if they are entered into the form. With the current implementation, notes are listed chronologically with the oldest post at the top and the newest at the bottom. Two carriage returns are needed to start a new paragraph in any of the postings.
N.B. these notes are provided to comment on Mozilla Development, they are not an extra advertising medium, as such spam messages will be obliterated, and the originating IP address logged.
The notes do not allow the addition of any HTML to your page, however URIs, comment and bug links are automatically turned into links if they are entered into the form. With the current implementation, notes are listed chronologically with the oldest post at the top and the newest at the bottom. Two carriage returns are needed to start a new paragraph in any of the postings.
N.B. these notes are provided to comment on Mozilla Development, they are not an extra advertising medium, as such spam messages will be obliterated, and the originating IP address logged.
NOTES Options
set variables prior to the require();- set $author if you want an email notification of a post
<?php $author="petejc@mozdev.org"; require(NOTES); ?> - unset $post_to_list if you don't want comments posting to the mailing list / NG
<?php $post_to_list = NO; require(NOTES); ?> - set $hide_text_control to stop additional posts being added
<?php $hide_text_control = 1; require(NOTES); ?> - set $target_page_override to control the value seen in the NG post/email title between [ and ], which would otherwise be generated from the page name itself
NOTES Deletion
- Check out generic edit.html and copy it to a protected area in your project. For example:
cvs -d :pserver:guest@mozdev.org:/cvs login
<guest>
cvs -d :pserver:guest@mozdev.org:/cvs co templates/www/protected/edit.html
copy templates/www/protected/edit.html brian/www/protected/edit.html - Check in your new file and open it in browser:
http://brian.mozdev.org/protected/edit.html
Without modifying edit.html, this will only edit notes at http://brian.mozdev.org/notes.html - After being prompted for a password, you will see a screen something like this
- If you get an error, your copy of edit.html will need tweaking as explained here, otherwise proceed to the
next step
In edit.html, you will see the comment:
// change from notes to whichever page it is your comments are on
So for example, if your notes were on your project home page, the $file variable would be assigned like this:
$file = "index.html.comment";
Note that newer projects will have to use comment2. - Remove the table rows for each comment you wish to delete and click 'update templete!'
- Go to your notes page to confirm that unwanted notes are gone
- Note that the old number sequence will remain, thus any new notes will start *after* the number of the deleted note(s)