[www-doc] [Git][VideoLAN.org/websites][master] tweets are mostly english, but not always

Christoph Miebach gitlab at videolan.org
Mon Jan 16 19:06:31 CET 2017


Christoph Miebach pushed to branch master at VideoLAN organization / websites


Commits:
538e1638 by Christoph Miebach at 2017-01-16T13:06:26-05:00
tweets are mostly english, but not always

- - - - -


1 changed file:

- www.videolan.org/index.php


Changes:

=====================================
www.videolan.org/index.php
=====================================
--- a/www.videolan.org/index.php
+++ b/www.videolan.org/index.php
@@ -259,6 +259,7 @@ include($_SERVER["DOCUMENT_ROOT"] . "/include/magpierss/rss_fetch.inc");
                         </a>
                     </span>
                 </h1>
+                <span lang=""><!-- tweets are often english, but some are french and we even retweeted arabic or similar, so the empty lang is intentional -->
                 <?php
                 $rss = fetch_rss("http://www.videolan.org/_twitter/userrss.php?xrt=0&xrp=1&c=40");
                 $i = 0;
@@ -266,7 +267,7 @@ include($_SERVER["DOCUMENT_ROOT"] . "/include/magpierss/rss_fetch.inc");
                 $entries_per_column = 5;
                 $columns = 1;
                 foreach ($rss->items as $item) {
-                    echo '<p style="border-bottom: 1px dashed #CCC;padding-bottom:5px;margin-bottom:5px;direction:ltr; text-align: left;">';
+                    echo '<p dir='ltr' style="border-bottom: 1px dashed #CCC;padding-bottom:5px;margin-bottom:5px; text-align: left;">';
                     echo preg_replace(array('^(http://\S+)^is', '^(https://\S+)^is'), '<a href="$1">$1</a>', str_replace("videolan:", "<b>" . date("Y-m-d h:i", strtotime($item['pubdate'])) . "</b>", $item['title']));
                     echo "</p>";
                     $i++;
@@ -274,6 +275,7 @@ include($_SERVER["DOCUMENT_ROOT"] . "/include/magpierss/rss_fetch.inc");
                     if ($i % $entries_per_column == 0) echo "</td><td>";
                 }
                 ?>
+                </span>
             </div>
         </div>
     </div>



View it on GitLab: https://code.videolan.org/VideoLAN.org/websites/commit/538e1638939e867ac247c2383912cbf140b591db
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/www-doc/attachments/20170116/d2cc8861/attachment.html>


More information about the www-doc mailing list