Skip to content
<html>
<head>
<title>font test</title>
<style type="text/css">
.f5 { font-size: 5pt; font-family: arial,helvetica; }
.f6 { font-size: 6pt; font-family: arial,helvetica; }
.f7 { font-size: 7pt; font-family: arial,helvetica; }
.f8 { font-size: 8pt; font-family: arial,helvetica; }
.f9 { font-size: 9pt; font-family: arial,helvetica; }
.f10 { font-size: 10pt; font-family: arial,helvetica; }
.f11 { font-size: 11pt; font-family: arial,helvetica; }
.f12 { font-size: 12pt; font-family: arial,helvetica; }
.f13 { font-size: 13pt; font-family: arial,helvetica; }
.f14 { font-size: 14pt; font-family: arial,helvetica; }
.f15 { font-size: 15pt; font-family: arial,helvetica; }
.f16 { font-size: 16pt; font-family: arial,helvetica; }
.f17 { font-size: 17pt; font-family: arial,helvetica; }
.f18 { font-size: 18pt; font-family: arial,helvetica; }
</style>
</head>
<body>
<span class="f5">5pt abcdefghijklmnopqrstuvwxyz</span><br />
<span class="f6">6pt abcdefghijklmnopqrstuvwxyz</span><br />
<span class="f7">7pt abcdefghijklmnopqrstuvwxyz</span><br />
<span class="f8">8pt abcdefghijklmnopqrstuvwxyz</span><br />
<span class="f9">9pt abcdefghijklmnopqrstuvwxyz</span><br />
<span class="f10">10pt abcdefghijklmnopqrstuvwxyz</span><br />
<span class="f11">11pt abcdefghijklmnopqrstuvwxyz</span><br />
<span class="f12">12pt abcdefghijklmnopqrstuvwxyz</span><br />
<span class="f13">13pt abcdefghijklmnopqrstuvwxyz</span><br />
<span class="f14">14pt abcdefghijklmnopqrstuvwxyz</span><br />
<span class="f15">15pt abcdefghijklmnopqrstuvwxyz</span><br />
<span class="f16">16pt abcdefghijklmnopqrstuvwxyz</span><br />
<span class="f17">17pt abcdefghijklmnopqrstuvwxyz</span><br />
<span class="f18">18pt abcdefghijklmnopqrstuvwxyz</span><br />
</body>
</html>
......@@ -19,12 +19,7 @@ function admin_link($type) {
}
function admin_admin() {
if (user_access("access administration pages")) {
print theme("page", watchdog_overview("actions"));
}
else {
print theme("page", message_access());
}
print theme("page", watchdog_overview("actions"));
}
?>
This diff is collapsed.
This diff is collapsed.
......@@ -82,11 +82,11 @@ function archive_calendar($original = 0) {
// Generate calendar header:
$output .= "\n<!-- calendar -->\n";
$output .= "<div class=\"calendar\">";
$output .= "<table>\n";
$output .= " <tr><td colspan=\"7\" class=\"header-month\">". l("&laquo;", "archive/". date("Y/m/d", $prev)) ." ". t(date("F", $requested)) . date(" Y", $requested) ." ". ($nextmonth <= time() ? l("&raquo;", "archive/". date("Y/m/d", $next)) : "&nbsp;") ."</td></tr>\n";
$output .= "<table summary=\"". t('A calendar to browse the archives') .".\">\n";
$output .= " <tr><td colspan=\"7\" class=\"header-month\">". l("&laquo;", "archive/". date("Y/m/d", $prev)) ." ". format_date($requested, "custom", "F") . date(" Y", $requested) ." ". ($nextmonth <= time() ? l("&raquo;", "archive/". date("Y/m/d", $next)) : "&nbsp;") ."</td></tr>\n";
// First day of week (0 => Sunday, 1 => Monday, ...)
$weekstart = variable_get("default_firstday", 0);
$cday = $weekstart = variable_get("default_firstday", 0);
// Last day of week
($weekstart - 1 == -1) ? $lastday = 6 : $lastday = $weekstart - 1;
......@@ -95,8 +95,10 @@ function archive_calendar($original = 0) {
$firstcolumn = mktime(0, 0, 0, 3, 20 + $weekstart, 1994);
$output .= " <tr class=\"header-week\">";
$days = array(t('Su'), t('Mo'), t('Tu'), t('We'), t('Th'), t('Fr'), t('Sa'));
for ($i = 0; $i < 7; $i++) {
$output .= "<td>". t(substr(ucfirst(date("l", $firstcolumn + $i * 86400)), 0, 2)) ."</td>";
$output .= "<td>". $days[$cday] . "</td>";
$cday = ($cday < 6 ? $cday+1 : 0);
}
$output .= "</tr>\n";
......@@ -203,51 +205,46 @@ function archive_page() {
$op = $_POST["op"];
$edit = $_POST["edit"];
if (user_access("access content")) {
if ($op == t("Show")) {
$year = $edit["year"];
$month = $edit["month"];
$day = $edit["day"];
}
else {
$year = arg(1);
$month = arg(2);
$day = arg(3);
}
if ($op == t("Show")) {
$year = $edit["year"];
$month = $edit["month"];
$day = $edit["day"];
}
else {
$year = arg(1);
$month = arg(2);
$day = arg(3);
}
$date = mktime(0, 0, 0, $month, $day, $year) - $user->timezone;
$date_end = mktime(0, 0, 0, $month, $day + 1, $year) - $user->timezone;
$date = mktime(0, 0, 0, $month, $day, $year) - $user->timezone;
$date_end = mktime(0, 0, 0, $month, $day + 1, $year) - $user->timezone;
/*
** Prepare the values of the form fields:
*/
/*
** Prepare the values of the form fields:
*/
$years = array(2000 => "2000", 2001 => "2001", 2002 => "2002", 2003 => "2003", 2004 => "2004", 2005 => "2005");
$months = array(1 => t("January"), 2 => t("February"), 3 => t("March"), 4 => t("April"), 5 => t("May"), 6 => t("June"), 7 => t("July"), 8 => t("August"), 9 => t("September"), 10 => t("October"), 11 => t("November"), 12 => t("December"));
for ($i = 1; $i <= 31; $i++) $days[$i] = $i;
$years = drupal_map_assoc(range(2000, 2005));
$months = array(1 => t("January"), 2 => t("February"), 3 => t("March"), 4 => t("April"), 5 => t("May"), 6 => t("June"), 7 => t("July"), 8 => t("August"), 9 => t("September"), 10 => t("October"), 11 => t("November"), 12 => t("December"));
$days = drupal_map_assoc(range(0, 31));
$start = "<div class=\"container-inline\">";
$start .= form_select("", "year", ($year ? $year : date("Y")), $years). form_select("", "month", ($month ? $month : date("m")), $months) . form_select("", "day", ($day ? $day : date("d")), $days) . form_submit(t("Show"));
$start .= "</div>";
$output .= form($start);
$start = "<div class=\"container-inline\">";
$start .= form_select("", "year", ($year ? $year : date("Y")), $years). form_select("", "month", ($month ? $month : date("m")), $months) . form_select("", "day", ($day ? $day : date("d")), $days) . form_submit(t("Show"));
$start .= "</div>";
$output .= form($start);
/*
** Fetch nodes for the selected date, or current date if none
** selected.
*/
/*
** Fetch nodes for the selected date, or current date if none
** selected.
*/
if ($year && $month && $day) {
$result = db_query_range("SELECT nid FROM {node} WHERE status = '1' AND created > %d AND created < %d ORDER BY created", $date, $date_end, 0, 20);
if ($year && $month && $day) {
$result = db_query_range("SELECT nid FROM {node} WHERE status = '1' AND created > %d AND created < %d ORDER BY created", $date, $date_end, 0, 20);
while ($nid = db_fetch_object($result)) {
$output .= node_view(node_load(array("nid" => $nid->nid)), 1);
}
while ($nid = db_fetch_object($result)) {
$output .= node_view(node_load(array("nid" => $nid->nid)), 1);
}
print theme("page", $output);
}
else {
print theme("page", message_access());
}
print theme("page", $output);
}
function archive_settings() {
......
<?php
// $Id$
function archive_help($section) {
$output = "";
switch ($section) {
case 'admin/system/modules#description':
$output = t("Displays a calendar to navigate old content.");
break;
case 'admin/system/modules/archive':
$output = t("Choose the starting \"day of the week\" for the displayed calendar block.");
break;
}
return $output;
}
function archive_calendar($original = 0) {
global $user;
$edit = $_POST["edit"];
// Extract today's date:
$offset = time() + $user->timezone;
$start_of_today = mktime(0, 0, 0, date("n", $offset), date("d", $offset), date("Y", $offset)) + $user->timezone;
$end_of_today = mktime(23, 59, 59, date("n", $offset), date("d", $offset), date("Y", $offset)) + $user->timezone;
// Extract the requested date:
if ($edit["year"] && $edit["month"] && $edit["day"]) {
$year = $edit["year"];
$month = $edit["month"];
$day = $edit["day"];
$requested = mktime(0, 0, 0, $month, $day, $year) + $user->timezone;
}
else if (arg(0) == "archive" && arg(3)) {
$year = arg(1);
$month = arg(2);
$day = arg(3);
$requested = mktime(0, 0, 0, $month, $day, $year) + $user->timezone;
}
else {
$year = date("Y", time());
$month = date("n", time());
$day = date("d", time());
$requested = $end_of_today + $user->timezone;
}
$start_of_month = mktime(0, 0, 0, $month, 1, $year);
// Extract first day of the month:
$first = date("w", $start_of_month);
// Extract last day of the month:
$last = date("t", $start_of_month);
$end_of_month = mktime(23, 59, 59, $month, $last, $year);
$cache = cache_get("archive:calendar:$day-$month-$year");
if (!empty($cache)) {
return $cache->data;
}
// Calculate previous and next months dates and check for shorter months (28/30 days)
$prevmonth = mktime(23, 59, 59, $month - 1, 1, $year);
$prev = mktime(23, 59, 59, $month - 1, min(date("t", $prevmonth), $day), $year);
$nextmonth = mktime(23, 59, 59, $month + 1, 1, $year);
$next = mktime(23, 59, 59, $month + 1, min(date("t", $nextmonth), $day), $year);
$result = db_query("SELECT created FROM {node} WHERE status = 1 AND created > $start_of_month AND created < $end_of_month");
$days_with_posts = array();
while ($day_with_post = db_fetch_object($result)) {
$days_with_posts[] = date("j", $day_with_post->created + $user->timezone);
}
$days_with_posts = array_unique($days_with_posts);
// Generate calendar header:
$output .= "\n<!-- calendar -->\n";
$output .= "<div class=\"calendar\">";
$output .= "<table>\n";
$output .= " <tr><td colspan=\"7\" class=\"header-month\">". l("&laquo;", "archive/". date("Y/m/d", $prev)) ." ". t(date("F", $requested)) . date(" Y", $requested) ." ". ($nextmonth <= time() ? l("&raquo;", "archive/". date("Y/m/d", $next)) : "&nbsp;") ."</td></tr>\n";
// First day of week (0 => Sunday, 1 => Monday, ...)
$weekstart = variable_get("default_firstday", 0);
// Last day of week
($weekstart - 1 == -1) ? $lastday = 6 : $lastday = $weekstart - 1;
// Generate the days of the week:
$firstcolumn = mktime(0, 0, 0, 3, 20 + $weekstart, 1994);
$output .= " <tr class=\"header-week\">";
for ($i = 0; $i < 7; $i++) {
$output .= "<td>". t(substr(ucfirst(date("l", $firstcolumn + $i * 86400)), 0, 2)) ."</td>";
}
$output .= "</tr>\n";
// Initialize temporary variables:
$nday = 1;
$sday = $first;
// Loop through all the days of the month:
while ($nday <= $last) {
// Set up blank days for first week of the month:
if ($first != $weekstart) {
$blankdays = ($first - $weekstart + 7) % 7;
$output .= " <tr class=\"row-week\"><td class=\"day-blank\" colspan=\"$blankdays\">&nbsp;</td>\n";
$first = $weekstart;
}
// Start every week on a new line:
if ($sday == $weekstart) {
$output .= " <tr class=\"row-week\">\n";
}
// Print one cell:
$date = mktime(0, 0, 0, $month, $nday, $year) + $user->timezone;
if (in_array($nday, $days_with_posts)) {
$daytext = l($nday, "archive/$year/$month/$nday");
$dayclass = "day-link";
}
else {
$daytext = "<div>$nday</div>";
$dayclass = "day-normal";
}
if ($date == $requested) {
$output .= " <td class=\"day-selected\">$daytext</td>\n";
}
else if ($date == $start_of_today) {
$output .= " <td class=\"day-today\">$daytext</td>\n";
}
else if ($date > $end_of_today) {
$output .= " <td class=\"day-future\">$daytext</td>\n";
}
else {
$output .= " <td class=\"$dayclass\">$daytext</td>\n";
}
// Start every week on a new line:
if ($sday == $lastday) {
$output .= " </tr>\n";
}
// Update temporary variables:
$sday++;
$sday = $sday % 7;
$nday++;
}
// Complete the calendar:
if ($sday != $weekstart) {
$end = (7 - $sday + $weekstart) % 7;
$output .= " <td class=\"day-blank\" colspan=\"$end\">&nbsp;</td>\n </tr>\n";
}
$output .= "</table></div>\n\n";
cache_set("archive:calendar:$day-$month-$year", $output, 1);
return $output;
}
function archive_block($op = "list", $delta = 0) {
global $date;
if ($op == "list") {
$blocks[0]["info"] = t("Calendar to browse archives");
return $blocks;
}
else if (user_access("access content")) {
switch ($delta) {
case 0:
$block["subject"] = t("Browse archives");
$block["content"] = archive_calendar();
return $block;
}
}
}
function archive_link($type) {
$links = array();
if ($type == "page" && user_access("access content")) {
$links[] = l(t("archives"), "archive", array("title" => t("Read the older content in our archive.")));
}
if ($type == "system") {
if (user_access("access content")) {
menu("archive", t("archives"), "archive_page", 0, MENU_HIDE);
}
}
return $links;
}
function archive_page() {
global $date, $month, $year, $meta, $user;
$op = $_POST["op"];
$edit = $_POST["edit"];
if (user_access("access content")) {
if ($op == t("Show")) {
$year = $edit["year"];
$month = $edit["month"];
$day = $edit["day"];
}
else {
$year = arg(1);
$month = arg(2);
$day = arg(3);
}
$date = mktime(0, 0, 0, $month, $day, $year) - $user->timezone;
$date_end = mktime(0, 0, 0, $month, $day + 1, $year) - $user->timezone;
/*
** Prepare the values of the form fields:
*/
$years = array(2000 => "2000", 2001 => "2001", 2002 => "2002", 2003 => "2003", 2004 => "2004", 2005 => "2005");
$months = array(1 => t("January"), 2 => t("February"), 3 => t("March"), 4 => t("April"), 5 => t("May"), 6 => t("June"), 7 => t("July"), 8 => t("August"), 9 => t("September"), 10 => t("October"), 11 => t("November"), 12 => t("December"));
for ($i = 1; $i <= 31; $i++) $days[$i] = $i;
$start = "<div class=\"container-inline\">";
$start .= form_select("", "year", ($year ? $year : date("Y")), $years). form_select("", "month", ($month ? $month : date("m")), $months) . form_select("", "day", ($day ? $day : date("d")), $days) . form_submit(t("Show"));
$start .= "</div>";
$output .= form($start);
/*
** Fetch nodes for the selected date, or current date if none
** selected.
*/
if ($year && $month && $day) {
$result = db_query_range("SELECT nid FROM {node} WHERE status = '1' AND created > %d AND created < %d ORDER BY created", $date, $date_end, 0, 20);
while ($nid = db_fetch_object($result)) {
$output .= node_view(node_load(array("nid" => $nid->nid)), 1);
}
}
print theme("page", $output);
}
else {
print theme("page", message_access());
}
}
function archive_settings() {
$output .= form_select(t("First day of week"), "default_firstday", variable_get("default_firstday", 0), array(0 => t("Sunday"), 1 => t("Monday"), 2 => t("Tuesday"), 3 => t("Wednesday"), 4 => t("Thursday"), 5 => t("Friday"), 6 => t("Saturday")), t("The first day of the week. By changing this value you choose how the calendar block is rendered."));
return $output;
}
?>
This diff is collapsed.
This diff is collapsed.
......@@ -3,22 +3,16 @@
function blog_settings() {
$output = form_textarea(t("Explanation or submission guidelines"), "blog_help", variable_get("blog_help", ""), 70, 4, t("This text is displayed at the top of the blog submission form. It's useful for helping or instructing your users."));
$words = t("words");
$output .= form_select(t("Minimum number of words in a blog entry"), "minimum_blog_size", variable_get("minimum_blog_size", 0), array(0 => "0 $words", 10 => "10 $words", 25 => "25 $words", 50 => "50 $words", 75 => "75 $words", 100 => "100 $words", 125 => "125 $words", 150 => "150 $words", 175 => "175 $words", 200 => "200 $words"), t("The minimum number of words a personal blog entry should contain. This is useful to rule out submissions that do not meet the site's standards, such as short test posts."));
$output .= form_select(t("Minimum number of words in a blog entry"), "minimum_blog_size", variable_get("minimum_blog_size", 0), drupal_map_assoc(array(0, 10, 25, 50, 75, 100, 125, 150, 175, 200)), t("The minimum number of words a personal blog entry should contain. This is useful to rule out submissions that do not meet the site's standards, such as short test posts."));
return $output;
}
function blog_node($field) {
global $user;
$info["name"] = t("personal blog entry");
$info["description"] = t("A blog is a regularly updated journal made up of individual entries, often called posts, that are time stamped and typically arranged by the day, with the newest on top (a diary is the reverse). They tend to be quite personal, often containing links to things you've seen, or to editorials that you find interesting. Some blogs also contain original material written solely for the blog. Since a Blog is personal, you and only you have full control over what you publish. The most interesting blog entries or those blog entries that fit the site's topic well might get promoted to the front page by the community or by users with the access do this.");
return $info[$field];
function blog_node_name($node) {
return t("personal blog entry");
}
function blog_perm() {
return array("maintain personal blog");
return array("edit own blog");
}
function blog_access($op, $node) {
......@@ -29,37 +23,24 @@ function blog_access($op, $node) {
}
if ($op == "create") {
return user_access("maintain personal blog") && $user->uid;
return user_access("edit own blog") && $user->uid;
}
if ($op == "update") {
return user_access("maintain personal blog") && ($user->uid == $node->uid);
return user_access("edit own blog") && ($user->uid == $node->uid);
}
if ($op == "delete") {
return user_access("maintain personal blog") && ($user->uid == $node->uid);
return user_access("edit own blog") && ($user->uid == $node->uid);
}
}
function blog_head($main = 0) {
$mod = arg(0);
$id = arg(1);
$output = array();
if ($mod == "blog") {
$output[] = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS feed\" href=\"". url("blog/feed/$id") ."\" />";
}
return $output;
}
function blog_user($type, &$edit, &$user) {
switch ($type) {
case "view_public":
case "view_private":
if (user_access("maintain personal blog", $user)) {
if (user_access("edit own blog", $user)) {
return form_item(t("Blog"), l(t("view recent blog entries"), "blog/$user->uid", array("title" => t("Read %username's latest blog entries.", array("%username" => $user->name)))));
}
}
......@@ -70,17 +51,23 @@ function blog_help($section) {
switch ($section) {
case 'admin/help#blog':
$output .= "<p>Drupal's blog module allows registered users to maintain an online weblog (commonly known as a blog), often referred to as an online journal or diary. These can be filled with daily thoughts, poetry, boneless blabber, spiritual theories, intimate details, valuable experiences, cynical rants, semi-coherent comments, writing experiments, artistic babblings, critics on current facts, fresh insights, diverse dreams, chronicles and mumbling madness available for public consumption.</p>";
$output .= "<p>Blogs are made up of individual entries (nodes) that are timestamped and are typically viewed by day as you would a diary. Blogs often contain links to things you've seen and/or agree/disagree with. A typical example of a long term blog can be seen at %scripting-com.</p>";
$output .= "<p>The blog module adds a \"user blogs\" navigation link to the site, which takes any visitor to a page that displays the most recent blog entries from all the users on the site. Personal user menus gain a \"create a blog entry\" link (which takes you to a submission form) and a \"view personal blog\" link (which displays your blog entries as other people will see them). On the bottom of each of your own blog entries, there is an \"edit this blog entry\" link that lets you edit or delete that entry.</p>";
$output .= "<p>If a user has the ability to post blogs, then the import module (news aggregator) will display a blog-it link <strong>(b)</strong> next to each news item in its lists. Click on this and you will be taken to the blog submission form, with the title, a link to the item, and a link to the source into the body text already in the text box, ready for you to add your explanation. This actively encourages people to add blog entries about things they see and hear elsewhere in the Drupal site and from your syndicated partner sites.</p>";
$output = t($output, array("%scripting-com" => "<a href=\"http://www.scripting.com/\">http://www.scripting.com/</a>"));
$output .= t("
<p>Drupal's blog module allows registered users to maintain an online weblog (commonly known as a blog), often referred to as an online journal or diary. These can be filled with daily thoughts, poetry, boneless blabber, spiritual theories, intimate details, valuable experiences, cynical rants, semi-coherent comments, writing experiments, artistic babblings, critics on current facts, fresh insights, diverse dreams, chronicles and mumbling madness available for public consumption.</p>
<p>Blogs are made up of individual entries (nodes) that are timestamped and are typically viewed by day as you would a diary. Blogs often contain links to things you've seen and/or agree/disagree with. A typical example of a long term blog can be seen at %scripting-com.</p>
<p>The blog module adds a \"user blogs\" navigation link to the site, which takes any visitor to a page that displays the most recent blog entries from all the users on the site. Personal user menus gain a \"create a blog entry\" link (which takes you to a submission form) and a \"view personal blog\" link (which displays your blog entries as other people will see them). On the bottom of each of your own blog entries, there is an \"edit this blog entry\" link that lets you edit or delete that entry.</p>
<p>If a user has the ability to post blogs, then the import module (news aggregator) will display a blog-it link <strong>(b)</strong> next to each news item in its lists. Click on this and you will be taken to the blog submission form, with the title, a link to the item, and a link to the source into the body text already in the text box, ready for you to add your explanation. This actively encourages people to add blog entries about things they see and hear elsewhere in the Drupal site and from your syndicated partner sites.</p>", array("%scripting-com" => "<a href=\"http://www.scripting.com/\">http://www.scripting.com/</a>"));
break;
case 'admin/system/modules#description':
$output .= t("Enables keeping a blog or easily and regularly updated web page.");
break;
case 'admin/system/modules/blog':
$output .= t("A weblog is a running journal of a users ideas. Enter the minimum word count for a single entry, and the text displayed on the entry submission form");
$output .= t("A weblog is a running journal of a user's ideas. Enter the minimum word count for a single entry, and the text displayed on the entry submission form");
break;
case 'node/add/blog':
$output = variable_get('blog_help', '');
break;
case 'node/add#blog':
$output = t("A blog is a regularly updated journal made up of individual entries, often called posts, that are time stamped and typically arranged by the day, with the newest on top (a diary is the reverse). They tend to be quite personal, often containing links to things you've seen, or to editorials that you find interesting. Some blogs also contain original material written solely for the blog. Since a Blog is personal, you and only you have full control over what you publish. The most interesting blog entries or those blog entries that fit the site's topic well might get promoted to the front page by the community or by users with the access do this.");
break;
}
......@@ -99,7 +86,7 @@ function blog_feed_user($uid = 0) {
$result = db_query_range("SELECT n.nid, n.title, n.teaser, n.created, u.name, u.uid FROM {node} n INNER JOIN {users} u ON n.uid = u.uid WHERE n.type = 'blog' AND u.uid = %d AND n.status = 1 ORDER BY n.nid DESC", $uid, 0, 15);
$channel["title"] = $account->name ."'s blog";
$channel["link"] = url("blog/view/$uid");
$channel["link"] = url("blog/$uid", NULL, NULL, TRUE);
$channel["description"] = $term->description;
node_feed($result, $channel);
}
......@@ -125,7 +112,7 @@ function blog_page_user($uid) {
$output .= theme('pager', NULL, variable_get("default_nodes_main", 10));
$output .= theme('xml_icon', url("blog/feed/$account->uid"));
drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url("blog/feed/$account->uid") .'">');
drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - '. $title .'" href="'. url("blog/feed/$account->uid") .'" />');
print theme("page", $output, $title);
}
......@@ -142,7 +129,7 @@ function blog_page_last() {
$output .= theme('pager', NULL, variable_get("default_nodes_main", 10));
$output .= theme('xml_icon', url('blog/feed'));
drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - blogs" href="'. url('blog/feed') .'">');
drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS - blogs" href="'. url('blog/feed') .'" />');
print theme("page", $output);
}
......@@ -159,16 +146,10 @@ function blog_validate(&$node) {
return $error;
}
function blog_form(&$node, &$help, &$error) {
function blog_form(&$node, &$error) {
global $nid;
$iid = $_GET["iid"];
/*
** Carry out some explanation or submission guidelines:
*/
$help = variable_get("blog_help", "");
if (empty($node->body)) {
/*
** If the user clicked a "blog it" link, we load the data from the
......@@ -189,36 +170,30 @@ function blog_form(&$node, &$help, &$error) {
$output .= implode("", taxonomy_node_form("blog", $node));
}
$output .= form_textarea(t("Body"), "body", $node->body, 60, 15, $error["body"] ? $error["body"] : form_allowed_tags_text());
$output .= form_textarea(t("Body"), "body", $node->body, 60, 15, $error["body"] ? $error["body"] : filter_tips_short());
return $output;
}
function blog_page() {
if (user_access("access content")) {
switch (arg(1)) {
case "feed":
if (arg(2)) {
blog_feed_user(arg(2));
}
else {
blog_feed_last();
}
break;
default:
if (arg(1)) {
blog_page_user(arg(1));
}
else {
blog_page_last();
}
}
}
else {
print theme("page", message_access());
switch (arg(1)) {
case "feed":
if (arg(2)) {
blog_feed_user(arg(2));
}
else {
blog_feed_last();
}
break;
default:
if (arg(1)) {
blog_page_user(arg(1));
}
else {
blog_page_last();
}
}
}
function blog_content($node, $main = 0) {
......@@ -246,7 +221,7 @@ function blog_link($type, $node = 0, $main) {
$links = array();
if ($type == "system") {
if (user_access("maintain personal blog")) {
if (user_access("edit own blog")) {
menu("node/add/blog", t("blog entry"), "node_page", 0);
menu("blog/". $user->uid, t("my blog"), "blog_page", 1);
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.