- applied Stevens link patch.

- fixed block permissions.
- fixed user admin page errors: http://www.drupal.org/node.php?id=173.
- cleaned up common.inc a bit: removed format_info, path_img, field_merge.
4.0.x
Kjartan Mannes 2002-05-12 15:40:57 +00:00
parent 497ab799ef
commit f86a944979
36 changed files with 232 additions and 247 deletions

View File

@ -35,7 +35,7 @@ function error_handler($errno, $message, $filename, $line, $variables) {
function watchdog($type, $message) {
global $user;
db_query("INSERT INTO watchdog (uid, type, message, location, hostname, timestamp) VALUES ('$user->uid', '%s', '%s', '%s', '%s', '%s')", $type, $message, getenv("PATH_INFO"), getenv("REMOTE_ADDR"), time());
db_query("INSERT INTO watchdog (uid, type, message, location, hostname, timestamp) VALUES ('$user->uid', '%s', '%s', '%s', '%s', '%s')", $type, $message, request_urih(), getenv("REMOTE_ADDR"), time());
}
function throttle($type, $rate) {
@ -100,11 +100,6 @@ function request_uri() {
}
}
function path_img() {
// use "http://your-image-server.com/ if you want to host images on a seperate server.
return "./images/";
}
function message_access() {
return t("You are not authorized to access to this page.");
}
@ -407,10 +402,6 @@ function check_file($filename) {
}
}
function format_info($body, $block) {
return "<table><tr><td><table align=\"right\" border=\"1\" width=\"180\"><tr><td>$block</td></tr></table>$body</td></tr></table>\n";
}
function format_rss_channel($title, $link, $description, $items, $language = "en", $args = array()) {
// arbitrary elements may be added using the $args associative array
@ -509,7 +500,7 @@ function page_get_cache() {
function format_interval($timestamp) {
$units = array("year|years" => 31536000, "week|weeks" => 604800, "day|days" => 86400, "hour|hours" => 3600, "min|min" => 60, "sec|sec" => 1);
foreach ($units as $key => $value) {
foreach ($units as $key=>$value) {
$key = explode("|", $key);
if ($timestamp >= $value) {
$output .= ($output ? " " : "") . format_plural(floor($timestamp / $value), $key[0], $key[1]);
@ -543,7 +534,7 @@ function format_date($timestamp, $type = "medium", $format = "") {
$date = date($c, $timestamp).$date;
}
else {
$date = $c . $date;
$date = $c.$date;
}
}
break;
@ -571,15 +562,6 @@ function format_name($object) {
return $output;
}
function format_email($address) {
return ($address) ? "<a href=\"mailto:$address\">$address</A>" : message_na();
}
function format_url($address, $description = 0) {
$description = ($description) ? $description : $address;
return ($address) ? "<a href=\"$address\">". check_output($description) ."</a>" : message_na();
}
function format_tag($link, $text) {
return l(($text ? $text : $link), array("title" => $link));
}
@ -610,7 +592,7 @@ function form_textarea($title, $name, $value, $cols, $rows, $description = 0) {
function form_select($title, $name, $value, $options, $description = 0, $extra = 0, $multiple = 0) {
if (count($options) > 0) {
foreach ($options as $key => $choice) {
foreach ($options as $key=>$choice) {
$select .= "<option value=\"$key\"". (is_array($value) ? (in_array($key, $value) ? " selected=\"selected\"" : "") : ($key == $value ? " selected=\"selected\"" : "")) .">". check_form($choice) ."</option>";
}
return form_item($title, "<select name=\"edit[$name]". ($multiple ? "[]" : "") ."\"". ($multiple ? " multiple " : "") . ($extra ? " $extra" : "") .">$select</select>", $description);
@ -635,13 +617,14 @@ function form_submit($value) {
*
* @param $args dictionary of arguments to be passed to the script
* @param $script script to be invoked; optional, defaults to node
* @param $anchor optional, anchor name
*/
function drupal_url($args = array(), $script = "node") {
function drupal_url($args = array(), $script = "node", $anchor = "") {
$t = array();
foreach ($args as $key => $value) {
$t[] = "$key=". urlencode($value);
}
return "$script.php?". implode("&", $t);
return "$script.php?". implode("&amp;", $t) . ($anchor != "" ? "#". $anchor : "");
}
/**
@ -650,34 +633,34 @@ function drupal_url($args = array(), $script = "node") {
*
* @param $args dictionary of arguments to be passed to the script
* @param $text text of the link
* @param $title optional, popup title
* @param $anchor optional, anchor name
* @param $script script to be invoked; optional, defaults to node
* @param $attributes optional, dictionary of attributes for the <a> tag such as 'target', 'name', 'class', etc.
*/
function l($text, $args = array(), $title = "", $script = "node", $attributes = array()) {
function l($text, $args = array(), $script = "node", $anchor = "", $attributes = array()) {
$t = array();
foreach ($attributes as $key => $value) {
$t[] = "$key=\"$value\"";
}
return "<a href=\"". drupal_url($args, $script) ."\" title=\"$title\" ". implode($t, " ") .">$text</a>";
return "<a href=\"". drupal_url($args, $script, $anchor) ."\" ". implode($t, " ") .">$text</a>";
}
function la($text, $args = array(), $title = "", $attributes = array()) {
function la($text, $args = array(), $anchor = "", $attributes = array()) {
// we don't call l() to avoid another duplication of the array
$t = array();
foreach ($attributes as $key => $value) {
$t[] = "$key=\"$value\"";
}
return "<a href=\"". drupal_url($args, "admin") ."\" title=\"$title\" ". implode($t, " ") .">$text</a>";
return "<a href=\"". drupal_url($args, "admin", $anchor) ."\" ". implode($t, " ") .">$text</a>";
}
function lm($text, $args = array(), $title = "", $attributes = array()) {
function lm($text, $args = array(), $anchor = "", $attributes = array()) {
// we don't call l() to avoid another duplication of the array
$t = array();
foreach ($attributes as $key => $value) {
$t[] = "$key=\"$value\"";
}
return "<a href=\"". drupal_url($args, "module") ."\" title=\"$title\" ". implode($t, " ") .">$text</a>";
return "<a href=\"". drupal_url($args, "module", $anchor) ."\" ". implode($t, " ") .">$text</a>";
}
function field_get($string, $name) {
@ -693,14 +676,6 @@ function field_set($string, $name, $value) {
return substr($rval, 1);
}
function field_merge($a, $b) {
foreach (explode(",", $b) as $data) {
$entry = explode("=", $data);
$a = field_set($a, $entry[0], $entry[1]);
}
return $a;
}
function link_page() {
global $custom_links;

View File

@ -29,7 +29,7 @@ function import_link($type) {
}
if ($type == "page" && user_access("access news feeds")) {
$links[] = lm(t("news feeds"), array("mod" => "import"), t("Read the latest news from syndicated websites."));
$links[] = lm(t("news feeds"), array("mod" => "import"), "", array("title" => t("Read the latest news from syndicated websites.")));
}
return $links ? $links : array();
@ -53,7 +53,7 @@ function import_format_item($item, $feed = 0) {
global $theme, $user;
if ($user->uid && user_access("post blogs")) {
$output .= lm("<img src=\"". $theme->image("blog.gif") ."\" border=\"0\" width=\"12\" height=\"16\" alt=\"". t("Blog this item") ."\" />", array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), t("Comment on this news item in your personal blog."));
$output .= lm("<img src=\"". $theme->image("blog.gif") ."\" border=\"0\" width=\"12\" height=\"16\" alt=\"". t("Blog this item") ."\" />", array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog.")));
}
// external link
@ -98,7 +98,7 @@ function import_get_bundles($attributes = 0) {
$i = 0;
while ($bundle = db_fetch_object($result)) {
$block[$i]["subject"] = $bundle->title;
$block[$i]["content"] = import_bundle_block($bundle->attributes) ."<p><div align=\"right\">". lm(t("more"), array("mod" => "import", "op" => "bundle", "id" => $bundle->bid), t("View this bundle's recent news.")) ."</div></p>";
$block[$i]["content"] = import_bundle_block($bundle->attributes) ."<p><div align=\"right\">". lm(t("more"), array("mod" => "import", "op" => "bundle", "id" => $bundle->bid), "", array("title" => t("View this bundle's recent news."))) ."</div></p>";
$block[$i]["info"] = "$bundle->title bundle";
$i++;
@ -113,7 +113,7 @@ function import_get_feeds($attributes = 0) {
$i = 0;
while ($feed = db_fetch_object($result)) {
$block[$i]["subject"] = $feed->title;
$block[$i]["content"] = import_feed_block($feed) ."<p><div align=\"right\">". lm(t("more"), array("mod" => "import", "op" => "feed", "id" => $feed->fid), t("View this feed's recent news.")) ."</div></p>";
$block[$i]["content"] = import_feed_block($feed) ."<p><div align=\"right\">". lm(t("more"), array("mod" => "import", "op" => "feed", "id" => $feed->fid), "", array("title" => t("View this feed's recent news."))) ."</div></p>";
$block[$i]["info"] = "$feed->title feed";
$i++;
@ -522,10 +522,10 @@ function import_admin() {
function import_page_info() {
global $theme;
$links[] = lm(t("latest news"), array("mod" => "import"), t("Read the latest news from syndicated websites."));
$links[] = lm(t("news by source"), array("mod" => "import", "op" => "feeds"), t("View the latest headlines sorted by source."));
$links[] = lm(t("news by topic"), array("mod" => "import", "op" => "bundles"), t("View the latest headlines sorted by topic."));
$links[] = lm(t("news sources"), array("mod" => "import", "op" => "sources"), t("View a list of all the websites we syndicate from."));
$links[] = lm(t("latest news"), array("mod" => "import"), "", array("title" => t("Read the latest news from syndicated websites.")));
$links[] = lm(t("news by source"), array("mod" => "import", "op" => "feeds"), "", array("title" => t("View the latest headlines sorted by source.")));
$links[] = lm(t("news by topic"), array("mod" => "import", "op" => "bundles"), "", array("title" => t("View the latest headlines sorted by topic.")));
$links[] = lm(t("news sources"), array("mod" => "import", "op" => "sources"), "", array("title" => t("View a list of all the websites we syndicate from.")));
return "<div align=\"center\">". $theme->links($links) ."</div>";
}
@ -537,11 +537,11 @@ function import_page_last() {
$output .= "<table border=\"0\" cellpadding=\"4\" cellspacing=\"2\">";
while ($item = db_fetch_object($result)) {
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), t("Comment on this news item in your personal blog."));
$links[] = lm(t("feed"), array("mod" => "import", "op" => "feed", "id" => $item->fid), t("Read more syndicated news from this feed."));
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog.")));
$links[] = lm(t("feed"), array("mod" => "import", "op" => "feed", "id" => $item->fid), "", array("title" => t("Read more syndicated news from this feed.")));
if ($item->link) {
$output .= "<tr><td>". format_url($item->link, $item->title) ." &middot; ". lm($item->ftitle, array("mod" => "import", "op" => "feed", "id" => $item->fid), t("View more information about this feed.")) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
$output .= "<tr><td><a href=\"$item->link\">$item->title</a> &middot; ". lm($item->ftitle, array("mod" => "import", "op" => "feed", "id" => $item->fid), "", array("title" => t("View more information about this feed."))) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
}
if ($item->description) {
@ -563,7 +563,7 @@ function import_page_feed($fid) {
$feed = db_fetch_object(db_query("SELECT * FROM feed WHERE fid = '%s'", $fid));
$header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\">". format_url($feed->link) ."</div></p>";
$header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\"><a href=\"$feed->link\">$feed->link</a></div></p>";
$header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">". check_output($feed->description, 1) ."</div></p>";
$header .= "<p><b>". t("Last update") .":</b><div style=\"margin-left: 20px;\">". format_interval(time() - $feed->timestamp) ." ". t("ago") ."<a href=\"$feed->url\"><img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" /></a><br /><br /></div></p>\n";
@ -571,11 +571,11 @@ function import_page_feed($fid) {
$output .= "<table border=\"0\" cellpadding=\"4\" cellspacing=\"2\">";
while ($item = db_fetch_object($result)) {
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), t("Comment on this news item in your personal blog."));
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog.")));
$links[] = "<a href=\"$item->link\">". t("visit") ."</a>";
if ($item->link) {
$output .= "<tr><td>". format_url($item->link, $item->title) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
$output .= "<tr><td><a href=\"$item->link\">$item->title</a></td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
}
if ($item->description) {
$output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($item->description, 1) ."</div><br /></td></tr>";
@ -596,7 +596,7 @@ function import_page_bundle($bid) {
$bundle = db_fetch_object(db_query("SELECT * FROM bundle WHERE bid = '%s'", $bid));
$header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\">". format_url(drupal_url(array("mod" => "import", "op" => "bundle", "id" => $bundle->bid), "module")) ."</div></p>";
$header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\">". lm("", array("mod" => "import", "op" => "bundle", "id" => $bundle->bid)) ."</div></p>";
$header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">". t("A composite news feed about") ." ". check_output($bundle->attributes) .".</div></p>";
$keys = explode(",", $bundle->attributes);
@ -605,12 +605,12 @@ function import_page_bundle($bid) {
$output .= "<table border=\"0\" cellpadding=\"4\" cellspacing=\"2\">";
while ($item = db_fetch_object($result)) {
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), t("Comment on this news item in your personal blog."));
$links[] = lm(t("feed"), array("mod" => "import", "op" => "feed", "id" => $item->fid), t("Read more syndicated news from this feed."));
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog.")));
$links[] = lm(t("feed"), array("mod" => "import", "op" => "feed", "id" => $item->fid), "", array("title" => t("Read more syndicated news from this feed.")));
$links[] = "<a href=\"$item->link\">". t("visit") ."</a>";
if ($item->link) {
$output .= "<tr><td>". format_url($item->link, $item->title) ." &middot; ". lm($item->ftitle, array("mod" => "import", "op" => "feed", "id" => $item->fid), t("View more information about this feed.")) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
$output .= "<tr><td><a href=\"$item->link\">$item->title</a> &middot; ". lm($item->ftitle, array("mod" => "import", "op" => "feed", "id" => $item->fid), "", array("title" => t("View more information about this feed."))) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
}
if ($item->description) {
@ -634,11 +634,11 @@ function import_page_sources() {
$result = db_query("SELECT * FROM feed ORDER BY title");
while ($feed = db_fetch_object($result)) {
$output .= format_url(drupal_url(array("mod" => "import", "op" => "feed", "id" => $feed->fid), "module"), $feed->title);
$output .= lm("", array("mod" => "import", "op" => "feed", "id" => $feed->fid)));
$output .= "<div style=\"margin-left: 20px;\">". check_output($feed->description, 1) ."</div><br />";
}
$output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "import", "op" => "fd"), t("View the list of syndicated websites in XML format.")) ."<br />\n";
$output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "import", "op" => "fd"), "", array("title" => t("View the list of syndicated websites in XML format."))) ."<br />\n";
$theme->header();
$theme->box(t("News feeds"), import_page_info());

View File

@ -29,7 +29,7 @@ function import_link($type) {
}
if ($type == "page" && user_access("access news feeds")) {
$links[] = lm(t("news feeds"), array("mod" => "import"), t("Read the latest news from syndicated websites."));
$links[] = lm(t("news feeds"), array("mod" => "import"), "", array("title" => t("Read the latest news from syndicated websites.")));
}
return $links ? $links : array();
@ -53,7 +53,7 @@ function import_format_item($item, $feed = 0) {
global $theme, $user;
if ($user->uid && user_access("post blogs")) {
$output .= lm("<img src=\"". $theme->image("blog.gif") ."\" border=\"0\" width=\"12\" height=\"16\" alt=\"". t("Blog this item") ."\" />", array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), t("Comment on this news item in your personal blog."));
$output .= lm("<img src=\"". $theme->image("blog.gif") ."\" border=\"0\" width=\"12\" height=\"16\" alt=\"". t("Blog this item") ."\" />", array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog.")));
}
// external link
@ -98,7 +98,7 @@ function import_get_bundles($attributes = 0) {
$i = 0;
while ($bundle = db_fetch_object($result)) {
$block[$i]["subject"] = $bundle->title;
$block[$i]["content"] = import_bundle_block($bundle->attributes) ."<p><div align=\"right\">". lm(t("more"), array("mod" => "import", "op" => "bundle", "id" => $bundle->bid), t("View this bundle's recent news.")) ."</div></p>";
$block[$i]["content"] = import_bundle_block($bundle->attributes) ."<p><div align=\"right\">". lm(t("more"), array("mod" => "import", "op" => "bundle", "id" => $bundle->bid), "", array("title" => t("View this bundle's recent news."))) ."</div></p>";
$block[$i]["info"] = "$bundle->title bundle";
$i++;
@ -113,7 +113,7 @@ function import_get_feeds($attributes = 0) {
$i = 0;
while ($feed = db_fetch_object($result)) {
$block[$i]["subject"] = $feed->title;
$block[$i]["content"] = import_feed_block($feed) ."<p><div align=\"right\">". lm(t("more"), array("mod" => "import", "op" => "feed", "id" => $feed->fid), t("View this feed's recent news.")) ."</div></p>";
$block[$i]["content"] = import_feed_block($feed) ."<p><div align=\"right\">". lm(t("more"), array("mod" => "import", "op" => "feed", "id" => $feed->fid), "", array("title" => t("View this feed's recent news."))) ."</div></p>";
$block[$i]["info"] = "$feed->title feed";
$i++;
@ -522,10 +522,10 @@ function import_admin() {
function import_page_info() {
global $theme;
$links[] = lm(t("latest news"), array("mod" => "import"), t("Read the latest news from syndicated websites."));
$links[] = lm(t("news by source"), array("mod" => "import", "op" => "feeds"), t("View the latest headlines sorted by source."));
$links[] = lm(t("news by topic"), array("mod" => "import", "op" => "bundles"), t("View the latest headlines sorted by topic."));
$links[] = lm(t("news sources"), array("mod" => "import", "op" => "sources"), t("View a list of all the websites we syndicate from."));
$links[] = lm(t("latest news"), array("mod" => "import"), "", array("title" => t("Read the latest news from syndicated websites.")));
$links[] = lm(t("news by source"), array("mod" => "import", "op" => "feeds"), "", array("title" => t("View the latest headlines sorted by source.")));
$links[] = lm(t("news by topic"), array("mod" => "import", "op" => "bundles"), "", array("title" => t("View the latest headlines sorted by topic.")));
$links[] = lm(t("news sources"), array("mod" => "import", "op" => "sources"), "", array("title" => t("View a list of all the websites we syndicate from.")));
return "<div align=\"center\">". $theme->links($links) ."</div>";
}
@ -537,11 +537,11 @@ function import_page_last() {
$output .= "<table border=\"0\" cellpadding=\"4\" cellspacing=\"2\">";
while ($item = db_fetch_object($result)) {
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), t("Comment on this news item in your personal blog."));
$links[] = lm(t("feed"), array("mod" => "import", "op" => "feed", "id" => $item->fid), t("Read more syndicated news from this feed."));
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog.")));
$links[] = lm(t("feed"), array("mod" => "import", "op" => "feed", "id" => $item->fid), "", array("title" => t("Read more syndicated news from this feed.")));
if ($item->link) {
$output .= "<tr><td>". format_url($item->link, $item->title) ." &middot; ". lm($item->ftitle, array("mod" => "import", "op" => "feed", "id" => $item->fid), t("View more information about this feed.")) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
$output .= "<tr><td><a href=\"$item->link\">$item->title</a> &middot; ". lm($item->ftitle, array("mod" => "import", "op" => "feed", "id" => $item->fid), "", array("title" => t("View more information about this feed."))) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
}
if ($item->description) {
@ -563,7 +563,7 @@ function import_page_feed($fid) {
$feed = db_fetch_object(db_query("SELECT * FROM feed WHERE fid = '%s'", $fid));
$header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\">". format_url($feed->link) ."</div></p>";
$header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\"><a href=\"$feed->link\">$feed->link</a></div></p>";
$header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">". check_output($feed->description, 1) ."</div></p>";
$header .= "<p><b>". t("Last update") .":</b><div style=\"margin-left: 20px;\">". format_interval(time() - $feed->timestamp) ." ". t("ago") ."<a href=\"$feed->url\"><img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" /></a><br /><br /></div></p>\n";
@ -571,11 +571,11 @@ function import_page_feed($fid) {
$output .= "<table border=\"0\" cellpadding=\"4\" cellspacing=\"2\">";
while ($item = db_fetch_object($result)) {
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), t("Comment on this news item in your personal blog."));
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog.")));
$links[] = "<a href=\"$item->link\">". t("visit") ."</a>";
if ($item->link) {
$output .= "<tr><td>". format_url($item->link, $item->title) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
$output .= "<tr><td><a href=\"$item->link\">$item->title</a></td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
}
if ($item->description) {
$output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($item->description, 1) ."</div><br /></td></tr>";
@ -596,7 +596,7 @@ function import_page_bundle($bid) {
$bundle = db_fetch_object(db_query("SELECT * FROM bundle WHERE bid = '%s'", $bid));
$header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\">". format_url(drupal_url(array("mod" => "import", "op" => "bundle", "id" => $bundle->bid), "module")) ."</div></p>";
$header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\">". lm("", array("mod" => "import", "op" => "bundle", "id" => $bundle->bid)) ."</div></p>";
$header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">". t("A composite news feed about") ." ". check_output($bundle->attributes) .".</div></p>";
$keys = explode(",", $bundle->attributes);
@ -605,12 +605,12 @@ function import_page_bundle($bid) {
$output .= "<table border=\"0\" cellpadding=\"4\" cellspacing=\"2\">";
while ($item = db_fetch_object($result)) {
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), t("Comment on this news item in your personal blog."));
$links[] = lm(t("feed"), array("mod" => "import", "op" => "feed", "id" => $item->fid), t("Read more syndicated news from this feed."));
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog.")));
$links[] = lm(t("feed"), array("mod" => "import", "op" => "feed", "id" => $item->fid), "", array("title" => t("Read more syndicated news from this feed.")));
$links[] = "<a href=\"$item->link\">". t("visit") ."</a>";
if ($item->link) {
$output .= "<tr><td>". format_url($item->link, $item->title) ." &middot; ". lm($item->ftitle, array("mod" => "import", "op" => "feed", "id" => $item->fid), t("View more information about this feed.")) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
$output .= "<tr><td><a href=\"$item->link\">$item->title</a> &middot; ". lm($item->ftitle, array("mod" => "import", "op" => "feed", "id" => $item->fid), "", array("title" => t("View more information about this feed."))) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
}
if ($item->description) {
@ -634,11 +634,11 @@ function import_page_sources() {
$result = db_query("SELECT * FROM feed ORDER BY title");
while ($feed = db_fetch_object($result)) {
$output .= format_url(drupal_url(array("mod" => "import", "op" => "feed", "id" => $feed->fid), "module"), $feed->title);
$output .= lm("", array("mod" => "import", "op" => "feed", "id" => $feed->fid)));
$output .= "<div style=\"margin-left: 20px;\">". check_output($feed->description, 1) ."</div><br />";
}
$output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "import", "op" => "fd"), t("View the list of syndicated websites in XML format.")) ."<br />\n";
$output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "import", "op" => "fd"), "", array("title" => t("View the list of syndicated websites in XML format."))) ."<br />\n";
$theme->header();
$theme->box(t("News feeds"), import_page_info());

View File

@ -109,7 +109,7 @@ function archive_block() {
function archive_link($type) {
if ($type == "page" && user_access("access content")) {
$links[] = lm(t("archives"), array("mod" => "archive"), t("Read the older content in our archive."));
$links[] = lm(t("archives"), array("mod" => "archive"), "", array("title" => t("Read the older content in our archive.")));
}
return $links ? $links : array();

View File

@ -109,7 +109,7 @@ function archive_block() {
function archive_link($type) {
if ($type == "page" && user_access("access content")) {
$links[] = lm(t("archives"), array("mod" => "archive"), t("Read the older content in our archive."));
$links[] = lm(t("archives"), array("mod" => "archive"), "", array("title" => t("Read the older content in our archive.")));
}
return $links ? $links : array();

View File

@ -77,9 +77,9 @@ function block_admin_display() {
$weights = array(0 => 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
$output .= '<tr>';
//$output .= '<td>'. la($block->name, array("mod" => "block", "op" => "view", "id" => $block->delta), t("View the block details")) .'</td>';
//$output .= '<td>'. la($block->name, array("mod" => "block", "op" => "view", "id" => $block->delta), "", array("title" => t("View the block details"))) .'</td>';
$output .= "<td>$block->name</td>";
$output .= '<td>'. (module_hook($block->module, "admin") ? la($block->module, array("mod" => $block->module), "Administer module") : $block->module) .'</td>';
$output .= '<td>'. (module_hook($block->module, "admin") ? la($block->module, array("mod" => $block->module), "", array("title" => t("Administer module"))) : $block->module) .'</td>';
$output .= '<td align="center">'. form_checkbox(NULL, "$block->name][status", 1, $block->status) .'</td>';
$output .= '<td align="center">'. form_checkbox(NULL, "$block->name][custom", 1, $block->custom) .'</td>';
$output .= '<td>'. form_select(NULL, "$block->name][weight", $block->weight, $weights) .'</td>';
@ -259,13 +259,17 @@ function block_user($type, &$edit, &$user) {
case "edit_form":
$result = db_query("SELECT * FROM blocks WHERE custom = '%d' ORDER BY name", 1);
$form = '<table border="0" cellpadding="2" cellspacing="2">';
while ($block = db_fetch_object($result)) {
$form .= "<tr><td>$block->name</td><td>". form_checkbox(NULL, "block][$block->name", 1, $user->block[$block->name]) ."</td></tr>\n";
$data = module_invoke($block->module, "block");
if ($data[$block->delta]["subject"]) {
$form .= "<tr><td>$block->name</td><td>". form_checkbox(NULL, "block][$block->name", 1, $user->block[$block->name]) ."</td></tr>\n";
}
}
if (isset($form)) {
return form_item(t("Block configuration"), '<table border="0" cellpadding="2" cellspacing="2">'. $form .'</table>', "Enable the blocks you would like to see displayed in the side bars.");
}
$form .= '</table>';
return form_item(t("Block configuration"), $form, "Enable the blocks you would like to see displayed in the side bars.");
}
}

View File

@ -77,9 +77,9 @@ function block_admin_display() {
$weights = array(0 => 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
$output .= '<tr>';
//$output .= '<td>'. la($block->name, array("mod" => "block", "op" => "view", "id" => $block->delta), t("View the block details")) .'</td>';
//$output .= '<td>'. la($block->name, array("mod" => "block", "op" => "view", "id" => $block->delta), "", array("title" => t("View the block details"))) .'</td>';
$output .= "<td>$block->name</td>";
$output .= '<td>'. (module_hook($block->module, "admin") ? la($block->module, array("mod" => $block->module), "Administer module") : $block->module) .'</td>';
$output .= '<td>'. (module_hook($block->module, "admin") ? la($block->module, array("mod" => $block->module), "", array("title" => t("Administer module"))) : $block->module) .'</td>';
$output .= '<td align="center">'. form_checkbox(NULL, "$block->name][status", 1, $block->status) .'</td>';
$output .= '<td align="center">'. form_checkbox(NULL, "$block->name][custom", 1, $block->custom) .'</td>';
$output .= '<td>'. form_select(NULL, "$block->name][weight", $block->weight, $weights) .'</td>';
@ -259,13 +259,17 @@ function block_user($type, &$edit, &$user) {
case "edit_form":
$result = db_query("SELECT * FROM blocks WHERE custom = '%d' ORDER BY name", 1);
$form = '<table border="0" cellpadding="2" cellspacing="2">';
while ($block = db_fetch_object($result)) {
$form .= "<tr><td>$block->name</td><td>". form_checkbox(NULL, "block][$block->name", 1, $user->block[$block->name]) ."</td></tr>\n";
$data = module_invoke($block->module, "block");
if ($data[$block->delta]["subject"]) {
$form .= "<tr><td>$block->name</td><td>". form_checkbox(NULL, "block][$block->name", 1, $user->block[$block->name]) ."</td></tr>\n";
}
}
if (isset($form)) {
return form_item(t("Block configuration"), '<table border="0" cellpadding="2" cellspacing="2">'. $form .'</table>', "Enable the blocks you would like to see displayed in the side bars.");
}
$form .= '</table>';
return form_item(t("Block configuration"), $form, "Enable the blocks you would like to see displayed in the side bars.");
}
}

View File

@ -168,12 +168,12 @@ function blog_page_user($uid = 0, $date = 0, $all = 0) {
}
$output .= "</table>";
$output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "blog", "op" => "feed", "id" => $account->uid), t("Read the XML version of this page."))."\n";
$output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "blog", "op" => "feed", "id" => $account->uid), "", array("title" => t("Read the XML version of this page."))) ."\n";
if (!$all) {
$output .= lm(t("show all blogs"), array("mod" => "blog", "op" => "view", "id" => $account->uid, "all" => 1), t("Show all blogs by this user"));
$output .= lm(t("show all blogs"), array("mod" => "blog", "op" => "view", "id" => $account->uid, "all" => 1), "", array("title" => t("Show all blogs by this user")));
}
else {
$output .= lm(t("show recent blogs"), array("mod" => "blog", "op" => "view", "id" => $account->uid), t("Show recent blogs by this user"));
$output .= lm(t("show recent blogs"), array("mod" => "blog", "op" => "view", "id" => $account->uid), "", array("title" => t("Show recent blogs by this user")));
}
$theme->box(t("%u's blog", array("%u" => $account->name)), $output);
@ -197,7 +197,7 @@ function blog_page_last() {
}
$output .= "</table>";
$output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "blog", "op" => "feed"), t("Read the XML version of this page."))."\n";
$output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "blog", "op" => "feed"), "", array("title" => t("Read the XML version of this page."))) ."\n";
$theme->box(t("User blogs"), $output, "main");
}
@ -289,24 +289,24 @@ function blog_link($type, $node = 0, $main) {
global $user;
if ($type == "page" && user_access("access content")) {
$links[] = lm(t("user blogs"), array("mod" => "blog"), t("Read the latest blog entries."));
$links[] = lm(t("user blogs"), array("mod" => "blog"), "", array("title" => t("Read the latest blog entries.")));
}
if ($type == "menu.create" && user_access("post content")) {
$links[] = lm(t("create blog entry"), array("mod" => "node", "op" => "add", "type" => "blog"), t("Add a new personal blog entry."));
$links[] = lm(t("create blog entry"), array("mod" => "node", "op" => "add", "type" => "blog"), "", array("title" => t("Add a new personal blog entry.")));
}
if ($type == "menu.view" && user_access("access content")) {
$links[] = lm(t("view personal blog"), array("mod" => "blog", "op" => "view", "id" => $user->uid), t("Read your latest blog entries."));
$links[] = lm(t("view personal blog"), array("mod" => "blog", "op" => "view", "id" => $user->uid), "", array("title" => t("Read your latest blog entries.")));
}
if ($type == "node" && $node->type == "blog") {
global $op;
if (blog_access("update", $node)) {
$links[] = lm(t("edit this blog"), array("mod" => "node", "op" => "edit", "id" => $node->nid), t("Edit this blog entry."));
$links[] = lm(t("edit this blog"), array("mod" => "node", "op" => "edit", "id" => $node->nid), "", array("title" => t("Edit this blog entry.")));
}
else {
$links[] = lm(t("%u's blog", array("%u" => $node->name)), array("mod" => "blog", "op" => "view", "id" => $node->uid), t("Read %u's latest blog entries.", array("%u" => $node->name)));
$links[] = lm(t("%u's blog", array("%u" => $node->name)), array("mod" => "blog", "op" => "view", "id" => $node->uid), "", array("title" => t("Read %u's latest blog entries.", array("%u" => $node->name))));
}
}
@ -319,7 +319,7 @@ function blog_block() {
$result = db_query("SELECT u.uid, u.name, n.created, n.title, n.nid FROM node n LEFT JOIN users u ON n.uid = u.uid WHERE n.type = 'blog' ORDER BY n.nid DESC LIMIT 10");
while ($node = db_fetch_object($result)) {
$output .= l(check_output($node->title), array("id" => $node->nid))."<br />\n";
$output .= l(check_output($node->title), array("id" => $node->nid)) ."<br />\n";
}
$output .= "<br /><div align=\"right\">".lm(t("more"), array("mod" => "blog"), t("Read the latest blog entries."))."</div>";

View File

@ -168,12 +168,12 @@ function blog_page_user($uid = 0, $date = 0, $all = 0) {
}
$output .= "</table>";
$output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "blog", "op" => "feed", "id" => $account->uid), t("Read the XML version of this page."))."\n";
$output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "blog", "op" => "feed", "id" => $account->uid), "", array("title" => t("Read the XML version of this page."))) ."\n";
if (!$all) {
$output .= lm(t("show all blogs"), array("mod" => "blog", "op" => "view", "id" => $account->uid, "all" => 1), t("Show all blogs by this user"));
$output .= lm(t("show all blogs"), array("mod" => "blog", "op" => "view", "id" => $account->uid, "all" => 1), "", array("title" => t("Show all blogs by this user")));
}
else {
$output .= lm(t("show recent blogs"), array("mod" => "blog", "op" => "view", "id" => $account->uid), t("Show recent blogs by this user"));
$output .= lm(t("show recent blogs"), array("mod" => "blog", "op" => "view", "id" => $account->uid), "", array("title" => t("Show recent blogs by this user")));
}
$theme->box(t("%u's blog", array("%u" => $account->name)), $output);
@ -197,7 +197,7 @@ function blog_page_last() {
}
$output .= "</table>";
$output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "blog", "op" => "feed"), t("Read the XML version of this page."))."\n";
$output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "blog", "op" => "feed"), "", array("title" => t("Read the XML version of this page."))) ."\n";
$theme->box(t("User blogs"), $output, "main");
}
@ -289,24 +289,24 @@ function blog_link($type, $node = 0, $main) {
global $user;
if ($type == "page" && user_access("access content")) {
$links[] = lm(t("user blogs"), array("mod" => "blog"), t("Read the latest blog entries."));
$links[] = lm(t("user blogs"), array("mod" => "blog"), "", array("title" => t("Read the latest blog entries.")));
}
if ($type == "menu.create" && user_access("post content")) {
$links[] = lm(t("create blog entry"), array("mod" => "node", "op" => "add", "type" => "blog"), t("Add a new personal blog entry."));
$links[] = lm(t("create blog entry"), array("mod" => "node", "op" => "add", "type" => "blog"), "", array("title" => t("Add a new personal blog entry.")));
}
if ($type == "menu.view" && user_access("access content")) {
$links[] = lm(t("view personal blog"), array("mod" => "blog", "op" => "view", "id" => $user->uid), t("Read your latest blog entries."));
$links[] = lm(t("view personal blog"), array("mod" => "blog", "op" => "view", "id" => $user->uid), "", array("title" => t("Read your latest blog entries.")));
}
if ($type == "node" && $node->type == "blog") {
global $op;
if (blog_access("update", $node)) {
$links[] = lm(t("edit this blog"), array("mod" => "node", "op" => "edit", "id" => $node->nid), t("Edit this blog entry."));
$links[] = lm(t("edit this blog"), array("mod" => "node", "op" => "edit", "id" => $node->nid), "", array("title" => t("Edit this blog entry.")));
}
else {
$links[] = lm(t("%u's blog", array("%u" => $node->name)), array("mod" => "blog", "op" => "view", "id" => $node->uid), t("Read %u's latest blog entries.", array("%u" => $node->name)));
$links[] = lm(t("%u's blog", array("%u" => $node->name)), array("mod" => "blog", "op" => "view", "id" => $node->uid), "", array("title" => t("Read %u's latest blog entries.", array("%u" => $node->name))));
}
}
@ -319,7 +319,7 @@ function blog_block() {
$result = db_query("SELECT u.uid, u.name, n.created, n.title, n.nid FROM node n LEFT JOIN users u ON n.uid = u.uid WHERE n.type = 'blog' ORDER BY n.nid DESC LIMIT 10");
while ($node = db_fetch_object($result)) {
$output .= l(check_output($node->title), array("id" => $node->nid))."<br />\n";
$output .= l(check_output($node->title), array("id" => $node->nid)) ."<br />\n";
}
$output .= "<br /><div align=\"right\">".lm(t("more"), array("mod" => "blog"), t("Read the latest blog entries."))."</div>";

View File

@ -92,11 +92,11 @@ function book_save($op, $node) {
function book_link($type, $node = 0, $main = 0) {
if ($type == "page" && user_access("access content")) {
$links[] = lm(t("collaborative book"), array("mod" => "book"), t("Read and contribute to the collaborative books."));
$links[] = lm(t("collaborative book"), array("mod" => "book"), "", array("title" => t("Read and contribute to the collaborative books.")));
}
if ($type == "menu.create" && user_access("post content")) {
$links[] = lm(t("create book page"), array("mod" => "node", "op" => "add", "type" => "book"), t("Add a new book page."));
$links[] = lm(t("create book page"), array("mod" => "node", "op" => "add", "type" => "book"), "", array("title" => t("Add a new book page.")));
}
if ($type == "admin" && user_access("administer nodes")) {
@ -104,7 +104,7 @@ function book_link($type, $node = 0, $main = 0) {
}
if ($type == "node" && $node->type == "book" && book_access("update", $node)) {
$links[] = lm(t("edit this page"), array("mod" => "node", "op" => "edit", "id" => $node->nid), t("Suggest an update for this book page."));
$links[] = lm(t("edit this page"), array("mod" => "node", "op" => "edit", "id" => $node->nid), "", array("title" => t("Suggest an update for this book page.")));
}
return $links ? $links : array();
@ -406,8 +406,8 @@ function book_view($node, $main = 0) {
}
$output .= " <tr><td colspan=\"3\"><hr /></td></tr>";
$output .= " <tr><td align=\"left\" width=\"33%\">". ($prev ? l(t("previous"), array("id" => $prev->nid), t("View the previous page in this book.")) : t("previous")) ."</td><td align=\"center\" width=\"34%\">". lm(t("index"), array("mod" => "book"), t("View this book's table of contents.")) ."</td><td align=\"right\" width=\"33%\">". ($next ? l(t("next"), array("id" => $next->nid), t("View the next page in this book.")) : t("next")) ."</td></tr>";
$output .= " <tr><td align=\"left\" width=\"33%\">". ($prev ? "<small>". check_output($prev->title) ."</small>" : "&nbsp;") ."</td><td align=\"center\" width=\"34%\">". ($node->parent ? l(t("up"), array("id" => $node->parent), t("View this page's parent section.")) : t("up")) ."</td><td align=\"right\" width=\"33%\">". ($next ? "<small>". check_output($next->title) ."</small>" : "&nbsp;") ."</td></tr>";
$output .= " <tr><td align=\"left\" width=\"33%\">". ($prev ? l(t("previous"), array("id" => $prev->nid), "", array("title" => t("View the previous page in this book."))) : t("previous")) ."</td><td align=\"center\" width=\"34%\">". lm(t("index"), array("mod" => "book"), t("View this book's table of contents.")) ."</td><td align=\"right\" width=\"33%\">". ($next ? l(t("next"), array("id" => $next->nid), "", array("title" => t("View the next page in this book."))) : t("next")) ."</td></tr>";
$output .= " <tr><td align=\"left\" width=\"33%\">". ($prev ? "<small>". check_output($prev->title) ."</small>" : "&nbsp;") ."</td><td align=\"center\" width=\"34%\">". ($node->parent ? l(t("up"), array("id" => $node->parent), "", array("title" => t("View this page's parent section."))) : t("up")) ."</td><td align=\"right\" width=\"33%\">". ($next ? "<small>". check_output($next->title) ."</small>" : "&nbsp;") ."</td></tr>";
$output .= " <tr><td colspan=\"3\"><hr /></td></tr>";
$output .= " <tr><td colspan=\"3\" align=\"right\"><div style=\"margin: 10 10 10 10;\">". $theme->links(link_node($node, $main)) ."</div></td></tr>";
$output .= "</table>";
@ -675,7 +675,7 @@ function book_admin_links() {
$links[] = la(t("book") .": <i>". check_output($book->title) ."</i>", array("mod" => "book", "op" => "view", "id" => $book->nid));
}
$links[] = la(t("orphan pages"), array("mod" => "book", "op" => "orphan"));
$links[] = lm(t("export to HTML"), array("mod" => "book", "op" => "feed"), t("display all books in a single HTML page"));
$links[] = lm(t("export to HTML"), array("mod" => "book", "op" => "feed"), "", array("title" => t("display all books in a single HTML page")));
$links[] = la(t("help"), array("mod" => "book", "op" => "help"));
return $links;
}

View File

@ -92,11 +92,11 @@ function book_save($op, $node) {
function book_link($type, $node = 0, $main = 0) {
if ($type == "page" && user_access("access content")) {
$links[] = lm(t("collaborative book"), array("mod" => "book"), t("Read and contribute to the collaborative books."));
$links[] = lm(t("collaborative book"), array("mod" => "book"), "", array("title" => t("Read and contribute to the collaborative books.")));
}
if ($type == "menu.create" && user_access("post content")) {
$links[] = lm(t("create book page"), array("mod" => "node", "op" => "add", "type" => "book"), t("Add a new book page."));
$links[] = lm(t("create book page"), array("mod" => "node", "op" => "add", "type" => "book"), "", array("title" => t("Add a new book page.")));
}
if ($type == "admin" && user_access("administer nodes")) {
@ -104,7 +104,7 @@ function book_link($type, $node = 0, $main = 0) {
}
if ($type == "node" && $node->type == "book" && book_access("update", $node)) {
$links[] = lm(t("edit this page"), array("mod" => "node", "op" => "edit", "id" => $node->nid), t("Suggest an update for this book page."));
$links[] = lm(t("edit this page"), array("mod" => "node", "op" => "edit", "id" => $node->nid), "", array("title" => t("Suggest an update for this book page.")));
}
return $links ? $links : array();
@ -406,8 +406,8 @@ function book_view($node, $main = 0) {
}
$output .= " <tr><td colspan=\"3\"><hr /></td></tr>";
$output .= " <tr><td align=\"left\" width=\"33%\">". ($prev ? l(t("previous"), array("id" => $prev->nid), t("View the previous page in this book.")) : t("previous")) ."</td><td align=\"center\" width=\"34%\">". lm(t("index"), array("mod" => "book"), t("View this book's table of contents.")) ."</td><td align=\"right\" width=\"33%\">". ($next ? l(t("next"), array("id" => $next->nid), t("View the next page in this book.")) : t("next")) ."</td></tr>";
$output .= " <tr><td align=\"left\" width=\"33%\">". ($prev ? "<small>". check_output($prev->title) ."</small>" : "&nbsp;") ."</td><td align=\"center\" width=\"34%\">". ($node->parent ? l(t("up"), array("id" => $node->parent), t("View this page's parent section.")) : t("up")) ."</td><td align=\"right\" width=\"33%\">". ($next ? "<small>". check_output($next->title) ."</small>" : "&nbsp;") ."</td></tr>";
$output .= " <tr><td align=\"left\" width=\"33%\">". ($prev ? l(t("previous"), array("id" => $prev->nid), "", array("title" => t("View the previous page in this book."))) : t("previous")) ."</td><td align=\"center\" width=\"34%\">". lm(t("index"), array("mod" => "book"), t("View this book's table of contents.")) ."</td><td align=\"right\" width=\"33%\">". ($next ? l(t("next"), array("id" => $next->nid), "", array("title" => t("View the next page in this book."))) : t("next")) ."</td></tr>";
$output .= " <tr><td align=\"left\" width=\"33%\">". ($prev ? "<small>". check_output($prev->title) ."</small>" : "&nbsp;") ."</td><td align=\"center\" width=\"34%\">". ($node->parent ? l(t("up"), array("id" => $node->parent), "", array("title" => t("View this page's parent section."))) : t("up")) ."</td><td align=\"right\" width=\"33%\">". ($next ? "<small>". check_output($next->title) ."</small>" : "&nbsp;") ."</td></tr>";
$output .= " <tr><td colspan=\"3\"><hr /></td></tr>";
$output .= " <tr><td colspan=\"3\" align=\"right\"><div style=\"margin: 10 10 10 10;\">". $theme->links(link_node($node, $main)) ."</div></td></tr>";
$output .= "</table>";
@ -675,7 +675,7 @@ function book_admin_links() {
$links[] = la(t("book") .": <i>". check_output($book->title) ."</i>", array("mod" => "book", "op" => "view", "id" => $book->nid));
}
$links[] = la(t("orphan pages"), array("mod" => "book", "op" => "orphan"));
$links[] = lm(t("export to HTML"), array("mod" => "book", "op" => "feed"), t("display all books in a single HTML page"));
$links[] = lm(t("export to HTML"), array("mod" => "book", "op" => "feed"), "", array("title" => t("display all books in a single HTML page")));
$links[] = la(t("help"), array("mod" => "book", "op" => "help"));
return $links;
}

View File

@ -31,7 +31,7 @@ function cloud_perm() {
function cloud_link($type) {
if ($type == "page" && user_access("access site cloud")) {
$links[] = lm(t("site cloud"), array("mod" => "cloud"), t("Monitor other sites in the cloud."));;
$links[] = lm(t("site cloud"), array("mod" => "cloud"), "", array("title" => t("Monitor other sites in the cloud.")));
}
if ($type == "admin" && user_access("administer site cloud")) {
@ -147,7 +147,7 @@ function cloud_list($limit = 10) {
$list = 0;
}
}
$output .= "<div style=\"padding-left: 10px;\">". format_url($site->link, $site->name) ."</div>";
$output .= "<div style=\"padding-left: 10px;\"><a href=\"$site->link\">$site->name</a></div>";
}
return $output;
}
@ -164,7 +164,7 @@ function cloud_page() {
function cloud_block() {
$block[0]["subject"] = t("Site cloud");
$block[0]["content"] = cloud_list(20) ."<br /><div align=\"right\">". lm(t("more"), array("mod" => "cloud"), t("Monitor other sites in the cloud.")) ."</div>";
$block[0]["content"] = cloud_list(20) ."<br /><div align=\"right\">". lm(t("more"), array("mod" => "cloud"), "", array("title", t("Monitor other sites in the cloud."))) ."</div>";
$block[0]["info"] = t("Site cloud");
return $block;
}

View File

@ -381,7 +381,7 @@ function comment_links($comment, $return = 1) {
$links = array();
if ($return) {
$links[] = l("<span style=\"color: $theme->type;\">". t("return") ."</span>", array("id" => $comment->nid ."#". $comment->cid));
$links[] = l("<span style=\"color: $theme->type;\">". t("return") ."</span>", array("id" => $comment->nid), "node", $comment->cid);
}
if (user_access("administer comments")) {
@ -398,10 +398,10 @@ function comment_links($comment, $return = 1) {
//if (node_comment_mode($comment->nid)) {
if (user_access("post comments")) {
if (comment_access("edit", $comment)) {
$links[] = lm("<span style=\"color: $theme->type\">". t("edit your comment") ."</span>", array("mod" => "comment", "op" => "edit", "id" => $comment->cid), t("Make changes to your comment."));
$links[] = lm("<span style=\"color: $theme->type\">". t("edit your comment") ."</span>", array("mod" => "comment", "op" => "edit", "id" => $comment->cid), "", array("title" => t("Make changes to your comment.")));
}
else {
$links[] = lm("<span style=\"color: $theme->type;\">". t("reply to this comment") ."</span>", array("mod" => "comment", "op" => "reply", "id" => $comment->nid, "pid" => $comment->cid), t("Reply to this comment."));
$links[] = lm("<span style=\"color: $theme->type;\">". t("reply to this comment") ."</span>", array("mod" => "comment", "op" => "reply", "id" => $comment->nid, "pid" => $comment->cid), "", array("title" => t("Reply to this comment.")));
}
}
//}
@ -420,7 +420,7 @@ function comment_view($comment, $folded = 0) {
$theme->comment($comment, $folded);
}
else {
print l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid ."#". $comment->cid)) ." by ". format_name($comment) ."</small><p />";
print l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid), "node", $comment->cid) ." by ". format_name($comment) ."</small><p />";
}
}
@ -521,7 +521,7 @@ function comment_render($nid, $cid) {
print " <tr><th>Subject</th><th>Author</th><th>Date</th><th>Score</th></tr>\n";
while ($comment = db_fetch_object($result)) {
if (comment_visible($comment, $threshold)) {
print " <tr><td>". l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid ."#". $comment->cid)) ."</td><td>". format_name($comment) ."</td><td>". format_date($comment->timestamp, "small") ."</td><td>$comment->score</td></tr>\n";
print " <tr><td>". l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid), "node", $comment->cid) ."</td><td>". format_name($comment) ."</td><td>". format_date($comment->timestamp, "small") ."</td><td>$comment->score</td></tr>\n";
}
}
print "</table>\n";
@ -624,7 +624,7 @@ function comment_link($type, $node = 0, $main = 0) {
$all = comment_num_all($node->nid);
$new = comment_num_new($node->nid);
$links[] = l(format_plural($all, "comment", "comments") . ($new ? ", $new ". t("new") : ""), array("id" => $node->nid ."#comment"), t("View this posting and all of its comments."));
$links[] = l(format_plural($all, "comment", "comments") . ($new ? ", $new ". t("new") : ""), array("id" => $node->nid), "node", "comment", array("title" => t("View this posting and all of its comments.")));
}
}
else {
@ -635,7 +635,7 @@ function comment_link($type, $node = 0, $main = 0) {
if (user_access("post comments")) {
if ($node->comment == 2) {
$links[] = lm(t("add new comment"), array("mod" => "comment", "op" => "reply", "id" => $node->nid ."#comment"), t("Share your thoughts and opinions related to this posting."));
$links[] = lm(t("add new comment"), array("mod" => "comment", "op" => "reply", "id" => $node->nid), "comment", array("title" => t("Share your thoughts and opinions related to this posting.")));
}
else {
$links[] = t("This discussion is closed: you can't post new comments.");
@ -662,7 +662,7 @@ function comment_node_link($node) {
$output .= " <tr><th>title</th><th>author</th><th colspan=\"3\">operations</th></tr>";
while ($comment = db_fetch_object($result)) {
$output .= "<tr><td>". l($comment->subject, array("id" => $node->nid, "cid" => $comment->cid ."#". $comment->cid)) ."</td><td>". format_name($comment) ."</td><td>". l(t("view comment"), array("id" => $node->nid, "cid" => $comment->cid ."#". $comment->cid)) ."</td><td>". la(t("edit comment"), array("mod" => "comment", "op" => "edit", "id" => $comment->cid)) ."</td><td>". la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)) ."</td></tr>";
$output .= "<tr><td>". l($comment->subject, array("id" => $node->nid, "cid" => $comment->cid), "node", $comment->cid) ."</td><td>". format_name($comment) ."</td><td>". l(t("view comment"), array("id" => $node->nid, "cid" => $comment->cid ."#". $comment->cid)) ."</td><td>". la(t("edit comment"), array("mod" => "comment", "op" => "edit", "id" => $comment->cid)) ."</td><td>". la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)) ."</td></tr>";
}
$output .= "</table>";
@ -729,7 +729,7 @@ function comment_admin_overview() {
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= " <tr><th>subject</th><th>author</th><th>date</th><th colspan=\"2\">operations</th></tr>\n";
while ($comment = db_fetch_object($result)) {
$output .= " <tr><td>". l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid, "pid" => $comment->pid ."#". $comment->cid)) ."</td><td>". format_name($comment) ."</td><td>". format_date($comment->timestamp, "small") ."</td><td>". la(t("edit comment"), array("mod" => comment, "op" => edit, "id" => $comment->cid)) ."</td><td>". la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)) ."</td></tr>\n";
$output .= " <tr><td>". l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid) ."</td><td>". format_name($comment) ."</td><td>". format_date($comment->timestamp, "small") ."</td><td>". la(t("edit comment"), array("mod" => comment, "op" => edit, "id" => $comment->cid)) ."</td><td>". la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)) ."</td></tr>\n";
}
$output .= "</table>\n";

View File

@ -381,7 +381,7 @@ function comment_links($comment, $return = 1) {
$links = array();
if ($return) {
$links[] = l("<span style=\"color: $theme->type;\">". t("return") ."</span>", array("id" => $comment->nid ."#". $comment->cid));
$links[] = l("<span style=\"color: $theme->type;\">". t("return") ."</span>", array("id" => $comment->nid), "node", $comment->cid);
}
if (user_access("administer comments")) {
@ -398,10 +398,10 @@ function comment_links($comment, $return = 1) {
//if (node_comment_mode($comment->nid)) {
if (user_access("post comments")) {
if (comment_access("edit", $comment)) {
$links[] = lm("<span style=\"color: $theme->type\">". t("edit your comment") ."</span>", array("mod" => "comment", "op" => "edit", "id" => $comment->cid), t("Make changes to your comment."));
$links[] = lm("<span style=\"color: $theme->type\">". t("edit your comment") ."</span>", array("mod" => "comment", "op" => "edit", "id" => $comment->cid), "", array("title" => t("Make changes to your comment.")));
}
else {
$links[] = lm("<span style=\"color: $theme->type;\">". t("reply to this comment") ."</span>", array("mod" => "comment", "op" => "reply", "id" => $comment->nid, "pid" => $comment->cid), t("Reply to this comment."));
$links[] = lm("<span style=\"color: $theme->type;\">". t("reply to this comment") ."</span>", array("mod" => "comment", "op" => "reply", "id" => $comment->nid, "pid" => $comment->cid), "", array("title" => t("Reply to this comment.")));
}
}
//}
@ -420,7 +420,7 @@ function comment_view($comment, $folded = 0) {
$theme->comment($comment, $folded);
}
else {
print l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid ."#". $comment->cid)) ." by ". format_name($comment) ."</small><p />";
print l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid), "node", $comment->cid) ." by ". format_name($comment) ."</small><p />";
}
}
@ -521,7 +521,7 @@ function comment_render($nid, $cid) {
print " <tr><th>Subject</th><th>Author</th><th>Date</th><th>Score</th></tr>\n";
while ($comment = db_fetch_object($result)) {
if (comment_visible($comment, $threshold)) {
print " <tr><td>". l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid ."#". $comment->cid)) ."</td><td>". format_name($comment) ."</td><td>". format_date($comment->timestamp, "small") ."</td><td>$comment->score</td></tr>\n";
print " <tr><td>". l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid), "node", $comment->cid) ."</td><td>". format_name($comment) ."</td><td>". format_date($comment->timestamp, "small") ."</td><td>$comment->score</td></tr>\n";
}
}
print "</table>\n";
@ -624,7 +624,7 @@ function comment_link($type, $node = 0, $main = 0) {
$all = comment_num_all($node->nid);
$new = comment_num_new($node->nid);
$links[] = l(format_plural($all, "comment", "comments") . ($new ? ", $new ". t("new") : ""), array("id" => $node->nid ."#comment"), t("View this posting and all of its comments."));
$links[] = l(format_plural($all, "comment", "comments") . ($new ? ", $new ". t("new") : ""), array("id" => $node->nid), "node", "comment", array("title" => t("View this posting and all of its comments.")));
}
}
else {
@ -635,7 +635,7 @@ function comment_link($type, $node = 0, $main = 0) {
if (user_access("post comments")) {
if ($node->comment == 2) {
$links[] = lm(t("add new comment"), array("mod" => "comment", "op" => "reply", "id" => $node->nid ."#comment"), t("Share your thoughts and opinions related to this posting."));
$links[] = lm(t("add new comment"), array("mod" => "comment", "op" => "reply", "id" => $node->nid), "comment", array("title" => t("Share your thoughts and opinions related to this posting.")));
}
else {
$links[] = t("This discussion is closed: you can't post new comments.");
@ -662,7 +662,7 @@ function comment_node_link($node) {
$output .= " <tr><th>title</th><th>author</th><th colspan=\"3\">operations</th></tr>";
while ($comment = db_fetch_object($result)) {
$output .= "<tr><td>". l($comment->subject, array("id" => $node->nid, "cid" => $comment->cid ."#". $comment->cid)) ."</td><td>". format_name($comment) ."</td><td>". l(t("view comment"), array("id" => $node->nid, "cid" => $comment->cid ."#". $comment->cid)) ."</td><td>". la(t("edit comment"), array("mod" => "comment", "op" => "edit", "id" => $comment->cid)) ."</td><td>". la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)) ."</td></tr>";
$output .= "<tr><td>". l($comment->subject, array("id" => $node->nid, "cid" => $comment->cid), "node", $comment->cid) ."</td><td>". format_name($comment) ."</td><td>". l(t("view comment"), array("id" => $node->nid, "cid" => $comment->cid ."#". $comment->cid)) ."</td><td>". la(t("edit comment"), array("mod" => "comment", "op" => "edit", "id" => $comment->cid)) ."</td><td>". la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)) ."</td></tr>";
}
$output .= "</table>";
@ -729,7 +729,7 @@ function comment_admin_overview() {
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= " <tr><th>subject</th><th>author</th><th>date</th><th colspan=\"2\">operations</th></tr>\n";
while ($comment = db_fetch_object($result)) {
$output .= " <tr><td>". l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid, "pid" => $comment->pid ."#". $comment->cid)) ."</td><td>". format_name($comment) ."</td><td>". format_date($comment->timestamp, "small") ."</td><td>". la(t("edit comment"), array("mod" => comment, "op" => edit, "id" => $comment->cid)) ."</td><td>". la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)) ."</td></tr>\n";
$output .= " <tr><td>". l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid) ."</td><td>". format_name($comment) ."</td><td>". format_date($comment->timestamp, "small") ."</td><td>". la(t("edit comment"), array("mod" => comment, "op" => edit, "id" => $comment->cid)) ."</td><td>". la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)) ."</td></tr>\n";
}
$output .= "</table>\n";

View File

@ -35,11 +35,11 @@ function forum_save($op, $node) {
function forum_link($type) {
if ($type == "page" && user_access("access content")) {
$links[] = lm(t("forum"), array("mod" => "forum"), t("Read and participate in the discussion forums."));
$links[] = lm(t("forum"), array("mod" => "forum"), "", array("title" => t("Read and participate in the discussion forums.")));
}
if ($type == "menu.create" && user_access("administer nodes")) {
$links[] = lm(t("create forum"), array("mod" => "node", "op" => "add", "type" => "forum"), t("Add a new discussion forum."));
$links[] = lm(t("create forum"), array("mod" => "node", "op" => "add", "type" => "forum"), "", array("title" => t("Add a new discussion forum.")));
}
return $links ? $links : array();

View File

@ -35,11 +35,11 @@ function forum_save($op, $node) {
function forum_link($type) {
if ($type == "page" && user_access("access content")) {
$links[] = lm(t("forum"), array("mod" => "forum"), t("Read and participate in the discussion forums."));
$links[] = lm(t("forum"), array("mod" => "forum"), "", array("title" => t("Read and participate in the discussion forums.")));
}
if ($type == "menu.create" && user_access("administer nodes")) {
$links[] = lm(t("create forum"), array("mod" => "node", "op" => "add", "type" => "forum"), t("Add a new discussion forum."));
$links[] = lm(t("create forum"), array("mod" => "node", "op" => "add", "type" => "forum"), "", array("title" => t("Add a new discussion forum.")));
}
return $links ? $links : array();

View File

@ -29,7 +29,7 @@ function import_link($type) {
}
if ($type == "page" && user_access("access news feeds")) {
$links[] = lm(t("news feeds"), array("mod" => "import"), t("Read the latest news from syndicated websites."));
$links[] = lm(t("news feeds"), array("mod" => "import"), "", array("title" => t("Read the latest news from syndicated websites.")));
}
return $links ? $links : array();
@ -53,7 +53,7 @@ function import_format_item($item, $feed = 0) {
global $theme, $user;
if ($user->uid && user_access("post blogs")) {
$output .= lm("<img src=\"". $theme->image("blog.gif") ."\" border=\"0\" width=\"12\" height=\"16\" alt=\"". t("Blog this item") ."\" />", array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), t("Comment on this news item in your personal blog."));
$output .= lm("<img src=\"". $theme->image("blog.gif") ."\" border=\"0\" width=\"12\" height=\"16\" alt=\"". t("Blog this item") ."\" />", array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog.")));
}
// external link
@ -98,7 +98,7 @@ function import_get_bundles($attributes = 0) {
$i = 0;
while ($bundle = db_fetch_object($result)) {
$block[$i]["subject"] = $bundle->title;
$block[$i]["content"] = import_bundle_block($bundle->attributes) ."<p><div align=\"right\">". lm(t("more"), array("mod" => "import", "op" => "bundle", "id" => $bundle->bid), t("View this bundle's recent news.")) ."</div></p>";
$block[$i]["content"] = import_bundle_block($bundle->attributes) ."<p><div align=\"right\">". lm(t("more"), array("mod" => "import", "op" => "bundle", "id" => $bundle->bid), "", array("title" => t("View this bundle's recent news."))) ."</div></p>";
$block[$i]["info"] = "$bundle->title bundle";
$i++;
@ -113,7 +113,7 @@ function import_get_feeds($attributes = 0) {
$i = 0;
while ($feed = db_fetch_object($result)) {
$block[$i]["subject"] = $feed->title;
$block[$i]["content"] = import_feed_block($feed) ."<p><div align=\"right\">". lm(t("more"), array("mod" => "import", "op" => "feed", "id" => $feed->fid), t("View this feed's recent news.")) ."</div></p>";
$block[$i]["content"] = import_feed_block($feed) ."<p><div align=\"right\">". lm(t("more"), array("mod" => "import", "op" => "feed", "id" => $feed->fid), "", array("title" => t("View this feed's recent news."))) ."</div></p>";
$block[$i]["info"] = "$feed->title feed";
$i++;
@ -522,10 +522,10 @@ function import_admin() {
function import_page_info() {
global $theme;
$links[] = lm(t("latest news"), array("mod" => "import"), t("Read the latest news from syndicated websites."));
$links[] = lm(t("news by source"), array("mod" => "import", "op" => "feeds"), t("View the latest headlines sorted by source."));
$links[] = lm(t("news by topic"), array("mod" => "import", "op" => "bundles"), t("View the latest headlines sorted by topic."));
$links[] = lm(t("news sources"), array("mod" => "import", "op" => "sources"), t("View a list of all the websites we syndicate from."));
$links[] = lm(t("latest news"), array("mod" => "import"), "", array("title" => t("Read the latest news from syndicated websites.")));
$links[] = lm(t("news by source"), array("mod" => "import", "op" => "feeds"), "", array("title" => t("View the latest headlines sorted by source.")));
$links[] = lm(t("news by topic"), array("mod" => "import", "op" => "bundles"), "", array("title" => t("View the latest headlines sorted by topic.")));
$links[] = lm(t("news sources"), array("mod" => "import", "op" => "sources"), "", array("title" => t("View a list of all the websites we syndicate from.")));
return "<div align=\"center\">". $theme->links($links) ."</div>";
}
@ -537,11 +537,11 @@ function import_page_last() {
$output .= "<table border=\"0\" cellpadding=\"4\" cellspacing=\"2\">";
while ($item = db_fetch_object($result)) {
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), t("Comment on this news item in your personal blog."));
$links[] = lm(t("feed"), array("mod" => "import", "op" => "feed", "id" => $item->fid), t("Read more syndicated news from this feed."));
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog.")));
$links[] = lm(t("feed"), array("mod" => "import", "op" => "feed", "id" => $item->fid), "", array("title" => t("Read more syndicated news from this feed.")));
if ($item->link) {
$output .= "<tr><td>". format_url($item->link, $item->title) ." &middot; ". lm($item->ftitle, array("mod" => "import", "op" => "feed", "id" => $item->fid), t("View more information about this feed.")) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
$output .= "<tr><td><a href=\"$item->link\">$item->title</a> &middot; ". lm($item->ftitle, array("mod" => "import", "op" => "feed", "id" => $item->fid), "", array("title" => t("View more information about this feed."))) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
}
if ($item->description) {
@ -563,7 +563,7 @@ function import_page_feed($fid) {
$feed = db_fetch_object(db_query("SELECT * FROM feed WHERE fid = '%s'", $fid));
$header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\">". format_url($feed->link) ."</div></p>";
$header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\"><a href=\"$feed->link\">$feed->link</a></div></p>";
$header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">". check_output($feed->description, 1) ."</div></p>";
$header .= "<p><b>". t("Last update") .":</b><div style=\"margin-left: 20px;\">". format_interval(time() - $feed->timestamp) ." ". t("ago") ."<a href=\"$feed->url\"><img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" /></a><br /><br /></div></p>\n";
@ -571,11 +571,11 @@ function import_page_feed($fid) {
$output .= "<table border=\"0\" cellpadding=\"4\" cellspacing=\"2\">";
while ($item = db_fetch_object($result)) {
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), t("Comment on this news item in your personal blog."));
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog.")));
$links[] = "<a href=\"$item->link\">". t("visit") ."</a>";
if ($item->link) {
$output .= "<tr><td>". format_url($item->link, $item->title) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
$output .= "<tr><td><a href=\"$item->link\">$item->title</a></td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
}
if ($item->description) {
$output .= "<tr><td colspan=\"2\"><div style=\"margin-left: 20px;\">". check_output($item->description, 1) ."</div><br /></td></tr>";
@ -596,7 +596,7 @@ function import_page_bundle($bid) {
$bundle = db_fetch_object(db_query("SELECT * FROM bundle WHERE bid = '%s'", $bid));
$header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\">". format_url(drupal_url(array("mod" => "import", "op" => "bundle", "id" => $bundle->bid), "module")) ."</div></p>";
$header .= "<p><b>". t("Website") .":</b><div style=\"margin-left: 20px;\">". lm("", array("mod" => "import", "op" => "bundle", "id" => $bundle->bid)) ."</div></p>";
$header .= "<p><b>". t("Description") .":</b><div style=\"margin-left: 20px;\">". t("A composite news feed about") ." ". check_output($bundle->attributes) .".</div></p>";
$keys = explode(",", $bundle->attributes);
@ -605,12 +605,12 @@ function import_page_bundle($bid) {
$output .= "<table border=\"0\" cellpadding=\"4\" cellspacing=\"2\">";
while ($item = db_fetch_object($result)) {
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), t("Comment on this news item in your personal blog."));
$links[] = lm(t("feed"), array("mod" => "import", "op" => "feed", "id" => $item->fid), t("Read more syndicated news from this feed."));
$links[] = lm(t("blog it"), array("mod" => "node", "op" => "add", "type" => "blog", "iid" => $item->iid), "", array("title" => t("Comment on this news item in your personal blog.")));
$links[] = lm(t("feed"), array("mod" => "import", "op" => "feed", "id" => $item->fid), "", array("title" => t("Read more syndicated news from this feed.")));
$links[] = "<a href=\"$item->link\">". t("visit") ."</a>";
if ($item->link) {
$output .= "<tr><td>". format_url($item->link, $item->title) ." &middot; ". lm($item->ftitle, array("mod" => "import", "op" => "feed", "id" => $item->fid), t("View more information about this feed.")) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
$output .= "<tr><td><a href=\"$item->link\">$item->title</a> &middot; ". lm($item->ftitle, array("mod" => "import", "op" => "feed", "id" => $item->fid), "", array("title" => t("View more information about this feed."))) ."</td><td align=\"right\" nowrap=\"nowrap\" valign=\"top\">". $theme->links($links) ."</td></tr>\n";
}
if ($item->description) {
@ -634,11 +634,11 @@ function import_page_sources() {
$result = db_query("SELECT * FROM feed ORDER BY title");
while ($feed = db_fetch_object($result)) {
$output .= format_url(drupal_url(array("mod" => "import", "op" => "feed", "id" => $feed->fid), "module"), $feed->title);
$output .= lm("", array("mod" => "import", "op" => "feed", "id" => $feed->fid)));
$output .= "<div style=\"margin-left: 20px;\">". check_output($feed->description, 1) ."</div><br />";
}
$output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "import", "op" => "fd"), t("View the list of syndicated websites in XML format.")) ."<br />\n";
$output .= lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" align=\"right\" border=\"0\" />", array("mod" => "import", "op" => "fd"), "", array("title" => t("View the list of syndicated websites in XML format."))) ."<br />\n";
$theme->header();
$theme->box(t("News feeds"), import_page_info());

View File

@ -166,7 +166,7 @@ function jabber_user($type, $edit, $user) {
return $output;
case "edit_form":
$result = user_get_authname($user, $module);
$output .= form_textfield("$name ID", "authname_" . $module, $result, 30, 55, t("You may login to %s using a valid %id.", array("%s" => variable_get("site_name", "this web site"), "%id" => lm("$name ID", array("mod" => "user", "op" => "help#".$module)))));
$output .= form_textfield("$name ID", "authname_" . $module, $result, 30, 55, t("You may login to %s using a valid %id.", array("%s" => variable_get("site_name", "this web site"), "%id" => lm("$name ID", array("mod" => "user", "op" => "help"), $module))));
return $output;
case "edit_validate":
return user_validate_authmap($user, $edit["authname_$module"], $module);

View File

@ -378,7 +378,7 @@ function node_link($type, $node = 0, $main = 0) {
}
if ($type == "page" && user_access("post content")) {
$links[] = lm(t("submit"), array("mod" => "node", "op" => "add"), t("Submit or suggest new content."));
$links[] = lm(t("submit"), array("mod" => "node", "op" => "add"), "", array("title" => t("Submit or suggest new content.")));
}
if ($type == "node") {
@ -387,11 +387,11 @@ function node_link($type, $node = 0, $main = 0) {
}
if ($main == 1 && $node->teaser != $node->body) {
$links[] = l(t("read more"), array("id" => $node->nid), t("Read the rest of this posting."));
$links[] = l(t("read more"), array("id" => $node->nid), "node", "", array("title" => t("Read the rest of this posting.")));
}
if (user_access("administer nodes")) {
$links[] = la(t("administer"), array("mod" => "node", "op" => "edit", "id" => $node->nid), t("Administer this node."));
$links[] = la(t("administer"), array("mod" => "node", "op" => "edit", "id" => $node->nid), "", array("title" => t("Administer this node.")));
}
}
@ -664,7 +664,7 @@ function node_block() {
global $theme;
$block[0][subject] = t("Syndicate");
$block[0][content] = "<div align=\"center\">". lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" border=\"0\" alt=\"XML\" />", array("mod" => "node", "op" => "feed"), t("Read the XML version of this page.")) ."</div>\n";
$block[0][content] = "<div align=\"center\">". lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" border=\"0\" alt=\"XML\" />", array("mod" => "node", "op" => "feed"), "", array("title" => t("Read the XML version of this page."))) ."</div>\n";
$block[0][info] = "Syndicate";
return $block;
@ -900,7 +900,7 @@ function node_add($type) {
foreach (module_list() as $name) {
if (module_hook($name, "node") && node_access("create", array("type" => $name))) {
$output .= "<li>";
$output .= " ". lm(module_invoke($name, "node", "name"), array("mod" => "node", "op" => "add", "type" => $name), t("Add a new %s.", array("%s" => module_invoke($name, "node", "name"))));
$output .= " ". lm(module_invoke($name, "node", "name"), array("mod" => "node", "op" => "add", "type" => $name), "", array("title" => t("Add a new %s.", array("%s" => module_invoke($name, "node", "name")))));
$output .= " <div style=\"margin-left: 20px;\">". module_invoke($name, "node", "description") ."</div>";
$output .= "</li>";
}

View File

@ -378,7 +378,7 @@ function node_link($type, $node = 0, $main = 0) {
}
if ($type == "page" && user_access("post content")) {
$links[] = lm(t("submit"), array("mod" => "node", "op" => "add"), t("Submit or suggest new content."));
$links[] = lm(t("submit"), array("mod" => "node", "op" => "add"), "", array("title" => t("Submit or suggest new content.")));
}
if ($type == "node") {
@ -387,11 +387,11 @@ function node_link($type, $node = 0, $main = 0) {
}
if ($main == 1 && $node->teaser != $node->body) {
$links[] = l(t("read more"), array("id" => $node->nid), t("Read the rest of this posting."));
$links[] = l(t("read more"), array("id" => $node->nid), "node", "", array("title" => t("Read the rest of this posting.")));
}
if (user_access("administer nodes")) {
$links[] = la(t("administer"), array("mod" => "node", "op" => "edit", "id" => $node->nid), t("Administer this node."));
$links[] = la(t("administer"), array("mod" => "node", "op" => "edit", "id" => $node->nid), "", array("title" => t("Administer this node.")));
}
}
@ -664,7 +664,7 @@ function node_block() {
global $theme;
$block[0][subject] = t("Syndicate");
$block[0][content] = "<div align=\"center\">". lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" border=\"0\" alt=\"XML\" />", array("mod" => "node", "op" => "feed"), t("Read the XML version of this page.")) ."</div>\n";
$block[0][content] = "<div align=\"center\">". lm("<img src=\"". $theme->image("xml.gif") ."\" width=\"36\" height=\"14\" border=\"0\" alt=\"XML\" />", array("mod" => "node", "op" => "feed"), "", array("title" => t("Read the XML version of this page."))) ."</div>\n";
$block[0][info] = "Syndicate";
return $block;
@ -900,7 +900,7 @@ function node_add($type) {
foreach (module_list() as $name) {
if (module_hook($name, "node") && node_access("create", array("type" => $name))) {
$output .= "<li>";
$output .= " ". lm(module_invoke($name, "node", "name"), array("mod" => "node", "op" => "add", "type" => $name), t("Add a new %s.", array("%s" => module_invoke($name, "node", "name"))));
$output .= " ". lm(module_invoke($name, "node", "name"), array("mod" => "node", "op" => "add", "type" => $name), "", array("title" => t("Add a new %s.", array("%s" => module_invoke($name, "node", "name")))));
$output .= " <div style=\"margin-left: 20px;\">". module_invoke($name, "node", "description") ."</div>";
$output .= "</li>";
}

View File

@ -2,7 +2,7 @@
// $Id$
function page_help() {
$output .= "<p>The page module is used to create a <i>site page</i>. Unlike a story, a site page is a persistent web page on your site which usually shortcuts the typical lifecycle of user generated content (i.e. submit -&gt; moderate -&gt; post -&gt; comment). A site page is usually linked from the main navigation bar, using whatever text the author wishes. To create a site page without this navigation link, simply skip the form field which requests link text. Administrators are the exclusive authors of site pages (i.e. requires the <i>adinister nodes</i> in ". la("permission", array("mod" => "user", "op" => "permission")) .").</p>";
$output .= "<p>The page module is used to create a <i>site page</i>. Unlike a story, a site page is a persistent web page on your site which usually shortcuts the typical lifecycle of user generated content (i.e. submit -&gt; moderate -&gt; post -&gt; comment). A site page is usually linked from the main navigation bar, using whatever text the author wishes. To create a site page without this navigation link, simply skip the form field which requests link text. Administrators are the exclusive authors of site pages (i.e. requires the <i>administer nodes</i> in ". la("permission", array("mod" => "user", "op" => "permission")) .").</p>";
$output .= "<p>Site pages, unlike many other forms of Drupal content, may be made of PHP code in addition to HTML and text. All Drupal objects and functions are available to the Site Page author.</p>";
return $output;
}
@ -66,7 +66,7 @@ function page_link($type) {
}
if ($type == "menu.create" && user_access("administer nodes")) {
$links[] = lm(t("create site page"), array("mod" => "node", "op" => "add", "type" => "page"), t("Add a new site page."));
$links[] = lm(t("create site page"), array("mod" => "node", "op" => "add", "type" => "page"), "", array("title" => t("Add a new site page.")));
}
return $links ? $links : array();

View File

@ -2,7 +2,7 @@
// $Id$
function page_help() {
$output .= "<p>The page module is used to create a <i>site page</i>. Unlike a story, a site page is a persistent web page on your site which usually shortcuts the typical lifecycle of user generated content (i.e. submit -&gt; moderate -&gt; post -&gt; comment). A site page is usually linked from the main navigation bar, using whatever text the author wishes. To create a site page without this navigation link, simply skip the form field which requests link text. Administrators are the exclusive authors of site pages (i.e. requires the <i>adinister nodes</i> in ". la("permission", array("mod" => "user", "op" => "permission")) .").</p>";
$output .= "<p>The page module is used to create a <i>site page</i>. Unlike a story, a site page is a persistent web page on your site which usually shortcuts the typical lifecycle of user generated content (i.e. submit -&gt; moderate -&gt; post -&gt; comment). A site page is usually linked from the main navigation bar, using whatever text the author wishes. To create a site page without this navigation link, simply skip the form field which requests link text. Administrators are the exclusive authors of site pages (i.e. requires the <i>administer nodes</i> in ". la("permission", array("mod" => "user", "op" => "permission")) .").</p>";
$output .= "<p>Site pages, unlike many other forms of Drupal content, may be made of PHP code in addition to HTML and text. All Drupal objects and functions are available to the Site Page author.</p>";
return $output;
}
@ -66,7 +66,7 @@ function page_link($type) {
}
if ($type == "menu.create" && user_access("administer nodes")) {
$links[] = lm(t("create site page"), array("mod" => "node", "op" => "add", "type" => "page"), t("Add a new site page."));
$links[] = lm(t("create site page"), array("mod" => "node", "op" => "add", "type" => "page"), "", array("title" => t("Add a new site page.")));
}
return $links ? $links : array();

View File

@ -116,7 +116,7 @@ function poll_insert($node) {
function poll_link($type) {
if ($type == "menu.create" && user_access("post content")) {
$links[] = lm(t("create poll"), array("mod" => "node", "op" => "add", "type" => "poll"), t("Add a new poll."));
$links[] = lm(t("create poll"), array("mod" => "node", "op" => "add", "type" => "poll"), "", array("title", t("Add a new poll.")));
}
return $links ? $links : array();
@ -214,7 +214,7 @@ function poll_view(&$node, $main = 0, $block = 0) {
if ($allowvotes) {
// Display the vote form
$url = request_uri() . (strstr(request_uri(), "?") ? "&" : "?") ."pollid=". $pollidcount;
$url = request_uri() . (strstr(request_uri(), "?") ? "&amp;" : "?") ."pollid=". $pollidcount;
$output .= "<form action=\"$url\" method=\"post\">";
$output .= "<table border=\"0\" align=\"center\"><tr><td>";
@ -225,7 +225,8 @@ function poll_view(&$node, $main = 0, $block = 0) {
}
if ($block) {
$output .= "</td></tr><tr><td><div align=\"center\">". form_submit(t("Vote")) ."</div></td></tr></table>";
} else {
}
else {
$output .= "</td><td valign=\"middle\"><div align=\"right\">&nbsp;&nbsp;&nbsp;". form_submit(t("Vote")) ."</div></td></tr></table>";
}
$output .= "</form>";
@ -241,10 +242,10 @@ function poll_view(&$node, $main = 0, $block = 0) {
$votesmax = max($votesmax, 1);
// Define CSS classes for the bars
$output .= "<style type=\"text/css\">";
$output .= "td.pollfg { background-color: ". $theme->foreground ."; font-size: 5pt; }";
$output .= "td.pollbg { background-color: ". $theme->background ."; font-size: 5pt; }";
$output .= "</style>";
$output .= "<style type=\"text/css\">\n";
$output .= "td.pollfg { background-color: ". $theme->foreground ."; font-size: 5pt; }\n";
$output .= "td.pollbg { background-color: ". $theme->background ."; font-size: 5pt; }\n";
$output .= "</style>\n";
foreach ($node->choice as $key => $value) {
if ($value != "") {

View File

@ -116,7 +116,7 @@ function poll_insert($node) {
function poll_link($type) {
if ($type == "menu.create" && user_access("post content")) {
$links[] = lm(t("create poll"), array("mod" => "node", "op" => "add", "type" => "poll"), t("Add a new poll."));
$links[] = lm(t("create poll"), array("mod" => "node", "op" => "add", "type" => "poll"), "", array("title", t("Add a new poll.")));
}
return $links ? $links : array();
@ -214,7 +214,7 @@ function poll_view(&$node, $main = 0, $block = 0) {
if ($allowvotes) {
// Display the vote form
$url = request_uri() . (strstr(request_uri(), "?") ? "&" : "?") ."pollid=". $pollidcount;
$url = request_uri() . (strstr(request_uri(), "?") ? "&amp;" : "?") ."pollid=". $pollidcount;
$output .= "<form action=\"$url\" method=\"post\">";
$output .= "<table border=\"0\" align=\"center\"><tr><td>";
@ -225,7 +225,8 @@ function poll_view(&$node, $main = 0, $block = 0) {
}
if ($block) {
$output .= "</td></tr><tr><td><div align=\"center\">". form_submit(t("Vote")) ."</div></td></tr></table>";
} else {
}
else {
$output .= "</td><td valign=\"middle\"><div align=\"right\">&nbsp;&nbsp;&nbsp;". form_submit(t("Vote")) ."</div></td></tr></table>";
}
$output .= "</form>";
@ -241,10 +242,10 @@ function poll_view(&$node, $main = 0, $block = 0) {
$votesmax = max($votesmax, 1);
// Define CSS classes for the bars
$output .= "<style type=\"text/css\">";
$output .= "td.pollfg { background-color: ". $theme->foreground ."; font-size: 5pt; }";
$output .= "td.pollbg { background-color: ". $theme->background ."; font-size: 5pt; }";
$output .= "</style>";
$output .= "<style type=\"text/css\">\n";
$output .= "td.pollfg { background-color: ". $theme->foreground ."; font-size: 5pt; }\n";
$output .= "td.pollbg { background-color: ". $theme->background ."; font-size: 5pt; }\n";
$output .= "</style>\n";
foreach ($node->choice as $key => $value) {
if ($value != "") {

View File

@ -21,7 +21,7 @@ function queue_perm() {
function queue_link($type) {
if ($type == "menu.view" && user_access("access submission queue")) {
$links[] = lm(t("view submissions"), array("mod" => "queue"), t("Moderate the content in the submission queue.")) ." (<span style=\"color: red;\">". queue_count() ."</span>)";
$links[] = lm(t("view submissions"), array("mod" => "queue"), "", array("title" => t("Moderate the content in the submission queue."))) ." (<span style=\"color: red;\">". queue_count() ."</span>)";
}
return $links ? $links : array();

View File

@ -14,7 +14,7 @@ function rating_perm() {
function rating_link($type) {
if ($type == "page" && user_access("access user ratings")) {
$links[] = lm(t("user ratings"), array("mod" => "rating"), t("Display an overview of the user ratings."));
$links[] = lm(t("user ratings"), array("mod" => "rating"), "", array("title" => t("Display an overview of the user ratings.")));
}
return $links ? $links : array();

View File

@ -29,7 +29,7 @@ function search_perm() {
*/
function search_link($type) {
if ($type == "page" && user_access("search content")) {
$links[] = lm(t("search"), array("mod" => "search"), t("Search for older content."));
$links[] = lm(t("search"), array("mod" => "search"), "", array("title" => t("Search for older content.")));
}
if ($type == "admin" && user_access("administer search")) {

View File

@ -29,7 +29,7 @@ function search_perm() {
*/
function search_link($type) {
if ($type == "page" && user_access("search content")) {
$links[] = lm(t("search"), array("mod" => "search"), t("Search for older content."));
$links[] = lm(t("search"), array("mod" => "search"), "", array("title" => t("Search for older content.")));
}
if ($type == "admin" && user_access("administer search")) {

View File

@ -57,7 +57,7 @@ function story_save($op, $node) {
function story_link($type) {
if ($type == "menu.create" && user_access("post content")) {
$links[] = lm(t("create story"), array("mod" => "node", "op" => "add", "type" => "story"), t("Add a new story."));
$links[] = lm(t("create story"), array("mod" => "node", "op" => "add", "type" => "story"), "", array("title" => t("Add a new story.")));
}
return $links ? $links : array();

View File

@ -57,7 +57,7 @@ function story_save($op, $node) {
function story_link($type) {
if ($type == "menu.create" && user_access("post content")) {
$links[] = lm(t("create story"), array("mod" => "node", "op" => "add", "type" => "story"), t("Add a new story."));
$links[] = lm(t("create story"), array("mod" => "node", "op" => "add", "type" => "story"), "", array("title" => t("Add a new story.")));
}
return $links ? $links : array();

View File

@ -60,8 +60,8 @@ function taxonomy_form_vocabulary($edit = array()) {
$form .= form_textfield("Vocabulary name", "name", $edit["name"], 50, 64, "Required. The name for this vocabulary. Example: 'Topic'.");
$form .= form_textarea("Description", "description", $edit["description"], 60, 5, "Optional. Description of the vocabulary, can be used by modules.");
$form .= form_select("Types", "types", explode(",", $edit["types"]), $nodetypes, "Required. A list of node types you want to associate this vocabulary with.", "", 1);
$form .= form_checkbox("Related terms", "relations", 1, $edit["relations"], "Optional. Allows ". la("related terms", array("mod" => "taxonomy", "op" => "help#relatedterms")) ." in this vocabulary.");
$form .= form_select("Hierarchy", "hierarchy", $edit["hierarchy"], array("Disabled", "Single", "Multiple"), "Optional. Allows ". la("a tree-like hierarchy", array("mod" => "taxonomy", "op" => "help#hierarchy")) ." between terms of this vocabulary.", "", 0);
$form .= form_checkbox("Related terms", "relations", 1, $edit["relations"], "Optional. Allows ". la("related terms", array("mod" => "taxonomy", "op" => "help"), "relatedterms") ." in this vocabulary.");
$form .= form_select("Hierarchy", "hierarchy", $edit["hierarchy"], array("Disabled", "Single", "Multiple"), "Optional. Allows ". la("a tree-like hierarchy", array("mod" => "taxonomy", "op" => "help"), "hierarchy") ." between terms of this vocabulary.", "", 0);
$form .= form_checkbox("Multiple select", "multiple", 1, $edit["multiple"], "Optional. Allows nodes to have more than one term in this vocabulary.");
$form .= form_checkbox("Required", "required", 1, $edit["required"], "If enabled every node <b>must</b> have at least one term in this vocabulary");
$form .= form_textfield("Weight", "weight", $edit["weight"], 3, 3, "Optional. In listings, the heavier vocabularies will sink and the lighter vocabularies will be positioned nearer the top.");
@ -118,14 +118,14 @@ function taxonomy_form_term($edit = array()) {
$exclude = array_keys($children);
$exclude[] = $edit["tid"];
if ($vocabulary->hierarchy == 1) {
$form .= _taxonomy_term_select("Parent", "parent", $parent, $vocabulary_id, "Required. ". la("Parent term", array("mod" => "taxonomy", "op" => "help#parent")) .".", 0, "<root>", $exclude);
$form .= _taxonomy_term_select("Parent", "parent", $parent, $vocabulary_id, "Required. ". la("Parent term", array("mod" => "taxonomy", "op" => "help"), "parent") .".", 0, "<root>", $exclude);
}
elseif ($vocabulary->hierarchy == 2) {
$form .= _taxonomy_term_select("Parents", "parent", $parent, $vocabulary_id, "Required. ". la("Parent terms", array("mod" => "taxonomy", "op" => "help#parent")) .".", 1, "<root>", $exclude);
$form .= _taxonomy_term_select("Parents", "parent", $parent, $vocabulary_id, "Required. ". la("Parent terms", array("mod" => "taxonomy", "op" => "help"), "parent") .".", 1, "<root>", $exclude);
}
}
$form .= form_textarea("Synonyms", "synonyms", implode("\n", taxonomy_get_synonyms($edit["tid"])), 30, 5, "Optional. ". la("Synonyms", array("mod" => "taxonomy", "op" => "help#synonyms")) ." of this term, one synonym per line.");
$form .= form_textarea("Synonyms", "synonyms", implode("\n", taxonomy_get_synonyms($edit["tid"])), 30, 5, "Optional. ". la("Synonyms", array("mod" => "taxonomy", "op" => "help"), "synonyms") ." of this term, one synonym per line.");
$form .= form_textfield("Weight", "weight", $edit["weight"], 3, 3, "Optional. In listings, the heavier terms will sink and the lighter terms will be positioned nearer the top.");
$form .= form_hidden("vid", $vocabulary->vid);
$form .= form_submit("Submit");

View File

@ -60,8 +60,8 @@ function taxonomy_form_vocabulary($edit = array()) {
$form .= form_textfield("Vocabulary name", "name", $edit["name"], 50, 64, "Required. The name for this vocabulary. Example: 'Topic'.");
$form .= form_textarea("Description", "description", $edit["description"], 60, 5, "Optional. Description of the vocabulary, can be used by modules.");
$form .= form_select("Types", "types", explode(",", $edit["types"]), $nodetypes, "Required. A list of node types you want to associate this vocabulary with.", "", 1);
$form .= form_checkbox("Related terms", "relations", 1, $edit["relations"], "Optional. Allows ". la("related terms", array("mod" => "taxonomy", "op" => "help#relatedterms")) ." in this vocabulary.");
$form .= form_select("Hierarchy", "hierarchy", $edit["hierarchy"], array("Disabled", "Single", "Multiple"), "Optional. Allows ". la("a tree-like hierarchy", array("mod" => "taxonomy", "op" => "help#hierarchy")) ." between terms of this vocabulary.", "", 0);
$form .= form_checkbox("Related terms", "relations", 1, $edit["relations"], "Optional. Allows ". la("related terms", array("mod" => "taxonomy", "op" => "help"), "relatedterms") ." in this vocabulary.");
$form .= form_select("Hierarchy", "hierarchy", $edit["hierarchy"], array("Disabled", "Single", "Multiple"), "Optional. Allows ". la("a tree-like hierarchy", array("mod" => "taxonomy", "op" => "help"), "hierarchy") ." between terms of this vocabulary.", "", 0);
$form .= form_checkbox("Multiple select", "multiple", 1, $edit["multiple"], "Optional. Allows nodes to have more than one term in this vocabulary.");
$form .= form_checkbox("Required", "required", 1, $edit["required"], "If enabled every node <b>must</b> have at least one term in this vocabulary");
$form .= form_textfield("Weight", "weight", $edit["weight"], 3, 3, "Optional. In listings, the heavier vocabularies will sink and the lighter vocabularies will be positioned nearer the top.");
@ -118,14 +118,14 @@ function taxonomy_form_term($edit = array()) {
$exclude = array_keys($children);
$exclude[] = $edit["tid"];
if ($vocabulary->hierarchy == 1) {
$form .= _taxonomy_term_select("Parent", "parent", $parent, $vocabulary_id, "Required. ". la("Parent term", array("mod" => "taxonomy", "op" => "help#parent")) .".", 0, "<root>", $exclude);
$form .= _taxonomy_term_select("Parent", "parent", $parent, $vocabulary_id, "Required. ". la("Parent term", array("mod" => "taxonomy", "op" => "help"), "parent") .".", 0, "<root>", $exclude);
}
elseif ($vocabulary->hierarchy == 2) {
$form .= _taxonomy_term_select("Parents", "parent", $parent, $vocabulary_id, "Required. ". la("Parent terms", array("mod" => "taxonomy", "op" => "help#parent")) .".", 1, "<root>", $exclude);
$form .= _taxonomy_term_select("Parents", "parent", $parent, $vocabulary_id, "Required. ". la("Parent terms", array("mod" => "taxonomy", "op" => "help"), "parent") .".", 1, "<root>", $exclude);
}
}
$form .= form_textarea("Synonyms", "synonyms", implode("\n", taxonomy_get_synonyms($edit["tid"])), 30, 5, "Optional. ". la("Synonyms", array("mod" => "taxonomy", "op" => "help#synonyms")) ." of this term, one synonym per line.");
$form .= form_textarea("Synonyms", "synonyms", implode("\n", taxonomy_get_synonyms($edit["tid"])), 30, 5, "Optional. ". la("Synonyms", array("mod" => "taxonomy", "op" => "help"), "synonyms") ." of this term, one synonym per line.");
$form .= form_textfield("Weight", "weight", $edit["weight"], 3, 3, "Optional. In listings, the heavier terms will sink and the lighter terms will be positioned nearer the top.");
$form .= form_hidden("vid", $vocabulary->vid);
$form .= form_submit("Submit");

View File

@ -9,7 +9,7 @@ function tracker_help() {
function tracker_link($type) {
if ($type == "menu.view") {
$links[] = lm(t("view new comments"), array("mod" => "tracker"), t("Display an overview of the recent comments."));
$links[] = lm(t("view new comments"), array("mod" => "tracker"), "", array("title" => t("Display an overview of the recent comments.")));
}
return $links ? $links : array();
@ -39,7 +39,7 @@ function tracker_comments($id = 0) {
$output .= "<ul>";
while ($comment = db_fetch_object($cresult)) {
$output .= " <li>". l(check_output($comment->subject), array("id" => $node->nid, "cid" => $comment->cid, "pid" => $comment->pid ."#". $comment->cid)) ." by ". lm(check_output($comment->name), array("mod" => "user", "op" => "view", "id" => $comment->uid)) ." (". t("replies") .": ". comment_num_replies($comment->cid) .") ". (comment_is_new($comment) ? "<span style=\"color: red;\">*</span>" : "") ."</li>\n";
$output .= " <li>". l(check_output($comment->subject), array("id" => $node->nid, "cid" => $comment->cid, "pid" => $comment->pid), $comment->cid) ." by ". lm(check_output($comment->name), array("mod" => "user", "op" => "view", "id" => $comment->uid)) ." (". t("replies") .": ". comment_num_replies($comment->cid) .") ". (comment_is_new($comment) ? "<span style=\"color: red;\">*</span>" : "") ."</li>\n";
}
$output .= " </ul>\n";
}
@ -50,8 +50,8 @@ function tracker_comments($id = 0) {
function tracker_menu() {
global $user;
$links[] = lm(t("your recent comments"), array("mod" => "tracker", "id" => $user->uid), t("Display an overview of your recent comments."));
$links[] = lm(t("all recent comments"), array("mod" => "tracker"), t("Display an overview of all the recent comments."));
$links[] = lm(t("your recent comments"), array("mod" => "tracker", "id" => $user->uid), "", array("title" => t("Display an overview of your recent comments.")));
$links[] = lm(t("all recent comments"), array("mod" => "tracker"), "", array("title" => t("Display an overview of all the recent comments.")));
return "<div align=\"center\">". implode(" &middot; ", $links) ."</div>";
}

View File

@ -9,7 +9,7 @@ function tracker_help() {
function tracker_link($type) {
if ($type == "menu.view") {
$links[] = lm(t("view new comments"), array("mod" => "tracker"), t("Display an overview of the recent comments."));
$links[] = lm(t("view new comments"), array("mod" => "tracker"), "", array("title" => t("Display an overview of the recent comments.")));
}
return $links ? $links : array();
@ -39,7 +39,7 @@ function tracker_comments($id = 0) {
$output .= "<ul>";
while ($comment = db_fetch_object($cresult)) {
$output .= " <li>". l(check_output($comment->subject), array("id" => $node->nid, "cid" => $comment->cid, "pid" => $comment->pid ."#". $comment->cid)) ." by ". lm(check_output($comment->name), array("mod" => "user", "op" => "view", "id" => $comment->uid)) ." (". t("replies") .": ". comment_num_replies($comment->cid) .") ". (comment_is_new($comment) ? "<span style=\"color: red;\">*</span>" : "") ."</li>\n";
$output .= " <li>". l(check_output($comment->subject), array("id" => $node->nid, "cid" => $comment->cid, "pid" => $comment->pid), $comment->cid) ." by ". lm(check_output($comment->name), array("mod" => "user", "op" => "view", "id" => $comment->uid)) ." (". t("replies") .": ". comment_num_replies($comment->cid) .") ". (comment_is_new($comment) ? "<span style=\"color: red;\">*</span>" : "") ."</li>\n";
}
$output .= " </ul>\n";
}
@ -50,8 +50,8 @@ function tracker_comments($id = 0) {
function tracker_menu() {
global $user;
$links[] = lm(t("your recent comments"), array("mod" => "tracker", "id" => $user->uid), t("Display an overview of your recent comments."));
$links[] = lm(t("all recent comments"), array("mod" => "tracker"), t("Display an overview of all the recent comments."));
$links[] = lm(t("your recent comments"), array("mod" => "tracker", "id" => $user->uid), "", array("title" => t("Display an overview of your recent comments.")));
$links[] = lm(t("all recent comments"), array("mod" => "tracker"), "", array("title" => t("Display an overview of all the recent comments.")));
return "<div align=\"center\">". implode(" &middot; ", $links) ."</div>";
}

View File

@ -481,9 +481,9 @@ function user_block() {
$output .= "<input name=\"edit[op]\" type=\"submit\" value=\"". t("Log in") ."\" /><br />\n";
$output .= "</form></div>\n";
if (variable_get("user_register", 1)) {
$output .= "&#187; ". lm(t("Register"), array("mod" => "user", "op" => "register"), t("Create a new user account.")) ."\n";
$output .= "&#187; ". lm(t("Register"), array("mod" => "user", "op" => "register"), "", array("title" => t("Create a new user account."))) ."\n";
}
$output .= "<br />&#187; ". lm(t("New password"), array("mod" => "user", "op" => "password"), t("Request new password via e-mail")) ."<br />";
$output .= "<br />&#187; ". lm(t("New password"), array("mod" => "user", "op" => "password"), "", array("title" => t("Request new password via e-mail"))) ."<br />";
$block[1]["content"] = $output;
}
@ -527,11 +527,11 @@ function user_new_users() {
function user_link($type) {
if ($type == "page") {
$links[] = lm(t("user account"), array("mod" => "user"), t("Create a user account, request a new password or edit your account settings."));
$links[] = lm(t("user account"), array("mod" => "user"), "", array("title" => t("Create a user account, request a new password or edit your account settings.")));
}
if ($type == "menu.settings") {
$links[] = lm(t("edit account"), array("mod" => "user", "op" => "edit"), t("View and edit your account information."));
$links[] = lm(t("edit account"), array("mod" => "user", "op" => "edit"), "", array("title" => t("View and edit your account information.")));
}
if ($type == "menu.misc") {
@ -539,7 +539,7 @@ function user_link($type) {
$links[] = la(t("administer %a", array("%a" => variable_get("site_name", "drupal"))));
}
$links[] = lm(t("logout"), array("mod" => "user", "op" => "logout"), t("Logout."));
$links[] = lm(t("logout"), array("mod" => "user", "op" => "logout"), "", array("title" => t("Logout.")));
}
if ($type == "admin" && user_access("administer users")) {
@ -662,7 +662,7 @@ function user_help_da() {
function user_auth_help_links() {
foreach (module_list() as $module) {
if (module_hook($module, "auth_help")) {
$links[] = lm(module_invoke($module, "info", "name"), array("mod" => "user", "op" => "help#$module"));
$links[] = lm(module_invoke($module, "info", "name"), array("mod" => "user", "op" => "help"), $module);
}
}
return $links;
@ -1145,7 +1145,7 @@ function user_view($uid = 0) {
}
}
$output .= form_item(t("Homepage"), format_url($user->homepage));
$output .= form_item(t("Homepage"), "<a href=\"$user->homepage\">$user->homepage</a>");
$output .= form_item(t("Signature"), check_output($user->signature, 1));
$theme->header();
@ -1155,7 +1155,7 @@ function user_view($uid = 0) {
}
else if ($uid && $account = user_load(array("uid" => $uid, "status" => 1))) {
$output .= form_item(t("Name"), check_output($account->name));
$output .= form_item(t("Homepage"), format_url($account->homepage));
$output .= form_item(t("Homepage"), "<a href=\"$account->homepage\">$account->homepage</a>");
foreach (module_list() as $module) {
if (module_hook($module, "user")) {
@ -1617,12 +1617,12 @@ function user_admin_edit($edit = array()) {
function user_admin_account() {
global $query;
$queries = array(array("ORDER BY timestamp DESC", "active users"), array("ORDER BY uid DESC", "new users"), array("WHERE status = 0 ORDER BY uid DESC", "blocked users"));
$queries = array(array("ORDER BY timestamp DESC", "active users"), array("ORDER BY u.uid DESC", "new users"), array("WHERE status = 0 ORDER BY u.uid DESC", "blocked users"));
foreach (user_roles(1) as $key => $value) {
$queries[] = array("WHERE role = '$value' ORDER BY uid DESC", $value . "s");
$queries[] = array("WHERE r.name = '$value' ORDER BY u.uid DESC", $value . "s");
}
$result = db_query("SELECT uid, name, timestamp FROM users ". $queries[$query ? $query : 0][0] ." LIMIT 50");
$result = db_query("SELECT u.uid, u.name, u.timestamp FROM users u LEFT JOIN role r ON u.rid = r.rid ". $queries[$query ? $query : 0][0] ." LIMIT 50");
foreach ($queries as $key => $value) {
$links[] = la($value[1], array("mod" => "user", "op" => "account", "query" => $key));
@ -1633,7 +1633,7 @@ function user_admin_account() {
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
$output .= " <tr><th>username</th><th>last access</th><th>operations</th></tr>";
while ($account = db_fetch_object($result)) {
$output .= " <tr><td>". format_name($account) ."</td><td>". format_date($account->timestamp, "small") ."</td><td align=\"center\">". la(t("edit account"), array("mod" => "user", "op" => "edit", "id" =>$account->uid)) ."</td></tr>";
$output .= " <tr><td>". format_name($account) ."</td><td>". format_date($account->timestamp, "small") ."</td><td align=\"center\">". la(t("edit account"), array("mod" => "user", "op" => "edit", "id" => $account->uid)) ."</td></tr>";
}
$output .= "</table>";

View File

@ -481,9 +481,9 @@ function user_block() {
$output .= "<input name=\"edit[op]\" type=\"submit\" value=\"". t("Log in") ."\" /><br />\n";
$output .= "</form></div>\n";
if (variable_get("user_register", 1)) {
$output .= "&#187; ". lm(t("Register"), array("mod" => "user", "op" => "register"), t("Create a new user account.")) ."\n";
$output .= "&#187; ". lm(t("Register"), array("mod" => "user", "op" => "register"), "", array("title" => t("Create a new user account."))) ."\n";
}
$output .= "<br />&#187; ". lm(t("New password"), array("mod" => "user", "op" => "password"), t("Request new password via e-mail")) ."<br />";
$output .= "<br />&#187; ". lm(t("New password"), array("mod" => "user", "op" => "password"), "", array("title" => t("Request new password via e-mail"))) ."<br />";
$block[1]["content"] = $output;
}
@ -527,11 +527,11 @@ function user_new_users() {
function user_link($type) {
if ($type == "page") {
$links[] = lm(t("user account"), array("mod" => "user"), t("Create a user account, request a new password or edit your account settings."));
$links[] = lm(t("user account"), array("mod" => "user"), "", array("title" => t("Create a user account, request a new password or edit your account settings.")));
}
if ($type == "menu.settings") {
$links[] = lm(t("edit account"), array("mod" => "user", "op" => "edit"), t("View and edit your account information."));
$links[] = lm(t("edit account"), array("mod" => "user", "op" => "edit"), "", array("title" => t("View and edit your account information.")));
}
if ($type == "menu.misc") {
@ -539,7 +539,7 @@ function user_link($type) {
$links[] = la(t("administer %a", array("%a" => variable_get("site_name", "drupal"))));
}
$links[] = lm(t("logout"), array("mod" => "user", "op" => "logout"), t("Logout."));
$links[] = lm(t("logout"), array("mod" => "user", "op" => "logout"), "", array("title" => t("Logout.")));
}
if ($type == "admin" && user_access("administer users")) {
@ -662,7 +662,7 @@ function user_help_da() {
function user_auth_help_links() {
foreach (module_list() as $module) {
if (module_hook($module, "auth_help")) {
$links[] = lm(module_invoke($module, "info", "name"), array("mod" => "user", "op" => "help#$module"));
$links[] = lm(module_invoke($module, "info", "name"), array("mod" => "user", "op" => "help"), $module);
}
}
return $links;
@ -1145,7 +1145,7 @@ function user_view($uid = 0) {
}
}
$output .= form_item(t("Homepage"), format_url($user->homepage));
$output .= form_item(t("Homepage"), "<a href=\"$user->homepage\">$user->homepage</a>");
$output .= form_item(t("Signature"), check_output($user->signature, 1));
$theme->header();
@ -1155,7 +1155,7 @@ function user_view($uid = 0) {
}
else if ($uid && $account = user_load(array("uid" => $uid, "status" => 1))) {
$output .= form_item(t("Name"), check_output($account->name));
$output .= form_item(t("Homepage"), format_url($account->homepage));
$output .= form_item(t("Homepage"), "<a href=\"$account->homepage\">$account->homepage</a>");
foreach (module_list() as $module) {
if (module_hook($module, "user")) {
@ -1617,12 +1617,12 @@ function user_admin_edit($edit = array()) {
function user_admin_account() {
global $query;
$queries = array(array("ORDER BY timestamp DESC", "active users"), array("ORDER BY uid DESC", "new users"), array("WHERE status = 0 ORDER BY uid DESC", "blocked users"));
$queries = array(array("ORDER BY timestamp DESC", "active users"), array("ORDER BY u.uid DESC", "new users"), array("WHERE status = 0 ORDER BY u.uid DESC", "blocked users"));
foreach (user_roles(1) as $key => $value) {
$queries[] = array("WHERE role = '$value' ORDER BY uid DESC", $value . "s");
$queries[] = array("WHERE r.name = '$value' ORDER BY u.uid DESC", $value . "s");
}
$result = db_query("SELECT uid, name, timestamp FROM users ". $queries[$query ? $query : 0][0] ." LIMIT 50");
$result = db_query("SELECT u.uid, u.name, u.timestamp FROM users u LEFT JOIN role r ON u.rid = r.rid ". $queries[$query ? $query : 0][0] ." LIMIT 50");
foreach ($queries as $key => $value) {
$links[] = la($value[1], array("mod" => "user", "op" => "account", "query" => $key));
@ -1633,7 +1633,7 @@ function user_admin_account() {
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">";
$output .= " <tr><th>username</th><th>last access</th><th>operations</th></tr>";
while ($account = db_fetch_object($result)) {
$output .= " <tr><td>". format_name($account) ."</td><td>". format_date($account->timestamp, "small") ."</td><td align=\"center\">". la(t("edit account"), array("mod" => "user", "op" => "edit", "id" =>$account->uid)) ."</td></tr>";
$output .= " <tr><td>". format_name($account) ."</td><td>". format_date($account->timestamp, "small") ."</td><td align=\"center\">". la(t("edit account"), array("mod" => "user", "op" => "edit", "id" => $account->uid)) ."</td></tr>";
}
$output .= "</table>";