File:  [mozdev] / aecreations / www / homepg_test.html
Revision 1.27: download - view: text, annotated - select for diffs - revision graph
Thu Sep 25 20:35:40 2008 UTC (9 years, 2 months ago) by ateng
Branches: MAIN
CVS tags: HEAD
Sync up the test home page w/ the current

<?php

function createBlogPostPreviewItem($title, $date, $postURL)
{
  echo "<div class=\"homepg-blog-preview\">\n";
  echo '  <p><span class="homepg-blog-post-date">' . $date . ' <img src="/img/index.png" class="index"> </span> <a href="' . $postURL . '">' . $title . "</a></p>\n</div>\n";
}


function createBlogPostPreview()
{
  $feedURL = 'http://aecreations.blogspot.com/feeds/posts/default?start-index=1&max-results=3';

  $xmlDoc = new DOMDocument();
  $rv = $xmlDoc->load($feedURL);
  if (! $rv) {
    echo "  <!-- Error loading feed URL for AE Creations Blog -->\n";
    return;
  }

  $entries = $xmlDoc->getElementsByTagName('entry');
  $maxPosts = $entries->length;

  $titles = array();
  $dates = array();
  $postURLs = array();
  
  for ($i = 0; $i < $maxPosts; $i++) {
    $children = $entries->item($i)->childNodes;

    foreach ($children as $child) {
      if ($child->nodeName == 'title') {
        $titles[$i] = $child->nodeValue;
      }

      if ($child->nodeName == 'published') {
        $dtz = timezone_open('America/Los_Angeles');
        $dt = date_create($dates[$i] = $child->nodeValue, $dtz);
        $dates[$i] = date_format($dt, "d-M-Y");
      }

      if ($child->nodeName == 'link') {
        if ($child->getAttribute('rel') == 'alternate') {
          $postURLs[$i] = $child->getAttribute('href');
        }
      }
    }
  }

  for ($i = 0; $i < count($titles); $i++) {
    createBlogPostPreviewItem($titles[$i], $dates[$i], $postURLs[$i]);
  }
}

?>

<!-- ***************** INFO/NEWS *************** -->
<div id="infoTabs">

<div class="infoTab" id="beta-releases">
<h5 class="infoHeader">What's New</h5>
<ul>
  <li><a href="./panicbutton/index.html">Panic Button 1.1.1</a> &ndash; released on 19 September 2008</li>
</ul>
</div>

<div class="infoTab" id="whats-new">
<h5 class="infoHeader">Releases</h5>
<ul>
  <li><a href="http://clippings.mozdev.org/index.html">Clippings 3.0.1</a> &ndash; released on 27 June 2008</li>
  <li><a href="./sendtabs/index.html">Send Tab URLs 1.0</a> &ndash; released on 6 August 2008</li>
</ul>
</div>

<div class="infoTab" id="get-software">
<h5 class="infoHeader">Get Software</h5>

<div id="get-firefox-button" style="margin-bottom:6px">
<a href="http://www.spreadfirefox.com/node&amp;id=236886&amp;t=306"><img alt="Firefox 3" src="http://sfx-images.mozilla.org/affiliates/Buttons/firefox3/110x32_get_ffx.png" title="Firefox 3" border="0"></a>
</div>

<div id="get-thunderbird-button">
<a href="http://www.mozilla.org/products/thunderbird/"
title="Get Thunderbird - Reclaim Your Inbox"><img
src="http://sfx-images.mozilla.org/affiliates/thunderbird/thunderbird_small.png"
width="110" height="32" border="0" alt="Get Thunderbird"></a>
</div>

</div>

<!-- alternative image/table base tab works better in NS4 -->
<!--
<div class="infoTab" id="whats-new-image">
<h5 class="infoHeader"><img src="http://www.mozdev.org/sharedimages/whatsnew_top.gif" width="154" alt="What's New"></h5>
<div class="infoItems">
<div>News item goes here</div>
<div>More news item goes here</div>
<div><a href="http://mozdev.org/">mozdev.org</a></div>
</div>
</div>
-->
</div>
<!-- ***************** INFO/NEWS *************** -->

<?php

  include 'sidebar_nav.php';
  insertSidebarNavigation();

?>

<!-- MAIN CONTENT -->

<div id="ae-content">

<h1>Cool, useful extensions from AE Creations</h1>


<div class="homepg-subhead"><span class="homepg-subhead-text">featured extension</span></div>

<div id="homepg-featured-extension">

<h3><a href="http://clippings.mozdev.org/"><strong>Clippings</strong></a><span id="homepg-featured-extension-abstract"> <img src="/img/bigidx.png" class="big-index"> Save frequently-entered text for pasting later</span></h3>

<img class="thumbnail" src="./img/th_clippings.png" width="200" height="124" alt="Thumbnail of Clippings extension for Firefox and Thunderbird" style="margin-bottom:12px"/>

<p>Saves and manages frequently-entered text for later pasting into Web page
forms in Firefox or email and newsgroup messages in Thunderbird. Pasting a
clipping is accomplished with just two mouse clicks, eliminating the hassle of
retyping or repetitive copying and pasting.</p>

<p class="homepg-ext-quicklinks"><img src="/img/index.png" class="index"> <a href="http://clippings.mozdev.org/index.html">Learn More</a> <img  src="/img/index.png" class="index" alt="-"> <a href="http://clippings.mozdev.org/installation.html">Download and Install</a></p>

</div>   <!-- Featured extension -->

<div id="homepg-extensions-and-blog-previews">
<div id="homepg-extensions">
<div class="homepg-subhead"><span class="homepg-subhead-text">other extensions</span></div>

<div class="homepg-extension-item">
  <div class="extension-icon">
    <img src="img/panicbutton.png" />
  </div>
  <div class="homepg-extension-summary">
    <h3><a href="panicbutton/index.html">Panic Button</a></h3>
    <p>Quickly hide all browser windows with a click of a button.</p>
  </div>
</div>

<div class="homepg-extension-item">
  <div class="extension-icon">
    <img src="img/sendtaburls.png" />
  </div>
  <div class="homepg-extension-summary">
    <h3><a href="sendtabs/index.html">Send Tab URLs</a></h3>
    <p>Emails a list of all browser tabs.</p>
  </div>
</div>
</div> <!-- homepg extensions -->

<div id="homepg-blog-previews">
<div class="homepg-subhead"><span class="homepg-subhead-text">the AE Creations blog</span></div>

<?php

  echo "<!-- BEGIN PHP-generated blog post preview -->\n";
  createBlogPostPreview();
  echo "<!-- END PHP-generated blog post preview -->\n";

?>

  <p id="homepg-blog-link"><img src="/img/smidx.png" class="small-index"> <a href="http://aecreations.blogspot.com/">More</a> &hellip;</p>
</div> <!-- homepg blog previews -->

</div> <!-- homepg extensions and blog previews -->

</div>  <!-- ae content -->

<!--
<p><strong>Note:</strong> If you want to add an area for user feedback to any of your pages, take a look at the <a href="notes.html">notes.html</a>
template.</p>
-->

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>