Re: com web/php: Major homepage rework. The old layout prioritized all the wrong things. This rework is not complete, but after surveying multiple
people it does seem better already, so I decided to push.: View/HomepageNewsView.php in
| From: | Levi Morrison | Date: | Thu, 05 Jul 2012 19:06:47 +0000 |
| Subject: | Re: com web/php: Major homepage rework. The old layout prioritized all the wrong things. This rework is not complete, but after surveying multiple people it does seem better already, so I decided to push.: View/HomepageNewsView.php in |
||
| References: | 1 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-13866@lists.php.net to get a copy of this message | ||
On Thu, Jul 5, 2012 at 12:08 PM, Hannes Magnusson <
hannes.magnusson@gmail.com> wrote:
> On Wed, Jul 4, 2012 at 12:24 AM, Levi Morrison <levim@php.net> wrote:
> > Commit: ee7acf4ae026dd444feae54378300e267a4e6391
> > Author: Levi Morrison <levim@php.net> Tue, 3 Jul 2012
> 17:24:07 -0600
> > Parents: 972b42119997a50ce6b1cb4d6c490cca8348c244
> > Branches: master
>
> + $dom = new DOMDocument();
> + @$dom->loadHTML($contentRaw);
> +
> + $xpath = new DomXPath($dom);
> + $nodes = $xpath->query('//body/div/*');
> +
>
> Wouldn't it make more sense to do this when we actually preprocess the
> entry on master?
> We can easily add a "teaser" key to the news array.
>
That would be much better. I actually haven't gotten into how this data is
built yet and is (for now) beyond my knowledge scope.
> + print "<div class='spanning-content'>";
>
> Please use consistent CS, we prefer echo "just because we do" :)
>
If you look in that same file, someone had already used print. I just
followed suit. Good to know, though.