Commit 9f2eec07 authored by Dries's avatar Dries

- block.module:
    + renamed 'overview' to 'preview' as suggested by Kristjan.

- meta.module:
    + renamed 'verify' to 'preview' to make it consistent with
      block.module.
    + fixed comma-bug with attribute list reported by Kristjan.

- node.module:
    + fixed typo: "id$nid" should have been "id=$nid"
parent 59176da9
......@@ -57,7 +57,7 @@ function block_admin_display() {
print $output;
}
function block_admin_overview() {
function block_admin_preview() {
$result = db_query("SELECT * FROM blocks WHERE status > 0 AND region = 0 ORDER BY weight");
$lblocks .= "<TABLE BORDER=\"0\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
......@@ -69,7 +69,7 @@ function block_admin_overview() {
while ($block = db_fetch_object($result)) $rblocks .= " <TR><TD NOWRAP>". ($block->status == 2 ? "<B>$block->name</B>" : $block->name) ."</TD><TD>$block->weight</TD></TR>\n";
$rblocks .= "</TABLE>\n";
$output .= "<P><B>layout 1:</B></P>\n";
$output .= "<H3>layout scheme #1:</H3>\n";
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TD ALIGN=\"center\" COLSPAN=\"3\">header</TD></TR>\n";
$output .= " <TR><TD>\n". ($lblocks ? $lblocks : "&nbsp;") ."</TD><TD WIDTH=\"300\">&nbsp;</TD><TD>\n". ($rblocks ? $rblocks : "&nbsp;") ."</TD></TR>\n";
......@@ -81,14 +81,14 @@ function block_admin_overview() {
while ($block = db_fetch_object($result)) $blocks .= " <TR><TD NOWRAP>". ($block->status == 2 ? "<B>$block->name</B>" : $block->name) ."</TD><TD>$block->weight</TD></TR>\n";
$blocks .= "</TABLE>\n";
$output .= "<P><B>layout 2:</B></P>\n";
$output .= "<H3>layout scheme #2:</H3>\n";
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TD ALIGN=\"center\" COLSPAN=\"2\">header</TD></TR>\n";
$output .= " <TR><TD WIDTH=\"400\">&nbsp;</TD><TD>\n". ($blocks ? $blocks : "&nbsp;") ."</TD></TR>\n";
$output .= " <TR><TD ALIGN=\"center\" COLSPAN=\"2\">footer</TD></TR>\n";
$output .= "</TABLE>\n";
$output .= "<P><B>layout 3:</B></P>\n";
$output .= "<H3>layout scheme #3:</H3>\n";
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TD ALIGN=\"center\" COLSPAN=\"2\">header</TD></TR>\n";
$output .= " <TR><TD>\n". ($blocks ? $blocks : "&nbsp;") ."</TD><TD WIDTH=\"400\">&nbsp;</TD></TR>\n";
......@@ -101,14 +101,14 @@ function block_admin_overview() {
function block_admin() {
global $op, $edit;
print "<SMALL><A HREF=\"admin.php?mod=block\">configure</A> | <A HREF=\"admin.php?mod=block&op=overview\">overview</A> | <A HREF=\"admin.php?mod=block&op=help\">help</A></SMALL><HR>\n";
print "<SMALL><A HREF=\"admin.php?mod=block\">configure</A> | <A HREF=\"admin.php?mod=block&op=preview\">preview</A> | <A HREF=\"admin.php?mod=block&op=help\">help</A></SMALL><HR>\n";
switch ($op) {
case "help":
block_help();
break;
case "overview":
block_admin_overview();
case "preview":
block_admin_preview();
break;
case "Save blocks":
block_admin_save($edit);
......
......@@ -57,7 +57,7 @@ function block_admin_display() {
print $output;
}
function block_admin_overview() {
function block_admin_preview() {
$result = db_query("SELECT * FROM blocks WHERE status > 0 AND region = 0 ORDER BY weight");
$lblocks .= "<TABLE BORDER=\"0\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
......@@ -69,7 +69,7 @@ function block_admin_overview() {
while ($block = db_fetch_object($result)) $rblocks .= " <TR><TD NOWRAP>". ($block->status == 2 ? "<B>$block->name</B>" : $block->name) ."</TD><TD>$block->weight</TD></TR>\n";
$rblocks .= "</TABLE>\n";
$output .= "<P><B>layout 1:</B></P>\n";
$output .= "<H3>layout scheme #1:</H3>\n";
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TD ALIGN=\"center\" COLSPAN=\"3\">header</TD></TR>\n";
$output .= " <TR><TD>\n". ($lblocks ? $lblocks : "&nbsp;") ."</TD><TD WIDTH=\"300\">&nbsp;</TD><TD>\n". ($rblocks ? $rblocks : "&nbsp;") ."</TD></TR>\n";
......@@ -81,14 +81,14 @@ function block_admin_overview() {
while ($block = db_fetch_object($result)) $blocks .= " <TR><TD NOWRAP>". ($block->status == 2 ? "<B>$block->name</B>" : $block->name) ."</TD><TD>$block->weight</TD></TR>\n";
$blocks .= "</TABLE>\n";
$output .= "<P><B>layout 2:</B></P>\n";
$output .= "<H3>layout scheme #2:</H3>\n";
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TD ALIGN=\"center\" COLSPAN=\"2\">header</TD></TR>\n";
$output .= " <TR><TD WIDTH=\"400\">&nbsp;</TD><TD>\n". ($blocks ? $blocks : "&nbsp;") ."</TD></TR>\n";
$output .= " <TR><TD ALIGN=\"center\" COLSPAN=\"2\">footer</TD></TR>\n";
$output .= "</TABLE>\n";
$output .= "<P><B>layout 3:</B></P>\n";
$output .= "<H3>layout scheme #3:</H3>\n";
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
$output .= " <TR><TD ALIGN=\"center\" COLSPAN=\"2\">header</TD></TR>\n";
$output .= " <TR><TD>\n". ($blocks ? $blocks : "&nbsp;") ."</TD><TD WIDTH=\"400\">&nbsp;</TD></TR>\n";
......@@ -101,14 +101,14 @@ function block_admin_overview() {
function block_admin() {
global $op, $edit;
print "<SMALL><A HREF=\"admin.php?mod=block\">configure</A> | <A HREF=\"admin.php?mod=block&op=overview\">overview</A> | <A HREF=\"admin.php?mod=block&op=help\">help</A></SMALL><HR>\n";
print "<SMALL><A HREF=\"admin.php?mod=block\">configure</A> | <A HREF=\"admin.php?mod=block&op=preview\">preview</A> | <A HREF=\"admin.php?mod=block&op=help\">help</A></SMALL><HR>\n";
switch ($op) {
case "help":
block_help();
break;
case "overview":
block_admin_overview();
case "preview":
block_admin_preview();
break;
case "Save blocks":
block_admin_save($edit);
......
......@@ -22,9 +22,9 @@ function meta_form($type, $edit = array()) {
function meta_save($type, $edit = array()) {
$result = db_query("SELECT * FROM collection WHERE types LIKE '%". check_input($type) ."%'");
while ($collection = db_fetch_object($result)) {
$output .= ", ". $edit[$collection->name];
$array[] = $edit[$collection->name];
}
return $output;
return implode(", ", $array);
}
function meta_get_collection($cid) {
......@@ -90,7 +90,7 @@ function meta_save_tag($edit) {
}
}
function meta_verify() {
function meta_preview() {
foreach (module_list() as $name) {
if (module_hook($name, "status") && $name != "node") {
$output .= "<H3>". ucfirst($name) ." type</H3>";
......@@ -127,7 +127,7 @@ function meta_overview() {
function meta_admin() {
global $edit, $type, $op, $id;
print "<SMALL><A HREF=\"admin.php?mod=meta&type=collection&op=add\">add new collection</A> | <A HREF=\"admin.php?mod=meta&type=tag&op=add\">add new meta-tag</A> | <A HREF=\"admin.php?mod=meta&op=verify\">verify node forms</A> | <A HREF=\"admin.php?mod=meta\">overview</A> | <A HREF=\"admin.php?mod=meta&op=help\">help</A></SMALL><HR>\n";
print "<SMALL><A HREF=\"admin.php?mod=meta&type=collection&op=add\">add new collection</A> | <A HREF=\"admin.php?mod=meta&type=tag&op=add\">add new meta-tag</A> | <A HREF=\"admin.php?mod=meta&op=preview\">preview node forms</A> | <A HREF=\"admin.php?mod=meta\">overview</A> | <A HREF=\"admin.php?mod=meta&op=help\">help</A></SMALL><HR>\n";
switch ($op) {
case "add":
......@@ -145,8 +145,8 @@ function meta_admin() {
case "help":
print meta_help();
break;
case "verify":
print meta_verify();
case "preview":
print meta_preview();
break;
case "Delete":
$edit[name] = 0;
......
......@@ -68,7 +68,7 @@ function node_cron() {
function node_link($nid, $type) {
global $op;
$link[] = ($op == "view") ? "view node" : "<A HREF=\"node.php?id$nid\">view node</A>";
$link[] = ($op == "view") ? "view node" : "<A HREF=\"node.php?id=$nid\">view node</A>";
$link[] = ($op == "content") ? "edit content" : "<A HREF=\"admin.php?mod=node&type=$type&op=content&id=$nid\">edit content</A>";
$link[] = ($op == "option") ? "edit options" : "<A HREF=\"admin.php?mod=node&op=option&id=$nid\">edit options</A>";
$link[] = ($op == "status") ? "edit status" : "<A HREF=\"admin.php?mod=node&op=status&id=$nid\">edit status</A>";
......
......@@ -68,7 +68,7 @@ function node_cron() {
function node_link($nid, $type) {
global $op;
$link[] = ($op == "view") ? "view node" : "<A HREF=\"node.php?id$nid\">view node</A>";
$link[] = ($op == "view") ? "view node" : "<A HREF=\"node.php?id=$nid\">view node</A>";
$link[] = ($op == "content") ? "edit content" : "<A HREF=\"admin.php?mod=node&type=$type&op=content&id=$nid\">edit content</A>";
$link[] = ($op == "option") ? "edit options" : "<A HREF=\"admin.php?mod=node&op=option&id=$nid\">edit options</A>";
$link[] = ($op == "status") ? "edit status" : "<A HREF=\"admin.php?mod=node&op=status&id=$nid\">edit status</A>";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment