comoblog-commit Mailing List for CoMoblog Mobile Blog Application (Page 2)
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: iamdecal <iam...@us...> - 2006-11-17 00:50:52
|
Update of /cvsroot/comoblog/comoblog/include In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29462/include Modified Files: config.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: config.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/include/config.inc.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- config.inc.php 16 Aug 2006 16:39:01 -0000 1.5 +++ config.inc.php 17 Nov 2006 00:50:46 -0000 1.6 @@ -1,4 +1,5 @@ <?php + error_reporting (E_ALL ^ E_NOTICE); // ADDED IN 1.3 /* TODO: we need to make sure that the upgrade will copy the file to this location |
|
From: iamdecal <iam...@us...> - 2006-11-17 00:50:52
|
Update of /cvsroot/comoblog/comoblog/admin In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29462/admin Modified Files: manage_comment_users.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: manage_comment_users.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/manage_comment_users.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- manage_comment_users.php 16 Aug 2006 01:27:28 -0000 1.1 +++ manage_comment_users.php 17 Nov 2006 00:50:46 -0000 1.2 @@ -1,84 +1,84 @@ -<?php -require ('include/admin.inc.php'); - -$tpl = new XTemplate ('templates/manage_posts.tpl.htm'); - -$offset = 0; -if (isset($_GET['o'])) $offset = $_GET['o'] + 0; - -$delete = 'n'; -if (isset($_GET['d']) && $_GET['d'] == 'y') $delete = 'y'; - - - - - - - - -if ($delete == 'y') - $tpl->parse('main.deleted'); - - - - - -$display = 10; - -$posts = posts_list ($offset, $display); - -if ($posts) { - - for ($cnt = 0; $cnt < count($posts); $cnt++) { - - if ($cnt % 2) - $tpl->assign('BGCOLOR', '#ffffff'); - else - $tpl->assign('BGCOLOR', '#efefef'); - - $posts[$cnt]['post_mail_from'] = htmlentities(antispam($posts[$cnt]['post_mail_from'])); - $posts[$cnt]['post_mail_date'] = strftime('%D %T',$posts[$cnt]['post_mail_date']); - if ( $posts[$cnt]['post_mail_subject'] == ""){ - // need to to strip html incase we break across a tag - $title = filter_html($posts[$cnt]['post_mail_body']); - $posts[$cnt]['post_mail_subject'] = substr($title,0,150) ."..." ; - } - - $tpl->assign('POST', $posts[$cnt]); - $tpl->parse('main.posts.post'); - } - - $howmany = posts_howmany(); - - $tpl->assign("OFFSET", $offset); - $tpl->assign("FIRST", $offset + 1); - $tpl->assign("LAST", $offset + $cnt); - $tpl->assign("TOTAL", $howmany); - - if ($howmany > ($offset + $display)) - { - $next_offset = $offset + $display; - $tpl->assign("NEXT_OFFSET", $next_offset); - $tpl->parse("main.posts.next"); - } - - if (($offset - $display) >= 0) - { - $prev_offset = $offset - $display; - $tpl->assign("PREV_OFFSET", $prev_offset); - $tpl->parse("main.posts.prev"); - } - $tpl->parse('main.posts'); -} -else { - $tpl->parse('main.no_posts'); -} - -$tpl->parse('main.home'); -$tpl->parse('main'); -$tpl->out('main'); - - -// close db connection -mysql_close (); -?> +<?php +require ('include/admin.inc.php'); + +$tpl = new XTemplate ('templates/manage_comment_users.tpl.htm'); + +$offset = 0; +if (isset($_GET['o'])) $offset = $_GET['o'] + 0; + +$delete = 'n'; +if (isset($_GET['d']) && $_GET['d'] == 'y') $delete = 'y'; + + + + + + + + +if ($delete == 'y') + $tpl->parse('main.deleted'); + + + + + +$display = 10; + +$posts = posts_list ($offset, $display); + +if ($posts) { + + for ($cnt = 0; $cnt < count($posts); $cnt++) { + + if ($cnt % 2) + $tpl->assign('BGCOLOR', '#ffffff'); + else + $tpl->assign('BGCOLOR', '#efefef'); + + $posts[$cnt]['post_mail_from'] = htmlentities(antispam($posts[$cnt]['post_mail_from'])); + $posts[$cnt]['post_mail_date'] = strftime('%D %T',$posts[$cnt]['post_mail_date']); + if ( $posts[$cnt]['post_mail_subject'] == ""){ + // need to to strip html incase we break across a tag + $title = filter_html($posts[$cnt]['post_mail_body']); + $posts[$cnt]['post_mail_subject'] = substr($title,0,150) ."..." ; + } + + $tpl->assign('POST', $posts[$cnt]); + $tpl->parse('main.posts.post'); + } + + $howmany = posts_howmany(); + + $tpl->assign("OFFSET", $offset); + $tpl->assign("FIRST", $offset + 1); + $tpl->assign("LAST", $offset + $cnt); + $tpl->assign("TOTAL", $howmany); + + if ($howmany > ($offset + $display)) + { + $next_offset = $offset + $display; + $tpl->assign("NEXT_OFFSET", $next_offset); + $tpl->parse("main.posts.next"); + } + + if (($offset - $display) >= 0) + { + $prev_offset = $offset - $display; + $tpl->assign("PREV_OFFSET", $prev_offset); + $tpl->parse("main.posts.prev"); + } + $tpl->parse('main.posts'); +} +else { + $tpl->parse('main.no_posts'); +} + +$tpl->parse('main.home'); +$tpl->parse('main'); +$tpl->out('main'); + + +// close db connection +mysql_close (); +?> |
|
From: iamdecal <iam...@us...> - 2006-11-17 00:50:52
|
Update of /cvsroot/comoblog/comoblog/img/ttf In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29462/img/ttf Added Files: REVELMED.TTF 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 --- NEW FILE: REVELMED.TTF --- (This appears to be a binary file; contents omitted.) |
|
From: iamdecal <iam...@us...> - 2006-11-17 00:50:52
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup/install In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29462/modules/mod_markup/install Modified Files: mod_markup.xml 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: mod_markup.xml =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_markup/install/mod_markup.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mod_markup.xml 13 Nov 2005 12:35:27 -0000 1.3 +++ mod_markup.xml 17 Nov 2006 00:50:46 -0000 1.4 @@ -1,27 +1,13 @@ <?xml version="1.0" standalone="no"?> <!DOCTYPE module SYSTEM "http://comoblog.sourceforge.net/DTD/comoblog_mod_install.dtd"> <module> - - <name> - mod_markup - </name> - + <name>mod_markup</name> <version>1.0</version> - <minimum_supported>1.0</minimum_supported> - - <certified> - 1.0 - </certified> - - <description> - Post filter module that implements WikiPedia style markup on incoming posts - </description> + <certified>1.0</certified> + <description>Post filter module that implements WikiPedia style markup on incoming posts </description> - <allowed_pos> - not_visible - </allowed_pos> - + <allowed_pos>not_visible</allowed_pos> <filter_posts>Y</filter_posts> <param @@ -36,9 +22,6 @@ /> <version>1.0</version> - <author>Mark Wallis - mw...@se...</author> - <date>2005-10-03</date> - -</module> +</module> \ No newline at end of file |
|
From: iamdecal <iam...@us...> - 2006-11-17 00:47:10
|
Update of /cvsroot/comoblog/comoblog/img/ttf In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29401/img/ttf Log Message: Directory /cvsroot/comoblog/comoblog/img/ttf added to the repository |
|
From: iamdecal <iam...@us...> - 2006-10-22 12:55:35
|
Update of /cvsroot/comoblog/comoblog In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21967 Modified Files: pictureboard.php Log Message: work in progress, ditching this server cos its borked ;( Index: pictureboard.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/pictureboard.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- pictureboard.php 22 Oct 2006 11:44:01 -0000 1.2 +++ pictureboard.php 22 Oct 2006 12:55:27 -0000 1.3 @@ -15,9 +15,6 @@ $dont_show_these =0; * $dont_show_these= CFG_PICTURE_BOARD_NO_SHOW; */ - - - if (!file_exists('include/param.inc'. $_SERVER['SERVER_NAME'].'.php')) { Header ('Location: _install/install.php'); exit; |
|
From: iamdecal <iam...@us...> - 2006-10-22 12:55:32
|
Update of /cvsroot/comoblog/comoblog/img/posts In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21967/img/posts Removed Files: index.php Log Message: work in progress, ditching this server cos its borked ;( --- index.php DELETED --- |
|
From: iamdecal <iam...@us...> - 2006-10-22 12:55:32
|
Update of /cvsroot/comoblog/comoblog/img/topics In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21967/img/topics Removed Files: index.php Log Message: work in progress, ditching this server cos its borked ;( --- index.php DELETED --- |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:53
|
Update of /cvsroot/comoblog/comoblog/rss/posts In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/rss/posts Modified Files: index.htm Log Message: work in progress, ditching this server cos its borked ;( Index: index.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/rss/posts/index.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- index.htm 16 Aug 2006 14:56:41 -0000 1.2 +++ index.htm 22 Oct 2006 11:44:14 -0000 1.3 @@ -1 +1 @@ -<!--#include virtual="modules/mod_rss/rss.php/2.0" --> +<!--#include virtual="/modules/mod_rss2/rss2.php?/2.0" --> |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:53
|
Update of /cvsroot/comoblog/comoblog/rss In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/rss Modified Files: readme.htm Log Message: work in progress, ditching this server cos its borked ;( Index: readme.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/rss/readme.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- readme.htm 16 Aug 2006 14:51:52 -0000 1.1 +++ readme.htm 22 Oct 2006 11:44:09 -0000 1.2 @@ -5,3 +5,7 @@ You may need to change the file extension to .html or .shtml etc depending on which files on your sever will parse virtual includes + +the server also needs to allo executable includes + +//TODO: add this path as an option, dont enforce it. \ No newline at end of file |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:52
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/install In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/modules/mod_fortune_db/install Modified Files: mod_fortune_db.xml Log Message: work in progress, ditching this server cos its borked ;( Index: mod_fortune_db.xml =================================================================== RCS file: /cvsroot/comoblog/modules/mod_fortune_db/install/mod_fortune_db.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_fortune_db.xml 1 Feb 2006 17:28:59 -0000 1.1 +++ mod_fortune_db.xml 22 Oct 2006 11:44:18 -0000 1.2 @@ -1,28 +1,28 @@ <?xml version="1.0" standalone="no"?> <!DOCTYPE module SYSTEM "http://comoblog.sourceforge.net/DTD/comoblog_mod_install.dtd"> <module> - + <name> mod_fortune_db </name> - + <description> displays a random quote or phrase - a lot like mod_fortune, but i wanted a db based one - + </description> <allowed_pos>sidebar</allowed_pos> - <allowed_pos>top</allowed_pos> + <allowed_pos>top</allowed_pos> <version>1.0</version> <minimum_supported>1.0</minimum_supported> <certified> 1.0 </certified> <author>iamdecal iam...@gm... http://www.iamdecal.co.uk</author> - <date>2004-10-15</date> - <dbquery>CREATE TABLE `easymoblog_mod_fortune_db` (`fortune_db_id` int(10) unsigned NOT NULL auto_increment, `fortune_db_content` text default NULL, `fortune_db_added` int(10) unsigned default NULL, `fortune_db_display_order` int(10) unsigned default NULL,`fortune_db_display_count` int(10) unsigned default NULL, PRIMARY KEY (`fortune_db_id`)) TYPE=MyISAM;</dbquery> - + <date>2004-10-15</date> + <dbquery>CREATE TABLE `comoblog_mod_fortune_db` (`fortune_db_id` int(10) unsigned NOT NULL auto_increment, `fortune_db_content` text default NULL, `fortune_db_added` int(10) unsigned default NULL, `fortune_db_display_order` int(10) unsigned default NULL,`fortune_db_display_count` int(10) unsigned default NULL, PRIMARY KEY (`fortune_db_id`)) TYPE=MyISAM;</dbquery> + + - <param name="CFG_MOD_FORTUNE_DB_EXTRASTYLE" description="Any extra style you might want to add, to enable this module to blend in with your site, this will be applied to the DIV that holds the module" @@ -31,9 +31,9 @@ accept_null="Y" value="" restrict_values="" - /> - - + /> + + <param name="CFG_MOD_FORTUNE_DB_COLOR" description="Text Color" @@ -99,8 +99,8 @@ accept_null="N" value="10" restrict_values="8|9|10|11|12|13|14|15|16|17|18|19|20" - /> - + /> + <param name="CFG_MOD_FORTUNE_DB_TITLE" description="The title of this module" @@ -109,7 +109,7 @@ accept_null="Y" value="Random Quote" restrict_values="" - /> - - + /> + + </module> |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:51
|
Update of /cvsroot/comoblog/modules/mod_latest_comments/include In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/modules/mod_latest_comments/include Modified Files: mod_latest_comments.inc.php Log Message: work in progress, ditching this server cos its borked ;( Index: mod_latest_comments.inc.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_latest_comments/include/mod_latest_comments.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mod_latest_comments.inc.php 17 Feb 2006 15:18:49 -0000 1.2 +++ mod_latest_comments.inc.php 22 Oct 2006 11:44:17 -0000 1.3 @@ -4,13 +4,12 @@ else $iisbug = ''; - $query = " -select c.*, p.* from easymoblog_posts p , easymoblog_comments c where p.post_id =c.post_id order by comment_id desc limit 0,".$howmany.";"; + $query = "select c.*, p.* from comoblog_posts p , comoblog_comments c where p.post_id =c.post_id and c.comment_live='Y' order by comment_id desc limit 0,".$howmany.";"; $res = mysql_query($query); if (!$res || !mysql_num_rows($res)) return (false); - + $posts = array(); while ($row = mysql_fetch_array($res)) { $row['post_permalink'] = CFG_SITE_URL.'post.php'.$iisbug.'/'.$row['post_id']; @@ -22,8 +21,8 @@ error_log($row['comment_added']); $posts[] = $row; } - + return ($posts); -} +} ?> \ No newline at end of file |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:51
|
Update of /cvsroot/comoblog/modules/mod_comment_notify/install In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/modules/mod_comment_notify/install Modified Files: mod_comment_notify.xml Log Message: work in progress, ditching this server cos its borked ;( Index: mod_comment_notify.xml =================================================================== RCS file: /cvsroot/comoblog/modules/mod_comment_notify/install/mod_comment_notify.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mod_comment_notify.xml 15 Aug 2006 17:06:04 -0000 1.6 +++ mod_comment_notify.xml 22 Oct 2006 11:44:17 -0000 1.7 @@ -7,11 +7,11 @@ <filter_posts>N</filter_posts> <filter_comments>0</filter_comments> <version>1.0</version> - <minimum_supported>1.0</minimum_supported> + <minimum_supported>1.3</minimum_supported> <certified>1.0</certified> <author>iamdecal iam...@gm... http://www.iamdecal.co.uk</author> <date>2004-04-29</date> - + <param name="CFG_COMMENT_NOTIFY_FROM" description="The address notifications will be sent from" @@ -20,8 +20,8 @@ accept_null="N" value="" /> - - + + <param name="CFG_COMMENT_NOTIFY_FROM_NAME" description="The name notifications will be sent from" @@ -29,9 +29,9 @@ editable="Y" accept_null="N" value="" - /> - - + /> + + <param name="CFG_COMMENT_NOTIFY_TO" description="The addresses notifications will be sent to" @@ -39,8 +39,8 @@ editable="Y" accept_null="N" value="" - /> - + /> + <param name="CFG_COMMENT_NOTIFY_TO_NAME" description="The name notifications will be sent to" @@ -48,10 +48,10 @@ editable="Y" accept_null="N" value="" - /> - - - + /> + + + <param name="CFG_WHERE_IS_SENDMAIL" description="Location of the sendmail program" @@ -59,7 +59,7 @@ editable="Y" accept_null="N" value="/usr/sbin/sendmail" - /> - - + /> + + </module> |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:51
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/include In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/modules/mod_fortune_db/include Modified Files: mod_fortune_db.inc.php Log Message: work in progress, ditching this server cos its borked ;( Index: mod_fortune_db.inc.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_fortune_db/include/mod_fortune_db.inc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mod_fortune_db.inc.php 16 Feb 2006 14:22:19 -0000 1.3 +++ mod_fortune_db.inc.php 22 Oct 2006 11:44:17 -0000 1.4 @@ -1,106 +1,106 @@ -<?php - -function mod_fortune_db() - { - $query = "select fortune_db_id, fortune_db_content from ".CFG_MYSQL_TABPREFIX."mod_fortune_db order by rand() limit 1 "; - $res = mysql_query($query); - $query = "update ".CFG_MYSQL_TABPREFIX."mod_fortune_db set fortune_db_display_count = (fortune_db_display_count +1) where fortune_db_id =". addslashes(mysql_result($res, 0,0)) ; - $res2 = mysql_query($query); - return mysql_result($res, 0,1); - } - - - - -function mod_fortune_db_details ($item_id) { - $query = "select * from ".CFG_MYSQL_TABPREFIX."mod_fortune_db where fortune_db_id = '".$item_id."'"; - $res = mysql_query($query); - - if (!$res || !mysql_num_rows($res)) - return (false); - - $item = mysql_fetch_assoc($res); - - return ($item); -} - - -function mod_fortune_db_list () { - $query = " - select b.* - from ".CFG_MYSQL_TABPREFIX."mod_fortune_db b - order by b.fortune_db_content - "; - $res = mysql_query($query); - - if (!$res || !mysql_num_rows($res)) - return (false); - - $items = array(); - while ($row = mysql_fetch_assoc($res)) - { - $items[] = $row; - } - return ($items); -} - -function mod_fortune_db_add ($item) { - - $query = "select max(fortune_db_display_order)+1 from ".CFG_MYSQL_TABPREFIX."mod_fortune_db"; - $res = mysql_query($query); - $item['fortune_db_display_order'] = mysql_result($res,0,0); - - $item['fortune_db_added'] = time(); - - $query = " - insert into ".CFG_MYSQL_TABPREFIX."mod_fortune_db - ( fortune_db_content, fortune_db_display_count, fortune_db_display_order, fortune_db_added) - values ('". $item['fortune_db_content'] ."', - '". $item['fortune_db_display_count'] ."', - '". $item['fortune_db_display_order']."', - '". $item['fortune_db_added'] ."') - "; - $res = mysql_query($query); - - if (!$res) - return (false); - - $item['id'] = mysql_insert_id(); - - return ($item); -} - -function mod_fortune_db_del ($item_id) { - $query = "delete from ".CFG_MYSQL_TABPREFIX."mod_fortune_db where fortune_db_id = '".$item_id."'"; - $res = mysql_query($query); - - if (!$res) - return (false); - - return (true); -} - -function mod_fortune_db_edit ($item) { - $query = " - update ".CFG_MYSQL_TABPREFIX."mod_fortune_db - set fortune_db_content = '". $item['fortune_db_content'] ."', - fortune_db_display_count = '". $item['fortune_db_display_count'] ."', - fortune_db_display_order = '". $item['fortune_db_display_order']."' - where - fortune_db_id = '". $item['fortune_db_id'] ."' - "; - $res = mysql_query($query); - - if (!$res) - return (false); - - return ($item); -} - -function mod_fortune_db_up ($item_id) { - -} - -function mod_fortune_db_down ($item_id) { - -} +<?php + +function mod_fortune_db() + { + $query = "select fortune_db_id, fortune_db_content from ".CFG_MYSQL_TABPREFIX."mod_fortune_db order by rand() limit 1 "; + $res = mysql_query($query); + $query = "update ".CFG_MYSQL_TABPREFIX."mod_fortune_db set fortune_db_display_count = (fortune_db_display_count +1) where fortune_db_id =". addslashes(mysql_result($res, 0,0)) ; + $res2 = mysql_query($query); + return mysql_result($res, 0,1); + } + + + + +function mod_fortune_db_details ($item_id) { + $query = "select * from ".CFG_MYSQL_TABPREFIX."mod_fortune_db where fortune_db_id = '".$item_id."'"; + $res = mysql_query($query); + + if (!$res || !mysql_num_rows($res)) + return (false); + + $item = mysql_fetch_assoc($res); + + return ($item); +} + + +function mod_fortune_db_list () { + $query = " + select b.* + from ".CFG_MYSQL_TABPREFIX."mod_fortune_db b + order by b.fortune_db_content + "; + $res = mysql_query($query); + + if (!$res || !mysql_num_rows($res)) + return (false); + + $items = array(); + while ($row = mysql_fetch_assoc($res)) + { + $items[] = $row; + } + return ($items); +} + +function mod_fortune_db_add ($item) { + + $query = "select max(fortune_db_display_order)+1 from ".CFG_MYSQL_TABPREFIX."mod_fortune_db"; + $res = mysql_query($query); + $item['fortune_db_display_order'] = mysql_result($res,0,0); + + $item['fortune_db_added'] = time(); + + $query = " + insert into ".CFG_MYSQL_TABPREFIX."mod_fortune_db + ( fortune_db_content, fortune_db_display_count, fortune_db_display_order, fortune_db_added) + values ('". $item['fortune_db_content'] ."', + '". $item['fortune_db_display_count'] ."', + '". $item['fortune_db_display_order']."', + '". $item['fortune_db_added'] ."') + "; + $res = mysql_query($query); + + if (!$res) + return (false); + + $item['id'] = mysql_insert_id(); + + return ($item); +} + +function mod_fortune_db_del ($item_id) { + $query = "delete from ".CFG_MYSQL_TABPREFIX."mod_fortune_db where fortune_db_id = '".$item_id."'"; + $res = mysql_query($query); + + if (!$res) + return (false); + + return (true); +} + +function mod_fortune_db_edit ($item) { + $query = " + update ".CFG_MYSQL_TABPREFIX."mod_fortune_db + set fortune_db_content = '". $item['fortune_db_content'] ."', + fortune_db_display_count = '". $item['fortune_db_display_count'] ."', + fortune_db_display_order = '". $item['fortune_db_display_order']."' + where + fortune_db_id = '". $item['fortune_db_id'] ."' + "; + $res = mysql_query($query); + + if (!$res) + return (false); + + return ($item); +} + +function mod_fortune_db_up ($item_id) { + +} + +function mod_fortune_db_down ($item_id) { + +} |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:51
|
Update of /cvsroot/comoblog/modules/mod_rss2/templates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/modules/mod_rss2/templates Modified Files: rss2.tpl.html Log Message: work in progress, ditching this server cos its borked ;( Index: rss2.tpl.html =================================================================== RCS file: /cvsroot/comoblog/modules/mod_rss2/templates/rss2.tpl.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- rss2.tpl.html 16 Feb 2006 23:09:35 -0000 1.3 +++ rss2.tpl.html 22 Oct 2006 11:44:17 -0000 1.4 @@ -1,13 +1,9 @@ -<!-- BEGIN: main --> -<div id="mod_rss2"> - -Posts Feed<br/> - <a href="/modules/mod_rss2/rss2.php?/2.0" target="_blank" title="rss 2.0 feed"> +<!-- BEGIN: main --> +<div id="mod_rss2"> + <a href="/rss/posts/" target="_blank" alt="rss 2.0 feed" title="rss 2.0 feed"> <img src="/modules/mod_rss2/img/rss_2.0.gif" border="0" alt="rss 2.0 feed"/> </a> -<br/> - Comments Feed<br/> - <a href="/modules/mod_rss2/rss2.php?/c2.0" target="_blank" title="rss 2.0 feed for comments"> + <a href="/rss/comments" target="_blank" alt="rss 2.0 feed for comments" title="rss 2.0 feed for comments"> <img src="/modules/mod_rss2/img/rsscomments.gif" border="0" alt="rss 2.0 feed for comments"/> </a> |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:50
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/templates/top In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/modules/mod_fortune_db/templates/top Modified Files: mod_fortune_db.tpl.htm Log Message: work in progress, ditching this server cos its borked ;( Index: mod_fortune_db.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/modules/mod_fortune_db/templates/top/mod_fortune_db.tpl.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mod_fortune_db.tpl.htm 16 Feb 2006 14:22:20 -0000 1.2 +++ mod_fortune_db.tpl.htm 22 Oct 2006 11:44:09 -0000 1.3 @@ -1,6 +1,6 @@ -<!-- BEGIN: main --> -<div id="mod_fortune_db"> - {MOD_FORTUNE_DB_TITLE} - {MOD_FORTUNE_CONTENT} -</div> -<!-- END: main --> +<!-- BEGIN: main --> +<div id="mod_fortune_db"> + {MOD_FORTUNE_DB_TITLE} + {MOD_FORTUNE_CONTENT} +</div> +<!-- END: main --> |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:50
|
Update of /cvsroot/comoblog/modules/mod_postbydate In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/modules/mod_postbydate Modified Files: add_months_welsh.sql Log Message: work in progress, ditching this server cos its borked ;( Index: add_months_welsh.sql =================================================================== RCS file: /cvsroot/comoblog/modules/mod_postbydate/add_months_welsh.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- add_months_welsh.sql 27 Nov 2005 19:58:46 -0000 1.1 +++ add_months_welsh.sql 22 Oct 2006 11:44:15 -0000 1.2 @@ -16,15 +16,15 @@ */ -insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_01', 'January / Ionawr', 'The text for month 01', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; -insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_02', 'February / Chwefror', 'The text for month 02', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; -insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_03', 'March / Mawrth', 'The text for month 03', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; -insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_04', 'April / Ebrill', 'The text for month 04', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; -insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_05', 'May / Mai', 'The text for month 05', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; -insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_06', 'June / Mehefin', 'The text for month 06', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; -insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_07', 'July / Gorffennaf', 'The text for month 07', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; -insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_08', 'August / Awst', 'The text for month 08', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; -insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_09', 'September / Medi', 'The text for month 09', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; -insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_10', 'October / Hydref', 'The text for month 10', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; -insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_11', 'November / Tachwedd', 'The text for month 11', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; -insert into easymoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_12', 'December / Rhagfyr', 'The text for month 12', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; \ No newline at end of file +insert into comoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_01', 'January / Ionawr', 'The text for month 01', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; +insert into comoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_02', 'February / Chwefror', 'The text for month 02', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; +insert into comoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_03', 'March / Mawrth', 'The text for month 03', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; +insert into comoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_04', 'April / Ebrill', 'The text for month 04', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; +insert into comoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_05', 'May / Mai', 'The text for month 05', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; +insert into comoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_06', 'June / Mehefin', 'The text for month 06', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; +insert into comoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_07', 'July / Gorffennaf', 'The text for month 07', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; +insert into comoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_08', 'August / Awst', 'The text for month 08', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; +insert into comoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_09', 'September / Medi', 'The text for month 09', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; +insert into comoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_10', 'October / Hydref', 'The text for month 10', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; +insert into comoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_11', 'November / Tachwedd', 'The text for month 11', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; +insert into comoblog_preferences ( pref_name, pref_value, pref_description, pref_encrypt, pref_type, pref_restrict_values, pref_accept_null, pref_editable, mod_name ) values ( 'CFG_POSTBYDATE_MONTH_12', 'December / Rhagfyr', 'The text for month 12', 'N', 'text', '', 'N', 'Y', 'mod_postbydate' ) ; \ No newline at end of file |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:50
|
Update of /cvsroot/comoblog/modules/mod_rss2/templates/2.0 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/modules/mod_rss2/templates/2.0 Modified Files: rss2.tpl.xml Log Message: work in progress, ditching this server cos its borked ;( Index: rss2.tpl.xml =================================================================== RCS file: /cvsroot/comoblog/modules/mod_rss2/templates/2.0/rss2.tpl.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- rss2.tpl.xml 16 Feb 2006 23:09:35 -0000 1.2 +++ rss2.tpl.xml 22 Oct 2006 11:44:15 -0000 1.3 @@ -18,6 +18,7 @@ <item> <title>{POST.post_mail_subject}</title> <link>{POST.post_permalink}</link> + <guid>{POST.post_permalink}</guid> <comments>{POST.post_permalink}</comments> <description><![CDATA[ @@ -41,4 +42,4 @@ </item> <!-- END: post --> </channel> -</rss><!-- END: main --> \ No newline at end of file +</rss><!-- END: main --> |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:46
|
Update of /cvsroot/comoblog/modules/mod_rss2/include In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/modules/mod_rss2/include Modified Files: mod_rss2.inc.php Log Message: work in progress, ditching this server cos its borked ;( Index: mod_rss2.inc.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_rss2/include/mod_rss2.inc.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mod_rss2.inc.php 17 Feb 2006 15:18:50 -0000 1.4 +++ mod_rss2.inc.php 22 Oct 2006 11:44:05 -0000 1.5 @@ -5,27 +5,27 @@ $iisbug = ''; $query = " -select c.*, p.post_mail_subject, c.comment_text as post_mail_body,c.comment_added as post_mail_date, c.comment_author_email as post_mail_from from easymoblog_posts p , easymoblog_comments c where p.post_id =c.post_id order by comment_id desc limit 0,".$howmany.";"; +select c.*, p.post_mail_subject, c.comment_text as post_mail_body,c.comment_added as post_mail_date, c.comment_author_email as post_mail_from from comoblog_posts p , comoblog_comments c where p.post_id =c.post_id and c.commnet_live='Y' order by comment_id desc limit 0,".$howmany.";"; $res = mysql_query($query); if (!$res || !mysql_num_rows($res)) return (false); - + $posts = array(); while ($row = mysql_fetch_array($res)) { $row['post_permalink'] = CFG_SITE_URL.'post.php'.$iisbug.'/'.$row['post_id']; if (CFG_USE_FRIENDLY_URLS =="yes"){ $row['postlink'] = CFG_SITE_URL.$row['post_id'] ."/". $row['post_mail_subject']; - } + } $row['post_trackback_ping_url'] = CFG_SITE_URL.'trackback.php'.$iisbug.'/'.$row['post_id']; $row['post_trackback_list'] = CFG_SITE_URL.'trackback.php'.$iisbug.'/'.$row['post_id'].'?__mode=list'; $row['post_trackback_list_rss'] = CFG_SITE_URL.'trackback.php'.$iisbug.'/'.$row['post_id'].'?__mode=rss'; - $row['post_mail_from'] = "hidden"; + $row['post_mail_from'] = "hidden"; $row['post_mail_date_rss'] = gmstrftime("%a, %d %b %Y %T %Z",$row['post_mail_date']); $posts[] = $row; } - + return ($posts); -} +} -?> \ No newline at end of file +?> |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:45
|
Update of /cvsroot/comoblog/modules/mod_pingomatic/install In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/modules/mod_pingomatic/install Modified Files: mod_pingomatic.xml Log Message: work in progress, ditching this server cos its borked ;( Index: mod_pingomatic.xml =================================================================== RCS file: /cvsroot/comoblog/modules/mod_pingomatic/install/mod_pingomatic.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mod_pingomatic.xml 29 Nov 2005 09:08:23 -0000 1.3 +++ mod_pingomatic.xml 22 Oct 2006 11:44:08 -0000 1.4 @@ -5,7 +5,7 @@ <description>auto pingomatic - go here, http://pingomatic.com/ fill in your details as appropriate and do a manual ping to all the services you want to notify, copy the url thats given when you submit the page and add it into the -module config on your blog - every time you make a post, easymoblog will auto ping the ping o matic server</description> +module config on your blog - every time you make a post, comoblog will auto ping the ping o matic server</description> <allowed_pos>not_visible</allowed_pos> <filter_posts>Y</filter_posts> |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:44
|
Update of /cvsroot/comoblog/comoblog/rss/comments In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/rss/comments Modified Files: index.htm Log Message: work in progress, ditching this server cos its borked ;( Index: index.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/rss/comments/index.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- index.htm 16 Aug 2006 14:56:40 -0000 1.2 +++ index.htm 22 Oct 2006 11:44:10 -0000 1.3 @@ -1 +1 @@ -<!--#include virtual="modules/mod_rss/rss.php/c2.0" --> +<!--#include virtual="/modules/mod_rss2/rss2.php?/c2.0" --> |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:43
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/templates/sidebar In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/modules/mod_fortune_db/templates/sidebar Modified Files: mod_fortune_db.tpl.htm Log Message: work in progress, ditching this server cos its borked ;( Index: mod_fortune_db.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/modules/mod_fortune_db/templates/sidebar/mod_fortune_db.tpl.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mod_fortune_db.tpl.htm 16 Feb 2006 14:22:19 -0000 1.2 +++ mod_fortune_db.tpl.htm 22 Oct 2006 11:44:08 -0000 1.3 @@ -1,6 +1,6 @@ -<!-- BEGIN: main --> -<div id="mod_fortune_db"> - {MOD_FORTUNE_DB_TITLE} - {MOD_FORTUNE_CONTENT} -</div> -<!-- END: main --> +<!-- BEGIN: main --> +<div id="mod_fortune_db"> + {MOD_FORTUNE_DB_TITLE} + {MOD_FORTUNE_CONTENT} +</div> +<!-- END: main --> |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:43
|
Update of /cvsroot/comoblog/modules/mod_comment_notify In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/modules/mod_comment_notify Modified Files: mod_comment_notify_comment_filter.php Log Message: work in progress, ditching this server cos its borked ;( Index: mod_comment_notify_comment_filter.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_comment_notify/mod_comment_notify_comment_filter.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- mod_comment_notify_comment_filter.php 15 Aug 2006 17:06:04 -0000 1.8 +++ mod_comment_notify_comment_filter.php 22 Oct 2006 11:44:07 -0000 1.9 @@ -1,52 +1,46 @@ <?php -require_once(dirname(__FILE__).'/include/mod_comment_notify.inc.php'); +require_once (dirname(__FILE__) . +'/include/mod_comment_notify.inc.php'); -$subject ='Blog Comment Added To Post - ' . mod_comment_notify($comment['post_id']); +$subject = 'Blog Comment Added To Post - ' . mod_comment_notify($comment['post_id']); $body = "Message details " . "\n\n"; -$body .='Blog Comment Added To Post - ' . mod_comment_notify($comment['post_id']) ."\n"; -$body .= "Post ID:" . $comment['post_id'] ."\n"; -$body .= "Link: " .CFG_SITE_URL. "post.php?/". $comment['post_id'] ."\n"; -$body .= "From: " . $comment['comment_author'] . " - " . $comment['comment_author_email'] ."\n"; -$body .="\n\n"; -$body .="This comment was added with a state of " . $comment['comment_live'] ."\n"; -$body .="This commenters pre approved state is " . get_commenter_approval_state($comment['comment_author_email']) ."\n"; - - +$body .= 'Blog Comment Added To Post - ' . mod_comment_notify($comment['post_id']) . "\n"; +$body .= "Post ID:" . $comment['post_id'] . "\n"; +$body .= "Link: " . CFG_SITE_URL . "post.php?/" . $comment['post_id'] . "\n"; +$body .= "From: " . $comment['comment_author'] . " - " . $comment['comment_author_email'] . "\n"; +$body .= "\n\n"; +$body .= "This comment was added with a state of " . $comment['comment_live'] . "\n"; +$body .= "This commenters pre approved state is " . get_commenter_approval_state($comment['comment_author_email']) . "\n"; // if the comment is LIVE - give option to hide it. -if ($comment['comment_live'] =="Y"){ - $body .="Click here to HIDE this comment " . - CFG_SITE_URL. "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=N&comment_id=".$comment['comment_id']."\n"; - } - - // if the comment is NOT LIVE - give option to hide it. -if ($comment['comment_live'] =="N"){ - $body .="Click here to SHOW this comment " . - CFG_SITE_URL. "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=Y&comment_id=".$comment['comment_id']."\n"; - } - - $body .="Click here to HIDE this AND ALL FUTURE comments from this commenters " . - CFG_SITE_URL. "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=N&preAuth=N&comment_id=".$comment['comment_id']."\n"; - - - $body .="Click here to SHOW this AND ALL FUTURE comments from this commenters " . - CFG_SITE_URL. "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=Y&preAuth=Y&comment_id=".$comment['comment_id']."\n"; - -$body .="\n\nFor Clarity - This will not affect comments posted before these links are clicked,\n\n"; - -$body .="\n\n\n"; -$body .= "Comment:\n\n" . filter_html($comment['comment_text']) ."\n"; -$body .="\n\n\n"; +if ($comment['comment_live'] == "Y") { + $body .= "Click here to HIDE this comment " . + CFG_SITE_URL . "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=N&comment_id=" . $comment['comment_id'] . "\n"; +} +// if the comment is NOT LIVE - give option to hide it. +if ($comment['comment_live'] == "N") { + $body .= "Click here to SHOW this comment " . + CFG_SITE_URL . "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=Y&comment_id=" . $comment['comment_id'] . "\n"; +} -$headerstring = "MIME-Version: 1.0\r\n". - "Content-type: text/plain; charset=iso-8859-1\r\n". - "From: ".CFG_COMMENT_NOTIFY_FROM_NAME."<".CFG_COMMENT_NOTIFY_FROM.">\r\n". - "To: ".CFG_COMMENT_NOTIFY_TO_NAME."<".CFG_COMMENT_NOTIFY_TO.">\r\n". - "Date: ".date("r")."\r\n". - "Subject: ".$subject."\r\n"; +$body .= "Click here to HIDE this AND ALL FUTURE comments from this commenters " . +CFG_SITE_URL . "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=N&preAuth=N&comment_id=" . $comment['comment_id'] . "\n"; -mail($recipients, $subject, $body,$headerstring); +$body .= "Click here to SHOW this AND ALL FUTURE comments from this commenters " . +CFG_SITE_URL . "/modules/mod_comment_notify/quickcomment.php?qp=CFG_COMMENTS_QUICK_PASS&setLive=Y&preAuth=Y&comment_id=" . $comment['comment_id'] . "\n"; +$body .= "\n\nFor Clarity - This will not affect comments posted before these links are clicked,\n\n"; +$body .= "\n\n\n"; +$body .= "Comment:\n\n" . filter_html($comment['comment_text']) . "\n"; +$body .= "\n\n\n"; + +$headerstring = "MIME-Version: 1.0\n" . "Content-type: text/plain; charset=iso-8859-1\n" . +"From: " . CFG_COMMENT_NOTIFY_FROM_NAME . "<" . CFG_COMMENT_NOTIFY_FROM . ">\n" . +"To: " . CFG_COMMENT_NOTIFY_TO_NAME . "<" . CFG_COMMENT_NOTIFY_TO . ">\n" . +"Date: " . date("r") . "\n" . +"Subject: " . $subject . "\n"; +error_log($recipients, $subject, $body, $headerstring); +mail($recipients, $subject, $body, $headerstring); ?> |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:37
|
Update of /cvsroot/comoblog/comoblog/admin/templates In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/admin/templates Modified Files: post_edit.tpl.htm manage_comments.tpl.htm comment_edit.tpl.htm Log Message: work in progress, ditching this server cos its borked ;( Index: manage_comments.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/templates/manage_comments.tpl.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- manage_comments.tpl.htm 16 Aug 2006 01:27:28 -0000 1.1 +++ manage_comments.tpl.htm 22 Oct 2006 11:44:03 -0000 1.2 @@ -1,61 +1,64 @@ -<!-- BEGIN: main --> -{FILE "templates/header.tpl.htm"} - -<table width="760" align="center" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td valign="middle"><p><img src="img/posts.gif" border="0" align="absmiddle"> <b>MANAGE POSTS</b></p></td> - </tr> -</table> -<br /> - -<table width="760" align="center" border="0" cellspacing="0" cellpadding="0" style="border: 1px solid black;"> -<tr> -<td valign="middle" height="40"><p><a href="post_add.php" onclick="void open_popup(this.href,600,600); return false;" title="Add new post"><img src="img/add.gif" border="0" align="absmiddle"></a> <b><a href="post_add.php" onclick="void open_popup(this.href,600,500); return false;" title="Add new post">ADD NEW POST</a></b></p></td> -</tr> -</table> - -<br /> <br /> - -<table border="0" width="760" align="center" cellspacing="0" cellpadding="4" style="border:1px solid black;"> - <!-- BEGIN: deleted --> - <tr> - <td colspan="5" align="center" height="40" valign="middle" class="bigger"> - <img src="img/ok.gif" width="40" height="40" alt="" border="0" align="absmiddle"> Post deleted succesfully! - </td> - </tr> - <!-- END: deleted --> - -<!-- BEGIN: no_posts --> - <tr> - <td class="bigger"><br /><b>No posts in your blog</b><br /> </td> - </tr> - <tr> - <td>If you want to add a new post to your CoMoblog site, just write an email message to the account you specified during Installation process.<br />Contents of the email message will be published.<br /> </td> - </tr> -</table> -<!-- END: no_posts --> - -<!-- BEGIN: posts --> -<tr> - <td colspan="5" class="bigger" style="border-bottom: 1px solid black" valign="middle">Posts: {FIRST} - {LAST} ({TOTAL} total)</td> -</tr> -<!-- BEGIN: post --> -<tr bgcolor="{BGCOLOR}"> - <td valign="top"><b>{POST.post_mail_subject}</b></td> - <td valign="top">{POST.post_mail_from}</td> - <td valign="top">{POST.post_mail_date}</td> - <td align="right"><a href="post_edit.php?i={POST.post_id}&o={OFFSET}" onclick="void open_popup(this.href,600,500); return false;" title="edit post"><img src="img/edit.gif" border="0" alt="edit post"></a> <a href="post_del.php?i={POST.post_id}&o={OFFSET}" onclick="if (confirm('Are you sure you want to delete this item? ({POST.post_mail_subject})')) document.location.href=this.href; else return false;" title="delete post"><img src="img/delete.gif" border="0" alt="delete post"></a></td> -</tr> -<!-- END: post --> -</table> -<table border="0" width="760" align="center" cellspacing="0" cellpadding="4"> -<tr> - <td width="50%" align="left"><!-- BEGIN: prev --><a href="manage_posts.php?o={PREV_OFFSET}" title="previous posts"><img src="img/left.gif" width="24" height="24" alt="previous posts" border="0"></a><!-- END: prev --></td> - <td width="50%" align="right"><!-- BEGIN: next --><a href="manage_posts.php?o={NEXT_OFFSET}" title="next posts"><img src="img/right.gif" width="24" height="24" alt="next posts" border="0"></a><!-- END: next --></td> -</tr> -</table> -<!-- END: posts --> - - -{FILE "templates/footer.tpl.htm"} -<!-- END: main --> +<!-- BEGIN: main --> +{FILE "templates/header.tpl.htm"} + +<table width="760" align="center" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td valign="middle"><p><img src="img/comments.gif" border="0" align="absmiddle"> <b>MANAGE Comments</b></p></td> + </tr> +</table> +<br /> + +<table width="760" align="center" border="0" cellspacing="0" cellpadding="0" style="border: 1px solid black;"> +<tr> +<td valign="middle" height="40"><p><!--a href="comment_add.php" onclick="void open_popup(this.href,600,600); return false;" title="Add new comment"><img src="img/add.gif" border="0" align="absmiddle"></a> <b><a href="comment_add.php" onclick="void open_popup(this.href,600,500); return false;" title="Add new comment">ADD NEW COMMENT</a--></b></p></td> +</tr> +</table> + +<br /> <br /> + +<table border="0" width="760" align="center" cellspacing="0" cellpadding="4" style="border:1px solid black;"> + <!-- BEGIN: deleted --> + <tr> + <td colspan="5" align="center" height="40" valign="middle" class="bigger"> + <img src="img/ok.gif" width="40" height="40" alt="" border="0" align="absmiddle"> COMMENT deleted succesfully! + </td> + </tr> + <!-- END: deleted --> + +<!-- BEGIN: no_comments --> + <tr> + <td class="bigger"><br /><b>No Comments in your blog</b><br /> </td> + </tr> + <!-- tr> + <td>If you want to add a new comment to your CoMoblog site, just write an email message to the account you specified during Installation process.<br />Contents of the email message will be published.<br /> </td> + </tr--> +</table> +<!-- END: no_comments --> + +<!-- BEGIN: comments --> +<tr> + <td colspan="5" class="bigger" style="border-bottom: 1px solid black" valign="middle">Comments: {FIRST} - {LAST} ({TOTAL} total)</td> +</tr> +<!-- BEGIN: COMMENT --> +<tr bgcolor="{BGCOLOR}"> + <td valign="top"><b>{COMMENT.comment_title}</b></td> + <td valign="top">{COMMENT.comment_author}</td> + <td valign="top">{COMMENT.comment_added}</td> + <td valign="top">{COMMENT.comment_live}</td> + <td align="right"> + <a href="comment_edit.php?i={COMMENT.comment_id}&o={OFFSET}" onclick="void open_popup(this.href,600,500); return false;" title="edit comment"><img src="img/edit.gif" border="0" alt="edit comment"></a> + <a href="comment_del.php?i={COMMENT.comment_id}&o={OFFSET}" onclick="if (confirm('Are you sure you want to delete this item? ({COMMENT.commnet_title})')) document.location.href=this.href; else return false;" title="delete comment"><img src="img/delete.gif" border="0" alt="delete comment"></a></td> +</tr> +<!-- END: COMMENT --> +</table> +<table border="0" width="760" align="center" cellspacing="0" cellpadding="4"> +<tr> + <td width="50%" align="left"><!-- BEGIN: prev --><a href="manage_Comments.php?o={PREV_OFFSET}" title="previous Comments"><img src="img/left.gif" width="24" height="24" alt="previous Comments" border="0"></a><!-- END: prev --></td> + <td width="50%" align="right"><!-- BEGIN: next --><a href="manage_Comments.php?o={NEXT_OFFSET}" title="next Comments"><img src="img/right.gif" width="24" height="24" alt="next Comments" border="0"></a><!-- END: next --></td> +</tr> +</table> +<!-- END: comments --> + + +{FILE "templates/footer.tpl.htm"} +<!-- END: main --> Index: post_edit.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/templates/post_edit.tpl.htm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- post_edit.tpl.htm 11 Dec 2005 12:19:02 -0000 1.5 +++ post_edit.tpl.htm 22 Oct 2006 11:44:03 -0000 1.6 @@ -31,8 +31,8 @@ <select name="post_ctype"> <option value="{POST.post_ctype}" selected >No change ({POST.post_ctype})</option> <option value="text/plain">text/plain</option> - <option value="text/html">text/html</option> - </select> + <option value="text/html">text/html</option> + </select> </p> </td> </tr> @@ -67,7 +67,7 @@ <input type="text" name="post_mail_date" value="{POST.post_mail_date}" size="40"><br /> </p> </td> - </tr> + </tr> <!-- BEGIN: images --> <tr> <td colspan="3"><b>IMAGES:</b></td> @@ -107,7 +107,7 @@ </td> <td align="right" valign="middle"> delete: <input type="checkbox" name="comment_delete_{COUNTER}" value="{COMMENT.comment_id}"> - </tr> + </tr> <!-- END: comment --> <!-- END: comments --> <tr> Index: comment_edit.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/templates/comment_edit.tpl.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- comment_edit.tpl.htm 16 Aug 2006 01:27:28 -0000 1.1 +++ comment_edit.tpl.htm 22 Oct 2006 11:44:03 -0000 1.2 @@ -1,144 +1,47 @@ <!-- BEGIN: main --> {FILE "templates/mod_popup_header.tpl.htm"} -<form action="{ACTION}" method="POST" enctype="multipart/form-data"> -<input type="hidden" name="post_id" value="{POST.post_id}"> -<input type="hidden" name="post_ctype" value="{POST.post_ctype}"> -<input type="hidden" name="post_images" value="{POST.post_images}"> - -<table border="0" width="550" cellspacing="0" cellpadding="10" align="center"> - <tr> - <td class="bigger" colspan="3"> - <p><b>EDIT POST</b></p> - </td> - </tr> - <!-- BEGIN: topics --> - <tr> - <td colspan="3"> - <p>Topic:<br /> - <select name="topic_id"> - <option value="">- none -</option> - <!-- BEGIN: topic --> - <option value="{TOPIC.topic_id}"<!-- BEGIN: selected --> selected<!-- END: selected -->>{TOPIC.topic_name}</option> - <!-- END: topic --> - </select> - </p> - </td> - </tr> - <!-- END: topics --> - <tr> - <td colspan="3"> - <p>Type:<br /> - <select name="post_ctype"> - <option value="{POST.post_ctype}" selected >No change ({POST.post_ctype})</option> - <option value="text/plain">text/plain</option> - <option value="text/html">text/html</option> - </select> - </p> - </td> - </tr> - <tr> - <td colspan="3"> - <p>Subject:<br /> - <input type="text" name="post_mail_subject" value="{POST.post_mail_subject}" maxlength="255" size="40" style="width:550px;"> - </p> - </td> - </tr> - <tr> - <td colspan="3"> - <p>Body:<br /> - <textarea name="post_mail_body" style="width:550px;" cols="50" rows="7" wrap="virtual">{POST.post_mail_body}</textarea><br>(HTML allowed) - </p> - </td> - </tr> - <tr> - <td colspan="3"> - <p>Posted by:<br /> - <input type="text" name="post_mail_from" value="{POST.post_mail_from}" maxlength="255" size="40" style="width:550px;"> - </p> - </td> - </tr> - <tr> - <td colspan="3"> - <p>Date Posted:<br /> - <input type="radio" name="post_date_option" value="keep" checked>Don't change</input> - <input type="hidden" name="post_mail_date_orig" value="{POST.post_mail_date}"> <br /> - <input type="radio" name="post_date_option" value="now">Now</input><br /> - <input type="radio" name="post_date_option" value="change">Change to:</input> - <input type="text" name="post_mail_date" value="{POST.post_mail_date}" size="40"><br /> - </p> - </td> - </tr> - <!-- BEGIN: images --> - <tr> - <td colspan="3"><b>IMAGES:</b></td> - </tr> - <!-- BEGIN: image --> - <tr> - <td valign="middle"> - Image {COUNTER_TXT} <a target="_blank" href="../img/posts/{IMAGE.img_id}.{IMAGE.img_extension}">[view]</a> - <input type="hidden" name="image_id_{COUNTER}" value="{IMAGE.img_id}"> - <input type="hidden" name="image_ext_{COUNTER}" value="{IMAGE.img_extension}"> - </td> - - <td valign="middle"> - substitute: <input type="file" name="image_file_{COUNTER}" /> - </td> - - <td align="right" valign="middle"> - delete: <input type="checkbox" name="image_delete_{COUNTER}" value="{IMAGE.img_id}"> - </td> - </tr> - <!-- END: image --> - <!-- END: images --> - <!-- BEGIN: comments --> - <tr> - <td colspan="3"><b>COMMENTS:</b></td> - </tr> - <!-- BEGIN: comment --> - <tr> - <td valign="middle"> - Author: <input type="text" size="20" name="comment_author_{COUNTER}" value="{COMMENT.comment_author}"> - <input type="hidden" name="comment_id_{COUNTER}" value="{COMMENT.comment_id}"> - </td> - <td valign="top"> - <table><tr><td valign="top">Comment: </td> - <td><textarea name="comment_text_{COUNTER}">{COMMENT.comment_text} - </textarea></td></tr></table> - </td> - <td align="right" valign="middle"> - delete: <input type="checkbox" name="comment_delete_{COUNTER}" value="{COMMENT.comment_id}"> - </tr> - <!-- END: comment --> - <!-- END: comments --> - <tr> - <td align="right" colspan="3"><input type="image" src="img/save_big.gif" border="0" onClick="this.src='img/save_wait.gif';"> </td> - </tr> -</table> - -<br /> - -<p align="center"></p> - +<div class="comment"> +<form action="{ACTION}" method="POST"> +<input type="hidden" name="post_id" value="{FORM.post_id}" /> +<!-- TODO: change lang for all of these --> +<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 /> - -<!-- BEGIN: errors --> -<script> - var errmsg = "WARNING\n"; - <!-- BEGIN: error --> - errmsg += "\n{ERROR}"; +<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 --> - alert (errmsg); + errors += '{ERROR}\n'; + <!-- END: error --> + alert (errors); </script> -<!-- END: errors --> - - - - - - - -</form> - - +<!-- END: form_errors --> +</div> {FILE "templates/footer.tpl.htm"} <!-- END: main --> |
|
From: iamdecal <iam...@us...> - 2006-10-22 11:44:36
|
Update of /cvsroot/comoblog/comoblog/_install In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv27709/_install Modified Files: upgrade_3.php patch_1.php step_1.php Log Message: work in progress, ditching this server cos its borked ;( Index: patch_1.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/_install/patch_1.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- patch_1.php 17 Feb 2006 15:16:36 -0000 1.2 +++ patch_1.php 22 Oct 2006 11:44:02 -0000 1.3 @@ -1,35 +1,37 @@ -<?php -require ('../include/xtemplate.inc.php'); -require_once (dirname(__FILE__).'/../include/config.inc.php'); - -$query = "select pref_value from ".CFG_MYSQL_TABPREFIX."preferences where pref_name='CFG_VERSION'"; -$res = mysql_query($query); - -$row = mysql_fetch_array($res, MYSQL_NUM); -$ver = $row[0]; - -$errors = array(); - -if ($ver = "1.0") - $errors = run_script(dirname(__FILE__)."/upgrades/1.0_to_1.1.xml"); - -if ($ver = "1.1") - $errors = run_script(dirname(__FILE__)."/upgrades/1.1_to_1.2.xml"); - - -if (count($errors) == 0) -{ - Header ('Location: patch_2.php'); -} -else -{ - $tpl = @new XTemplate ('templates/patch_1.tpl.htm', 'main'); - foreach ($errors as $k => $v) { - $tpl->assign('ERROR', $v); - $tpl->parse('main.errors.error'); - } - $tpl->parse('main.errors'); - $tpl->parse('main'); - $tpl->out('main'); -} -?> +<?php +require ('../include/xtemplate.inc.php'); +require_once (dirname(__FILE__).'/../include/config.inc.php'); + +$query = "select pref_value from ".CFG_MYSQL_TABPREFIX."preferences where pref_name='CFG_VERSION'"; +$res = mysql_query($query); + +$row = mysql_fetch_array($res, MYSQL_NUM); +$ver = $row[0]; + +$errors = array(); + +if ($ver = "1.0") + $errors = run_script(dirname(__FILE__)."/upgrades/1.0_to_1.1.xml"); + +if ($ver = "1.1") + $errors = run_script(dirname(__FILE__)."/upgrades/1.1_to_1.2.xml"); + + if ($ver = "1.2") + $errors = run_script(dirname(__FILE__)."/upgrades/1.2_to_1.3.xml"); + +if (count($errors) == 0) +{ + Header ('Location: patch_2.php'); +} +else +{ + $tpl = @new XTemplate ('templates/patch_1.tpl.htm', 'main'); + foreach ($errors as $k => $v) { + $tpl->assign('ERROR', $v); + $tpl->parse('main.errors.error'); + } + $tpl->parse('main.errors'); + $tpl->parse('main'); + $tpl->out('main'); +} +?> Index: upgrade_3.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/_install/upgrade_3.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- upgrade_3.php 20 Nov 2005 08:01:35 -0000 1.4 +++ upgrade_3.php 22 Oct 2006 11:44:02 -0000 1.5 @@ -1,82 +1,82 @@ -<?php -require ('../include/xtemplate.inc.php'); -require('../admin/include/xml2array.inc.php'); -require_once (dirname(__FILE__).'/../include/config.inc.php'); -require_once (dirname(__FILE__).'/../admin/include/modules.inc.php'); - -$tpl = @new XTemplate ('templates/upgrade_3.tpl.htm', 'main'); - -session_start(); - -$old_path = $_SESSION['old_path']."/modules"; -$new_path = $_SESSION['new_path']."/modules"; - -$migrated = 0; -$upgraded = 0; -$new_path = $_SESSION['new_path']."/modules"; - -$migrated = 0; -$upgraded = 0; -$uncertified = 0; - -if (is_dir($old_path)) { - $dh = opendir($old_path); - while (($dir = readdir($dh)) != false) { - if (strpos($dir, "mod_") !== FALSE && file_exists($old_path."/".$dir."/install/".$dir.".xml")) { - if (is_dir($new_path."/".$dir) == FALSE) { - module_deactivate_by_name($dir); - if (is_module_certified($dir)) - $tpl->assign('MODULE', $dir); - else { - $tpl->assign('MODULE', $dir." (uncertified)"); - $uncertified++; - } - $tpl->parse('main.migrated.module'); - $migrated++; - } - else { - $compare = compare_module_version($dir); - - if ($compare > 0) { - $module_install = module_install($dir); - if (!$module_install) { - if (is_module_certified($dir)) - $tpl->assign('MODULE', $dir); - else { - module_deactivate_by_name($dir); - $tpl->assign('MODULE', $dir." (uncertified)"); - $uncertified++; - } - $tpl->parse('main.upgraded.module'); - $upgraded++; - } - } - else if ($compare < 0) { - module_deactivate_by_name($dir); - if (is_module_certified($dir)) - $tpl->assign('main.migrated.module', $dir); - else { - $tpl->assign('main.migrated.module', $dir." (uncertified)"); - $uncertified++; - } - $tpl->parse('main.migrated.module'); - $migrated++; - } - } - } - } -} - -if ($upgraded > 0) - $tpl->parse('main.upgraded'); -if ($migrated > 0) - $tpl->parse('main.migrated'); -if ($uncertified > 0) - $tpl->parse('main.uncertified'); - -if ($upgraded == 0 && $migrated == 0 && $uncertified == 0) - $tpl->parse('main.nothing'); - -$tpl->parse('main'); -$tpl->out('main'); -?> +<?php +require ('../include/xtemplate.inc.php'); +require_once('../admin/include/xml2array.inc.php'); +require_once (dirname(__FILE__).'/../include/config.inc.php'); +require_once (dirname(__FILE__).'/../admin/include/modules.inc.php'); + +$tpl = @new XTemplate ('templates/upgrade_3.tpl.htm', 'main'); + +session_start(); + +$old_path = $_SESSION['old_path']."/modules"; +$new_path = $_SESSION['new_path']."/modules"; + +$migrated = 0; +$upgraded = 0; +$new_path = $_SESSION['new_path']."/modules"; + +$migrated = 0; +$upgraded = 0; +$uncertified = 0; + +if (is_dir($old_path)) { + $dh = opendir($old_path); + while (($dir = readdir($dh)) != false) { + if (strpos($dir, "mod_") !== FALSE && file_exists($old_path."/".$dir."/install/".$dir.".xml")) { + if (is_dir($new_path."/".$dir) == FALSE) { + module_deactivate_by_name($dir); + if (is_module_certified($dir)) + $tpl->assign('MODULE', $dir); + else { + $tpl->assign('MODULE', $dir." (uncertified)"); + $uncertified++; + } + $tpl->parse('main.migrated.module'); + $migrated++; + } + else { + $compare = compare_module_version($dir); + + if ($compare > 0) { + $module_install = module_install($dir); + if (!$module_install) { + if (is_module_certified($dir)) + $tpl->assign('MODULE', $dir); + else { + module_deactivate_by_name($dir); + $tpl->assign('MODULE', $dir." (uncertified)"); + $uncertified++; + } + $tpl->parse('main.upgraded.module'); + $upgraded++; + } + } + else if ($compare < 0) { + module_deactivate_by_name($dir); + if (is_module_certified($dir)) + $tpl->assign('main.migrated.module', $dir); + else { + $tpl->assign('main.migrated.module', $dir." (uncertified)"); + $uncertified++; + } + $tpl->parse('main.migrated.module'); + $migrated++; + } + } + } + } +} + +if ($upgraded > 0) + $tpl->parse('main.upgraded'); +if ($migrated > 0) + $tpl->parse('main.migrated'); +if ($uncertified > 0) + $tpl->parse('main.uncertified'); + +if ($upgraded == 0 && $migrated == 0 && $uncertified == 0) + $tpl->parse('main.nothing'); + +$tpl->parse('main'); +$tpl->out('main'); +?> Index: step_1.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/_install/step_1.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- step_1.php 16 Aug 2006 01:12:41 -0000 1.5 +++ step_1.php 22 Oct 2006 11:44:02 -0000 1.6 @@ -1,239 +1,239 @@ -<?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 (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.php', 'w'); - fwrite($fp, $config); - fclose($fp); - - @chmod (dirname(__FILE__).'/../include/param.inc.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) + { + // 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'); +?> |