Support for NOODP flag, sitewide and per-page.
authorrich <rich>
Mon, 14 Aug 2006 11:36:50 +0000 (11:36 +0000)
committerrich <rich>
Mon, 14 Aug 2006 11:36:50 +0000 (11:36 +0000)
80 files changed:
schema/cocanwiki.sql
scripts/edit.ml
scripts/edit_host_settings.ml
scripts/edit_host_settings_form.ml
scripts/edit_page_css.ml
scripts/host_menu.ml
scripts/lib/cocanwiki_create_host.ml
scripts/lib/cocanwiki_diff.ml
scripts/lib/cocanwiki_pages.ml
scripts/lib/cocanwiki_pages.mli
scripts/lib/cocanwiki_template.ml
scripts/page.ml
scripts/rename_page.ml
scripts/restore.ml
templates/00-TEMPLATE.html
templates/broken_links.html
templates/change_password_form.html
templates/contact_show.html
templates/contacts.html
templates/crash.html
templates/create_contact_form.html
templates/create_macro_form.html
templates/create_user_form.html
templates/dead_ends.html
templates/delete_contact_form.html
templates/delete_file_form.html
templates/delete_image_form.html
templates/delete_macro_form.html
templates/delete_user_form.html
templates/diff.html
templates/edit.html
templates/edit_conflict.html
templates/edit_contact_form.html
templates/edit_file_form.html
templates/edit_host_css_form.html
templates/edit_host_settings_form.html
templates/edit_image_form.html
templates/edit_macro_form.html
templates/edit_macros.html
templates/edit_page_css_form.html
templates/edit_sitemenu.html
templates/edit_user_form.html
templates/files.html
templates/forgot_password_form.html
templates/history.html
templates/host_menu.html
templates/images.html
templates/invite_user_confirm_form.html
templates/invite_user_form.html
templates/largest_pages.html
templates/login_form.html
templates/mail_import_form.html
templates/mailing_list_form.html
templates/mailing_list_view.html
templates/new_page_form.html
templates/ok_error.html
templates/orphans.html
templates/page_404_header.html
templates/page_email_form.html
templates/page_header.html
templates/recent.html
templates/recently_visited.html
templates/rename_page_form.html
templates/restore_form.html
templates/search.html
templates/send_feedback_form.html
templates/set_password_form.html
templates/sitemap.html
templates/stats.html
templates/stats_top.html
templates/tarpit_form.html
templates/undelete_file_form.html
templates/undelete_image_form.html
templates/upload_file_form.html
templates/upload_image_form.html
templates/user_prefs_form.html
templates/users.html
templates/visualise_links.html
templates/what_links_here.html
tools/copy_page.ml

index 17a00df..1254c38 100644 (file)
@@ -1078,7 +1078,8 @@ CREATE TABLE pages (
     css text,
     logged_user integer,
     title_description_fti tsvector NOT NULL,
-    keywords text
+    keywords text,
+    noodp boolean
 );
 
 
@@ -1159,7 +1160,8 @@ CREATE TABLE hosts (
     brand_tagline text,
     brand_description text,
     pagebug text,
-    ie_imagetoolbar_no boolean DEFAULT false NOT NULL
+    ie_imagetoolbar_no boolean DEFAULT false NOT NULL,
+    global_noodp boolean DEFAULT false NOT NULL
 );
 
 
index f28ba2d..00ebc93 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: edit.ml,v 1.35 2006/08/04 12:45:31 rich Exp $
+ * $Id: edit.ml,v 1.36 2006/08/14 11:36:50 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -58,6 +58,11 @@ let run r (q : cgi) dbh hostid {hostname = hostname} user =
     let keywords = q#param "keywords" in
     let keywords =
       if string_is_whitespace keywords then None else Some keywords in
+    let noodp = match q#param "noodp" with
+      | "" -> None
+      | "t" -> Some true
+      | "f" -> Some false
+      | _ -> failwith "unknown value for noodp parameter" in
     let redirect = q#param "redirect" in
     let redirect =
       if string_is_whitespace redirect then None else Some redirect in
@@ -87,6 +92,7 @@ let run r (q : cgi) dbh hostid {hostname = hostname} user =
       pt = pt;
       description = description;
       keywords = keywords;
+      noodp = noodp;
       redirect = redirect;
       contents_ = contents; }
   in
@@ -227,6 +233,14 @@ let run r (q : cgi) dbh hostid {hostname = hostname} user =
     template#set "keywords"
       (match model.keywords with None -> "" | Some keywords -> keywords);
 
