Commit accd5f0c authored by Dries's avatar Dries

- applied David Norman's patch to turn all <?'s into fully qualified
  <?php's.
parent 47319817
......@@ -4,7 +4,7 @@ Dries Buytaert <dries@drop.org>
- project architect
Jeroen Bensch <jeroen@drop.org>
- themes and images
- themes and documentation
Steven Wittens <unconed@drop.org>
- themes and images
......@@ -13,4 +13,7 @@ Kjartan Mannes <natrak@drop.org>
- hosting, hardware, bandwidth
Michael O'Henly <michael@tenzo.com>
- documentation revisions
- documentation improvements
David Norman <norny@yahoo.com>
- code improvements
<?
<?php
include_once "includes/common.inc";
......
<?
<?php
include_once "includes/common.inc";
......@@ -17,7 +17,7 @@ function module($name, $module) {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD><TITLE><? echo $site_name; ?> administration</TITLE></HEAD>
<HEAD><TITLE><?php echo $site_name; ?> administration</TITLE></HEAD>
<STYLE>
body { font-family: helvetica, arial; }
h1 { font-size: 18pt; font-weight: bold; color: #990000; }
......@@ -28,21 +28,21 @@ function module($name, $module) {
</STYLE>
<BODY BGCOLOR="#FFFFFF" LINK="#005599" VLINK="#004499" ALINK="#FF0000">
<H1>Administration</H1>
<?
<?php
ksort($repository);
module_iterate("module");
?>
<HR><? echo $menu; ?><A HREF="">home</A><HR>
<?
<HR><?php echo $menu; ?><A HREF="">home</A><HR>
<?php
if (user_access($user, $mod)) module_execute($mod, "admin");
?>
</BODY>
</HTML>
<?
<?php
}
admin_page($mod);
......
<?
<?php
include_once "includes/common.inc";
......
<?
<?php
function error_flood() {
global $site_email;
......
<?
<?php
include_once "includes/common.inc";
......
<?
<?php
$type2index = array("addresses" => 0x01,
"profanity" => 0x02,
......
<?
<?php
// Security check:
if (strstr($id, " ") || strstr($pid, " ") || strstr($lid, " ") || strstr($mode, " ") || strstr($order, " ") || strstr($threshold, " ")) {
......@@ -238,7 +238,7 @@ function comment_visible($comment, $threshold = 0) {
function comment_uri($args = 0) {
global $link, $mod;
if ($args) return ($mod) ? "module.php?mod=$mod&$args" : $link .".php?$args";
if ($args) return ($mod) ? "module.php?mod=$mod&$args" : $link .".php ?$args";
else return ($mod) ? "module.php?mod=$mod" : $link .".php";
}
......
<?
<?php
function conf_init() {
global $HTTP_HOST, $REQUEST_URI;
......
<?
<?php
function db_connect($host, $user, $pass, $name) {
mysql_pconnect($host, $user, $pass) or die(mysql_Error());
......
<?
<?php
$na = "<I>na</I>";
......
<?
<?php
#
# Database settings:
......
<?
<?php
function locale_init() {
global $languages, $user;
......
<?
<?php
function module_iterate($function, $argument = "") {
global $repository;
......
<?
<?php
function search_form($keys) {
global $REQUEST_URI;
......
<?
<?php
function section_get() {
$array = array();
......
<?
<?php
class Story {
function Story($userid, $subject, $abstract, $article, $section, $timestamp) {
......
<?
<?php
function theme_init() {
global $user, $themes;
......
<?
<?php
$timer = 0;
......
<?
<?php
class User {
function User($userid, $passwd = 0) {
......
<?
<?php
$watchdog = array("comment" => array("0", $submission_rate["comment"]),
"diary" => array("1", $submission_rate["diary"]),
......
<?
<?php
include_once "includes/common.inc";
......
<?
<?php
include_once "includes/common.inc";
module_execute($mod, "page");
......
<?
<?php
$module = array("help" => "account_help",
"find" => "account_find",
......@@ -9,7 +9,7 @@ function account_help() {
<P>The account-module is responsible for maintaining the user database. It automatically handles tasks like registration, authentication, access rights, password retrieval, user settings and much more.</P>
<P>The required administration can be accomplished through the "account" interface of the administration section. From here administrators can get a quick overview of all registered users and view/edit specific accounts using the links provided. Some useful operations include blocking specific accounts (e.g. a troublesome user) and giving/taking administration permissions. Note that you should only give these permissions to people you trust!</P>
<P>Check the documentation page for detailed information about user management.</P>
<?
<?php
}
function account_find($keys) {
......
<?
<?php
$module = array("help" => "affiliate_help",
"block" => "affiliate_block",
......@@ -7,7 +7,7 @@
function affiliate_help() {
?>
<P>This is a small module to manage related and/or affiliate sites. The module exports two different blocks with links to the affiliate sites.</P>
<?
<?php
}
function affiliate_block() {
......
<?
<?php
class backend {
// Channel properties:
......@@ -68,7 +68,7 @@ class backend {
$result = db_query("DELETE FROM headlines WHERE id = '$this->id'");
// Strip all 'junk':
$data = ereg_replace("<?xml.*/image>", "", $data);
$data = ereg_replace("<?phpxml.*/image>", "", $data);
$data = ereg_replace("</rdf.*", "", $data);
$data = chop($data);
......
<?
<?php
$module = array("help" => "ban_help",
"admin" => "ban_admin");
......@@ -25,7 +25,7 @@ function ban_help() {
<LI>Email address bans <CODE>%@hotmail.com</CODE>, <CODE>%@altavista.%</CODE>, <CODE>%@usa.net</CODE>, etc. Used to prevent users from using free email accounts, which might be used to cause trouble.</LI>
<LI>Username bans <CODE>root</CODE>, <CODE>webmaster</CODE>, <CODE>admin%</CODE>, etc. Used to prevent administrator impersonators.</LI>
</UL>
<?
<?php
}
function ban_admin_new($mask, $category, $reason) {
......
<?
<?php
$module = array("page" => "block_page",
"help" => "block_help",
......@@ -10,7 +10,7 @@ function block_help() {
<P>The placement of blocks is delegated to the administrator. In most cases (i.e., the "custom" blocks), the user has complete control -- using preferences -- over whether or not they are enabled.</P>
<P>An administrator can lay out and arrange the available blocks to fit in two regions: "left" and "right". Regions simply contain blocks. In addition, an administrator can assign each block (within a region) a weight to sort them vertically. The heavier blocks will sink and the lighter blocks will be positioned nearer the top.</P>
<P>As mentioned, blocks may be arranged to fit in two regions: left and right. For theme builders, each region is identified by a corresponding constant: "left" and "right".</P>
<?
<?php
}
function block_page() {
......
<?
<?php
$module = array("page" => "block_page",
"help" => "block_help",
......@@ -10,7 +10,7 @@ function block_help() {
<P>The placement of blocks is delegated to the administrator. In most cases (i.e., the "custom" blocks), the user has complete control -- using preferences -- over whether or not they are enabled.</P>
<P>An administrator can lay out and arrange the available blocks to fit in two regions: "left" and "right". Regions simply contain blocks. In addition, an administrator can assign each block (within a region) a weight to sort them vertically. The heavier blocks will sink and the lighter blocks will be positioned nearer the top.</P>
<P>As mentioned, blocks may be arranged to fit in two regions: left and right. For theme builders, each region is identified by a corresponding constant: "left" and "right".</P>
<?
<?php
}
function block_page() {
......
<?
<?php
$module = array("help" => "box_help",
"block" => "box_block",
......@@ -31,7 +31,7 @@ function box_help() {
}
</PRE>
<P>For more in-depth examples, we recommend that you check the existing boxes and use them as a starting point.</P>
<?
<?php
}
function box_block() {
......
<?
<?php
$module = array();
......
<?
<?php
$module = array("block" => "calendar_block");
......
<?
<?php
$module = array("find" => "comment_find",
"admin" => "comment_admin");
......
<?
<?php
$module = array("find" => "comment_find",
"admin" => "comment_admin");
......
<?
<?php
$module = array("help" => "cron_help",
"admin" => "cron_admin");
......@@ -8,7 +8,7 @@ function cron_help() {
<P>Cron (which stands for chronograph) is a periodic command scheduler: it executes commands at intervals specified in seconds. It can be used to control the execution of daily, weekly and monthly jobs (or anything with a period of <i>n</i> seconds). Automating tasks is one of the best ways to keep a system running smoothly, and if most of your administration does not require your direct involvement, cron is an ideal solution.</P>
<P>Note that cron does not guarantee the commands will be executed at the specified interval. However, the engine will make sure that the commands are run as close to the specified intervals as possible.</P>
<P>Check the documentation page for more information about cron and how to setup it correctly.</P>
<?
<?php
}
function cron_save($edit) {
......
<?
<?php
$module = array("find" => "diary_find",
"help" => "diary_help",
......@@ -217,7 +217,7 @@ function diary_page() {
function diary_help() {
?>
<P>Drupal's diary module allows registered users to maintain an online diary. It provides easy-to-write and easy-to-read online diaries or journals that can be filled with daily thoughts, poetry, boneless blabber, spiritual theories, intimate details, valuable experiences, cynical rants, semi-coherent comments, writing experiments, artistic babblings, critics on current facts, fresh insights, diverse dreams, chronicles and mumbling madness available for public consumption.</P>
<?
<?php
}
function diary_user($username, $section, $operation) {
......
<?
<?php
$module = array("page" => "documentation",
"admin" => "documentation");
......@@ -269,7 +269,7 @@ function documentation() {
<H1><A NAME="c4">Chapter 4: modules</A></H1>
<?
<?php
module_iterate("documentation_module");
?>
......@@ -342,6 +342,6 @@ function documentation() {
<P>3. <B>Describe your changes:</B><BR>Describe the technical detail of the change(s) your patch includes and try to be as specific as possible. Note that we prefer technical reasoning above marketing: give us clear reasons why "this way" is good. Justify your changes and try to carry enough weight. It is important to note the version to which this patch applies.</P>
<P>4. <B>Separate your changes:</B><BR>Separate each logical change into its own patch. For example, if your changes include both bug fixes and performance enhancements, separate those changes into two or more patches. If your changes include an API update, and a new module which uses that new API, separate those into two patches.</P>
<P>5. <B>Mail or submit the patch:</B><BR>Remember: no MIME, no HTML mail, no links, no compression, no attachments. Just plain text.</P>
<?
<?php
}
?>
<?
<?php
$module = array("block" => "drupal_block",
"admin" => "drupal_admin");
......
<?
<?php
$module = array("page" => "drupal_page");
......
<?
<?php
$module = array("page" => "drupal_page");
......
<?
<?php
$module = array("page" => "faq_page",
"admin" => "faq_admin");
......
<?
<?php
$module = array("page" => "headline_page",
"cron" => "headline_cron",
......@@ -73,7 +73,7 @@ function headline_help() {
<P>A lot of news-oriented websites are now publishing news (headlines) and making their content available through XML, RSS and RDF backend files. They syndicate free content and allow retrieval and further transmission, aggregation, and online publication. In its current state, drupal's headline module supports RDF and RSS backends.</P>
<P>RSS was originally developed by Netscape to allow adding news channels to "My Netscape" sites, but it has since become adopted as the <I>de facto</I> net standard for distributing headlines and brief dynamic texts.</P>
<P>The headline module goes out to a list of configured news sites once an hour or so (driven by cron), downloads new RSS/RDF data and makes it available to your visitors. In addition, your headlines are exported as well and can be retrieved by other sites from <CODE>http://yourdomain.com/export/headlines.rdf</CODE>.</P>
<?
<?php
}
function headline_block() {
......@@ -189,7 +189,7 @@ function headline_export($uri) {
header("Content-Type: text/plain");
print "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n";
print "<?phpxml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n";
print "<rdf:RDF\n";
print " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n";
print " xmlns=\"http://my.netscape.com/rdf/simple/0.9/\">\n";
......
<?
<?php
$module = array("help" => "locale_help",
"admin" => "locale_admin",
......@@ -25,7 +25,7 @@ function locale_help() {
mysql> ALTER TABLE locales ADD nl TEXT DEFAULT '' NOT NULL;
mysql> ALTER TABLE locales ADD fr TEXT DEFAULT '' NOT NULL;
</PRE>
<?
<?php
}
function locale_delete($id) {
......
<?
<?php
$module = array("help" => "locale_help",
"admin" => "locale_admin",
......@@ -25,7 +25,7 @@ function locale_help() {
mysql> ALTER TABLE locales ADD nl TEXT DEFAULT '' NOT NULL;
mysql> ALTER TABLE locales ADD fr TEXT DEFAULT '' NOT NULL;
</PRE>
<?
<?php
}
function locale_delete($id) {
......
<?
<?php
$module = array("help" => "module_help",
"admin" => "module_admin");
......@@ -6,7 +6,7 @@
function module_help() {
?>
The module administration page provide you a list of all available modules. Moreover, it allows you to "rehash" modules. Whenever you install a new module or when an existing module has been changed or updated, it requires "rehasing": when you rehash a module, the module is registered to the engine and properly initialized.
<?
<?php
}
function module_admin_rehash() {
......
<?
<?php
$module = array("cron" => "rating_cron",
"help" => "rating_help",
......@@ -46,7 +46,7 @@ function rating_help() {
<P>The idea of (1) is that it favors comments that more people voted on, and thus whose rating is more likely to be accurate or justified.</P>
<P>The latter (2) makes the user rating that comes out of the calulations temporary, based on users' most recent activity and responsive to their current state. This is accomplished by taking each user's last 30 comments, or however many he or she posted in the last 60 days - whatever comes first.</P>
<P>Additionally, users that posted one or more succesful stories in the last 60 days gain extra bonus points which will boost up their overall rating.</P>
<?
<?php
}
function rating_list($limit) {
......
<?
<?php
$module = array("help" => "section_help",
"block" => "section_block",
......@@ -14,7 +14,7 @@ function section_help() {
?>
<P>When submitting new stories, every story is assigned a section or category. Sections can be maintained from the administration pages.</P>
<P>For moderation purpose, you can specify a post, dump and expiration thresholds for each available section according to type and urgency level of a section. This is useful considering the fact that some sections do not really "expire" and stay interesting and active as time passes by, whereas news-related stories are only considered "hot" over a short period of time.</P>
<?
<?php
}
function section_block() {
......
<?
<?php
$module = array("cron" => "story_cron",
"help" => "story_help",
......@@ -37,7 +37,7 @@ function story_help() {
<P>Queued stories: user-contributed stories are automatically whisked away to a submission queue for moderators (i.e. registered user) to frown at. Moderators vote whether or not a story should be posted to the front page for discussion.</P>
<P>Posted stories: published stories accessible to all visitors.</P>
<P>Dumped stories: rejected stories that are no longer available to visitors.</P>
<?
<?php
}
function story_block() {
......
<?
<?php
$module = array("cron" => "story_cron",
"help" => "story_help",
......@@ -37,7 +37,7 @@ function story_help() {
<P>Queued stories: user-contributed stories are automatically whisked away to a submission queue for moderators (i.e. registered user) to frown at. Moderators vote whether or not a story should be posted to the front page for discussion.</P>
<P>Posted stories: published stories accessible to all visitors.</P>
<P>Dumped stories: rejected stories that are no longer available to visitors.</P>
<?
<?php
}
function story_block() {
......
<?
<?php
$module = array("menu" => "submission_menu",
"page" => "submission_page");
......
<?
<?php
$module = array("help" => "watchdog_help",
"cron" => "watchdog_cron",
......@@ -8,7 +8,7 @@ function watchdog_help() {
?>
<P>The watchdog module monitors your website, captures system events in a log and records them to be reviewed by an authorized individual at a later time. The watchdog log is simply a list of events recorded during operation and contains usage data, performance data, errors, warnings and operational information. It is vital to check the watchdog report on a regular basis as it is often the only way to tell what is going on.</P>
<P>To ease administration, the watchdog will automatically remove old logs.</P>
<?
<?php
}
function watchdog_cron() {
......
<?
<?php
$module = array("help" => "watchdog_help",
"cron" => "watchdog_cron",
......@@ -8,7 +8,7 @@ function watchdog_help() {
?>
<P>The watchdog module monitors your website, captures system events in a log and records them to be reviewed by an authorized individual at a later time. The watchdog log is simply a list of events recorded during operation and contains usage data, performance data, errors, warnings and operational information. It is vital to check the watchdog report on a regular basis as it is often the only way to tell what is going on.</P>
<P>To ease administration, the watchdog will automatically remove old logs.</P>
<?
<?php
}
function watchdog_cron() {
......
<?
<?php
$module = array("page" => "wishlist_page",
"help" => "wishlist_help");
......@@ -60,7 +60,7 @@ function wishlist_page() {
<LI>create a theme with black background - darker theme</LI>
<LI>try to get existing themes HTML validated</LI>
</UL>
<?
<?php
}
function wishlist_help() {
......
<?
<?php
include_once "includes/common.inc";
......
<?
<?php
include_once "includes/common.inc";
include_once "includes/story.inc";
......
<?
<?php
include_once "includes/common.inc";
......
<?
<?php
class Theme {
var $link = "#666699";
......@@ -9,7 +9,7 @@ function header() {
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
<HEAD>
<TITLE><? print $site_name; ?></TITLE>
<TITLE><?php print $site_name; ?></TITLE>
</HEAD>
<STYLE type="text/css">
<!--
......@@ -26,14 +26,14 @@ function header() {
</TR>
<TR>
<TD ALIGN="right" COLSPAN="2">
<?
<?php
print "<SMALL><A HREF=\"index.php\">". t("home") ."</A> | <A HREF=\"module.php?mod=faq\">". t("faq") ."</A> | <A HREF=\"module.php?mod=diary\">". t("diary") ."</A> | <A HREF=\"search.php\">". t("search") ."</A> | <A HREF=\"submit.php\">". t("submit news") ."</A> | <A HREF=\"account.php\">". t("user account") ."</A></SMALL>\n";
?>
</TD>
</TR>
<TR>
<TD VALIGN="top" WIDTH="85%">
<?
<?php
}
function story($story, $reply = 0) {
......@@ -44,7 +44,7 @@ function story($story, $reply = 0) {
print " <TR VALIGN=\"bottom\"><TD COLSPAN=\"2\" BGCOLOR=\"#000000\" WIDTH=\"100%\"><IMG SRC=\"themes/marvin/images/pixel.gif\" WIDTH=\"1\" HEIGHT=\"0\" ALT=\"\"></TD></TR>\n";
print " <TR>\n";
print " <TD>\n";
print " <FONT COLOR=\"#7C7C7C\"><SMALL>". strtr(t("Submitted by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp, "large"))); ?><? if ($story->department) print "<BR>from the $story->department dept."; ?><? print "</SMALL></FONT></TD><TD ALIGN=\"right\" VALIGN=\"top\" NOWRAP><SMALL><A HREF=\"?section=". urlencode($story->section) ."\"><FONT COLOR=\"#83997A\">$story->section</FONT></A></SMALL>\n";
print " <FONT COLOR=\"#7C7C7C\"><SMALL>". strtr(t("Submitted by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp, "large"))); ?><?php if ($story->department) print "<BR>from the $story->department dept."; ?><?php print "</SMALL></FONT></TD><TD ALIGN=\"right\" VALIGN=\"top\" NOWRAP><SMALL><A HREF=\"?section=". urlencode($story->section) ."\"><FONT COLOR=\"#83997A\">$story->section</FONT></A></SMALL>\n";
print " </TD>\n";
print " </TR>\n";
print " <TR><TD COLSPAN=\"2\">&nbsp;</TD></TR>\n";
......@@ -64,7 +64,7 @@ function story($story, $reply = 0) {
print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"2\" WIDTH=\"100%\">\n";
print " <TR><TD COLSPAN=\"2\"><IMG SRC=\"themes/marvin/images/drop.gif\" ALT=\"\"> &nbsp; <B>". check_output($story->subject) ."</B></TD></TR>\n";
print " <TR VALIGN=\"bottom\"><TD COLSPAN=\"2\" BGCOLOR=\"#000000\" WIDTH=\"100%\"><IMG SRC=\"themes/marvin/images/pixel.gif\" WIDTH=\"1\" HEIGHT=\"0\" ALT=\"\"></TD></TR>\n";
print " <TR><TD><FONT COLOR=\"#7C7C7C\"><SMALL>". strtr(t("Submitted by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp, "large"))); ?><? if ($story->department) print "<BR>from the $story->department dept."; ?><? print "</SMALL></FONT></TD><TD ALIGN=\"right\" VALIGN=\"top\" NOWRAP><SMALL><A HREF=\"index.php?section=". urlencode($story->section) ."\"><FONT COLOR=\"#83997A\">$story->section</FONT></A></SMALL></TD></TR>\n";
print " <TR><TD><FONT COLOR=\"#7C7C7C\"><SMALL>". strtr(t("Submitted by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp, "large"))); ?><?php if ($story->department) print "<BR>from the $story->department dept."; ?><?php print "</SMALL></FONT></TD><TD ALIGN=\"right\" VALIGN=\"top\" NOWRAP><SMALL><A HREF=\"index.php?section=". urlencode($story->section) ."\"><FONT COLOR=\"#83997A\">$story->section</FONT></A></SMALL></TD></TR>\n";
print " <TR><TD COLSPAN=\"2\">&nbsp;</TD></TR>\n";
print " <TR>\n";
print " <TD COLSPAN=\"2\">\n";
......@@ -157,7 +157,7 @@ function footer() {
?>
</TD>
<TD VALIGN="top" WIDTH=\"200\">
<?
<?php
theme_account($this);
theme_blocks("all", $this);
?>
......@@ -165,16 +165,15 @@ function footer() {
</TR>
<TR>
<TD ALIGN="center" COLSPAN="3">
<?
<?php
print "<SMALL>[ <A HREF=\"index.php\">". t("home") ."</A> | <A HREF=\"module.php?mod=faq\">". t("faq") ."</A> | <A HREF=\"module.php?mod=diary\">". t("diary") ."</A> | <A HREF=\"search.php\">". t("search") ."</A> | <A HREF=\"submit.php\">". t("submit news") ."</A> | <A HREF=\"account.php\">". t("user account") ."</A> ]</SMALL><P>\n";
?>
<CENTER><SMALL><I><FONT COLOR="#7C7C7C">Powered by <A HREF="http://drop.org/module.php?mod=drupal">drupal</A>.</FONT></I></SMALL></CENTER>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
<?
<?php
}
}
......
<?PHP
<?php
class Theme {
var $link = "#000000";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment