Re: Conference teaser on the front page
| From: | Hannes Magnusson | Date: | Mon, 12 Feb 2007 09:06:39 +0000 |
| Subject: | Re: Conference teaser on the front page | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-34258@lists.php.net to get a copy of this message | ||
Hi
I hear some of you are worried over flooding the top, here is a patch
to limit confs announcements to 4, and cfp to 4..
-Hannes
On 2/12/07, Hannes Magnusson <hannes.magnusson@gmail.com> wrote:
> Hi all
>
> Attached are patches that add a conference teaser on the front page &
> splits the conference feed into two "categories" (dc:subject), "cfp" &
> "conference".
>
> Screenshot in fx:
> http://home.oslo.nith.no/~maghan/confs.rss.png
> Screenshot in konq:
> http://home.oslo.nith.no/~maghan/confs.rss2.png
>
> Objections?
>
> -Hannes
>
>
--- index.php.bak Mon Feb 12 00:15:18 2007 +++ index.php Mon Feb 12 08:41:05 2007 @@ -160,7 +161,11 @@ print ' <div id="confTeaser">' . "\n"; foreach($tmp as $k => $a) { printf(' <ul class="%s">' . "\n", $k); + $count = 0; foreach($a as $e) { + if($count++ >= 4) { + break; + } print $e . "\n"; } print " </ul>\n";
--- index.php.bak Mon Feb 12 00:15:18 2007 +++ index.php Mon Feb 12 08:41:05 2007 @@ -160,7 +161,11 @@ print ' <div id="confTeaser">' . "\n"; foreach($tmp as $k => $a) { printf(' <ul class="%s">' . "\n", $k); + $count = 0; foreach($a as $e) { + if($count++ >= 4) { + break; + } print $e . "\n"; } print " </ul>\n";