comoblog-commit Mailing List for CoMoblog Mobile Blog Application (Page 28)
Status: Inactive
Brought to you by:
markwallis
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(49) |
Oct
(127) |
Nov
(211) |
Dec
(56) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(51) |
Feb
(128) |
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
(2) |
Aug
(24) |
Sep
|
Oct
(151) |
Nov
(9) |
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
(17) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 07:43:07
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15330/img Log Message: Directory /cvsroot/comoblog/comoblog/modules/mod_markup/img added to the repository |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 07:00:59
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6087/include Modified Files: mod_markup.inc.php Log Message: mod_markup forced image sizes and download flag fix Index: mod_markup.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_markup/include/mod_markup.inc.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mod_markup.inc.php 9 Oct 2005 06:46:08 -0000 1.3 +++ mod_markup.inc.php 9 Oct 2005 07:00:33 -0000 1.4 @@ -12,7 +12,9 @@ $start = $pos; $end = strpos( $body, "]]", $start + 1); $url = substr($body, $start+8, $end-$start-8); - $html = "<img src='".$url."'>"; + $html = "<table width='".CFG_IMG_MAX_W."' height='".CFG_IMG_MAX_H."'><tr><td height='100%' width='100%'>"; + $html .= "<img height='100%' width='100%' src='".$url."'>"; + $html .= "</td></tr></table>"; $body = substr($body, 0, $start).$html.substr($body, $end+2); $pos = strpos( $body, "[[Image:"); } @@ -81,7 +83,7 @@ else $has_curl = FALSE; - if (!$has_curl || CFG_MOD_MARKUP_DOWNLOAD_IMAGES == "N") + if (!$has_curl || CFG_MOD_MARKUP_DOWNLOAD_IMAGES == "No") $post = process_images_remote( $post ); else $post = process_images_local( $post ); |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 06:54:40
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5004 Modified Files: mod_markup.xml Log Message: mod_markup install file fix Index: mod_markup.xml =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_markup/install/mod_markup.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_markup.xml 9 Oct 2005 01:37:38 -0000 1.1 +++ mod_markup.xml 9 Oct 2005 06:54:28 -0000 1.2 @@ -22,9 +22,9 @@ type="select" accept_null="N" encrypt="N" - restricted_values="N|Y" + restrict_values="No|Yes" editable="Y" - value="N" + value="No" /> <version>1.0</version> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 06:53:30
|
Update of /cvsroot/comoblog/comoblog/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4809 Modified Files: CHANGELOG Log Message: Changelog update Index: CHANGELOG =================================================================== RCS file: /cvsroot/comoblog/comoblog/docs/CHANGELOG,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- CHANGELOG 8 Oct 2005 13:27:41 -0000 1.17 +++ CHANGELOG 9 Oct 2005 06:53:18 -0000 1.18 @@ -15,6 +15,7 @@ * FEATURE: Allow date editing through admin (1280315) * FEATURE: Ability to change the first weekday in calendar (1280305) * FEATURE: Multiple functions now available for next/prev (1280283) +* FEATURE: Markup language with image downloading (1280308) * CORE: Added pre/post db save post filter framework * CORE: Updated core supported module set * BUG: Disable POP3 APOP authentication by default (1280278) |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 06:46:17
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3672/modules/mod_markup Modified Files: README Log Message: RFE: 1280308 - Finished image markup function. Images can now be downloaded locally before references Index: README =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_markup/README,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- README 9 Oct 2005 01:50:43 -0000 1.1 +++ README 9 Oct 2005 06:46:08 -0000 1.2 @@ -22,7 +22,8 @@ server. If the module parameter is set to "Yes" then the image will be downloaded from the remote server to the local server hosting the blog and then referenced from there like a normal image attached - to the email. + to the email. Your PHP installation must have the CURL libraries + compiled in for this option to work. Any problems please raise them in the CoMoblog SourceForge. |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 06:46:17
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3672/modules/mod_markup/include Modified Files: mod_markup.inc.php Log Message: RFE: 1280308 - Finished image markup function. Images can now be downloaded locally before references Index: mod_markup.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_markup/include/mod_markup.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mod_markup.inc.php 9 Oct 2005 01:44:15 -0000 1.2 +++ mod_markup.inc.php 9 Oct 2005 06:46:08 -0000 1.3 @@ -22,10 +22,69 @@ return $post; } +function process_images_local($post) +{ + $pos = 0; + $body = $post['post_mail_body']; + $pos = strpos( $body, "[[Image:"); + + while ($pos != FALSE) + { + $start = $pos; + $end = strpos( $body, "]]", $start + 1); + $url = substr($body, $start+8, $end-$start-8); + $now = str_replace(' ', '', microtime()).rand(); + $cid = $now; + + $html = "<img hspace=0 src='cid:".$cid."' align=baseline border=0>"; + $body = substr($body, 0, $start).$html.substr($body, $end+2); + + $ch = curl_init($url); + $fp = fopen (CFG_BASE_PATH.'/img/tmp/'.$now, 'wb'); + curl_setopt($ch, CURLOPT_FILE, $fp); + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_exec($ch); + curl_close($ch); + fclose($fp); + + $imgsize = @getimagesize(CFG_BASE_PATH.'/img/tmp/'.$now); + + if ($imgsize) { + if ($imgsize[2] == 1) $ctype = 'image/gif'; + elseif($imgsize[2] == 2) $ctype = 'image/jpg'; + elseif($imgsize[2] == 3) $ctype = 'image/png'; + + if ($ctype != '') { + array_push ($post['images_mime'], $ctype); + array_push ($post['images_tmp'], CFG_BASE_PATH.'/img/tmp/'.$now); + array_push ($post['images_cid'], $cid); + array_push ($post['images'], ""); + } + else + @unlink(CFG_BASE_PATH.'/img/tmp/'.$now); + } + + $pos = strpos( $body, "[[Image:"); + } + + $post['post_mail_body'] = $body; + return $post; +} + function markup ($post) { - if (CFG_MOD_MARKUP_DOWNLOAD_IMAGES == "N") + $extensions = get_loaded_extensions(); + + // check if curl support is enabled + if (in_array('curl', $extensions)) + $has_curl = TRUE; + else + $has_curl = FALSE; + + if (!$has_curl || CFG_MOD_MARKUP_DOWNLOAD_IMAGES == "N") $post = process_images_remote( $post ); + else + $post = process_images_local( $post ); $post['post_mail_body'] = nl2br($post['post_mail_body']); $post['post_ctype'] = "text/html"; |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 01:51:02
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14493 Added Files: README Log Message: Readme for mod_markup --- NEW FILE: README --- This CoMoblog module applied WikiPedia style markup to plain text posts Author: Mark Wallis - mw...@se... This is a filter module that analyses incoming plain text posts for basic markup and applies the markup rules accordinly. I've tried to style the markup language on that already used by WikiPedia. Markup is only analysed for plain/text posts. Trying to analyse plain/html posts is too complex, plus, if you are posting from a HTML enabled email client then you should be able todo everything you want without markup anyway. At this stage the following markup rules are applied. All markup tags are case sensitive. 1. Images Example: [[Image:http://www.serialmonkey.com/logo.jpg]] This markup will embed the referenced image into your post. If you have the Download Image Module parameter set to "No" then this markup is replaced with a <img> tag referencing the image on the remote server. If the module parameter is set to "Yes" then the image will be downloaded from the remote server to the local server hosting the blog and then referenced from there like a normal image attached to the email. Any problems please raise them in the CoMoblog SourceForge. Mark. |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 01:44:23
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12993/include Modified Files: mod_markup.inc.php Log Message: Only markup plain text - trying to markup HTML is too hard, and generally a waste of time anyway Index: mod_markup.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_markup/include/mod_markup.inc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_markup.inc.php 9 Oct 2005 01:37:38 -0000 1.1 +++ mod_markup.inc.php 9 Oct 2005 01:44:15 -0000 1.2 @@ -27,11 +27,8 @@ if (CFG_MOD_MARKUP_DOWNLOAD_IMAGES == "N") $post = process_images_remote( $post ); - if ($post['post_ctype'] == "text/plain") - { - $post['post_mail_body'] = nl2br($post['post_mail_body']); - $post['post_ctype'] = "text/html"; - } + $post['post_mail_body'] = nl2br($post['post_mail_body']); + $post['post_ctype'] = "text/html"; return $post; } |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 01:44:22
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12993 Modified Files: mod_markup_post_filter.php Log Message: Only markup plain text - trying to markup HTML is too hard, and generally a waste of time anyway Index: mod_markup_post_filter.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_markup/mod_markup_post_filter.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_markup_post_filter.php 9 Oct 2005 01:37:38 -0000 1.1 +++ mod_markup_post_filter.php 9 Oct 2005 01:44:15 -0000 1.2 @@ -1,5 +1,6 @@ <?php require_once (dirname(__FILE__).'/include/mod_markup.inc.php'); - $post = markup($post); + if ($post['post_ctype'] == "text/plain") + $post = markup($post); ?> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 01:37:46
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11987/mod_markup Added Files: mod_markup_post_filter.php Log Message: RFE: 1280308 - Add mod_markup filter module to CVS. This is the prework for being able to support Image posts embedded in markup referencing remote URLs --- NEW FILE: mod_markup_post_filter.php --- <?php require_once (dirname(__FILE__).'/include/mod_markup.inc.php'); $post = markup($post); ?> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 01:37:46
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11987/mod_markup/include Added Files: mod_markup.inc.php Log Message: RFE: 1280308 - Add mod_markup filter module to CVS. This is the prework for being able to support Image posts embedded in markup referencing remote URLs --- NEW FILE: mod_markup.inc.php --- <?php include_once (dirname(__FILE__).'/../../../include/config.inc.php'); function process_images_remote($post) { $pos = 0; $body = $post['post_mail_body']; $pos = strpos( $body, "[[Image:"); while ($pos != FALSE) { $start = $pos; $end = strpos( $body, "]]", $start + 1); $url = substr($body, $start+8, $end-$start-8); $html = "<img src='".$url."'>"; $body = substr($body, 0, $start).$html.substr($body, $end+2); $pos = strpos( $body, "[[Image:"); } $post['post_mail_body'] = $body; return $post; } function markup ($post) { if (CFG_MOD_MARKUP_DOWNLOAD_IMAGES == "N") $post = process_images_remote( $post ); if ($post['post_ctype'] == "text/plain") { $post['post_mail_body'] = nl2br($post['post_mail_body']); $post['post_ctype'] = "text/html"; } return $post; } ?> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 01:37:46
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11987/mod_markup/install Added Files: mod_markup.xml Log Message: RFE: 1280308 - Add mod_markup filter module to CVS. This is the prework for being able to support Image posts embedded in markup referencing remote URLs --- NEW FILE: mod_markup.xml --- <?xml version="1.0" standalone="no"?> <!DOCTYPE module SYSTEM "http://comoblog.sourceforge.net/DTD/comoblog_mod_install.dtd"> <module> <name> mod_markup </name> <description> Post filter module that implements WikiPedia style markup on incoming posts </description> <allowed_pos> not_visible </allowed_pos> <filter_posts>Y</filter_posts> <param name="CFG_MOD_MARKUP_DOWNLOAD_IMAGES" description="Download images that are referenced in markup" type="select" accept_null="N" encrypt="N" restricted_values="N|Y" editable="Y" value="N" /> <version>1.0</version> <author>Mark Wallis - mw...@se...</author> <date>2005-10-03</date> </module> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 01:36:31
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11811/install Log Message: Directory /cvsroot/comoblog/comoblog/modules/mod_markup/install added to the repository |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 01:36:31
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11811/include Log Message: Directory /cvsroot/comoblog/comoblog/modules/mod_markup/include added to the repository |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 01:36:08
|
Update of /cvsroot/comoblog/comoblog/modules/mod_markup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11711/mod_markup Log Message: Directory /cvsroot/comoblog/comoblog/modules/mod_markup added to the repository |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-09 00:31:48
|
Update of /cvsroot/comoblog/comoblog/batch In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31860 Modified Files: comoblog_batch.php Log Message: Filters should be run before cleanup so we can filter the raw post content Index: comoblog_batch.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/batch/comoblog_batch.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- comoblog_batch.php 5 Oct 2005 01:48:34 -0000 1.7 +++ comoblog_batch.php 9 Oct 2005 00:31:34 -0000 1.8 @@ -52,12 +52,6 @@ if (CFG_ALLOW_HTML == 'no') $post['post_mail_body'] = filter_html($post['post_mail_body']); - // clean up text and html - if ($post['post_ctype'] == 'text/plain') - $post['post_mail_body'] = clean_up_txt($post['post_mail_body'], true); - else - $post['post_mail_body'] = clean_up_html($post['post_mail_body'], true); - // apply pre filters global $POST_PRE_FILTERS; if (count($POST_PRE_FILTERS) > 0) { @@ -66,6 +60,12 @@ } } + // clean up text and html + if ($post['post_ctype'] == 'text/plain') + $post['post_mail_body'] = clean_up_txt($post['post_mail_body'], true); + else + $post['post_mail_body'] = clean_up_html($post['post_mail_body'], true); + // current timestamp $now = time(); |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-08 13:27:50
|
Update of /cvsroot/comoblog/comoblog/modules/mod_calendar/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23582/modules/mod_calendar/templates Modified Files: mod_calendar.tpl.htm Log Message: RFE: 1280283 - Completed next/prev day with post functions in mod_calendar Index: mod_calendar.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_calendar/templates/mod_calendar.tpl.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mod_calendar.tpl.htm 7 Oct 2005 15:14:57 -0000 1.2 +++ mod_calendar.tpl.htm 8 Oct 2005 13:27:41 -0000 1.3 @@ -1,7 +1,7 @@ <!-- BEGIN: main --> <!-- BEGIN: calendar --> <div id="mod_calendar"> - <p><a href="{SITE_URL}index.php{IISBUG}/{PREV_DATE}" title="{TXT.cal_previous}"><img src="{SITE_URL}{ARROW_LEFT}" border="0" alt="{TXT.cal_previous}" /></a> {CAL_DATE} <!-- BEGIN: next --><a href="{SITE_URL}index.php{IISBUG}/{NEXT_DATE}" title="{TXT.cal_next}"><img src="{SITE_URL}{ARROW_RIGHT}" border="0" alt="{TXT.cal_next}" /></a><!-- END: next --></p> + <p><!-- BEGIN: prev --><a href="{SITE_URL}index.php{IISBUG}/{PREV_DATE}" title="{TXT.cal_previous}"><img src="{SITE_URL}{ARROW_LEFT}" border="0" alt="{TXT.cal_previous}" /></a><!-- END: prev --> {CAL_DATE} <!-- BEGIN: next --><a href="{SITE_URL}index.php{IISBUG}/{NEXT_DATE}" title="{TXT.cal_next}"><img src="{SITE_URL}{ARROW_RIGHT}" border="0" alt="{TXT.cal_next}" /></a><!-- END: next --></p> <table cellspacing="0"> <tr class="calendar_header"> <!-- BEGIN: header--> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-08 13:27:49
|
Update of /cvsroot/comoblog/comoblog/modules/mod_calendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23582/modules/mod_calendar Modified Files: mod_calendar.php Log Message: RFE: 1280283 - Completed next/prev day with post functions in mod_calendar Index: mod_calendar.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_calendar/mod_calendar.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- mod_calendar.php 7 Oct 2005 15:49:15 -0000 1.5 +++ mod_calendar.php 8 Oct 2005 13:27:41 -0000 1.6 @@ -95,31 +95,71 @@ $current_start = mktime (0,0,0,$current_date['mon'],$current_date['mday'],$current_date['year']); $current_date = getdate($current_start); +$valid_next = FALSE; +$valid_prev = FALSE; if (CFG_CALENDAR_BUTTON_CONFIG == "Skip One Day") { $next_timestamp = mktime (0,0,0,$current_date['mon'],$current_date['mday'] + 1,$current_date['year']); $prev_timestamp = mktime (0,0,0,$current_date['mon'],$current_date['mday'] - 1,$current_date['year']); + $valid_next = TRUE; + $valid_prev = TRUE; } else if (CFG_CALENDAR_BUTTON_CONFIG == "Skip One Month") { $next_timestamp = mktime (0,0,0,$current_date['mon'] + 1,$current_date['mday'],$current_date['year']); $prev_timestamp = mktime (0,0,0,$current_date['mon'] - 1,$current_date['mday'],$current_date['year']); + $valid_next = TRUE; + $valid_prev = TRUE; } else { + // Find prev day with posts + $currenttime = mktime(23,59,59,$current_date['mon'],$current_date['mday'] - 1,$current_date['year']); + $query = " + select post_added + from ".CFG_MYSQL_TABPREFIX."posts + where post_added <= '".$currenttime."' order by post_added desc limit 1"; + $res = mysql_query($query); + + if ($row = mysql_fetch_row($res)) { + $created_date = getdate($row[0]); + $prev_timestamp = mktime(0,0,0,$created_date['mon'], $created_date['mday'], $created_date['year']); + $valid_prev = TRUE; + } + + // Find next day with posts + $currenttime = mktime(0,0,0,$current_date['mon'],$current_date['mday']+1,$current_date['year']); + $query = " + select post_added + from ".CFG_MYSQL_TABPREFIX."posts + where post_added >= '".$currenttime."' order by post_added limit 1"; + $res = mysql_query($query); + if ($row = mysql_fetch_row($res)) { + $created_date = getdate($row[0]); + $next_timestamp = mktime(0,0,0,$created_date['mon'], $created_date['mday'], $created_date['year']); + $valid_next = TRUE; + } } -$pd = getdate($prev_timestamp); -if ($pd['mon'] < 10) $pd['mon'] = '0'.$pd['mon']; -if ($pd['mday'] < 10) $pd['mday'] = '0'.$pd['mday']; -$prev_date = $pd['year'].$pd['mon'].$pd['mday']; +if ($valid_prev) +{ + $pd = getdate($prev_timestamp); + if ($pd['mon'] < 10) $pd['mon'] = '0'.$pd['mon']; + if ($pd['mday'] < 10) $pd['mday'] = '0'.$pd['mday']; + $prev_date = $pd['year'].$pd['mon'].$pd['mday']; + $mod_calendar_tpl->assign ("PREV_DATE", $prev_date); +} -$nd = getdate($next_timestamp); -if ($nd['mon'] < 10) $nd['mon'] = '0'.$nd['mon']; -if ($nd['mday'] < 10) $nd['mday'] = '0'.$nd['mday']; -$next_date = $nd['year'].$nd['mon'].$nd['mday']; +if ($valid_next) +{ + $nd = getdate($next_timestamp); + if ($nd['mon'] < 10) $nd['mon'] = '0'.$nd['mon']; + if ($nd['mday'] < 10) $nd['mday'] = '0'.$nd['mday']; + $next_date = $nd['year'].$nd['mon'].$nd['mday']; + $mod_calendar_tpl->assign ("NEXT_DATE", $next_date); +} $today_timestamp = time(); $today_date = getdate($today_timestamp); @@ -127,13 +167,12 @@ $mod_calendar_tpl->assign ("CAL_DATE", strftime($CAL_DATE_FORMAT, $current_timestamp)); $mod_calendar_tpl->assign ("CURRENT_DATE", $current_date); -$mod_calendar_tpl->assign ("NEXT_DATE", $next_date); -$mod_calendar_tpl->assign ("PREV_DATE", $prev_date); $date = getdate(time()); -if ($current_start < mktime(0,0,0,$date['mon'],$date['mday'],$date['year'])) +if ($valid_next && $current_start < mktime(0,0,0,$date['mon'],$date['mday'],$date['year'])) $mod_calendar_tpl->parse("main.calendar.next"); - +if ($valid_prev) + $mod_calendar_tpl->parse("main.calendar.prev"); /////////////////////////////////////////////////////////////////////////////// // |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-08 13:27:49
|
Update of /cvsroot/comoblog/comoblog/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23582/docs Modified Files: CHANGELOG Log Message: RFE: 1280283 - Completed next/prev day with post functions in mod_calendar Index: CHANGELOG =================================================================== RCS file: /cvsroot/comoblog/comoblog/docs/CHANGELOG,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- CHANGELOG 7 Oct 2005 15:14:57 -0000 1.16 +++ CHANGELOG 8 Oct 2005 13:27:41 -0000 1.17 @@ -14,6 +14,7 @@ * FEATURE: HTML now accepted in intro and footer (1280287) * FEATURE: Allow date editing through admin (1280315) * FEATURE: Ability to change the first weekday in calendar (1280305) +* FEATURE: Multiple functions now available for next/prev (1280283) * CORE: Added pre/post db save post filter framework * CORE: Updated core supported module set * BUG: Disable POP3 APOP authentication by default (1280278) |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-08 13:14:32
|
Update of /cvsroot/comoblog/comoblog/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21149 Modified Files: post_add.php post_edit.php Log Message: Add locale to post_add and post_edit Index: post_add.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/post_add.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- post_add.php 8 Oct 2005 12:26:46 -0000 1.4 +++ post_add.php 8 Oct 2005 13:14:24 -0000 1.5 @@ -3,6 +3,9 @@ $tpl = new XTemplate('templates/post_add.tpl.htm'); +// date localization +setlocale (LC_TIME, $SET_LOCALE); + if (strtoupper($_SERVER['REQUEST_METHOD'] == 'POST')) { $errors = array(); Index: post_edit.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/post_edit.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- post_edit.php 8 Oct 2005 12:26:46 -0000 1.4 +++ post_edit.php 8 Oct 2005 13:14:24 -0000 1.5 @@ -1,6 +1,9 @@ <?php require ('include/admin.inc.php'); +// date localization +setlocale (LC_TIME, $SET_LOCALE); + if (strtoupper($_SERVER['REQUEST_METHOD'] == 'POST')) { $errors = array(); |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-08 12:26:53
|
Update of /cvsroot/comoblog/comoblog/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11769 Modified Files: post_add.php post_edit.php Log Message: Update post_add, post_edit to set post_added as well as post_mail_date Index: post_add.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/post_add.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- post_add.php 7 Oct 2005 14:09:48 -0000 1.3 +++ post_add.php 8 Oct 2005 12:26:46 -0000 1.4 @@ -73,7 +73,7 @@ post_added, post_ctype, post_images, post_mail_from, post_mail_date, post_mail_subject, post_mail_body, topic_id ) values ( - '".time()."', + '".$post['post_mail_date']."', 'text/plain', '0', '".$post['post_mail_from']."', Index: post_edit.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/admin/post_edit.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- post_edit.php 7 Oct 2005 14:09:48 -0000 1.3 +++ post_edit.php 8 Oct 2005 12:26:46 -0000 1.4 @@ -111,6 +111,7 @@ 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'] ."', topic_id = '".$post['topic_id'] ."' where post_id = '".$post['post_id'] ."' |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-07 15:49:26
|
Update of /cvsroot/comoblog/comoblog/modules/mod_calendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21397/modules/mod_calendar Modified Files: mod_calendar.php Log Message: RFE: 1280382 - Start worked on alternative next/prev calendar buttons. Config added and next/prev day/month are working. Next/prev posted day still to be completed Index: mod_calendar.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_calendar/mod_calendar.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mod_calendar.php 7 Oct 2005 15:29:47 -0000 1.4 +++ mod_calendar.php 7 Oct 2005 15:49:15 -0000 1.5 @@ -96,8 +96,20 @@ $current_start = mktime (0,0,0,$current_date['mon'],$current_date['mday'],$current_date['year']); $current_date = getdate($current_start); -$next_timestamp = mktime (0,0,0,$current_date['mon'],$current_date['mday'] + 1,$current_date['year']); -$prev_timestamp = mktime (0,0,0,$current_date['mon'],$current_date['mday'] - 1,$current_date['year']); +if (CFG_CALENDAR_BUTTON_CONFIG == "Skip One Day") +{ + $next_timestamp = mktime (0,0,0,$current_date['mon'],$current_date['mday'] + 1,$current_date['year']); + $prev_timestamp = mktime (0,0,0,$current_date['mon'],$current_date['mday'] - 1,$current_date['year']); +} +else if (CFG_CALENDAR_BUTTON_CONFIG == "Skip One Month") +{ + $next_timestamp = mktime (0,0,0,$current_date['mon'] + 1,$current_date['mday'],$current_date['year']); + $prev_timestamp = mktime (0,0,0,$current_date['mon'] - 1,$current_date['mday'],$current_date['year']); +} +else +{ + +} $pd = getdate($prev_timestamp); if ($pd['mon'] < 10) $pd['mon'] = '0'.$pd['mon']; |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-07 15:49:22
|
Update of /cvsroot/comoblog/comoblog/modules/mod_calendar/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21397/modules/mod_calendar/install Modified Files: mod_calendar.xml Log Message: RFE: 1280382 - Start worked on alternative next/prev calendar buttons. Config added and next/prev day/month are working. Next/prev posted day still to be completed Index: mod_calendar.xml =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_calendar/install/mod_calendar.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mod_calendar.xml 7 Oct 2005 15:29:47 -0000 1.6 +++ mod_calendar.xml 7 Oct 2005 15:49:15 -0000 1.7 @@ -9,6 +9,16 @@ <allowed_pos>sidebar</allowed_pos> <param + name="CFG_CALENDAR_BUTTON_CONFIG" + description="When pressing the next/prev buttons the function should be" + type="select" + editable="Y" + accept_null="N" + value="Skip One Day" + restrict_values="Skip One Day|Skip One Month|Skip to Next Posted Day" + /> + + <param name="CFG_CALENDAR_DAY_OFFSET" description="Option to choose the first day of the week in the calendar" type="select" |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-07 15:49:22
|
Update of /cvsroot/comoblog/comoblog/docs/upgrades In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21397/docs/upgrades Modified Files: easymoblog-0.5.1_to_comoblog-0.1.sql Log Message: RFE: 1280382 - Start worked on alternative next/prev calendar buttons. Config added and next/prev day/month are working. Next/prev posted day still to be completed Index: easymoblog-0.5.1_to_comoblog-0.1.sql =================================================================== RCS file: /cvsroot/comoblog/comoblog/docs/upgrades/easymoblog-0.5.1_to_comoblog-0.1.sql,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- easymoblog-0.5.1_to_comoblog-0.1.sql 7 Oct 2005 15:29:47 -0000 1.7 +++ easymoblog-0.5.1_to_comoblog-0.1.sql 7 Oct 2005 15:49:14 -0000 1.8 @@ -5,6 +5,8 @@ update comoblog_preferences SET pref_display_order=1 where pref_name='CFG_BODY_BGCOLOR'; update comoblog_preferences SET pref_display_order=2 where pref_name='CFG_PAGE_WIDTH'; update comoblog_preferences SET pref_display_order=3 where pref_name='CFG_BG_IMG'; +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_CALENDAR_BUTTON_CONFIG', +'Skip One Day', 'When pressing the next/prev buttons the function should be', 0, 'N', 'select', 'Skip One Day|Skip One Month|Skip to Next Posted Day', 'N', 'Y', 0, 'mod_calendar'); 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_CALENDAR_DAY_OFFSET', 'Sunday', 'Option to choose the first day of the week in the calendar', 0, 'N', 'select', 'Saturday|Sunday|Monday|Tuesday|Wednesday|Thursday|Friday', 'N', 'Y', 0, 'mod_calendar'); 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_ALLOW_HTML', |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-07 15:29:56
|
Update of /cvsroot/comoblog/comoblog/docs/upgrades In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17367/docs/upgrades Modified Files: easymoblog-0.5.1_to_comoblog-0.1.sql Log Message: Update mod_calendar to allow day offset to be a select string rather than an integer Index: easymoblog-0.5.1_to_comoblog-0.1.sql =================================================================== RCS file: /cvsroot/comoblog/comoblog/docs/upgrades/easymoblog-0.5.1_to_comoblog-0.1.sql,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- easymoblog-0.5.1_to_comoblog-0.1.sql 7 Oct 2005 15:14:57 -0000 1.6 +++ easymoblog-0.5.1_to_comoblog-0.1.sql 7 Oct 2005 15:29:47 -0000 1.7 @@ -6,7 +6,7 @@ update comoblog_preferences SET pref_display_order=2 where pref_name='CFG_PAGE_WIDTH'; update comoblog_preferences SET pref_display_order=3 where pref_name='CFG_BG_IMG'; 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_CALENDAR_DAY_OFFSET', -'0', 'Offset indicating the first day of the month. 0 is Saturday, 1 is Sunday, etc', 0, 'N', 'text', '0|1|2|3|4|5|6', 'N', 'Y', 0, 'mod_calendar'); +'Sunday', 'Option to choose the first day of the week in the calendar', 0, 'N', 'select', 'Saturday|Sunday|Monday|Tuesday|Wednesday|Thursday|Friday', 'N', 'Y', 0, 'mod_calendar'); 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_ALLOW_HTML', 'yes', 'Allow HTML from posts to be displayed', 1, 'N', 'select', 'yes|no', 'N', 'Y', 0, ''); 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_MAX_ALLOWED_IMAGES', 'unlimited', 'The maximum number of images that will be read from an email post.', 1, 'N', 'select', 'unlimited|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|10', 'N', 'Y', 0, ''); |