+    template#conditional "noodp_null" false;
+    template#conditional "noodp_true" false;
+    template#conditional "noodp_false" false;
+    (match model.noodp with
+     | None -> template#conditional "noodp_null" true
+     | Some true -> template#conditional "noodp_true" true
+     | Some false -> template#conditional "noodp_false" true);
+
     (match model.pt with
         Page page ->
           template#set "pt_type" "page";
index 34d1eeb..ce56463 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_host_settings.ml,v 1.12 2006/08/14 10:04:25 rich Exp $
+ * $Id: edit_host_settings.ml,v 1.13 2006/08/14 11:36:50 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -42,6 +42,7 @@ let run r (q : cgi) dbh hostid { hostname = hostname } _ =
   let mailing_list = q#param_true "mailing_list" in
   let search_box = q#param_true "search_box" in
   let ie_imagetoolbar_no = q#param_true "ie_imagetoolbar_no" in
+  let global_noodp = q#param_true "global_noodp" in
   let navigation = q#param_true "navigation" in
   let view_anon = q#param_true "view_anon" in
   let brand = trim (q#param "brand") in
@@ -71,7 +72,8 @@ let run r (q : cgi) dbh hostid { hostname = hostname } _ =
        view_anon = $view_anon,
        brand = $?brand, brand_tagline = $?brand_tagline,
        brand_description = $?brand_description,
-       pagebug = $?pagebug, ie_imagetoolbar_no = $ie_imagetoolbar_no
+       pagebug = $?pagebug, ie_imagetoolbar_no = $ie_imagetoolbar_no,
+       global_noodp = $global_noodp
      where id = $hostid";
 
   PGOCaml.commit dbh;
index bd4bbb4..1cf7451 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_host_settings_form.ml,v 1.8 2006/08/14 10:04:25 rich Exp $
+ * $Id: edit_host_settings_form.ml,v 1.9 2006/08/14 11:36:50 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -44,16 +44,19 @@ let run r (q : cgi) dbh hostid _ _ =
     PGSQL(dbh)
       "select canonical_hostname, edit_anon, create_account_anon, theme_css,
               feedback_email, mailing_list, search_box, navigation, view_anon,
-              brand, brand_tagline, brand_description, ie_imagetoolbar_no
+              brand, brand_tagline, brand_description, ie_imagetoolbar_no,
+              global_noodp
          from hosts where id = $hostid" in
 
   let canonical_hostname, edit_anon, create_account_anon, theme_css,
       feedback_email, mailing_list, search_box, navigation, view_anon,
-      brand, brand_tagline, brand_description, ie_imagetoolbar_no =
+      brand, brand_tagline, brand_description, ie_imagetoolbar_no,
+      global_noodp =
     match rows with
     | [canonical_hostname, edit_anon, create_account_anon, theme_css,
        feedback_email, mailing_list, search_box, navigation, view_anon,
-       brand, brand_tagline, brand_description, ie_imagetoolbar_no] ->
+       brand, brand_tagline, brand_description, ie_imagetoolbar_no,
+       global_noodp ] ->
        let theme_css =
          match theme_css with Some s -> s | None -> "" in
        let feedback_email =
@@ -66,7 +69,8 @@ let run r (q : cgi) dbh hostid _ _ =
          match brand_description with Some s -> s | None -> "" in
        canonical_hostname, edit_anon, create_account_anon, theme_css,
        feedback_email, mailing_list, search_box, navigation, view_anon,
-       brand, brand_tagline, brand_description, ie_imagetoolbar_no
+       brand, brand_tagline, brand_description, ie_imagetoolbar_no,
+       global_noodp
     | _ -> assert false in
 
   template#set "canonical_hostname" canonical_hostname;
@@ -76,6 +80,7 @@ let run r (q : cgi) dbh hostid _ _ =
   template#conditional "mailing_list" mailing_list;
   template#conditional "search_box" search_box;
   template#conditional "ie_imagetoolbar_no" ie_imagetoolbar_no;
+  template#conditional "global_noodp" global_noodp;
   template#conditional "navigation" navigation;
   template#conditional "view_anon" view_anon;
   template#set "brand" brand;
index a79b65f..8b18b9b 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: edit_page_css.ml,v 1.22 2006/08/04 12:45:31 rich Exp $
+ * $Id: edit_page_css.ml,v 1.23 2006/08/14 11:36:50 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -50,11 +50,11 @@ let run r (q : cgi) dbh hostid {hostname = hostname} user =
    * us to revert changes to the CSS easily.
    *)
   let rows = PGSQL(dbh)
-    "select id, title, description, keywords, creation_date, redirect
+    "select id, title, description, keywords, noodp, creation_date, redirect
        from pages
       where hostid = $hostid and url = $page" in
 
-  let oldpageid, title, description, keywords, creation_date, redirect =
+  let oldpageid, title, description, keywords, noodp, creation_date, redirect =
     match rows with
     | [row] -> row
     | _ -> assert false in
@@ -68,10 +68,11 @@ let run r (q : cgi) dbh hostid {hostname = hostname} user =
                where hostid = $hostid and id = $oldpageid";
 
   PGSQL(dbh) "insert into pages (hostid, url, title,
-                                 description, keywords,
+                                 description, keywords, noodp,
                                  creation_date, logged_ip,
                                  logged_user, redirect, css)
               values ($hostid, $page, $title, $description, $?keywords,
+                      $?noodp,
                       $creation_date, $?logged_ip, $?logged_user,
                       $?redirect, $?css)";
 
