[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: www/apps/noatun
From: Stefan Gehn <sgehn () gmx ! net>
Date: 2004-09-23 18:38:30
Message-ID: 20040923183830.C810F9AA6 () office ! kde ! org
[Download RAW message or body]
CVS commit by metz:
- stop this cvs log from screwing up site layout by wrapping lines with more than 100 chars
- add some spacing between cvs commits
- make commit text preformatted, looks much nicer on (TAB) indented code
M +3 -3 index.php 1.5
M +18 -2 rss.inc 1.6
--- www/apps/noatun/index.php #1.4:1.5
@@ -27,11 +27,11 @@
<h2>Recent Noatun Development Activity (CVS Commits)</h2>
-<table width="100%;" cellpadding="6">
+<table width="100%" cellpadding="0" cellspacing="0" border="0">
<?php
include("rss.inc");
$foo = new RSSParser;
$out = $foo->read(fopen('cvscommits.rdf', 'r'),
- "<tr>\n<td><p><a target=\"_blank\" \
href=\"{LINK}\"><b>{TITLE}</b></a></p>\n{DESCRIPTION}</td>\n</tr>\n");
-print $out;
+ "<tr><td style=\"padding-top:0px; padding-bottom:20px;\"><a target=\"_blank\" \
href=\"{LINK}\"><b>{TITLE}</b></a><pre>{DESCRIPTION}</pre></td></tr>\n"); +echo($out);
?>
</table>
--- www/apps/noatun/rss.inc #1.5:1.6
@@ -56,6 +56,22 @@
break;
case "DESCRIPTION":
- $data = preg_replace("/[\n\r]+/", "<br />", $data);
- $this->description .= $data;
+ $data = preg_replace("/[\n\r]+/", "", $data); // get rid of \
newlines + define(MAXLEN, 100);
+ if (strlen($data) > MAXLEN && substr_count($data, " ") < 2)
+ {
+ $res = "";
+ while(strlen($data) >= MAXLEN)
+ {
+ $res .= substr($data, 0, MAXLEN)."<br />";
+ $data = substr($data, MAXLEN);
+ }
+ $res .= $data;
+ }
+ else // line consists of words and can be wordwrapped properly
+ {
+ $res = wordwrap($data, MAXLEN);
+ }
+
+ $this->description .= $res;
break;
case "LINK":
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic