summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2000-12-07 13:09:23 +0000
committerDries Buytaert <dries@buytaert.net>2000-12-07 13:09:23 +0000
commitfc8fa68b6f6a4b968f187cc621d9cc9fd585de28 (patch)
treec13d217381cb14e46b1628d763dbaecde049b1fa
parent8b68d11dba73ff57711cddecc8ec4bc91fabfde6 (diff)
downloadbrdo-fc8fa68b6f6a4b968f187cc621d9cc9fd585de28.tar.gz
brdo-fc8fa68b6f6a4b968f187cc621d9cc9fd585de28.tar.bz2
- added module support and preleminary (read: example) modules
-rw-r--r--module.php3
-rw-r--r--modules/dev.module139
-rw-r--r--modules/faq.module84
-rw-r--r--modules/wishlist.module73
4 files changed, 299 insertions, 0 deletions
diff --git a/module.php b/module.php
new file mode 100644
index 000000000..d0cb55c5c
--- /dev/null
+++ b/module.php
@@ -0,0 +1,3 @@
+<?
+include "modules/$mod.module";
+?>
diff --git a/modules/dev.module b/modules/dev.module
new file mode 100644
index 000000000..b5c5773d0
--- /dev/null
+++ b/modules/dev.module
@@ -0,0 +1,139 @@
+<PRE>
+<H1>Drop.org - Development information</H1>
+<I><SMALL>$Id$</SMALL></I>
+
+
+ drop.org is open source. It is possible for each and every user to become
+ a contributor. The fact is that most drop.org users, even those skilled
+ in programming arts, have never contributed to the code even though most
+ of us had days where we thought to ourselves: "I wish drop.org could do
+ this ...". Through this page, I hope I can make drop.org programming
+ more accessible to at least a small percentage of people.
+
+ We use diff and patch for content control even
+ though we distribute our code via CVS. Why? Because diff
+ and patch provide an immense amount of control. Patches can
+ be submitted via e-mail and in plain text; maintainers can read and judge
+ the patch before it ever gets near a tree. It allows maintainers to look
+ at changes easily without blindly integrating them.
+
+<H2>CVS</H2>
+
+ <H3>Introduction</H3>
+
+ CVS is a tool to manage software revisions and release control in a
+ multi-developer, multi-directory, multi-group environment. It comes
+ in very handy to maintain local modificiations.
+
+ Thus, CVS helps you if you are part of a group of people working on
+ the same project. In large software development projects, it's usually
+ necessary for more then one software developer to be modifying modules
+ of the code at the same time. Without CVS, it is all too easy to
+ overwrite each others' changes unless you are extremely careful.
+
+ We can hand out CVS accounts rather then full-features shell accounts
+ or ftp accounts, and having to mess with groups to give everyone
+ access to the sources. We could create a public read-only CVS account
+ so beta testers could checkout the latest snapshot of the code.
+
+ In addition, CVS helps to keep track of all changes. Therefore, I did
+ setup the CVS server to mail all CVS commits to droppies@drop.org.
+ Thus, it does not require any effort to inform the other people about
+ the work you have done, and by reading the mails everyone is kept up
+ to date.
+
+ By using a few trics I did setup the CVS to behave as follows: when
+ you check in a new or updated file, either from a work directory on
+ zind.net or from your local Windows/Linux machine, http://beta.drop.org/
+ is automatically updated! That is, http://beta.drop.org/ contains the
+ latest updates and patches. Whenever we have a stable build, we'll
+ export that stable build to http://www.drop.org/ after which we
+ continue working on http://beta.drop.org/.
+
+
+ <H3>Basic usage</H3>
+
+ <B>Linux</B>
+
+ To gain access via (anonymous) cvs use the following steps. For this
+ example it is assumed that you want a copy of the drop.org source code.
+
+ 1. Install a recent copy of cvs. All you really need is a copy of the
+ CVS client binary. Or you can download the latest CVS source code
+ from <A HREF="http://www.cyclic.com">Cyclic Software</A>. Don't get your panties in a nod; CVS is free
+ software under the GNU GPL.
+
+ 2. Set CVSROOT in your environment:
+ <I>export CVSROOT=":pserver:your_username@drop.org:/home/dries/cvs"</I>
+
+ 3. Login by running the command:
+ <I>cvs login</I>
+
+ 4. To check out the latest drop.org sources, run the command:
+ <I>cvs co drop</I>
+
+ This will create a directory called <CODE>drop</CODE> containing the latest
+ drop.org source tree. For the other source code repositories
+ on this system just substitute the correct package name.
+
+ 5. Whenever you want to merge in the latest code changes, use the
+ following command from within the <CODE>drop</DROP> directory:
+ <I>cvs ci file1 file2 file3</I>
+
+ 6. To add binary files like gifs you have to use:
+ <I>cvs add <B>-kb</B> file1 file2 file3</I>
+ If a binary file accidentically gets added without `-kb', one
+ can use the <I>cvs admin</I> command to recover. For example:
+ <I>cvs admin -kb file1 file2 file3</I>
+ <I>cvs commit file1 file2 file3</I>
+ After you did, make sure to check out a fresh copy of the files
+ (if they were broken):
+ <I>cvs update -A file1 file2 file3</I>
+
+
+ <B>Windows</B>
+
+ A graphical CVS client is available for MS Windows and for Macs.
+ You can download the latest version from <A HREF="http://www.wincvs.org">http://www.wincvs.org/</A>.
+
+ If you can want to interface the CVS repository just like Linux
+ users do (raw and uncut), then check <A HREF="http://oodt.jpl.nasa.gov/doc/developers-resources/developing/windows/index.html">this site</A>.
+
+
+ <H3>Additional references</H3>
+ 1. <A HREF="http://cvsbook.red-bean.com/">CVS book</A></LI>
+ 2. <A HREF="http://www.loria.fr/~molli/cvs/doc/cvs_toc.html">CVS docs</A></LI>
+ 3. <A HREF="http://cellworks.washington.edu/pub/docs/cvs/cvs-FAQ/">CVS FAQ</A></LI>
+
+
+<H2>diff and patch</H2>
+
+ diff is the first command in the set. It has the simple purpose to
+ create a file called a <I>patch</I> or a <I>diff</I> which contains the differences
+ between two text files or two groups of text files. diff can write
+ into different formats, although the unified difference format is
+ preferred. The patches this command generates are much easier to
+ distribute and allow maintainers to see quickly and easily what
+ changed and to make a judgement.
+
+ patch is diff's complement and takes a patch file generated by diff
+ and applies it against a file or a group of files.
+
+ The actual usage of diff and patch is not complicated.
+
+ At its simplest, a diff command for comparing two files would be:
+ <I>diff old.txt new.txt > oldnew.patch</I>
+
+ For drop.org, we prefer patches in unified format, so we add -u to
+ the command line:
+ <I>diff -u old.txt new.txt > oldnew.patch</I>
+
+ Generally, however, a comparison of two source trees is often
+ desired. A possible command to do so is:
+ <I>diff -ruN old new > oldnew.patch</I>
+
+ Once a patch is generated, the process of patching the file is
+ even simpler. Based on our examples above, we could do:
+ <I>patch < oldnew.patch</I>
+
+</PRE>
diff --git a/modules/faq.module b/modules/faq.module
new file mode 100644
index 000000000..150f0d043
--- /dev/null
+++ b/modules/faq.module
@@ -0,0 +1,84 @@
+<?
+
+include "includes/theme.inc";
+
+$output = "
+ <DL>
+ <DT><B>What is a FAQ?</B></DT>
+ <DD>
+ The <I>Online Jargon Files</I> written by Eric Raymond define a FAQ as:
+ <P><B>FAQ</B> /F-A-Q/ or /fak/ n.<BR>[Usenet] 1. A Frequently Asked Question. 2. A compendium of accumulated lore, posted periodically to high-volume newsgroups in an attempt to forestall such questions. Some people prefer the term FAQ list or FAQL /fa'kl/, reserving FAQ' for sense 1.</P>
+ <P><B>RTFAQ</B> /R-T-F-A-Q/ imp.<BR>[Usenet: primarily written, by analogy with <A HREF=\"#RTFM\">RTFM</A>] Abbreviation for \"Read The FAQ!\", an exhortation that the person addressed ought to read the newsgroup's FAQ list before posting questions.</P>
+ <P><B>RTFM</B> /R-T-F-M/ imp.<BR>[Unix] Abbreviation for \"Read The Fucking Manual\". 1. Used by gurus to brush off questions they consider trivial or annoying. 2. Used when reporting a problem to indicate that you aren't just asking out of randomness. \"No, I can't figure out how to interface Unix to my toaster, and yes, I have RTFM.\" Unlike sense 1, this use is considered polite.</P>
+ <P><B>User</B> n.<BR>1. Someone doing `real work' with the computer, using it as a means rather than an end. Someone who pays to use a computer. 2. A programmer who will believe anything you tell him. One who asks silly questions. [GLS observes: This is slightly unfair. It is true that users ask questions (of necessity). Sometimes they are thoughtful or deep. Very often they are annoying or downright stupid, apparently because the user failed to think for two seconds or look in the documentation before bothering the maintainer.] 3. Someone who uses a program from the outside, however skillfully, without getting into the internals of the program. One who reports bugs instead of just going ahead and fixing them.</P>
+ </DD>
+
+ <DT><B>What is $site_name all about?</B></DT>
+ <DD>$site_name is a news and discussion forum. It is a <I>tool</I>. And as a tool, it aims to create an environment to make discussions possible. $site_name is not an organization, but a non-profit hobby project instead.<P>People log in to the site, read the news, select one or more items and start to discuss and post their reactions. $site_name is a community site that relies solely on reader-contributed content.<P>First off, we strive towards discussion rather then to deliver news on its own: discussion can really make a story considerably better as user comments frequently `upstage' the story itself.<P>Secondly, we aim towards a high quality of content and content posters by using and experimenting with several techniques and systems such as trust metrics, scoring, moderation and collaborative filtering.<P></DD>
+
+ <DT><B>Who runs $site_name?</B></DT>
+ <DD><P>$site_name was originally created by ". format_username("Dries") ." and is written primarily by ". format_username("Dries"). " with help from others like ". format_username("Jeroen") ." and ". format_username("UnConeD") ." who helped creating themes. The bandwidth and hardware are donated by ". format_username("Natrak") .". Together we are $site_name and if you want to get in touch with the $site_name team, you can contact us at <A HREF=\"mailto:$site_email\">$site_email</A>.<P></DD>
+
+ <DT><B>Isn't $site_name similar to slashdot.org and kuro5hin.org?</B></DT>
+ <DD>To some extend, yes. Credit where credit is due: we borrowed many ideas (like the interface and moderation) from <A HREF=\"http://slashdot.org/\">slashdot.org</A> and <A HREF=\"http://kuro5hin.org/\">kuro5hin.org</A> because they have many good ideas about discussion forums. We do not use their code or any permutation thereof as $site_name has been written entirely from scratch. Our goal was to create a similar base initially, and to go from there and to transform $site_name into something different by adding new and unique features.<P></DD>
+
+ <DT><B><A NAME=\"moderation\">Why moderatiom, trust metrics and collaborative filtering?</A></B></DT>
+ <DD>To help individuals and communities address the challenges of information overload.<P>As each new piece of information competes for attention, people quickly tend to become overwhelmed and seek assistance in identifying the most interesting, worthwhile, valuable or enteraining items. Not to mention the fact, reader-contributed content and other levels of interactivity tend to become chaotic, bloated and disreputable.<P>Therefore, we decided to develop a public system powered by a community that aims to bring quality content to everyone's attention and to filter out all junk: to <I>sort the wheat from the chaff</I>. The output should be something clean and homogenized featuring quality content, and should slide down the gullet far more easily. Another objective is to provide a customized service according to public and individual preferences, whether expressed or inferred.<P>Yes, you are right. It all sounds a bit idealistic, not to mention hypothetical. However, don't get this wrong: this isn't a new concept, various such systems exist nowadays (like <A HREF=\"http://slashdot.org/\">slashdot.org</A> or <A HREF=\"http://www.kuro5hin.org/\">kuro5hin.org</A>). We just happen to want our own system.<P>Last but not least we, the $site_name team, don't want the responsibility to manually review each post and to select the ones worthy. Systematic editing by individual editors is nice and dandy, if you get paid for it or if you have some time to kill. Afterall, we are not writers, critics nor reviewers for that matter; we are programmers, designers and technicians.<P></DD>
+
+ <DT><B>How does submission moderation work?</B></DT>
+ <DD>Anyone who happens by, and has some news or some thoughts they'd like to share, can submit new content for consideration. After someone has submitted something, their story is added to a queue. All registered users can access this list of pending stories, that is, stories that have been submitted, but do not yet appear on the public front page. Those registered users can vote whether they think the story should be posted or not. When enough people vote to post a story, the story is pushed over the threshold and up it goes on the public page. On the other hand, when too many people voted to drop a story, the story will get trashed.<P></DD>
+
+ <DT><B>How does comment moderation work?</B></DT>
+ <DD>If you create an account and log in, you will be able to moderate comments. This lets you assign a score to a comment on how good you think the comment was or how visible you think it should be. When more then one person rates a comment, the overall rating is just a simple average of all ratings. Comments with a high ratings are more visible then comments with a lower rating. Like that, comments that gain the approbation of participants will gradually move up through statistical effects and pointless comments will sink into oblivion.<P>Hence, the purpose of comment moderation is two-fold: <UL><LI>To bring the really good comments to everyone's attention.</LI><LI>To hide or get get rid of spam, flamebait and trolls.</LI></UL>In the latter, comment moderation provides a technical solution to a social problem.<P></DD>
+
+ <DT><B>Why would I want to create a user account?</B></DT>
+ <DD>No $site_name participant can use his own name or handle to post comments until they sign up and submit their e-mail address. Those who do not may participate as `$anonymous', but they will suffer numerous disadvantages, not the least that their posts begin at a lower score.<P>In contrast, those with a user account can use their own name or handle and are granted various priveleges: the most important is probably the ability to moderate new submissions and to rate comments. Also, registered users can tune the site to their personal needs. For instance: they can select one of the available themes to alter the look-and-feel of the site or they can fine-tune the values of various settings to their likings.<P></DD>
+
+ <DT><B>I forgot my password, what do I do?</B></DT>
+ <DD>You should be able to get it from the <A HREF=\"account.php\">account page</A>. Just type in your username, hit the 'E-mail password' button and your password will be whisked off to your e-mail address. If, however, this doesn't seem to be working, contact us at <A HREF=\"mailto:$site_email\">$site_email</A>.<P></DD>
+
+ <DT><B>I have a cool story that you should post, what do I do?</B></DT>
+ <DD>Check out the <A HREF=\"submit.php\">submission form</A>. If you fill out that form, your contribution gets shipped off to the submission queue for evaluation, <A HREF=\"#moderation\">moderation</A>, and possibly even posting.<P></DD>
+
+ <DT><B>How reliable are the stories and comments?</B></DT>
+ <DD>There is one big problem with user-contributed news and comments: `reliability and quality'.<P>The stories are not likely to suffer from this problem as they tend to provide links to other sites that are reputable and have dependable information that can be trusted. The problem with reliability is probably in the comments people post. Sometimes they are helpful, accurate, and even amusing, but other times they are not. Comments stand out as a good idea and can really make a story considerably better, but we have to face the facts. Not all comments add value to a discussion: some are redundant, off-topic or even completly fake.<P>We try to address this problem by experimenting with trust metrics, moderation and collaborative filtering. Thus, we aim towards a high quality of content and content posters by using and experimenting with several such techniques and systems.<P></DD>
+
+ <DT><B>Why did my comment get deleted?</B></DT>
+ <DD>It probably didn't. It probably just got moderated down by our army of moderators. Try browsing at a lower threshold and see if your comment becomes visible.<P></DD>
+
+ <DT><B>I found a bug or encountered a problem, what do I do?</B></DT>
+ <DD>Write us a bugreport or send us a patch! Writing a good bug report takes patience, but doing it right the first time saves time for us and for you. It is most helpful when a good description of the problem is included in the bug report. That is, a good example of all the things you did that led to the problem and the problem itself exactly described. The best reports are those that include a full example showing how to reproduce the bug or problem.<P></DD>
+
+ <DT><B>Is the source code of this site available?</B></DT>
+ <DD>This site is powered by <A HREF=\"http://www.fsf.org/\">Free Software</A>; including <A HREF=\"http://www.apache.org/\">Apache</A>, <A HREF=\"http://www.php.net/\">PHP</A>, <A HREF=\"http://www.mysql.com/\">MySQL</A> and <A HREF=\"http://www.linux.com/\">Linux</A>, and is inspired by several <A HREF=\"http://www.fsf.org/\">Free Software</A> projects. Therefor we have decided to make the software engine of this site available under terms of GPL.<P>However, the sources are <B>not</B> available yet at this time, but will be released as soon we have a first, well-rounded source tree that has proven to be stable. If you can't wait or in case you have big plans (like `total domination') with the engine, don't hesitate to contact us and we might grant you CVS access.<P></DD>
+
+ <DT><B>What features does the engine have?</B></DT>
+ <DD>
+ <LI>A theme system: the entire website is fully themable in terms of colors, layout, look-and-feel and markup.</LI>
+ <LI>A user account system with session management, secure authentication, human-readable password generator, user and page preferences, comment tracker and so on.</LI>
+ <LI>A discussion system: supports different display modes (<I>threaded</I>, <I>flat</I>, <I>netsted</I>), order modes (<I>newest first</I>, <I>oldest first</I>, <I>highest scorings first</I>), comment moderation, customable HTML-support, etc.</LI>
+ <LI>An open submission queue and submission moderation.</LI>
+ <LI>An embedded diary system.</LI>
+ <LI>Anonymous reader/poster support across the entire site in case visitors prefers to remain anonymous or in case cookies are disabled.</LI>
+ <LI>An administrator section which is considered the control center of the website.</LI>
+ <LI>A database abstraction layer: allows the website to run on top of different database systems.</LI>
+ <LI>A RDF/RSS backend which allows third party websites to become <I>channels</I> in your website with a minimum of extra work.</LI>
+ <P>
+ </DD>
+
+ <DT><B>What is your disclaimer?</B></DT>
+ <DD>All messages made available (including any discussion goups and bulletin boards) and any opinions, advice, statements or other information contained in any messages posted or transmitted by any third party are the responsibility of the author of that message and not of $site_name. The fact that a particular message is posted on or transmitted using this website does not mean that $site_name has endorsed that message in any way or verified the accuracy, completeness or usefulness of any message.<P>Furthermore, all persons who use $site_name are advised not to use them for solicitations or any other commercial purposes. We make no representation regarding the merchantability or fitness for any particular purpose of any message posted by any third party. Users are encouraged to seek the advice of their appropriate professional advisors, when evaluating the information contained in any message. $site_name is not responsible for any defamatory, offensive or illegal conduct of any user.<P></DD>
+
+ <DT><B>What are your terms and conditions?</B></DT>
+ <DD>
+ This website includes threaded discussion groups and discussion forums which allow feedback to $site_name and real-time interaction between the persons who use this service. The responsibility for any opinions, advice, statements or other information contained in any messages posted or transmitted by any third party on this website resides solely with the author.<P>
+ <U>1. When using the discussion forums, you may NOT:</U><BR><I>a.</I> Keep any other person from using and enjoying the discussion forums.<BR><I>b.</I> Post or transmit any messages (or content in general) that would constitute or encourage conduct that would constitute a criminal offense, give rise to civil liability or otherwise violate any local, state, national or international law, including any threatening, abusive libelous, defamatory, obscene, vulgar, pornographic, profane or indecent messages of any kind.<BR><I>c.</I> Post or transmit any information, software or other materials which violate or infringe upon the rights of others, including their privacy or publicity rights, or which is protected by copyright, trademark or other proprietary rights, without first obtaining permission from the person who owns or holds that right.<BR><I>d.</I> Use the discussion forum in any way for solicitations or other commercial purposes.<P>
+ <U>2. $site_name's right to monitor the discussion forums:</U><BR>You understand that $site_name has no obligation to monitor the discussion forum. However $site_name reserves the right at all times to edit, refuse to post or to remove any information or materials, in whole or in part, that in $site_name's sole discretion are objectionable or in violation of these terms and conditions and to disclose any information necessary to satisfy or governmental request.<P>
+ </DD>
+ </DL>";
+
+$theme->header();
+$theme->box("Frequently Asked Questions", $output);
+$theme->footer();
+
+?>
diff --git a/modules/wishlist.module b/modules/wishlist.module
new file mode 100644
index 000000000..f3908e65a
--- /dev/null
+++ b/modules/wishlist.module
@@ -0,0 +1,73 @@
+<H1>Whislist</H1>
+<SMALL><I>$Id$</I></SMALL>
+
+ <H3>Users</H3>
+ <UL>
+ <LI>auto. set default theme according to popularity or date</LI>
+ <LI>enhance "track drop.org" functionality: should be made more complete and more comprehensive</LI>
+ <LI>translation/localization support: let's not add this too soon as it will turn out to be a pain to maintain</LI>
+ <LI>allow users to change their e-mail address: this will require validation through our confirmation procedure</LI>
+ <LI>advanced search so people can search stories, comments, diaries, users, and so on by date</LI>
+ <LI><I>see section "Modules" for more user oriented features</I></LI>
+ </UL>
+
+ <H3>Adminstration</H3>
+ <UL>
+ <LI>enhance user administration</LI>
+ <LI>auto. backup functionality</LI>
+ <LI>auto. clean-up functionality (e.g. user's history field)</LI>
+ </UL>
+
+ <H3>Engine</H3>
+ <UL>
+ <LI>blocks and flexible block placement strategies by means of "layout managers" (cfr. Java) and tightly integrated with the module support</LI>
+ <LI>post/edit hash - magic cookie: to prevent malicious external access and to prevent duplicate posts because of hitting the "reload" button</LI>
+ <LI>cron job emulation:</LI>
+ <UL>
+ <LI>auto. set default theme according to popularity</LI>
+ <LI>auto. database clean-up (e.g. history field)</LI>
+ <LI>auto. recalculate adaptive/dynamic settings like thresholds</LI>
+ <LI>auto. mail digests</LI>
+ </UL>
+ <LI>URL validator</LI>
+ <LI>more adaptive submission queue</LI>
+ <LI>archive function</LI>
+ <LI>caching</LI>
+ <LI>more configuration options:</LI>
+ <UL>
+ <LI>enable/disable open submission queue</LI>
+ <LI>enable/disable anonymous users</LI>
+ <LI>enable/disable comments - pending comments</LI>
+ </UL>
+ </UL>
+
+ <H3>Modules</H3>
+ <UL>
+ <LI>convert diary system to a module (?)</LI>
+ <LI>RDF/XML/RSS syndication import/export</LI>
+ <LI>messaging between administrators/users</LI>
+ <LI>links/bookmarks manager</LI>
+ <LI>public userlist</LI>
+ <LI>visitor/referals statistics</LI>
+ <LI>banner ad/rotation/tracking or affiliate program</LI>
+ <LI>messaging system between users</LI>
+ <LI>voting polls</LI>
+ <LI>daily/weekly e-mail digest - mailing list</LI>
+ <LI>e-commerce/shop</LI>
+</UL>
+
+ <H3>Public release</H3>
+ <UL>
+ <LI>write minimum amount of documentation like installation guidelines, administrator guide, and so on</LI>
+ <LI>make (or find and install) a "task manager / todo list / progress meter / bug report"-tool so we can get ourselves and the project somewhat organized</LI>
+ <LI>integration and testing with latest version of PHP (just to avoid bug reports that could have been easily avoided)</LI>
+ <LI>security revision</LI>
+ </UL>
+
+ <H3>Themes</H3>
+ <UL>
+ <LI>create a theme with topic icons - graphical theme</LI>
+ <LI>create a theme with black background - darker theme</LI>
+ <LI>try to get existing themes HTML validated</LI>
+ </UL>
+