index 59909eb..736b4cd 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: host_menu.ml,v 1.11 2006/08/14 10:04:25 rich Exp $
+ * $Id: host_menu.ml,v 1.12 2006/08/14 11:36:50 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ let run r (q : cgi) dbh hostid host user =
                 h.search_box, h.navigation, h.view_anon,
                 h.brand, coalesce (h.brand_tagline, ''),
                 coalesce (h.brand_description, ''),
-                h.ie_imagetoolbar_no
+                h.ie_imagetoolbar_no, h.global_noodp
            from hosts h left outer join themes t on h.theme_css = t.theme_css
           where h.id = $hostid" in
 
@@ -60,14 +60,15 @@ let run r (q : cgi) dbh hostid host user =
       has_theme_css, theme_name, theme_description, has_feedback_email,
       feedback_email, mailing_list, search_box, navigation, view_anon,
       has_brand, brand, brand_tagline, brand_description,
-      ie_imagetoolbar_no =
+      ie_imagetoolbar_no, global_noodp =
       match rows with
        [ Some canonical_hostname, Some has_global_css,
          Some edit_anon, Some create_account_anon, Some has_theme_css,
          theme_name, theme_description,
          feedback_email,
          Some mailing_list, Some search_box, Some navigation, Some view_anon,
-         brand, brand_tagline, brand_description, Some ie_imagetoolbar_no ] ->
+         brand, brand_tagline, brand_description, Some ie_imagetoolbar_no,
+         Some global_noodp ] ->
          let theme_name =
            match theme_name with Some s -> s | None -> "" in
          let theme_description =
@@ -88,7 +89,7 @@ let run r (q : cgi) dbh hostid host user =
          has_theme_css, theme_name, theme_description, has_feedback_email,
          feedback_email, mailing_list, search_box, navigation, view_anon,
          has_brand, brand, brand_tagline, brand_description,
-         ie_imagetoolbar_no
+         ie_imagetoolbar_no, global_noodp
       | _ -> assert false in
 
     template#set "canonical_hostname" canonical_hostname;
@@ -103,6 +104,7 @@ let run r (q : cgi) dbh hostid host user =
     template#conditional "mailing_list" mailing_list;
     template#conditional "search_box" search_box;
     template#conditional "ie_imagetoolbar_no" ie_imagetoolbar_no;
+    template#conditional "global_noodp" global_noodp;
     template#conditional "navigation" navigation;
     template#conditional "view_anon" view_anon;
     template#conditional "has_brand" has_brand;
index e898811..28a26f7 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: cocanwiki_create_host.ml,v 1.5 2006/08/04 12:45:33 rich Exp $
+ * $Id: cocanwiki_create_host.ml,v 1.6 2006/08/14 11:36:50 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -74,8 +74,9 @@ let create_host dbh canonical_hostname hostnames template
     (* Copy pages. *)
     PGSQL(dbh)
       "insert into pages (hostid, url, title, description, keywords,
-                          redirect, css)
-       select $hostid, url, title, description, keywords, redirect, css
+                          redirect, css, noodp)
+       select $hostid, url, title, description, keywords, redirect, css,
+              noodp
          from pages
         where hostid = $template and url is not null";
 
index e44e8ae..3f4fdfa 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: cocanwiki_diff.ml,v 1.7 2006/08/04 12:45:33 rich Exp $
+ * $Id: cocanwiki_diff.ml,v 1.8 2006/08/14 11:36:50 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -41,6 +41,10 @@ let page_for_diff model css =
   (match model.redirect with
    | None -> ""
    | Some redirect -> "Redirect: " ^ redirect ^ "\n\n") ^
