comoblog-commit Mailing List for CoMoblog Mobile Blog Application (Page 18)
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...> - 2005-12-11 21:53:17
|
Update of /cvsroot/comoblog/modules/mod_prevnext/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21789/mod_prevnext/include Modified Files: mod_prevnext.inc.php Log Message: checked. and cant see why this is failing... could use a fresh pair of eyes. NOTE THAT IVE LEFT DEBUG INFO IN PLACE it seems to be randomly failing in two places - one is the SQL in include/mod_prevnext.inc.php - which is identical to the previous version apart from the white spacing - as commited this code works for me, so please check and let me know - it could be that i've removed a typo that i just cant see in the diffs The other place it fails is in mod_prevnext.php it seems that sometimes it wont get the post id from the url - the code is the same as on post.php but with an additional check to make sure that its only on post.php. i just cant see why its failing ;-( Index: mod_prevnext.inc.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_prevnext/include/mod_prevnext.inc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_prevnext.inc.php 28 Nov 2005 10:31:35 -0000 1.1 +++ mod_prevnext.inc.php 11 Dec 2005 21:53:04 -0000 1.2 @@ -6,21 +6,16 @@ $iisbug = ''; } - $query = " - select p.post_id as next_post_id - from ".CFG_MYSQL_TABPREFIX."posts p - where p.post_id > '".$post_id."' - order by p.post_id limit 1; - "; + $query = "select p.post_id as next_post_id from ".CFG_MYSQL_TABPREFIX."posts p where p.post_id > '".$post_id."' order by p.post_id limit 1"; $res = mysql_query($query); - + echo mysql_errno() . ": " . mysql_error(). ":" .$query . "<hr>\n"; if (!$res || !mysql_num_rows($res)){ return (false); } $post = mysql_fetch_array($res); $returnval = CFG_SITE_URL.'post.php'.$iisbug.'/'.$post['next_post_id']; - # echo $returnval; + echo $returnval; return ($returnval); } @@ -32,21 +27,16 @@ $iisbug = ''; } - $query = " - select p.post_id as prev_post_id - from ".CFG_MYSQL_TABPREFIX."posts p - where p.post_id < '".$post_id."' - order by p.post_id desc limit 1; - "; + $query = "select p.post_id as prev_post_id from ".CFG_MYSQL_TABPREFIX."posts p where p.post_id < '".$post_id."' order by p.post_id desc limit 1"; $res = mysql_query($query); - + echo mysql_errno() . ": " . mysql_error(). ":" .$query . "<hr>\n"; if (!$res || !mysql_num_rows($res)){ return (false); } $post = mysql_fetch_array($res); $returnval = CFG_SITE_URL.'post.php'.$iisbug.'/'.$post['prev_post_id']; - # echo $returnval; + echo $returnval; return ($returnval); } |
|
From: iamdecal <iam...@us...> - 2005-12-11 19:16:29
|
Update of /cvsroot/comoblog/modules/mod_wordswapper/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25044/mod_wordswapper/install Modified Files: mod_wordswapper.xml Log Message: re commit - dosnt appear to have been saved to cvs properly Index: mod_wordswapper.xml =================================================================== RCS file: /cvsroot/comoblog/modules/mod_wordswapper/install/mod_wordswapper.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_wordswapper.xml 28 Nov 2005 10:54:55 -0000 1.1 +++ mod_wordswapper.xml 11 Dec 2005 19:16:15 -0000 1.2 @@ -1,30 +1,22 @@ <?xml version="1.0" standalone="no"?> -<!DOCTYPE module SYSTEM "http://easymoblog.sourceforge.net/DTD/easymoblog_mod_install.dtd"> +<!DOCTYPE module SYSTEM "http://comoblog.sourceforge.net/DTD/comoblog_mod_install.dtd"> <module> - - <name>mod_wordswapper</name> - + <name>mod_wordswapper</name> <description>Swaps out words in posted comments.</description> - <allowed_pos>not_visible</allowed_pos> - <filter_posts>N</filter_posts> - <filter_comments>Y</filter_comments> - - <version>0.5</version> - - <author>iamdecal (iam...@gm...)</author> - + <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>2005-02-01</date> - <param name="CFG_WORDSWAP_LIST" - description="a comma seperated list of pipe delimited things to swap. i.e. this | that , him | her , that | them , foo | bah note the space at each side of each word other wise the matches will also take place inside of words. (unless like me that's what you need to happen)" + description="A comma seperated list of pipe delimited things to swap ie this|that,him|her,that|them,foo|bah, NB you need to put the longest match first in the list, also needs improving to cope with white space better" type="text" editable="Y" accept_null="N" - value=" foo | bah , ping | pang , woo yay | hoopla " + value="" /> - </module> \ No newline at end of file |
|
From: iamdecal <iam...@us...> - 2005-12-11 19:16:26
|
Update of /cvsroot/comoblog/modules/mod_wordswapper/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25044/mod_wordswapper/include Modified Files: mod_wordswapper.inc.php Log Message: re commit - dosnt appear to have been saved to cvs properly Index: mod_wordswapper.inc.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_wordswapper/include/mod_wordswapper.inc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_wordswapper.inc.php 28 Nov 2005 10:54:55 -0000 1.1 +++ mod_wordswapper.inc.php 11 Dec 2005 19:16:15 -0000 1.2 @@ -1,16 +1,16 @@ <?php function mod_wordswapper ($body) { - if (CFG_WORDSWAP_LIST == '') + if (CFG_WORDSWAP_LIST == ''){ return ($body); + } // get a list of all the things we want to swap $fragments = explode("," , CFG_WORDSWAP_LIST); - foreach ($fragments as $piece) + foreach ($fragments as $piece) { // foreach one - split the good from the bad - { - list($badword, $goodword) = explode("|", $piece); - //and swap the bad word for the good word - $body = str_replace($badword, $goodword, $body); - } + list($badword, $goodword) = explode("|", $piece); + //and swap the bad word for the good word + $body = str_replace($badword, $goodword, $body); + } return ($body); } ?> \ No newline at end of file |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-12-11 12:22:48
|
Update of /cvsroot/comoblog/comoblog/_install/upgrades In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14153 Modified Files: 0.5.1_to_1.0.xml Added Files: 1.0_to_1.1.xml Log Message: Move 1.1 db changes into specific 1.0-to-1.1 upgrade script Index: 0.5.1_to_1.0.xml =================================================================== RCS file: /cvsroot/comoblog/comoblog/_install/upgrades/0.5.1_to_1.0.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- 0.5.1_to_1.0.xml 1 Dec 2005 14:57:55 -0000 1.5 +++ 0.5.1_to_1.0.xml 11 Dec 2005 12:22:30 -0000 1.6 @@ -56,9 +56,6 @@ <dbquery> insert into comoblog_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, mod_name) VALUES ('CFG_MAIL_APOP', 'no', 'POP3 enable APOP protocol', 4, 'N', 'select', 'no|yes', 'N', 'Y', 4, ''); </dbquery> - <dbquery> - insert into comoblog_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, mod_name) VALUES ('CFG_INTERACTION_HTML_COMMENTS', 'no', 'Allow HTML Comments', 4, 'N', 'select', 'no|yes', 'N', 'Y', 5, ''); - </dbquery> </comoblog_upgrade> --- NEW FILE: 1.0_to_1.1.xml --- <?xml version="1.0" standalone="yes"?> <comoblog_upgrade> <dbquery> insert into comoblog_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, mod_name) VALUES ('CFG_INTERACTION_HTML_COMMENTS', 'no', 'Allow HTML Comments', 4, 'N', 'select', 'no|yes', 'N', 'Y', 5, ''); </dbquery> </comoblog_upgrade> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-12-11 12:19:14
|
Update of /cvsroot/comoblog/comoblog/admin/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12451 Modified Files: post_edit.tpl.htm Log Message: Interface neatness Index: post_edit.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/templates/post_edit.tpl.htm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- post_edit.tpl.htm 7 Dec 2005 21:04:49 -0000 1.4 +++ post_edit.tpl.htm 11 Dec 2005 12:19:02 -0000 1.5 @@ -29,7 +29,7 @@ <td colspan="3"> <p>Type:<br /> <select name="post_ctype"> - <option value="{POST.post_ctype}" selected >No change({POST.post_ctype})</option> + <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> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-12-11 12:17:11
|
Update of /cvsroot/comoblog/comoblog/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11876 Modified Files: CHANGELOG Log Message: Changelog updates Index: CHANGELOG =================================================================== RCS file: /cvsroot/comoblog/comoblog/docs/CHANGELOG,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- CHANGELOG 29 Nov 2005 11:19:50 -0000 1.29 +++ CHANGELOG 11 Dec 2005 12:16:59 -0000 1.30 @@ -3,6 +3,8 @@ Patch release to resolve some issues. * FEATURE: Ability to edit comments (1347626) +* FEATURE: Ability to edit post ctypes +* FEATURE: Initial support for 3g2 video * MODULE: Updated mod_calendar to 1.1 * MODULE: Updated mod_search to 1.1 * BUG: Module upgrade tries to upgrade half-written modules |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-12-11 12:14:18
|
Update of /cvsroot/comoblog/comoblog In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11056 Modified Files: index.php post.php Log Message: Rolled in support for 3g2 video files - from Bill Chambers and David Bennett Index: post.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/post.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- post.php 16 Aug 2005 05:49:43 -0000 1.1.1.1 +++ post.php 11 Dec 2005 12:14:00 -0000 1.2 @@ -33,7 +33,11 @@ $res = mysql_query($query); while ($row = mysql_fetch_assoc($res)) { - if ($row['img_thumb'] == 'Y') { + if (eregi('\.3g2',$row['img_name'])) { + $tpl->assign('IMAGE', $row); + $tpl->parse('main.post.video_3g2'); + } + else if ($row['img_thumb'] == 'Y') { $tpl->assign('IMAGE', $row); $tpl->parse('main.post.thumb_img'); } Index: index.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/index.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- index.php 16 Aug 2005 05:49:43 -0000 1.1.1.1 +++ index.php 11 Dec 2005 12:14:00 -0000 1.2 @@ -69,7 +69,11 @@ $res = mysql_query($query); while ($row = mysql_fetch_assoc($res)) { - if ($row['img_thumb'] == 'Y') { + if (eregi('\.3g2',$row['img_name'])) { + $tpl->assign('IMAGE', $row); + $tpl->parse('main.post.video_3g2'); + } + else if ($row['img_thumb'] == 'Y') { $tpl->assign('IMAGE', $row); $tpl->parse('main.post.thumb_img'); } |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-12-11 12:14:18
|
Update of /cvsroot/comoblog/comoblog/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11056/docs Modified Files: THANKS Log Message: Rolled in support for 3g2 video files - from Bill Chambers and David Bennett Index: THANKS =================================================================== RCS file: /cvsroot/comoblog/comoblog/docs/THANKS,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- THANKS 9 Oct 2005 07:44:08 -0000 1.4 +++ THANKS 11 Dec 2005 12:14:01 -0000 1.5 @@ -22,6 +22,11 @@ * Mark Wallis - Project Leader for the CoMoblog project * IamDecal - patches and module development +With help from, + +* David Bennett - Original 3g2 in EasyMoblog +* Bill Chambers - 3g2 work in CoMoblog + With some borrowed resources from * Gnome-mix Icon Set - by mavvert (under GPL) |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-12-11 12:14:18
|
Update of /cvsroot/comoblog/comoblog/batch In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11056/batch Modified Files: comoblog_batch.php Log Message: Rolled in support for 3g2 video files - from Bill Chambers and David Bennett Index: comoblog_batch.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/batch/comoblog_batch.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- comoblog_batch.php 9 Oct 2005 00:31:34 -0000 1.8 +++ comoblog_batch.php 11 Dec 2005 12:14:01 -0000 1.9 @@ -114,7 +114,9 @@ $post['images_extension'][$i] = 'gif'; elseif ($post['images_mime'][$i] == 'image/png') $post['images_extension'][$i] = 'png'; - + elseif ($post['images_mime'][$i] == 'video/3gpp2') + $post['images_extension'][$i] = '3g2'; + //echo "+++".$post['images_cid'][$i]."+++"; //echo $post['post_mail_body']; @@ -325,6 +327,18 @@ $posts[$post_cnt]['post_ctype'] = $ctype; } + elseif (eregi('\.3g2',$cname)) { + $ctype = ''; + // check if part body is a valid image file + $now = str_replace(' ', '', microtime()).rand(); + $fp = fopen (CFG_BASE_PATH.'/img/tmp/'.$now, 'wb'); + fwrite ($fp, $decoded_msg[$msg_cnt]->parts[$p]->parts[$pp]->body); + fclose($fp); + array_push ($posts[$post_cnt]['images'], $decoded_msg[$msg_cnt]->parts[$p]->parts[$pp]->body); + array_push ($posts[$post_cnt]['images_mime'], 'video/3gpp2'); + array_push ($posts[$post_cnt]['images_cid'], $decoded_msg[$msg_cnt]->parts[$p]->parts[$pp]->headers['content-id']); + array_push ($posts[$post_cnt]['images_tmp'], CFG_BASE_PATH.'/img/tmp/'.$now); + } else { $ctype = ''; @@ -355,7 +369,11 @@ } else { $ctype = strtolower ($decoded_msg[$msg_cnt]->parts[$p]->ctype_primary."/".$decoded_msg[$msg_cnt]->parts[$p]->ctype_secondary); - if (($ctype == 'text/html' && $text_html == 0) || ($ctype == 'text/plain' && $text_html == 0 && $text_plain == 0)) { + $cname = strtolower ($decoded_msg[$msg_cnt]->parts[$p]->d_parameters['filename']); + if ($cname == '') + $cname = strtolower ($decoded_msg[$msg_cnt]->parts[$p]->ctype_parameters['name']); + + if (($ctype == 'text/html' && $text_html == 0) || ($ctype == 'text/plain' && $text_html == 0 && $text_plain == 0)) { $posts[$post_cnt]['post_mail_body'] = $decoded_msg[$msg_cnt]->parts[$p]->body; if ($ctype == 'text/plain') $text_plain++; @@ -363,6 +381,18 @@ $posts[$post_cnt]['post_ctype'] = $ctype; } + elseif (eregi('\.3g2',$cname)) { + $ctype = ''; + // check if part body is a valid image file + $now = str_replace(' ', '', microtime()).rand(); + $fp = fopen (CFG_BASE_PATH.'/img/tmp/'.$now, 'wb'); + fwrite ($fp, $decoded_msg[$msg_cnt]->parts[$p]->body); + fclose($fp); + array_push ($posts[$post_cnt]['images'], $decoded_msg[$msg_cnt]->parts[$p]->body); + array_push ($posts[$post_cnt]['images_mime'], 'video/3gpp2'); + array_push ($posts[$post_cnt]['images_cid'], $decoded_msg[$msg_cnt]->parts[$p]->headers['content-id']); + array_push ($posts[$post_cnt]['images_tmp'], CFG_BASE_PATH.'/img/tmp/'.$now); + } else { $ctype = ''; @@ -395,10 +425,27 @@ } else { // multipart $ctype = strtolower($decoded_msg[$msg_cnt]->ctype_primary.'/'.$decoded_msg[$msg_cnt]->ctype_secondary); + $cname = strtolower ($decoded_msg[$msg_cnt]->d_parameters['filename']); + if ($cname == '') { + $cname = strtolower ($decoded_msg[$msg_cnt]->ctype_parameters['name']); + } + if ($ctype == 'text/plain' || $ctype == 'text/html') { $posts[$post_cnt]['post_mail_body'] = $decoded_msg[$msg_cnt]->body; $posts[$post_cnt]['post_ctype'] = $ctype; } + elseif (eregi('\.3g2',$cname)) { + $ctype = ''; + // check if part body is a valid image file + $now = str_replace(' ', '', microtime()).rand(); + $fp = fopen (CFG_BASE_PATH.'/img/tmp/'.$now, 'wb'); + fwrite ($fp, $decoded_msg[$msg_cnt]->body); + fclose($fp); + array_push ($posts[$post_cnt]['images'], $decoded_msg[$msg_cnt]->body); + array_push ($posts[$post_cnt]['images_mime'], 'video/3gpp2'); + array_push ($posts[$post_cnt]['images_cid'], $decoded_msg[$msg_cnt]->headers['content-id']); + array_push ($posts[$post_cnt]['images_tmp'], CFG_BASE_PATH.'/img/tmp/'.$now); + } else { $ctype = ''; |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-12-11 12:14:18
|
Update of /cvsroot/comoblog/comoblog/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11056/templates Modified Files: index.tpl.htm Log Message: Rolled in support for 3g2 video files - from Bill Chambers and David Bennett Index: index.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/templates/index.tpl.htm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- index.tpl.htm 9 Oct 2005 08:42:10 -0000 1.3 +++ index.tpl.htm 11 Dec 2005 12:14:02 -0000 1.4 @@ -61,6 +61,23 @@ <img class="post_img" src="{SITE_URL}img/posts/{IMAGE.img_name}" border="0" alt="" /> <!-- END: img --> + <!-- BEGIN: video_3g2 --> + <object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" + CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" height="240"><br/> + <param name="SRC" value="{SITE_URL}img/posts/{IMAGE.img_name}"/> + <param name="CONTROLLER" value="true"/> + <param name="scale" value="Aspect"/> + <param name="AUTOPLAY" value="false"/> + <param name="border" value="0"/> + <param name="target" value="_self"/> + <param name="href" value="{SITE_URL}img/posts/{IMAGE.img_name}"> + <embed src="{SITE_URL}img/posts/{IMAGE.img_name}" border="0" width="320" + autoplay="false" scale="Aspect" href="{SITE_URL}img/posts/{IMAGE.img_name}" + pluginspage="http://www.apple.com/quicktime/download/" height="240" target="_self" controller="true"> + </embed> + </object> + <!-- END: video_3g2 --> + <!-- BEGIN: comments --> <h4>{TXT.comments_for_post}</h4> <!-- BEGIN: comment --> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-12-11 11:31:22
|
Update of /cvsroot/comoblog/comoblog/modules/mod_unky/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1590/mod_unky/img Removed Files: mod_unky.gif mod_unky_big.gif Log Message: Removal of mod_unky, service no longer available --- mod_unky_big.gif DELETED --- --- mod_unky.gif DELETED --- |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-12-11 11:31:22
|
Update of /cvsroot/comoblog/comoblog/modules/mod_unky/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1590/mod_unky/install Removed Files: mod_unky.xml Log Message: Removal of mod_unky, service no longer available --- mod_unky.xml DELETED --- |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-12-11 11:31:22
|
Update of /cvsroot/comoblog/comoblog/modules/mod_unky In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1590/mod_unky Removed Files: mod_unky.php readme.txt Log Message: Removal of mod_unky, service no longer available --- mod_unky.php DELETED --- --- readme.txt DELETED --- |
|
From: iamdecal <iam...@us...> - 2005-12-07 21:05:10
|
Update of /cvsroot/comoblog/comoblog/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6387/admin Modified Files: post_add.php post_edit.php Log Message: added change post_ctype to edit and add forms.. i find it useful sometimes to be able to change the ctype of a post as i post from lots of different places using different clients and some of them go screwy.... the real fix is of course to make sure we support all email senders properly, but i doubt thats realsitic. Index: post_add.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/post_add.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- post_add.php 8 Oct 2005 13:14:24 -0000 1.5 +++ post_add.php 7 Dec 2005 21:04:49 -0000 1.6 @@ -1,172 +1,172 @@ -<?php -require ('include/admin.inc.php'); - -$tpl = new XTemplate('templates/post_add.tpl.htm'); - -// date localization -setlocale (LC_TIME, $SET_LOCALE); - -if (strtoupper($_SERVER['REQUEST_METHOD'] == 'POST')) { - - $errors = array(); - - foreach ($_POST as $k => $v) - $post[$k] = trim($v); - - $i = 0; - foreach($_FILES as $k => $v) { - if ($v['error'] == '0') { - $images[$i] = $v; - $i++; - } - } - - for ($i = 0; $i < count($images); $i++) { - $imgsize = @getimagesize($images[$i]['tmp_name']); - if ($imgsize) { - $images[$i]['width'] = $imgsize[0]; - $images[$i]['height'] = $imgsize[1]; - - if ($imgsize[2] == 1) { $images[$i]['ctype'] = 'image/gif'; $images[$i]['ext'] = 'gif'; } - elseif($imgsize[2] == 2) { $images[$i]['ctype'] = 'image/jpg'; $images[$i]['ext'] = 'jpg'; } - elseif($imgsize[2] == 3) { $images[$i]['ctype'] = 'image/png'; $images[$i]['ext'] = 'png'; } - else { - $errors[] = 'Image: not supported format (use gif, jpg or png)'; - } - } - else { - $errors[] = 'Image: not supported format (use gif, jpg or png)'; - } - } - - if ($post['post_mail_subject'] == '') $errors[] = 'Subject: required'; - if ($post['post_mail_body'] == '') $errors[] = 'Body: required'; - if ($post['post_mail_from'] == '') $errors[] = 'Posted by: required'; - - if (count($errors) == 0) { - - foreach($post as $k => $v) { - if (get_magic_quotes_gpc() == 1) - $post[$k] = stripslashes($v); - } - - // apply post filters - if (count($POST_PRE_FILTERS) > 0) { - for ($filter_cnt = 0; $filter_cnt < count($POST_PRE_FILTERS); $filter_cnt++) { - include_once (CFG_BASE_PATH.'/modules/'.$POST_PRE_FILTERS[$filter_cnt].'/'.$POST_PRE_FILTERS[$filter_cnt].'_post_filter.php'); - } - } - - foreach($post as $k => $v) { - $post[$k] = addslashes($v); - } - - if ($post['post_date_option'] == "now") - { - $post['post_mail_date'] = time(); - } - else if ($post['post_date_option'] == "change") - { - $post['post_mail_date'] = strtotime($post['post_mail_date']); - } - - // add post entry in the database - $query = " - insert into ".CFG_MYSQL_TABPREFIX."posts ( - post_added, post_ctype, post_images, post_mail_from, post_mail_date, post_mail_subject, post_mail_body, topic_id - ) - values ( - '".$post['post_mail_date']."', - 'text/plain', - '0', - '".$post['post_mail_from']."', - '".$post['post_mail_date']."', - '".$post['post_mail_subject']."', - '".$post['post_mail_body']."', - '".$post['topic_id']."' - ) - "; - $res = mysql_query($query); - - $post['post_id'] = mysql_insert_id(); - - // apply post filters - if (count($POST_POST_FILTERS) > 0) { - for ($filter_cnt = 0; $filter_cnt < count($POST_POST_FILTERS); $filter_cnt++) { - include_once (CFG_BASE_PATH.'/modules/'.$POST_POST_FILTERS[$filter_cnt].'/'.$POST_POST_FILTERS[$filter_cnt].'_post_filter.php'); - } - } - - for ($i = 0; $i < count($images); $i++) { - $query = "insert into ".CFG_MYSQL_TABPREFIX."images (img_mime,img_extension,post_id,img_display,img_thumb) values ('".$images[$i]['ctype']."','".$images[$i]['ext']."','".$post['post_id']."','attach','N')"; - - $res = mysql_query($query); - $img_id = mysql_insert_id(); - - // copy new image - move_uploaded_file ($images[$i]['tmp_name'], CFG_BASE_PATH.'/img/posts/'.$img_id.'.'.$images[$i]['ext']); - - // create thumbnail - $thumb = create_thumbnail ($img_id, $images[$i]['ext'], CFG_IMG_MAX_W, CFG_IMG_MAX_H, CFG_GD_VERSION); - - if ($thumb) { - $query = "update ".CFG_MYSQL_TABPREFIX."images set img_thumb = 'Y', img_height = '".$images[$i]['height']."', img_width = '".$images[$i]['width']."' where img_id = '".$img_id."'"; - $res = mysql_query($query); - } - } - - $query = "update ".CFG_MYSQL_TABPREFIX."posts set post_images = '".count($images)."' where post_id = '".$post['post_id']."'"; - $res = mysql_query($query); - - // end - msg_page ('Post added succesfully!', 'ok'); - exit(); - } - - else { - foreach($errors as $k => $v) { - $tpl->assign('ERROR', $v); - $tpl->parse('main.errors.error'); - } - $tpl->parse('main.errors'); - } -} - - -if (strtoupper($_SERVER['REQUEST_METHOD'] == 'POST')) { - $post = $_POST; - $tpl->assign('POST', $post); -} - -// topics -$query = "select t.*, concat(i.img_id,'.',i.img_extension) as img - from ".CFG_MYSQL_TABPREFIX."topics t - left join ".CFG_MYSQL_TABPREFIX."images i - on t.img_id = i.img_id - order by t.topic_name"; -$res = mysql_query($query); - -if (mysql_num_rows($res) > 0) { - while ($row = mysql_fetch_assoc($res)) { - $tpl->assign('TOPIC', $row); - if ($row['topic_id'] == $post['topic_id']) - $tpl->parse('main.topics.topic.selected'); - $tpl->parse('main.topics.topic'); - } - $tpl->parse('main.topics'); -} - -for ($i = 0; $i < 4; $i++) { - $tpl->assign('COUNTER', $i); - $tpl->assign('COUNTER_TXT', $i + 1); - $tpl->parse('main.images.image'); -} -$tpl->parse('main.images'); - -$tpl->assign('NOW_DATE', strftime($CAL_DATE_FORMAT." %H:%M", time())); - -$tpl->assign('ACTION', basename($_SERVER['PHP_SELF'])); - -$tpl->parse('main'); -$tpl->out('main'); -?> +<?php +require ('include/admin.inc.php'); + +$tpl = new XTemplate('templates/post_add.tpl.htm'); + +// date localization +setlocale (LC_TIME, $SET_LOCALE); + +if (strtoupper($_SERVER['REQUEST_METHOD'] == 'POST')) { + + $errors = array(); + + foreach ($_POST as $k => $v) + $post[$k] = trim($v); + + $i = 0; + foreach($_FILES as $k => $v) { + if ($v['error'] == '0') { + $images[$i] = $v; + $i++; + } + } + + for ($i = 0; $i < count($images); $i++) { + $imgsize = @getimagesize($images[$i]['tmp_name']); + if ($imgsize) { + $images[$i]['width'] = $imgsize[0]; + $images[$i]['height'] = $imgsize[1]; + + if ($imgsize[2] == 1) { $images[$i]['ctype'] = 'image/gif'; $images[$i]['ext'] = 'gif'; } + elseif($imgsize[2] == 2) { $images[$i]['ctype'] = 'image/jpg'; $images[$i]['ext'] = 'jpg'; } + elseif($imgsize[2] == 3) { $images[$i]['ctype'] = 'image/png'; $images[$i]['ext'] = 'png'; } + else { + $errors[] = 'Image: not supported format (use gif, jpg or png)'; + } + } + else { + $errors[] = 'Image: not supported format (use gif, jpg or png)'; + } + } + + if ($post['post_mail_subject'] == '') $errors[] = 'Subject: required'; + if ($post['post_mail_body'] == '') $errors[] = 'Body: required'; + if ($post['post_mail_from'] == '') $errors[] = 'Posted by: required'; + + if (count($errors) == 0) { + + foreach($post as $k => $v) { + if (get_magic_quotes_gpc() == 1) + $post[$k] = stripslashes($v); + } + + // apply post filters + if (count($POST_PRE_FILTERS) > 0) { + for ($filter_cnt = 0; $filter_cnt < count($POST_PRE_FILTERS); $filter_cnt++) { + include_once (CFG_BASE_PATH.'/modules/'.$POST_PRE_FILTERS[$filter_cnt].'/'.$POST_PRE_FILTERS[$filter_cnt].'_post_filter.php'); + } + } + + foreach($post as $k => $v) { + $post[$k] = addslashes($v); + } + + if ($post['post_date_option'] == "now") + { + $post['post_mail_date'] = time(); + } + else if ($post['post_date_option'] == "change") + { + $post['post_mail_date'] = strtotime($post['post_mail_date']); + } + + // add post entry in the database + $query = " + insert into ".CFG_MYSQL_TABPREFIX."posts ( + post_added, post_ctype, post_images, post_mail_from, post_mail_date, post_mail_subject, post_mail_body, topic_id + ) + values ( + '".$post['post_mail_date']."', + '".$post['post_ctype']."', + '0', + '".$post['post_mail_from']."', + '".$post['post_mail_date']."', + '".$post['post_mail_subject']."', + '".$post['post_mail_body']."', + '".$post['topic_id']."' + ) + "; + $res = mysql_query($query); + + $post['post_id'] = mysql_insert_id(); + + // apply post filters + if (count($POST_POST_FILTERS) > 0) { + for ($filter_cnt = 0; $filter_cnt < count($POST_POST_FILTERS); $filter_cnt++) { + include_once (CFG_BASE_PATH.'/modules/'.$POST_POST_FILTERS[$filter_cnt].'/'.$POST_POST_FILTERS[$filter_cnt].'_post_filter.php'); + } + } + + for ($i = 0; $i < count($images); $i++) { + $query = "insert into ".CFG_MYSQL_TABPREFIX."images (img_mime,img_extension,post_id,img_display,img_thumb) values ('".$images[$i]['ctype']."','".$images[$i]['ext']."','".$post['post_id']."','attach','N')"; + + $res = mysql_query($query); + $img_id = mysql_insert_id(); + + // copy new image + move_uploaded_file ($images[$i]['tmp_name'], CFG_BASE_PATH.'/img/posts/'.$img_id.'.'.$images[$i]['ext']); + + // create thumbnail + $thumb = create_thumbnail ($img_id, $images[$i]['ext'], CFG_IMG_MAX_W, CFG_IMG_MAX_H, CFG_GD_VERSION); + + if ($thumb) { + $query = "update ".CFG_MYSQL_TABPREFIX."images set img_thumb = 'Y', img_height = '".$images[$i]['height']."', img_width = '".$images[$i]['width']."' where img_id = '".$img_id."'"; + $res = mysql_query($query); + } + } + + $query = "update ".CFG_MYSQL_TABPREFIX."posts set post_images = '".count($images)."' where post_id = '".$post['post_id']."'"; + $res = mysql_query($query); + + // end + msg_page ('Post added succesfully!', 'ok'); + exit(); + } + + else { + foreach($errors as $k => $v) { + $tpl->assign('ERROR', $v); + $tpl->parse('main.errors.error'); + } + $tpl->parse('main.errors'); + } +} + + +if (strtoupper($_SERVER['REQUEST_METHOD'] == 'POST')) { + $post = $_POST; + $tpl->assign('POST', $post); +} + +// topics +$query = "select t.*, concat(i.img_id,'.',i.img_extension) as img + from ".CFG_MYSQL_TABPREFIX."topics t + left join ".CFG_MYSQL_TABPREFIX."images i + on t.img_id = i.img_id + order by t.topic_name"; +$res = mysql_query($query); + +if (mysql_num_rows($res) > 0) { + while ($row = mysql_fetch_assoc($res)) { + $tpl->assign('TOPIC', $row); + if ($row['topic_id'] == $post['topic_id']) + $tpl->parse('main.topics.topic.selected'); + $tpl->parse('main.topics.topic'); + } + $tpl->parse('main.topics'); +} + +for ($i = 0; $i < 4; $i++) { + $tpl->assign('COUNTER', $i); + $tpl->assign('COUNTER_TXT', $i + 1); + $tpl->parse('main.images.image'); +} +$tpl->parse('main.images'); + +$tpl->assign('NOW_DATE', strftime($CAL_DATE_FORMAT." %H:%M", time())); + +$tpl->assign('ACTION', basename($_SERVER['PHP_SELF'])); + +$tpl->parse('main'); +$tpl->out('main'); +?> Index: post_edit.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/post_edit.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- post_edit.php 23 Nov 2005 04:24:45 -0000 1.7 +++ post_edit.php 7 Dec 2005 21:04:49 -0000 1.8 @@ -135,8 +135,9 @@ post_mail_subject = '".$post['post_mail_subject'] ."', post_mail_body = '".$post['post_mail_body'] ."', post_images = '".$post['post_images'] ."', - post_mail_date = '".$post['post_mail_date'] ."', - post_added = '".$post['post_mail_date'] ."', + post_mail_date = '".$post['post_mail_date'] ."', + post_ctype = '".$post['post_ctype'] ."', + post_added = '".$post['post_mail_date'] ."', topic_id = '".$post['topic_id'] ."' where post_id = '".$post['post_id'] ."' |
|
From: iamdecal <iam...@us...> - 2005-12-07 21:05:04
|
Update of /cvsroot/comoblog/comoblog/admin/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6387/admin/templates Modified Files: post_add.tpl.htm post_edit.tpl.htm Log Message: added change post_ctype to edit and add forms.. i find it useful sometimes to be able to change the ctype of a post as i post from lots of different places using different clients and some of them go screwy.... the real fix is of course to make sure we support all email senders properly, but i doubt thats realsitic. Index: post_edit.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/templates/post_edit.tpl.htm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- post_edit.tpl.htm 23 Nov 2005 04:24:45 -0000 1.3 +++ post_edit.tpl.htm 7 Dec 2005 21:04:49 -0000 1.4 @@ -1,133 +1,144 @@ -<!-- 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>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> - -<br /> - -<!-- BEGIN: errors --> -<script> - var errmsg = "WARNING\n"; - <!-- BEGIN: error --> - errmsg += "\n{ERROR}"; - <!-- BEGIN: error --> - alert (errmsg); -</script> -<!-- END: errors --> - - - - - - - -</form> - - -{FILE "templates/footer.tpl.htm"} -<!-- END: main --> +<!-- 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> + +<br /> + +<!-- BEGIN: errors --> +<script> + var errmsg = "WARNING\n"; + <!-- BEGIN: error --> + errmsg += "\n{ERROR}"; + <!-- BEGIN: error --> + alert (errmsg); +</script> +<!-- END: errors --> + + + + + + + +</form> + + +{FILE "templates/footer.tpl.htm"} +<!-- END: main --> Index: post_add.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/templates/post_add.tpl.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- post_add.tpl.htm 7 Oct 2005 14:09:48 -0000 1.2 +++ post_add.tpl.htm 7 Dec 2005 21:04:49 -0000 1.3 @@ -1,103 +1,113 @@ -<!-- BEGIN: main --> -{FILE "templates/mod_popup_header.tpl.htm"} -<form action="{ACTION}" method="POST" enctype="multipart/form-data"> - -<table border="0" width="550" cellspacing="0" cellpadding="10" align="center"> - <tr> - <td class="bigger" colspan="3"> - <p><b>ADD 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>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="10" 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="now" checked>Now</input><br /> - <input type="radio" name="post_date_option" value="change">Post at:</input> - <input type="text" name="post_mail_date" value="{NOW_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} - </td> - - <td valign="middle"> - <input type="file" name="image_file_{COUNTER}" /> - </td> - - <td align="right" valign="middle"> - - </td> - </tr> - <!-- END: image --> - <!-- END: images --> - <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> - - - - -<!-- BEGIN: errors --> -<script> - var errmsg = "WARNING\n"; - <!-- BEGIN: error --> - errmsg += "\n{ERROR}"; - <!-- END: error --> - alert (errmsg); -</script> -<!-- END: errors --> - - - -</form> - - -{FILE "templates/footer.tpl.htm"} -<!-- END: main --> +<!-- BEGIN: main --> +{FILE "templates/mod_popup_header.tpl.htm"} +<form action="{ACTION}" method="POST" enctype="multipart/form-data"> + +<table border="0" width="550" cellspacing="0" cellpadding="10" align="center"> + <tr> + <td class="bigger" colspan="3"> + <p><b>ADD 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="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="10" 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="now" checked>Now</input><br /> + <input type="radio" name="post_date_option" value="change">Post at:</input> + <input type="text" name="post_mail_date" value="{NOW_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} + </td> + + <td valign="middle"> + <input type="file" name="image_file_{COUNTER}" /> + </td> + + <td align="right" valign="middle"> + + </td> + </tr> + <!-- END: image --> + <!-- END: images --> + <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> + + + + +<!-- BEGIN: errors --> +<script> + var errmsg = "WARNING\n"; + <!-- BEGIN: error --> + errmsg += "\n{ERROR}"; + <!-- END: error --> + alert (errmsg); +</script> +<!-- END: errors --> + + + +</form> + + +{FILE "templates/footer.tpl.htm"} +<!-- END: main --> |
|
From: iamdecal <iam...@us...> - 2005-12-01 14:58:08
|
Update of /cvsroot/comoblog/comoblog/_install/upgrades In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9398/comoblog/_install/upgrades Modified Files: 0.5.1_to_1.0.xml Log Message: REASON added the option to allow html in comments this is turned off by default for security reasons POSSIBLE UPDATES add filter to only allow certain tags TODO still needs translations in all other languages works on a fresh install, not tested with a web based updgrade ---------------------------------------------------------------------- Enter Log. Lines beginning with `CVS:' are removed automatically Committing in . Modified Files: comoblog/add_comment.php comoblog/_install/comoblog_preferences.xml comoblog/include/libraries.inc.php comoblog/lang/english.inc.php comoblog/templates/add_comment.tpl.htm ---------------------------------------------------------------------- Index: 0.5.1_to_1.0.xml =================================================================== RCS file: /cvsroot/comoblog/comoblog/_install/upgrades/0.5.1_to_1.0.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- 0.5.1_to_1.0.xml 18 Nov 2005 09:12:20 -0000 1.4 +++ 0.5.1_to_1.0.xml 1 Dec 2005 14:57:55 -0000 1.5 @@ -56,5 +56,9 @@ <dbquery> insert into comoblog_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, mod_name) VALUES ('CFG_MAIL_APOP', 'no', 'POP3 enable APOP protocol', 4, 'N', 'select', 'no|yes', 'N', 'Y', 4, ''); </dbquery> + <dbquery> + insert into comoblog_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, mod_name) VALUES ('CFG_INTERACTION_HTML_COMMENTS', 'no', 'Allow HTML Comments', 4, 'N', 'select', 'no|yes', 'N', 'Y', 5, ''); + </dbquery> + </comoblog_upgrade> |
|
From: iamdecal <iam...@us...> - 2005-12-01 14:58:08
|
Update of /cvsroot/comoblog/comoblog/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9398/comoblog/templates Modified Files: add_comment.tpl.htm Log Message: REASON added the option to allow html in comments this is turned off by default for security reasons POSSIBLE UPDATES add filter to only allow certain tags TODO still needs translations in all other languages works on a fresh install, not tested with a web based updgrade ---------------------------------------------------------------------- Enter Log. Lines beginning with `CVS:' are removed automatically Committing in . Modified Files: comoblog/add_comment.php comoblog/_install/comoblog_preferences.xml comoblog/include/libraries.inc.php comoblog/lang/english.inc.php comoblog/templates/add_comment.tpl.htm ---------------------------------------------------------------------- Index: add_comment.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/templates/add_comment.tpl.htm,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- add_comment.tpl.htm 16 Aug 2005 05:49:47 -0000 1.1.1.1 +++ add_comment.tpl.htm 1 Dec 2005 14:57:55 -0000 1.2 @@ -20,6 +20,20 @@ <textarea name="comment_text" id="comment_text" class="comment_form">{FORM.comment_text}</textarea> </p> + +<!-- BEGIN: html_comments --> +{TXT.comment_convert}<br /> +<input type="checkbox" name="comment_convert" id="comment_convert" class="comment_form" value="noconvert"> +<!-- END: html_comments --> +</p> + + + +<p> + + + + <p> <input type="submit" name="submit" value="{TXT.submit}" /> </p> |
|
From: iamdecal <iam...@us...> - 2005-12-01 14:58:08
|
Update of /cvsroot/comoblog/comoblog/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9398/comoblog/lang Modified Files: english.inc.php Log Message: REASON added the option to allow html in comments this is turned off by default for security reasons POSSIBLE UPDATES add filter to only allow certain tags TODO still needs translations in all other languages works on a fresh install, not tested with a web based updgrade ---------------------------------------------------------------------- Enter Log. Lines beginning with `CVS:' are removed automatically Committing in . Modified Files: comoblog/add_comment.php comoblog/_install/comoblog_preferences.xml comoblog/include/libraries.inc.php comoblog/lang/english.inc.php comoblog/templates/add_comment.tpl.htm ---------------------------------------------------------------------- Index: english.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/lang/english.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- english.inc.php 2 Sep 2005 01:06:16 -0000 1.2 +++ english.inc.php 1 Dec 2005 14:57:55 -0000 1.3 @@ -61,6 +61,8 @@ $TXT['submit'] = 'send'; $TXT['your_name'] = 'Your name'; $TXT['your_email'] = 'Your e-mail (it will be obfuscated)'; + $TXT['comment_convert'] = 'If you tick this box,you can enter raw HTML. note that you\'ll then have to enter your own HTML for links and line breaks etc, if your leave it unticked, links & breaks will be generated automatically'; + // misc $TXT['permalink'] = 'permalink'; |
|
From: iamdecal <iam...@us...> - 2005-12-01 14:58:05
|
Update of /cvsroot/comoblog/comoblog/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9398/comoblog/include Modified Files: libraries.inc.php Log Message: REASON added the option to allow html in comments this is turned off by default for security reasons POSSIBLE UPDATES add filter to only allow certain tags TODO still needs translations in all other languages works on a fresh install, not tested with a web based updgrade ---------------------------------------------------------------------- Enter Log. Lines beginning with `CVS:' are removed automatically Committing in . Modified Files: comoblog/add_comment.php comoblog/_install/comoblog_preferences.xml comoblog/include/libraries.inc.php comoblog/lang/english.inc.php comoblog/templates/add_comment.tpl.htm ---------------------------------------------------------------------- Index: libraries.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/include/libraries.inc.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- libraries.inc.php 25 Nov 2005 02:07:11 -0000 1.4 +++ libraries.inc.php 1 Dec 2005 14:57:55 -0000 1.5 @@ -296,8 +296,16 @@ function comment_add ($comment) { $comment['comment_author'] = clean_up_txt($comment['comment_author']); $comment['comment_author_email'] = clean_up_txt($comment['comment_author_email']); - $comment['comment_text'] = clean_up_txt($comment['comment_text']); + #$comment['comment_text'] = clean_up_txt($comment['comment_text']); + // optionally allow raw HTML to be entered into comments + // needs an additional filter to stip script tags etc? + if ($comment['comment_convert'] != 'noconvert'){ + $comment['comment_text'] = clean_up_txt($comment['comment_text']); + } + + + // apply comment filters global $COMMENT_FILTERS; if (count($COMMENT_FILTERS) > 0) { |
|
From: iamdecal <iam...@us...> - 2005-12-01 14:56:29
|
Update of /cvsroot/comoblog/comoblog In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8047/comoblog Modified Files: add_comment.php Log Message: REASON added the option to allow html in comments this is turned off by default for security reasons to only allow certain tagsPOSSIBLE UPDATES TODO still needs translations in all other languages works on a fresh install, not tested with a web based updgrade ---------------------------------------------------------------------- Enter Log. Lines beginning with `CVS:' are removed automatically Committing in . Modified Files: comoblog/add_comment.php comoblog/_install/comoblog_preferences.xml comoblog/include/libraries.inc.php comoblog/lang/english.inc.php comoblog/templates/add_comment.tpl.htm ---------------------------------------------------------------------- |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-11-29 11:43:31
|
Update of /cvsroot/comoblog/modules/mod_comment_notify/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19917 Modified Files: mod_comment_notify.xml Log Message: Cleanup of parameter info in mod_comment_notify Index: mod_comment_notify.xml =================================================================== RCS file: /cvsroot/comoblog/modules/mod_comment_notify/install/mod_comment_notify.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mod_comment_notify.xml 28 Nov 2005 10:48:32 -0000 1.2 +++ mod_comment_notify.xml 29 Nov 2005 11:43:23 -0000 1.3 @@ -34,7 +34,7 @@ <param name="CFG_WHERE_IS_SENDMAIL" - description="location of send mail -" + description="Location of the sendmail program" type="text" editable="Y" accept_null="N" @@ -42,4 +42,4 @@ /> -</module> \ No newline at end of file +</module> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-11-29 11:20:22
|
Update of /cvsroot/comoblog/comoblog/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16302 Modified Files: CHANGELOG Log Message: 1368650 - More visible trackback icon for dark page backgrounds Index: CHANGELOG =================================================================== RCS file: /cvsroot/comoblog/comoblog/docs/CHANGELOG,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- CHANGELOG 25 Nov 2005 04:31:43 -0000 1.28 +++ CHANGELOG 29 Nov 2005 11:19:50 -0000 1.29 @@ -9,7 +9,7 @@ * BUG: Module install/upgrade can fail without warning (1364384) * BUG: Comments don't handle quotation marks (1364093) * BUG: I.E. display bug with table layout (1314308) - +* BUG: More visible trackback icon for dark page backgrounds (1368650) CoMoblog 1.0, 2005-11-19 ---------------------------- |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-11-29 11:19:17
|
Update of /cvsroot/comoblog/comoblog/img/comoblog In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16148 Modified Files: 3.gif Log Message: 1368650 - More visible trackback icon for dark page backgrounds Index: 3.gif =================================================================== RCS file: /cvsroot/comoblog/comoblog/img/comoblog/3.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsyLkzSq and /tmp/cvsZ2L0bg differ |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-11-29 09:08:36
|
Update of /cvsroot/comoblog/modules/mod_pingomatic/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25314 Modified Files: mod_pingomatic.xml Log Message: Fix up default for pingomatic so if people enable it but don't configure it they don't get errors during posting Index: mod_pingomatic.xml =================================================================== RCS file: /cvsroot/comoblog/modules/mod_pingomatic/install/mod_pingomatic.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mod_pingomatic.xml 28 Nov 2005 00:01:56 -0000 1.2 +++ mod_pingomatic.xml 29 Nov 2005 09:08:23 -0000 1.3 @@ -17,10 +17,10 @@ <date>2005-04-05</date> <param name="CFG_PINGOMATIC_URL" - description=" the url to ping" + description="The url to ping" type="text" editable="Y" accept_null="N" - value="put url here" + value="" /> </module> |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:33:23
|
Update of /cvsroot/comoblog/modules/mod_html2text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23710/mod_html2text Added Files: mod_html2text_post_filter.php Log Message: initial add - NOT FOR RELEASE - NEEDS FULL TESTING mod_html2text, i wrote this to help some one out, as i dont suffer from the problem its not been completly tested, howeve they havnt complained so im guess all is okay.. It converts the incoming posts from html to text - that actually a lie as it leaves in the image tags which tend to be on a remote server and so other wise wouldnt be found by easymoblog however it removes the BAD html imposed on some of us by the phone networks If you want to remove any text from the remaining text, - for instance if your phone provider adds some kind of company slogan or copyright message - you might want to look at mod_wordswapper which can be used to remove that.at some point Ill look at building that functionality into this module if people think its worth it --- NEW FILE: mod_html2text_post_filter.php --- <?php require_once(dirname(__FILE__).'/include/mod_html2text.inc.php'); // Include the class definition file. require_once('class.html2text.inc'); // The "source" HTML you want to convert. $html = $post['post_mail_body'] // Instantiate a new instance of the class. Passing the string // variable automatically loads the HTML for you. $h2t =& new html2text($html); $h2t->set_allowed_tags(CFG_HTML2TEXT_ALLOWED_TAGS); // Simply call the get_text() method for the class to convert // the HTML to the plain text. Store it into the variable. $post['post_mail_body'] = $h2t->get_text(); ?> |