comoblog-commit Mailing List for CoMoblog Mobile Blog Application (Page 19)
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-11-28 11:33:23
|
Update of /cvsroot/comoblog/modules/mod_html2text/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23710/mod_html2text/img Added Files: mod_set_ctype.gif mod_set_ctype_big.gif 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_set_ctype.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mod_set_ctype_big.gif --- (This appears to be a binary file; contents omitted.) |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:33:23
|
Update of /cvsroot/comoblog/modules/mod_html2text/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23710/mod_html2text/include Added Files: mod_html2text.inc.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.inc.php --- <?php /************************************************************************* * * * class.html2text.inc * * * ************************************************************************* * * * Converts HTML to formatted plain text * * * * Copyright (c) 2005 Jon Abernathy <jo...@ch...> * * All rights reserved. * * * * This script is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * The GNU General Public License can be found at * * http://www.gnu.org/copyleft/gpl.html. * * * * This script is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * Author(s): Jon Abernathy <jo...@ch...> * * * * Last modified: 04/06/05 * * * *************************************************************************/ /** * Takes HTML and converts it to formatted, plain text. * * Thanks to Alexander Krug (http://www.krugar.de/) to pointing out and * correcting an error in the regexp search array. Fixed 7/30/03. * * Updated set_html() function's file reading mechanism, 9/25/03. * * Thanks to Joss Sanglier (http://www.dancingbear.co.uk/) for adding * several more HTML entity codes to the $search and $replace arrays. * Updated 11/7/03. * * Thanks to Darius Kasperavicius (http://www.dar.dar.lt/) for * suggesting the addition of $allowed_tags and its supporting function * (which I slightly modified). Updated 3/12/04. * * Thanks to Justin Dearing for pointing out that a replacement for the * <TH> tag was missing, and suggesting an appropriate fix. * Updated 8/25/04. * * Thanks to Mathieu Collas (http://www.myefarm.com/) for finding a * display/formatting bug in the _build_link_list() function: email * readers would show the left bracket and number ("[1") as part of the * rendered email address. * Updated 12/16/04. * * Thanks to Wojciech Bajon (http://histeria.pl/) for submitting code * to handle relative links, which I hadn't considered. I modified his * code a bit to handle normal HTTP links and MAILTO links. Also for * suggesting three additional HTML entity codes to search for. * Updated 03/02/05. * * Thanks to Jacob Chandler for pointing out another link condition * for the _build_link_list() function: "https". * Updated 04/06/05. * * @author Jon Abernathy <jo...@ch...> * @version 0.6.1 * @since PHP 4.0.2 */ class html2text { /** * Contains the HTML content to convert. * * @var string $html * @access public */ var $html; /** * Contains the converted, formatted text. * * @var string $text * @access public */ var $text; /** * Maximum width of the formatted text, in columns. * * @var integer $width * @access public */ var $width = 70; /** * List of preg* regular expression patterns to search for, * used in conjunction with $replace. * * @var array $search * @access public * @see $replace */ var $search = array( "/\r/", // Non-legal carriage return "/[\n\t]+/", // Newlines and tabs '/<script[^>]*>.*?<\/script>/i', // <script>s -- which strip_tags supposedly has problems with //'/<!-- .* -->/', // Comments -- which strip_tags might have problem a with '/<h[123][^>]*>(.+?)<\/h[123]>/ie', // H1 - H3 '/<h[456][^>]*>(.+?)<\/h[456]>/ie', // H4 - H6 '/<p[^>]*>/i', // <P> '/<br[^>]*>/i', // <br> '/<b[^>]*>(.+?)<\/b>/ie', // <b> '/<i[^>]*>(.+?)<\/i>/i', // <i> '/(<ul[^>]*>|<\/ul>)/i', // <ul> and </ul> '/(<ol[^>]*>|<\/ol>)/i', // <ol> and </ol> '/<li[^>]*>/i', // <li> '/<a href="([^"]+)"[^>]*>(.+?)<\/a>/ie', // <a href=""> '/<hr[^>]*>/i', // <hr> '/(<table[^>]*>|<\/table>)/i', // <table> and </table> '/(<tr[^>]*>|<\/tr>)/i', // <tr> and </tr> '/<td[^>]*>(.+?)<\/td>/i', // <td> and </td> '/<th[^>]*>(.+?)<\/th>/i', // <th> and </th> '/ /i', '/"/i', '/>/i', '/</i', '/&/i', '/©/i', '/™/i', '/“/', '/”/', '/–/', '/’/', '/&/', '/©/', '/™/', '/—/', '/“/', '/”/', '/•/', '/®/i', '/•/i', '/&[&;]+;/i' ); /** * List of pattern replacements corresponding to patterns searched. * * @var array $replace * @access public * @see $search */ var $replace = array( '', // Non-legal carriage return ' ', // Newlines and tabs '', // <script>s -- which strip_tags supposedly has problems with //'', // Comments -- which strip_tags might have problem a with "strtoupper(\"\n\n\\1\n\n\")", // H1 - H3 "ucwords(\"\n\n\\1\n\n\")", // H4 - H6 "\n\n\t", // <P> "\n", // <br> 'strtoupper("\\1")', // <b> '_\\1_', // <i> "\n\n", // <ul> and </ul> "\n\n", // <ol> and </ol> "\t*", // <li> '$this->_build_link_list($link_count++, "\\1", "\\2")', // <a href=""> "\n-------------------------\n", // <hr> "\n\n", // <table> and </table> "\n", // <tr> and </tr> "\t\t\\1\n", // <td> and </td> "strtoupper(\"\t\t\\1\n\")", // <th> and </th> ' ', '"', '>', '<', '&', '(c)', '(tm)', '"', '"', '-', "'", '&', '(c)', '(tm)', '--', '"', '"', '*', '(R)', '*', '' ); /** * Contains a list of HTML tags to allow in the resulting text. * * @var string $allowed_tags * @access public * @see set_allowed_tags() */ var $allowed_tags = ''; /** * Contains the base URL that relative links should resolve to. * * @var string $url * @access public */ var $url; /** * Indicates whether content in the $html variable has been converted yet. * * @var boolean $converted * @access private * @see $html, $text */ var $_converted = false; /** * Contains URL addresses from links to be rendered in plain text. * * @var string $link_list * @access private * @see _build_link_list() */ var $_link_list; /** * Constructor. * * If the HTML source string (or file) is supplied, the class * will instantiate with that source propagated, all that has * to be done it to call get_text(). * * @param string $source HTML content * @param boolean $from_file Indicates $source is a file to pull content from * @access public * @return void */ function html2text( $source = '', $from_file = false ) { if ( !empty($source) ) { $this->set_html($source, $from_file); } $this->set_base_url(); } /** * Loads source HTML into memory, either from $source string or a file. * * @param string $source HTML content * @param boolean $from_file Indicates $source is a file to pull content from * @access public * @return void */ function set_html( $source, $from_file = false ) { $this->html = $source; if ( $from_file && file_exists($source) ) { $fp = fopen($source, 'r'); $this->html = fread($fp, filesize($source)); fclose($fp); } $this->_converted = false; } /** * Returns the text, converted from HTML. * * @access public * @return string */ function get_text() { if ( !$this->_converted ) { $this->_convert(); } return $this->text; } /** * Prints the text, converted from HTML. * * @access public * @return void */ function print_text() { print $this->get_text(); } /** * Alias to print_text(), operates identically. * * @access public * @return void * @see print_text() */ function p() { print $this->get_text(); } /** * Sets the allowed HTML tags to pass through to the resulting text. * * Tags should be in the form "<p>", with no corresponding closing tag. * * @access public * @return void */ function set_allowed_tags( $allowed_tags = '' ) { if ( !empty($allowed_tags) ) { $this->allowed_tags = $allowed_tags; } } /** * Sets a base URL to handle relative links. * * @access public * @return void */ function set_base_url( $url = '' ) { if ( empty($url) ) { $this->url = 'http://' . $_SERVER['HTTP_HOST']; } else { // Strip any trailing slashes for consistency (relative // URLs may already start with a slash like "/file.html") if ( substr($url, -1) == '/' ) { $url = substr($url, 0, -1); } $this->url = $url; } } /** * Workhorse function that does actual conversion. * * First performs custom tag replacement specified by $search and * $replace arrays. Then strips any remaining HTML tags, reduces whitespace * and newlines to a readable format, and word wraps the text to * $width characters. * * @access private * @return void */ function _convert() { // Variables used for building the link list $link_count = 1; $this->_link_list = ''; $text = trim(stripslashes($this->html)); // Run our defined search-and-replace $text = preg_replace($this->search, $this->replace, $text); // Strip any other HTML tags $text = strip_tags($text, $this->allowed_tags); // Bring down number of empty lines to 2 max $text = preg_replace("/\n\s+\n/", "\n", $text); $text = preg_replace("/[\n]{3,}/", "\n\n", $text); // Add link list if ( !empty($this->_link_list) ) { $text .= "\n\nLinks:\n------\n" . $this->_link_list; } // Wrap the text to a readable format // for PHP versions >= 4.0.2. Default width is 75 $text = wordwrap($text, $this->width); $this->text = $text; $this->_converted = true; } /** * Helper function called by preg_replace() on link replacement. * * Maintains an internal list of links to be displayed at the end of the * text, with numeric indices to the original point in the text they * appeared. Also makes an effort at identifying and handling absolute * and relative links. * * @param integer $link_count Counter tracking current link number * @param string $link URL of the link * @param string $display Part of the text to associate number with * @access private * @return string */ function _build_link_list($link_count, $link, $display) { if ( substr($link, 0, 7) == 'http://' || substr($link, 0, 8) == 'https://' || substr($link, 0, 7) == 'mailto:' ) { $this->_link_list .= "[$link_count] $link\n"; } else { $this->_link_list .= "[$link_count] " . $this->url; if ( substr($link, 0, 1) != '/' ) { $this->_link_list .= '/'; } $this->_link_list .= "$link\n"; } return $display . ' [' . $link_count . ']'; } } ?> |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:33:22
|
Update of /cvsroot/comoblog/modules/mod_html2text/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23710/mod_html2text/install Added Files: mod_html2text.xml 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.xml --- <?xml version="1.0" standalone="no"?> <!DOCTYPE module SYSTEM "http://comoblog.sourceforge.net/DTD/comoblog_mod_install.dtd"> <module> <name>mod_html2text</name> <description>converts the incoming post 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 us by the phone networks,if you want to remove any text from this - 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</description> <allowed_pos>not_visible</allowed_pos> <filter_posts>Y</filter_posts> <filter_comments>N</filter_comments> <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-06-13</date> <param name="CFG_HTML2TEXT_ALLOWED_TAGS" description="tags thats are allowed to remain " type="text" editable="Y" accept_null="N" value="img" /> </module> |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:30:11
|
Update of /cvsroot/comoblog/modules/mod_html2text/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22963/include Log Message: Directory /cvsroot/comoblog/modules/mod_html2text/include added to the repository |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:30:11
|
Update of /cvsroot/comoblog/modules/mod_html2text/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22963/install Log Message: Directory /cvsroot/comoblog/modules/mod_html2text/install added to the repository |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:30:11
|
Update of /cvsroot/comoblog/modules/mod_html2text/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22963/img Log Message: Directory /cvsroot/comoblog/modules/mod_html2text/img added to the repository |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:29:21
|
Update of /cvsroot/comoblog/modules/mod_html2text In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22812/mod_html2text Log Message: Directory /cvsroot/comoblog/modules/mod_html2text added to the repository |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:24:23
|
Update of /cvsroot/comoblog/modules/mod_remove_footer/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21899/mod_remove_footer/include Added Files: mod_remove_footer.inc.php Log Message: initial add mod_remove_footer, Remove sponsor footer from mail body: you can simply use a terminator string (i.e. ###END###) at the end of your posts: all text after the terminator will be stripped from mail body. this was an original easy moblog module --- NEW FILE: mod_remove_footer.inc.php --- <?php function mod_remove_footer ($body) { if (CFG_REMOVE_FOOTER_TERMINATOR == '') return ($body); $body = explode(CFG_REMOVE_FOOTER_TERMINATOR, $body); $body = trim($body[0]); return ($body); } ?> |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:24:23
|
Update of /cvsroot/comoblog/modules/mod_remove_footer/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21899/mod_remove_footer/img Added Files: mod_remove_footer.gif mod_remove_footer_big.gif Log Message: initial add mod_remove_footer, Remove sponsor footer from mail body: you can simply use a terminator string (i.e. ###END###) at the end of your posts: all text after the terminator will be stripped from mail body. this was an original easy moblog module --- NEW FILE: mod_remove_footer.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mod_remove_footer_big.gif --- (This appears to be a binary file; contents omitted.) |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:24:23
|
Update of /cvsroot/comoblog/modules/mod_remove_footer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21899/mod_remove_footer Added Files: mod_remove_footer_post_filter.php Log Message: initial add mod_remove_footer, Remove sponsor footer from mail body: you can simply use a terminator string (i.e. ###END###) at the end of your posts: all text after the terminator will be stripped from mail body. this was an original easy moblog module --- NEW FILE: mod_remove_footer_post_filter.php --- <?php require_once(dirname(__FILE__).'/include/mod_remove_footer.inc.php'); $post['post_mail_body'] = mod_remove_footer($post['post_mail_body']); ?> |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:24:22
|
Update of /cvsroot/comoblog/modules/mod_remove_footer/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21899/mod_remove_footer/install Added Files: mod_remove_footer.xml Log Message: initial add mod_remove_footer, Remove sponsor footer from mail body: you can simply use a terminator string (i.e. ###END###) at the end of your posts: all text after the terminator will be stripped from mail body. this was an original easy moblog module --- NEW FILE: mod_remove_footer.xml --- <?xml version="1.0" standalone="no"?> <!DOCTYPE module SYSTEM "http://comoblog.sourceforge.net/DTD/comoblog_mod_install.dtd"> <module> <name>mod_remove_footer</name> <description>Remove sponsor footer from mail body: you can simply use a terminator string (i.e. ###END###) at the end of your posts: all text after the terminator will be stripped from mail body.</description> <allowed_pos>not_visible</allowed_pos> <filter_posts>Y</filter_posts> <filter_comments>N</filter_comments> <version>1.0</version> <minimum_supported>1.0</minimum_supported> <certified>1.0</certified> <author>Umberto Caldera - ubik[at]ubiks[dot]it (thanks to James Orlowski -james[at]orlowski[dot]com - for suggestions!)</author> <date>2004-04-29</date> <param name="CFG_REMOVE_FOOTER_TERMINATOR" description="All text following this string will be deleted from message body" type="text" editable="Y" accept_null="N" value="##END##" /> </module> |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:22:39
|
Update of /cvsroot/comoblog/modules/mod_remove_footer/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21656/img Log Message: Directory /cvsroot/comoblog/modules/mod_remove_footer/img added to the repository |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:22:39
|
Update of /cvsroot/comoblog/modules/mod_remove_footer/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21656/install Log Message: Directory /cvsroot/comoblog/modules/mod_remove_footer/install added to the repository |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:22:39
|
Update of /cvsroot/comoblog/modules/mod_remove_footer/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21656/include Log Message: Directory /cvsroot/comoblog/modules/mod_remove_footer/include added to the repository |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:22:27
|
Update of /cvsroot/comoblog/modules/mod_remove_footer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21616/mod_remove_footer Log Message: Directory /cvsroot/comoblog/modules/mod_remove_footer added to the repository |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:13:26
|
Update of /cvsroot/comoblog/modules/mod_postbytopic/templates/top In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19872/mod_postbytopic/templates/top Added Files: mod_postbytopic.tpl.htm Log Message: initial add, mod_postbytopic, builds a select box or list of posts by topic with a count, clicking on a link, takes you to the posts MARK - may need the iis stuff adding --- NEW FILE: mod_postbytopic.tpl.htm --- <!-- BEGIN: main --> <select name="mod_postbytopic" id="mod_postbytopic" class="topbar_selector" onchange="if(this.value!='nolink') location=this.value;"> <option value="nolink">{CFG_POSTBYTOPIC_TOPLINE}</option> <!-- BEGIN: item --> <option value="topic.php?/{ITEM.topic_id}">{ITEM.topic_name} ({ITEM.post_count} posts)</option> <!-- END: item --> </select> <!-- END: main --> |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:13:26
|
Update of /cvsroot/comoblog/modules/mod_postbytopic/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19872/mod_postbytopic/img Added Files: mod_postbytitle_big.gif mod_postbytopic.gif mod_postbytopic_big.gif Log Message: initial add, mod_postbytopic, builds a select box or list of posts by topic with a count, clicking on a link, takes you to the posts MARK - may need the iis stuff adding --- NEW FILE: mod_postbytopic.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mod_postbytitle_big.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: mod_postbytopic_big.gif --- (This appears to be a binary file; contents omitted.) |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:13:26
|
Update of /cvsroot/comoblog/modules/mod_postbytopic/templates/sidebar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19872/mod_postbytopic/templates/sidebar Added Files: mod_postbytopic.tpl.htm Log Message: initial add, mod_postbytopic, builds a select box or list of posts by topic with a count, clicking on a link, takes you to the posts MARK - may need the iis stuff adding --- NEW FILE: mod_postbytopic.tpl.htm --- <!-- BEGIN: main --> <div id="mod_postbytopic"> <ul>{CFG_POSTBYTOPIC_TOPLINE} <!-- BEGIN: item --> <li> <a href="topic.php?/{ITEM.topic_id}">{ITEM.topic_name}</a><br><sub>( {ITEM.topic_description} {ITEM.post_count} posts)</sub> </li> <!-- END: item --> </ul> </div> <!-- END: main --> |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:13:26
|
Update of /cvsroot/comoblog/modules/mod_postbytopic/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19872/mod_postbytopic/install Added Files: mod_postbytopic.xml Log Message: initial add, mod_postbytopic, builds a select box or list of posts by topic with a count, clicking on a link, takes you to the posts MARK - may need the iis stuff adding --- NEW FILE: mod_postbytopic.xml --- <?xml version="1.0" standalone="no"?> <!DOCTYPE module SYSTEM "http://comoblog.sourceforge.net/DTD/comoblog_mod_install.dtd"> <module> <name> mod_postbytopic </name> <description> builds a select box (top) or list (sidebar) of posts by topic,both include a counts of posts, the side bar also includes the topic description - see mod_postbytopic.txt for a slight problem with unassigned posts </description> <allowed_pos>sidebar</allowed_pos> <allowed_pos>top</allowed_pos> <version>1.0</version> <minimum_supported>1.0</minimum_supported> <certified>1.0</certified> <author>iamdecal iam...@gm... http://www.iamdecal.co.uk</author> <date>2004-10-15</date> <param name="CFG_POSTBYTOPIC_TOPLINE" description="The Top line of text in the drop down or header of the list item" type="text" accept_null="N" encrypt="N" restricted_values="" editable="Y" value="Posts By Topic" /> </module> |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:13:26
|
Update of /cvsroot/comoblog/modules/mod_postbytopic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19872/mod_postbytopic Added Files: index.php mod_postbytopic.php mod_postbytopic.txt Log Message: initial add, mod_postbytopic, builds a select box or list of posts by topic with a count, clicking on a link, takes you to the posts MARK - may need the iis stuff adding --- NEW FILE: mod_postbytopic.php --- <?php if (in_array('mod_postbytopic', $SIDEBAR_MODULES)) $mod_pos = 'sidebar'; else $mod_pos = 'top'; require_once (CFG_BASE_PATH.'/modules/mod_postbytopic/include/mod_postbytopic.inc.php'); $postbytopic_items = mod_postbytopic_list(); if ($postbytopic_items) { $mod_postbytopic_tpl = new XTemplate (CFG_BASE_PATH.'/modules/mod_postbytopic/templates/'.$mod_pos.'/mod_postbytopic.tpl.htm'); if (CFG_POSTBYTOPIC_TOPLINE){ $mod_postbytopic_tpl->assign('CFG_POSTBYTOPIC_TOPLINE', CFG_POSTBYTOPIC_TOPLINE ); } for ($c = 0; $c < count($postbytopic_items); $c++) { if ($c % 2){ $tpl->assign('BGCOLOR', '#ffffff'); }else{ $tpl->assign('BGCOLOR', '#efefef'); } $mod_postbytopic_tpl->assign('ITEM', $postbytopic_items[$c]); $mod_postbytopic_tpl->parse('main.item'); } $mod_postbytopic_tpl->parse('main'); $mod_contents = $mod_postbytopic_tpl->text("main"); } else{ $mod_contents = ''; } ?> --- NEW FILE: mod_postbytopic.txt --- Version RC1 (for easymoblog 0.51) This is a working module, but is released as a Request For Comments, There needs to be a way to allow the module to return a null or 0 id to topic.php so we can see the posts that are not assigned to any topic. While its easy enough to make this change in topic.php, that would leave your code out of sync, so its not something we should address ourselves, I'd rather see Ubik and the team make an *official* change and release let me know if you think of any improvements to this module (and if you have ideas for new ones) iam...@ia... cgi.iamdecal.plus.net --- NEW FILE: index.php --- |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:13:23
|
Update of /cvsroot/comoblog/modules/mod_postbytopic/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19872/mod_postbytopic/include Added Files: mod_postbytopic.inc.php Log Message: initial add, mod_postbytopic, builds a select box or list of posts by topic with a count, clicking on a link, takes you to the posts MARK - may need the iis stuff adding --- NEW FILE: mod_postbytopic.inc.php --- <?php function mod_postbytopic_list () { // this bit needs fixing - we shouldnt have to exclude the posts that have no topic, // but we cant return a NULL or 0 topic id so I've excluded it for now // see the replacements section below to see what i *wanted* to do // we need to be able to use 0 in topic.php to gt a list of posts that arn't assigned to any category $query = "select count(*) as post_count , t.topic_name, t.topic_id ,t.topic_description from ".CFG_MYSQL_TABPREFIX."posts p left join ".CFG_MYSQL_TABPREFIX."topics t on p.topic_id = t.topic_id where p.topic_id >0 group by 2 order by 2;"; $res = mysql_query($query); if (!$res || !mysql_num_rows($res)) return (false); $items = array(); while ($row = mysql_fetch_assoc($res)) { if ($row['topic_name'] == "" ){$row['topic_name'] = "unassigned" ; } if ($row['topic_name'] == "NULL" ){$row['topic_name'] = "unassigned" ; } if ($row['topic_description'] == "" ){$row['topic_description'] = "unassigned" ; } if ($row['topic_description'] == "NULL" ){$row['topic_description'] = "unassigned" ; } // need to find a better way to do this one - we get a 404 even if we use 0 // so I've excluded it from the select above // we need to be able to use 0 in topic.php to gt a list of posts that arnt assigned to any category // if ($row['topic_id'] == "" ){$row['topic_id'] = "1" ; } // if ($row['topic_id'] == "NULL" ){$row['topic_id'] = "1" ; } $items[] = $row; } return ($items); } ?> |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:10:44
|
Update of /cvsroot/comoblog/modules/mod_postbytopic/templates/top In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19401/top Log Message: Directory /cvsroot/comoblog/modules/mod_postbytopic/templates/top added to the repository |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:10:44
|
Update of /cvsroot/comoblog/modules/mod_postbytopic/templates/sidebar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19401/sidebar Log Message: Directory /cvsroot/comoblog/modules/mod_postbytopic/templates/sidebar added to the repository |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:10:13
|
Update of /cvsroot/comoblog/modules/mod_postbytopic/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19169/install Log Message: Directory /cvsroot/comoblog/modules/mod_postbytopic/install added to the repository |
|
From: iamdecal <iam...@us...> - 2005-11-28 11:10:13
|
Update of /cvsroot/comoblog/modules/mod_postbytopic/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19169/templates Log Message: Directory /cvsroot/comoblog/modules/mod_postbytopic/templates added to the repository |