+  "ROBOTS NOODP: " ^
+  (match model.noodp with
+   | None -> "inherit sitewide default"
+   | Some noodp -> string_of_bool noodp) ^ "\n\n" ^
   (String.concat ""
      (List.map (
        fun (sectionname, divname, jsgo, content) ->
@@ -106,9 +110,9 @@ let diff_cmd old_page new_page =
 let get_version_for_diff dbh version =
   if version = 0l then ""
   else (
-    let title, description, keywords, redirect, css = List.hd (
+    let title, description, keywords, noodp, redirect, css = List.hd (
       PGSQL(dbh)
-       "select title, description, keywords, redirect, css from pages
+       "select title, description, keywords, noodp, redirect, css from pages
           where id = $version"
     ) in
 
@@ -121,6 +125,7 @@ let get_version_for_diff dbh version =
                  pt = Title title;
                  description = description;
                  keywords = keywords;
+                 noodp = noodp;
                  redirect = redirect;
                  contents_ = contents_ } in
 
index d0d3285..d616cb7 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: cocanwiki_pages.ml,v 1.9 2006/08/04 12:45:33 rich Exp $
+ * $Id: cocanwiki_pages.ml,v 1.10 2006/08/14 11:36:50 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -35,6 +35,7 @@ type model = {
   pt : pt;                             (* Page of title (only used if id=0) *)
   description : string;                        (* Description. *)
   keywords : string option;            (* Keywords. *)
+  noodp : bool option;                 (* NOODP per-page override. *)
   redirect : string option;            (* Redirect to. *)
   (* NB. Don't call this 'contents' because that clashes with the
    * Pervasives.contents fields of the ref type.
@@ -55,6 +56,7 @@ let new_page pt =
                pt = pt;
                description = description;
                keywords = None;
+               noodp = None;
                redirect = None;
                contents_ = [] } in
   model
@@ -66,6 +68,7 @@ let new_page_with_title title =
                pt = Title title;
                description = title;
                keywords = None;
+               noodp = None;
                redirect = None;
                contents_ = contents } in
   model
@@ -75,16 +78,16 @@ let load_page dbh hostid ~url ?version () =
   let rows =
     match version with
     | None ->
-       PGSQL(dbh) "select id, title, description, keywords, redirect
+       PGSQL(dbh) "select id, title, description, keywords, noodp, redirect
                       from pages
                      where hostid = $hostid and url = $url"
     | Some version ->
-       PGSQL(dbh) "select id, title, description, keywords, redirect
+       PGSQL(dbh) "select id, title, description, keywords, noodp, redirect
                       from pages
                      where hostid = $hostid and id = $version and
                            (url = $url or url_deleted = $url)" in
 
-  let pageid, title, description, keywords, redirect =
+  let pageid, title, description, keywords, noodp, redirect =
     match rows with
     | [row] -> row
     | _ -> raise Not_found in
@@ -100,6 +103,7 @@ let load_page dbh hostid ~url ?version () =
                pt = Page url;
                description = description;
                keywords = keywords;
+               noodp = noodp;
                redirect = redirect;
                contents_ = contents } in
   model
@@ -135,12 +139,14 @@ let save_page r dbh hostid ?user model =
 
       let description = model.description in
       let keywords = model.keywords in
+      let noodp = model.noodp in
       let redirect = model.redirect in
       PGSQL(dbh) "insert into pages (hostid, url, title,
-                                     description, keywords,
+                                     description, keywords, noodp,
                                      logged_ip, logged_user,
                                      redirect)
                   values ($hostid, $url, $title, $description, $?keywords,
+                          $?noodp,
                           $?logged_ip, $?logged_user, $?redirect)";
 
       let pageid = PGOCaml.serial4 dbh "pages_id_seq" in
@@ -215,13 +221,14 @@ let save_page r dbh hostid ?user model =
 
       let description = model.description in
       let keywords = model.keywords in
+      let noodp = model.noodp in
       let redirect = model.redirect in
       PGSQL(dbh)
        "insert into pages (hostid, url, title,
-                            description, keywords,
+                            description, keywords, noodp,
                             creation_date, logged_ip,
                             logged_user, redirect, css)
-         values ($hostid, $url, $title, $description, $?keywords,
+         values ($hostid, $url, $title, $description, $?keywords, $?noodp,
                  $creation_date,
                  $?logged_ip, $?logged_user, $?redirect, $?css)";
 
index 41151bb..9770874 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: cocanwiki_pages.mli,v 1.6 2006/08/04 12:45:33 rich Exp $
+ * $Id: cocanwiki_pages.mli,v 1.7 2006/08/14 11:36:50 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -33,6 +33,7 @@ type model = {
   pt : pt;                             (* Page of title (only used if id=0) *)
   description : string;                        (* Description. *)
   keywords : string option;            (* Keywords. *)
+  noodp : bool option;                 (* NOODP per-page override. *)
   redirect : string option;            (* Redirect to. *)
   contents_ : section list;            (* List of sections. *)
 }
index 266c92e..9442f7d 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: cocanwiki_template.ml,v 1.9 2006/08/14 10:04:25 rich Exp $
+ * $Id: cocanwiki_template.ml,v 1.10 2006/08/14 11:36:50 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -87,12 +87,13 @@ let get_template ?page dbh hostid filename =
        "select h.theme_css, h.css is not null,
                 p.name, p.url, h.search_box,
                 h.brand, h.brand_tagline, h.brand_description,
-                h.pagebug, h.ie_imagetoolbar_no
+                h.pagebug, h.ie_imagetoolbar_no, h.global_noodp
            from hosts h left outer join powered_by p on h.powered_by = p.id
           where h.id = $hostid" in
 
     let theme_css, has_host_css, powered_by_name, powered_by_url, search_box,
-      brand, brand_tagline, brand_description, pagebug, ie_imagetoolbar_no =
+      brand, brand_tagline, brand_description, pagebug, ie_imagetoolbar_no,
+      global_noodp =
       match rows with
       | [ row ] -> row
       | _ -> assert false in
@@ -145,6 +146,9 @@ let get_template ?page dbh hostid filename =
     let ie_imagetoolbar_no =
       match ie_imagetoolbar_no with Some b -> b | _ -> assert false in
 
+    let global_noodp =
+      match global_noodp with Some b -> b | _ -> assert false in
+
     template#set "theme_css" theme_css;
     template#conditional "has_host_css" has_host_css;
     template#set "powered_by_name" powered_by_name;
@@ -159,6 +163,7 @@ let get_template ?page dbh hostid filename =
     template#conditional "has_pagebug" has_pagebug;
     template#set "pagebug" pagebug;
     template#conditional "ie_imagetoolbar_no" ie_imagetoolbar_no;
+    template#conditional "noodp" global_noodp;
 
     (* Site menu. *)
     let rows = PGSQL(dbh)
@@ -204,6 +209,7 @@ let get_template ?page dbh hostid filename =
     template#conditional "has_pagebug" false;
     template#set "pagebug" "";
     template#conditional "ie_imagetoolbar_no" false;
+    template#conditional "noodp" false;
     template#conditional "is_homepage" false;
     template#table "sitemenu" [];
   );
index 9521fe0..adba28f 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: page.ml,v 1.52 2006/08/04 12:45:31 rich Exp $
+ * $Id: page.ml,v 1.53 2006/08/14 11:36:50 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -38,6 +38,7 @@ open Cocanwiki_strings
 
 type fp_status =
   | FPOK of int32 * string * string * string option * Calendar.t * bool
+      * bool option
   | FPInternalRedirect of string
   | FPExternalRedirect of string
   | FPNotFound
@@ -185,7 +186,7 @@ let run r (q : cgi) dbh hostid
 
   (* This code generates ordinary pages. *)
   let make_page title description keywords
-      pageid last_modified_date has_page_css
+      pageid last_modified_date has_page_css noodp
       version page page' extension =
     let t = template_page in
     let th = template_page_header in
@@ -218,6 +219,14 @@ let run r (q : cgi) dbh hostid
 
     th#conditional "has_page_css" has_page_css;
 
+    (* If the per-page noodp is not null, set the noodp flag here.  Otherwise
+     * we will use the default (from hosts.global_noodp) which was set
+     * in Cocanwiki_template.
+     *)
+    (match noodp with
+     | None -> ()
+     | Some b -> th#conditional "noodp" b);
+
     (* Are we showing an old version of the page?  If so, warn. *)
     (match version with
         None ->
@@ -561,49 +570,49 @@ let run r (q : cgi) dbh hostid
          if allow_redirect then (
            let rows = PGSQL(dbh)
              "select url, redirect, id, title, description, keywords,
-                      last_modified_date, css is not null
+                      last_modified_date, css is not null, noodp
                  from pages
                 where hostid = $hostid and lower (url) = lower ($page)" in
            match rows with
-           | [Some page', _, _, _, _, _, _, _]
+           | [Some page', _, _, _, _, _, _, _, _]
                when page <> page' -> (* different case *)
                FPExternalRedirect page'
            | [ _, None, id, title, description, keywords,
-               last_modified_date, has_page_css ] ->
+               last_modified_date, has_page_css, noodp ] ->
                let has_page_css = Option.get has_page_css in
                FPOK (id, title, description, keywords, last_modified_date,
-                     has_page_css)
-           | [_, Some redirect, _, _, _, _, _, _] ->
+                     has_page_css, noodp)
+           | [_, Some redirect, _, _, _, _, _, _, _] ->
                FPInternalRedirect redirect
            | [] -> FPNotFound
            | _ -> assert false
          ) else (* redirects not allowed ... *) (
            let rows = PGSQL(dbh)
              "select id, title, description, keywords, last_modified_date,
-                      css is not null
+                      css is not null, noodp
                  from pages where hostid = $hostid and url = $page" in
            match rows with
            | [ id, title, description, keywords,
-               last_modified_date, has_page_css ] ->
+               last_modified_date, has_page_css, noodp ] ->
                let has_page_css = Option.get has_page_css in
                FPOK (id, title, description, keywords, last_modified_date,
-                     has_page_css)
+                     has_page_css, noodp)
            | [] -> FPNotFound
            | _ -> assert false
          )
       | Some version ->
          let rows = PGSQL(dbh)
            "select id, title, description, keywords, last_modified_date,
-                    css is not null
+                    css is not null, noodp
                from pages
               where hostid = $hostid and id = $version and
                     (url = $page or url_deleted = $page)" in
          match rows with
          | [ id, title, description, keywords,
-             last_modified_date, has_page_css ] ->
+             last_modified_date, has_page_css, noodp ] ->
              let has_page_css = Option.get has_page_css in
              FPOK (id, title, description, keywords, last_modified_date,
-                   has_page_css)
+                   has_page_css, noodp)
          | [] -> FPNotFound
          | _ -> assert false
   in
@@ -627,11 +636,11 @@ let run r (q : cgi) dbh hostid
     ) else
       match fetch_page page' version allow_redirect with
        | FPOK (pageid, title, description, keywords,
-               last_modified_date, has_page_css)->
+               last_modified_date, has_page_css, noodp)->
            (* Check if the page is also a template. *)
            let extension = get_extension page' in
            make_page title (Some description) keywords (Some pageid)
-             (printable_date last_modified_date) has_page_css
+             (printable_date last_modified_date) has_page_css noodp
              version page page' extension
        | FPInternalRedirect page' ->
            loop page' (i+1)
@@ -647,7 +656,7 @@ let run r (q : cgi) dbh hostid
               | (Some _) as extension ->
                   let title = page' in
                   make_page title None None None
-                    "Now" false None page page'
+                    "Now" false None None page page'
                     extension
               | None ->
                   make_404 ())
index b7ad181..d27e951 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: rename_page.ml,v 1.8 2006/08/04 12:45:31 rich Exp $
+ * $Id: rename_page.ml,v 1.9 2006/08/14 11:36:50 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -81,6 +81,7 @@ let run r (q : cgi) dbh hostid {hostname = hostname} user =
     let new_model = { new_model with
                        description = old_model.description;
                        keywords = old_model.keywords;
+                       noodp = old_model.noodp;
                        contents_ = old_model.contents_ } in
     let old_model = { old_model with redirect = Some new_page } in
     ignore (save_page r dbh hostid ~user old_model);
