- Bugfix: renamed the SQL field 'types' to 'nodes' because 'types' is a reserved keyword in MySQL 4. This fixes critical bug #1618. Patch by Marco.
==> This fix requires to run update.php! - Bugfix: made sessions work without warnings when register_globals is turned off. The solution is to use $_SESSION instead of session_register(). This fixes critical bug #1797. Patch by Marco. - Bugfix: sometimes error messages where being discarded when previewing a node. Patch by Craig Courtney. - Bugfix: fixed charset problems. This fixes critical bug #1549. Patch '0023.charset.patch' by Al. - Code improvements: removed some dead code from the comment module. Patch by Marco. - Documentation improvements: polished the node module help texts and form descriptions. Patch '0019.node.module.help.patch' by Al. - CSS improvements all over the map! Patch '0021.more.css.patch' by Al. - GUI improvements: improved the position of Druplicon in the admin menu. Patch '0020.admin.logo.patch' by Al. - GUI improvements: new logos for theme Marvin and theme UnConeD. Logos by Kristjan Jansen. - GUI improvements: small changes to the output emitted by the profile module. Suggestions by Steven Wittens. - GUI improvements: small fixes to Xtemplate. Patch '0022.xtemplate.css.patch' by Al. TODO: - Some modules such as the buddy list module and the annotation module in the contributions repository are also using session_register(). They should be updated. We should setup a task on Drupal. - There is code emitting '<div align="right">' which doesn't validate. - Does our XML feeds validate with the charset changes? - The forum module's SQL doesn't work properly on PostgreSQL.4.2.x
parent
3151a1cb71
commit
355d25e73d
|
@ -354,7 +354,7 @@ CREATE TABLE [dbo].[vocabulary] (
|
|||
[hierarchy] [tinyint] NOT NULL ,
|
||||
[multiple] [tinyint] NOT NULL ,
|
||||
[required] [tinyint] NOT NULL ,
|
||||
[types] [text] NULL ,
|
||||
[nodes] [text] NULL ,
|
||||
[weight] [smallint] NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
|
|
|
@ -528,7 +528,7 @@ CREATE TABLE vocabulary (
|
|||
hierarchy tinyint(3) unsigned NOT NULL default '0',
|
||||
multiple tinyint(3) unsigned NOT NULL default '0',
|
||||
required tinyint(3) unsigned NOT NULL default '0',
|
||||
types text,
|
||||
nodes text,
|
||||
weight tinyint(4) NOT NULL default '0',
|
||||
PRIMARY KEY (vid)
|
||||
) TYPE=MyISAM;
|
||||
|
|
|
@ -530,7 +530,7 @@ CREATE TABLE vocabulary (
|
|||
hierarchy smallint NOT NULL default '0',
|
||||
multiple smallint NOT NULL default '0',
|
||||
required smallint NOT NULL default '0',
|
||||
types text default '',
|
||||
nodes text default '',
|
||||
weight smallint NOT NULL default '0',
|
||||
PRIMARY KEY (vid)
|
||||
);
|
||||
|
|
|
@ -453,11 +453,8 @@ function drupal_goto($url) {
|
|||
*/
|
||||
|
||||
function referer_save() {
|
||||
global $referer;
|
||||
|
||||
if (!strstr($_SERVER["HTTP_REFERER"], request_uri())) {
|
||||
$referer = $_SERVER["HTTP_REFERER"];
|
||||
session_register("referer");
|
||||
$_SESSION["referer"] = $_SERVER["HTTP_REFERER"];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -466,10 +463,8 @@ function referer_save() {
|
|||
*/
|
||||
|
||||
function referer_load() {
|
||||
global $referer;
|
||||
|
||||
if (session_is_registered("referer")) {
|
||||
return $referer;
|
||||
if (isset($_SESSION["referer"])) {
|
||||
return $_SESSION["referer"];
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
|
@ -608,12 +603,12 @@ function format_rss_channel($title, $link, $description, $items, $language = "en
|
|||
// arbitrary elements may be added using the $args associative array
|
||||
|
||||
$output .= "<channel>\n";
|
||||
$output .= " <title>". htmlentities(strip_tags($title)) ."</title>\n";
|
||||
$output .= " <link>". htmlentities(strip_tags($link)) ."</link>\n";
|
||||
$output .= " <description>". htmlentities($description) ."</description>\n";
|
||||
$output .= " <language>". htmlentities(strip_tags($language)) ."</language>\n";
|
||||
$output .= " <title>". htmlspecialchars(strip_tags($title)) ."</title>\n";
|
||||
$output .= " <link>". htmlspecialchars(strip_tags($link)) ."</link>\n";
|
||||
$output .= " <description>". htmlspecialchars($description) ."</description>\n";
|
||||
$output .= " <language>". htmlspecialchars(strip_tags($language)) ."</language>\n";
|
||||
foreach ($args as $key => $value) {
|
||||
$output .= "<$key>". htmlentities(strip_tags($value)) ."</$key>";
|
||||
$output .= "<$key>". htmlspecialchars(strip_tags($value)) ."</$key>";
|
||||
}
|
||||
$output .= $items;
|
||||
$output .= "</channel>\n";
|
||||
|
@ -625,11 +620,11 @@ function format_rss_item($title, $link, $description, $args = array()) {
|
|||
// arbitrary elements may be added using the $args associative array
|
||||
|
||||
$output .= "<item>\n";
|
||||
$output .= " <title>". htmlentities(strip_tags($title)) ."</title>\n";
|
||||
$output .= " <link>". htmlentities(strip_tags($link)) ."</link>\n";
|
||||
$output .= " <description>". htmlentities(check_output($description)) ."</description>\n";
|
||||
$output .= " <title>". htmlspecialchars(strip_tags($title)) ."</title>\n";
|
||||
$output .= " <link>". htmlspecialchars(strip_tags($link)) ."</link>\n";
|
||||
$output .= " <description>". htmlspecialchars(check_output($description)) ."</description>\n";
|
||||
foreach ($args as $key => $value) {
|
||||
$output .= "<$key>". htmlentities(strip_tags($value)) ."</$key>";
|
||||
$output .= "<$key>". htmlspecialchars(strip_tags($value)) ."</$key>";
|
||||
}
|
||||
$output .= "</item>\n";
|
||||
|
||||
|
@ -1004,6 +999,9 @@ $conf = variable_init(isset($conf) ? $conf : array());
|
|||
// set error handler:
|
||||
set_error_handler("error_handler");
|
||||
|
||||
// spit out the correct charset http header
|
||||
header("Content-Type: text/html; charset=". variable_get("charset", "iso-8859-1"));
|
||||
|
||||
// initialize installed modules:
|
||||
module_init();
|
||||
|
||||
|
|
|
@ -31,13 +31,13 @@ function pager_display($tags = "", $limit = 10, $element = 0, $type = "default",
|
|||
function pager_display_default($tags = "", $limit = 10, $element = 0, $attributes = array()) {
|
||||
global $pager_total;
|
||||
if ($pager_total[$element] > $limit) {
|
||||
$output .= "<div align=\"center\"><table cellpadding=\"10\"><tbody><tr>";
|
||||
$output .= "<td align=\"center\">". pager_first(($tags[0] ? $tags[0] : t("first page")), $limit, $element, $attributes) ."</td>";
|
||||
$output .= "<td align=\"center\">". pager_previous(($tags[1] ? $tags[1] : t("previous page")), $limit, $element, 1, $attributes) ."</td>";
|
||||
$output .= "<td align=\"center\">". pager_list($limit, $element, ($tags[2] ? $tags[2] : 9 ), "", $attributes) ."</td>";
|
||||
$output .= "<td align=\"center\">". pager_next(($tags[3] ? $tags[3] : t("next page")), $limit, $element, 1, $attributes) ."</td>";
|
||||
$output .= "<td align=\"center\">". pager_last(($tags[4] ? $tags[4] : t("last page")), $limit, $element, $attributes) ."</td>";
|
||||
$output .= "</tr></tbody></table></div>";
|
||||
$output .= "<div id=\"pager\" class=\"container-inline\">";
|
||||
$output .= "<div>". pager_first(($tags[0] ? $tags[0] : t("first page")), $limit, $element, $attributes) ."</div>";
|
||||
$output .= "<div>". pager_previous(($tags[1] ? $tags[1] : t("previous page")), $limit, $element, 1, $attributes) ."</div>";
|
||||
$output .= "<div>". pager_list($limit, $element, ($tags[2] ? $tags[2] : 9 ), "", $attributes) ."</div>";
|
||||
$output .= "<div>". pager_next(($tags[3] ? $tags[3] : t("next page")), $limit, $element, 1, $attributes) ."</div>";
|
||||
$output .= "<div>". pager_last(($tags[4] ? $tags[4] : t("last page")), $limit, $element, $attributes) ."</div>";
|
||||
$output .= "</div>";
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ function theme_mark() {
|
|||
** Return a marker. Used to indicate new comments or required form
|
||||
** fields.
|
||||
*/
|
||||
return "<span style=\"color: red;\">*</span>";
|
||||
return "<span class=\"marker\">*</span>";
|
||||
}
|
||||
|
||||
function theme_item_list($items = array(), $title = NULL) {
|
||||
|
@ -119,7 +119,7 @@ function theme_error($message) {
|
|||
/*
|
||||
** Return an error message.
|
||||
*/
|
||||
return "<div style=\"color: red;\">$message</div>";
|
||||
return "<div class=\"error\">$message</div>";
|
||||
}
|
||||
|
||||
function theme_list($refresh = 0) {
|
||||
|
@ -144,6 +144,7 @@ function theme_list($refresh = 0) {
|
|||
|
||||
function theme_head($main = 0) {
|
||||
global $base_url;
|
||||
$output .= "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=". variable_get("site_charset", "iso-8859-1") ."\" />";
|
||||
$output .= "<base href=\"$base_url/\" />\n";
|
||||
$output .= "<style type=\"text/css\">\n";
|
||||
$output .= "@import url(misc/drupal.css);\n";
|
||||
|
|
|
@ -36,24 +36,26 @@ table {
|
|||
}
|
||||
th {
|
||||
text-align: left;
|
||||
padding-right: 1em;
|
||||
color: #006;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
tr.dark {
|
||||
background-color: #ddd;
|
||||
}
|
||||
tr.light {
|
||||
background-color: #eee;
|
||||
}
|
||||
td {
|
||||
padding: 5px;
|
||||
font-size: 90%;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
hr {
|
||||
clear: both;
|
||||
margin: .5em 0;
|
||||
height: 1px;
|
||||
color: #ccc;
|
||||
}
|
||||
dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
dd {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
#menu {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
|
@ -115,6 +117,13 @@ hr {
|
|||
padding: 1em 1em 1em 0;
|
||||
z-index: 2;
|
||||
}
|
||||
#logo {
|
||||
padding: 1em 1em 0 1em;
|
||||
float: right;
|
||||
}
|
||||
#logo img {
|
||||
border: 0;
|
||||
}
|
||||
#update {
|
||||
padding: 1em 1em 1em 1em;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
form { margin: 0; padding: 0;}
|
||||
|
||||
#tracker table { border-collapse: collapse; }
|
||||
#tracker td { vertical-align: top; padding: 1em; }
|
||||
#tracker td ul { margin-top: 0; margin-bottom: 0; }
|
||||
#tracker td ul a { font-weight: normal; }
|
||||
#tracker th { text-align: left; padding: 0.25em 1em; }
|
||||
|
||||
#pager { text-align: center; }
|
||||
#pager div { padding: 0.5em; }
|
||||
|
||||
.queue-user-numeral { color: red; }
|
||||
|
||||
.calendar .row-week td a { display: block; }
|
||||
.calendar .row-week td a:hover { background-color: #888; color: #fff; }
|
||||
.calendar a { text-decoration: none; }
|
||||
|
@ -15,7 +22,7 @@
|
|||
|
||||
.form-item .description { font-size: 0.85em; }
|
||||
.form-item .title { font-weight: bold; margin-top: 1.1em; margin-bottom: 1px; }
|
||||
.form-submit { margin-top: 1em; }
|
||||
.form-submit { margin: 0.5em 0; }
|
||||
|
||||
.item-list .icon { color: #555; float: right; padding-left: 0.25em; }
|
||||
.item-list .icon a { color: #000; text-decoration: none; }
|
||||
|
@ -30,6 +37,18 @@
|
|||
.poll .links { text-align: center; }
|
||||
.poll .percent { text-align: right; }
|
||||
.poll .total { text-align: center; }
|
||||
.poll .vote-form { text-align: center; }
|
||||
|
||||
.poll .vote-form .choices { text-align: left; margin: 0 auto; display: table; }
|
||||
|
||||
.node-form .admin { float: right; width: 14em; margin-top: -1.1em; }
|
||||
.node-form .standard { margin-right: 14em; }
|
||||
.node-form .form-text { width: 95%; }
|
||||
.node-form textarea { width: 95%; }
|
||||
|
||||
.marker { color: #f00; }
|
||||
.error { color: #f00; }
|
||||
.ok { color: #080; }
|
||||
|
||||
.user-login-block { text-align: center; }
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ function admin_page() {
|
|||
<html>
|
||||
<head>
|
||||
<title><?php echo variable_get("site_name", "drupal") . " " . t("administration pages"); ?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<?php print theme_head(); ?>
|
||||
<link rel="stylesheet" type="text/css" media="print" href="misc/print.css" />
|
||||
<style type="text/css" title="layout" media="Screen">
|
||||
|
@ -58,7 +57,7 @@ function admin_page() {
|
|||
** Body:
|
||||
*/
|
||||
|
||||
print "<a href=\"http://drupal.org/\"><img align=\"right\" src=\"misc/druplicon-small.gif\" alt=\"Druplicon - Drupal logo\" border=\"0\" /></a>";
|
||||
print "<div id=\"logo\"><a href=\"http://drupal.org/\"><img src=\"misc/druplicon-small.gif\" alt=\"Druplicon - Drupal logo\" /></a></div>";
|
||||
print "<div id=\"main\">";
|
||||
|
||||
if ($path = menu_path()) {
|
||||
|
|
|
@ -711,8 +711,8 @@ function import_page_fd() {
|
|||
|
||||
while ($feed = db_fetch_object($result)) {
|
||||
$output .= "<channel>\n";
|
||||
$output .= " <title>". htmlentities($feed->title) ."</title>\n";
|
||||
$output .= " <link>". htmlentities($feed->url) ."</link>\n";
|
||||
$output .= " <title>". htmlspecialchars($feed->title) ."</title>\n";
|
||||
$output .= " <link>". htmlspecialchars($feed->url) ."</link>\n";
|
||||
$output .= "</channel>\n\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -711,8 +711,8 @@ function import_page_fd() {
|
|||
|
||||
while ($feed = db_fetch_object($result)) {
|
||||
$output .= "<channel>\n";
|
||||
$output .= " <title>". htmlentities($feed->title) ."</title>\n";
|
||||
$output .= " <link>". htmlentities($feed->url) ."</link>\n";
|
||||
$output .= " <title>". htmlspecialchars($feed->title) ."</title>\n";
|
||||
$output .= " <link>". htmlspecialchars($feed->url) ."</link>\n";
|
||||
$output .= "</channel>\n\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -823,7 +823,7 @@ function comment_admin_overview($status = 0) {
|
|||
|
||||
$header = array(t("subject"), t("author"), t("status"), array("data" => t("operations"), "colspan" => 2));
|
||||
while ($comment = db_fetch_object($result)) {
|
||||
$rows[] = array(l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid", array("title" => htmlentities(substr($comment->comment, 0, 128)))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme_mark() : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."</td><td>". l(t("edit comment"), "admin/comment/edit/$comment->cid"), l(t("delete comment"), "admin/comment/delete/$comment->cid"));
|
||||
$rows[] = array(l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid", array("title" => htmlspecialchars(substr($comment->comment, 0, 128)))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme_mark() : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."</td><td>". l(t("edit comment"), "admin/comment/edit/$comment->cid"), l(t("delete comment"), "admin/comment/delete/$comment->cid"));
|
||||
}
|
||||
|
||||
if ($pager = pager_display(NULL, 50, 0, "admin")) {
|
||||
|
@ -996,8 +996,6 @@ function comment_mod_filters($edit) {
|
|||
|
||||
|
||||
function comment_admin() {
|
||||
global $id, $mod, $keys, $order, $status, $comment_page, $comment_settings;
|
||||
|
||||
$op = $_POST["op"];
|
||||
$edit = $_POST["edit"];
|
||||
|
||||
|
@ -1050,18 +1048,10 @@ function comment_admin() {
|
|||
break;
|
||||
case t("Delete"):
|
||||
print status(comment_delete($edit));
|
||||
if (session_is_registered("comment_settings")) {
|
||||
$status = $comment_settings["status"];
|
||||
$comment_page = $comment_settings["comment_page"];
|
||||
}
|
||||
print comment_admin_overview(0);
|
||||
break;
|
||||
case t("Submit"):
|
||||
print status(comment_save(check_query(arg(3)), $edit));
|
||||
if (session_is_registered("comment_settings")) {
|
||||
$status = $comment_settings["status"];
|
||||
$comment_page = $comment_settings["comment_page"];
|
||||
}
|
||||
print comment_admin_overview(0);
|
||||
break;
|
||||
default:
|
||||
|
@ -1189,20 +1179,19 @@ function comment_moderation_form($comment) {
|
|||
return $output;
|
||||
}
|
||||
|
||||
function comment($comment, $link = 0) {
|
||||
$output .= "<div style=\"border: 1px solid; padding: 10px;\">";
|
||||
$output .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
|
||||
$output .= " <tr><td><div style=\"font-size: 110%; font-weight: bold;\">$comment->subject ". ($comment->new ? theme("theme_mark") : "") ."</div></td><td align=\"right\" rowspan=\"2\" valign=\"top\">". $comment->moderation ."</td></tr>";
|
||||
$output .= " <tr><td><div style=\"margin-left: 10px; padding-bottom: 10px; font-size: 90%;\">". t("by %a on %b", array("%a" => format_name($comment), "%b" => format_date($comment->timestamp))) ."</div></td></tr>";
|
||||
$output .= " <tr><td colspan=\"2\">". check_output($comment->comment) ."</td></tr>";
|
||||
$output .= " <tr><td align=\"right\" colspan=\"2\">$link</td></tr>";
|
||||
$output .= "</table>";
|
||||
$output .= "</div><br />";
|
||||
function comment($comment, $links = 0) {
|
||||
$output .= "<div class=\"comment\">";
|
||||
$output .= "<div class=\"subject\">$comment->subject". ($comment->new ? " ". theme("theme_mark") : "") ."</div>";
|
||||
$output .= "<div class=\"moderation\">". $comment->moderation ."</div>";
|
||||
$output .= "<div class=\"credit\">". t("by %a on %b", array("%a" => format_name($comment), "%b" => format_date($comment->timestamp))) ."</div>";
|
||||
$output .= "<div class=\"body\">". check_output($comment->comment) ."</div";
|
||||
$output .= "<div class=\"links\">$links</div>";
|
||||
$output .= "</div>";
|
||||
print $output;
|
||||
}
|
||||
|
||||
function comment_folded($comment) {
|
||||
print "<p>". l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid") ." <small>". t("by") . " " . format_name($comment) ."</small></p>";
|
||||
print "<div class=\"comment-folded\"><span class=\"subject\">". l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid") ."</span> <span class=\"credit\">". t("by") . " " . format_name($comment) ."</span></div>";
|
||||
}
|
||||
|
||||
function comment_flat_collapsed($comments, $threshold) {
|
||||
|
|
|
@ -823,7 +823,7 @@ function comment_admin_overview($status = 0) {
|
|||
|
||||
$header = array(t("subject"), t("author"), t("status"), array("data" => t("operations"), "colspan" => 2));
|
||||
while ($comment = db_fetch_object($result)) {
|
||||
$rows[] = array(l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid", array("title" => htmlentities(substr($comment->comment, 0, 128)))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme_mark() : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."</td><td>". l(t("edit comment"), "admin/comment/edit/$comment->cid"), l(t("delete comment"), "admin/comment/delete/$comment->cid"));
|
||||
$rows[] = array(l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid", array("title" => htmlspecialchars(substr($comment->comment, 0, 128)))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme_mark() : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."</td><td>". l(t("edit comment"), "admin/comment/edit/$comment->cid"), l(t("delete comment"), "admin/comment/delete/$comment->cid"));
|
||||
}
|
||||
|
||||
if ($pager = pager_display(NULL, 50, 0, "admin")) {
|
||||
|
@ -996,8 +996,6 @@ function comment_mod_filters($edit) {
|
|||
|
||||
|
||||
function comment_admin() {
|
||||
global $id, $mod, $keys, $order, $status, $comment_page, $comment_settings;
|
||||
|
||||
$op = $_POST["op"];
|
||||
$edit = $_POST["edit"];
|
||||
|
||||
|
@ -1050,18 +1048,10 @@ function comment_admin() {
|
|||
break;
|
||||
case t("Delete"):
|
||||
print status(comment_delete($edit));
|
||||
if (session_is_registered("comment_settings")) {
|
||||
$status = $comment_settings["status"];
|
||||
$comment_page = $comment_settings["comment_page"];
|
||||
}
|
||||
print comment_admin_overview(0);
|
||||
break;
|
||||
case t("Submit"):
|
||||
print status(comment_save(check_query(arg(3)), $edit));
|
||||
if (session_is_registered("comment_settings")) {
|
||||
$status = $comment_settings["status"];
|
||||
$comment_page = $comment_settings["comment_page"];
|
||||
}
|
||||
print comment_admin_overview(0);
|
||||
break;
|
||||
default:
|
||||
|
@ -1189,20 +1179,19 @@ function comment_moderation_form($comment) {
|
|||
return $output;
|
||||
}
|
||||
|
||||
function comment($comment, $link = 0) {
|
||||
$output .= "<div style=\"border: 1px solid; padding: 10px;\">";
|
||||
$output .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
|
||||
$output .= " <tr><td><div style=\"font-size: 110%; font-weight: bold;\">$comment->subject ". ($comment->new ? theme("theme_mark") : "") ."</div></td><td align=\"right\" rowspan=\"2\" valign=\"top\">". $comment->moderation ."</td></tr>";
|
||||
$output .= " <tr><td><div style=\"margin-left: 10px; padding-bottom: 10px; font-size: 90%;\">". t("by %a on %b", array("%a" => format_name($comment), "%b" => format_date($comment->timestamp))) ."</div></td></tr>";
|
||||
$output .= " <tr><td colspan=\"2\">". check_output($comment->comment) ."</td></tr>";
|
||||
$output .= " <tr><td align=\"right\" colspan=\"2\">$link</td></tr>";
|
||||
$output .= "</table>";
|
||||
$output .= "</div><br />";
|
||||
function comment($comment, $links = 0) {
|
||||
$output .= "<div class=\"comment\">";
|
||||
$output .= "<div class=\"subject\">$comment->subject". ($comment->new ? " ". theme("theme_mark") : "") ."</div>";
|
||||
$output .= "<div class=\"moderation\">". $comment->moderation ."</div>";
|
||||
$output .= "<div class=\"credit\">". t("by %a on %b", array("%a" => format_name($comment), "%b" => format_date($comment->timestamp))) ."</div>";
|
||||
$output .= "<div class=\"body\">". check_output($comment->comment) ."</div";
|
||||
$output .= "<div class=\"links\">$links</div>";
|
||||
$output .= "</div>";
|
||||
print $output;
|
||||
}
|
||||
|
||||
function comment_folded($comment) {
|
||||
print "<p>". l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid") ." <small>". t("by") . " " . format_name($comment) ."</small></p>";
|
||||
print "<div class=\"comment-folded\"><span class=\"subject\">". l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid") ."</span> <span class=\"credit\">". t("by") . " " . format_name($comment) ."</span></div>";
|
||||
}
|
||||
|
||||
function comment_flat_collapsed($comments, $threshold) {
|
||||
|
|
|
@ -63,7 +63,7 @@ function forum_settings() {
|
|||
|
||||
function forum_taxonomy($op, $type, $object) {
|
||||
if ($type == "vocabulary" && ($op == "insert" || $op == "update")) {
|
||||
if (variable_get("forum_nav_vocabulary", "") == "" && in_array("forum", $object["types"])) {
|
||||
if (variable_get("forum_nav_vocabulary", "") == "" && in_array("forum", $object["nodes"])) {
|
||||
// since none is already set, silently set this vocabulary as the navigation vocabulary
|
||||
variable_set("forum_nav_vocabulary", $object["vid"]);
|
||||
}
|
||||
|
@ -452,11 +452,10 @@ function _forum_message_taxonomy() {
|
|||
function forum_page() {
|
||||
global $sortby, $forum_per_page, $from, $user;
|
||||
$op = $_POST["op"];
|
||||
|
||||
print "WOOOT";
|
||||
if (user_access("access content")) {
|
||||
if (module_exist("taxonomy")) {
|
||||
$tid = arg(1);
|
||||
|
||||
if ($op == "Update settings" && $user->uid) {
|
||||
$user = user_save($user, array("sortby" => $sortby, "forum_per_page" => $forum_per_page));
|
||||
}
|
||||
|
@ -477,7 +476,9 @@ function forum_page() {
|
|||
|
||||
$offset = ($from / $forum_per_page) + 1;
|
||||
|
||||
|
||||
$forums = forum_get_forums($tid);
|
||||
|
||||
$parents = forum_get_parents($tid);
|
||||
if ($tid && !in_array($tid, variable_get("forum_containers", array()))) {
|
||||
$topics = forum_get_topics($tid, $sortby, $forum_per_page);
|
||||
|
|
|
@ -63,7 +63,7 @@ function forum_settings() {
|
|||
|
||||
function forum_taxonomy($op, $type, $object) {
|
||||
if ($type == "vocabulary" && ($op == "insert" || $op == "update")) {
|
||||
if (variable_get("forum_nav_vocabulary", "") == "" && in_array("forum", $object["types"])) {
|
||||
if (variable_get("forum_nav_vocabulary", "") == "" && in_array("forum", $object["nodes"])) {
|
||||
// since none is already set, silently set this vocabulary as the navigation vocabulary
|
||||
variable_set("forum_nav_vocabulary", $object["vid"]);
|
||||
}
|
||||
|
@ -452,11 +452,10 @@ function _forum_message_taxonomy() {
|
|||
function forum_page() {
|
||||
global $sortby, $forum_per_page, $from, $user;
|
||||
$op = $_POST["op"];
|
||||
|
||||
print "WOOOT";
|
||||
if (user_access("access content")) {
|
||||
if (module_exist("taxonomy")) {
|
||||
$tid = arg(1);
|
||||
|
||||
if ($op == "Update settings" && $user->uid) {
|
||||
$user = user_save($user, array("sortby" => $sortby, "forum_per_page" => $forum_per_page));
|
||||
}
|
||||
|
@ -477,7 +476,9 @@ function forum_page() {
|
|||
|
||||
$offset = ($from / $forum_per_page) + 1;
|
||||
|
||||
|
||||
$forums = forum_get_forums($tid);
|
||||
|
||||
$parents = forum_get_parents($tid);
|
||||
if ($tid && !in_array($tid, variable_get("forum_containers", array()))) {
|
||||
$topics = forum_get_topics($tid, $sortby, $forum_per_page);
|
||||
|
|
|
@ -711,8 +711,8 @@ function import_page_fd() {
|
|||
|
||||
while ($feed = db_fetch_object($result)) {
|
||||
$output .= "<channel>\n";
|
||||
$output .= " <title>". htmlentities($feed->title) ."</title>\n";
|
||||
$output .= " <link>". htmlentities($feed->url) ."</link>\n";
|
||||
$output .= " <title>". htmlspecialchars($feed->title) ."</title>\n";
|
||||
$output .= " <link>". htmlspecialchars($feed->url) ."</link>\n";
|
||||
$output .= "</channel>\n\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ function jabber_data($parser, $data) {
|
|||
|
||||
function jabber_send($session, $message) {
|
||||
|
||||
// print "SEND: ". htmlentities($message) ."<br />";
|
||||
// print "SEND: ". htmlspecialchars($message) ."<br />";
|
||||
|
||||
fwrite($session, $message, strlen($message));
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ function jabber_recv($session, $timout = 50) {
|
|||
}
|
||||
|
||||
if ($message) {
|
||||
// print "RECV: ". htmlentities($message) ."<br />";
|
||||
// print "RECV: ". htmlspecialchars($message) ."<br />";
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
@ -180,4 +180,4 @@ function jabber_user($type, $edit, $user) {
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -103,7 +103,7 @@ function locale_edit($lid) {
|
|||
$result = db_query("SELECT * FROM locales WHERE lid = '$lid'");
|
||||
if ($translation = db_fetch_object($result)) {
|
||||
|
||||
$form .= form_item(t("Original text"), wordwrap(htmlentities($translation->string)));
|
||||
$form .= form_item(t("Original text"), wordwrap(htmlspecialchars($translation->string)));
|
||||
|
||||
foreach ($languages as $code=>$language) {
|
||||
$form .= (strlen($translation->string) > 30) ? form_textarea($language, $code, $translation->$code, 50, 10) : form_textfield($language, $code, $translation->$code, 50, 128);
|
||||
|
@ -126,16 +126,15 @@ function locale_languages($translation) {
|
|||
}
|
||||
|
||||
function locale_seek() {
|
||||
global $id, $languages, $locale_settings;
|
||||
global $id, $languages;
|
||||
$op = $_POST["op"];
|
||||
$edit = $_POST["edit"];
|
||||
|
||||
if ($op != 'overview' && !$edit && session_is_registered("locale_settings")) {
|
||||
$edit = $locale_settings;
|
||||
if ($op != 'overview' && !$edit && isset($_SESSION["locale_settings"])) {
|
||||
$edit = $_SESSION["locale_settings"];
|
||||
}
|
||||
else {
|
||||
$locale_settings = $edit;
|
||||
session_register("locale_settings");
|
||||
$_SESSION["locale_settings"] = $edit;
|
||||
}
|
||||
|
||||
if (is_array($edit)) {
|
||||
|
|
|
@ -103,7 +103,7 @@ function locale_edit($lid) {
|
|||
$result = db_query("SELECT * FROM locales WHERE lid = '$lid'");
|
||||
if ($translation = db_fetch_object($result)) {
|
||||
|
||||
$form .= form_item(t("Original text"), wordwrap(htmlentities($translation->string)));
|
||||
$form .= form_item(t("Original text"), wordwrap(htmlspecialchars($translation->string)));
|
||||
|
||||
foreach ($languages as $code=>$language) {
|
||||
$form .= (strlen($translation->string) > 30) ? form_textarea($language, $code, $translation->$code, 50, 10) : form_textfield($language, $code, $translation->$code, 50, 128);
|
||||
|
@ -126,16 +126,15 @@ function locale_languages($translation) {
|
|||
}
|
||||
|
||||
function locale_seek() {
|
||||
global $id, $languages, $locale_settings;
|
||||
global $id, $languages;
|
||||
$op = $_POST["op"];
|
||||
$edit = $_POST["edit"];
|
||||
|
||||
if ($op != 'overview' && !$edit && session_is_registered("locale_settings")) {
|
||||
$edit = $locale_settings;
|
||||
if ($op != 'overview' && !$edit && isset($_SESSION["locale_settings"])) {
|
||||
$edit = $_SESSION["locale_settings"];
|
||||
}
|
||||
else {
|
||||
$locale_settings = $edit;
|
||||
session_register("locale_settings");
|
||||
$_SESSION["locale_settings"] = $edit;
|
||||
}
|
||||
|
||||
if (is_array($edit)) {
|
||||
|
|
|
@ -4,18 +4,30 @@
|
|||
function node_help() {
|
||||
global $mod;
|
||||
|
||||
$output .= "<h3>Nodes</h3>The core of the Drupal system is the node. All of the contents of the system are placed in nodes, or extensions of nodes.";
|
||||
$output .= "A base node contains:<ul><li>A Title - Up to 128 characters of text that titles the node.</li><li>A Teaser - A small block of text that is ment to get you interested in the rest of node. Drupal automatically pulls a small amount of the body of the node to make the teaser (To configure how long the teaser will be ". l("click here","admin/system/modules/node") ."). The teaser can be changed if you don't like what Drupal grabs</li><li>The Body - This is it, the heart of the matter. Your text, what we want to read.</li><li>A Type - What kind of node is this? Blog, book, forum, comment, unextended, etc.</li><li>An Author - The author's name. It will either be \"anonymous\" or a valid user. You <i>cannot</i> set it to an arbitrary value.</li>";
|
||||
$output .= "<li>Authored on - The date it was written on.</li><li>Changed - The last time this node was changed</li><li>Static on front page - The front page is configured to show the teaser's from only a few of the total nodes you have on your site (To configure how many teaser ". l("click here","admin/system/modules/node") ."), but if you think a node is important enough that you want it to stay on the front page enable this.</li><li>Allow user comments - A node can have comments, which are other nodes. These comments can be written by other users (Read-write), or only by admins (Read-only).</li>";
|
||||
$output .= "<li>Attributes - A way to sort nodes.</li><li>revisions - Drupal has a revision system so that you can \"roll back\" to an older version of a node if the new version is not what you want.</li><li>Promote to front page - To get people to look at the new stuff on your site you want to move it to the front page. So promote it too the front page.</li>";
|
||||
$output .= "<li>Moderation Status - Drupal has a moderation system. If it is active, a node is in one of three states. Approved and Published, Approved and UnPublished, and Awaiting Approval. If you are <b>not</b> moderating a node it should be Approved</li><li>votes - If you are moderating a node this counts how many votes the node has gotten. Once a node gets a certain number of vote if will either be Approved, or Dropped (To setup the number of votes needed and the promote and dump scores ". l("click here","admin/system/modules/queue") .".)</a>.</li><li>score - The score of the node is gotten by the votes it is given.</li>";
|
||||
$output .= "<li>users - The list of users who have voted on a moderated node.</li><li>Public/Published - When using Drupal's moderation system a node remains UnPublished -- unavaliable to non-moderators -- until it is marked Public/Published.</li></ul>";
|
||||
$output .= "Now that you know what is in a node, here are some of the types of nodes avalible:";
|
||||
$output .= "<h3>Nodes</h3>The core of the Drupal system is the node. All of the contents of the system are placed in nodes, or extensions of nodes. ";
|
||||
$output .= "A base node contains:<dl>";
|
||||
$output .= "<dt>A Title</dt><dd>Up to 128 characters of text that titles the node.</dd>";
|
||||
$output .= "<dt>A Teaser</dt><dd>A small block of text that is meant to get you interested in the rest of node. Drupal automatically pulls a small amount of the body of the node to make the teaser (To configure how long the teaser will be ". l("click here","admin/system/modules/node") ."). The teaser can be changed if you don't like what Drupal grabs.</dd>";
|
||||
$output .= "<dt>The Body</dt><dd>The main text that comprises your content.</dd>";
|
||||
$output .= "<dt>A Type</dt><dd>What kind of node is this? Blog, book, forum, comment, unextended, etc.</dd>";
|
||||
$output .= "<dt>An Author</dt><dd>The author's name. It will either be \"anonymous\" or a valid user. You <i>cannot</i> set it to an arbitrary value.</dd>";
|
||||
$output .= "<dt>Authored on</dt><dd>The date it was written on.</dd>";
|
||||
$output .= "<dt>Changed</dt><dd>The last time this node was changed.</dd>";
|
||||
$output .= "<dt>Static on front page</dt><dd>The front page is configured to show the teasers from only a few of the total nodes you have on your site (To configure how many teasers ". l("click here","admin/system/modules/node") ."), but if you think a node is important enough that you want it to stay on the front page enable this.</dd>";
|
||||
$output .= "<dt>Allow user comments</dt><dd>A node can have comments, which are other nodes. These comments can be written by other users (Read-write), or only by admins (Read-only).</dd>";
|
||||
$output .= "<dt>Attributes</dt><dd>A way to sort nodes.</dd><dt>Revisions</dt><dd>Drupal has a revision system so that you can \"roll back\" to an older version of a node if the new version is not what you want.</dd>";
|
||||
$output .= "<dt>Promote to front page</dt><dd>To get people to look at the new stuff on your site you can choose to move it to the front page.</dd>";
|
||||
$output .= "<dt>Approved</dt><dd>Drupal has a moderation system. If it is active, a node is in one of three states: approved and published, approved and unpublished, and awaiting approval. If you are <b>not</b> moderating a node it should be approved.</dd>";
|
||||
$output .= "<dt>Votes</dt><dd>If you are moderating a node this counts how many votes the node has gotten. Once a node gets a certain number of vote if will either be Approved, or Dropped (To setup the number of votes needed and the promote and dump scores ". l("click here","admin/system/modules/queue") .".)</a>.</dd>";
|
||||
$output .= "<dt>Score</dt><dd>The score of the node is gotten by the votes it is given.</dd>";
|
||||
$output .= "<dt>Users</dt><dd>The list of users who have voted on a moderated node.</dd>";
|
||||
$output .= "<dt>Published</dt><dd>When using Drupal's moderation system a node remains unpublished -- unavaliable to non-moderators -- until it is marked Published.</dd></dl>";
|
||||
$output .= "<p>Now that you know what is in a node, here are some of the types of nodes available.</p>";
|
||||
|
||||
if ($mod == "admin") {
|
||||
foreach (module_list() as $name) {
|
||||
if (module_hook($name, "node") && $name != "node") {
|
||||
$output .= "<h3>". t("%module type", array("%module" => ucfirst(module_invoke($name, "node", "name")))). "</h3>";
|
||||
$output .= "<h3>". t("Node type: %module", array("%module" => module_invoke($name, "node", "name"))). "</h3>";
|
||||
$output .= module_invoke($name, "help");
|
||||
|
||||
}
|
||||
|
@ -461,7 +473,7 @@ function node_search($keys) {
|
|||
}
|
||||
|
||||
function node_settings() {
|
||||
$output .= form_select(t("Number of posts on main page"), "default_nodes_main", variable_get("default_nodes_main", 10), array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30), t("The default maximum number of posts to display on overview pages such as the main page."));
|
||||
$output .= form_select(t("Number of posts on main page"), "default_nodes_main", variable_get("default_nodes_main", 10), array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30), t("The default maximum number of posts to display per page on overview pages such as the main page."));
|
||||
$output .= form_select(t("Length of trimmed posts"), "teaser_length", variable_get("teaser_length", 600), array(0 => t("Unlimited"), 200 => t("200 characters"), 400 => t("400 characters"), 600 => t("600 characters"), 800 => t("800 characters"), 1000 => t("1000 characters"), 1200 => t("1200 characters"), 1400 => t("1400 characters"), 1600 => t("1600 characters"), 1800 => t("1800 characters"), 2000 => t("2000 characters")), t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'."));
|
||||
$output .= form_select(t("Preview post"), "node_preview", variable_get("node_preview", 0), array(t("Optional"), t("Required")), t("Must users preview posts before submitting?"));
|
||||
return $output;
|
||||
|
@ -469,7 +481,7 @@ function node_settings() {
|
|||
|
||||
function node_conf_filters() {
|
||||
$output .= form_select(t("Filter HTML tags"), "filter_html", variable_get("filter_html", 0), array(t("Disabled"), t("Enabled")), t("Filter HTML and PHP tags in user-contributed content."));
|
||||
$output .= form_textfield(t("Allowed HTML tags"), "allowed_html", variable_get("allowed_html", "<a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul>"), 64, 255, t("If enabled, optionally specify tags which should not be stripped. 'STYLE' attributes, 'ON' attributes and unclosed tags are always stripped."));
|
||||
$output .= form_textfield(t("Allowed HTML tags"), "allowed_html", variable_get("allowed_html", "<a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul>"), 64, 255, t("If enabled, optionally specify tags which should not be stripped. 'STYLE' attributes, 'ON*' attributes and unclosed tags are always stripped."));
|
||||
$output .= form_select(t("Rewrite old URLs"), "rewrite_old_urls", variable_get("rewrite_old_urls", 0), array(t("Disabled"), t("Enabled")), t("The introduction of 'clean URLs' in Drupal 4.2.0 breaks internal URLs that date back from Drupal 4.1.0 and before. If enabled, this filter will attempt to rewrite the old style URLs to avoid broken links. If <code>mod_rewrite</code> is available on your system, use the rewrite rules in Drupal's <code>.htaccess</code> file instead as these will also correct external referrers."));
|
||||
$output .= "<hr />";
|
||||
return $output;
|
||||
|
@ -533,12 +545,12 @@ function node_link($type, $node = 0, $main = 0) {
|
|||
}
|
||||
|
||||
if ($type == "admin" && user_access("administer nodes")) {
|
||||
- $help["overview"] = t("Below is a list of all of the nodes in your site. Other content, such as ". l("comments", "admin/comment") .", are delt with in other areas.<br />Click on a node title to view the node, the author name to edit the author's user information.<br />Other work with nodes can be done with the menu on the left.");
|
||||
- $help["post-overview"] = t("Click on <a href=\"%nup\">new or updated posts</a> to see your latest nodes, or <a href=\"%queue\">approval queue</a> to approve new messages.", array("%nup" => url("admin/nodes/0"), "%queue" => url("admin/nodes/1")));
|
||||
- $help["new-update"] = t("Below is a list of the latest nodes in your site. Click on a node title to see the node, the author name to edit the author's user information , \"edit node\" to edit the node, and \"delete node\" to remove the node.");
|
||||
- $help["queue"] = t("Below is a list of the node in your site that need <b>approval</b>. To approve a node click on <b>\"edit node\"</b> and then change it's <b>moderation status</b> to Approved.<br />Click on a node title to see the node, the author name to edit the author's user information, \"edit node\" to edit the node, and \"delete node\" to remove the node.");
|
||||
- $help["search"] = t("Enter a simple pattern ( '*' maybe used as a wildcard match) to search for a post. For example, one may search for 'br' and Drupal might return 'bread brakers', 'our daily bread' and 'brenda'.");
|
||||
- $help["setting"] = t("The default settings for the different node types.<br /><b>content type</b> - the node type. <b>comment</b> - What kind of comments are associated with the node. <b>publish</b> - is this node publicly viewable, has it been published. <b>promote</b> - Is this node to be promoted to the front page. <b>moderate</b> - Does this node need approval before it can be viewed. <b>static</b> - Is this node to stay on the front page. <b>revision</b> - Will this node go into the revision system allowing multiple versions to be saved.");
|
||||
$help["overview"] = t("Below is a list of all of the nodes in your site. Other forms of content are listed elsewhere (e.g. ". l("comments", "admin/comment") .").<br />Clicking a title views that node, while clicking an author's name edits their user information.<br />Other node-related tasks are available from the menu on the left.");
|
||||
$help["post-overview"] = t("Click on <a href=\"%nup\">new or updated posts</a> to see your latest nodes, or <a href=\"%queue\">approval queue</a> to approve new messages.", array("%nup" => url("admin/nodes/0"), "%queue" => url("admin/nodes/1")));
|
||||
$help["new-update"] = t("Below is a list of the latest nodes in your site. Clicking a title views that node, while clicking an author's name edits their user information.");
|
||||
$help["queue"] = t("Below is a list of the node in your site that await approval. To approve a node click on <b>edit node</b> and then change its moderation status to <b>approved</b>.<br />Clicking a title views that node, while clicking an author's name edits their user information.");
|
||||
$help["search"] = t("Enter a simple pattern to search for a post. This can include the wildcard character *.<br />For example, a search for \"br*\" might return \"bread bakers\", \"our daily bread\" and \"brenda\".");
|
||||
$help["setting"] = t("This pages lets you set the defaults used during creation of nodes for all the different node types.<br /><b>comment:</b> Read/write setting for comments.<br /><b>publish:</b> Is this node publicly viewable, has it been published?<br /><b>promote:</b> Is this node to be promoted to the front page?<br /><b>moderate:</b> Does this node need approval before it can be viewed?<br /><b>static:</b> Is this node always visible on the front page?<br /><b>revision:</b> Will this node go into the revision system allowing multiple versions to be saved?");
|
||||
|
||||
menu("admin/node", "content management", "node_admin", $help["overview"]);
|
||||
menu("admin/node/nodes", "post overview", NULL, $help["post-overview"]);
|
||||
|
@ -642,7 +654,7 @@ function node_admin_settings($edit) {
|
|||
$output = status(t("the content settings have been reset to their default values."));
|
||||
}
|
||||
|
||||
$header = array_merge(array(t("content type")), array_keys(node_invoke_all($node, "nodeapi", "settings")));
|
||||
$header = array_merge(array(t("type")), array_keys(node_invoke_all($node, "nodeapi", "settings")));
|
||||
foreach (module_list() as $name) {
|
||||
if (module_hook($name, "node")) {
|
||||
$node->type = $name;
|
||||
|
@ -815,7 +827,7 @@ function node_admin() {
|
|||
break;
|
||||
case t("Preview"):
|
||||
$edit = node_validate($edit, $error);
|
||||
print node_preview($edit);
|
||||
print node_preview($edit, $error);
|
||||
break;
|
||||
case t("Submit"):
|
||||
print node_submit($edit);
|
||||
|
|
|
@ -4,18 +4,30 @@
|
|||
function node_help() {
|
||||
global $mod;
|
||||
|
||||
$output .= "<h3>Nodes</h3>The core of the Drupal system is the node. All of the contents of the system are placed in nodes, or extensions of nodes.";
|
||||
$output .= "A base node contains:<ul><li>A Title - Up to 128 characters of text that titles the node.</li><li>A Teaser - A small block of text that is ment to get you interested in the rest of node. Drupal automatically pulls a small amount of the body of the node to make the teaser (To configure how long the teaser will be ". l("click here","admin/system/modules/node") ."). The teaser can be changed if you don't like what Drupal grabs</li><li>The Body - This is it, the heart of the matter. Your text, what we want to read.</li><li>A Type - What kind of node is this? Blog, book, forum, comment, unextended, etc.</li><li>An Author - The author's name. It will either be \"anonymous\" or a valid user. You <i>cannot</i> set it to an arbitrary value.</li>";
|
||||
$output .= "<li>Authored on - The date it was written on.</li><li>Changed - The last time this node was changed</li><li>Static on front page - The front page is configured to show the teaser's from only a few of the total nodes you have on your site (To configure how many teaser ". l("click here","admin/system/modules/node") ."), but if you think a node is important enough that you want it to stay on the front page enable this.</li><li>Allow user comments - A node can have comments, which are other nodes. These comments can be written by other users (Read-write), or only by admins (Read-only).</li>";
|
||||
$output .= "<li>Attributes - A way to sort nodes.</li><li>revisions - Drupal has a revision system so that you can \"roll back\" to an older version of a node if the new version is not what you want.</li><li>Promote to front page - To get people to look at the new stuff on your site you want to move it to the front page. So promote it too the front page.</li>";
|
||||
$output .= "<li>Moderation Status - Drupal has a moderation system. If it is active, a node is in one of three states. Approved and Published, Approved and UnPublished, and Awaiting Approval. If you are <b>not</b> moderating a node it should be Approved</li><li>votes - If you are moderating a node this counts how many votes the node has gotten. Once a node gets a certain number of vote if will either be Approved, or Dropped (To setup the number of votes needed and the promote and dump scores ". l("click here","admin/system/modules/queue") .".)</a>.</li><li>score - The score of the node is gotten by the votes it is given.</li>";
|
||||
$output .= "<li>users - The list of users who have voted on a moderated node.</li><li>Public/Published - When using Drupal's moderation system a node remains UnPublished -- unavaliable to non-moderators -- until it is marked Public/Published.</li></ul>";
|
||||
$output .= "Now that you know what is in a node, here are some of the types of nodes avalible:";
|
||||
$output .= "<h3>Nodes</h3>The core of the Drupal system is the node. All of the contents of the system are placed in nodes, or extensions of nodes. ";
|
||||
$output .= "A base node contains:<dl>";
|
||||
$output .= "<dt>A Title</dt><dd>Up to 128 characters of text that titles the node.</dd>";
|
||||
$output .= "<dt>A Teaser</dt><dd>A small block of text that is meant to get you interested in the rest of node. Drupal automatically pulls a small amount of the body of the node to make the teaser (To configure how long the teaser will be ". l("click here","admin/system/modules/node") ."). The teaser can be changed if you don't like what Drupal grabs.</dd>";
|
||||
$output .= "<dt>The Body</dt><dd>The main text that comprises your content.</dd>";
|
||||
$output .= "<dt>A Type</dt><dd>What kind of node is this? Blog, book, forum, comment, unextended, etc.</dd>";
|
||||
$output .= "<dt>An Author</dt><dd>The author's name. It will either be \"anonymous\" or a valid user. You <i>cannot</i> set it to an arbitrary value.</dd>";
|
||||
$output .= "<dt>Authored on</dt><dd>The date it was written on.</dd>";
|
||||
$output .= "<dt>Changed</dt><dd>The last time this node was changed.</dd>";
|
||||
$output .= "<dt>Static on front page</dt><dd>The front page is configured to show the teasers from only a few of the total nodes you have on your site (To configure how many teasers ". l("click here","admin/system/modules/node") ."), but if you think a node is important enough that you want it to stay on the front page enable this.</dd>";
|
||||
$output .= "<dt>Allow user comments</dt><dd>A node can have comments, which are other nodes. These comments can be written by other users (Read-write), or only by admins (Read-only).</dd>";
|
||||
$output .= "<dt>Attributes</dt><dd>A way to sort nodes.</dd><dt>Revisions</dt><dd>Drupal has a revision system so that you can \"roll back\" to an older version of a node if the new version is not what you want.</dd>";
|
||||
$output .= "<dt>Promote to front page</dt><dd>To get people to look at the new stuff on your site you can choose to move it to the front page.</dd>";
|
||||
$output .= "<dt>Approved</dt><dd>Drupal has a moderation system. If it is active, a node is in one of three states: approved and published, approved and unpublished, and awaiting approval. If you are <b>not</b> moderating a node it should be approved.</dd>";
|
||||
$output .= "<dt>Votes</dt><dd>If you are moderating a node this counts how many votes the node has gotten. Once a node gets a certain number of vote if will either be Approved, or Dropped (To setup the number of votes needed and the promote and dump scores ". l("click here","admin/system/modules/queue") .".)</a>.</dd>";
|
||||
$output .= "<dt>Score</dt><dd>The score of the node is gotten by the votes it is given.</dd>";
|
||||
$output .= "<dt>Users</dt><dd>The list of users who have voted on a moderated node.</dd>";
|
||||
$output .= "<dt>Published</dt><dd>When using Drupal's moderation system a node remains unpublished -- unavaliable to non-moderators -- until it is marked Published.</dd></dl>";
|
||||
$output .= "<p>Now that you know what is in a node, here are some of the types of nodes available.</p>";
|
||||
|
||||
if ($mod == "admin") {
|
||||
foreach (module_list() as $name) {
|
||||
if (module_hook($name, "node") && $name != "node") {
|
||||
$output .= "<h3>". t("%module type", array("%module" => ucfirst(module_invoke($name, "node", "name")))). "</h3>";
|
||||
$output .= "<h3>". t("Node type: %module", array("%module" => module_invoke($name, "node", "name"))). "</h3>";
|
||||
$output .= module_invoke($name, "help");
|
||||
|
||||
}
|
||||
|
@ -461,7 +473,7 @@ function node_search($keys) {
|
|||
}
|
||||
|
||||
function node_settings() {
|
||||
$output .= form_select(t("Number of posts on main page"), "default_nodes_main", variable_get("default_nodes_main", 10), array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30), t("The default maximum number of posts to display on overview pages such as the main page."));
|
||||
$output .= form_select(t("Number of posts on main page"), "default_nodes_main", variable_get("default_nodes_main", 10), array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 15 => 15, 20 => 20, 25 => 25, 30 => 30), t("The default maximum number of posts to display per page on overview pages such as the main page."));
|
||||
$output .= form_select(t("Length of trimmed posts"), "teaser_length", variable_get("teaser_length", 600), array(0 => t("Unlimited"), 200 => t("200 characters"), 400 => t("400 characters"), 600 => t("600 characters"), 800 => t("800 characters"), 1000 => t("1000 characters"), 1200 => t("1200 characters"), 1400 => t("1400 characters"), 1600 => t("1600 characters"), 1800 => t("1800 characters"), 2000 => t("2000 characters")), t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'."));
|
||||
$output .= form_select(t("Preview post"), "node_preview", variable_get("node_preview", 0), array(t("Optional"), t("Required")), t("Must users preview posts before submitting?"));
|
||||
return $output;
|
||||
|
@ -469,7 +481,7 @@ function node_settings() {
|
|||
|
||||
function node_conf_filters() {
|
||||
$output .= form_select(t("Filter HTML tags"), "filter_html", variable_get("filter_html", 0), array(t("Disabled"), t("Enabled")), t("Filter HTML and PHP tags in user-contributed content."));
|
||||
$output .= form_textfield(t("Allowed HTML tags"), "allowed_html", variable_get("allowed_html", "<a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul>"), 64, 255, t("If enabled, optionally specify tags which should not be stripped. 'STYLE' attributes, 'ON' attributes and unclosed tags are always stripped."));
|
||||
$output .= form_textfield(t("Allowed HTML tags"), "allowed_html", variable_get("allowed_html", "<a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul>"), 64, 255, t("If enabled, optionally specify tags which should not be stripped. 'STYLE' attributes, 'ON*' attributes and unclosed tags are always stripped."));
|
||||
$output .= form_select(t("Rewrite old URLs"), "rewrite_old_urls", variable_get("rewrite_old_urls", 0), array(t("Disabled"), t("Enabled")), t("The introduction of 'clean URLs' in Drupal 4.2.0 breaks internal URLs that date back from Drupal 4.1.0 and before. If enabled, this filter will attempt to rewrite the old style URLs to avoid broken links. If <code>mod_rewrite</code> is available on your system, use the rewrite rules in Drupal's <code>.htaccess</code> file instead as these will also correct external referrers."));
|
||||
$output .= "<hr />";
|
||||
return $output;
|
||||
|
@ -533,12 +545,12 @@ function node_link($type, $node = 0, $main = 0) {
|
|||
}
|
||||
|
||||
if ($type == "admin" && user_access("administer nodes")) {
|
||||
- $help["overview"] = t("Below is a list of all of the nodes in your site. Other content, such as ". l("comments", "admin/comment") .", are delt with in other areas.<br />Click on a node title to view the node, the author name to edit the author's user information.<br />Other work with nodes can be done with the menu on the left.");
|
||||
- $help["post-overview"] = t("Click on <a href=\"%nup\">new or updated posts</a> to see your latest nodes, or <a href=\"%queue\">approval queue</a> to approve new messages.", array("%nup" => url("admin/nodes/0"), "%queue" => url("admin/nodes/1")));
|
||||
- $help["new-update"] = t("Below is a list of the latest nodes in your site. Click on a node title to see the node, the author name to edit the author's user information , \"edit node\" to edit the node, and \"delete node\" to remove the node.");
|
||||
- $help["queue"] = t("Below is a list of the node in your site that need <b>approval</b>. To approve a node click on <b>\"edit node\"</b> and then change it's <b>moderation status</b> to Approved.<br />Click on a node title to see the node, the author name to edit the author's user information, \"edit node\" to edit the node, and \"delete node\" to remove the node.");
|
||||
- $help["search"] = t("Enter a simple pattern ( '*' maybe used as a wildcard match) to search for a post. For example, one may search for 'br' and Drupal might return 'bread brakers', 'our daily bread' and 'brenda'.");
|
||||
- $help["setting"] = t("The default settings for the different node types.<br /><b>content type</b> - the node type. <b>comment</b> - What kind of comments are associated with the node. <b>publish</b> - is this node publicly viewable, has it been published. <b>promote</b> - Is this node to be promoted to the front page. <b>moderate</b> - Does this node need approval before it can be viewed. <b>static</b> - Is this node to stay on the front page. <b>revision</b> - Will this node go into the revision system allowing multiple versions to be saved.");
|
||||
$help["overview"] = t("Below is a list of all of the nodes in your site. Other forms of content are listed elsewhere (e.g. ". l("comments", "admin/comment") .").<br />Clicking a title views that node, while clicking an author's name edits their user information.<br />Other node-related tasks are available from the menu on the left.");
|
||||
$help["post-overview"] = t("Click on <a href=\"%nup\">new or updated posts</a> to see your latest nodes, or <a href=\"%queue\">approval queue</a> to approve new messages.", array("%nup" => url("admin/nodes/0"), "%queue" => url("admin/nodes/1")));
|
||||
$help["new-update"] = t("Below is a list of the latest nodes in your site. Clicking a title views that node, while clicking an author's name edits their user information.");
|
||||
$help["queue"] = t("Below is a list of the node in your site that await approval. To approve a node click on <b>edit node</b> and then change its moderation status to <b>approved</b>.<br />Clicking a title views that node, while clicking an author's name edits their user information.");
|
||||
$help["search"] = t("Enter a simple pattern to search for a post. This can include the wildcard character *.<br />For example, a search for \"br*\" might return \"bread bakers\", \"our daily bread\" and \"brenda\".");
|
||||
$help["setting"] = t("This pages lets you set the defaults used during creation of nodes for all the different node types.<br /><b>comment:</b> Read/write setting for comments.<br /><b>publish:</b> Is this node publicly viewable, has it been published?<br /><b>promote:</b> Is this node to be promoted to the front page?<br /><b>moderate:</b> Does this node need approval before it can be viewed?<br /><b>static:</b> Is this node always visible on the front page?<br /><b>revision:</b> Will this node go into the revision system allowing multiple versions to be saved?");
|
||||
|
||||
menu("admin/node", "content management", "node_admin", $help["overview"]);
|
||||
menu("admin/node/nodes", "post overview", NULL, $help["post-overview"]);
|
||||
|
@ -642,7 +654,7 @@ function node_admin_settings($edit) {
|
|||
$output = status(t("the content settings have been reset to their default values."));
|
||||
}
|
||||
|
||||
$header = array_merge(array(t("content type")), array_keys(node_invoke_all($node, "nodeapi", "settings")));
|
||||
$header = array_merge(array(t("type")), array_keys(node_invoke_all($node, "nodeapi", "settings")));
|
||||
foreach (module_list() as $name) {
|
||||
if (module_hook($name, "node")) {
|
||||
$node->type = $name;
|
||||
|
@ -815,7 +827,7 @@ function node_admin() {
|
|||
break;
|
||||
case t("Preview"):
|
||||
$edit = node_validate($edit, $error);
|
||||
print node_preview($edit);
|
||||
print node_preview($edit, $error);
|
||||
break;
|
||||
case t("Submit"):
|
||||
print node_submit($edit);
|
||||
|
|
|
@ -256,26 +256,20 @@ function poll_view_voting(&$node, $main, $block, $links) {
|
|||
|
||||
|
||||
$url = request_uri();
|
||||
$output .= "<form action=\"$url\" method=\"post\">";
|
||||
$output .= "<table border=\"0\" align=\"center\"><tr><td>";
|
||||
$output .= "<div class=\"poll\"><form action=\"$url\" method=\"post\">";
|
||||
|
||||
$output .= "<div class=\"vote-form\">";
|
||||
$output .= "<div class=\"choices\">";
|
||||
if ($node->choice) {
|
||||
foreach ($node->choice as $key => $value) {
|
||||
if ($value != "") {
|
||||
$output .= "<input type=\"radio\" name=\"pollvote[$node->nid]\" value=\"$key\" />". filter($value) ."<br />";
|
||||
$output .= "<div><input type=\"radio\" name=\"pollvote[$node->nid]\" value=\"$key\" />". filter($value) ."</div>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($block) {
|
||||
$output .= "</td></tr><tr><td><div align=\"center\">". form_submit(t("Vote")) ."</div></td></tr></table>";
|
||||
}
|
||||
else {
|
||||
$output .= "</td><td valign=\"middle\"><div align=\"right\"> ". form_submit(t("Vote")) ."</div></td></tr></table>";
|
||||
}
|
||||
|
||||
$output .= $block ? "<div align=\"center\">". theme("links", $links) ."</div>" : "";
|
||||
$output .= "</form>";
|
||||
$output .= "</div>". form_submit(t("Vote")) ."</div>";
|
||||
$output .= $block ? "<div class=\"links\">". theme("links", $links) ."</div>" : "";
|
||||
$output .= "</form></div>";
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
|
@ -256,26 +256,20 @@ function poll_view_voting(&$node, $main, $block, $links) {
|
|||
|
||||
|
||||
$url = request_uri();
|
||||
$output .= "<form action=\"$url\" method=\"post\">";
|
||||
$output .= "<table border=\"0\" align=\"center\"><tr><td>";
|
||||
$output .= "<div class=\"poll\"><form action=\"$url\" method=\"post\">";
|
||||
|
||||
$output .= "<div class=\"vote-form\">";
|
||||
$output .= "<div class=\"choices\">";
|
||||
if ($node->choice) {
|
||||
foreach ($node->choice as $key => $value) {
|
||||
if ($value != "") {
|
||||
$output .= "<input type=\"radio\" name=\"pollvote[$node->nid]\" value=\"$key\" />". filter($value) ."<br />";
|
||||
$output .= "<div><input type=\"radio\" name=\"pollvote[$node->nid]\" value=\"$key\" />". filter($value) ."</div>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($block) {
|
||||
$output .= "</td></tr><tr><td><div align=\"center\">". form_submit(t("Vote")) ."</div></td></tr></table>";
|
||||
}
|
||||
else {
|
||||
$output .= "</td><td valign=\"middle\"><div align=\"right\"> ". form_submit(t("Vote")) ."</div></td></tr></table>";
|
||||
}
|
||||
|
||||
$output .= $block ? "<div align=\"center\">". theme("links", $links) ."</div>" : "";
|
||||
$output .= "</form>";
|
||||
$output .= "</div>". form_submit(t("Vote")) ."</div>";
|
||||
$output .= $block ? "<div class=\"links\">". theme("links", $links) ."</div>" : "";
|
||||
$output .= "</form></div>";
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ function _profile_init() {
|
|||
"biography" => array("textarea", t("Biography"), "", 64, 4, ""),
|
||||
"interests" => array("textarea", t("Interests"), "", 64, 4, t("What you like.")),
|
||||
"publickey" => array("textarea", t("Public key"), "", 64, 4, ""),
|
||||
"avatar" => array("", t("Avatar or picture"), t("Your virtual face or picture. Maximum dimensions are %dimensions and the maximum size is %size kb.", array("%dimensions" => variable_get("profile_avatar_dimensions", "85x85"), "%size" => variable_get("profile_avatar_file_size", "30"))))
|
||||
"avatar" => array("", t("Avatar or picture"), t("Your virtual face or picture. Maximum dimensions are %dimensions and the maximum size is %size kB.", array("%dimensions" => variable_get("profile_avatar_dimensions", "85x85"), "%size" => variable_get("profile_avatar_file_size", "30"))))
|
||||
);
|
||||
|
||||
$GLOBALS["profile_days"][0] = t("day");
|
||||
|
@ -67,7 +67,7 @@ function profile_settings() {
|
|||
|
||||
$output .= form_textfield(t("Avatar image path"), "profile_avatar_path", variable_get("profile_avatar_path", "misc/avatars/"), 30, 255, t("Path for avatar directory; it must be writable and visible from the web."));
|
||||
$output .= form_textfield(t("Avatar maximum dimensions"), "profile_avatar_dimensions", variable_get("profile_avatar_dimensions", "85x85"), 10, 10, t("Maximum dimensions for avatars."));
|
||||
$output .= form_textfield(t("Avatar maximum file size"), "profile_avatar_file_size", variable_get("profile_avatar_file_size", "30"), 10, 10, t("Maximum file size for avatars, in kb."));
|
||||
$output .= form_textfield(t("Avatar maximum file size"), "profile_avatar_file_size", variable_get("profile_avatar_file_size", "30"), 10, 10, t("Maximum file size for avatars, in kB."));
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ function _profile_user_view(&$user, $mode) {
|
|||
|
||||
function _profile_validate_avatar(&$edit) {
|
||||
global $user;
|
||||
// check that uploaded file is an image, with a max file size and max height/width
|
||||
// check that uploaded file is an image, with a maximum file size and maximum height/width
|
||||
|
||||
unset($edit["profile_avatar"]);
|
||||
|
||||
|
@ -226,13 +226,13 @@ function _profile_validate_avatar(&$edit) {
|
|||
$size = getimagesize($image_file);
|
||||
list($maxwidth, $maxheight) = explode("x", variable_get("profile_avatar_dimensions", "85x85"));
|
||||
if ((!in_array($size[2], array(1,2,3))) || (!in_array($extension, array(".gif", ".jpg", ".png", ".jpeg")))) {
|
||||
$error = t("uploaded file was not an image.");
|
||||
$error = t("the uploaded file was not an image.");
|
||||
}
|
||||
else if (filesize($image_file) > (variable_get("profile_avatar_file_size", "30")*1000)) {
|
||||
$error = t("uploaded image is too large, max %a kb.", array("%a" => variable_get("profile_avatar_file_size", "30")));
|
||||
$error = t("the uploaded image is too large, maximum %a kB.", array("%a" => variable_get("profile_avatar_file_size", "30")));
|
||||
}
|
||||
else if ($size[0] > $maxwidth || $size[1] > $maxheight) {
|
||||
$error = t("uploaded image is too large, max %a.", array("%a" => variable_get("profile_avatar_dimensions", "85x85")));
|
||||
$error = t("the uploaded image is too large, maximum %a.", array("%a" => variable_get("profile_avatar_dimensions", "85x85")));
|
||||
}
|
||||
else if (!copy($image_file, variable_get("profile_avatar_path", "misc/avatars/").md5($user->uid).$extension)) {
|
||||
$error = t("error in file upload");
|
||||
|
|
|
@ -25,7 +25,7 @@ function _profile_init() {
|
|||
"biography" => array("textarea", t("Biography"), "", 64, 4, ""),
|
||||
"interests" => array("textarea", t("Interests"), "", 64, 4, t("What you like.")),
|
||||
"publickey" => array("textarea", t("Public key"), "", 64, 4, ""),
|
||||
"avatar" => array("", t("Avatar or picture"), t("Your virtual face or picture. Maximum dimensions are %dimensions and the maximum size is %size kb.", array("%dimensions" => variable_get("profile_avatar_dimensions", "85x85"), "%size" => variable_get("profile_avatar_file_size", "30"))))
|
||||
"avatar" => array("", t("Avatar or picture"), t("Your virtual face or picture. Maximum dimensions are %dimensions and the maximum size is %size kB.", array("%dimensions" => variable_get("profile_avatar_dimensions", "85x85"), "%size" => variable_get("profile_avatar_file_size", "30"))))
|
||||
);
|
||||
|
||||
$GLOBALS["profile_days"][0] = t("day");
|
||||
|
@ -67,7 +67,7 @@ function profile_settings() {
|
|||
|
||||
$output .= form_textfield(t("Avatar image path"), "profile_avatar_path", variable_get("profile_avatar_path", "misc/avatars/"), 30, 255, t("Path for avatar directory; it must be writable and visible from the web."));
|
||||
$output .= form_textfield(t("Avatar maximum dimensions"), "profile_avatar_dimensions", variable_get("profile_avatar_dimensions", "85x85"), 10, 10, t("Maximum dimensions for avatars."));
|
||||
$output .= form_textfield(t("Avatar maximum file size"), "profile_avatar_file_size", variable_get("profile_avatar_file_size", "30"), 10, 10, t("Maximum file size for avatars, in kb."));
|
||||
$output .= form_textfield(t("Avatar maximum file size"), "profile_avatar_file_size", variable_get("profile_avatar_file_size", "30"), 10, 10, t("Maximum file size for avatars, in kB."));
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ function _profile_user_view(&$user, $mode) {
|
|||
|
||||
function _profile_validate_avatar(&$edit) {
|
||||
global $user;
|
||||
// check that uploaded file is an image, with a max file size and max height/width
|
||||
// check that uploaded file is an image, with a maximum file size and maximum height/width
|
||||
|
||||
unset($edit["profile_avatar"]);
|
||||
|
||||
|
@ -226,13 +226,13 @@ function _profile_validate_avatar(&$edit) {
|
|||
$size = getimagesize($image_file);
|
||||
list($maxwidth, $maxheight) = explode("x", variable_get("profile_avatar_dimensions", "85x85"));
|
||||
if ((!in_array($size[2], array(1,2,3))) || (!in_array($extension, array(".gif", ".jpg", ".png", ".jpeg")))) {
|
||||
$error = t("uploaded file was not an image.");
|
||||
$error = t("the uploaded file was not an image.");
|
||||
}
|
||||
else if (filesize($image_file) > (variable_get("profile_avatar_file_size", "30")*1000)) {
|
||||
$error = t("uploaded image is too large, max %a kb.", array("%a" => variable_get("profile_avatar_file_size", "30")));
|
||||
$error = t("the uploaded image is too large, maximum %a kB.", array("%a" => variable_get("profile_avatar_file_size", "30")));
|
||||
}
|
||||
else if ($size[0] > $maxwidth || $size[1] > $maxheight) {
|
||||
$error = t("uploaded image is too large, max %a.", array("%a" => variable_get("profile_avatar_dimensions", "85x85")));
|
||||
$error = t("the uploaded image is too large, maximum %a.", array("%a" => variable_get("profile_avatar_dimensions", "85x85")));
|
||||
}
|
||||
else if (!copy($image_file, variable_get("profile_avatar_path", "misc/avatars/").md5($user->uid).$extension)) {
|
||||
$error = t("error in file upload");
|
||||
|
|
|
@ -26,7 +26,7 @@ function queue_perm() {
|
|||
|
||||
function queue_link($type) {
|
||||
if ($type == "menu.view" && user_access("access submission queue")) {
|
||||
$links[] = l(t("view submissions"), "queue", array("title" => t("Moderate the content in the submission queue."))) ." (<span style=\"color: red;\">". queue_count() ."</span>)";
|
||||
$links[] = l(t("view submissions"), "queue", array("title" => t("Moderate the content in the submission queue."))) ." (<span class=\"queue-user-numeral\">". queue_count() ."</span>)";
|
||||
}
|
||||
|
||||
return $links ? $links : array();
|
||||
|
@ -233,4 +233,4 @@ function queue_nodeapi(&$node, $op, $arg = 0) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -59,7 +59,7 @@ function story_form(&$node, &$help, &$error) {
|
|||
*/
|
||||
|
||||
if (count(explode(" ", $node->body)) < variable_get("minimum_story_size", 0)) {
|
||||
$error["body"] = "<div style=\"color: red;\">". t("The body of your story is too short.") ."</div>";
|
||||
$error["body"] = "<div class=\"error\">". t("The body of your story is too short.") ."</div>";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ function story_form(&$node, &$help, &$error) {
|
|||
*/
|
||||
|
||||
if (count(explode(" ", $node->body)) < variable_get("minimum_story_size", 0)) {
|
||||
$error["body"] = "<div style=\"color: red;\">". t("The body of your story is too short.") ."</div>";
|
||||
$error["body"] = "<div class=\"error\">". t("The body of your story is too short.") ."</div>";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -128,6 +128,32 @@ function system_view_general() {
|
|||
$output .= form_select(t("Date format (short)"), "date_format_short", variable_get("date_format_short", $dateshort[0]), $dateshortchoices, t("The short format of date display."));
|
||||
$output .= form_select(t("Date format (medium)"), "date_format_medium", variable_get("date_format_medium", $datemedium[0]), $datemediumchoices, t("The medium sized date display."));
|
||||
$output .= form_select(t("Date format (long)"), "date_format_long", variable_get("date_format_long", $datelong[0]), $datelongchoices, t("Longer date format used for detailed display."));
|
||||
|
||||
$output .= "<hr />\n";
|
||||
|
||||
$output .= "<h3>". t("Character encoding settings") ."</h3>\n";
|
||||
|
||||
// charset settings
|
||||
$charsets = array("iso-8859-1",
|
||||
"iso-8859-2",
|
||||
"iso-8859-3",
|
||||
"iso-8859-4",
|
||||
"iso-8859-5",
|
||||
"iso-8859-6",
|
||||
"iso-8859-7",
|
||||
"iso-8859-8",
|
||||
"iso-8859-8-i",
|
||||
"iso-8859-9",
|
||||
"utf-8",
|
||||
"utf-16",
|
||||
"utf-16be",
|
||||
"euc-kr",
|
||||
"koi8-r",
|
||||
"ks_c_5601-1987",
|
||||
"tis-620",
|
||||
"iso-2022-kr",
|
||||
"us-ascii");
|
||||
$output .= form_select(t("Character set"), "site_charset", variable_get("site_charset", "iso-8859-1"), $charsets, t("Select the character set (charset) used across your site. This will affect the content-type tag in web pages and the XML declarations in RSS feeds, among other things. You probably only need to change this if you need support for languages with non-ASCII characters like Korean, Polish, etc."));
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
@ -128,6 +128,32 @@ function system_view_general() {
|
|||
$output .= form_select(t("Date format (short)"), "date_format_short", variable_get("date_format_short", $dateshort[0]), $dateshortchoices, t("The short format of date display."));
|
||||
$output .= form_select(t("Date format (medium)"), "date_format_medium", variable_get("date_format_medium", $datemedium[0]), $datemediumchoices, t("The medium sized date display."));
|
||||
$output .= form_select(t("Date format (long)"), "date_format_long", variable_get("date_format_long", $datelong[0]), $datelongchoices, t("Longer date format used for detailed display."));
|
||||
|
||||
$output .= "<hr />\n";
|
||||
|
||||
$output .= "<h3>". t("Character encoding settings") ."</h3>\n";
|
||||
|
||||
// charset settings
|
||||
$charsets = array("iso-8859-1",
|
||||
"iso-8859-2",
|
||||
"iso-8859-3",
|
||||
"iso-8859-4",
|
||||
"iso-8859-5",
|
||||
"iso-8859-6",
|
||||
"iso-8859-7",
|
||||
"iso-8859-8",
|
||||
"iso-8859-8-i",
|
||||
"iso-8859-9",
|
||||
"utf-8",
|
||||
"utf-16",
|
||||
"utf-16be",
|
||||
"euc-kr",
|
||||
"koi8-r",
|
||||
"ks_c_5601-1987",
|
||||
"tis-620",
|
||||
"iso-2022-kr",
|
||||
"us-ascii");
|
||||
$output .= form_select(t("Character set"), "site_charset", variable_get("site_charset", "iso-8859-1"), $charsets, t("Select the character set (charset) used across your site. This will affect the content-type tag in web pages and the XML declarations in RSS feeds, among other things. You probably only need to change this if you need support for languages with non-ASCII characters like Korean, Polish, etc."));
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ function taxonomy_form_vocabulary($edit = array()) {
|
|||
|
||||
$form .= form_textfield(t("Vocabulary name"), "name", $edit["name"], 50, 64, t("Required") . ". " . t("The name for this vocabulary. Example: 'Topic'") . ".");
|
||||
$form .= form_textarea(t("Description"), "description", $edit["description"], 60, 5, t("Optional") . ". " . t("Description of the vocabulary, can be used by modules."));
|
||||
$form .= form_select(t("Types"), "types", explode(",", $edit["types"]), $nodetypes, t("Required") . ". " . t("A list of node types you want to associate this vocabulary with."), "", 1);
|
||||
$form .= form_select(t("Types"), "nodes", explode(",", $edit["nodes"]), $nodetypes, t("Required") . ". " . t("A list of node types you want to associate this vocabulary with."), "", 1);
|
||||
$form .= form_checkbox(t("Related terms"), "relations", 1, $edit["relations"], t("Optional") . ". " . t("Allows ". l("related terms", "admin/taxonomy/help#relatedterms") ." in this vocabulary."));
|
||||
$form .= form_select(t("Hierarchy"), "hierarchy", $edit["hierarchy"], array(t("Disabled"), t("Single"), t("Multiple")), t("Optional") . ". ". t("Allows ". l("a tree-like hierarchy", "admin/taxonomy/help#hierarchy") ." between terms of this vocabulary."), "", 0);
|
||||
$form .= form_checkbox(t("Multiple select"), "multiple", 1, $edit["multiple"], t("Optional") . ". " . t("Allows nodes to have more than one term in this vocabulary."));
|
||||
|
@ -93,11 +93,11 @@ function taxonomy_form_vocabulary($edit = array()) {
|
|||
}
|
||||
|
||||
function taxonomy_save_vocabulary($edit) {
|
||||
if (!$edit["types"]) {
|
||||
$edit["types"] = array();
|
||||
if (!$edit["nodes"]) {
|
||||
$edit["nodes"] = array();
|
||||
}
|
||||
|
||||
$data = array("name" => $edit["name"], "types" => implode(",", $edit["types"]), "description" => $edit["description"], "multiple" => $edit["multiple"], "required" => $edit["required"], "hierarchy" => $edit["hierarchy"], "relations" => $edit["relations"], "weight" => $edit["weight"]);
|
||||
$data = array("name" => $edit["name"], "nodes" => implode(",", $edit["nodes"]), "description" => $edit["description"], "multiple" => $edit["multiple"], "required" => $edit["required"], "hierarchy" => $edit["hierarchy"], "relations" => $edit["relations"], "weight" => $edit["weight"]);
|
||||
if ($edit["vid"] && $edit["name"]) {
|
||||
db_query("UPDATE vocabulary SET ". _prepare_update($data) ." WHERE vid = %d", $edit["vid"]);
|
||||
module_invoke_all("taxonomy", "update", "vocabulary", $edit);
|
||||
|
@ -281,7 +281,7 @@ function taxonomy_overview() {
|
|||
$vocabularies = taxonomy_get_vocabularies();
|
||||
foreach ($vocabularies as $vocabulary) {
|
||||
$links = array();
|
||||
$rows[] = array($vocabulary->name, array("data" => $vocabulary->types, "align" => "center"), l(t("edit vocabulary"), "admin/taxonomy/edit/vocabulary/$vocabulary->vid"), l(t("add term"), "admin/taxonomy/add/term/$vocabulary->vid"), l(t("preview form"), "admin/taxonomy/preview/vocabulary/$vocabulary->vid"));
|
||||
$rows[] = array($vocabulary->name, array("data" => $vocabulary->nodes, "align" => "center"), l(t("edit vocabulary"), "admin/taxonomy/edit/vocabulary/$vocabulary->vid"), l(t("add term"), "admin/taxonomy/add/term/$vocabulary->vid"), l(t("preview form"), "admin/taxonomy/preview/vocabulary/$vocabulary->vid"));
|
||||
|
||||
$tree = taxonomy_get_tree($vocabulary->vid);
|
||||
if ($tree) {
|
||||
|
@ -325,7 +325,7 @@ function taxonomy_form($vocabulary_id, $value = 0) {
|
|||
// return array of vocabularies, as objects
|
||||
function taxonomy_get_vocabularies($type = '', $key = "vid") {
|
||||
if ($type) {
|
||||
$result = db_query("SELECT * FROM vocabulary WHERE types LIKE '%%%s%%' ORDER BY weight, name", $type);
|
||||
$result = db_query("SELECT * FROM vocabulary WHERE nodes LIKE '%%%s%%' ORDER BY weight, name", $type);
|
||||
}
|
||||
else {
|
||||
$result = db_query("SELECT * FROM vocabulary ORDER BY weight, name");
|
||||
|
@ -351,7 +351,7 @@ function taxonomy_node_form($type, $node = '') {
|
|||
$terms = $node->taxonomy;
|
||||
}
|
||||
|
||||
$c = db_query("SELECT * FROM vocabulary WHERE types LIKE '%%%s%%' ORDER BY weight, name", $type);
|
||||
$c = db_query("SELECT * FROM vocabulary WHERE nodes LIKE '%%%s%%' ORDER BY weight, name", $type);
|
||||
while ($vocabulary = db_fetch_object($c)) {
|
||||
$result[] .= taxonomy_form($vocabulary->vid, $terms);
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ function taxonomy_form_vocabulary($edit = array()) {
|
|||
|
||||
$form .= form_textfield(t("Vocabulary name"), "name", $edit["name"], 50, 64, t("Required") . ". " . t("The name for this vocabulary. Example: 'Topic'") . ".");
|
||||
$form .= form_textarea(t("Description"), "description", $edit["description"], 60, 5, t("Optional") . ". " . t("Description of the vocabulary, can be used by modules."));
|
||||
$form .= form_select(t("Types"), "types", explode(",", $edit["types"]), $nodetypes, t("Required") . ". " . t("A list of node types you want to associate this vocabulary with."), "", 1);
|
||||
$form .= form_select(t("Types"), "nodes", explode(",", $edit["nodes"]), $nodetypes, t("Required") . ". " . t("A list of node types you want to associate this vocabulary with."), "", 1);
|
||||
$form .= form_checkbox(t("Related terms"), "relations", 1, $edit["relations"], t("Optional") . ". " . t("Allows ". l("related terms", "admin/taxonomy/help#relatedterms") ." in this vocabulary."));
|
||||
$form .= form_select(t("Hierarchy"), "hierarchy", $edit["hierarchy"], array(t("Disabled"), t("Single"), t("Multiple")), t("Optional") . ". ". t("Allows ". l("a tree-like hierarchy", "admin/taxonomy/help#hierarchy") ." between terms of this vocabulary."), "", 0);
|
||||
$form .= form_checkbox(t("Multiple select"), "multiple", 1, $edit["multiple"], t("Optional") . ". " . t("Allows nodes to have more than one term in this vocabulary."));
|
||||
|
@ -93,11 +93,11 @@ function taxonomy_form_vocabulary($edit = array()) {
|
|||
}
|
||||
|
||||
function taxonomy_save_vocabulary($edit) {
|
||||
if (!$edit["types"]) {
|
||||
$edit["types"] = array();
|
||||
if (!$edit["nodes"]) {
|
||||
$edit["nodes"] = array();
|
||||
}
|
||||
|
||||
$data = array("name" => $edit["name"], "types" => implode(",", $edit["types"]), "description" => $edit["description"], "multiple" => $edit["multiple"], "required" => $edit["required"], "hierarchy" => $edit["hierarchy"], "relations" => $edit["relations"], "weight" => $edit["weight"]);
|
||||
$data = array("name" => $edit["name"], "nodes" => implode(",", $edit["nodes"]), "description" => $edit["description"], "multiple" => $edit["multiple"], "required" => $edit["required"], "hierarchy" => $edit["hierarchy"], "relations" => $edit["relations"], "weight" => $edit["weight"]);
|
||||
if ($edit["vid"] && $edit["name"]) {
|
||||
db_query("UPDATE vocabulary SET ". _prepare_update($data) ." WHERE vid = %d", $edit["vid"]);
|
||||
module_invoke_all("taxonomy", "update", "vocabulary", $edit);
|
||||
|
@ -281,7 +281,7 @@ function taxonomy_overview() {
|
|||
$vocabularies = taxonomy_get_vocabularies();
|
||||
foreach ($vocabularies as $vocabulary) {
|
||||
$links = array();
|
||||
$rows[] = array($vocabulary->name, array("data" => $vocabulary->types, "align" => "center"), l(t("edit vocabulary"), "admin/taxonomy/edit/vocabulary/$vocabulary->vid"), l(t("add term"), "admin/taxonomy/add/term/$vocabulary->vid"), l(t("preview form"), "admin/taxonomy/preview/vocabulary/$vocabulary->vid"));
|
||||
$rows[] = array($vocabulary->name, array("data" => $vocabulary->nodes, "align" => "center"), l(t("edit vocabulary"), "admin/taxonomy/edit/vocabulary/$vocabulary->vid"), l(t("add term"), "admin/taxonomy/add/term/$vocabulary->vid"), l(t("preview form"), "admin/taxonomy/preview/vocabulary/$vocabulary->vid"));
|
||||
|
||||
$tree = taxonomy_get_tree($vocabulary->vid);
|
||||
if ($tree) {
|
||||
|
@ -325,7 +325,7 @@ function taxonomy_form($vocabulary_id, $value = 0) {
|
|||
// return array of vocabularies, as objects
|
||||
function taxonomy_get_vocabularies($type = '', $key = "vid") {
|
||||
if ($type) {
|
||||
$result = db_query("SELECT * FROM vocabulary WHERE types LIKE '%%%s%%' ORDER BY weight, name", $type);
|
||||
$result = db_query("SELECT * FROM vocabulary WHERE nodes LIKE '%%%s%%' ORDER BY weight, name", $type);
|
||||
}
|
||||
else {
|
||||
$result = db_query("SELECT * FROM vocabulary ORDER BY weight, name");
|
||||
|
@ -351,7 +351,7 @@ function taxonomy_node_form($type, $node = '') {
|
|||
$terms = $node->taxonomy;
|
||||
}
|
||||
|
||||
$c = db_query("SELECT * FROM vocabulary WHERE types LIKE '%%%s%%' ORDER BY weight, name", $type);
|
||||
$c = db_query("SELECT * FROM vocabulary WHERE nodes LIKE '%%%s%%' ORDER BY weight, name", $type);
|
||||
while ($vocabulary = db_fetch_object($c)) {
|
||||
$result[] .= taxonomy_form($vocabulary->vid, $terms);
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 8.1 KiB |
|
@ -22,7 +22,6 @@
|
|||
<html>
|
||||
<head>
|
||||
<?php print theme_head($main); ?>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<title>
|
||||
<?php
|
||||
if ($title) {
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 7.9 KiB |
|
@ -41,7 +41,6 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<?php print theme_head($main); ?>
|
||||
<title><?php echo ($title ? ($title . " - ") : "") . variable_get(site_name, "drupal"); ?></title>
|
||||
<link rel="stylesheet" type="text/css" media="screen, projection" href="themes/unconed/unconed.css" />
|
||||
|
|
|
@ -128,6 +128,14 @@ table {
|
|||
font-size: 1.3em;
|
||||
color: #777;
|
||||
}
|
||||
.form-item .title {
|
||||
font-size: 1em;
|
||||
color: #222;
|
||||
}
|
||||
.item-list .title {
|
||||
font-size: 1em;
|
||||
color: #222;
|
||||
}
|
||||
.node .author, .comment .author {
|
||||
color: #999;
|
||||
font-size: 0.8em;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
<head>
|
||||
<title>{title}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
{head}
|
||||
<style type="text/css" media="all">
|
||||
@import "themes/xtemplate/xtemplate.css";
|
||||
|
|
|
@ -67,7 +67,8 @@ $mysql_updates = array(
|
|||
"2003-04-20" => "update_52",
|
||||
"2003-05-18" => "update_53",
|
||||
"2003-05-24" => "update_54",
|
||||
"2003-05-31" => "update_55"
|
||||
"2003-05-31" => "update_55",
|
||||
"2003-06-04" => "update_56"
|
||||
);
|
||||
|
||||
// Update functions
|
||||
|
@ -720,6 +721,10 @@ function update_55() {
|
|||
update_sql("ALTER TABLE site CHANGE timestamp changed INT(11) NOT NULL;");
|
||||
}
|
||||
|
||||
function update_56() {
|
||||
update_sql("ALTER TABLE vocabulary CHANGE types nodes TEXT DEFAULT '' NOT NULL");
|
||||
}
|
||||
|
||||
function update_upgrade3() {
|
||||
update_sql("INSERT INTO system VALUES ('archive.module','archive','module','',1)");
|
||||
update_sql("INSERT INTO system VALUES ('block.module','block','module','',1)");
|
||||
|
|
Loading…
Reference in New Issue