cvs: php-master-web(NEW_LOOK_2008) /scripts event_listing
| From: | Hannes Magnusson | Date: | Sun, 17 Aug 2008 16:15:05 +0000 |
| Subject: | cvs: php-master-web(NEW_LOOK_2008) /scripts event_listing | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-2447@lists.php.net to get a copy of this message | ||
bjori Sun Aug 17 16:15:05 2008 UTC
Modified files: (Branch: NEW_LOOK_2008)
/php-master-web/scripts event_listing
Log:
Markup changes for the new phpweb look
http://cvs.php.net/viewvc.cgi/php-master-web/scripts/event_listing?r1=1.12&r2=1.12.2.1&diff_format=u
Index: php-master-web/scripts/event_listing
diff -u php-master-web/scripts/event_listing:1.12 php-master-web/scripts/event_listing:1.12.2.1
--- php-master-web/scripts/event_listing:1.12 Sat Mar 22 13:32:28 2008
+++ php-master-web/scripts/event_listing Sun Aug 17 16:15:04 2008
@@ -25,11 +25,7 @@
$seen = array();
// Start output file with PHP code
- fwrite(
- $out,
- "<?php\n\$RSIDEBAR_DATA = <<<END_RSIDEBAR_DATA\n" .
- "<h4>Upcoming Events <a
href=\"/submit-event.php\">[add]</a></h4>\n"
- );
+ fwrite($out, "<?php\n\$EVENTS_DATA = <<<END_RSIDEBAR_DATA\n");
$content = ""; $buffer = array();
$endts = strtotime("+$months months");
@@ -57,9 +53,9 @@
$cm = (int) $m;
// Buffer month header
- $headline = '<h4 class="eventmonth">' .
+ $headline = '<h3 class="eventmonth">' .
strftime('%B', mktime(12, 0, 0, $cm, $d, $y)) .
- "</h4>\n";
+ "</h3>\n";
$buffer[$headline] = array();
// We have not seen any events in this month
@@ -73,10 +69,10 @@
if ($ccat != (int) $cat) {
if($ccat) {
// "buffer" the current content before we move onto next category
- $buffer[$headline][$ccat] = $content;
+ $buffer[$headline][$ccat] = $content . "</ul>";
}
- $content = '<h4>' . $cats[$cat] . "</h4>\n";
+ $content = '<h4>' . $cats[$cat] . "</h4><ul
class=\"simple\">\n";
$ccat = $cat;
}
@@ -90,16 +86,16 @@
}
// Add event to the "buffer"
- $content .= "<span class=\"event_$ccode vevent\"><abbr
title=\"$y-$m-$d\" class=\"dtstart\">$d</abbr>. <a
href=\"/cal.php?id=$id\" class=\"summary\">" .
+ $content .= "<li><span class=\"event_$ccode
vevent\"><abbr title=\"$y-$m-$d\"
class=\"dtstart\">$d</abbr>. <a href=\"/cal.php?id=$id\"
class=\"summary\">" .
htmlspecialchars(stripslashes($desc)) .
- "</a></span><br />\n";
+ "</a></span></li>\n";
// Set seen flag
$seen[$desc] = TRUE;
}
}
// Add the last category to the "buffer"
- $buffer[$headline][$ccat] = $content;
+ $buffer[$headline][$ccat] = $content . "</ul>";
// Organize the output
$order = array(
@@ -126,7 +122,7 @@
}
// End heredoc string
- fwrite($out, "END_RSIDEBAR_DATA;\n");
+ fwrite($out, "\nEND_RSIDEBAR_DATA;\n");
// Close files (all events displayed)
fclose($csv); fclose($out);