comoblog-commit Mailing List for CoMoblog Mobile Blog Application (Page 30)
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-05 01:38:45
|
Update of /cvsroot/comoblog/comoblog/modules/mod_search/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25544/modules/mod_search/include Modified Files: blog_search.inc.php Log Message: Move filter_html code into core library Index: blog_search.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_search/include/blog_search.inc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- blog_search.inc.php 5 Oct 2005 00:48:15 -0000 1.1 +++ blog_search.inc.php 5 Oct 2005 01:38:32 -0000 1.2 @@ -83,40 +83,6 @@ } -function filter_html($body) -{ - $search = array ("'<script[^>]*?>.*?</script>'si", // Strip out javascript - "'<[\/\!]*?[^<>]*?>'si", // Strip out HTML tags - "'([\r\n])[\s]+'", // Strip out white space - "'&(quot|#34);'i", // Replace HTML entities - "'&(amp|#38);'i", - "'&(lt|#60);'i", - "'&(gt|#62);'i", - "'&(nbsp|#160);'i", - "'&(iexcl|#161);'i", - "'&(cent|#162);'i", - "'&(pound|#163);'i", - "'&(copy|#169);'i", - "'&#(\d+);'e"); // evaluate as php - - $replace = array ("", - "", - " ", - "\"", - "&", - "<", - ">", - " ", - chr(161), - chr(162), - chr(163), - chr(169), - "chr(\\1)"); - - $body = preg_replace($search, $replace, $body); - return $body; -} - function filter_punc($body) { $search = "/(,|\.|<|>|\?|\/|;|:|\"|'|{|}|\[|\]|\\\|\||=|-|_|\+|\(|\)|\*|&|\^|%|\\$|#|@|!|~|`)/"; |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 01:38:45
|
Update of /cvsroot/comoblog/comoblog/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25544/include Modified Files: libraries.inc.php Log Message: Move filter_html code into core library Index: libraries.inc.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/include/libraries.inc.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- libraries.inc.php 16 Aug 2005 05:49:46 -0000 1.1.1.1 +++ libraries.inc.php 5 Oct 2005 01:38:32 -0000 1.2 @@ -470,7 +470,39 @@ return ($contents); } +function filter_html($body) +{ + $search = array ("'<script[^>]*?>.*?</script>'si", // Strip out javascript + "'<[\/\!]*?[^<>]*?>'si", // Strip out HTML tags + "'([\r\n])[\s]+'", // Strip out white space + "'&(quot|#34);'i", // Replace HTML entities + "'&(amp|#38);'i", + "'&(lt|#60);'i", + "'&(gt|#62);'i", + "'&(nbsp|#160);'i", + "'&(iexcl|#161);'i", + "'&(cent|#162);'i", + "'&(pound|#163);'i", + "'&(copy|#169);'i", + "'&#(\d+);'e"); // evaluate as php + + $replace = array ("", + "", + " ", + "\"", + "&", + "<", + ">", + " ", + chr(161), + chr(162), + chr(163), + chr(169), + "chr(\\1)"); + $body = preg_replace($search, $replace, $body); + return $body; +} function create_thumbnail ($img_id, $img_ext, $maxwidth, $maxheight, $gd_version) { |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 01:33:04
|
Update of /cvsroot/comoblog/comoblog/_install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24764/_install Modified Files: comoblog_preferences.xml Log Message: RFE: 1304056 - Restriction of number of images to upload from a post Index: comoblog_preferences.xml =================================================================== RCS file: /cvsroot/comoblog/comoblog/_install/comoblog_preferences.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- comoblog_preferences.xml 4 Oct 2005 05:39:06 -0000 1.8 +++ comoblog_preferences.xml 5 Oct 2005 01:32:56 -0000 1.9 @@ -105,6 +105,19 @@ editable="Y" display_order="0" /> + + <param + name="CFG_MAX_ALLOWED_IMAGES" + value="unlimited" + description="The maximum number of images that will be read from an email post." + topic_id="1" + encrypt="N" + type="select" + restrict_values="unlimited|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|10" + accept_null="N" + editable="Y" + display_order="0" + /> <param name="CFG_BATCH_TIMEOUT" |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 01:33:04
|
Update of /cvsroot/comoblog/comoblog/docs/upgrades In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24764/docs/upgrades Modified Files: easymoblog-0.5.1_to_comoblog-0.1.sql Log Message: RFE: 1304056 - Restriction of number of images to upload from a post 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.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- easymoblog-0.5.1_to_comoblog-0.1.sql 5 Oct 2005 00:45:34 -0000 1.3 +++ easymoblog-0.5.1_to_comoblog-0.1.sql 5 Oct 2005 01:32:56 -0000 1.4 @@ -5,6 +5,7 @@ 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_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, ''); 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_BG_IMG_REPEAT', 'repeat', 'Repeat of background image', 14, 'N', 'select', 'repeat|repeat-x|repeat-y|no-repeat', 'N', 'Y', 4, ''); 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_DEBUG', 'no', 'POP3 enable debugging', 4, 'N', 'select', 'no|yes', 'N', 'Y', 5, ''); 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, ''); |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 01:33:04
|
Update of /cvsroot/comoblog/comoblog/batch In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24764/batch Modified Files: comoblog_batch.php Log Message: RFE: 1304056 - Restriction of number of images to upload from a post Index: comoblog_batch.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/batch/comoblog_batch.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- comoblog_batch.php 5 Oct 2005 00:45:34 -0000 1.5 +++ comoblog_batch.php 5 Oct 2005 01:32:56 -0000 1.6 @@ -298,7 +298,13 @@ $posts[$post_cnt]['images_mime'] = array(); $posts[$post_cnt]['images_cid'] = array(); $posts[$post_cnt]['images_tmp'] = array(); - + + $image_count = 0; + if (CFG_MAX_ALLOWED_IMAGES == 'unlimited') + $max_image_count = 0; + else + $max_image_count = CFG_MAX_ALLOWED_IMAGES; + if (is_array($decoded_msg[$msg_cnt]->parts)) { // multipart for ($p = 0; $p < count($decoded_msg[$msg_cnt]->parts); $p++) { $text_plain = 0; @@ -331,7 +337,8 @@ if ($imgsize[2] == 1) $ctype = 'image/gif'; elseif($imgsize[2] == 2) $ctype = 'image/jpg'; elseif($imgsize[2] == 3) $ctype = 'image/png'; - if ($ctype != '') { + if ($ctype != '' && ($max_image_count == 0 || $image_count < $max_image_count)) { + $image_count += 1; array_push ($posts[$post_cnt]['images'], $decoded_msg[$msg_cnt]->parts[$p]->parts[$pp]->body); array_push ($posts[$post_cnt]['images_mime'], $ctype); array_push ($posts[$post_cnt]['images_cid'], $decoded_msg[$msg_cnt]->parts[$p]->parts[$pp]->headers['content-id']); @@ -368,7 +375,8 @@ if ($imgsize[2] == 1) $ctype = 'image/gif'; elseif($imgsize[2] == 2) $ctype = 'image/jpg'; elseif($imgsize[2] == 3) $ctype = 'image/png'; - if ($ctype != '') { + if ($ctype != '' && ($max_image_count == 0 || $image_count < $max_image_count)) { + $image_count += 1; array_push ($posts[$post_cnt]['images'], $decoded_msg[$msg_cnt]->parts[$p]->body); array_push ($posts[$post_cnt]['images_mime'], $ctype); array_push ($posts[$post_cnt]['images_cid'], $decoded_msg[$msg_cnt]->parts[$p]->headers['content-id']); @@ -402,7 +410,8 @@ if ($imgsize[2] == 1) $ctype = 'image/gif'; elseif($imgsize[2] == 2) $ctype = 'image/jpg'; elseif($imgsize[2] == 3) $ctype = 'image/png'; - if ($ctype != '') { + if ($ctype != '' && ($max_image_count == 0 || $image_count < $max_image_count)) { + $image_count += 1; array_push ($posts[$post_cnt]['images'], $decoded_msg[$msg_cnt]->body); array_push ($posts[$post_cnt]['images_mime'], $ctype); array_push ($posts[$post_cnt]['images_cid'], $decoded_msg[$msg_cnt]->headers['content-id']); |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 01:08:57
|
Update of /cvsroot/comoblog/comoblog/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19291 Modified Files: THANKS Log Message: Thanks update Index: THANKS =================================================================== RCS file: /cvsroot/comoblog/comoblog/docs/THANKS,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- THANKS 2 Sep 2005 02:49:45 -0000 1.2 +++ THANKS 5 Oct 2005 01:08:48 -0000 1.3 @@ -21,6 +21,7 @@ And then, * Mark Wallis - Project Leader for the CoMoblog project +* IamDecal - patches and module development And of course, |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:49:51
|
Update of /cvsroot/comoblog/comoblog/modules/mod_example/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14887/mod_example/admin Added Files: mod_example.php Log Message: Add mod_example module for developers --- NEW FILE: mod_example.php --- <?php require_once ('../../../admin/include/admin.inc.php'); // template file $tpl = new XTemplate ('templates/mod_example.tpl.htm'); $tpl->parse('main'); $tpl->out('main'); ?> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:49:51
|
Update of /cvsroot/comoblog/comoblog/modules/mod_example In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14887/mod_example Added Files: mod_example.php Log Message: Add mod_example module for developers --- NEW FILE: mod_example.php --- <?php require_once (CFG_BASE_PATH.'/modules/mod_blogrolling/include/mod_blogrolling.inc.php'); $mod_contents = 'I am a module'; ?> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:49:50
|
Update of /cvsroot/comoblog/comoblog/modules/mod_example/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14887/mod_example/install Added Files: mod_example.xml mod_example_commented.xml Log Message: Add mod_example module for developers --- NEW FILE: mod_example.xml --- <?xml version="1.0" standalone="no"?> <!DOCTYPE module SYSTEM "http://comoblog.sourceforge.net/DTD/comoblog_mod_install.dtd"> <module> <name> mod_example </name> <description> just an example to help developers making new modules </description> <allowed_pos> sidebar </allowed_pos> <allowed_pos> top </allowed_pos> <dbquery></dbquery> <dbquery></dbquery> <param name="CFG_EXAMPLE_PARAMETER" description="Example parameter" type="color_picker" accept_null="N" encrypt="N" restricted_values="" editable="Y" value="ffffff" /> <param name="CFG_ANOTHER_EXAMPLE_PARAM" description="Just another example" type="select" restricted_values="value1|value2|value3" encrypt="N" editable="Y" value="value1" /> </module> --- NEW FILE: mod_example_commented.xml --- <?xml version="1.0"?> <!-- refer to this file if you want to develop a new module --> <!-- It contains all informations needed to create a module installation file --> <!-- the root element --> <module> <!-- unique module name, must be prefixed by 'mod_' (max 64 chars) --> <name> mod_example </name> <!-- description of your module (max 255 chars) --> <description> just an example to help developers making new modules </description> <!-- if your module can appear in the sidebar (if not, omit this element): --> <allowed_pos> sidebar </allowed_pos> <!-- if your module can appear in the topbar (if not, omit this element): --> <allowed_pos> top </allowed_pos> <dbquery> <!-- you can write here a SQL query: it will be executed by the installation script. This is useful if you need a new db table for your module --> </dbquery> <dbquery> <!-- put only ONE query for each dbquery element!!! --> </dbquery> <!-- if you need configuration parameters, use 'param' elements --> <!-- use a param element for each parameter!!! --> <param <!-- name of the parameter, it will be used as a PHP constant --> <!-- please include module name in parameter name, to avoid conflicts --> name="CFG_EXAMPLE_PARAMETER" <!-- a description of the parameter --> description="Example parameter" <!-- parameter type: use one of the followin values: text, image, password, select, color_picker --> <!-- this will be used by the Admin Area framework to use the proper field in the 'preferences' form --> type="color_picker" <!-- wether to accept null (or empty string) as parameter value (Y|N) --> accept_null="N" <!-- wether to encrypt value in the db, use it only for password parameters (Y|N) --> encrypt="N" <!-- list of restricted values, use it for 'select' parameters --> restricted_values="" <!-- wether users can change parameter's value in Admin Area (Y|N) --> editable="Y" <!-- value of parameter --> value="ffffff" /> <param name="CFG_ANOTHER_EXAMPLE_PARAM" description="Just another example" type="select" restricted_values="value1|value2|value3" encrypt="N" editable="Y" value="value1" /> </module> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:49:50
|
Update of /cvsroot/comoblog/comoblog/modules/mod_example/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14887/mod_example/img Added Files: mod_example.gif mod_example_big.gif Log Message: Add mod_example module for developers --- NEW FILE: mod_example.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mod_example_big.gif --- (This appears to be a binary file; contents omitted.) |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:49:17
|
Update of /cvsroot/comoblog/comoblog/modules/mod_example/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14728/img Log Message: Directory /cvsroot/comoblog/comoblog/modules/mod_example/img added to the repository |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:49:17
|
Update of /cvsroot/comoblog/comoblog/modules/mod_example/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14728/admin Log Message: Directory /cvsroot/comoblog/comoblog/modules/mod_example/admin added to the repository |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:49:17
|
Update of /cvsroot/comoblog/comoblog/modules/mod_example/admin/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14759/templates Log Message: Directory /cvsroot/comoblog/comoblog/modules/mod_example/admin/templates added to the repository |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:49:17
|
Update of /cvsroot/comoblog/comoblog/modules/mod_example/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14728/install Log Message: Directory /cvsroot/comoblog/comoblog/modules/mod_example/install added to the repository |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:49:17
|
Update of /cvsroot/comoblog/comoblog/modules/mod_example/admin/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14759/img Log Message: Directory /cvsroot/comoblog/comoblog/modules/mod_example/admin/img added to the repository |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:48:54
|
Update of /cvsroot/comoblog/comoblog/modules/mod_example In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14714/mod_example Log Message: Directory /cvsroot/comoblog/comoblog/modules/mod_example added to the repository |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:48:34
|
Update of /cvsroot/comoblog/comoblog/modules/mod_search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14620/mod_search Added Files: README mod_search.php mod_search_post_filter.php search_results.php Log Message: RFE: 1280296 - mod_search module --- NEW FILE: README --- This CoMoblog module adds post searching capabilities to your blog Author: Mark Wallis - mw...@se... It comes in three parts * A sidebar module that adds a search box for users to interact with * A post filter that indexes the post as they enter the system * Admin scripts to mass indexing posts If you are adding this module to an existing system you will want to mass index your existing posts. Todo this change into the root directory you have CoMoblog installed into and run the commands below after installing the module via the web interface. cd modules/mod_search/admin php -q ./mass_search_index.php Any problems please raise them in the CoMoblog SourceForge. Mark. --- NEW FILE: mod_search_post_filter.php --- <?php require_once (dirname(__FILE__).'/include/blog_search.inc.php'); index($post); ?> --- NEW FILE: mod_search.php --- <?php $mod_contents = '<div id="mod_blog_search"><table width="100%" border="0" cellspacing="0" cellpadding="0">'; $mod_contents .= '<tr><td><p>'; $mod_contents .= '<form action="./modules/mod_search/search_results.php" method="post">'; $mod_contents .= 'Search: <input type="text" name="search_txt"><input type="submit" name="search_but" value="search">'; $mod_contents .= '</form>'; $mod_contents .= '</p></td></tr></table></div>'; ?> --- NEW FILE: search_results.php --- <?php require_once ("../../include/config.inc.php"); require_once ("include/blog_search.inc.php"); // CURRENT_TIMESTAMP ////////////////////////////////////////////////////////// // $current_timestamp = ''; if(isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] != '/') { $current_date = substr($_SERVER['PATH_INFO'],1,strlen($_SERVER['PATH_INFO'])-1); $y = substr($current_date,0,4); $m = substr($current_date,4,2); $d = substr($current_date,6,2); $current_timestamp = mktime(0,0,0,$m,$d,$y); if ($current_timestamp > time() || $current_timestamp <= 0) $current_timestamp = time(); } else { $current_timestamp = time(); } // /////////////////////////////////////////////////////////////////////////////// $tpl = new XTemplate (CFG_BASE_PATH."/modules/mod_search/templates/search_results.tpl.htm", "main"); $search_string = $_POST['search_txt']; $posts = do_search ($search_string); $page_title = "Search Results for '".$search_string."'"; $tpl->assign ('PAGE_TITLE', $page_title); $tpl->assign ('SITE_URL', CFG_SITE_URL); if ($posts) { //for ($c = 0; $c < count($posts); $c++) { foreach ($posts as $post) { // clean up post $post['post_mail_from'] = antispam(htmlentities($post['post_mail_from']), true); $post['post_mail_subject'] = antispam(htmlentities($post['post_mail_subject']), true); $date = getdate($post['post_mail_date']); $post['post_mail_date'] = strftime($CAL_DATE_FORMAT." %H:%M", $post['post_mail_date']); $tpl->assign('POST', $post); // topic icon if ($post['topic_id'] != 0) $tpl->parse('main.post.topic'); // images if ($post['post_images'] > 0) { $query = " select img_thumb, concat(img_id,'.',img_extension) as img_name, concat(img_id,'_thumb.',img_extension) as img_thumb_name, img_width, img_height from ".CFG_MYSQL_TABPREFIX."images where post_id = '".$post['post_id']."' and img_display = 'attach' "; $res = mysql_query($query); while ($row = mysql_fetch_assoc($res)) { if ($row['img_thumb'] == 'Y') { $tpl->assign('IMAGE', $row); $tpl->parse('main.post.thumb_img'); } else { $tpl->assign('IMAGE', $row); $tpl->parse('main.post.img'); } } } // author email if (CFG_INTERACTION_AUTHOR == 'yes') $tpl->parse('main.post.author'); // interaction bar if (CFG_INTERACTION_COMMENTS == 'yes') $tpl->parse('main.post.comment_button'); if (CFG_INTERACTION_TRACKBACK == 'yes') { $tpl->parse('main.post.auto_discovery_trackback'); $tpl->parse('main.post.trackback_button'); } $tpl->parse('main.post'); } } else { $tpl->parse('main.noposts'); } // modules //////////////////////////////////////////////////////////////////// // if (count($SIDEBAR_MODULES) > 0) { for ($mod_cnt = 0; $mod_cnt < count($SIDEBAR_MODULES); $mod_cnt++) { include_once (CFG_BASE_PATH.'/modules/'.$SIDEBAR_MODULES[$mod_cnt].'/'.$SIDEBAR_MODULES[$mod_cnt].'.php'); $tpl->assign('SIDEBAR_MODULE',$mod_contents); $tpl->parse('main.sidebar_module'); } } if (count($TOP_MODULES) > 0) { for ($mod_cnt = 0; $mod_cnt < count($TOP_MODULES); $mod_cnt++) { include_once (CFG_BASE_PATH.'/modules/'.$TOP_MODULES[$mod_cnt].'/'.$TOP_MODULES[$mod_cnt].'.php'); $tpl->assign('TOP_MODULE',$mod_contents); $tpl->parse('main.top_bar.top_module'); } $tpl->parse('main.top_bar'); } // /////////////////////////////////////////////////////////////////////////////// $tpl->parse('main'); $tpl->out('main'); // close db connection mysql_close (); ?> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:48:34
|
Update of /cvsroot/comoblog/comoblog/modules/mod_search/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14620/mod_search/include Added Files: blog_search.inc.php Log Message: RFE: 1280296 - mod_search module --- NEW FILE: blog_search.inc.php --- <?php include_once (dirname(__FILE__).'/../../../include/config.inc.php'); function do_search ($search_string) { $search_string = strtolower($search_string); $posts = array(); $query = "select distinct post_id from ".CFG_MYSQL_TABPREFIX."blog_search_index where word like '%".$search_string."%'"; $res = mysql_query($query); if (!$res || !mysql_num_rows($res)) return (false); while ($row = mysql_fetch_array($res, MYSQL_NUM)) { $post_id = $row[0]; $post = post_details ($post_id); $posts[$post_id] = $post; } return $posts; } function mass_index () { // Clear index table echo "Running Mass Index Function ...\n"; echo "Removing all previous search index entries\n"; $query = "delete from ".CFG_MYSQL_TABPREFIX."blog_search_index"; $res = mysql_query($query); echo "Looping through all blog entries and indexing\n"; // Loop through all posts $query = "select post_id from ".CFG_MYSQL_TABPREFIX."posts"; $res = mysql_query($query); if (!$res || !mysql_num_rows($res)) { echo "No posts found to index\n"; return (false); } $cnt = 0; while ($row = mysql_fetch_array($res, MYSQL_NUM)) { $post_id = $row[0]; $post = post_details($post_id); $post['id'] = $post_id; index($post); $cnt = $cnt + 1; } echo "Completed indexing of $cnt posts\n"; } function unindex ($post) { $query = "delete from ".CFG_MYSQL_TABPREFIX."blog_search_index where post_id = '".$post['id']."'"; $res = mysql_query($query); } function index ($post) { process_text( $post['post_mail_body'], $post['post_id'] ); process_text( $post['post_mail_subject'], $post['post_id'] ); } function process_text ($body, $id) { $body = filter_html($body); $body = filter_punc($body); $pieces = explode(' ', $body); foreach ($pieces as $piece) { $piece = trim($piece); if (strlen($piece) > 3 && strcmp($piece, "") != 0 && !is_excluded($piece)) insert_index($id, $piece); } } function filter_html($body) { $search = array ("'<script[^>]*?>.*?</script>'si", // Strip out javascript "'<[\/\!]*?[^<>]*?>'si", // Strip out HTML tags "'([\r\n])[\s]+'", // Strip out white space "'&(quot|#34);'i", // Replace HTML entities "'&(amp|#38);'i", "'&(lt|#60);'i", "'&(gt|#62);'i", "'&(nbsp|#160);'i", "'&(iexcl|#161);'i", "'&(cent|#162);'i", "'&(pound|#163);'i", "'&(copy|#169);'i", "'&#(\d+);'e"); // evaluate as php $replace = array ("", "", " ", "\"", "&", "<", ">", " ", chr(161), chr(162), chr(163), chr(169), "chr(\\1)"); $body = preg_replace($search, $replace, $body); return $body; } function filter_punc($body) { $search = "/(,|\.|<|>|\?|\/|;|:|\"|'|{|}|\[|\]|\\\|\||=|-|_|\+|\(|\)|\*|&|\^|%|\\$|#|@|!|~|`)/"; $replace = " "; $body = preg_replace ($search, $replace, $body); return $body; } function insert_index ($post_id, $word) { $query = " insert into ".CFG_MYSQL_TABPREFIX."blog_search_index (post_id, word) values ('". $post_id ."', '". strtolower($word) ."')"; $res = mysql_query($query); } function is_excluded($word) { $excludes = explode(',', CFG_MOD_BLOG_SEARCH_EXCLUSIONS); foreach ($excludes as $exclusion) { if (strcasecmp($exclusion,$word) == 0) return(true); } return (false); } ?> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:48:34
|
Update of /cvsroot/comoblog/comoblog/modules/mod_search/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14620/mod_search/img Added Files: mod_search.gif mod_search_big.gif Log Message: RFE: 1280296 - mod_search module --- NEW FILE: mod_search.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mod_search_big.gif --- (This appears to be a binary file; contents omitted.) |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:48:34
|
Update of /cvsroot/comoblog/comoblog/modules/mod_search/css In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14620/mod_search/css Added Files: :wq! mod_search.css.php Log Message: RFE: 1280296 - mod_search module --- NEW FILE: :wq! --- <?php require_once (dirname(__FILE__).'/../../../include/config.inc.php'); Header ('Content-type: text/css'); echo ' #mod_blog_search table { width: '.(CFG_SIDEBAR_WIDTH-10).'px; border: none; } #mod_blod_search table, #mod_blog_search p, #mod_blog_search td { font-size: '.CFG_MOD_BLOG_SEARCH_FONT_SIZE.'px; font-family: '.CFG_MOD_BLOG_SEARCH_FONT_FAMILY.'; text-align: center; vertical-align: middle; padding:0; margin:0; } ' ?> --- NEW FILE: mod_search.css.php --- <?php require_once (dirname(__FILE__).'/../../../include/config.inc.php'); Header ('Content-type: text/css'); echo ' #mod_blog_search { font-size: '.CFG_MOD_BLOG_SEARCH_FONT_SIZE.'px; font-family: '.CFG_MOD_BLOG_SEARCH_FONT_FAMILY.'; text-align: center; vertical-align: middle; padding:0; margin:0; } ' ?> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:48:34
|
Update of /cvsroot/comoblog/comoblog/modules/mod_rss/templates/2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14620/mod_rss/templates/2.0 Modified Files: rss.tpl.xml Log Message: RFE: 1280296 - mod_search module Index: rss.tpl.xml =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_rss/templates/2.0/rss.tpl.xml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- rss.tpl.xml 16 Aug 2005 05:49:47 -0000 1.1.1.1 +++ rss.tpl.xml 5 Oct 2005 00:48:15 -0000 1.2 @@ -26,4 +26,4 @@ </item> <!-- END: post --> </channel> -</rss><!-- END: main --> \ No newline at end of file +</rss><!-- END: main --> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:48:34
|
Update of /cvsroot/comoblog/comoblog/modules/mod_search/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14620/mod_search/admin Added Files: mass_search_index.php Log Message: RFE: 1280296 - mod_search module --- NEW FILE: mass_search_index.php --- <?php @ignore_user_abort(true); require_once (dirname(__FILE__).'/../../../include/config.inc.php'); require_once (dirname(__FILE__).'/../include/blog_search.inc.php'); Header ('Content-type: text/plain'); $date = getdate(time()); echo "------------------------------------------------------------\n"; echo " CoMoblog ".CFG_VERSION." mass_index - ".$date['year']."-".$date['mon']."-".$date['mday']." ".$date['hours'].":".$date['minutes'].":".$date['seconds']."\n"; echo "------------------------------------------------------------\n\n"; mass_index(); $date = getdate(time()); echo "\n------------------------------------------------------------\n"; echo " mass_index terminated - ".$date['year']."-".$date['mon']."-".$date['mday']." ".$date['hours'].":".$date['minutes'].":".$date['seconds']."\n"; echo "------------------------------------------------------------\n\n" ?> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:48:33
|
Update of /cvsroot/comoblog/comoblog/modules/mod_search/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14620/mod_search/install Added Files: mod_search.xml Log Message: RFE: 1280296 - mod_search module --- NEW FILE: mod_search.xml --- <?xml version="1.0" standalone="no"?> <!DOCTYPE module SYSTEM "http://comoblog.sourceforge.net/DTD/comoblog_mod_install.dtd"> <module> <name> mod_search </name> <description> Module to allow blog post searching </description> <allowed_pos> sidebar </allowed_pos> <filter_posts>O</filter_posts> <dbquery> CREATE TABLE comoblog_blog_search_index (index_id int(10) unsigned NOT NULL auto_increment, post_id int(10) unsigned NOT NULL, word varchar(255) NOT NULL, PRIMARY KEY (index_id)) </dbquery> <param name="CFG_MOD_BLOG_SEARCH_EXCLUSIONS" description="Words to exclude from search indexing" type="text" accept_null="N" encrypt="N" restricted_values="" editable="Y" value="what,when,over,this" /> <param name="CFG_MOD_BLOG_SEARCH_FONT_FAMILY" description="" type="font_picker" editable="Y" accept_null="N" value="Verdana,Arial,Helvetica,sans-serif" /> <param name="CFG_MOD_BLOG_SEARCH_FONT_SIZE" description="" type="text" editable="Y" accept_null="N" value="11" /> <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-05 00:48:33
|
Update of /cvsroot/comoblog/comoblog/modules/mod_search/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14620/mod_search/templates Added Files: search_results.tpl.htm Log Message: RFE: 1280296 - mod_search module --- NEW FILE: search_results.tpl.htm --- <!-- BEGIN: main -->{FILE "../../templates/header.tpl.htm"} <div id="header"> <h1><!-- BEGIN: logo --><a href="{SITE_URL}index.php" title="{TITLE}"><img src="{SITE_URL}img/comoblog/{LOGO_IMG}" border="0" alt="{TITLE}" /></a><!-- END: logo --><!-- BEGIN: title --><a href="{SITE_URL}index.php"> {TITLE} </a><!-- END: title --></h1> </div> <!-- BEGIN: top_bar --> <div id="topbar"> <!-- BEGIN: top_module --><div class="topbar_module">{TOP_MODULE}</div><!-- END: top_module --> </div> <!-- END: top_bar --> <div id="contents"> <div id="sidebar"> <!-- BEGIN: sidebar_image --> <img src="{SITE_URL}img/comoblog/{SIDEBAR_IMG}" border="0" alt="" /> <!-- END: sidebar_image --> <!-- BEGIN: sidebar_module --> <div class="sidebar_module">{SIDEBAR_MODULE}</div> <!-- END: sidebar_module --> </div> <!-- BEGIN: intro --> <div id="intro"><p>{INTRO_TEXT}</p></div> <!-- END: intro --> <div id="page_title"> <h2>{PAGE_TITLE}</h2><h4><a href="{SITE_URL}">return to blog</a></h4> <!-- BEGIN: noposts --> <p>No posts found</p> <!-- END: noposts --> </div> <div id="posts"> <!-- BEGIN: post --> <div class="post"> <!-- BEGIN: auto_discovery_trackback --> <!-- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"> <rdf:Description rdf:about="{POST.post_permalink}" dc:identifer="{POST.post_permalink}" dc:title="{POST.post_mail_subject}" trackback:ping="{POST.post_trackback_ping_url}" /> </rdf:RDF> --> <!-- END: auto_discovery_trackback --> <p class="post_header"><!-- BEGIN: topic --><a title="[{POST.topic_name}]" href="{SITE_URL}topic.php/{POST.topic_id}"><img src="{SITE_URL}img/topics/{POST.topic_img}" border="0" alt="[{POST.topic_name}]" /></a><!-- END: topic -->{TXT.post_received} {POST.post_mail_date} <!-- BEGIN: author -->{TXT.post_from} {POST.post_mail_from} <!-- END: author --></p> <h3>{POST.post_mail_subject}</h3> <p class="post_body">{POST.post_mail_body}</p> <!-- BEGIN: thumb_img --> <a href="{SITE_URL}img.php?i={IMAGE.img_name}" onclick="open_popup(this.href,{IMAGE.img_width},{IMAGE.img_height});return false;" title="{TXT.enlarge}"><img class="post_img" src="{SITE_URL}img/posts/{IMAGE.img_thumb_name}" border="0" alt="" /></a> <!-- END: thumb_img --> <!-- BEGIN: img --> <img class="post_img" src="{SITE_URL}img/posts/{IMAGE.img_name}" border="0" alt="" /> <!-- END: img --> <!-- BEGIN: comments --> <h4>{TXT.comments_for_post}</h4> <!-- BEGIN: comment --> <div class="comment"> <p class="comment_header">{COMMENT.comment_author} <!-- BEGIN: email -->{COMMENT.comment_author_email}<!-- END: email --><br /> {COMMENT.comment_date.year}/{COMMENT.comment_date.mon}/{COMMENT.comment_date.mday} {COMMENT.comment_date.hours}:{COMMENT.comment_date.minutes}</p> <p>{COMMENT.comment_text}</p> </div> <!-- END: comment --> <!-- END: comments --> <div class="post_footer"> <!-- BEGIN: comment_button --> <img src="{SITE_URL}img/comoblog/{COMMENTS_IMG}" border="0" alt="{TXT.comments}" /> {TXT.comments}: {POST.post_comments} | <a href="{SITE_URL}list_comments.php?i={POST.post_id}" onclick="open_popup(this.href,430,430); return false;">{TXT.view}</a> | <a href="{SITE_URL}add_comment.php?i={POST.post_id}" onclick="open_popup(this.href,430,430); return false;">{TXT.add}</a> <!-- END: comment_button --> <img src="{SITE_URL}img/comoblog/{PERMALINK_IMG}" border="0" alt="{TXT.permalink}" /> <a href="{POST.post_permalink}">{TXT.permalink}</a> <!-- BEGIN: trackback_button --> <img src="{SITE_URL}img/comoblog/{TRACKBACK_IMG}" border="0" alt="{TXT.trackback}" /> <a href="{POST.post_trackback_list}" onclick="void open_popup(this.href,430,430); return false;">{TXT.trackback}</a> <!-- END: trackback_button --> </div> </div> <!-- END: post --> <!-- BEGIN: posts_list --> <div class="post"> <!-- BEGIN: post --> <p class="post_header"><!-- BEGIN: topic --><img src="{SITE_URL}img/topics/{POST.topic_img}" border="0" alt="[{POST.topic_name}]" /><!-- END: topic -->{TXT.post_received} {POST.post_mail_date} <!-- BEGIN: author -->{TXT.post_from} {POST.post_mail_from} <!-- END: author --></p> <h3><a href="{POST.post_permalink}">{POST.post_mail_subject}</a></h3> <!-- END: post --> </div> <!-- END: posts_list --> </div> </div> <div id="footer"> <!-- BEGIN: comoblogo --> <div id="comoblogo"><a href="http://comoblog.sourceforge.net/" title="powered by CoMoblog {VERSION}"><img src="{SITE_URL}../../img/comoblogo.gif" border="0" alt="powered by CoMoblog {VERSION}" title="powered by CoMoblog {VERSION}" /></a></div> <!-- END: comoblogo --> <p>{FOOTER_TEXT}</p> </div> {FILE "../../templates/footer.tpl.htm"} <!-- END: main --> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-05 00:46:25
|
Update of /cvsroot/comoblog/comoblog/modules/mod_search/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14311/install Log Message: Directory /cvsroot/comoblog/comoblog/modules/mod_search/install added to the repository |