Commit: 1b2be8c0c771b0f58846831fc2add2cd62eac3fa Author: Hannes Magnusson <[email protected]> Tue, 3 Dec 2013 10:58:39 -0800 Parents: 16e60351343b6a215a8abc3343821e9b9372ad1c Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=1b2be8c0c771b0f58846831fc2add2cd62eac3fa Log: Missing anchors for news entries Our atom/rss feeds includes these links. Note: Not using id= as that would generate "genanchor" links which would mess up the layout :/ Changed paths: M conferences/index.php M index.php Diff: diff --git a/conferences/index.php b/conferences/index.php index 8e53985..7c713de 100644 --- a/conferences/index.php +++ b/conferences/index.php @@ -29,9 +29,10 @@ foreach($NEWS_ENTRIES as $entry) { $panels = ""; foreach($frontpage as $entry) { $link = substr($entry["id"], 15); // Strip http://php.net/ + $id = parse_url($entry["id"], PHP_URL_FRAGMENT); $date = date_format(date_create($entry["updated"]), 'Y-m-d'); $content .= '<div class="newsentry">'; - $content .= '<h3 class="newstitle"><a href="'. $MYSITE.$link .'">' . $entry["title"] . '</a></h3>'; + $content .= '<h3 class="newstitle"><a href="'. $MYSITE.$link .'" name="' . $id . '">' . $entry["title"] . '</a></h3>'; $content .= '<div class="newsimage">'; $content .= sprintf('<a href="%s"><img src="/images/news/%s"></a>', $entry["newsImage"]["link"], $entry["newsImage"]["content"]); $content .= '</div>'; diff --git a/index.php b/index.php index 4d1998d..1d60405 100644 --- a/index.php +++ b/index.php @@ -71,11 +71,12 @@ foreach($NEWS_ENTRIES as $entry) { } foreach($frontpage as $entry) { $link = substr($entry["id"], 15); // Strip http://php.net/ + $id = parse_url($entry["id"], PHP_URL_FRAGMENT); $date = date_format(date_create($entry["updated"]), 'Y-m-d'); $content .= <<<NEWSENTRY <div class="newsentry"> <div class="newstime">$date</div> - <h3 class="newstitle"><a href="{$MYSITE}{$link}">{$entry["title"]}</a></h3> + <h3 class="newstitle"><a href="{$MYSITE}{$link}" name="{$id}">{$entry["title"]}</a></h3> <div class="newscontent"> {$entry["content"]} </div> -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