index 01e505f..af88891 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: restore.ml,v 1.24 2006/08/04 12:45:31 rich Exp $
+ * $Id: restore.ml,v 1.25 2006/08/14 11:36:50 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -46,13 +46,13 @@ let run r (q : cgi) dbh hostid {hostname = hostname} user =
 
     (* Copy the old version of the page to be live. *)
     let rows = PGSQL(dbh)
-      "select title, description, keywords, creation_date,
+      "select title, description, keywords, noodp, creation_date,
               redirect, css
          from pages
         where hostid = $hostid
           and url_deleted = $page and id = $version" in
 
-    let title, description, keywords, creation_date, redirect, css =
+    let title, description, keywords, noodp, creation_date, redirect, css =
       match rows with
       | [row] -> row
       | _ -> assert false in
@@ -64,10 +64,11 @@ let run r (q : cgi) dbh hostid {hostname = hostname} user =
     PGSQL(dbh) "update pages set url_deleted = url, url = null
                  where hostid = $hostid and url = $page";
     PGSQL(dbh) "insert into pages (hostid, url, title,
-                                   description, keywords,
+                                   description, keywords, noodp,
                                    creation_date, logged_ip,
                                    logged_user, redirect, css)
                 values ($hostid, $page, $title, $description, $?keywords,
+                        $?noodp,
                         $creation_date,
                         $?logged_ip, $?logged_user, $?redirect, $?css)";
 
index 30f5cc8..15499a9 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>XXX TITLE XXX</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 8b3f6ac..b750572 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Broken links</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 <link rel="stylesheet" href="/_css/broken_links.css" type="text/css" title="Standard"/>
index 5235b98..b5a8c98 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Change your password</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 507f255..0d3778f 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Contact form: ::name_html::</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index ad24695..c30c9ef 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Contact forms</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index e322086..365ea65 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Bug!</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 9dd7474..4fe82e2 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Create a contact form</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 0af167e..bf73d35 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Create a macro</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 97e93dd..2aa0995 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Create a user account</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 4d31eab..e95a083 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Dead end pages</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 9177530..026fe12 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Delete contact forms</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index fb62e7b..b631194 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>Delete file</title>
 <meta name="robots" content="noindex,nofollow"/>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index f136650..0d90ddb 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>Delete image</title>
 <meta name="robots" content="noindex,nofollow"/>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index bd571cb..ba788b7 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Delete macro</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 828ca50..a9342a3 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Delete user: ::username_html::</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 16171a5..adb6f57 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Diff</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index e033ab7..edbda5d 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>::title_html:: [edit]</title>
 <meta name="robots" content="noindex,nofollow"/>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="/_css/standard.css" type="text/css" title="Standard"/>
 <link rel="stylesheet" href="/_css/editor.css" type="text/css" title="Standard"/>
 <script src="/_js/editor.js" type="text/javascript"></script>
