comoblog-commit Mailing List for CoMoblog Mobile Blog Application (Page 13)
Status: Inactive
Brought to you by:
markwallis
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(49) |
Oct
(127) |
Nov
(211) |
Dec
(56) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(51) |
Feb
(128) |
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
(2) |
Aug
(24) |
Sep
|
Oct
(151) |
Nov
(9) |
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
(17) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: iamdecal <iam...@us...> - 2006-02-16 23:12:27
|
Update of /cvsroot/comoblog/modules/mod_latest_comments In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25698/mod_latest_comments Log Message: Directory /cvsroot/comoblog/modules/mod_latest_comments added to the repository |
|
From: iamdecal <iam...@us...> - 2006-02-16 23:09:40
|
Update of /cvsroot/comoblog/modules/mod_rss2/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23969/mod_rss2/install Modified Files: mod_rss2.xml Log Message: RSS FEEDS FOR POSTS AND COMMENTS changed the templates so that they validate, removed the latest comments from the side bar and put them into there own module (mod_latest_comments) Index: mod_rss2.xml =================================================================== RCS file: /cvsroot/comoblog/modules/mod_rss2/install/mod_rss2.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mod_rss2.xml 11 Dec 2005 23:20:47 -0000 1.2 +++ mod_rss2.xml 16 Feb 2006 23:09:35 -0000 1.3 @@ -9,56 +9,8 @@ <minimum_supported>1.0</minimum_supported> <certified>1.0</certified> <author>iamdecal iam...@gm... http://www.iamdecal.co.uk</author> - <param - name="CFG_RSS2_1_IMG" - description="Image for RSS 1.0 feed button" - type="image" - editable="Y" - accept_null="Y" - /> - - <param - name="CFG_RSS2_2_IMG" - description="Image for RSS 2.0 feed button" - type="image" - editable="Y" - accept_null="Y" - /> - - <param - name="CFG_RSS2_1" - description="Provide RSS 1.0 feed" - type="select" - restrict_values="yes|no" - value="yes" - accept_null="N" - editable="Y" - /> - - <param - name="CFG_RSS2_2" - description="Provide RSS 2.0 feed" - type="select" - restrict_values="yes|no" - value="yes" - accept_null="N" - editable="Y" - /> - - <param - name="CFG_RSS2_COPYRIGHT" - description="Copyright note for RSS feed" - type="text" - value="" - accept_null="Y" - editable="Y" - /> - - - - - - <param + + <param name="CFG_MOD_RSS2_FONT_FAMILY" description="" type="font_picker" @@ -75,12 +27,7 @@ accept_null="N" value="11" /> - - - - - - <param + <param name="CFG_MOD_RSS2_COLOR" value="990033" description="Text colour for the RSS header text" |
|
From: iamdecal <iam...@us...> - 2006-02-16 23:09:40
|
Update of /cvsroot/comoblog/modules/mod_rss2/templates/2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23969/mod_rss2/templates/2.0 Modified Files: rss2.tpl.xml Log Message: RSS FEEDS FOR POSTS AND COMMENTS changed the templates so that they validate, removed the latest comments from the side bar and put them into there own module (mod_latest_comments) Index: rss2.tpl.xml =================================================================== RCS file: /cvsroot/comoblog/modules/mod_rss2/templates/2.0/rss2.tpl.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- rss2.tpl.xml 28 Nov 2005 11:05:36 -0000 1.1 +++ rss2.tpl.xml 16 Feb 2006 23:09:35 -0000 1.2 @@ -5,7 +5,7 @@ <title>{BLOG.title}</title> <link>{BLOG.link}</link> <description>{BLOG.description}</description> - <language>{BLOG.language}</language> + <language>en-gb</language> <generator>{BLOG.generator}</generator> <copyright>{BLOG.copyright}</copyright> <docs>http://backend.userland.com/rss</docs> @@ -19,22 +19,24 @@ <title>{POST.post_mail_subject}</title> <link>{POST.post_permalink}</link> <comments>{POST.post_permalink}</comments> - <description> + <description><![CDATA[ <!-- 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}"> + <a href="{SITE_URL}img.php?i={IMAGE.img_name}" title="{TXT.enlarge}"> <img class="post_img_thumb" src="{SITE_URL}img/posts/{IMAGE.img_thumb_name}" border="0" alt="" align="left"/> </a> <!-- END: thumb_img --> <!-- BEGIN: 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}"> + <a href="{SITE_URL}img.php?i={IMAGE.img_name}"title="{TXT.enlarge}"> <img class="post_img_thumb" src="{SITE_URL}img/posts/{IMAGE.img_name}" border="0" alt="" align="left" /> </a> <!-- END: img --> - {POST.post_mail_body}</description> - <author>{POST.post_mail_from}</author> - <pubDate>{POST.post_mail_date}</pubDate> + {POST.post_mail_body} + ]]> + </description> + <author>{POST.post_mail_from} <comment-forwarder-{POST.post_mail_from}@iamdecal.co.uk></author> + <pubDate>{POST.post_mail_date_rss}</pubDate> <category>{POST.post_category}</category> </item> <!-- END: post --> |
|
From: iamdecal <iam...@us...> - 2006-02-16 23:09:40
|
Update of /cvsroot/comoblog/modules/mod_rss2/templates/c2.0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23969/mod_rss2/templates/c2.0 Modified Files: rss2.tpl.xml Log Message: RSS FEEDS FOR POSTS AND COMMENTS changed the templates so that they validate, removed the latest comments from the side bar and put them into there own module (mod_latest_comments) Index: rss2.tpl.xml =================================================================== RCS file: /cvsroot/comoblog/modules/mod_rss2/templates/c2.0/rss2.tpl.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- rss2.tpl.xml 28 Nov 2005 11:05:36 -0000 1.1 +++ rss2.tpl.xml 16 Feb 2006 23:09:35 -0000 1.2 @@ -5,7 +5,7 @@ <title>{BLOG.title}</title> <link>{BLOG.link}</link> <description>{BLOG.description}</description> - <language>{BLOG.language}</language> + <language>en-gb</language> <generator>{BLOG.generator}</generator> <copyright>{BLOG.copyright}</copyright> <docs>http://backend.userland.com/rss</docs> @@ -19,9 +19,11 @@ <title>{POST.post_mail_date} - {POST.post_mail_subject} - {POST.post_mail_from}</title> <link>{POST.post_permalink}</link> <comments>{POST.post_permalink}</comments> - <description>{POST.post_mail_body}</description> - <author>{POST.post_mail_from}</author> - <pubDate>{POST.post_mail_date}</pubDate> + <description> + <![CDATA[{POST.post_mail_body}]]> + </description> + <author>{POST.post_mail_from} <comment-forwarder-{POST.post_mail_from}@iamdecal.co.uk></author> + <pubDate>{POST.post_mail_date_rss}</pubDate> <category>{POST.post_category}</category> </item> <!-- END: post --> |
|
From: iamdecal <iam...@us...> - 2006-02-16 23:09:39
|
Update of /cvsroot/comoblog/modules/mod_rss2/css In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23969/mod_rss2/css Modified Files: mod_rss2.css.php Log Message: RSS FEEDS FOR POSTS AND COMMENTS changed the templates so that they validate, removed the latest comments from the side bar and put them into there own module (mod_latest_comments) Index: mod_rss2.css.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_rss2/css/mod_rss2.css.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mod_rss2.css.php 11 Dec 2005 23:20:47 -0000 1.2 +++ mod_rss2.css.php 16 Feb 2006 23:09:35 -0000 1.3 @@ -14,17 +14,6 @@ font-family: '.CFG_MOD_RSS2_FONT_FAMILY.'; color: #'.CFG_MOD_RSS2_COLOR.'; } - - #mod_rss2 ul { - margin: 0; padding: 0; - } - - #mod_rss2 li { - - list-style-type: none; - padding-bottom : 5px; - } - #mod_rss2 a { color: #'.CFG_MOD_RSS2_A_COLOR.'; text-decoration: '.CFG_MOD_RSS2_A_TEXT_DECORATION.'; |
|
From: iamdecal <iam...@us...> - 2006-02-16 23:09:39
|
Update of /cvsroot/comoblog/modules/mod_rss2/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23969/mod_rss2/include Modified Files: mod_rss2.inc.php Log Message: RSS FEEDS FOR POSTS AND COMMENTS changed the templates so that they validate, removed the latest comments from the side bar and put them into there own module (mod_latest_comments) Index: mod_rss2.inc.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_rss2/include/mod_rss2.inc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_rss2.inc.php 28 Nov 2005 11:05:36 -0000 1.1 +++ mod_rss2.inc.php 16 Feb 2006 23:09:35 -0000 1.2 @@ -14,11 +14,14 @@ $posts = array(); while ($row = mysql_fetch_array($res)) { $row['post_permalink'] = CFG_SITE_URL.'post.php'.$iisbug.'/'.$row['post_id']; - #$row['post_permalink'] = CFG_SITE_URL.'post/'.$row['post_id']; + $row['post_permalink'] = CFG_SITE_URL.'/'.$row['post_id'] ."/". $row['post_mail_subject']; $row['post_trackback_ping_url'] = CFG_SITE_URL.'trackback.php'.$iisbug.'/'.$row['post_id']; $row['post_trackback_list'] = CFG_SITE_URL.'trackback.php'.$iisbug.'/'.$row['post_id'].'?__mode=list'; $row['post_trackback_list_rss'] = CFG_SITE_URL.'trackback.php'.$iisbug.'/'.$row['post_id'].'?__mode=rss'; - $row['post_mail_from'] = "hidden"; + $row['post_mail_from'] = "hidden"; + //echo $row['post_mail_date']; + $row['post_mail_date_rss'] = gmstrftime("%a, %d %b %Y %T %Z",$row['post_mail_date']); + //echo $row['post_mail_date']; $posts[] = $row; } |
|
From: iamdecal <iam...@us...> - 2006-02-16 23:09:39
|
Update of /cvsroot/comoblog/modules/mod_rss2/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23969/mod_rss2/templates Modified Files: rss2.tpl.html Log Message: RSS FEEDS FOR POSTS AND COMMENTS changed the templates so that they validate, removed the latest comments from the side bar and put them into there own module (mod_latest_comments) Index: rss2.tpl.html =================================================================== RCS file: /cvsroot/comoblog/modules/mod_rss2/templates/rss2.tpl.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- rss2.tpl.html 11 Dec 2005 23:20:47 -0000 1.2 +++ rss2.tpl.html 16 Feb 2006 23:09:35 -0000 1.3 @@ -1,31 +1,15 @@ <!-- BEGIN: main --> <div id="mod_rss2"> - <div class="mod_header_text"> - Posts Feed<br/> - <a href="modules/mod_rss2/rss2.php?/1.0" target="_blank" title="rss 1.0 feed"> - <img src="modules/mod_rss2/img/rss_1.0.gif" border="0" alt="rss 1.0 feed"/> - </a> - <a href="modules/mod_rss2/rss2.php?/2.0" target="_blank" title="rss 2.0 feed"> - <img src="modules/mod_rss2/img/rss_2.0.gif" border="0" alt="rss 2.0 feed"/> - </a> - </div> - <div class="mod_header_text"> - Comments Feed - <a href="modules/mod_rss2/rss2.php?/c1.0" target="_blank" title="rss 1.0 feed for comments"> - <img src="modules/mod_rss2/img/rss_1.0.gif" border="0" alt="rss 1.0 feed for comments"/> + +Posts Feed<br/> + <a href="/modules/mod_rss2/rss2.php?/2.0" target="_blank" title="rss 2.0 feed"> + <img src="/modules/mod_rss2/img/rss_2.0.gif" border="0" alt="rss 2.0 feed"/> </a> - <a href="modules/mod_rss2/rss2.php?/c2.0" target="_blank" title="rss 2.0 feed for comments"> - <img src="modules/mod_rss2/img/rss_2.0.gif" border="0" alt="rss 2.0 feed for comments"/> +<br/> + Comments Feed<br/> + <a href="/modules/mod_rss2/rss2.php?/c2.0" target="_blank" title="rss 2.0 feed for comments"> + <img src="/modules/mod_rss2/img/rsscomments.gif" border="0" alt="rss 2.0 feed for comments"/> </a> - </div> - <div class="mod_header_text"> - Latest Comments - </div> - <ul> - <!-- BEGIN: rss --> - <li><a href="{RSS.post_permalink}" title="{RSS.post_mail_date} - {RSS.post_mail_subject} - {RSS.post_mail_from}">on : {RSS.post_mail_subject}</a></li> - <!-- END: rss --> - </ul> </div> <!-- END: main --> \ No newline at end of file |
|
From: iamdecal <iam...@us...> - 2006-02-16 23:09:39
|
Update of /cvsroot/comoblog/modules/mod_rss2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23969/mod_rss2 Modified Files: mod_rss2.php Log Message: RSS FEEDS FOR POSTS AND COMMENTS changed the templates so that they validate, removed the latest comments from the side bar and put them into there own module (mod_latest_comments) Index: mod_rss2.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_rss2/mod_rss2.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_rss2.php 28 Nov 2005 11:05:36 -0000 1.1 +++ mod_rss2.php 16 Feb 2006 23:09:35 -0000 1.2 @@ -1,50 +1,6 @@ <?php - -function comments_last2 ($howmany) { - if (CFG_USE_PATH_INFO == 'no') - $iisbug = '?'; - else - $iisbug = ''; - - $query = "select p.post_mail_subject,p.post_id,c.comment_added as post_mail_date, c.comment_author_email as post_mail_from from easymoblog_posts p , easymoblog_comments c where p.post_id =c.post_id order by comment_id desc limit 0,".$howmany.";"; - $res = mysql_query($query); - if (!$res || !mysql_num_rows($res)) - return (false); - - $rss = array(); - while ($row = mysql_fetch_array($res)) - { - $row['post_permalink'] = CFG_SITE_URL.'post.php'.$iisbug.'/'.$row['post_id']; - #$row['post_permalink'] = CFG_SITE_URL.'post/'.$row['post_id']; - $rss[] = $row; - } - - return ($rss); -} - - -$mod_contents = ''; -$rss = comments_last2(10); -$rss_tpl = new XTemplate (CFG_BASE_PATH.'/modules/mod_rss2/templates/rss2.tpl.html'); - if ($rss) - { - - for ($c = 0; $c < count($rss); $c++) - { - - $rss[$c]['post_mail_subject'] = htmlspecialchars(strip_tags($rss[$c]['post_mail_subject'])); - $rss[$c]['post_mail_from'] = htmlspecialchars(strip_tags($rss[$c]['post_mail_from'])); - $rss_tpl->assign('RSS', $rss[$c]); - $rss_tpl->parse('main.rss'); - } - - $mod_contents .= $rss_tpl->parse('main'); - $mod_contents .= $rss_tpl->text("main"); - - } - -else - { - $mod_contents =""; - } + $mod_contents = ''; + $rss_tpl = new XTemplate (CFG_BASE_PATH.'/modules/mod_rss2/templates/rss2.tpl.html'); + $mod_contents .= $rss_tpl->parse('main'); + $mod_contents .= $rss_tpl->text("main"); ?> |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2006-02-16 22:14:28
|
Update of /cvsroot/comoblog/comoblog/modules/mod_calendar/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27029 Modified Files: mod_calendar.xml Log Message: Official mod_calendar 1.3 release Index: mod_calendar.xml =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_calendar/install/mod_calendar.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- mod_calendar.xml 9 Jan 2006 02:52:56 -0000 1.10 +++ mod_calendar.xml 16 Feb 2006 22:14:07 -0000 1.11 @@ -4,7 +4,7 @@ <name>mod_calendar</name> - <version>1.2</version> + <version>1.3</version> <minimum_supported>1.0</minimum_supported> |
|
From: iamdecal <iam...@us...> - 2006-02-16 14:35:43
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/admin/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24259/admin/img Added Files: mod_fortune_db.gif Log Message: --- NEW FILE: mod_fortune_db.gif --- (This appears to be a binary file; contents omitted.) |
|
From: iamdecal <iam...@us...> - 2006-02-16 14:33:13
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/admin Added Files: mod_fortune_db.php mod_fortune_db_add.php mod_fortune_db_del.php mod_fortune_db_edit.php Log Message: --- NEW FILE: mod_fortune_db.php --- <?php require_once ('../../../admin/include/admin.inc.php'); require_once ('../include/mod_fortune_db.inc.php'); $fortune_db_items = mod_fortune_db_list (); // template file $tpl = new XTemplate ('templates/mod_fortune_db.tpl.htm'); $tpl->assign('MOD_NAME', 'mod_fortune_db'); if ($fortune_db_items) { for ($c = 0; $c < count($fortune_db_items); $c++) { if ($c % 2) $tpl->assign('BGCOLOR', '#ffffff'); else $tpl->assign('BGCOLOR', '#efefef'); $tpl->assign('ITEM', $fortune_db_items[$c]); $tpl->parse('main.items.item'); } $tpl->parse('main.items'); } $tpl->parse('main'); $tpl->out('main'); ?> --- NEW FILE: mod_fortune_db_del.php --- <?php require_once ('../../../admin/include/admin.inc.php'); require_once ('../include/mod_fortune_db.inc.php'); $item_id = ''; if (isset($_GET['i'])) $item_id = $_GET['i']; mod_fortune_db_del ($item_id); Header ('Location: mod_fortune_db.php'); exit(); ?> --- NEW FILE: mod_fortune_db_add.php --- <?php require_once ('../../../admin/include/admin.inc.php'); require_once ('../include/mod_fortune_db.inc.php'); if (strtoupper($_SERVER['REQUEST_METHOD'] == 'POST')) { $errors = array(); foreach($_POST as $k => $v) $_POST[$k] = trim($v); if ($_POST['fortune_db_content'] == '') $errors[] = 'You must provide a title for your entry'; if ($_POST['fortune_db_display_count'] == '') $errors[] = 'You must provide a count for your entry'; if (count($errors)) { foreach ($errors as $k => $v) $err_msg .= '- ' . $v . '<br />'; error_page ('Errors:<br />'.$err_msg, 'javascript:history.go(-1);'); } else { $item = mod_fortune_db_add($_POST); echo '<html><head></head><body><script language="javascript">opener.location.reload();this.close();</script></body></html>'; exit(); } } $tpl = new XTemplate('templates/mod_fortune_db_add.tpl.htm'); $tpl->assign('ACTION', basename($_SERVER['PHP_SELF'])); $tpl->parse('main'); $tpl->out('main'); ?> --- NEW FILE: mod_fortune_db_edit.php --- <?php require_once ('../../../admin/include/admin.inc.php'); require_once ('../include/mod_fortune_db.inc.php'); if (strtoupper($_SERVER['REQUEST_METHOD'] == 'POST')) { $errors = array(); if ($_POST['fortune_db_content'] == '') $errors[] = 'You must provide a title for your entry'; if ($_POST['fortune_db_display_count'] == '') $errors[] = 'You must provide an initial count for your entry'; if (count($errors)) { foreach ($errors as $k => $v) $err_msg .= '- ' . $v . '<br />'; error_page ('Errors:<br />'.$err_msg, 'javascript:history.go(-1);'); } else { $item = mod_fortune_db_edit($_POST); echo '<html><head></head><body><script language="javascript">opener.location.reload();this.close();</script></body></html>'; exit(); } } else { $item_id = ''; if (isset($_GET['i'])) $item_id = $_GET['i']; $item = mod_fortune_db_details($item_id); $tpl = new XTemplate('templates/mod_fortune_db_edit.tpl.htm'); $tpl->assign('ITEM', $item); $tpl->assign('ACTION', basename($_SERVER['PHP_SELF'])); $tpl->parse('main'); $tpl->out('main'); } ?> |
|
From: iamdecal <iam...@us...> - 2006-02-16 14:33:13
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/admin/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/admin/templates Added Files: mod_fortune_db.tpl.htm mod_fortune_db_add.tpl.htm mod_fortune_db_edit.tpl.htm Log Message: --- NEW FILE: mod_fortune_db_edit.tpl.htm --- <!-- BEGIN: main --> {FILE "../../../admin/templates/mod_popup_header.tpl.htm"} <br /> <p align="center"><b>EDIT FORTUNE_DB ITEM</b></p> <br /> <form action="{ACTION}" method="POST"> <input type="hidden" name="fortune_db_id" value="{ITEM.fortune_db_id}"> <p>Display Count:<br /> <input type="text" name="fortune_db_display_count" value="{ITEM.fortune_db_display_count}" maxlength="255" size="40" style="width:300px;"> </p> <p>Content:<br /> <textarea name="fortune_db_content" size="40" style="width:300px;"> {ITEM.fortune_db_content} </textarea> </p> <input type="image" src="../../../admin/img/save.gif" border="0"> </form> {FILE "../../../admin/templates/mod_footer.tpl.htm"} <!-- END: main --> --- NEW FILE: mod_fortune_db_add.tpl.htm --- <!-- BEGIN: main --> {FILE "../../../admin/templates/mod_popup_header.tpl.htm"} <br /> <p align="center"><b>NEW FORTUNE_DB ITEM</b></p> <br /> <form action="{ACTION}" method="POST"> <p>Number of times shown:<br /> <input type="text" name="fortune_db_display_count" maxlength="255" size="40" style="width:300px;" value="0"> </p> <p>Content:<br /> <textarea name="fortune_db_content" size="40" style="width:300px;"> {ITEM.fortune_db_content} </textarea> </p> <input type="image" src="../../../admin/img/save.gif" border="0"> </form> {FILE "../../../admin/templates/mod_footer.tpl.htm"} <!-- END: main --> --- NEW FILE: mod_fortune_db.tpl.htm --- <!-- BEGIN: main --> {FILE "../../../admin/templates/mod_header.tpl.htm"} <table border="0" width="760" align="center" cellspacing="0" cellpadding="4" style="border: 1px solid black;"> <tr> <td width="20"><a href="mod_fortune_db_add.php" onclick="void open_popup(this.href,320,250); return false;"><img src="../../../admin/img/add.gif" border="0"></a></td> <td width="720"><a href="mod_fortune_db_add.php" onclick="void open_popup(this.href,320,250); return false;">Add new fortune</a></td> </tr> </table> <br /> <br /> <!-- BEGIN: items --> <table border="0" width="760" align="center" cellspacing="0" cellpadding="4" style="border: 1px solid black;"> <!-- BEGIN: item --> <tr bgcolor="{BGCOLOR}"> <td valign="top"><b>{ITEM.fortune_db_content}</b></td> <td valign="top">{ITEM.fortune_db_display_count}</td> <td><a href="mod_fortune_db_edit.php?i={ITEM.fortune_db_id}" onclick="void open_popup(this.href,400,300); return false;"><img src="../../../admin/img/edit.gif" border="0"></a></td> <td><a href="mod_fortune_db_del.php?i={ITEM.fortune_db_id}" onclick="if (confirm('Are you sure you want to delete this item? ({ITEM.fortune_db_content})')) document.location.href=this.href; else return false;"><img src="../../../admin/img/delete.gif" border="0"></a></td> </tr> <!-- END: item --> </table> <!-- END: items --> {FILE "../../../admin/templates/mod_footer.tpl.htm"} <!-- END: main --> |
|
From: iamdecal <iam...@us...> - 2006-02-16 14:32:16
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/admin/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23107/admin/img Log Message: Directory /cvsroot/comoblog/modules/mod_fortune_db/admin/img added to the repository |
|
From: iamdecal <iam...@us...> - 2006-02-16 14:22:33
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19170/include Modified Files: mod_fortune_db.inc.php Log Message: I've added the admin sections for this, it can be seen working in the top bar of http://www.iamdecal.co.uk so it just needs some peer review before release iamdecal 2006-02-16 ---------------------------------------------------------------------- Enter Log. Lines beginning with `CVS:' are removed automatically Committing in . Modified Files: index.php mod_fortune_db.php css/mod_fortune_db.css.php img/mod_fortune_db.gif img/mod_fortune_db_big.gif include/mod_fortune_db.inc.php install/mod_fortune_db.xml templates/sidebar/mod_fortune_db.tpl.htm templates/top/mod_fortune_db.tpl.htm ---------------------------------------------------------------------- Index: mod_fortune_db.inc.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_fortune_db/include/mod_fortune_db.inc.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mod_fortune_db.inc.php 2 Feb 2006 10:37:50 -0000 1.2 +++ mod_fortune_db.inc.php 16 Feb 2006 14:22:19 -0000 1.3 @@ -1,20 +1,106 @@ -<?php - -function mod_fortune_db() - { - $query = "select fortune_db_id, fortune_db_content from ".CFG_MYSQL_TABPREFIX."mod_fortune_db order by rand() limit 1 "; - $res = mysql_query($query); - $error= "error no " . mysql_errno() . " : error " . mysql_error(). " : rows" . mysql_num_rows($res) . ": query " .$query ; - error_log($error,0); - $items = array(); - - while ($row = mysql_fetch_assoc($res)) - { - $query = "update ".CFG_MYSQL_TABPREFIX."mod_fortune_db set fortune_db_display_count = (fortune_db_display_count +1) where fortune_db_id =". addslashes( $row['fortune_db_id']).";" ; - $res = mysql_query($query); - $row['mod_fortune_db_title'] = CFG_MOD_FORTUNE_DB_TITLE; - $items[] = $row; - } - return ($items); - } -?> +<?php + +function mod_fortune_db() + { + $query = "select fortune_db_id, fortune_db_content from ".CFG_MYSQL_TABPREFIX."mod_fortune_db order by rand() limit 1 "; + $res = mysql_query($query); + $query = "update ".CFG_MYSQL_TABPREFIX."mod_fortune_db set fortune_db_display_count = (fortune_db_display_count +1) where fortune_db_id =". addslashes(mysql_result($res, 0,0)) ; + $res2 = mysql_query($query); + return mysql_result($res, 0,1); + } + + + + +function mod_fortune_db_details ($item_id) { + $query = "select * from ".CFG_MYSQL_TABPREFIX."mod_fortune_db where fortune_db_id = '".$item_id."'"; + $res = mysql_query($query); + + if (!$res || !mysql_num_rows($res)) + return (false); + + $item = mysql_fetch_assoc($res); + + return ($item); +} + + +function mod_fortune_db_list () { + $query = " + select b.* + from ".CFG_MYSQL_TABPREFIX."mod_fortune_db b + order by b.fortune_db_content + "; + $res = mysql_query($query); + + if (!$res || !mysql_num_rows($res)) + return (false); + + $items = array(); + while ($row = mysql_fetch_assoc($res)) + { + $items[] = $row; + } + return ($items); +} + +function mod_fortune_db_add ($item) { + + $query = "select max(fortune_db_display_order)+1 from ".CFG_MYSQL_TABPREFIX."mod_fortune_db"; + $res = mysql_query($query); + $item['fortune_db_display_order'] = mysql_result($res,0,0); + + $item['fortune_db_added'] = time(); + + $query = " + insert into ".CFG_MYSQL_TABPREFIX."mod_fortune_db + ( fortune_db_content, fortune_db_display_count, fortune_db_display_order, fortune_db_added) + values ('". $item['fortune_db_content'] ."', + '". $item['fortune_db_display_count'] ."', + '". $item['fortune_db_display_order']."', + '". $item['fortune_db_added'] ."') + "; + $res = mysql_query($query); + + if (!$res) + return (false); + + $item['id'] = mysql_insert_id(); + + return ($item); +} + +function mod_fortune_db_del ($item_id) { + $query = "delete from ".CFG_MYSQL_TABPREFIX."mod_fortune_db where fortune_db_id = '".$item_id."'"; + $res = mysql_query($query); + + if (!$res) + return (false); + + return (true); +} + +function mod_fortune_db_edit ($item) { + $query = " + update ".CFG_MYSQL_TABPREFIX."mod_fortune_db + set fortune_db_content = '". $item['fortune_db_content'] ."', + fortune_db_display_count = '". $item['fortune_db_display_count'] ."', + fortune_db_display_order = '". $item['fortune_db_display_order']."' + where + fortune_db_id = '". $item['fortune_db_id'] ."' + "; + $res = mysql_query($query); + + if (!$res) + return (false); + + return ($item); +} + +function mod_fortune_db_up ($item_id) { + +} + +function mod_fortune_db_down ($item_id) { + +} |
|
From: iamdecal <iam...@us...> - 2006-02-16 14:22:33
|
Update of /cvsroot/comoblog/modules/mod_fortune_db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19170 Modified Files: mod_fortune_db.php Log Message: I've added the admin sections for this, it can be seen working in the top bar of http://www.iamdecal.co.uk so it just needs some peer review before release iamdecal 2006-02-16 ---------------------------------------------------------------------- Enter Log. Lines beginning with `CVS:' are removed automatically Committing in . Modified Files: index.php mod_fortune_db.php css/mod_fortune_db.css.php img/mod_fortune_db.gif img/mod_fortune_db_big.gif include/mod_fortune_db.inc.php install/mod_fortune_db.xml templates/sidebar/mod_fortune_db.tpl.htm templates/top/mod_fortune_db.tpl.htm ---------------------------------------------------------------------- Index: mod_fortune_db.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_fortune_db/mod_fortune_db.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_fortune_db.php 1 Feb 2006 17:28:59 -0000 1.1 +++ mod_fortune_db.php 16 Feb 2006 14:22:19 -0000 1.2 @@ -1,22 +1,18 @@ -<?php -if (in_array('mod_fortune_db', $SIDEBAR_MODULES)) $mod_pos = 'sidebar'; -else $mod_pos = 'top'; - -require_once (CFG_BASE_PATH.'/modules/mod_fortune_db/include/mod_fortune_db.inc.php'); - -$fortune_db_items = mod_fortune_db(); - -if ($fortune_db_items) { - $mod_fortune_db_tpl = new XTemplate (CFG_BASE_PATH.'/modules/mod_fortune_db/templates/'.$mod_pos.'/mod_fortune_db.tpl.htm'); - for ($c = 0; $c < count($fortune_db_items); $c++) { - - $mod_fortune_db_tpl->assign('ITEM', $fortune_db_items[$c]); - $mod_fortune_db_tpl->parse('main.item'); - } - - $mod_fortune_db_tpl->parse('main'); - $mod_contents = $mod_fortune_db_tpl->text("main"); -} -else - $mod_contents = 'no thumb'; -?> \ No newline at end of file +<?php +if (in_array('mod_fortune_db', $SIDEBAR_MODULES)) $mod_pos = 'sidebar'; +else $mod_pos = 'top'; + +require_once (CFG_BASE_PATH.'/modules/mod_fortune_db/include/mod_fortune_db.inc.php'); + +$fortune_db = mod_fortune_db(); + +if ($fortune_db) { + $mod_fortune_db_tpl = new XTemplate (CFG_BASE_PATH.'/modules/mod_fortune_db/templates/'.$mod_pos.'/mod_fortune_db.tpl.htm'); + $mod_fortune_db_tpl->assign('MOD_FORTUNE_CONTENT', $fortune_db); + $mod_fortune_db_tpl->assign('MOD_FORTUNE_DB_TITLE', CFG_MOD_FORTUNE_DB_TITLE); + $mod_fortune_db_tpl->parse('main'); + $mod_contents = $mod_fortune_db_tpl->text("main"); + }else { + $mod_contents = 'no quote today'; + } +?> |
|
From: iamdecal <iam...@us...> - 2006-02-16 14:22:33
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/css In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19170/css Modified Files: mod_fortune_db.css.php Log Message: I've added the admin sections for this, it can be seen working in the top bar of http://www.iamdecal.co.uk so it just needs some peer review before release iamdecal 2006-02-16 ---------------------------------------------------------------------- Enter Log. Lines beginning with `CVS:' are removed automatically Committing in . Modified Files: index.php mod_fortune_db.php css/mod_fortune_db.css.php img/mod_fortune_db.gif img/mod_fortune_db_big.gif include/mod_fortune_db.inc.php install/mod_fortune_db.xml templates/sidebar/mod_fortune_db.tpl.htm templates/top/mod_fortune_db.tpl.htm ---------------------------------------------------------------------- Index: mod_fortune_db.css.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_fortune_db/css/mod_fortune_db.css.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_fortune_db.css.php 1 Feb 2006 17:28:59 -0000 1.1 +++ mod_fortune_db.css.php 16 Feb 2006 14:22:19 -0000 1.2 @@ -1,26 +1,26 @@ -<?php -require_once (dirname(__FILE__).'/../../../include/config.inc.php'); -Header ('Content-type: text/css'); - echo ' - #mod_fortune_db { - /* can be used for setting the position*/ - '. CFG_MOD_FORTUNE_DB_EXTRASTYLE .' - font-size: '.CFG_MOD_FORTUNE_DB_FONT_SIZE.'px; - font-family: '.CFG_MOD_FORTUNE_DB_FONT_FAMILY.'; - color: #'.CFG_MOD_FORTUNE_DB_COLOR.'; - - - } - #mod_fortune_db a { - color: #'.CFG_MOD_FORTUNE_DB_A_COLOR.'; - text-decoration: '.CFG_MOD_FORTUNE_DB_A_TEXT_DECORATION.'; - } - - #mod_fortune_db a:hover { - color: #'.CFG_MOD_FORTUNE_DB_A_HOVER_COLOR.'; - text-decoration: '.CFG_MOD_FORTUNE_DB_A_HOVER_TEXT_DECORATION.'; - } - '; - -mysql_close(); +<?php +require_once (dirname(__FILE__).'/../../../include/config.inc.php'); +Header ('Content-type: text/css'); + echo ' + #mod_fortune_db { + font-size: '.CFG_MOD_FORTUNE_DB_FONT_SIZE.'px; + font-family: '.CFG_MOD_FORTUNE_DB_FONT_FAMILY.'; + color: #'.CFG_MOD_FORTUNE_DB_COLOR.'; + + /* can be used for setting the position , extra info + or even to change the things you set above*/ + '. CFG_MOD_FORTUNE_DB_EXTRASTYLE .' + } + #mod_fortune_db a { + color: #'.CFG_MOD_FORTUNE_DB_A_COLOR.'; + text-decoration: '.CFG_MOD_FORTUNE_DB_A_TEXT_DECORATION.'; + } + + #mod_fortune_db a:hover { + color: #'.CFG_MOD_FORTUNE_DB_A_HOVER_COLOR.'; + text-decoration: '.CFG_MOD_FORTUNE_DB_A_HOVER_TEXT_DECORATION.'; + } + '; + +mysql_close(); ?> \ No newline at end of file |
|
From: iamdecal <iam...@us...> - 2006-02-16 14:22:33
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/templates/top In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19170/templates/top Modified Files: mod_fortune_db.tpl.htm Log Message: I've added the admin sections for this, it can be seen working in the top bar of http://www.iamdecal.co.uk so it just needs some peer review before release iamdecal 2006-02-16 ---------------------------------------------------------------------- Enter Log. Lines beginning with `CVS:' are removed automatically Committing in . Modified Files: index.php mod_fortune_db.php css/mod_fortune_db.css.php img/mod_fortune_db.gif img/mod_fortune_db_big.gif include/mod_fortune_db.inc.php install/mod_fortune_db.xml templates/sidebar/mod_fortune_db.tpl.htm templates/top/mod_fortune_db.tpl.htm ---------------------------------------------------------------------- Index: mod_fortune_db.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/modules/mod_fortune_db/templates/top/mod_fortune_db.tpl.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_fortune_db.tpl.htm 1 Feb 2006 17:29:00 -0000 1.1 +++ mod_fortune_db.tpl.htm 16 Feb 2006 14:22:20 -0000 1.2 @@ -1,9 +1,6 @@ -<!-- BEGIN: main --> -<div id="mod_fortune_db"> - - <!-- BEGIN: item --> - {ITEM.mod_fortune_db_title} - {ITEM.mod_fortune_content} -<!-- END: item --> -</div> -<!-- END: main --> +<!-- BEGIN: main --> +<div id="mod_fortune_db"> + {MOD_FORTUNE_DB_TITLE} + {MOD_FORTUNE_CONTENT} +</div> +<!-- END: main --> |
|
From: iamdecal <iam...@us...> - 2006-02-16 14:22:28
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/templates/sidebar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19170/templates/sidebar Modified Files: mod_fortune_db.tpl.htm Log Message: I've added the admin sections for this, it can be seen working in the top bar of http://www.iamdecal.co.uk so it just needs some peer review before release iamdecal 2006-02-16 ---------------------------------------------------------------------- Enter Log. Lines beginning with `CVS:' are removed automatically Committing in . Modified Files: index.php mod_fortune_db.php css/mod_fortune_db.css.php img/mod_fortune_db.gif img/mod_fortune_db_big.gif include/mod_fortune_db.inc.php install/mod_fortune_db.xml templates/sidebar/mod_fortune_db.tpl.htm templates/top/mod_fortune_db.tpl.htm ---------------------------------------------------------------------- Index: mod_fortune_db.tpl.htm =================================================================== RCS file: /cvsroot/comoblog/modules/mod_fortune_db/templates/sidebar/mod_fortune_db.tpl.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_fortune_db.tpl.htm 1 Feb 2006 17:28:59 -0000 1.1 +++ mod_fortune_db.tpl.htm 16 Feb 2006 14:22:19 -0000 1.2 @@ -1,9 +1,6 @@ -<!-- BEGIN: main --> -<div id="mod_fortune_db"> - - <!-- BEGIN: item --> - {ITEM.mod_fortune_db_title} - {ITEM.mod_fortune_content} -<!-- END: item --> -</div> -<!-- END: main --> +<!-- BEGIN: main --> +<div id="mod_fortune_db"> + {MOD_FORTUNE_DB_TITLE} + {MOD_FORTUNE_CONTENT} +</div> +<!-- END: main --> |
|
From: iamdecal <iam...@us...> - 2006-02-16 14:20:25
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/admin/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18982/admin/templates Log Message: Directory /cvsroot/comoblog/modules/mod_fortune_db/admin/templates added to the repository |
|
From: iamdecal <iam...@us...> - 2006-02-16 14:19:54
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18787/admin Log Message: Directory /cvsroot/comoblog/modules/mod_fortune_db/admin added to the repository |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2006-02-16 12:13:35
|
Update of /cvsroot/comoblog/comoblog/modules/mod_calendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31719 Modified Files: mod_calendar.php Log Message: Move sunday highlighting inline with alternative start days Index: mod_calendar.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_calendar/mod_calendar.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- mod_calendar.php 15 Feb 2006 04:13:44 -0000 1.8 +++ mod_calendar.php 16 Feb 2006 12:13:03 -0000 1.9 @@ -238,6 +238,11 @@ "; $res = mysql_query($query); +if (convert_offset(CFG_CALENDAR_DAY_OFFSET) == 0) + $start_column = 1; +else + $start_column = 8 - convert_offset(CFG_CALENDAR_DAY_OFFSET); + $posts = array(); while ($row = mysql_fetch_row($res)) { $created_date = getdate($row[0]); @@ -247,7 +252,7 @@ for ($cnt = 0; $cnt < $start_day; $cnt++) // void cells (at beginning of month) { - if ($cnt == 0) + if ($cnt == $start_column) $css_class = "calendar_sunday"; else $css_class = "calendar_day"; @@ -271,7 +276,7 @@ elseif ($cnt == $current_date['mday']) $css_class = 'calendar_selected'; // elseif sunday - elseif ($start_day == 1) + elseif ($start_day == $start_column) $css_class = 'calendar_sunday'; // else else |
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2006-02-15 04:13:51
|
Update of /cvsroot/comoblog/comoblog/modules/mod_calendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1063 Modified Files: mod_calendar.php Log Message: Fix problem with display when starting day is Monday Index: mod_calendar.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_calendar/mod_calendar.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- mod_calendar.php 9 Jan 2006 02:52:56 -0000 1.7 +++ mod_calendar.php 15 Feb 2006 04:13:44 -0000 1.8 @@ -39,8 +39,8 @@ $val = 6; break; } - - return $val; + + return $val; } function start_day ($month, $year) @@ -60,11 +60,14 @@ $start_day = ($total_days_since_1901 + 2) % 7; $start_day = $start_day - convert_offset(CFG_CALENDAR_DAY_OFFSET); + + if ($start_day < 0) + $start_day = 7 + $start_day; if ($start_day == 0) { $start_day = 7; } - + return ($start_day); } @@ -289,7 +292,7 @@ //echo $start_day.'<br>'; - if ($start_day == 7) // new row in table + if ($start_day == 7 && $cnt + 1 <= $days_in_month) // new row in table { $mod_calendar_tpl->parse("main.calendar.row"); $start_day = 0; |
|
From: iamdecal <iam...@us...> - 2006-02-02 10:37:59
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8457/modules/mod_fortune_db/include Modified Files: mod_fortune_db.inc.php Log Message: seems to be a problem with the mysql conection - the error log shows one row is found - as it should be, but i cant loop the results set. this works fine in mod_randomthumb, so i'm guessing its a type somewhere.. but i cant see where its coming from. TO DO need to add functions to edit the fortunes -ala mod_blogrolling. Index: mod_fortune_db.inc.php =================================================================== RCS file: /cvsroot/comoblog/modules/mod_fortune_db/include/mod_fortune_db.inc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mod_fortune_db.inc.php 1 Feb 2006 17:28:59 -0000 1.1 +++ mod_fortune_db.inc.php 2 Feb 2006 10:37:50 -0000 1.2 @@ -2,39 +2,19 @@ function mod_fortune_db() { - if (CFG_USE_PATH_INFO == 'no') - $iisbug = '?'; - else - $iisbug = ''; - - - $query = " - select - * - from - ".CFG_MYSQL_TABPREFIX."mod_fortune_db - order by rand() - limit 1 "; + $query = "select fortune_db_id, fortune_db_content from ".CFG_MYSQL_TABPREFIX."mod_fortune_db order by rand() limit 1 "; $res = mysql_query($query); - if (!$res || !mysql_num_rows($res)){ - echo "<hr>\n" . mysql_errno() . ": " . mysql_error(). ":" . mysql_num_rows($res) . ":" .$query . "<hr>\n"; - - exit; - return (false); - } + $error= "error no " . mysql_errno() . " : error " . mysql_error(). " : rows" . mysql_num_rows($res) . ": query " .$query ; + error_log($error,0); $items = array(); while ($row = mysql_fetch_assoc($res)) { $query = "update ".CFG_MYSQL_TABPREFIX."mod_fortune_db set fortune_db_display_count = (fortune_db_display_count +1) where fortune_db_id =". addslashes( $row['fortune_db_id']).";" ; $res = mysql_query($query); - #if (!$res || !mysql_num_rows($res)){ - # echo "<hr>\n" . mysql_errno() . ": " . mysql_error(). ":" . mysql_num_rows($res) . ":" .$query . "<hr>\n"; - #} $row['mod_fortune_db_title'] = CFG_MOD_FORTUNE_DB_TITLE; - $items[] = $row; } return ($items); } -?> \ No newline at end of file +?> |
|
From: iamdecal <iam...@us...> - 2006-02-01 17:29:13
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30358/mod_fortune_db/include Added Files: mod_fortune_db.inc.php Log Message: like mod fortune, but i wanted a db based one - warning slight bug in this commit. will fix in the next 24 hours . --- NEW FILE: mod_fortune_db.inc.php --- <?php function mod_fortune_db() { if (CFG_USE_PATH_INFO == 'no') $iisbug = '?'; else $iisbug = ''; $query = " select * from ".CFG_MYSQL_TABPREFIX."mod_fortune_db order by rand() limit 1 "; $res = mysql_query($query); if (!$res || !mysql_num_rows($res)){ echo "<hr>\n" . mysql_errno() . ": " . mysql_error(). ":" . mysql_num_rows($res) . ":" .$query . "<hr>\n"; exit; return (false); } $items = array(); while ($row = mysql_fetch_assoc($res)) { $query = "update ".CFG_MYSQL_TABPREFIX."mod_fortune_db set fortune_db_display_count = (fortune_db_display_count +1) where fortune_db_id =". addslashes( $row['fortune_db_id']).";" ; $res = mysql_query($query); #if (!$res || !mysql_num_rows($res)){ # echo "<hr>\n" . mysql_errno() . ": " . mysql_error(). ":" . mysql_num_rows($res) . ":" .$query . "<hr>\n"; #} $row['mod_fortune_db_title'] = CFG_MOD_FORTUNE_DB_TITLE; $items[] = $row; } return ($items); } ?> |
|
From: iamdecal <iam...@us...> - 2006-02-01 17:29:12
|
Update of /cvsroot/comoblog/modules/mod_fortune_db/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30358/mod_fortune_db/install Added Files: mod_fortune_db.xml Log Message: like mod fortune, but i wanted a db based one - warning slight bug in this commit. will fix in the next 24 hours . --- NEW FILE: mod_fortune_db.xml --- <?xml version="1.0" standalone="no"?> <!DOCTYPE module SYSTEM "http://comoblog.sourceforge.net/DTD/comoblog_mod_install.dtd"> <module> <name> mod_fortune_db </name> <description> displays a random quote or phrase - a lot like mod_fortune, but i wanted a db based one </description> <allowed_pos>sidebar</allowed_pos> <allowed_pos>top</allowed_pos> <version>1.0</version> <minimum_supported>1.0</minimum_supported> <certified> 1.0 </certified> <author>iamdecal iam...@gm... http://www.iamdecal.co.uk</author> <date>2004-10-15</date> <dbquery>CREATE TABLE `easymoblog_mod_fortune_db` (`fortune_db_id` int(10) unsigned NOT NULL auto_increment, `fortune_db_content` text default NULL, `fortune_db_added` int(10) unsigned default NULL, `fortune_db_display_order` int(10) unsigned default NULL,`fortune_db_display_count` int(10) unsigned default NULL, PRIMARY KEY (`fortune_db_id`)) TYPE=MyISAM;</dbquery> <param name="CFG_MOD_FORTUNE_DB_EXTRASTYLE" description="Any extra style you might want to add, to enable this module to blend in with your site, this will be applied to the DIV that holds the module" type="text" editable="Y" accept_null="Y" value="" restrict_values="" /> <param name="CFG_MOD_FORTUNE_DB_COLOR" description="Text Color" type="color_picker" editable="Y" accept_null="N" value="000000" /> <param name="CFG_MOD_FORTUNE_DB_A_COLOR" description="Link Color" type="color_picker" editable="Y" accept_null="N" value="000000" /> <param name="CFG_MOD_FORTUNE_DB_A_HOVER_COLOR" description="Link Hover Color" type="color_picker" editable="Y" accept_null="N" value="000000" /> <param name="CFG_MOD_FORTUNE_DB_A_TEXT_DECORATION" description="Link Decoration" type="select" editable="Y" accept_null="N" value="none" restrict_values="none|underline|overline|line-through" /> <param name="CFG_MOD_FORTUNE_DB_A_HOVER_TEXT_DECORATION" description="Link Hover Decoration" type="select" editable="Y" accept_null="N" value="underline" restrict_values="none|underline|overline|line-through" /> <param name="CFG_MOD_FORTUNE_DB_FONT_FAMILY" description="Link Font Family" type="font_picker" editable="Y" accept_null="N" value="Verdana,Arial,Helvetica,sans-serif" restrict_values="Verdana,Arial,Helvetica,sans-serif" /> <param name="CFG_MOD_FORTUNE_DB_FONT_SIZE" description="Link Font Size" type="select" editable="Y" accept_null="N" value="10" restrict_values="8|9|10|11|12|13|14|15|16|17|18|19|20" /> <param name="CFG_MOD_FORTUNE_DB_TITLE" description="The title of this module" type="text" editable="Y" accept_null="Y" value="Random Quote" restrict_values="" /> </module> |