Commit 10c5e95a authored by Dries's avatar Dries

- Made it possible for anonymous users to leave their name, e-mail address
  and the URL of their homepage.  Patch by Pablo.
parent 25a709a1
......@@ -9,6 +9,8 @@ Drupal x.x.x, xxxx-xx-xx
- user management:
* added support for multiple roles per user.
- refactored 403 (forbidden) handling and added support for custom 403 pages.
- comment module:
* made it possible for anonymous users to leave their name, e-mail address and the URL of their homepage.
- syndication:
* added support for RSS ping-notifications of http://technorati.com/.
* refactored the categorization of syndicated news items.
......
......@@ -185,6 +185,9 @@ CREATE TABLE comments (
status tinyint(3) unsigned NOT NULL default '0',
thread varchar(255) NOT NULL,
users longtext,
name varchar(60) default NULL,
mail varchar(64) default NULL,
homepage varchar(255) default NULL,
PRIMARY KEY (cid),
KEY lid (nid)
) TYPE=MyISAM;
......
......@@ -185,6 +185,9 @@ CREATE TABLE comments (
status smallint NOT NULL default '0',
thread varchar(255) default '',
users text default '',
name varchar(60) default NULL,
mail varchar(64) default NULL,
url varchar(255) default NULL,
PRIMARY KEY (cid)
);
CREATE INDEX comments_nid_idx ON comments(nid);
......
......@@ -57,7 +57,8 @@
"2004-04-15" => "update_83",
"2004-04-21" => "update_84",
"2004-04-27" => "update_85",
"2004-05-10" => "update_86"
"2004-05-10" => "update_86",
"2004-05-18" => "update_87"
);
function update_32() {
......@@ -1084,6 +1085,14 @@ function update_86() {
return $ret;
}
function update_87() {
$ret = array();
$ret[] = update_sql("ALTER TABLE {comments} ADD name varchar(60) DEFAULT NULL");
$ret[] = update_sql("ALTER TABLE {comments} ADD mail varchar(64) DEFAULT NULL");
$ret[] = update_sql("ALTER TABLE {comments} ADD homepage varchar(255) DEFAULT NULL");
return $ret;
}
function update_sql($sql) {
$edit = $_POST["edit"];
$result = db_query($sql);
......
......@@ -979,7 +979,14 @@ function format_name($object) {
** the true author of the content.
*/
$output = $object->name;
if ($object->homepage) {
$output = "<a href=\"$object->homepage\">$object->name</a>";
}
else {
$output = $object->name;
}
$output .= ' ('. t('not verified') .')';
}
else {
$output = t(variable_get("anonymous", "Anonymous"));
......
This diff is collapsed.
This diff is collapsed.
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