@@ -44,6 +44,19 @@ Redirect to:<br/>
 </select>
 </td>
 </tr>
+
+<tr>
+<th> ROBOTS NOODP:<br/>
+<small>(See
+<a href="http://sitemaps.blogspot.com/2006/07/more-control-over-page-snippets.html">Google sitemaps on page snippets</a>)</small>
+</th>
+<td>
+<input type="radio" name="noodp" value="" id="noodp_null" ::if(noodp_null)::checked="checked"::end::/> <label for="noodp_null">Inherit default from Sitewide Settings</label> <br/>
+<input type="radio" name="noodp" value="t" id="noodp_true" ::if(noodp_true)::checked="checked"::end::/> <label for="noodp_true">Set ROBOTS NOODP header</label> <br/>
+<input type="radio" name="noodp" value="f" id="noodp_false" ::if(noodp_false)::checked="checked"::end::/> <label for="noodp_false">No ROBOTS NOODP header</label>
+</td>
+</tr>
+
 </table>
 
 ::if(has_errors)::
index 8cc3073..578ba9a 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Edit conflict</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="/_css/standard.css" type="text/css" title="Standard"/>
 <link rel="stylesheet" href="/_css/editor.css" type="text/css" title="Standard"/>
 <script src="/_js/editor.js" type="text/javascript"></script>
index 473ddea..8776eca 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Edit contact: ::name_html::</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index ba37e27..ebc8c0c 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Edit description fields</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index ac8526b..c860a75 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Edit global stylesheet</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 567512f..6690d38 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Edit global settings</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
 </td>
 </tr>
 <tr>
+<th> Global NOODP: </th>
+<td>
+<input type="checkbox" name="global_noodp" value="1" ::if(global_noodp)::checked="checked"::end:: id="global_noodp"/><label for="global_noodp">Send ROBOTS NOODP header on all pages by default (may be overridden per-page)</label> <br/> <a href="http://sitemaps.blogspot.com/2006/07/more-control-over-page-snippets.html">Google sitemaps on page snippets</a>
+</td>
+</tr>
+<tr>
 <th> Theme: </th>
 <td>
 <select name="theme_css">
index c7df86c..a42df52 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Edit description fields</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 1b35f86..8340790 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Edit macro: ::name_html::</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index b9e1cd5..276aefa 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Macros</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 166440a..3e84d0c 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Edit stylesheet for this page</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 1dcad93..ac7c2b3 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>Edit site menu</title>
 <meta name="robots" content="noindex,nofollow"/>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 <link rel="stylesheet" href="/_css/editor.css" type="text/css" title="Standard"/>
index 4156150..f9e7397 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>User: ::name_html::</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 2d2872f..4c30ab3 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta name="robots" content="noindex,nofollow"/>
 <title>Files</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 <link rel="stylesheet" href="/_css/files.css" type="text/css" title="Standard"/>
index 57654cd..0e29fdc 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>Forgotten your password?</title>
 <meta name="description" content="Log in to this site for extra features." />
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 ::if(has_host_css)::<link rel="stylesheet" href="/_global.css" type="text/css" title="Standard"/>::end::
index b99e91e..b432f63 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>Versions of this page</title>
 <meta name="robots" content="noindex,nofollow"/>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 249ba89..cdba835 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Sitewide settings</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
 <td> ::if(ie_imagetoolbar_no)::Yes::else::No::end:: </td>
 </tr>
 <tr>
+<th> Global NOODP: </th>
+<td> ::if(global_noodp)::Yes::else::No::end:: </td>
+</tr>
+<tr>
 <th> Theme: </th>
 <td> ::if(has_theme_css)::<strong>::theme_name_html::</strong> <br/> ::theme_description_html:: ::else:: Standard wiki theme ::end:: </td>
 </tr>
index eab7f42..cf1359f 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>Images</title>
 <meta name="robots" content="noindex,nofollow"/>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 <link rel="stylesheet" href="/_css/images.css" type="text/css" title="Standard"/>
index 9f3028b..e4a561d 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Invitation to join</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index e7b7f57..f76eac5 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Invite someone to join</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 8649b83..c082464 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Largest pages</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 602cc5e..6ba4959 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>Create an account or log in</title>
 <meta name="description" content="Log in to this site for extra features." />
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 ::if(has_host_css)::<link rel="stylesheet" href="/_global.css" type="text/css" title="Standard"/>::end::
index 291f783..db425b3 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Import mail</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index db5b792..ce37803 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Join our mailing list</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 30af70e..e97f1b3 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>View or download mailing list</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 738e852..6337395 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>New page</title>
 <meta name="robots" content="noindex,nofollow"/>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="stylesheet" href="/_css/new_page.css" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
