Nothing fancy at the moment - for example no sort of templating or
page-specific bugs, which you'd need to implement Nedstat tracking. However
this implementation will work fine for Urchin.
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
(* 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.7 2004/11/03 13:36:45 rich Exp $
+ * $Id: edit_host_settings.ml,v 1.8 2005/11/16 17:30:33 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
*
* 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
let brand = trim (q#param "brand") in
let brand_tagline = trim (q#param "brand_tagline") in
let brand_description = trim (q#param "brand_description") in
let brand = trim (q#param "brand") in
let brand_tagline = trim (q#param "brand_tagline") in
let brand_description = trim (q#param "brand_description") in
+ let pagebug = trim (q#param "pagebug") in
let theme_css = if theme_css = "" then `Null else `String theme_css in
let feedback_email =
let theme_css = if theme_css = "" then `Null else `String theme_css in
let feedback_email =
if brand_tagline = "" then `Null else `String brand_tagline in
let brand_description =
if brand_description = "" then `Null else `String brand_description in
if brand_tagline = "" then `Null else `String brand_tagline in
let brand_description =
if brand_description = "" then `Null else `String brand_description in
+ let pagebug =
+ if pagebug = "" then `Null else `String pagebug in
(* Update the database. *)
let sth = dbh#prepare_cached "update hosts set edit_anon = ?,
(* Update the database. *)
let sth = dbh#prepare_cached "update hosts set edit_anon = ?,
search_box = ?, navigation = ?,
view_anon = ?,
brand = ?, brand_tagline = ?,
search_box = ?, navigation = ?,
view_anon = ?,
brand = ?, brand_tagline = ?,
+ brand_description = ?,
+ pagebug = ?
where id = ?" in
sth#execute [`Bool edit_anon; `Bool create_account_anon;
theme_css; feedback_email; `Bool mailing_list; `Bool search_box;
`Bool navigation; `Bool view_anon;
brand; brand_tagline; brand_description;
where id = ?" in
sth#execute [`Bool edit_anon; `Bool create_account_anon;
theme_css; feedback_email; `Bool mailing_list; `Bool search_box;
`Bool navigation; `Bool view_anon;
brand; brand_tagline; brand_description;
`Int hostid];
dbh#commit ();
`Int hostid];
dbh#commit ();
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
(* 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.3 2004/11/03 13:36:45 rich Exp $
+ * $Id: cocanwiki_template.ml,v 1.4 2005/11/16 17:30:34 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
*
* 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
let sth =
dbh#prepare_cached
"select h.theme_css, p.name, p.url, h.search_box,
let sth =
dbh#prepare_cached
"select h.theme_css, p.name, p.url, h.search_box,
- h.brand, h.brand_tagline, h.brand_description
+ h.brand, h.brand_tagline, h.brand_description,
+ h.pagebug
from hosts h left outer join powered_by p on h.powered_by = p.id
where h.id = ?" in
sth#execute [`Int hostid];
let theme_css, powered_by_name, powered_by_url, search_box,
from hosts h left outer join powered_by p on h.powered_by = p.id
where h.id = ?" in
sth#execute [`Int hostid];
let theme_css, powered_by_name, powered_by_url, search_box,
- brand, brand_tagline, brand_description =
+ brand, brand_tagline, brand_description, pagebug =
- | [ a; b; c; d; e; f; g] -> a, b, c, d, e, f, g
+ | [ a; b; c; d; e; f; g; h] -> a, b, c, d, e, f, g, h
| _ -> assert false in
let theme_css =
| _ -> assert false in
let theme_css =
has_brand_description, brand_description
| _ -> assert false in
has_brand_description, brand_description
| _ -> assert false in
+ let has_pagebug, pagebug =
+ match pagebug with
+ | `Null -> false, ""
+ | `String pagebug -> true, pagebug
+ | _ -> assert false in
+
template#set "theme_css" theme_css;
template#set "powered_by_name" powered_by_name;
template#set "powered_by_url" powered_by_url;
template#set "theme_css" theme_css;
template#set "powered_by_name" powered_by_name;
template#set "powered_by_url" powered_by_url;
template#set "brand_tagline" brand_tagline;
template#conditional "has_brand_description" has_brand_description;
template#set "brand_description" brand_description;
template#set "brand_tagline" brand_tagline;
template#conditional "has_brand_description" has_brand_description;
template#set "brand_description" brand_description;
+ template#conditional "has_pagebug" has_pagebug;
+ template#set "pagebug" pagebug;
(* Site menu. *)
let sth = dbh#prepare_cached "select url, label, ordering from sitemenu
(* Site menu. *)
let sth = dbh#prepare_cached "select url, label, ordering from sitemenu
+ <th> Page bug: </th>
+ <td>
+ <textarea name="pagebug" cols="70" rows="10">::pagebug_html_textarea::</textarea>
+ </td>
+</tr>
+<tr>
<td></td>
<td>
<input type="submit" name="update" value=" Update global settings "/>
<td></td>
<td>
<input type="submit" name="update" value=" Update global settings "/>
+<tr>
+<th> Page bug: </th>
+<td>
+ ::if(has_pagebug)::
+<pre>
+::pagebug_html::
+</pre>
+ ::end::
+</td>
+</tr>
+::if(has_pagebug)::::pagebug::::end::
+
<div id="footer_div">
<hr/>
<div id="footer_div">
<hr/>