comoblog-commit Mailing List for CoMoblog Mobile Blog Application
Status: Inactive
Brought to you by:
markwallis
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(49) |
Oct
(127) |
Nov
(211) |
Dec
(56) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(51) |
Feb
(128) |
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
(2) |
Aug
(24) |
Sep
|
Oct
(151) |
Nov
(9) |
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
(17) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 12:43:33
|
Update of /cvsroot/comoblog/comoblog/img/posts In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26052/posts Added Files: index.php Log Message: Adding in missing files --- NEW FILE: index.php --- |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 12:43:33
|
Update of /cvsroot/comoblog/comoblog/img/topics In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26052/topics Added Files: index.php Log Message: Adding in missing files --- NEW FILE: index.php --- |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 12:21:14
|
Update of /cvsroot/comoblog/comoblog/modules/mod_rss/templates/2.0 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv17131 Modified Files: rss.tpl.xml Log Message: Remove the author tag from the rss feed. It's optional, and causes more hassle than it's worth Index: rss.tpl.xml =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_rss/templates/2.0/rss.tpl.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- rss.tpl.xml 19 Feb 2008 03:34:02 -0000 1.3 +++ rss.tpl.xml 19 Feb 2008 12:21:07 -0000 1.4 @@ -27,7 +27,6 @@ <comments>{POST.post_permalink}</comments> <description><![CDATA[{POST.post_mail_desc}]]></description> <content:encoded><![CDATA[{POST.post_mail_body}]]></content:encoded> - <author>{POST.post_mail_from}</author> <pubDate>{POST.post_mail_date}</pubDate> <category>{POST.post_category}</category> <guid isPermaLink="true">{POST.post_permalink}</guid> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 11:33:26
|
Update of /cvsroot/comoblog/comoblog/img/comoblog In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30717 Removed Files: Thumbs.db Log Message: Remove stray thumbs.db file --- Thumbs.db DELETED --- |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 09:12:47
|
Update of /cvsroot/comoblog/comoblog/templates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8177/templates Modified Files: index.tpl.htm list_comments.tpl.htm Log Message: Tidy up captcha implementation Index: index.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/templates/index.tpl.htm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- index.tpl.htm 24 Feb 2006 00:41:20 -0000 1.6 +++ index.tpl.htm 19 Feb 2008 09:12:41 -0000 1.7 @@ -109,7 +109,7 @@ <div class="post_footer"> <!-- BEGIN: comment_button --> - <img src="{SITE_URL}img/comoblog/{COMMENTS_IMG}" border="0" alt="{TXT.comments}" /> {TXT.comments}: {POST.post_comments} | <a href="{SITE_URL}list_comments.php?i={POST.post_id}" onclick="open_popup(this.href,430,430); return false;">{TXT.view}</a> | <a href="{SITE_URL}add_comment.php?i={POST.post_id}" onclick="open_popup(this.href,430,430); return false;">{TXT.add}</a> + <img src="{SITE_URL}img/comoblog/{COMMENTS_IMG}" border="0" alt="{TXT.comments}" /> {TXT.comments}: {POST.post_comments} | <a href="{SITE_URL}list_comments.php?i={POST.post_id}" onclick="open_popup(this.href,430,530); return false;">{TXT.view}</a> | <a href="{SITE_URL}add_comment.php?i={POST.post_id}" onclick="open_popup(this.href,430,530); return false;">{TXT.add}</a> <!-- END: comment_button --> <img src="{SITE_URL}img/comoblog/{PERMALINK_IMG}" border="0" alt="{TXT.permalink}" /> <a href="{POST.post_permalink}">{TXT.permalink}</a> <!-- BEGIN: trackback_button --> Index: list_comments.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/templates/list_comments.tpl.htm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- list_comments.tpl.htm 17 Nov 2006 00:50:47 -0000 1.4 +++ list_comments.tpl.htm 19 Feb 2008 09:12:41 -0000 1.5 @@ -1,7 +1,9 @@ <!-- BEGIN: main -->{FILE "templates/header.tpl.htm"} <div id="comments"> <h1>{TXT.comments_for_post}: {POST.post_mail_subject}</h1> -Note, that some comments may be in the moderation queue, and so not yet visible. +<div class="comment"> +<p>Note that some comments may be awaiting moderation and not yet visible.</p> +</div> <!-- BEGIN: nocomments --> <div class="comment"> <h1>{TXT.no_comments}</h1> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 09:12:47
|
Update of /cvsroot/comoblog/comoblog In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv8177 Modified Files: add_comment.php Log Message: Tidy up captcha implementation Index: add_comment.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/add_comment.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- add_comment.php 17 Nov 2006 00:50:45 -0000 1.6 +++ add_comment.php 19 Feb 2008 09:12:41 -0000 1.7 @@ -44,11 +44,12 @@ $errors = array(); if ($_POST['captcha_string'] == '') array_push ($errors, 'Please type the text from the image'); - + else { error_log("CAPTCHATEXT CHECK->" . $_SESSION['CAPTCHATEXT'] ."/" . $_POST['captcha_string']); if ($_POST['captcha_string'] != $_SESSION['CAPTCHATEXT']) array_push ($errors, 'Please type the correct text from the image'); + } if ($form['comment_author'] == '') array_push ($errors, 'Please type your name'); |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 06:07:14
|
Update of /cvsroot/comoblog/comoblog/admin/include In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv2521 Modified Files: modules.inc.php Log Message: Cleanup of stray logging Index: modules.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/include/modules.inc.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- modules.inc.php 17 Nov 2006 00:50:46 -0000 1.6 +++ modules.inc.php 19 Feb 2008 06:07:10 -0000 1.7 @@ -46,7 +46,7 @@ function module_install ($mod_name) { $install_file = CFG_BASE_PATH.'/modules/'.$mod_name.'/install/'.$mod_name.'.xml'; - error_log("reading file" . $install_file); + error_log("Reading module install file: " . $install_file); // parse content of xml install file $xmlparse = &new ParseXML; $xml = $xmlparse->GetXMLTree($install_file); |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 06:06:12
|
Update of /cvsroot/comoblog/comoblog/admin/include In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv1742 Modified Files: xml2array.inc.php Log Message: Cleanup of stray logging Index: xml2array.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/include/xml2array.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- xml2array.inc.php 17 Nov 2006 00:50:46 -0000 1.2 +++ xml2array.inc.php 19 Feb 2008 06:05:59 -0000 1.3 @@ -53,20 +53,15 @@ } function GetXMLTree($xmlloc){ - error_log("checking this exists" . $xmlloc); if (file_exists($xmlloc)){ - error_log("it does" . $xmlloc); $data = implode('', file($xmlloc)); - } else { - error_log("it doesnt " . $xmlloc); + } else { $fp = fopen($xmlloc,'r'); while(!feof($fp)){ - error_log("reading file " . $xmlloc); - $data = $data . fread($fp, 1024); - } + } fclose($fp); - } + } $parser = xml_parser_create('ISO-8859-1'); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); @@ -86,4 +81,4 @@ return $tree; } } -?> \ No newline at end of file +?> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 05:48:33
|
Update of /cvsroot/comoblog/comoblog In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27663 Modified Files: index.php Log Message: 1280321 - Fix the dollar sign issue by upgrading xtemplate Index: index.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/index.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- index.php 22 Oct 2006 11:44:01 -0000 1.7 +++ index.php 19 Feb 2008 05:48:29 -0000 1.8 @@ -47,7 +47,7 @@ /////////////////////////////////////////////////////////////////////////////// -$tpl = new XTemplate ("templates/index.tpl.htm", "main"); +$tpl = new XTemplate ("templates/index.tpl.htm", ""); if(isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] != '/' && $_SERVER['PATH_INFO'] != '') { // TODO get from cache |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 05:48:33
|
Update of /cvsroot/comoblog/comoblog/include In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27663/include Modified Files: xtemplate.inc.php Log Message: 1280321 - Fix the dollar sign issue by upgrading xtemplate Index: xtemplate.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/include/xtemplate.inc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- xtemplate.inc.php 2 Sep 2005 02:35:30 -0000 1.3 +++ xtemplate.inc.php 19 Feb 2008 05:48:29 -0000 1.4 @@ -1,385 +1,1328 @@ -<?php - -class XTemplate { - -/* - xtemplate class 0.2.4-3 - html generation with templates - fast & easy - copyright (c) 2000 barnab� debreceni [cr...@us...] - code optimization by Ivar Smolin <ok...@li...> 14-march-2001 - latest stable & CVS version always available @ http://sourceforge.net/projects/xtpl - [...1682 lines suppressed...] + $this->filecontents = $before . "\n" . $this->filecontents . "\n" . $after; + } + + /** + * Debug function - var_dump wrapped in '<pre></pre>' tags + * + * @access private + * @param multiple var_dumps all the supplied arguments + */ + function _pre_var_dump ($args) { + + if ($this->debug) { + echo '<pre>'; + var_dump(func_get_args()); + echo '</pre>'; + } + } +} /* end of XTemplate class. */ + +?> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 04:00:24
|
Update of /cvsroot/comoblog/comoblog/docs In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21763/docs Modified Files: INSTALL Log Message: 1701043 - fail gracefully when we hit MySQL STRICT mode Index: INSTALL =================================================================== RCS file: /cvsroot/comoblog/comoblog/docs/INSTALL,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- INSTALL 12 Nov 2005 14:21:04 -0000 1.6 +++ INSTALL 19 Feb 2008 04:00:20 -0000 1.7 @@ -37,7 +37,7 @@ software versions: - Apache >= 1.3.24 - PHP >= 4.2 - - MySQL >= 3.23 + - MySQL >= 3.23 (with strict mode disabled) 3. POP3 MAILBOX |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 04:00:23
|
Update of /cvsroot/comoblog/comoblog/_install In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21763/_install Modified Files: step_1.php Log Message: 1701043 - fail gracefully when we hit MySQL STRICT mode Index: step_1.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/_install/step_1.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- step_1.php 19 Mar 2007 10:46:59 -0000 1.8 +++ step_1.php 19 Feb 2008 04:00:20 -0000 1.9 @@ -61,6 +61,14 @@ if (!$selectdb) $errors[] = 'Error selecting database (check database name)'; + $query = "SELECT @@global.sql_mode"; + $res = mysql_query($query); + if ($res) { + $row = mysql_fetch_assoc($res); + if ($row['@@global.sql_mode'] != "") + $errors[] = 'MySQL strict mode is not supported'; + } + $query = "select pref_value from ".$_POST['mysql_tabprefix']."preferences where pref_name='CFG_VERSION'"; $res = mysql_query($query); if ($res) |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 03:39:31
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup/install In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13720 Modified Files: mod_markup.xml Log Message: Increment mod_markup version number Index: mod_markup.xml =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_markup/install/mod_markup.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mod_markup.xml 17 Nov 2006 00:50:46 -0000 1.4 +++ mod_markup.xml 19 Feb 2008 03:39:27 -0000 1.5 @@ -2,7 +2,7 @@ <!DOCTYPE module SYSTEM "http://comoblog.sourceforge.net/DTD/comoblog_mod_install.dtd"> <module> <name>mod_markup</name> - <version>1.0</version> + <version>1.1</version> <minimum_supported>1.0</minimum_supported> <certified>1.0</certified> <description>Post filter module that implements WikiPedia style markup on incoming posts </description> @@ -24,4 +24,4 @@ <version>1.0</version> <author>Mark Wallis - mw...@se...</author> <date>2005-10-03</date> -</module> \ No newline at end of file +</module> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 03:38:54
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup/include In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13352 Modified Files: mod_markup.inc.php Log Message: Stop mod_markup from inserting horrible br tags into well formatted HTML Index: mod_markup.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_markup/include/mod_markup.inc.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mod_markup.inc.php 9 Oct 2005 08:30:29 -0000 1.5 +++ mod_markup.inc.php 19 Feb 2008 03:38:50 -0000 1.6 @@ -86,7 +86,6 @@ else $post = process_images_local( $post ); - $post['post_mail_body'] = nl2br($post['post_mail_body']); $post['post_ctype'] = "text/html"; return $post; |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 03:37:04
|
Update of /cvsroot/comoblog/comoblog/modules/mod_rss/install In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12590 Modified Files: mod_rss.xml Log Message: Increment mod_rss version number Index: mod_rss.xml =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_rss/install/mod_rss.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mod_rss.xml 13 Nov 2005 12:35:28 -0000 1.3 +++ mod_rss.xml 19 Feb 2008 03:37:00 -0000 1.4 @@ -2,7 +2,7 @@ <!DOCTYPE module SYSTEM "http://comoblog.sourceforge.net/DTD/comoblog_mod_install.dtd"> <module> <name>mod_rss</name> - <version>1.0</version> + <version>1.1</version> <minimum_supported>1.0</minimum_supported> <certified> 1.0 |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 03:34:08
|
Update of /cvsroot/comoblog/comoblog/modules/mod_rss In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv11414 Modified Files: rss.php Log Message: 1896613 - Fix RSS field validation problems Index: rss.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_rss/rss.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- rss.php 4 Oct 2005 06:55:56 -0000 1.3 +++ rss.php 19 Feb 2008 03:34:02 -0000 1.4 @@ -13,7 +13,7 @@ $blog['title'] = htmlspecialchars(strip_tags(CFG_TITLE)); $blog['link'] = CFG_SITE_URL; $blog['description'] = htmlspecialchars(strip_tags(CFG_INTRO_TEXT)); -$blog['language'] = CFG_LANG; +$blog['language'] = $SET_LOCALE; $blog['generator'] = 'CoMoblog '.CFG_VERSION; $blog['logo'] = CFG_SITE_URL.'img/comoblog/'.CFG_LOGO_IMG; $blog['copyright'] = htmlspecialchars(strip_tags(CFG_RSS_COPYRIGHT)); @@ -40,15 +40,33 @@ for ($c = 0; $c < count($posts); $c++) { $posts[$c]['post_mail_subject'] = htmlspecialchars(strip_tags($posts[$c]['post_mail_subject'])); - $posts[$c]['post_mail_body'] = htmlspecialchars(strip_tags($posts[$c]['post_mail_body'])); - $posts[$c]['post_mail_from'] = htmlspecialchars(strip_tags($posts[$c]['post_mail_from'])); - $posts[$c]['post_mail_date'] = strftime($CAL_DATE_FORMAT." %H:%M", $posts[$c]['post_mail_date']); - $post['post_category'] = ''; + $posts[$c]['post_mail_body'] = $posts[$c]['post_mail_body']; + $posts[$c]['post_mail_desc'] = $posts[$c]['post_mail_body']; + + if (strlen($posts[$c]['post_mail_desc']) > 200) { + $cutpost = strpos($posts[$c]['post_mail_desc'], "\n<br />"); + if ($cutpost > 0) { + $posts[$c]['post_mail_desc'] = substr($posts[$c]['post_mail_desc'], 0, $cutpost); + $posts[$c]['post_mail_desc'] = $posts[$c]['post_mail_desc']." ........"; + } + } + + $posts[$c]['post_mail_from'] = htmlspecialchars($posts[$c]['post_mail_from']); + $posts[$c]['post_mail_date'] = strftime("%a, %d %b %Y %H:%M:%S %z", $posts[$c]['post_mail_date']); + + if ($posts[$c]['topic_name'] == "") + $posts[$c]['post_category'] = "uncategorised"; + else + $posts[$c]['post_category'] = $posts[$c]['topic_name']; + + if ($rss_version == '1.0') + $posts[$c]['post_mail_body'] = filter_html(str_replace("<br>", "\n", $posts[$c]['post_mail_body'])); $tpl->assign('POST', $posts[$c]); - if ($rss_version == '1.0') + if ($rss_version == '1.0') { $tpl->parse('main.item'); + } $tpl->parse('main.post'); } |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2008-02-19 03:34:08
|
Update of /cvsroot/comoblog/comoblog/modules/mod_rss/templates/2.0 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv11414/templates/2.0 Modified Files: rss.tpl.xml Log Message: 1896613 - Fix RSS field validation problems Index: rss.tpl.xml =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_rss/templates/2.0/rss.tpl.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- rss.tpl.xml 5 Oct 2005 00:48:15 -0000 1.2 +++ rss.tpl.xml 19 Feb 2008 03:34:02 -0000 1.3 @@ -1,9 +1,15 @@ <!-- BEGIN: main --><?xml version="1.0" encoding="iso-8859-1"?> <!-- RSS generated by {BLOG.generator} --> -<rss version="2.0"> +<rss version="2.0" + xmlns:content="http://purl.org/rss/1.0/modules/content/" + xmlns:wfw="http://wellformedweb.org/CommentAPI/" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:atom="http://www.w3.org/2005/Atom" + > <channel> <title>{BLOG.title}</title> <link>{BLOG.link}</link> + <atom:link href="{BLOG.link}modules/mod_rss/rss.php/2.0" rel="self" type="application/rss+xml" /> <description>{BLOG.description}</description> <language>{BLOG.language}</language> <generator>{BLOG.generator}</generator> @@ -19,10 +25,12 @@ <title>{POST.post_mail_subject}</title> <link>{POST.post_permalink}</link> <comments>{POST.post_permalink}</comments> - <description>{POST.post_mail_body}</description> + <description><![CDATA[{POST.post_mail_desc}]]></description> + <content:encoded><![CDATA[{POST.post_mail_body}]]></content:encoded> <author>{POST.post_mail_from}</author> <pubDate>{POST.post_mail_date}</pubDate> <category>{POST.post_category}</category> + <guid isPermaLink="true">{POST.post_permalink}</guid> </item> <!-- END: post --> </channel> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2007-05-14 06:17:18
|
Update of /cvsroot/comoblog/comoblog/docs In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30623/docs Modified Files: CHANGELOG Log Message: Changelog updates Index: CHANGELOG =================================================================== RCS file: /cvsroot/comoblog/comoblog/docs/CHANGELOG,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- CHANGELOG 19 Mar 2007 10:46:58 -0000 1.39 +++ CHANGELOG 14 May 2007 06:17:12 -0000 1.40 @@ -5,7 +5,9 @@ * FEATURE: SEO friendly URL structure (1315718) * FEATURE: URL added for comment posted * FEATURE: Initial post tagging support (1315711) +* FEATURE: Basic skinning support added (1437414) * MODULE: Updated mod_calendar to 1.3 +* MODULE: mod_skinselect introduced (1.1) * BUG: Fix for '1970' calendar problem * BUG: HTML entities were lost during post edit * BUG: Fix for php 5.0 installation issue (1519966) |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2007-03-28 01:36:47
|
Update of /cvsroot/comoblog/modules/mod_skinselect/install In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv30682 Modified Files: mod_skinselect.xml Log Message: Cleanup of mod_skinselect installation XML Index: mod_skinselect.xml =================================================================== RCS file: /cvsroot/comoblog/modules/mod_skinselect/install/mod_skinselect.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mod_skinselect.xml 24 Feb 2006 00:41:34 -0000 1.2 +++ mod_skinselect.xml 28 Mar 2007 01:36:43 -0000 1.3 @@ -3,18 +3,14 @@ <module> <version>1.1</version> - <minimum_supported>1.0</minimum_supported> - <certified>1.5</certified> + <minimum_supported>1.3</minimum_supported> + <certified>1.3</certified> <name>mod_skinselect</name> <description>Allows the changing of the site look and feel by the user </description> <allowed_pos>sidebar</allowed_pos> <allowed_pos>top</allowed_pos> <dbquery>CREATE TABLE `comoblog_mod_skinselect` (`skinselect_id` int(10) unsigned NOT NULL auto_increment, `skinselect_title` varchar(255) default NULL, `skinselect_description` text, `skinselect_nav_text` varchar(99) default NULL, `skinselect_nav_link` varchar(255) default NULL, `skinselect_visible` char(1) NOT NULL default 'Y', `skinselect_added` int(10) unsigned default NULL, `skinselect_display_order` int(10) unsigned default NULL,`skinselect_author` varchar(255) default NULL, PRIMARY KEY (`skinselect_id`)) TYPE=MyISAM </dbquery> - - - - <filter_posts>N</filter_posts> <filter_comments>N</filter_comments> <version>0.5</version> @@ -88,15 +84,13 @@ restrict_values="8|9|10|11|12|13|14|15|16|17|18|19|20" /> - - <param name="CFG_MOD_SKINSELECT_SHOW_SELECTOR" description="Allow users to change the skin" type="select" editable="Y" accept_null="N" - value="10" + value="Y" restrict_values="Y|N" /> @@ -121,9 +115,7 @@ restrict_values="Y|N" /> - - - <param + <param name="CFG_MOD_SKINSELECT_DEFAULT" description="The Skin to be used by default item" type="text" @@ -134,8 +126,4 @@ value="default" /> - - - - </module> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2007-03-19 10:47:04
|
Update of /cvsroot/comoblog/comoblog/_install In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv2218/_install Modified Files: step_1.php step_2.php step_3.php step_4.php step_5.php Log Message: Fix: 1519966 - Installation issues under php5.0. Patch in SF by krkstrk Index: step_2.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/_install/step_2.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- step_2.php 16 Aug 2005 05:49:44 -0000 1.1.1.1 +++ step_2.php 19 Mar 2007 10:46:59 -0000 1.2 @@ -7,7 +7,10 @@ if ($_SESSION['step'] < 1) { Header('Location: step_1.php'); exit(); +} else { + $_SESSION['step'] = 2; } + require_once (dirname(__FILE__).'/../include/config.inc.php'); // now I can include the real config.inc.php file! @@ -47,7 +50,6 @@ $res = mysql_query($query); // redirect to step 3 - $_SESSION['step'] = 2; Header ('Location: step_3.php'); exit(); } Index: step_5.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/_install/step_5.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- step_5.php 7 Oct 2005 13:21:21 -0000 1.2 +++ step_5.php 19 Mar 2007 10:46:59 -0000 1.3 @@ -7,6 +7,8 @@ if ($_SESSION['step'] < 4) { Header('Location: step_4.php'); exit(); +} else { + $_SESSION['step'] = 5; } require (dirname(__FILE__).'/../include/config.inc.php'); // now I can include the real config.inc.php file! @@ -44,7 +46,6 @@ $res = mysql_query($sql); // redirect to step 5 - $_SESSION['step'] = 5; Header ('Location: ok.php'); exit(); } Index: step_3.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/_install/step_3.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- step_3.php 16 Aug 2005 05:49:44 -0000 1.1.1.1 +++ step_3.php 19 Mar 2007 10:46:59 -0000 1.2 @@ -27,7 +27,10 @@ if ($_SESSION['step'] < 2) { Header('Location: step_2.php'); exit(); +} else { + $_SESSION['step'] = 3; } + require_once (dirname(__FILE__).'/../include/config.inc.php'); // now I can include the real config.inc.php file! require_once ('../include/xtemplate.inc.php'); @@ -91,7 +94,6 @@ // redirect to step 4 - $_SESSION['step'] = 3; Header ('Location: step_4.php'); exit(); } Index: step_1.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/_install/step_1.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- step_1.php 17 Nov 2006 00:50:45 -0000 1.7 +++ step_1.php 19 Mar 2007 10:46:59 -0000 1.8 @@ -9,6 +9,8 @@ if ($_SESSION['step'] < 0) { Header('Location: step_0.php'); exit(); +} else { + $_SESSION['step'] = 1; } require ('../include/xtemplate.inc.php'); @@ -210,7 +212,6 @@ @chmod (dirname(__FILE__).'/../include/param.inc.'. $_SERVER['SERVER_NAME'].'.php', 0600); // redirect to step 2 - $_SESSION['step'] = 1; Header ('Location: step_2.php'); exit(); } Index: step_4.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/_install/step_4.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- step_4.php 16 Aug 2005 05:49:44 -0000 1.1.1.1 +++ step_4.php 19 Mar 2007 10:46:59 -0000 1.2 @@ -7,7 +7,9 @@ if ($_SESSION['step'] < 3) { Header('Location: step_3.php'); exit(); -} +} else { + $_SESSION['step'] = 4; +} require (dirname(__FILE__).'/../include/config.inc.php'); // now I can include the real config.inc.php file! @@ -55,7 +57,6 @@ $res = mysql_query($sql); // redirect to step 5 - $_SESSION['step'] = 4; Header ('Location: step_5.php'); exit(); } |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2007-03-19 10:47:04
|
Update of /cvsroot/comoblog/comoblog/docs In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv2218/docs Modified Files: CHANGELOG Log Message: Fix: 1519966 - Installation issues under php5.0. Patch in SF by krkstrk Index: CHANGELOG =================================================================== RCS file: /cvsroot/comoblog/comoblog/docs/CHANGELOG,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- CHANGELOG 5 Jul 2006 00:20:46 -0000 1.38 +++ CHANGELOG 19 Mar 2007 10:46:58 -0000 1.39 @@ -8,6 +8,7 @@ * MODULE: Updated mod_calendar to 1.3 * BUG: Fix for '1970' calendar problem * BUG: HTML entities were lost during post edit +* BUG: Fix for php 5.0 installation issue (1519966) CoMoblog 1.1, 2006-01-09 ---------------------------- |
|
From: iamdecal <iam...@us...> - 2006-11-17 00:50:54
|
Update of /cvsroot/comoblog/comoblog/_install In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29462/_install Modified Files: step_0.php step_1.php Log Message: Working version of captchas. not as feature complete as id like, but it works on the current version think we should sort out a may sort out a mini release? if so it needs add_comment.php list_comments.php templates/add_comment.tpl.htm templates/list_comments.tpl.htm captcha.php img/ttf/REVELMED.TTF and a bit of tidying of captcha.php tested on two systems, but i cant garentee it for everywhere Index: step_0.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/_install/step_0.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- step_0.php 2 Sep 2005 01:06:14 -0000 1.2 +++ step_0.php 17 Nov 2006 00:50:45 -0000 1.3 @@ -40,6 +40,7 @@ $folder = str_replace(dirname(__FILE__).'/../','',$v); $errors[] = 'You need to set-up user permissions on the <font style="font-family: Courier New, Courier, mono;"><b>'.$folder.'</b></font> directory (it must be writable): <br />'; } + } if (count($errors) == 0) { Index: step_1.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/_install/step_1.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- step_1.php 22 Oct 2006 11:44:02 -0000 1.6 +++ step_1.php 17 Nov 2006 00:50:45 -0000 1.7 @@ -1,239 +1,240 @@ -<?php -/* - database configuration - */ - -@ignore_user_abort(true); -@set_time_limit(300); -session_start(); -if ($_SESSION['step'] < 0) { - Header('Location: step_0.php'); - exit(); -} - -require ('../include/xtemplate.inc.php'); - -$tpl = @new XTemplate ('templates/step_1.tpl.htm'); - - -if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') { - - // check form - foreach ($_POST as $k => $v) { - $_POST[$k] = trim($v); - } - - $errors = array(); - - if ($_POST['mysql_host'] == '') - $errors[] = 'mySQL host name required'; - - if ($_POST['mysql_username'] == '') - $errors[] = 'mySQL username required'; - - if ($_POST['mysql_password'] != $_POST['mysql_password_cfr']) - $errors[] = 'mySQL password mismatch'; - - if ($_POST['mysql_dbname'] == '') - $errors[] = 'mySQL database name required'; - - if ($_POST['mysql_tabprefix'] == '') - $errors[] = 'mySQL tab prefix required'; - - - if (count($errors) == 0) { // test db connection - - $_POST['mysql_tabprefix'] = eregi_replace(" +", "_", $_POST['mysql_tabprefix']); - $_POST['mysql_tabprefix'] = eregi_replace("\.+", "_", $_POST['mysql_tabprefix']); - $_POST['mysql_tabprefix'] = eregi_replace(";+", "_", $_POST['mysql_tabprefix']); - $_POST['mysql_tabprefix'] = eregi_replace(":+", "_", $_POST['mysql_tabprefix']); - - $dbconn = @mysql_connect ($_POST['mysql_host'], $_POST['mysql_username'], $_POST['mysql_password']); - if (!$dbconn) - { - $errors[] = 'Error connecting to mySQL server'; - $errors[] = 'error reported: ' . mysql_error(); - } - - $selectdb = @mysql_select_db ($_POST['mysql_dbname']); - if (!$selectdb) - $errors[] = 'Error selecting database (check database name)'; - - $query = "select pref_value from ".$_POST['mysql_tabprefix']."preferences where pref_name='CFG_VERSION'"; - $res = mysql_query($query); - if ($res) - { - // Upgrade detected - - $fp = fopen('param.inc.dist', 'r'); - $config = fread($fp, filesize('param.inc.dist')); - fclose($fp); - $config = str_replace('{##MYSQL_HOST##}', $_POST['mysql_host'], $config); - $config = str_replace('{##MYSQL_USERNAME##}', $_POST['mysql_username'], $config); - $config = str_replace('{##MYSQL_PASSWORD##}', $_POST['mysql_password'], $config); - $config = str_replace('{##MYSQL_DBNAME##}', $_POST['mysql_dbname'], $config); - $config = str_replace('{##MYSQL_TABPREFIX##}', $_POST['mysql_tabprefix'], $config); - - $fp = fopen(dirname(__FILE__).'/../include/param.inc.'. $_SERVER['SERVER_NAME'].'.php', 'w'); - fwrite($fp, $config); - fclose($fp); - - @chmod (dirname(__FILE__).'/../include/param.inc.'. $_SERVER['SERVER_NAME'].'.php', 0600); - - header ('Location: upgrade_0.php'); - exit; - } - } - - if (count($errors) == 0) { - require_once (dirname(__FILE__).'/../admin/include/xml2array.inc.php'); - - $xmlparse = &new ParseXML; - $xml = $xmlparse->GetXMLTree('comoblog_db.xml'); - - $queryerror = false; - - // generate queries - $tables = $xml['COMOBLOG_DB'][0]['TABLE']; - for ($c = 0; $c < count($tables); $c++) { - $table_name = $tables[$c]['ATTRIBUTES']['NAME']; - $table_name = str_replace('comoblog_', $_POST['mysql_tabprefix'], $table_name); - $query = "CREATE TABLE `".$table_name."` (\n"; - $fields = $tables[$c]['FIELD']; - for ($f = 0; $f < count($fields); $f++) { - $field_name = $fields[$f]['ATTRIBUTES']['NAME']; - $field_specs = $fields[$f]['ATTRIBUTES']['SPECS']; - $query .= "`".$field_name."` ".$field_specs . ",\n"; - } - $pk = $tables[$c]['PK'][0]['ATTRIBUTES']['NAME']; - $query .= "\nPRIMARY KEY (`".$pk."`)"; - if (isset($tables[$c]['UK'])) - $uks = $tables[$c]['UK']; - else - $uks = array(); - for ($u = 0; $u < count($uks); $u++) { - $uk = $uks[$u]['ATTRIBUTES']['NAME']; - $query .= ",\nUNIQUE KEY (`".$uk."`)"; - } - $query .= "\n) TYPE=MyISAM\n"; - - // execute CREATE TABLE query - $result = mysql_query($query); - - if (!$result) { - $queryerror = true; - } - if (isset($tables[$c]['ROW'])) - $rows = $tables[$c]['ROW']; - else - $rows = array(); - for ($r = 0; $r < count($rows); $r++) { - $query_fields = ''; - $query_values = ''; - $fields = $rows[$r]['FIELD']; - for ($f = 0; $f < count($fields); $f++) { - $field_name = $fields[$f]['ATTRIBUTES']['NAME']; - $query_fields .= $field_name; - if ($f < count($fields) - 1) { - $query_fields .= ",\n"; - } - $field_value = addslashes($fields[$f]['ATTRIBUTES']['VALUE']); - $query_values .= "'".$field_value."'"; - if ($f < count($fields) - 1) { - $query_values .= ",\n"; - } - } - $query = "INSERT INTO `".$table_name."`\n(".$query_fields.")\nVALUES\n(".$query_values.")"; - - // execute INSERT query - $result = mysql_query($query); - - if (!$result) { - $queryerror = true; - } - } - } - - // comoblog_preferences - unset ($xmlparse); - $xmlparse = &new ParseXML; - $xml = $xmlparse->GetXMLTree('comoblog_preferences.xml'); - $preferences = $xml['COMOBLOG_PREFERENCES'][0]['PARAM']; - for ($c = 0; $c < count($preferences); $c++) { - $pref_name = addslashes($preferences[$c]['ATTRIBUTES']['NAME']); - $pref_value = addslashes($preferences[$c]['ATTRIBUTES']['VALUE']); - $pref_description = addslashes($preferences[$c]['ATTRIBUTES']['DESCRIPTION']); - $pref_topic_id = addslashes($preferences[$c]['ATTRIBUTES']['TOPIC_ID']); - $pref_encrypt = addslashes($preferences[$c]['ATTRIBUTES']['ENCRYPT']); - $pref_type = addslashes($preferences[$c]['ATTRIBUTES']['TYPE']); - $pref_restrict_values = addslashes($preferences[$c]['ATTRIBUTES']['RESTRICT_VALUES']); - $pref_accept_null = addslashes($preferences[$c]['ATTRIBUTES']['ACCEPT_NULL']); - $pref_editable = addslashes($preferences[$c]['ATTRIBUTES']['EDITABLE']); - $pref_display_order = addslashes($preferences[$c]['ATTRIBUTES']['DISPLAY_ORDER']); - - $query = "INSERT INTO `".$_POST['mysql_tabprefix']."preferences` (pref_name,pref_value,pref_description,pref_topic_id,pref_encrypt,pref_type,pref_restrict_values,pref_accept_null,pref_editable,pref_display_order) VALUES ('".$pref_name."','".$pref_value."','".$pref_description."','".$pref_topic_id."','".$pref_encrypt."','".$pref_type."','".$pref_restrict_values."','".$pref_accept_null."','".$pref_editable."','".$pref_display_order."')"; - - $result = mysql_query($query); - - if (!$result) { - $queryerror = true; - } - } - - if ($queryerror === true) {// if query failed, delete all tables (prefixed by tab_prefix) and print error - $sql2 = 'show tables from '.$_POST['mysql_dbname']; - $res2 = mysql_query($sql2); - while ($row = mysql_fetch_row($res2)) { - if (substr($row[0],0,strlen($_POST['mysql_tabprefix'])) == $_POST['mysql_tabprefix']) - mysql_query('drop table '.$row[0]); - } - $errors[] = 'Error creating mySQL tables'; - - mysql_close(); - } - else { - // change values in param.inc.php - $fp = fopen('param.inc.dist', 'r'); - $config = fread($fp, filesize('param.inc.dist')); - fclose($fp); - $config = str_replace('{##MYSQL_HOST##}', $_POST['mysql_host'], $config); - $config = str_replace('{##MYSQL_USERNAME##}', $_POST['mysql_username'], $config); - $config = str_replace('{##MYSQL_PASSWORD##}', $_POST['mysql_password'], $config); - $config = str_replace('{##MYSQL_DBNAME##}', $_POST['mysql_dbname'], $config); - $config = str_replace('{##MYSQL_TABPREFIX##}', $_POST['mysql_tabprefix'], $config); - - $fp = fopen(dirname(__FILE__).'/../include/param.inc.'. $_SERVER['SERVER_NAME'].'.php', 'w'); - fwrite($fp, $config); - fclose($fp); - - @chmod (dirname(__FILE__).'/../include/param.inc.'. $_SERVER['SERVER_NAME'].'.php', 0600); - - // redirect to step 2 - $_SESSION['step'] = 1; - Header ('Location: step_2.php'); - exit(); - } - } -} - -$tpl->assign('ACTION', basename($_SERVER['PHP_SELF'])); - -if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') { - - if (count($errors) > 0) { - foreach ($errors as $k => $v) { - $tpl->assign('ERROR', $v); - $tpl->parse('main.errors.error'); - } - $tpl->parse('main.errors'); - } - $tpl->assign('POST', $_POST); -} -else { - $_POST['mysql_tabprefix'] = 'comoblog_'; - $tpl->assign('POST', $_POST); -} - -$tpl->parse('main'); -$tpl->out('main'); -?> +<?php +/* + database configuration + */ + +@ignore_user_abort(true); +@set_time_limit(300); +session_start(); +if ($_SESSION['step'] < 0) { + Header('Location: step_0.php'); + exit(); +} + +require ('../include/xtemplate.inc.php'); + +$tpl = @new XTemplate ('templates/step_1.tpl.htm'); + + +if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') { + + // check form + foreach ($_POST as $k => $v) { + $_POST[$k] = trim($v); + } + + $errors = array(); + + if ($_POST['mysql_host'] == '') + $errors[] = 'mySQL host name required'; + + if ($_POST['mysql_username'] == '') + $errors[] = 'mySQL username required'; + + if ($_POST['mysql_password'] != $_POST['mysql_password_cfr']) + $errors[] = 'mySQL password mismatch'; + + if ($_POST['mysql_dbname'] == '') + $errors[] = 'mySQL database name required'; + + if ($_POST['mysql_tabprefix'] == '') + $errors[] = 'mySQL tab prefix required'; + + + if (count($errors) == 0) { // test db connection + + $_POST['mysql_tabprefix'] = eregi_replace(" +", "_", $_POST['mysql_tabprefix']); + $_POST['mysql_tabprefix'] = eregi_replace("\.+", "_", $_POST['mysql_tabprefix']); + $_POST['mysql_tabprefix'] = eregi_replace(";+", "_", $_POST['mysql_tabprefix']); + $_POST['mysql_tabprefix'] = eregi_replace(":+", "_", $_POST['mysql_tabprefix']); + + $dbconn = @mysql_connect ($_POST['mysql_host'], $_POST['mysql_username'], $_POST['mysql_password']); + if (!$dbconn) + { + $errors[] = 'Error connecting to mySQL server'; + $errors[] = 'error reported: ' . mysql_error(); + } + + $selectdb = @mysql_select_db ($_POST['mysql_dbname']); + if (!$selectdb) + $errors[] = 'Error selecting database (check database name)'; + + $query = "select pref_value from ".$_POST['mysql_tabprefix']."preferences where pref_name='CFG_VERSION'"; + $res = mysql_query($query); + if ($res) + { + error_log("update detected"); + // Upgrade detected + + $fp = fopen('param.inc.dist', 'r'); + $config = fread($fp, filesize('param.inc.dist')); + fclose($fp); + $config = str_replace('{##MYSQL_HOST##}', $_POST['mysql_host'], $config); + $config = str_replace('{##MYSQL_USERNAME##}', $_POST['mysql_username'], $config); + $config = str_replace('{##MYSQL_PASSWORD##}', $_POST['mysql_password'], $config); + $config = str_replace('{##MYSQL_DBNAME##}', $_POST['mysql_dbname'], $config); + $config = str_replace('{##MYSQL_TABPREFIX##}', $_POST['mysql_tabprefix'], $config); + + $fp = fopen(dirname(__FILE__).'/../include/param.inc.'. $_SERVER['SERVER_NAME'].'.php', 'w'); + fwrite($fp, $config); + fclose($fp); + + @chmod (dirname(__FILE__).'/../include/param.inc.'. $_SERVER['SERVER_NAME'].'.php', 0600); + + header ('Location: upgrade_0.php'); + exit; + } + } + + if (count($errors) == 0) { + require_once (dirname(__FILE__).'/../admin/include/xml2array.inc.php'); + + $xmlparse = &new ParseXML; + $xml = $xmlparse->GetXMLTree('comoblog_db.xml'); + + $queryerror = false; + + // generate queries + $tables = $xml['COMOBLOG_DB'][0]['TABLE']; + for ($c = 0; $c < count($tables); $c++) { + $table_name = $tables[$c]['ATTRIBUTES']['NAME']; + $table_name = str_replace('comoblog_', $_POST['mysql_tabprefix'], $table_name); + $query = "CREATE TABLE `".$table_name."` (\n"; + $fields = $tables[$c]['FIELD']; + for ($f = 0; $f < count($fields); $f++) { + $field_name = $fields[$f]['ATTRIBUTES']['NAME']; + $field_specs = $fields[$f]['ATTRIBUTES']['SPECS']; + $query .= "`".$field_name."` ".$field_specs . ",\n"; + } + $pk = $tables[$c]['PK'][0]['ATTRIBUTES']['NAME']; + $query .= "\nPRIMARY KEY (`".$pk."`)"; + if (isset($tables[$c]['UK'])) + $uks = $tables[$c]['UK']; + else + $uks = array(); + for ($u = 0; $u < count($uks); $u++) { + $uk = $uks[$u]['ATTRIBUTES']['NAME']; + $query .= ",\nUNIQUE KEY (`".$uk."`)"; + } + $query .= "\n) TYPE=MyISAM\n"; + + // execute CREATE TABLE query + $result = mysql_query($query); + + if (!$result) { + $queryerror = true; + } + if (isset($tables[$c]['ROW'])) + $rows = $tables[$c]['ROW']; + else + $rows = array(); + for ($r = 0; $r < count($rows); $r++) { + $query_fields = ''; + $query_values = ''; + $fields = $rows[$r]['FIELD']; + for ($f = 0; $f < count($fields); $f++) { + $field_name = $fields[$f]['ATTRIBUTES']['NAME']; + $query_fields .= $field_name; + if ($f < count($fields) - 1) { + $query_fields .= ",\n"; + } + $field_value = addslashes($fields[$f]['ATTRIBUTES']['VALUE']); + $query_values .= "'".$field_value."'"; + if ($f < count($fields) - 1) { + $query_values .= ",\n"; + } + } + $query = "INSERT INTO `".$table_name."`\n(".$query_fields.")\nVALUES\n(".$query_values.")"; + + // execute INSERT query + $result = mysql_query($query); + + if (!$result) { + $queryerror = true; + } + } + } + + // comoblog_preferences + unset ($xmlparse); + $xmlparse = &new ParseXML; + $xml = $xmlparse->GetXMLTree('comoblog_preferences.xml'); + $preferences = $xml['COMOBLOG_PREFERENCES'][0]['PARAM']; + for ($c = 0; $c < count($preferences); $c++) { + $pref_name = addslashes($preferences[$c]['ATTRIBUTES']['NAME']); + $pref_value = addslashes($preferences[$c]['ATTRIBUTES']['VALUE']); + $pref_description = addslashes($preferences[$c]['ATTRIBUTES']['DESCRIPTION']); + $pref_topic_id = addslashes($preferences[$c]['ATTRIBUTES']['TOPIC_ID']); + $pref_encrypt = addslashes($preferences[$c]['ATTRIBUTES']['ENCRYPT']); + $pref_type = addslashes($preferences[$c]['ATTRIBUTES']['TYPE']); + $pref_restrict_values = addslashes($preferences[$c]['ATTRIBUTES']['RESTRICT_VALUES']); + $pref_accept_null = addslashes($preferences[$c]['ATTRIBUTES']['ACCEPT_NULL']); + $pref_editable = addslashes($preferences[$c]['ATTRIBUTES']['EDITABLE']); + $pref_display_order = addslashes($preferences[$c]['ATTRIBUTES']['DISPLAY_ORDER']); + + $query = "INSERT INTO `".$_POST['mysql_tabprefix']."preferences` (pref_name,pref_value,pref_description,pref_topic_id,pref_encrypt,pref_type,pref_restrict_values,pref_accept_null,pref_editable,pref_display_order) VALUES ('".$pref_name."','".$pref_value."','".$pref_description."','".$pref_topic_id."','".$pref_encrypt."','".$pref_type."','".$pref_restrict_values."','".$pref_accept_null."','".$pref_editable."','".$pref_display_order."')"; + + $result = mysql_query($query); + + if (!$result) { + $queryerror = true; + } + } + + if ($queryerror === true) {// if query failed, delete all tables (prefixed by tab_prefix) and print error + $sql2 = 'show tables from '.$_POST['mysql_dbname']; + $res2 = mysql_query($sql2); + while ($row = mysql_fetch_row($res2)) { + if (substr($row[0],0,strlen($_POST['mysql_tabprefix'])) == $_POST['mysql_tabprefix']) + mysql_query('drop table '.$row[0]); + } + $errors[] = 'Error creating mySQL tables'; + + mysql_close(); + } + else { + // change values in param.inc.php + $fp = fopen('param.inc.dist', 'r'); + $config = fread($fp, filesize('param.inc.dist')); + fclose($fp); + $config = str_replace('{##MYSQL_HOST##}', $_POST['mysql_host'], $config); + $config = str_replace('{##MYSQL_USERNAME##}', $_POST['mysql_username'], $config); + $config = str_replace('{##MYSQL_PASSWORD##}', $_POST['mysql_password'], $config); + $config = str_replace('{##MYSQL_DBNAME##}', $_POST['mysql_dbname'], $config); + $config = str_replace('{##MYSQL_TABPREFIX##}', $_POST['mysql_tabprefix'], $config); + + $fp = fopen(dirname(__FILE__).'/../include/param.inc.'. $_SERVER['SERVER_NAME'].'.php', 'w'); + fwrite($fp, $config); + fclose($fp); + + @chmod (dirname(__FILE__).'/../include/param.inc.'. $_SERVER['SERVER_NAME'].'.php', 0600); + + // redirect to step 2 + $_SESSION['step'] = 1; + Header ('Location: step_2.php'); + exit(); + } + } +} + +$tpl->assign('ACTION', basename($_SERVER['PHP_SELF'])); + +if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') { + + if (count($errors) > 0) { + foreach ($errors as $k => $v) { + $tpl->assign('ERROR', $v); + $tpl->parse('main.errors.error'); + } + $tpl->parse('main.errors'); + } + $tpl->assign('POST', $_POST); +} +else { + $_POST['mysql_tabprefix'] = 'comoblog_'; + $tpl->assign('POST', $_POST); +} + +$tpl->parse('main'); +$tpl->out('main'); +?> |
|
From: iamdecal <iam...@us...> - 2006-11-17 00:50:54
|
Update of /cvsroot/comoblog/comoblog In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29462 Modified Files: add_comment.php list_comments.php Added Files: captcha.php Log Message: Working version of captchas. not as feature complete as id like, but it works on the current version think we should sort out a may sort out a mini release? if so it needs add_comment.php list_comments.php templates/add_comment.tpl.htm templates/list_comments.tpl.htm captcha.php img/ttf/REVELMED.TTF and a bit of tidying of captcha.php tested on two systems, but i cant garentee it for everywhere Index: list_comments.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/list_comments.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- list_comments.php 22 Oct 2006 11:44:01 -0000 1.2 +++ list_comments.php 17 Nov 2006 00:50:45 -0000 1.3 @@ -1,47 +1,47 @@ -<?php -require_once ("include/config.inc.php"); - -if (CFG_INTERACTION_COMMENTS != 'yes') { - error_404(); -} - -$tpl = new XTemplate ("templates/list_comments.tpl.htm"); - -$tpl->assign('TXT', $TXT); - -$tpl->assign('CFG_BODY_BGCOLOR', CFG_BODY_BGCOLOR); -$tpl->assign('CFG_BACKGROUND_COLOR', CFG_BACKGROUND_COLOR); - -$post_id = ''; -if (isset($_GET['i'])) $post_id = $_GET['i']; - -$post = post_details ($post_id); -$tpl->assign("POST", $post); - -$comments = comment_list($post_id); - -if ($comments) { - error_log ("got comment_id" . $comments[$c]['comment_id'] ); - - for ($c = 0; $c < count($comments); $c++) { - $comments[$c]['comment_author_email'] = antispam ($comments[$c]['comment_author_email'], true); - - $tpl->assign("COMMENT", $comments[$c]); - - if ($comments[$c]['comment_author_email'] != '') - $tpl->parse("main.comments.comment.email"); - - $tpl->parse("main.comments.comment"); - } - $tpl->parse("main.comments"); -} -else { - $tpl->parse("main.nocomments"); -} - -$tpl->parse("main"); -$tpl->out("main"); - -// close db connection -mysql_close (); +<?php +require_once ("include/config.inc.php"); + +if (CFG_INTERACTION_COMMENTS != 'yes') { + error_404(); +} + +$tpl = new XTemplate ("templates/list_comments.tpl.htm"); + +$tpl->assign('TXT', $TXT); + +$tpl->assign('CFG_BODY_BGCOLOR', CFG_BODY_BGCOLOR); +$tpl->assign('CFG_BACKGROUND_COLOR', CFG_BACKGROUND_COLOR); + +$post_id = ''; +if (isset($_GET['i'])) $post_id = $_GET['i']; + +$post = post_details ($post_id); +$tpl->assign("POST", $post); + +$comments = comment_list($post_id); + +if ($comments) { + error_log ("got comment_id" . $comments[$c]['comment_id'] ); + + for ($c = 0; $c < count($comments); $c++) { + $comments[$c]['comment_author_email'] = antispam ($comments[$c]['comment_author_email'], true); + + $tpl->assign("COMMENT", $comments[$c]); + + if ($comments[$c]['comment_author_email'] != '' && CFG_INTERACTION_AUTHOR =='yes') + $tpl->parse("main.comments.comment.email"); + + $tpl->parse("main.comments.comment"); + } + $tpl->parse("main.comments"); +} +else { + $tpl->parse("main.nocomments"); +} + +$tpl->parse("main"); +$tpl->out("main"); + +// close db connection +mysql_close (); ?> \ No newline at end of file Index: add_comment.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/add_comment.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- add_comment.php 22 Oct 2006 11:44:01 -0000 1.5 +++ add_comment.php 17 Nov 2006 00:50:45 -0000 1.6 @@ -1,106 +1,116 @@ -<?php -require_once ("include/config.inc.php"); - -if (CFG_INTERACTION_COMMENTS != 'yes') { - error_404(); -} - -$tpl = new XTemplate ("templates/add_comment.tpl.htm"); -$tpl->assign('TXT', $TXT); - -$tpl->assign('CFG_BODY_BGCOLOR', CFG_BODY_BGCOLOR); -$tpl->assign('CFG_BACKGROUND_COLOR', CFG_BACKGROUND_COLOR); - -$form['post_id'] = ''; -if(isset($_POST['post_id'])) $form['post_id'] = $_POST['post_id']; -elseif(isset($_GET['i'])) $form['post_id'] = $_GET['i']; -else exit(); - -$form['comment_author'] = ''; -if (isset($_POST['comment_author'])) -{ $form['comment_author'] = $_POST['comment_author'];} - -$form['comment_author_email'] == ''; -if (isset($_POST['comment_author_email'])) -{ $form['comment_author_email'] = $_POST['comment_author_email'];} - -$form['comment_author_url'] == ''; -if (isset($_POST['comment_author_url'])) -{ $form['comment_author_url'] = $_POST['comment_author_url'];} - -$form['comment_text'] == '';{ -if (isset($_POST['comment_text'])) $form['comment_text'] = $_POST['comment_text'];} - -// addition to allow HTML in comments if flagged - needs an admin option to turn on or off -$form['comment_convert'] == ''; -if (isset($_POST['comment_convert'])) { $form['comment_convert'] = $_POST['comment_convert'];} - - - -if ($_SERVER['REQUEST_METHOD'] == 'POST') { - $errors = array(); - - if ($form['comment_author'] == '') - array_push ($errors, 'Please type your name'); - - if ($form['comment_author_email'] != '' && !is_valid_email($form['comment_author_email'])) - array_push ($errors, 'Invalid email address'); - - if ($form['comment_text'] == '') - array_push ($errors, 'Please write your comment'); - - if (count($errors) == 0) { - $comment = $form; - - $comment = comment_add ($comment); - - $cookie_period = 60*60*24*365; - $domain = parse_url(CFG_SITE_URL); - $domain = $domain['host']; - setcookie("comment_name", $form['comment_author'], time() + $cookie_period, "/", $domain, 0); - //TODO: why wont this one save? - setcookie("comment_url", $form['comment_author_url'], time() + $cookie_period, "/", $domain, 0); - setcookie("comment_email", $form['comment_author_email'], time() + $cookie_period, "/", $domain, 0); - - - Header ("Location: list_comments.php?i=".$comment['post_id']); - exit(); - } - else { - foreach ($errors as $key=>$value) { - $tpl->assign("ERROR", $value); - $tpl->parse("main.form_errors.error"); - } - $tpl->parse("main.form_errors"); - } -} - - - - - -$tpl->assign("ACTION", basename($_SERVER['PHP_SELF'])); - -if (isset($_COOKIE['comment_name'])) - $form['comment_author'] = $_COOKIE['comment_name']; -if (isset($_COOKIE['comment_email'])) - $form['comment_author_email'] = $_COOKIE['comment_email']; -if (isset($_COOKIE['comment_url'])) - $form['comment_author_url'] = $_COOKIE['comment_url']; -$tpl->assign("FORM", $form); - - -// html comments are allowed -if (CFG_INTERACTION_HTML_COMMENTS == 'yes'){ - $tpl->parse('main.html_comments'); -} - - - -$tpl->parse("main"); -$tpl->out("main"); - - -// close db connection -mysql_close (); -?> +<?php +session_start(); +require_once ("include/config.inc.php"); + +if (CFG_INTERACTION_COMMENTS != 'yes') { + error_404(); +} + + + +$tpl = new XTemplate ("templates/add_comment.tpl.htm"); +$tpl->assign('TXT', $TXT); + +$tpl->assign('CFG_BODY_BGCOLOR', CFG_BODY_BGCOLOR); +$tpl->assign('CFG_BACKGROUND_COLOR', CFG_BACKGROUND_COLOR); + +$form['post_id'] = ''; +if(isset($_POST['post_id'])) $form['post_id'] = $_POST['post_id']; +elseif(isset($_GET['i'])) $form['post_id'] = $_GET['i']; +else exit(); + +$form['comment_author'] = ''; +if (isset($_POST['comment_author'])) +{ $form['comment_author'] = $_POST['comment_author'];} + +$form['comment_author_email'] == ''; +if (isset($_POST['comment_author_email'])) +{ $form['comment_author_email'] = $_POST['comment_author_email'];} + +$form['comment_author_url'] == ''; +if (isset($_POST['comment_author_url'])) +{ $form['comment_author_url'] = $_POST['comment_author_url'];} + +$form['comment_text'] == '';{ +if (isset($_POST['comment_text'])) $form['comment_text'] = $_POST['comment_text'];} + +// addition to allow HTML in comments if flagged - needs an admin option to turn on or off +$form['comment_convert'] == ''; +if (isset($_POST['comment_convert'])) { $form['comment_convert'] = $_POST['comment_convert'];} + + + +if ($_SERVER['REQUEST_METHOD'] == 'POST') { + $errors = array(); + if ($_POST['captcha_string'] == '') + array_push ($errors, 'Please type the text from the image'); + + + error_log("CAPTCHATEXT CHECK->" . $_SESSION['CAPTCHATEXT'] ."/" . $_POST['captcha_string']); + if ($_POST['captcha_string'] != $_SESSION['CAPTCHATEXT']) + array_push ($errors, 'Please type the correct text from the image'); + + if ($form['comment_author'] == '') + array_push ($errors, 'Please type your name'); + + if ($form['comment_author_email'] != '' && !is_valid_email($form['comment_author_email'])) + array_push ($errors, 'Invalid email address'); + + if ($form['comment_text'] == '') + array_push ($errors, 'Please write your comment'); + + if (count($errors) == 0) { + $comment = $form; + + $comment = comment_add ($comment); + + $cookie_period = 60*60*24*365; + $domain = parse_url(CFG_SITE_URL); + $domain = $domain['host']; + setcookie("comment_name", $form['comment_author'], time() + $cookie_period, "/", $domain, 0); + //TODO: why wont this one save? + setcookie("comment_url", $form['comment_author_url'], time() + $cookie_period, "/", $domain, 0); + setcookie("comment_email", $form['comment_author_email'], time() + $cookie_period, "/", $domain, 0); + + + Header ("Location: list_comments.php?i=".$comment['post_id']); + exit(); + } + else { + foreach ($errors as $key=>$value) { + $tpl->assign("ERROR", $value); + $tpl->parse("main.form_errors.error"); + } + $tpl->parse("main.form_errors"); + } +} + + + + +$tpl->assign("ACTION", basename($_SERVER['PHP_SELF'])); + +if (isset($_COOKIE['comment_name'])) + $form['comment_author'] = $_COOKIE['comment_name']; +if (isset($_COOKIE['comment_email'])) + $form['comment_author_email'] = $_COOKIE['comment_email']; +if (isset($_COOKIE['comment_url'])) + $form['comment_author_url'] = $_COOKIE['comment_url']; + +$tpl->assign("FORM", $form); + + +// html comments are allowed +if (CFG_INTERACTION_HTML_COMMENTS == 'yes'){ + $tpl->parse('main.html_comments'); +} + + + +$tpl->parse("main"); +$tpl->out("main"); + + +// close db connection +mysql_close (); +?> --- NEW FILE: captcha.php --- <?php /* CAPTCHA 4 COMO By iamdecal http://www.iamdecal.co.uk This script generates PNG images of text, written in the font/size that you specify. These PNG images are passed back to the browser. Developed for use with captchas on comoblog http://comoblog.sourceforge.net Additional documentation on PHP's image handling capabilities can be found at http://www.php.net/image/ */ session_start(); $font_file = 'img/ttf/REVELMED.TTF' ; $font_size = 18 ; $font_color = '#000000' ; $background_color = '#ffffff' ; $cache_images = false ; $cache_folder = 'cache' ; /* --------------------------------------------------------------------------- For basic usage, you should not need to edit anything below this comment. If you need to further customize this script's abilities, make sure you are familiar with PHP and its image handling capabilities. --------------------------------------------------------------------------- */ $mime_type = 'image/png' ; $extension = '.png' ; $send_buffer_size = 4096 ; // check for GD support if(!function_exists('ImageCreate')){ fatal_error('Error: Server does not support PHP image generation') ; } $text = StringGen() ; if(get_magic_quotes_gpc()){ $text = stripslashes($text) ; $text = javascript_to_html($text) ; } // check font availability $font_found = is_readable($font_file) ; if(!$font_found) { fatal_error('Error: The server is missing the specified font.') ;} // create image $background_rgb = hex_to_rgb($background_color) ; $font_rgb = hex_to_rgb($font_color) ; $dip = get_dip($font_file,$font_size) ; $box = @ImageTTFBBox($font_size,0,$font_file,$text) ; $image = @ImageCreate(abs($box[2]-$box[0]),abs($box[5]-$dip)) ; if(!$image || !$box) { fatal_error('Error: The server could not create this heading image.') ; } // allocate colors and draw text $background_color = @ImageColorAllocate($image,$background_rgb['red'], $background_rgb['green'],$background_rgb['blue']) ; $font_color = ImageColorAllocate($image,$font_rgb['red'], $font_rgb['green'],$font_rgb['blue']) ; ImageTTFText($image,$font_size,0,-$box[0],abs($box[5]-$box[3])-$box[1], $font_color,$font_file,$text) ; // set transparency if($transparent_background) ImageColorTransparent($image,$background_color) ; header('Content-type: ' . $mime_type) ; ImagePNG($image) ; ImageDestroy($image) ; exit ; /* try to determine the "dip" (pixels dropped below baseline) of this font for this size. */ function get_dip($font,$size) { $test_chars = 'abcdefghijklmnopqrstuvwxyz' . 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . '1234567890' . '!@#$%^&*()\'"\\/;.,`~<>[]{}-+_-=' ; $box = @ImageTTFBBox($size,0,$font,$test_chars) ; return $box[3] ; } /* attempt to create an image containing the error message given. if this works, the image is sent to the browser. if not, an error is logged, and passed back to the browser as a 500 code instead. */ function fatal_error($message) { // send an image if(function_exists('ImageCreate')) { $width = ImageFontWidth(5) * strlen($message) + 10 ; $height = ImageFontHeight(5) + 10 ; if($image = ImageCreate($width,$height)) { $background = ImageColorAllocate($image,255,255,255) ; $text_color = ImageColorAllocate($image,0,0,0) ; ImageString($image,5,5,5,$message,$text_color) ; header('Content-type: image/png') ; ImagePNG($image) ; ImageDestroy($image) ; exit ; } } // send 500 code header("HTTP/1.0 500 Internal Server Error") ; print($message) ; exit ; } /* decode an HTML hex-code into an array of R,G, and B values. accepts these formats: (case insensitive) #ffffff, ffffff, #fff, fff */ function hex_to_rgb($hex) { // remove '#' if(substr($hex,0,1) == '#') $hex = substr($hex,1) ; // expand short form ('fff') color if(strlen($hex) == 3) { $hex = substr($hex,0,1) . substr($hex,0,1) . substr($hex,1,1) . substr($hex,1,1) . substr($hex,2,1) . substr($hex,2,1) ; } if(strlen($hex) != 6) fatal_error('Error: Invalid color "'.$hex.'"') ; // convert $rgb['red'] = hexdec(substr($hex,0,2)) ; $rgb['green'] = hexdec(substr($hex,2,2)) ; $rgb['blue'] = hexdec(substr($hex,4,2)) ; return $rgb ; } /* convert embedded, javascript unicode characters into embedded HTML entities. (e.g. '%u2018' => '‘'). returns the converted string. */ function javascript_to_html($text) { $matches = null ; preg_match_all('/%u([0-9A-F]{4})/i',$text,$matches) ; if(!empty($matches)) for($i=0;$i<sizeof($matches[0]);$i++) $text = str_replace($matches[0][$i], '&#'.hexdec($matches[1][$i]).';',$text) ; return $text ; } function StringGen () { $uppercase = range('A', 'Z'); $numeric = range(0, 9); $CharPool = array_merge($uppercase, $numeric); $PoolLength = count($CharPool) - 1; for ($i = 0; $i < 6; $i++) { $CaptchaString .= $CharPool[mt_rand(0, $PoolLength)]; } $_SESSION['CAPTCHATEXT']= ""; $_SESSION['CAPTCHATEXT']= $CaptchaString; error_log("CAPTCHA STORED IN SESSION ->". $_SESSION['CAPTCHATEXT'] ."/" . $CaptchaString); return $CaptchaString; } ?> |
|
From: iamdecal <iam...@us...> - 2006-11-17 00:50:53
|
Update of /cvsroot/comoblog/comoblog/templates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29462/templates Modified Files: add_comment.tpl.htm list_comments.tpl.htm Log Message: Working version of captchas. not as feature complete as id like, but it works on the current version think we should sort out a may sort out a mini release? if so it needs add_comment.php list_comments.php templates/add_comment.tpl.htm templates/list_comments.tpl.htm captcha.php img/ttf/REVELMED.TTF and a bit of tidying of captcha.php tested on two systems, but i cant garentee it for everywhere Index: list_comments.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/templates/list_comments.tpl.htm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- list_comments.tpl.htm 22 Oct 2006 11:44:00 -0000 1.3 +++ list_comments.tpl.htm 17 Nov 2006 00:50:47 -0000 1.4 @@ -1,34 +1,34 @@ -<!-- BEGIN: main -->{FILE "templates/header.tpl.htm"} -<div id="comments"> -<h1>{TXT.comments_for_post}: {POST.post_mail_subject}</h1> -Note, that some comments may be in the moderation queue, and so not yet visible. -<!-- BEGIN: nocomments --> -<div class="comment"> -<h1>{TXT.no_comments}</h1> -<p> </p> -</div> -<!-- END: nocomments --> -<!-- BEGIN: comments --> - -<!-- TODO: this should be moved to TXT.no_comments_reason --> -<!-- BEGIN: comment --> -<div class="comment"> -<p class="comment_header"> -<a href="{COMMENT.comment_author_url} rel="nofollow"">{COMMENT.comment_author}</a> -<!-- BEGIN: email --> - {COMMENT.comment_author_email} - <!-- END: email --><br /> - - {COMMENT.comment_date.year}/{COMMENT.comment_date.mon}/{COMMENT.comment_date.mday} {COMMENT.comment_date.hours}:{COMMENT.comment_date.minutes} - </p> -<p>{COMMENT.comment_text}</p> -</div> -<!-- END: comment --> -<!-- END: comments --> - -<div class="comment"> -<p><a href="add_comment.php?i={POST.post_id}" class="post_footer">{TXT.add_comment}</a></p> -</div> -</div> -{FILE "templates/footer.tpl.htm"} -<!-- END: main --> +<!-- BEGIN: main -->{FILE "templates/header.tpl.htm"} +<div id="comments"> +<h1>{TXT.comments_for_post}: {POST.post_mail_subject}</h1> +Note, that some comments may be in the moderation queue, and so not yet visible. +<!-- BEGIN: nocomments --> +<div class="comment"> +<h1>{TXT.no_comments}</h1> +<p> </p> +</div> +<!-- END: nocomments --> +<!-- BEGIN: comments --> + +<!-- TODO: this should be moved to TXT.no_comments_reason --> +<!-- BEGIN: comment --> +<div class="comment"> +<p class="comment_header"> +<a href="{COMMENT.comment_author_url} rel="nofollow"">{COMMENT.comment_author}</a> +<!-- BEGIN: email --> + {COMMENT.comment_author_email} +<!-- END: email --><br /> + + {COMMENT.comment_date.year}/{COMMENT.comment_date.mon}/{COMMENT.comment_date.mday} {COMMENT.comment_date.hours}:{COMMENT.comment_date.minutes} + </p> +<p>{COMMENT.comment_text}</p> +</div> +<!-- END: comment --> +<!-- END: comments --> + +<div class="comment"> +<p><a href="add_comment.php?i={POST.post_id}" class="post_footer">{TXT.add_comment}</a></p> +</div> +</div> +{FILE "templates/footer.tpl.htm"} +<!-- END: main --> Index: add_comment.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/templates/add_comment.tpl.htm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- add_comment.tpl.htm 22 Oct 2006 11:44:00 -0000 1.5 +++ add_comment.tpl.htm 17 Nov 2006 00:50:47 -0000 1.6 @@ -1,45 +1,51 @@ -<!-- BEGIN: main -->{FILE "templates/header.tpl.htm"} -<div class="comment"> -<form action="{ACTION}" method="POST"> -<input type="hidden" name="post_id" value="{FORM.post_id}" /> -<h1>{TXT.add_comment}</h1> -<p> -{TXT.your_name}<br /> -<input type="text" name="comment_author" id="comment_author" value="{FORM.comment_author}" class="comment_form" /> -</p> -<p> -{TXT.your_email}<br /> -<input type="text" name="comment_author_email" id="comment_author_email" value="{FORM.comment_author_email}" class="comment_form" /> -</p> -<p> -{TXT.your_url} -<br /> -<input type="text" name="comment_author_url" id="comment_author_url" value="{FORM.comment_author_url}" class="comment_form" /> -</p> -<p> -{TXT.comment}<br /> -<textarea name="comment_text" id="comment_text" class="comment_form">{FORM.comment_text}</textarea> -</p> -<!-- BEGIN: html_comments --> -<p> -{TXT.comment_convert} -<input type="checkbox" style="width:50px" name="comment_convert" id="comment_convert" -class="comment_form" value="noconvert"> -</p> -<!-- END: html_comments --> -<p> -<input type="submit" name="submit" value="{TXT.submit}" /> -</p> -</form> -<!-- BEGIN: form_errors --> -<script language="javascript"> - var errors = '++Warning++\n\n'; - <!-- BEGIN: error --> - errors += '{ERROR}\n'; - <!-- END: error --> - alert (errors); -</script> -<!-- END: form_errors --> -</div> -{FILE "templates/footer.tpl.htm"} -<!-- END: main --> +<!-- BEGIN: main -->{FILE "templates/header.tpl.htm"} +<div class="comment"> +<form action="{ACTION}" method="POST"> +<input type="hidden" name="post_id" value="{FORM.post_id}" /> +<h1>{TXT.add_comment}</h1> +<p> +{TXT.your_name}<br /> +<input type="text" name="comment_author" id="comment_author" value="{FORM.comment_author}" class="comment_form" /> +</p> +<p> +{TXT.your_email}<br /> +<input type="text" name="comment_author_email" id="comment_author_email" value="{FORM.comment_author_email}" class="comment_form" /> +</p> +<p> +{TXT.your_url} +<br /> +<input type="text" name="comment_author_url" id="comment_author_url" value="{FORM.comment_author_url}" class="comment_form" /> +</p> +<p> +{TXT.comment}<br /> +<textarea name="comment_text" id="comment_text" class="comment_form">{FORM.comment_text}</textarea> +</p> +<!-- BEGIN: html_comments --> +<p> +{TXT.comment_convert} +<input type="checkbox" style="width:50px" name="comment_convert" id="comment_convert" +class="comment_form" value="noconvert"> +</p> +<!-- END: html_comments --> + + +<img src="captcha.php" alt="CAPTCHA"> <br/>Type what you see. +<input type="text" name="captcha_string" size="30"> +{FORM.cap_string} + +<p> +<input type="submit" name="submit" value="{TXT.submit}" /> +</p> +</form> +<!-- BEGIN: form_errors --> +<script language="javascript"> + var errors = '++Warning++\n\n'; + <!-- BEGIN: error --> + errors += '{ERROR}\n'; + <!-- END: error --> + alert (errors); +</script> +<!-- END: form_errors --> +</div> +{FILE "templates/footer.tpl.htm"} +<!-- END: main --> |
|
From: iamdecal <iam...@us...> - 2006-11-17 00:50:53
|
Update of /cvsroot/comoblog/comoblog/admin/include In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29462/admin/include Modified Files: modules.inc.php xml2array.inc.php Log Message: Working version of captchas. not as feature complete as id like, but it works on the current version think we should sort out a may sort out a mini release? if so it needs add_comment.php list_comments.php templates/add_comment.tpl.htm templates/list_comments.tpl.htm captcha.php img/ttf/REVELMED.TTF and a bit of tidying of captcha.php tested on two systems, but i cant garentee it for everywhere Index: xml2array.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/include/xml2array.inc.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- xml2array.inc.php 16 Aug 2005 05:49:45 -0000 1.1.1.1 +++ xml2array.inc.php 17 Nov 2006 00:50:46 -0000 1.2 @@ -53,16 +53,20 @@ } function GetXMLTree($xmlloc){ + error_log("checking this exists" . $xmlloc); if (file_exists($xmlloc)){ + error_log("it does" . $xmlloc); $data = implode('', file($xmlloc)); - } else { + } else { + error_log("it doesnt " . $xmlloc); $fp = fopen($xmlloc,'r'); while(!feof($fp)){ - $data = $data . fread($fp, 1024); - } - + error_log("reading file " . $xmlloc); + + $data = $data . fread($fp, 1024); + } fclose($fp); - } + } $parser = xml_parser_create('ISO-8859-1'); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); Index: modules.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/include/modules.inc.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- modules.inc.php 24 Nov 2005 05:45:39 -0000 1.5 +++ modules.inc.php 17 Nov 2006 00:50:46 -0000 1.6 @@ -46,7 +46,7 @@ function module_install ($mod_name) { $install_file = CFG_BASE_PATH.'/modules/'.$mod_name.'/install/'.$mod_name.'.xml'; - + error_log("reading file" . $install_file); // parse content of xml install file $xmlparse = &new ParseXML; $xml = $xmlparse->GetXMLTree($install_file); |