db_query("INSERT INTO book (nid, format, parent, weight) VALUES ('$node->nid', '$node->format', '$node->parent', '$node->weight')");
db_query("INSERT INTO book (nid, format, parent, weight, log) VALUES ('$node->nid', '$node->format', '$node->parent', '$node->weight', '$node->log')");
}
functionbook_update($node){
...
...
@@ -160,7 +160,7 @@ function book_update($node) {
$node->weight=0;
}
db_query("UPDATE book SET format = '$node->format', parent = '$node->parent', weight = '$node->weight' WHERE nid = '$node->nid'");
db_query("UPDATE book SET format = '$node->format', parent = '$node->parent', weight = '$node->weight', log = '$node->log' WHERE nid = '$node->nid'");
}
functionbook_delete(&$node){
...
...
@@ -184,7 +184,7 @@ function book_form(&$node, &$help, &$error) {
}
$output.=form_textarea(t("Body"),"body",$node->body,60,20,t("Allowed HTML tags").": ".htmlspecialchars(variable_get("allowed_html","")));
$output.=form_textarea(t("Log message"),"history",$node->history,60,5,t("An explanation of the additions or updates being made to help the group understand your motivations."));
$output.=form_textarea(t("Log message"),"log",$node->log,60,5,t("An explanation of the additions or updates being made to help the group understand your motivations."));
if(user_access("administer nodes")){
$output.=form_select(t("Weight"),"weight",$node->weight,array(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30),t("The heavier pages will sink and the lighter pages will be positioned nearer the top."));
...
...
@@ -397,6 +397,10 @@ function book_view($node, $main = 0) {
db_query("INSERT INTO book (nid, format, parent, weight) VALUES ('$node->nid', '$node->format', '$node->parent', '$node->weight')");
db_query("INSERT INTO book (nid, format, parent, weight, log) VALUES ('$node->nid', '$node->format', '$node->parent', '$node->weight', '$node->log')");
}
functionbook_update($node){
...
...
@@ -160,7 +160,7 @@ function book_update($node) {
$node->weight=0;
}
db_query("UPDATE book SET format = '$node->format', parent = '$node->parent', weight = '$node->weight' WHERE nid = '$node->nid'");
db_query("UPDATE book SET format = '$node->format', parent = '$node->parent', weight = '$node->weight', log = '$node->log' WHERE nid = '$node->nid'");
}
functionbook_delete(&$node){
...
...
@@ -184,7 +184,7 @@ function book_form(&$node, &$help, &$error) {
}
$output.=form_textarea(t("Body"),"body",$node->body,60,20,t("Allowed HTML tags").": ".htmlspecialchars(variable_get("allowed_html","")));
$output.=form_textarea(t("Log message"),"history",$node->history,60,5,t("An explanation of the additions or updates being made to help the group understand your motivations."));
$output.=form_textarea(t("Log message"),"log",$node->log,60,5,t("An explanation of the additions or updates being made to help the group understand your motivations."));
if(user_access("administer nodes")){
$output.=form_select(t("Weight"),"weight",$node->weight,array(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30),t("The heavier pages will sink and the lighter pages will be positioned nearer the top."));
...
...
@@ -397,6 +397,10 @@ function book_view($node, $main = 0) {
$result=db_query("SELECT n.nid, type, count(*) AS c FROM node n LEFT JOIN term_node r ON n.nid = r.nid WHERE tid IN (".implode(",",$terms).") AND ".($id?"nid = '$id'":"promote = '1'")." AND status = '1' GROUP BY n.nid HAVING c = ".count($terms)." ORDER BY static DESC, created DESC LIMIT ".($user->nodes?$user->nodes:variable_get("default_nodes_main",10)));
}else{
$result=db_query("SELECT nid, type FROM node WHERE ".($id?"nid = '$id'":"promote = '1'")." AND status = '1' ORDER BY static DESC, created DESC LIMIT ".($user->nodes?$user->nodes:variable_get("default_nodes_main",10)));
$result=db_query("SELECT nid, type FROM node WHERE ".($id?"nid = '$id'":"promote = '1'")." AND status = '1' ORDER BY static DESC, changed DESC LIMIT ".($user->nodes?$user->nodes:variable_get("default_nodes_main",10)));
$result=db_query("SELECT n.nid, type, count(*) AS c FROM node n LEFT JOIN term_node r ON n.nid = r.nid WHERE tid IN (".implode(",",$terms).") AND ".($id?"nid = '$id'":"promote = '1'")." AND status = '1' GROUP BY n.nid HAVING c = ".count($terms)." ORDER BY static DESC, created DESC LIMIT ".($user->nodes?$user->nodes:variable_get("default_nodes_main",10)));
}else{
$result=db_query("SELECT nid, type FROM node WHERE ".($id?"nid = '$id'":"promote = '1'")." AND status = '1' ORDER BY static DESC, created DESC LIMIT ".($user->nodes?$user->nodes:variable_get("default_nodes_main",10)));
$result=db_query("SELECT nid, type FROM node WHERE ".($id?"nid = '$id'":"promote = '1'")." AND status = '1' ORDER BY static DESC, changed DESC LIMIT ".($user->nodes?$user->nodes:variable_get("default_nodes_main",10)));