index 4bcc194..51029a3 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 ::if(has_title)::<title>::title_html::</title>::end::
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="/_css/standard.css" type="text/css" title="Standard"/>
 </head>
 <body>
index b4c0a3e..bb3ba27 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Orphan pages</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 04e276b..4c3c569 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>Page not found</title>
 <meta name="robots" content="noindex,nofollow"/>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="stylesheet" href="/_css/search.css" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
index 34ff159..f1579a9 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Send an email when the page is updated</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 ::if(has_host_css)::<link rel="stylesheet" href="/_global.css" type="text/css" title="Standard"/>::end::
index a11a3c2..6d7e209 100644 (file)
@@ -2,10 +2,11 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>::title_html::</title>::if(is_old_version)::
-<meta name="robots" content="noindex,nofollow" />::end::::if(has_description)::
+<meta name="robots" content="noindex,nofollow" />::end::::if(noodp)::
+<meta name="robots" content="noodp" />::end::::if(has_description)::
 <meta name="description" content="::description_html_tag::" />::end::::if(has_keywords)::
 <meta name="keywords" content="::keywords_html_tag::" />::end::
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>::if(has_host_css)::
 <link rel="stylesheet" href="/_global.css" type="text/css" title="Standard"/>::end::::if(has_page_css)::
index 96dead5..02bcf45 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>Recent changes</title>
 <meta name="robots" content="noindex,nofollow"/>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 7ff6c3b..6f64a1d 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Recently visited pages</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 6148556..bb4500e 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Rename page</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index e1c4189..c9b6071 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Restore page</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 3276ca2..ca8f0b2 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Search this site</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="stylesheet" href="/_css/search.css" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
index fbd234f..59b81d6 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Send feedback about this page</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 ::if(has_host_css)::<link rel="stylesheet" href="/_global.css" type="text/css" title="Standard"/>::end::
index 32dab25..95e384f 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Set password for this user</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index a13d1b0..5bf3187 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Sitemap</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="stylesheet" href="/_css/sitemap.css" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
index 82af830..7e6f588 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>Page stats</title>
 <meta name="robots" content="noindex,nofollow"/>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head>
index bafe9da..de420fd 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>Stats navigation frame</title>
 <meta name="robots" content="noindex,nofollow"/>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="/_css/stats_top.css" type="text/css" title="Standard"/>
 </head><body>
 
index 0fd6f34..a81d357 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Spambot tarpit</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 8a6e260..3000613 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>Restore file</title>
 <meta name="robots" content="noindex,nofollow"/>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 54e765e..bc82b79 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>Restore image</title>
 <meta name="robots" content="noindex,nofollow"/>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index c8694bf..caf75de 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>Upload file</title>
 <meta name="robots" content="noindex,nofollow"/>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 <link rel="stylesheet" href="/_css/create.css" type="text/css" title="Standard"/>
index 1a3dd72..23060b5 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <title>Upload image</title>
 <meta name="robots" content="noindex,nofollow"/>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 <link rel="stylesheet" href="/_css/create.css" type="text/css" title="Standard"/>
index 69de82d..fa0fec9 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Your preferences</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index cf19b46..8f6dc30 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Users</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 <link rel="stylesheet" href="/_css/users.css" type="text/css" title="Standard"/>
index 73a681b..6033263 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>Visualise links</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="/_css/visualise_links.css" type="text/css" title="Standard"/>
 <script src="/_js/wz_jsgraphics.js" type="text/javascript"></script>
 <script src="/_js/visualise_links.js" type="text/javascript"></script>
index 865dad3..0fa96a8 100644 (file)
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 <title>What links to ::title_html::</title>
-<meta name="author" content="http://www.merjis.com/" />
+<meta name="author" content="http://merjis.com/" />
 <link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
 <link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
 </head><body>
index 5689e5d..f303640 100644 (file)
@@ -1,6 +1,6 @@
 (* Copy a page from one host to another.  Note that this only copies
  * the text, not any images which may be present.
- * $Id: copy_page.ml,v 1.3 2006/08/04 12:45:35 rich Exp $
+ * $Id: copy_page.ml,v 1.4 2006/08/14 11:36:50 rich Exp $
  *
  * Usage: copy_page hostid url new_hostid new_url
  *)
@@ -21,9 +21,10 @@ let () =
   let old_pageid = sth#fetch1int () in
 
   let sth = dbh#prepare_cached
-    "insert into pages (url, title, description, keywords,
+    "insert into pages (url, title, description, keywords, noodp,
                         hostid, redirect, css)
-     select ? as url, title, description, keywords, ? as hostid, redirect, css
+     select ? as url, title, description, keywords, noodp,
+                        ? as hostid, redirect, css
        from pages
       where id = ?" in
   sth#execute [`String new_url; `Int new_hostid; `Int old_pageid];