b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (0.9.x) [ class tree: evoskins ] [ index: evoskins ] [ all elements ]

Source for file _linkblog.php

Documentation is available at _linkblog.php

  1. <?php
  2.     /**
  3.      * This is the template that displays the linkblog
  4.      *
  5.      * This file is not meant to be called directly.
  6.      * It is meant to be called by an include in the _main.php template.
  7.      *
  8.      * b2evolution - {@link http://b2evolution.net/}
  9.      * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  10.      * @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
  11.      *
  12.      * @package evoskins
  13.      * @subpackage wpc
  14.      */
  15.     if!defined('DB_USER') ) die'Please, do not access this page directly.' );
  16.     
  17.     if!isset$linkblog ) )
  18.     {    // No link blog explicitely specified, we use default:
  19.         $linkblog $Blog->get('links_blog_ID');
  20.     }
  21.     
  22.     if$linkblog )
  23.     {    // No linkblog blog requested for this blog
  24.         return;
  25.     }
  26.         
  27.     # maximum number of linkblog entries to display:
  28.     if(!isset($linkblog_limit)) $linkblog_limit 20;
  29.     # global linkblog delimiters:
  30.     if(!isset($linkblog_main_start)) $linkblog_main_start '';
  31.     if(!isset($linkblog_main_end)) $linkblog_main_end '';
  32.     # Category delimiters:
  33.     if(!isset($linkblog_catname_before)) $linkblog_catname_before '<li>';
  34.     if(!isset($linkblog_catname_after)) $linkblog_catname_after '<ul>';
  35.     if(!isset($linkblog_catlist_end)) $linkblog_catlist_end '</ul></li>';
  36.     # Item delimiters:
  37.     if(!isset($linkblog_item_before)) $linkblog_item_before '<li>';
  38.     if(!isset($linkblog_item_after)) $linkblog_item_after '</li>';
  39.  
  40.  
  41.     // --- //
  42.     
  43.     
  44.     // Load the linkblog blog:
  45.     $LinkblogList new ItemList$linkblogarray()''''''$linkblog_cat$linkblog_catsel'''ASC''category title'''''''''''''''''$linkblog_limit'posts'$timestamp_min$timestamp_max );
  46.     
  47.     
  48.     // Dirty trick until we get everything into objects:
  49.     $saved_blog $blog;  
  50.     $blog $linkblog;
  51.     
  52.     // Open the global list
  53.     echo $linkblog_main_start;
  54.         
  55.     $previous_cat '';
  56.     $linkblog_cat '';
  57.     
  58.     while$Item $LinkblogList->get_category_group() )
  59.     {
  60.         // Open new cat:
  61.         echo $linkblog_catname_before;
  62.         $Item->main_category();
  63.         echo $linkblog_catname_after;
  64.         
  65.         while$Item $LinkblogList->get_item() )
  66.         {
  67.             echo $linkblog_item_before;
  68.             $Item->title()
  69.             echo ' ';
  70.             $Item->content10T_('more')'['']' );    // Description + more link 
  71.             echo $linkblog_item_after;
  72.         }
  73.     
  74.         // Close cat
  75.         echo $linkblog_catlist_end;
  76.     }
  77.     // Close the global list
  78.     echo $linkblog_main_end;
  79.     
  80.     // Restore after dirty trick:
  81.     $blog $saved_blog;        
  82. ?>

Documentation generated on Tue, 20 May 2008 01:55:22 +0200 by phpDocumentor 1.4.2