Advertise here

Permalink - http://pastebin.ws/652f70 - PHP - 86.11.xx.xx - Posted January 11, 2009, 4:00 am

Validate HTML - Validate CSS

Reply tree

  • 8nw1gj - 1 year, 2 months, 3 days, 8 hours, 39 minutes ago - by 194.176.xx.xx
    • 652f70 - 1 year, 2 months, 2 days, 6 hours, 29 minutes ago - by 86.11.xx.xx
      • 9bz0jr - 1 week, 3 days, 15 hours, 22 minutes ago - by 123.125.xx.xx
    • 1iq9h0 - 1 year, 2 months, 2 days, 5 hours, 11 minutes ago - by 86.11.xx.xx
    • 4dogix - 1 year, 1 month, 1 week, 2 days, 15 hours, 33 minutes ago - by 66.190.xx.xx
    • 8h49bh - 3 months, 1 week, 5 days, 13 minutes ago - by 99.3.xx.xx
    • db4bf2 - 1 month, 1 week, 2 days, 9 hours, 55 minutes ago - by 94.224.xx.xx
Dynamic Block for Pixie (http://www.getpixie.co.uk/), can be used to show news on any page (requires a dynamic page setting up, with the name 'news')
  1. <?php
  2. //*****************************************************************//
  3. // Pixie: The Small, Simple, Site Maker.                           //
  4. // ----------------------------------------------------------------//
  5. // Licence: GNU General Public License v3                          //
  6. // Title: Display News.                                            //
  7. //*****************************************************************//
  8. ?>
  9.                                         <div id="block_news" class="block">
  10.                                                 <div class="block_header">
  11.                                                         <h4>News</h4>
  12.                                                 </div>
  13.                                                 <div class="block_body">
  14.                                                 <ul>
  15.                                                         <?php
  16.                                                         echo "\n";
  17.                                                         $page_name = "news";
  18.                                                         // how many news items to show
  19.                                                         $num = 10;
  20.                                                         $page_id = safe_field('page_id','pixie_core',"page_name='$page_name'");
  21.                                                         $rs = safe_rows_start("*", "pixie_dynamic_posts", "page_id = '$page_id' and public = 'yes' and posted < now() order by posted desc limit 0, $num");
  22.                                                         if ($rs) {
  23.                                                                 while ($a = nextRow($rs)) {
  24.                                                                         extract($a);
  25.                                                                         echo "\t\t\t\t\t\t\t<li><a href=\"".createURL($page_name, "permalink", $a['post_slug'])."\" rel=\"bookmark\">{$a['title']}</a></li>\n";
  26.                                                                 }
  27.                                                         }
  28.                                                         ?>
  29.                                                 </ul>
  30.                                                 </div>
  31.                                                 <div class="block_footer">
  32.                                                 </div>
  33.                                         </div>