b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (CVS HEAD) [ class tree: evocore ] [ index: evocore ] [ all elements ]

Source for file _coll_link_list.widget.php

Documentation is available at _coll_link_list.widget.php

  1. <?php
  2. /**
  3.  * This file implements the links_Widget class.
  4.  *
  5.  * This file is part of the evoCore framework - {@link http://evocore.net/}
  6.  * See also {@link http://sourceforge.net/projects/evocms/}.
  7.  *
  8.  * @copyright (c)2003-2010 by Francois PLANQUE - {@link http://fplanque.net/}
  9.  *
  10.  *  {@internal License choice
  11.  *  - If you have received this file as part of a package, please find the license.txt file in
  12.  *    the same folder or the closest folder above for complete license terms.
  13.  *  - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
  14.  *    then you must choose one of the following licenses before using the file:
  15.  *    - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
  16.  *    - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
  17.  *  }}}
  18.  *
  19.  * @package evocore
  20.  *
  21.  *  {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  22.  * @author fplanque: Francois PLANQUE.
  23.  *
  24.  * @version $Id: _coll_link_list.widget.php,v 1.5 2010/02/08 17:54:48 efy-yury Exp $
  25.  */
  26. if!defined('EVO_MAIN_INIT') ) die'Please, do not access this page directly.' );
  27.  
  28. load_class'widgets/widgets/_coll_item_list.widget.php''coll_item_list_Widget' );
  29.  
  30. /**
  31.  * links_widget class
  32.  *
  33.  * This widget displays the links from a blog, from the posts with post_type = Link, without using a linkblog.
  34.  *
  35.  * @package evocore
  36.  */
  37. {
  38.     /**
  39.      * Constructor
  40.      */
  41.     function coll_link_list_Widget$db_row NULL )
  42.     {
  43.         // Call parent constructor:
  44.         parent::ComponentWidget$db_row'core''coll_link_list' );
  45.     }
  46.  
  47.  
  48.     /**
  49.      * Get definitions for editable params
  50.      *
  51.      * @see Plugin::GetDefaultSettings()
  52.      * @param local params like 'for_editing' => true
  53.      */
  54.     function get_param_definitions$params )
  55.     {
  56.         // This is derived from coll_post_list_Widget, so we DO NOT ADD ANY param here!
  57.         $r parent::get_param_definitions$params );
  58.         // We only change the defaults and hide some params.
  59.         $r['title']['defaultvalue'T_('Links');
  60.         $r['title_link']['no_edit'true;
  61.         $r['item_type']['no_edit'true;
  62.         $r['follow_mainlist']['no_edit'true;
  63.         $r['blog_ID']['no_edit'true;
  64.         $r['item_title_link_type']['no_edit'true;
  65.         $r['disp_excerpt']['no_edit'true;
  66.         $r['disp_teaser']['no_edit'true;
  67.         $r['disp_teaser_maxwords']['no_edit'true;
  68.         $r['widget_css_class']['no_edit'true;
  69.         $r['widget_ID']['no_edit'true;
  70.  
  71.         return $r;
  72.     }
  73.  
  74.  
  75.     /**
  76.      * Get name of widget
  77.      */
  78.     function get_name()
  79.     {
  80.         return T_('Simple Sidebar Links list');
  81.     }
  82.  
  83.  
  84.     /**
  85.      * Get a very short desc. Used in the widget list.
  86.      */
  87.     function get_short_desc()
  88.     {
  89.         return format_to_output($this->disp_params['title']);
  90.     }
  91.  
  92.  
  93.     /**
  94.      * Get short description
  95.      */
  96.     function get_desc()
  97.     {
  98.         return T_('Simplified Item list for listing Sidebar links.');
  99.     }
  100.  
  101.  
  102.     /**
  103.      * Prepare display params
  104.      *
  105.      * @param array MUST contain at least the basic display params
  106.      */
  107.     function init_display$params )
  108.     {
  109.         // Force some params (because this is a simplified widget):
  110.         $params['item_type''3000';    // Use item types 3000 (sidebar links) only
  111.  
  112.         parent::init_display$params );
  113.     }
  114.  
  115. }
  116.  
  117.  
  118. /*
  119.  * $Log: _coll_link_list.widget.php,v $
  120.  * Revision 1.5  2010/02/08 17:54:48  efy-yury
  121.  * copyright 2009 -> 2010
  122.  *
  123.  * Revision 1.4  2009/12/06 18:07:44  fplanque
  124.  * Fix simplified list widgets.
  125.  *
  126.  * Revision 1.3  2009/09/14 13:54:13  efy-arrin
  127.  * Included the ClassName in load_class() call with proper UpperCase
  128.  *
  129.  * Revision 1.2  2009/09/12 11:11:21  efy-arrin
  130.  * Included the ClassName in the loadclass() with proper UpperCase
  131.  *
  132.  * Revision 1.1  2009/03/20 23:28:31  fplanque
  133.  * renamed coll_link_list widget
  134.  *
  135.  * Revision 1.12  2009/03/15 22:48:16  fplanque
  136.  * refactoring... final step :)
  137.  *
  138.  * Revision 1.11  2009/03/15 02:16:35  fplanque
  139.  * auto link option for titles
  140.  *
  141.  * Revision 1.10  2009/03/14 03:02:56  fplanque
  142.  * Moving towards an universal item list widget, step 1
  143.  *
  144.  * Revision 1.9  2009/03/13 02:32:07  fplanque
  145.  * Cleaned up widgets.
  146.  * Removed stupid widget_name param.
  147.  *
  148.  * Revision 1.8  2009/03/13 00:54:37  fplanque
  149.  * calling it "sidebar links"
  150.  *
  151.  * Revision 1.7  2009/03/08 23:57:46  fplanque
  152.  * 2009
  153.  *
  154.  * Revision 1.6  2009/03/04 00:59:19  fplanque
  155.  * doc
  156.  *
  157.  * Revision 1.5  2009/02/25 17:18:03  waltercruz
  158.  * Linkroll stuff, take #2
  159.  *
  160.  * Revision 1.4  2009/02/22 23:40:09  fplanque
  161.  * dirty links widget :/
  162.  *
  163.  * Revision 1.3  2009/02/22 14:42:03  waltercruz
  164.  * A basic implementation that merges disp_cat_item_list2(links) and disp_cat_item_list(linkblog). Will delete disp_cat_item_list2 as soon fplanque says that the merge it's ok
  165.  *
  166.  * Revision 1.2  2009/02/22 14:15:48  waltercruz
  167.  * updating docs
  168.  *
  169.  * Revision 1.1  2009/01/24 00:29:27  waltercruz
  170.  * Implementing links in the blog itself, not in a linkblog, first attempt
  171.  *
  172.  *
  173.  */
  174. ?>

Documentation generated on Sat, 06 Mar 2010 04:05:00 +0100 by phpDocumentor 1.4.2. This site is hosted and maintained by Daniel HAHLER (Contact).