Merge lp:~quam-plures-core/quam-plures/qp-core-widgets into lp:quam-plures

Proposed by Yabs
Status: Merged
Merged at revision: not available
Proposed branch: lp:~quam-plures-core/quam-plures/qp-core-widgets
Merge into: lp:quam-plures
Diff against target: 3183 lines (+728/-785)
43 files modified
blogs/inc/_core/_class5.funcs.php (+0/-23)
blogs/inc/_core/model/__core.install.php (+1/-1)
blogs/inc/skins/_skin.funcs.php (+2/-4)
blogs/inc/widgets/model/_widget.class.php (+131/-92)
blogs/inc/widgets/model/_widgetcache.class.php (+29/-7)
blogs/inc/widgets/views/_widget_list_available.view.php (+7/-5)
blogs/inc/widgets/widgets.ctrl.php (+11/-4)
blogs/install/_functions_evoupgrade.php (+12/-1)
blogs/install/_functions_install.php (+25/-25)
blogs/plugins/coll_category_list_widget/_coll_category_list.widget.php (+19/-30)
blogs/plugins/coll_comment_list_widget/_coll_comment_list.widget.php (+18/-31)
blogs/plugins/coll_common_links_widget/_coll_common_links.widget.php (+17/-30)
blogs/plugins/coll_item_list_widget/_coll_item_list.widget.php (+45/-54)
blogs/plugins/coll_link_list_widget/_coll_link_list.widget.php (+8/-12)
blogs/plugins/coll_logo_widget/_coll_logo.widget.php (+5/-13)
blogs/plugins/coll_longdesc_widget/_coll_longdesc.widget.php (+5/-36)
blogs/plugins/coll_media_index_widget/_coll_media_index.widget.php (+21/-34)
blogs/plugins/coll_page_list_widget/_coll_page_list.widget.php (+7/-14)
blogs/plugins/coll_post_list_widget/_coll_post_list.widget.php (+7/-14)
blogs/plugins/coll_related_post_list_widget/_coll_related_post_list.widget.php (+7/-14)
blogs/plugins/coll_search_form_widget/_coll_search_form.widget.php (+11/-24)
blogs/plugins/coll_tag_cloud_widget/_coll_tag_cloud.widget.php (+10/-23)
blogs/plugins/coll_tagline_widget/_coll_tagline.widget.php (+6/-13)
blogs/plugins/coll_title_widget/_coll_title.widget.php (+4/-11)
blogs/plugins/coll_xml_feeds_widget/_coll_xml_feeds.widget.php (+11/-24)
blogs/plugins/colls_list_owner_widget/_colls_list_owner.widget.php (+14/-47)
blogs/plugins/colls_list_public_widget/_colls_list_public.widget.php (+15/-48)
blogs/plugins/colls_list_widget/_colls_list.widget.php (+171/-0)
blogs/plugins/free_html_widget/_free_html.widget.php (+8/-20)
blogs/plugins/linkblog_widget/_linkblog.widget.php (+7/-14)
blogs/plugins/menu_link_widget/_menu_link.widget.php (+27/-36)
blogs/plugins/user_tools_widget/_user_tools.widget.php (+24/-38)
blogs/skins/asevo/style.css (+5/-5)
blogs/skins/custom/style.css (+4/-4)
blogs/skins/evocamp/style.css (+2/-2)
blogs/skins/evopress/style.css (+1/-1)
blogs/skins/glossyblue/style.css (+10/-10)
blogs/skins/miami_blue/style.css (+1/-1)
blogs/skins/natural_pink/style.css (+4/-4)
blogs/skins/nifty_corners/style.css (+4/-4)
blogs/skins/pixelgreen/style.css (+3/-3)
blogs/skins/terrafirma/style.css (+1/-1)
blogs/skins/vastitude/style.css (+8/-8)
To merge this branch: bzr merge lp:~quam-plures-core/quam-plures/qp-core-widgets
Reviewer Review Type Date Requested Status
Tilman Blumenbach (community) merge Approve
Review via email: mp+16128@code.launchpad.net

Commit message

Author : Yabs
Reviewer :

Implements blueprint : Remove core widgets from the core

Changes :
Core widgets have been moved to the plugins folder
Trans ability added to widget class
All widgets have localised translation ability
Deprecated Public and Same owner widgets, replaced with Blog List widget

To post a comment you must log in.
Revision history for this message
Yabs (yabs) wrote :

Implemented stage one of changing core widgets

7400. By Yabs

merged trunk

Revision history for this message
Tilman Blumenbach (tblue) wrote :

When trying to upgrade the DB, I got the following error:

> MySQL error!
> Data truncated for column 'wi_type' at row 1(Errno=1265)
> Your query:
> ALTER TABLE evo_widget CHANGE COLUMN wi_type wi_type ENUM('widget', 'plugin') NOT NULL DEFAULT 'widget'

File: blogs/install/_functions_evoupgrade.php on line 2469

There may be more errors, but since I cannot test the changes because of the DB error, I cannot say for sure whether these really exist:
 - You removed the get_name() method from the widgets. I don't know whether you changed it to work through method inheritance, though.
 - You also removed the "Block title" widget setting. If you have managed to keep it working e. g. by letting the base class handle/list this option, that's great! :-)

review: Needs Fixing
7401. By Yabs

correcting installer for conveting core to widget

7402. By Tilman Blumenbach

Optimized WidgetCache::load_widget() by removing the static $loaded_widgets array and relying on PHP to not include widget class files twice (require_once()). Frequent calls to file_exists() should not impact IO performance since PHP uses a stat() cache.

Revision history for this message
Tilman Blumenbach (tblue) wrote :

Looks better now, but there are new problems:
 - Fatal error: Call to undefined method Calendar::T_() in blogs/plugins/calendar_plugin/_calendar.plugin.php on line 486
 - The blog title is not centered anymore (see Blog 1).

review: Needs Fixing
Revision history for this message
Tilman Blumenbach (tblue) wrote :

> Looks better now, but there are new problems:
> - Fatal error: Call to undefined method Calendar::T_() in
> blogs/plugins/calendar_plugin/_calendar.plugin.php on line 486

Oops, that's not your fault. Actually, it's mine -- I overlooked this bug on the last code review.

Revision history for this message
Tilman Blumenbach (tblue) wrote :

The only issue of the above that remains is:
> - The blog title is not centered anymore (see Blog 1).

7403. By Tilman Blumenbach

Rename CSS classes (widget_core_* -> widget_widget_*).

Revision history for this message
Tilman Blumenbach (tblue) wrote :

Seems like everything works now.

review: Approve (merge)
7404. By Tilman Blumenbach

merged trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'blogs/inc/_core/_class5.funcs.php'
2--- blogs/inc/_core/_class5.funcs.php 2009-12-06 09:37:19 +0000
3+++ blogs/inc/_core/_class5.funcs.php 2009-12-21 15:13:15 +0000
4@@ -82,26 +82,6 @@
5 'filecache' => $inc_path.'files/model/_filecache.class.php',
6 'filelist' => $inc_path.'files/model/_filelist.class.php',
7 'fileroot' => $inc_path.'files/model/_fileroot.class.php',
8- 'coll_xml_feeds_widget' => $inc_path.'widgets/widgets/_coll_xml_feeds.widget.php',
9- 'coll_longdesc_widget' => $inc_path.'widgets/widgets/_coll_longdesc.widget.php',
10- 'coll_title_widget' => $inc_path.'widgets/widgets/_coll_title.widget.php',
11- 'menu_link_widget' => $inc_path.'widgets/widgets/_menu_link.widget.php',
12- 'user_tools_widget' => $inc_path.'widgets/widgets/_user_tools.widget.php',
13- 'coll_media_index_widget' => $inc_path.'widgets/widgets/_coll_media_index.widget.php',
14- 'coll_category_list_widget' => $inc_path.'widgets/widgets/_coll_category_list.widget.php',
15- 'coll_common_links_widget' => $inc_path.'widgets/widgets/_coll_common_links.widget.php',
16- 'colls_list_owner_widget' => $inc_path.'widgets/widgets/_colls_list_owner.widget.php',
17- 'coll_post_list_widget' => $inc_path.'widgets/widgets/_coll_post_list.widget.php',
18- 'coll_comment_list_widget' => $inc_path.'widgets/widgets/_coll_comment_list.widget.php',
19- 'coll_search_form_widget' => $inc_path.'widgets/widgets/_coll_search_form.widget.php',
20- 'colls_list_public_widget' => $inc_path.'widgets/widgets/_colls_list_public.widget.php',
21- 'coll_logo_widget' => $inc_path.'widgets/widgets/_coll_logo.widget.php',
22- 'links_widget' => $inc_path.'widgets/widgets/_links.widget.php',
23- 'coll_tagline_widget' => $inc_path.'widgets/widgets/_coll_tagline.widget.php',
24- 'free_html_widget' => $inc_path.'widgets/widgets/_free_html.widget.php',
25- 'coll_page_list_widget' => $inc_path.'widgets/widgets/_coll_page_list.widget.php',
26- 'coll_tag_cloud_widget' => $inc_path.'widgets/widgets/_coll_tag_cloud.widget.php',
27- 'linkblog_widget' => $inc_path.'widgets/widgets/_linkblog.widget.php',
28 'widgetcache' => $inc_path.'widgets/model/_widgetcache.class.php',
29 'componentwidget' => $inc_path.'widgets/model/_widget.class.php',
30 'session' => $inc_path.'sessions/model/_session.class.php',
31@@ -149,10 +129,7 @@
32 'adminui' => $adminskins_path.'/evo/_adminUI.class.php',
33 'adminui' => $adminskins_path.'/legacy/_adminUI.class.php',
34 'adminui' => $adminskins_path.'/chicago/_adminUI.class.php',
35- 'coll_item_list_widget' => $inc_path.'widgets/widgets/_coll_item_list.widget.php',
36 'menu' => $inc_path.'_core/ui/_menu.class.php',
37- 'coll_related_post_list_widget' => $inc_path.'widgets/widgets/_coll_related_post_list.widget.php',
38- 'coll_link_list_widget' => $inc_path.'widgets/widgets/_coll_link_list.widget.php',
39 'rfc822_addresses_class' => $inc_path.'_ext/mime_parser/rfc822_addresses.php',
40 'mime_parser_class' => $inc_path.'_ext/mime_parser/mime_parser.php',
41 /* AUTOGENERATED LIST END */
42
43=== modified file 'blogs/inc/_core/model/__core.install.php'
44--- blogs/inc/_core/model/__core.install.php 2009-12-06 09:37:19 +0000
45+++ blogs/inc/_core/model/__core.install.php 2009-12-21 15:13:15 +0000
46@@ -202,7 +202,7 @@
47 wi_sco_name VARCHAR( 40 ) NOT NULL,
48 wi_order INT(10) NOT NULL,
49 wi_enabled TINYINT(1) NOT NULL DEFAULT 1,
50- wi_type ENUM( 'core', 'plugin' ) NOT NULL DEFAULT 'core',
51+ wi_type ENUM( 'widget', 'plugin' ) NOT NULL DEFAULT 'widget',
52 wi_code VARCHAR(32) NOT NULL,
53 wi_params TEXT NULL,
54 PRIMARY KEY ( wi_ID ),
55
56=== modified file 'blogs/inc/skins/_skin.funcs.php'
57--- blogs/inc/skins/_skin.funcs.php 2009-12-10 02:40:40 +0000
58+++ blogs/inc/skins/_skin.funcs.php 2009-12-21 15:13:15 +0000
59@@ -661,23 +661,21 @@
60 */
61 function skin_widget( $params )
62 {
63- global $inc_path;
64-
65 if( empty( $params['widget'] ) )
66 {
67 echo 'No widget code provided!';
68 return false;
69 }
70
71+ $wiCache = get_Cache('WidgetCache');
72 $widget_code = $params['widget'];
73 unset( $params['widget'] );
74
75- if( ! file_exists( $inc_path.'widgets/widgets/_'.$widget_code.'.widget.php' ) )
76+ if( ! $wiCache->load_widget( $widget_code ) )
77 { // For some reason, that widget doesn't seem to exist... (any more?)
78 echo "Invalid widget code provided [$widget_code]!";
79 return false;
80 }
81- require_once $inc_path.'widgets/widgets/_'.$widget_code.'.widget.php';
82
83 $widget_classname = $widget_code.'_Widget';
84
85
86=== modified file 'blogs/inc/widgets/model/_widget.class.php'
87--- blogs/inc/widgets/model/_widget.class.php 2009-12-06 09:37:19 +0000
88+++ blogs/inc/widgets/model/_widget.class.php 2009-12-21 15:13:15 +0000
89@@ -39,12 +39,15 @@
90 var $sco_name;
91 var $order;
92 /**
93- * @var string Type of the plugin ("core" or "plugin")
94+ * @var string Type of the widget ("widget" or "plugin")
95 */
96 var $type;
97 var $code;
98 var $params;
99
100+ var $widget_name;
101+ var $widget_title;
102+
103 /**
104 * Indicates whether the widget is enabled.
105 *
106@@ -74,11 +77,27 @@
107
108
109 /**
110+ * The translations keyed by locale. They get loaded through include() of _global.php.
111+ * @see ComponentWidget::T_()
112+ * @var array
113+ */
114+ var $_trans = array();
115+
116+ /**
117+ * Has the global /locales/_global.php file (where translation for
118+ * all languages can be put into) been loaded?
119+ *
120+ * @var boolean
121+ */
122+ var $_trans_loaded_global = false;
123+
124+
125+ /**
126 * Constructor
127 *
128 * @param object data row from db
129 */
130- function ComponentWidget( $db_row = NULL, $type = 'core', $code = NULL )
131+ function ComponentWidget( $db_row = NULL, $type = 'widget', $code = NULL )
132 {
133 // Call parent constructor:
134 parent::DataObject( 'T_widget', 'wi_', 'wi_ID' );
135@@ -150,17 +169,36 @@
136 */
137 function get_name()
138 {
139- if( $this->type == 'plugin' )
140- {
141- // Make sure Plugin is loaded:
142- if( $this->get_Plugin() )
143+ if( $this->widget_name )
144+ { // we have a name
145+ $name = $this->widget_name;
146+ }
147+ else
148+ { // we don't have a name
149+ if( $this->type == 'plugin' )
150 {
151- return $this->Plugin->name;
152- }
153- return T_('Inactive / Uninstalled plugin');
154- }
155-
156- return T_('Unknown');
157+ // Make sure Plugin is loaded:
158+ if( $this->get_Plugin() )
159+ {
160+ $name = $this->Plugin->name;
161+ }
162+ else
163+ {
164+ $name = T_('Inactive / Uninstalled plugin');
165+ }
166+ }
167+ else
168+ { // it's a widget
169+ $name = T_('Unknown widget');
170+ }
171+ }
172+
173+ if( $this->disp_params['widget_name'] && $name != $this->disp_params['widget_name'] )
174+ { // user has renamed us
175+ $name .= ' : '.$this->disp_params['widget_name'];
176+ }
177+
178+ return $name;
179 }
180
181
182@@ -228,6 +266,18 @@
183 function get_param_definitions( $params )
184 {
185 $r = array(
186+ 'widget_name' => array(
187+ 'label' => T_( 'Name' ),
188+ 'size' => 20,
189+ 'note' => T_( 'Displayed in the widget list.'),
190+ 'defaultvalue' => $this->widget_name,
191+ ),
192+ 'widget_title' => array(
193+ 'label' => T_( 'Title' ),
194+ 'size' => 20,
195+ 'note' => T_( 'Displayed in your template.'),
196+ 'defaultvalue' => $this->widget_title,
197+ ),
198 'widget_css_class' => array(
199 'label' => '<span class="dimmed">'.T_( 'CSS Class' ).'</span>',
200 'size' => 20,
201@@ -458,7 +508,7 @@
202 {
203 if( is_null($title) )
204 {
205- $title = & $this->disp_params['title'];
206+ $title = $this->disp_params['widget_title'];
207 }
208
209 if( $this->disp_params['block_display_title'] && !empty( $title ) )
210@@ -471,83 +521,6 @@
211
212
213 /**
214- * List of collections/blogs
215- *
216- * @param array MUST contain at least the basic display params
217- */
218- function disp_coll_list( $filter = 'public' )
219- {
220- /**
221- * @var Blog
222- */
223- global $Blog, $baseurl;
224-
225- echo $this->disp_params['block_start'];
226-
227- $this->disp_title();
228-
229- /**
230- * @var BlogCache
231- */
232- $BlogCache = & get_Cache( 'BlogCache' );
233-
234- if( $filter == 'owner' )
235- { // Load blogs of same owner
236- $blog_array = $BlogCache->load_owner_blogs( $Blog->owner_user_ID, 'ID' );
237- }
238- else
239- { // Load all public blogs
240- $blog_array = $BlogCache->load_public( 'ID' );
241- }
242-
243- {
244- echo $this->disp_params['list_start'];
245-
246- foreach( $blog_array as $l_blog_ID )
247- { // Loop through all public blogs:
248-
249- $l_Blog = & $BlogCache->get_by_ID( $l_blog_ID );
250-
251- if( $Blog && $l_blog_ID == $Blog->ID )
252- { // This is the blog being displayed on this page:
253- echo $this->disp_params['item_selected_start'];
254- $link_class = $this->disp_params['link_selected_class'];
255- }
256- else
257- {
258- echo $this->disp_params['item_start'];
259- $link_class = $this->disp_params['link_default_class'];;
260- }
261-
262- echo '<a href="'.$l_Blog->gen_blogurl().'" class="'.$link_class.'" title="'
263- .$l_Blog->dget( 'name', 'htmlattr' ).'">';
264-
265- if( $Blog && $l_blog_ID == $Blog->ID )
266- { // This is the blog being displayed on this page:
267- echo $this->disp_params['item_selected_text_start'];
268- printf( $this->disp_params['item_selected_text'], $l_Blog->dget( 'shortname', 'htmlbody' ) );
269- echo $this->disp_params['item_selected_text_end'];
270- echo '</a>';
271- echo $this->disp_params['item_selected_end'];
272- }
273- else
274- {
275- echo $this->disp_params['item_text_start'];
276- printf( $this->disp_params['item_text'], $l_Blog->dget( 'shortname', 'htmlbody' ) );
277- echo $this->disp_params['item_text_end'];
278- echo '</a>';
279- echo $this->disp_params['item_end'];
280- }
281- }
282-
283- echo $this->disp_params['list_end'];
284- }
285-
286- echo $this->disp_params['block_end'];
287- }
288-
289-
290- /**
291 * Insert object into DB based on previously recorded changes.
292 *
293 * @return boolean true on success
294@@ -577,7 +550,73 @@
295
296 return $res;
297 }
298+
299+
300+ /**
301+ * Translate a given string, in the Widget's context.
302+ *
303+ * This means, that the translation is obtained from the Widget's "locales" folder.
304+ * @link [doclink] Localization#Extensions
305+ *
306+ * It uses the global/regular {@link T_()} function as a fallback.
307+ *
308+ * @param string The string (english), that should be translated
309+ * @param string Requested locale ({@link $current_locale} gets used by default)
310+ * @return string The translated string.
311+ * @uses T_()
312+ */
313+ function T_( $string, $req_locale = '' )
314+ {
315+ if( $this->type == 'plugin' )
316+ { // use plugin translation function
317+ return $this->Plugin->T_( $string, $req_locale );
318+ }
319+
320+ global $plugins_path,$Debuglog;
321+
322+ $globalfile_path = $plugins_path.$this->code.'_widget/locales/_global.php';
323+ $trans = & $this->_trans;
324+
325+ // Load the global messages file, if existing:
326+ if( ! $this->_trans_loaded_global )
327+ {
328+ $this->_trans_loaded_global = true;
329+
330+ if( file_exists( $globalfile_path ) && is_readable( $globalfile_path ) )
331+ {
332+ include_once $globalfile_path;
333+ }
334+ else
335+ {
336+ $Debuglog->add( 'Global messages file '.$globalfile_path.' does not exist or is not readable!', 'locale' );
337+ }
338+ }
339+
340+ if ( ( $return = T_( $string, $req_locale, array(
341+ 'ext_transarray' => & $this->_trans,
342+ 'alt_basedir' => $plugins_path.$this->code.'_widget',
343+ ) ) ) == $string )
344+ { // Fallback to global translation file:
345+ return T_( $string, $req_locale );
346+ }
347+ return $return;
348+ }
349+
350+
351+ /**
352+ * Translate and escape single quotes.
353+ *
354+ * This is to be used mainly for Javascript strings.
355+ *
356+ * @uses ComponentWidget::T_()
357+ *
358+ * @param string String to translate
359+ * @param string Locale to use
360+ * @return string The translated and escaped string.
361+ */
362+ function TS_( $string, $req_locale = '' )
363+ {
364+ return str_replace( "'", "\\'", $this->T_( $string, $req_locale ) );
365+ }
366 }
367-
368-
369 ?>
370
371=== modified file 'blogs/inc/widgets/model/_widgetcache.class.php'
372--- blogs/inc/widgets/model/_widgetcache.class.php 2009-12-06 09:37:19 +0000
373+++ blogs/inc/widgets/model/_widgetcache.class.php 2009-12-21 15:13:15 +0000
374@@ -109,18 +109,16 @@
375 */
376 function & new_obj( $row = NULL )
377 {
378- global $inc_path;
379
380- if( $row->wi_type == 'core' )
381+ if( $row->wi_type == 'widget' )
382 {
383- if( ! file_exists( $inc_path.'widgets/widgets/_'.$row->wi_code.'.widget.php' ) )
384- { // For some reason, that widget doesn't seem to exist... (any more?)
385+ if( !$this->load_widget( $row->wi_code ) )
386+ {
387 // echo "Widget $row->wi_code could not be loaded! ";
388 // TODO: replace with dummy widget in order to give a chance to clean up.
389 $r = NULL;
390 return $r;
391 }
392- require_once $inc_path.'widgets/widgets/_'.$row->wi_code.'.widget.php';
393 $objtype = $row->wi_code.'_Widget';
394 }
395 else
396@@ -136,6 +134,32 @@
397
398
399 /**
400+ * Loads appropriate widget class file.
401+ *
402+ * @param string $wi_code widget to load
403+ * @return boolean Whether the class file could be loaded. Note that this method will return true
404+ * if the file has been included before (there is no way to find out whether require_once()
405+ * really included a file).
406+ */
407+ function load_widget( $wi_code )
408+ {
409+ global $plugins_path, $Debuglog;
410+
411+ // Note: file_exists() should not have a big impact on IO performance since PHP caches the
412+ // results.
413+ if( file_exists( $plugins_path.$wi_code.'_widget/_'.$wi_code.'.widget.php' ) )
414+ { // widget is in its own folder
415+ //$Debuglog->add( 'Loading class: '.$wi_code, 'widgets' );
416+ // require_once makes sure each widget class is only loaded once.
417+ require_once $plugins_path.$wi_code.'_widget/_'.$wi_code.'.widget.php';
418+ return true;
419+ }
420+
421+ return false;
422+ }
423+
424+
425+ /**
426 * @param integer Collection (blog) ID
427 * @param string Container
428 * @return array of Widget
429@@ -148,6 +172,4 @@
430 return $this->cache_container_Widget_array[$coll_ID][$container];
431 }
432 }
433-
434-
435 ?>
436
437=== modified file 'blogs/inc/widgets/views/_widget_list_available.view.php'
438--- blogs/inc/widgets/views/_widget_list_available.view.php 2009-12-06 09:37:19 +0000
439+++ blogs/inc/widgets/views/_widget_list_available.view.php 2009-12-21 15:13:15 +0000
440@@ -44,11 +44,13 @@
441 'coll_tagline',
442 'coll_longdesc',
443 '*'.T_('Other'),
444- 'colls_list_public',
445- 'colls_list_owner',
446+// 'colls_list_public', deprecated use colls_list
447+// 'colls_list_owner', deprecated use colls_list
448+ 'colls_list',
449 'user_tools',
450 );
451 $i = 0;
452+$wiCache = get_Cache( 'WidgetCache');
453 foreach( $core_componentwidget_defs as $code )
454 {
455 $i++;
456@@ -62,12 +64,12 @@
457 }
458 else
459 {
460- load_class( 'widgets/widgets/_'.$code.'.widget.php' );
461+ $wiCache->load_widget( $code );
462 $classname = $code.'_Widget';
463- $ComponentWidget = & new $classname( NULL, 'core', $code );
464+ $ComponentWidget = & new $classname( NULL, 'widget', $code );
465
466 echo '<li>';
467- echo '<a href="'.regenerate_url( '', 'action=create&amp;type=core&amp;code='.$ComponentWidget->code ).'" title="'.T_('Add this widget to the container').'">';
468+ echo '<a href="'.regenerate_url( '', 'action=create&amp;type=widget&amp;code='.$ComponentWidget->code ).'" title="'.T_('Add this widget to the container').'">';
469 echo get_icon( 'new' ).'<strong>'.$ComponentWidget->get_name().'</strong>';
470 echo '</a> <span class="notes">'.$ComponentWidget->get_desc().'</span>';
471 echo '</li>';
472
473=== removed directory 'blogs/inc/widgets/widgets'
474=== modified file 'blogs/inc/widgets/widgets.ctrl.php'
475--- blogs/inc/widgets/widgets.ctrl.php 2009-12-06 09:37:19 +0000
476+++ blogs/inc/widgets/widgets.ctrl.php 2009-12-21 15:13:15 +0000
477@@ -137,11 +137,18 @@
478
479 switch( $type )
480 {
481- case 'core':
482+ case 'widget':
483 // Check the requested core widget is valid:
484- load_class( 'widgets/widgets/_'.$code.'.widget.php' );
485- $objtype = $code.'_Widget';
486- $edited_ComponentWidget = & new $objtype();
487+ $WidgetCache = & get_Cache( 'WidgetCache' );
488+ if( $WidgetCache->load_widget( $code ) )
489+ {
490+ $objtype = $code.'_Widget';
491+ $edited_ComponentWidget = & new $objtype();
492+ }
493+ else
494+ {
495+ debug_die( 'Requested widget not found' );
496+ }
497 break;
498
499 case 'plugin':
500
501=== modified file 'blogs/install/_functions_evoupgrade.php'
502--- blogs/install/_functions_evoupgrade.php 2009-12-06 09:37:19 +0000
503+++ blogs/install/_functions_evoupgrade.php 2009-12-21 15:13:16 +0000
504@@ -1836,7 +1836,7 @@
505 wi_coll_ID INT(11) UNSIGNED NOT NULL,
506 wi_sco_name VARCHAR( 40 ) NOT NULL,
507 wi_order INT(10) UNSIGNED NOT NULL,
508- wi_type ENUM( \'core\', \'plugin\' ) NOT NULL DEFAULT \'core\',
509+ wi_type ENUM( \'widget\', \'plugin\' ) NOT NULL DEFAULT \'widget\',
510 wi_code VARCHAR(32) NOT NULL,
511 wi_params TEXT NULL,
512 PRIMARY KEY ( wi_ID ),
513@@ -2462,6 +2462,17 @@
514 */
515
516
517+ if( $old_db_version < 100000 )
518+ { // 0.0.0
519+ task_begin( 'Updating widgets table...' );
520+ $DB->query( "ALTER TABLE T_widget
521+ CHANGE COLUMN wi_type wi_type ENUM('widget', 'core', 'plugin') NOT NULL DEFAULT 'widget'" );
522+ $DB->query( "UPDATE T_widget SET wi_type='widget' WHERE NOT( wi_type='plugin' )" );
523+ $DB->query( "ALTER TABLE T_widget
524+ CHANGE COLUMN wi_type wi_type ENUM('widget', 'plugin') NOT NULL DEFAULT 'widget'" );
525+ task_end();
526+ }
527+
528 // Just in case, make sure the db schema version is upto date at the end.
529 if( $old_db_version != $new_db_version )
530 { // Update DB schema version to $new_db_version
531
532=== modified file 'blogs/install/_functions_install.php'
533--- blogs/install/_functions_install.php 2009-12-16 13:53:18 +0000
534+++ blogs/install/_functions_install.php 2009-12-21 15:13:16 +0000
535@@ -530,33 +530,33 @@
536
537 // Add blog list to all blog Page Tops:
538 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code )
539- SELECT blog_ID, "Page Top", 1, "core", "colls_list_public"
540+ SELECT blog_ID, "Page Top", 1, "widget", "colls_list_public"
541 FROM T_blogs' );
542
543 // Add title to all blog Headers:
544 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code )
545- SELECT blog_ID, "Header", 1, "core", "coll_title"
546+ SELECT blog_ID, "Header", 1, "widget", "coll_title"
547 FROM T_blogs' );
548 // Add tagline to all blogs Headers:
549 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code )
550- SELECT blog_ID, "Header", 2, "core", "coll_tagline"
551+ SELECT blog_ID, "Header", 2, "widget", "coll_tagline"
552 FROM T_blogs' );
553
554 // Add home link to all blogs Menus:
555 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code, wi_params )
556- SELECT blog_ID, "Menu", 1, "core", "menu_link", "'.$DB->escape(serialize(array('link_type'=>'home'))).'"
557+ SELECT blog_ID, "Menu", 1, "widget", "menu_link", "'.$DB->escape(serialize(array('link_type'=>'home'))).'"
558 FROM T_blogs' );
559 // Add info pages to all blogs Menus:
560 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code )
561- SELECT blog_ID, "Menu", 2, "core", "coll_page_list"
562+ SELECT blog_ID, "Menu", 2, "widget", "coll_page_list"
563 FROM T_blogs' );
564 // Add contact link to all blogs Menus:
565 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code, wi_params )
566- SELECT blog_ID, "Menu", 3, "core", "menu_link", "'.$DB->escape(serialize(array('link_type'=>'ownercontact'))).'"
567+ SELECT blog_ID, "Menu", 3, "widget", "menu_link", "'.$DB->escape(serialize(array('link_type'=>'ownercontact'))).'"
568 FROM T_blogs' );
569 // Add login link to all blogs Menus:
570 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code, wi_params )
571- SELECT blog_ID, "Menu", 4, "core", "menu_link", "'.$DB->escape(serialize(array('link_type'=>'login'))).'"
572+ SELECT blog_ID, "Menu", 4, "widget", "menu_link", "'.$DB->escape(serialize(array('link_type'=>'login'))).'"
573 FROM T_blogs' );
574
575 // Add Calendar plugin to all blog Sidebars except blog A:
576@@ -566,54 +566,54 @@
577 WHERE blog_ID > 1' );
578 // Add title to all blog Sidebars:
579 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code )
580- SELECT blog_ID, "Sidebar", 2, "core", "coll_title"
581+ SELECT blog_ID, "Sidebar", 2, "widget", "coll_title"
582 FROM T_blogs' );
583 // Add longdesc to all blogs Sidebars:
584 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code )
585- SELECT blog_ID, "Sidebar", 3, "core", "coll_longdesc"
586+ SELECT blog_ID, "Sidebar", 3, "widget", "coll_longdesc"
587 FROM T_blogs' );
588 // Add common links to all blogs Sidebars:
589 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code )
590- SELECT blog_ID, "Sidebar", 4, "core", "coll_common_links"
591+ SELECT blog_ID, "Sidebar", 4, "widget", "coll_common_links"
592 FROM T_blogs' );
593 // Add search form to all blogs Sidebars:
594 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code )
595- SELECT blog_ID, "Sidebar", 5, "core", "coll_search_form"
596+ SELECT blog_ID, "Sidebar", 5, "widget", "coll_search_form"
597 FROM T_blogs' );
598 // Add categories list to all blog Sidebars:
599 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code )
600- SELECT blog_ID, "Sidebar", 6, "core", "coll_category_list"
601+ SELECT blog_ID, "Sidebar", 6, "widget", "coll_category_list"
602 FROM T_blogs' );
603 // Add Random photo to blog Sidebars except blog B:
604 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code, wi_params )
605- SELECT blog_ID, "Sidebar", 7, "core", "coll_media_index", \'a:11:{s:5:"title";s:12:"Random photo";s:10:"thumb_size";s:11:"fit-160x120";s:12:"thumb_layout";s:4:"grid";s:12:"grid_nb_cols";s:1:"1";s:5:"limit";s:1:"1";s:8:"order_by";s:4:"RAND";s:9:"order_dir";s:3:"ASC";s:7:"blog_ID";s:1:"4";s:11:"widget_name";s:12:"Random photo";s:16:"widget_css_class";s:0:"";s:9:"widget_ID";s:0:"";}\'
606+ SELECT blog_ID, "Sidebar", 7, "widget", "coll_media_index", \'a:11:{s:5:"title";s:12:"Random photo";s:10:"thumb_size";s:11:"fit-160x120";s:12:"thumb_layout";s:4:"grid";s:12:"grid_nb_cols";s:1:"1";s:5:"limit";s:1:"1";s:8:"order_by";s:4:"RAND";s:9:"order_dir";s:3:"ASC";s:7:"blog_ID";s:1:"4";s:11:"widget_name";s:12:"Random photo";s:16:"widget_css_class";s:0:"";s:9:"widget_ID";s:0:"";}\'
607 FROM T_blogs
608 WHERE blog_ID <> 2' );
609 // Add linkblog to blog Sidebars for blog A & B:
610 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code, wi_params )
611- SELECT blog_ID, "Sidebar", 8, "core", "linkblog", "'.$DB->escape(serialize(array('blog_ID'=>3))).'"
612+ SELECT blog_ID, "Sidebar", 8, "widget", "linkblog", "'.$DB->escape(serialize(array('blog_ID'=>3))).'"
613 FROM T_blogs
614 WHERE blog_ID <= 2' );
615 // Add XML feeds to all blogs Sidebars:
616 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code )
617- SELECT blog_ID, "Sidebar", 9, "core", "coll_xml_feeds"
618+ SELECT blog_ID, "Sidebar", 9, "widget", "coll_xml_feeds"
619 FROM T_blogs' );
620
621 // All blog Sidebar 2:
622 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code )
623- SELECT blog_ID, "Sidebar 2", 1, "core", "coll_post_list"
624+ SELECT blog_ID, "Sidebar 2", 1, "widget", "coll_post_list"
625 FROM T_blogs' );
626
627 $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code )
628- SELECT blog_ID, "Sidebar 2", 2, "core", "coll_comment_list"
629- FROM T_blogs' );
630-
631- $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code, wi_params )
632- SELECT blog_ID, "Sidebar 2", 3, "core", "coll_media_index", \'a:11:{s:5:"title";s:13:"Recent photos";s:10:"thumb_size";s:10:"crop-80x80";s:12:"thumb_layout";s:4:"grid";s:12:"grid_nb_cols";s:1:"3";s:5:"limit";s:1:"9";s:8:"order_by";s:9:"datestart";s:9:"order_dir";s:4:"DESC";s:7:"blog_ID";s:1:"4";s:11:"widget_name";s:11:"Photo index";s:16:"widget_css_class";s:0:"";s:9:"widget_ID";s:0:"";}\'
633- FROM T_blogs' );
634-
635- $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code, wi_params )
636- SELECT blog_ID, "Sidebar 2", 4, "core", "free_html", \'a:5:{s:5:"title";s:9:"Sidebar 2";s:7:"content";s:162:"This is the "Sidebar 2" container. You can place any widget you like in here. In the evo toolbar at the top of this page, select "Customize", then "Blog Widgets".";s:11:"widget_name";s:9:"Free HTML";s:16:"widget_css_class";s:0:"";s:9:"widget_ID";s:0:"";}\'
637+ SELECT blog_ID, "Sidebar 2", 2, "widget", "coll_comment_list"
638+ FROM T_blogs' );
639+
640+ $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code, wi_params )
641+ SELECT blog_ID, "Sidebar 2", 3, "widget", "coll_media_index", \'a:11:{s:5:"title";s:13:"Recent photos";s:10:"thumb_size";s:10:"crop-80x80";s:12:"thumb_layout";s:4:"grid";s:12:"grid_nb_cols";s:1:"3";s:5:"limit";s:1:"9";s:8:"order_by";s:9:"datestart";s:9:"order_dir";s:4:"DESC";s:7:"blog_ID";s:1:"4";s:11:"widget_name";s:11:"Photo index";s:16:"widget_css_class";s:0:"";s:9:"widget_ID";s:0:"";}\'
642+ FROM T_blogs' );
643+
644+ $DB->query( 'INSERT INTO T_widget( wi_coll_ID, wi_sco_name, wi_order, wi_type, wi_code, wi_params )
645+ SELECT blog_ID, "Sidebar 2", 4, "widget", "free_html", \'a:5:{s:5:"title";s:9:"Sidebar 2";s:7:"content";s:162:"This is the "Sidebar 2" container. You can place any widget you like in here. In the evo toolbar at the top of this page, select "Customize", then "Blog Widgets".";s:11:"widget_name";s:9:"Free HTML";s:16:"widget_css_class";s:0:"";s:9:"widget_ID";s:0:"";}\'
646 FROM T_blogs' );
647
648 echo "OK.<br />\n";
649
650=== added directory 'blogs/plugins/coll_category_list_widget'
651=== renamed file 'blogs/inc/widgets/widgets/_coll_category_list.widget.php' => 'blogs/plugins/coll_category_list_widget/_coll_category_list.widget.php'
652--- blogs/inc/widgets/widgets/_coll_category_list.widget.php 2009-12-06 09:37:19 +0000
653+++ blogs/plugins/coll_category_list_widget/_coll_category_list.widget.php 2009-12-21 15:13:16 +0000
654@@ -41,18 +41,13 @@
655 */
656 function coll_category_list_Widget( $db_row = NULL )
657 {
658+ $this->widget_name = $this->T_('Category list');
659+ $this->widget_title = $this->T_('Categories');
660+
661 // Call parent constructor:
662- parent::ComponentWidget( $db_row, 'core', 'coll_category_list' );
663- }
664-
665-
666- /**
667- * Get name of widget
668- */
669- function get_name()
670- {
671- return T_('Category list');
672- }
673+ parent::ComponentWidget( $db_row, 'widget', 'coll_category_list' );
674+ }
675+
676
677
678 /**
679@@ -60,7 +55,7 @@
680 */
681 function get_short_desc()
682 {
683- return format_to_output($this->disp_params['title']);
684+ return format_to_output($this->disp_params['widget_title']);
685 }
686
687
688@@ -69,7 +64,7 @@
689 */
690 function get_desc()
691 {
692- return T_('List of all categories; click filters blog on selected category.');
693+ return $this->T_('List of all categories; click filters blog on selected category.');
694 }
695
696
697@@ -87,30 +82,24 @@
698 function get_param_definitions( $params )
699 {
700 $r = array_merge( array(
701- 'title' => array(
702- 'type' => 'text',
703- 'label' => T_('Block title'),
704- 'defaultvalue' => T_('Categories'),
705- 'maxlength' => 100,
706- ),
707 'option_all' => array(
708 'type' => 'text',
709- 'label' => T_('Option "All"'),
710- 'defaultvalue' => T_('All'),
711+ 'label' => $this->T_('Option "All"'),
712+ 'defaultvalue' => $this->T_('All'),
713 'maxlength' => 100,
714- 'note' => T_('The "All categories" link allows to reset the filter. Leave blank if you want no such option.'),
715+ 'note' => $this->T_('The "All categories" link allows to reset the filter. Leave blank if you want no such option.'),
716 ),
717 'use_form' => array(
718 'type' => 'checkbox',
719- 'label' => T_('Use form'),
720+ 'label' => $this->T_('Use form'),
721 'defaultvalue' => 0,
722- 'note' => T_('Add checkboxes to allow selection of multiple categories.'),
723+ 'note' => $this->T_('Add checkboxes to allow selection of multiple categories.'),
724 ),
725 'disp_names_for_coll_list' => array(
726 'type' => 'checkbox',
727- 'label' => T_('Display blog names'),
728+ 'label' => $this->T_('Display blog names'),
729 'defaultvalue' => 1, /* previous behaviour */
730- 'note' => T_('Display blog names, if this is an aggregated blog.'),
731+ 'note' => $this->T_('Display blog names, if this is an aggregated blog.'),
732 ),
733
734 // Hidden, used by the item list sidebar in the backoffice.
735@@ -254,22 +243,22 @@
736 ?>
737 <div class="tile">
738 <input type="radio" name="cat" value="" id="catANY" class="radio" <?php if( $cat_modifier != '-' && $cat_modifier != '*' ) echo 'checked="checked" '?> />
739- <label for="catANY"><?php echo T_('ANY') ?></label>
740+ <label for="catANY"><?php echo $this->T_('ANY') ?></label>
741 </div>
742 <div class="tile">
743 <input type="radio" name="cat" value="-" id="catANYBUT" class="radio" <?php if( $cat_modifier == '-' ) echo 'checked="checked" '?> />
744- <label for="catANYBUT"><?php echo T_('ANY BUT') ?></label>
745+ <label for="catANYBUT"><?php echo $this->T_('ANY BUT') ?></label>
746 </div>
747 <div class="tile">
748 <input type="radio" name="cat" value="*" id="catALL" class="radio" <?php if( $cat_modifier == '*' ) echo 'checked="checked" '?> />
749- <label for="catALL"><?php echo T_('ALL') ?></label>
750+ <label for="catALL"><?php echo $this->T_('ALL') ?></label>
751 </div>
752 <?php
753 if( $this->disp_params['use_form'] )
754 { // We want a complete form:
755 ?>
756 <div class="tile">
757- <input type="submit" value="<?php echo T_( 'Filter categories' ); ?>" />
758+ <input type="submit" value="<?php echo $this->T_( 'Filter categories' ); ?>" />
759 </div>
760 </form>
761 <?php
762
763=== added directory 'blogs/plugins/coll_comment_list_widget'
764=== renamed file 'blogs/inc/widgets/widgets/_coll_comment_list.widget.php' => 'blogs/plugins/coll_comment_list_widget/_coll_comment_list.widget.php'
765--- blogs/inc/widgets/widgets/_coll_comment_list.widget.php 2009-12-06 09:37:19 +0000
766+++ blogs/plugins/coll_comment_list_widget/_coll_comment_list.widget.php 2009-12-21 15:13:16 +0000
767@@ -40,8 +40,10 @@
768 */
769 function coll_comment_list_Widget( $db_row = NULL )
770 {
771+ $this->widget_name = $this->T_('Comment list');
772+ $this->widget_title = $this->T_('Recent comments');
773 // Call parent constructor:
774- parent::ComponentWidget( $db_row, 'core', 'coll_comment_list' );
775+ parent::ComponentWidget( $db_row, 'widget', 'coll_comment_list' );
776 }
777
778
779@@ -54,41 +56,35 @@
780 function get_param_definitions( $params )
781 {
782 $r = array_merge( array(
783- 'title' => array(
784- 'label' => T_('Block title'),
785- 'note' => T_( 'Title to display in your skin.' ),
786- 'size' => 40,
787- 'defaultvalue' => T_('Recent comments'),
788- ),
789 'disp_order' => array(
790- 'label' => T_('Order'),
791- 'note' => T_('Order to display items'),
792+ 'label' => $this->T_('Order'),
793+ 'note' => $this->T_('Order to display items'),
794 'type' => 'select',
795- 'options' => array( 'DESC' => T_( 'Newest to oldest' ), 'ASC' => T_( 'Oldest to newest' ), 'RAND' => T_( 'Random selection' ) ),
796+ 'options' => array( 'DESC' => $this->T_( 'Newest to oldest' ), 'ASC' => $this->T_( 'Oldest to newest' ), 'RAND' => $this->T_( 'Random selection' ) ),
797 'defaultvalue' => 'DESC',
798 ),
799 'limit' => array(
800- 'label' => T_( 'Max items' ),
801- 'note' => T_( 'Maximum number of items to display.' ),
802+ 'label' => $this->T_( 'Max items' ),
803+ 'note' => $this->T_( 'Maximum number of items to display.' ),
804 'size' => 4,
805 'defaultvalue' => 20,
806 ),
807 'author_links' => array(
808- 'label' => T_( 'Link to author'),
809- 'note' => T_( 'Link the author to their url' ),
810+ 'label' => $this->T_( 'Link to author'),
811+ 'note' => $this->T_( 'Link the author to their url' ),
812 'defaultvalue' => true,
813 'type' => 'checkbox',
814 ),
815 'hover_text' => array(
816- 'label' => T_( 'Hover text'),
817- 'note' => T_( 'Text to show when hovering over the link' ),
818+ 'label' => $this->T_( 'Hover text'),
819+ 'note' => $this->T_( 'Text to show when hovering over the link' ),
820 'size' => 40,
821- 'defaultvalue' => T_( 'Read the full comment' ),
822+ 'defaultvalue' => $this->T_( 'Read the full comment' ),
823 'type' => 'text',
824 ),
825 'blog_ID' => array(
826- 'label' => T_( 'Blog' ),
827- 'note' => T_( 'ID of the blog to use, leave empty for the current blog.' ),
828+ 'label' => $this->T_( 'Blog' ),
829+ 'note' => $this->T_( 'ID of the blog to use, leave empty for the current blog.' ),
830 'size' => 4,
831 ),
832 ), parent::get_param_definitions( $params ) );
833@@ -98,20 +94,11 @@
834
835
836 /**
837- * Get name of widget
838- */
839- function get_name()
840- {
841- return T_('Comment list');
842- }
843-
844-
845- /**
846 * Get a very short desc. Used in the widget list.
847 */
848 function get_short_desc()
849 {
850- return format_to_output($this->disp_params['title']);
851+ return format_to_output($this->disp_params['widget_title']);
852 }
853
854
855@@ -120,7 +107,7 @@
856 */
857 function get_desc()
858 {
859- return T_('List of comments; click goes to comment.');
860+ return $this->T_('List of comments; click goes to comment.');
861 }
862
863
864@@ -161,7 +148,7 @@
865 $Comment->get_Item();
866 echo $this->disp_params[ 'item_start' ];
867 $Comment->author( '', ' ', '', ' ', 'htmlbody', $this->disp_params[ 'author_links' ] );
868- echo T_( 'on ' );
869+ echo $this->T_( 'on ' );
870 $Comment->permanent_link( array(
871 'text' => $Comment->Item->title,
872 'title' => $this->disp_params[ 'hover_text' ],
873
874=== added directory 'blogs/plugins/coll_common_links_widget'
875=== renamed file 'blogs/inc/widgets/widgets/_coll_common_links.widget.php' => 'blogs/plugins/coll_common_links_widget/_coll_common_links.widget.php'
876--- blogs/inc/widgets/widgets/_coll_common_links.widget.php 2009-12-06 09:37:19 +0000
877+++ blogs/plugins/coll_common_links_widget/_coll_common_links.widget.php 2009-12-21 15:13:16 +0000
878@@ -43,17 +43,10 @@
879 */
880 function coll_common_links_Widget( $db_row = NULL )
881 {
882+ $this->widget_name = $this->T_('Common Navigation Links');
883+ $this->widget_title = '';
884 // Call parent constructor:
885- parent::ComponentWidget( $db_row, 'core', 'coll_common_links' );
886- }
887-
888-
889- /**
890- * Get name of widget
891- */
892- function get_name()
893- {
894- return T_('Common Navigation Links');
895+ parent::ComponentWidget( $db_row, 'widget', 'coll_common_links' );
896 }
897
898
899@@ -62,7 +55,7 @@
900 */
901 function get_short_desc()
902 {
903- return format_to_output($this->disp_params['title']);
904+ return format_to_output($this->disp_params['widget_title']);
905 }
906
907
908@@ -71,7 +64,7 @@
909 */
910 function get_desc()
911 {
912- return T_('Display these links: Recently, Archives, Categories, Latest Comments');
913+ return $this->T_('Display these links: Recently, Archives, Categories, Latest Comments');
914 }
915
916
917@@ -84,34 +77,28 @@
918 function get_param_definitions( $params )
919 {
920 $r = array_merge( array(
921- 'title' => array(
922- 'label' => T_('Block title'),
923- 'note' => T_( 'Title to display in your skin.' ),
924- 'size' => 40,
925- 'defaultvalue' => '',
926- ),
927 'show_recently' => array(
928 'type' => 'checkbox',
929- 'label' => T_('Show "Recently"'),
930- 'note' => T_('Go to the most recent posts / the blog\'s home.'),
931+ 'label' => $this->T_('Show "Recently"'),
932+ 'note' => $this->T_('Go to the most recent posts / the blog\'s home.'),
933 'defaultvalue' => '1',
934 ),
935 'show_archives' => array(
936 'type' => 'checkbox',
937- 'label' => T_('Show "Archives"'),
938- 'note' => T_('Go to the monthly/weekly/daily archive list.'),
939+ 'label' => $this->T_('Show "Archives"'),
940+ 'note' => $this->T_('Go to the monthly/weekly/daily archive list.'),
941 'defaultvalue' => '1',
942 ),
943 'show_categories' => array(
944 'type' => 'checkbox',
945- 'label' => T_('Show "Categories"'),
946- 'note' => T_('Go to the category tree.'),
947+ 'label' => $this->T_('Show "Categories"'),
948+ 'note' => $this->T_('Go to the category tree.'),
949 'defaultvalue' => '1',
950 ),
951 'show_latestcomments' => array(
952 'type' => 'checkbox',
953- 'label' => T_('Show "Latest comments"'),
954- 'note' => T_('Go to the latest comments.'),
955+ 'label' => $this->T_('Show "Latest comments"'),
956+ 'note' => $this->T_('Go to the latest comments.'),
957 'defaultvalue' => '1',
958 ),
959 ), parent::get_param_definitions( $params ) );
960@@ -143,7 +130,7 @@
961 if( $this->disp_params['show_recently'] )
962 {
963 echo $this->disp_params['item_start'];
964- echo '<strong><a href="'.$Blog->get('url').'">'.T_('Recently').'</a></strong>';
965+ echo '<strong><a href="'.$Blog->get('url').'">'.$this->T_('Recently').'</a></strong>';
966 echo $this->disp_params['item_end'];
967 }
968
969@@ -151,7 +138,7 @@
970 {
971 // fp> TODO: don't display this if archives plugin not installed... or depluginize archives (I'm not sure)
972 echo $this->disp_params['item_start'];
973- echo '<strong><a href="'.$Blog->get('arcdirurl').'">'.T_('Archives').'</a></strong>';
974+ echo '<strong><a href="'.$Blog->get('arcdirurl').'">'.$this->T_('Archives').'</a></strong>';
975 echo $this->disp_params['item_end'];
976 }
977
978@@ -159,14 +146,14 @@
979 {
980 // fp> TODO: don't display this if categories plugin not installed... or depluginize categories (I'm not sure)
981 echo $this->disp_params['item_start'];
982- echo '<strong><a href="'.$Blog->get('catdirurl').'">'.T_('Categories').'</a></strong>';
983+ echo '<strong><a href="'.$Blog->get('catdirurl').'">'.$this->T_('Categories').'</a></strong>';
984 echo $this->disp_params['item_end'];
985 }
986
987 if( $this->disp_params['show_latestcomments'] )
988 {
989 echo $this->disp_params['item_start'];
990- echo '<strong><a href="'.$Blog->get('lastcommentsurl').'">'.T_('Latest comments').'</a></strong>';
991+ echo '<strong><a href="'.$Blog->get('lastcommentsurl').'">'.$this->T_('Latest comments').'</a></strong>';
992 echo $this->disp_params['item_end'];
993 }
994
995
996=== added directory 'blogs/plugins/coll_item_list_widget'
997=== renamed file 'blogs/inc/widgets/widgets/_coll_item_list.widget.php' => 'blogs/plugins/coll_item_list_widget/_coll_item_list.widget.php'
998--- blogs/inc/widgets/widgets/_coll_item_list.widget.php 2009-12-06 09:37:19 +0000
999+++ blogs/plugins/coll_item_list_widget/_coll_item_list.widget.php 2009-12-21 15:13:16 +0000
1000@@ -39,8 +39,14 @@
1001 */
1002 function coll_item_list_Widget( $db_row = NULL )
1003 {
1004+ if( empty( $this->widget_name ) && empty( $this->widget_title ) )
1005+ { // this widget gets extended by others :-S
1006+ $this->widget_name = $this->T_('Universal Item list');
1007+ $this->widget_title = $this->T_('Items');
1008+ }
1009+
1010 // Call parent constructor:
1011- parent::ComponentWidget( $db_row, 'core', 'coll_item_list' );
1012+ parent::ComponentWidget( $db_row, 'widget', 'coll_item_list' );
1013 }
1014
1015
1016@@ -58,98 +64,92 @@
1017 $ItemTypeCache = & get_Cache( 'ItemTypeCache' );
1018
1019 $item_type_options = array(
1020- '#' => T_('Default'),
1021- '' => T_('All'),
1022+ '#' => $this->T_('Default'),
1023+ '' => $this->T_('All'),
1024 ) + $ItemTypeCache->get_option_array();
1025
1026 $r = array_merge( array(
1027- 'title' => array(
1028- 'label' => T_('Block title'),
1029- 'note' => T_('Title to display in your skin.'),
1030- 'size' => 60,
1031- 'defaultvalue' => T_('Items'),
1032- ),
1033 'title_link' => array(
1034- 'label' => T_('Link to blog'),
1035- 'note' => T_('Link the block title to the blog?'),
1036+ 'label' => $this->T_('Link to blog'),
1037+ 'note' => $this->T_('Link the block title to the blog?'),
1038 'type' => 'checkbox',
1039 'defaultvalue' => false,
1040 ),
1041 'item_type' => array(
1042- 'label' => T_('Item type'),
1043- 'note' => T_('What kind of items do you want to list?'),
1044+ 'label' => $this->T_('Item type'),
1045+ 'note' => $this->T_('What kind of items do you want to list?'),
1046 'type' => 'select',
1047 'options' => $item_type_options,
1048 'defaultvalue' => '#',
1049 ),
1050 'follow_mainlist' => array(
1051- 'label' => T_('Follow Main List'),
1052- 'note' => T_('Do you want to restrict to contents related to what is displayed in the main area?'),
1053+ 'label' => $this->T_('Follow Main List'),
1054+ 'note' => $this->T_('Do you want to restrict to contents related to what is displayed in the main area?'),
1055 'type' => 'select', // should be a radio button set
1056- 'options' => array( 'no' => T_('No'), 'tags' => T_('By tags') ), // may be extended
1057+ 'options' => array( 'no' => $this->T_('No'), 'tags' => $this->T_('By tags') ), // may be extended
1058 'defaultvalue' => 'none',
1059 ),
1060 'blog_ID' => array(
1061- 'label' => T_( 'Blog' ),
1062- 'note' => T_( 'ID of the blog to use, leave empty for the current blog.' ),
1063+ 'label' => $this->T_( 'Blog' ),
1064+ 'note' => $this->T_( 'ID of the blog to use, leave empty for the current blog.' ),
1065 'size' => 4,
1066 ),
1067 'item_group_by' => array(
1068- 'label' => T_('Group by'),
1069- 'note' => T_('Do you want to group the Items?'),
1070+ 'label' => $this->T_('Group by'),
1071+ 'note' => $this->T_('Do you want to group the Items?'),
1072 'type' => 'select', // should be a radio button set
1073- 'options' => array( 'none' => T_('None'), 'chapter' => T_('By category/chapter') ),
1074+ 'options' => array( 'none' => $this->T_('None'), 'chapter' => $this->T_('By category/chapter') ),
1075 'defaultvalue' => 'none',
1076 ),
1077 'order_by' => array(
1078- 'label' => T_('Order by'),
1079- 'note' => T_('How to sort the items'),
1080+ 'label' => $this->T_('Order by'),
1081+ 'note' => $this->T_('How to sort the items'),
1082 'type' => 'select',
1083 'options' => get_available_sort_options(),
1084 'defaultvalue' => 'datestart',
1085 ),
1086 'order_dir' => array(
1087- 'label' => T_('Direction'),
1088- 'note' => T_('How to sort the items'),
1089+ 'label' => $this->T_('Direction'),
1090+ 'note' => $this->T_('How to sort the items'),
1091 'type' => 'select', // should be a radio button set
1092- 'options' => array( 'ASC' => T_('Ascending'), 'DESC' => T_('Descending') ),
1093+ 'options' => array( 'ASC' => $this->T_('Ascending'), 'DESC' => $this->T_('Descending') ),
1094 'defaultvalue' => 'DESC',
1095 ),
1096 'limit' => array(
1097- 'label' => T_( 'Max items' ),
1098- 'note' => T_( 'Maximum number of items to display.' ),
1099+ 'label' => $this->T_( 'Max items' ),
1100+ 'note' => $this->T_( 'Maximum number of items to display.' ),
1101 'size' => 4,
1102 'defaultvalue' => 20,
1103 ),
1104 'item_title_link_type' => array(
1105- 'label' => T_('Link titles'),
1106- 'note' => T_('Where should titles be linked to?'),
1107+ 'label' => $this->T_('Link titles'),
1108+ 'note' => $this->T_('Where should titles be linked to?'),
1109 'type' => 'select',
1110 'options' => array(
1111- 'auto' => T_('Automatic'),
1112- 'permalink' => T_('Item permalink'),
1113- 'linkto_url' => T_('Item URL'),
1114- 'none' => T_('Nowhere'),
1115+ 'auto' => $this->T_('Automatic'),
1116+ 'permalink' => $this->T_('Item permalink'),
1117+ 'linkto_url' => $this->T_('Item URL'),
1118+ 'none' => $this->T_('Nowhere'),
1119 ),
1120 'defaultvalue' => 'auto',
1121 ),
1122 'disp_excerpt' => array(
1123- 'label' => T_( 'Excerpt' ),
1124- 'note' => T_( 'Display excerpt for each item.' ),
1125+ 'label' => $this->T_( 'Excerpt' ),
1126+ 'note' => $this->T_( 'Display excerpt for each item.' ),
1127 'type' => 'checkbox',
1128 'defaultvalue' => false,
1129 ),
1130 'disp_teaser' => array(
1131- 'label' => T_( 'Content teaser' ),
1132+ 'label' => $this->T_( 'Content teaser' ),
1133 'type' => 'checkbox',
1134 'defaultvalue' => false,
1135- 'note' => T_( 'Display content teaser for each item.' ),
1136+ 'note' => $this->T_( 'Display content teaser for each item.' ),
1137 ),
1138 'disp_teaser_maxwords' => array(
1139- 'label' => T_( 'Max Words' ),
1140+ 'label' => $this->T_( 'Max Words' ),
1141 'type' => 'integer',
1142 'defaultvalue' => 20,
1143- 'note' => T_( 'Max number of words for the teasers.' ),
1144+ 'note' => $this->T_( 'Max number of words for the teasers.' ),
1145 ),
1146 ), parent::get_param_definitions( $params ) );
1147
1148@@ -160,20 +160,11 @@
1149
1150
1151 /**
1152- * Get name of widget
1153- */
1154- function get_name()
1155- {
1156- return T_('Universal Item list');
1157- }
1158-
1159-
1160- /**
1161 * Get a very short desc. Used in the widget list.
1162 */
1163 function get_short_desc()
1164 {
1165- return format_to_output($this->disp_params['title']);
1166+ return format_to_output($this->disp_params['widget_title']);
1167 }
1168
1169
1170@@ -182,7 +173,7 @@
1171 */
1172 function get_desc()
1173 {
1174- return T_('Can list Items (Posts/Pages/Links...) in a variety of ways.');
1175+ return $this->T_('Can list Items (Posts/Pages/Links...) in a variety of ways.');
1176 }
1177
1178
1179@@ -207,7 +198,7 @@
1180 if( empty($listBlog) )
1181 {
1182 echo $this->disp_params['block_start'];
1183- echo T_('The requested Blog doesn\'t exist any more!');
1184+ echo $this->T_('The requested Blog doesn\'t exist any more!');
1185 echo $this->disp_params['block_end'];
1186 return;
1187 }
1188@@ -294,7 +285,7 @@
1189
1190 echo $this->disp_params['block_start'];
1191
1192- $title = sprintf( ( $this->disp_params[ 'title_link' ] ? '<a href="'.$listBlog->gen_blogurl().'" rel="nofollow">%s</a>' : '%s' ), $this->disp_params[ 'title' ] );
1193+ $title = sprintf( ( $this->disp_params[ 'title_link' ] ? '<a href="'.$listBlog->gen_blogurl().'" rel="nofollow">%s</a>' : '%s' ), $this->disp_params[ 'widget_title' ] );
1194 $this->disp_title( $title );
1195
1196 echo $this->disp_params['list_start'];
1197@@ -378,7 +369,7 @@
1198 $Item->more_link( array(
1199 'before' => '',
1200 'after' => '',
1201- 'link_text' => T_('more').' &raquo;',
1202+ 'link_text' => $this->T_('more').' &raquo;',
1203 ) );
1204 */
1205 }
1206
1207=== added directory 'blogs/plugins/coll_link_list_widget'
1208=== renamed file 'blogs/inc/widgets/widgets/_coll_link_list.widget.php' => 'blogs/plugins/coll_link_list_widget/_coll_link_list.widget.php'
1209--- blogs/inc/widgets/widgets/_coll_link_list.widget.php 2009-12-06 09:37:19 +0000
1210+++ blogs/plugins/coll_link_list_widget/_coll_link_list.widget.php 2009-12-21 15:13:16 +0000
1211@@ -23,7 +23,8 @@
1212 */
1213 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
1214
1215-load_class( 'widgets/widgets/_coll_item_list.widget.php' );
1216+$wiCache = get_Cache('WidgetCache');
1217+$wiCache->load_widget( 'coll_item_list' );
1218
1219 /**
1220 * links_widget class
1221@@ -39,8 +40,11 @@
1222 */
1223 function coll_link_list_Widget( $db_row = NULL )
1224 {
1225+ $this->widget_name = $this->T_('Simple Sidebar Links list');
1226+ $this->widget_title = $this->T_('Links');
1227+
1228 // Call parent constructor:
1229- parent::ComponentWidget( $db_row, 'core', 'coll_link_list' );
1230+ parent::ComponentWidget( $db_row, 'widget', 'coll_link_list' );
1231 }
1232
1233
1234@@ -55,7 +59,6 @@
1235 // This is derived from coll_post_list_Widget, so we DO NOT ADD ANY param here!
1236 $r = parent::get_param_definitions( $params );
1237 // We only change the defaults and hide some params.
1238- $r['title']['defaultvalue'] = T_('Links');
1239 $r['title_link']['no_edit'] = true;
1240 $r['item_type']['no_edit'] = true;
1241 $r['follow_mainlist']['no_edit'] = true;
1242@@ -71,13 +74,6 @@
1243 }
1244
1245
1246- /**
1247- * Get name of widget
1248- */
1249- function get_name()
1250- {
1251- return T_('Simple Sidebar Links list');
1252- }
1253
1254
1255 /**
1256@@ -85,7 +81,7 @@
1257 */
1258 function get_short_desc()
1259 {
1260- return format_to_output($this->disp_params['title']);
1261+ return format_to_output($this->disp_params['widget_title']);
1262 }
1263
1264
1265@@ -94,7 +90,7 @@
1266 */
1267 function get_desc()
1268 {
1269- return T_('Simplified Item list for listing Sidebar links.');
1270+ return $this->T_('Simplified Item list for listing Sidebar links.');
1271 }
1272
1273
1274
1275=== added directory 'blogs/plugins/coll_logo_widget'
1276=== renamed file 'blogs/inc/widgets/widgets/_coll_logo.widget.php' => 'blogs/plugins/coll_logo_widget/_coll_logo.widget.php'
1277--- blogs/inc/widgets/widgets/_coll_logo.widget.php 2009-12-06 09:37:19 +0000
1278+++ blogs/plugins/coll_logo_widget/_coll_logo.widget.php 2009-12-21 15:13:16 +0000
1279@@ -39,17 +39,9 @@
1280 */
1281 function coll_logo_Widget( $db_row = NULL )
1282 {
1283+ $this->widget_name = $this->T_('Image / Blog logo');
1284 // Call parent constructor:
1285- parent::ComponentWidget( $db_row, 'core', 'coll_logo' );
1286- }
1287-
1288-
1289- /**
1290- * Get name of widget
1291- */
1292- function get_name()
1293- {
1294- return T_('Image / Blog logo');
1295+ parent::ComponentWidget( $db_row, 'widget', 'coll_logo' );
1296 }
1297
1298
1299@@ -77,7 +69,7 @@
1300 */
1301 function get_desc()
1302 {
1303- return T_('Include an image/logo from the blog\'s file root.');
1304+ return $this->T_('Include an image/logo from the blog\'s file root.');
1305 }
1306
1307
1308@@ -91,8 +83,8 @@
1309 {
1310 $r = array_merge( array(
1311 'logo_file' => array(
1312- 'label' => T_('Image filename'),
1313- 'note' => T_('The image/logo file must be uploaded to the root of the Blog\'s media dir'),
1314+ 'label' => $this->T_('Image filename'),
1315+ 'note' => $this->T_('The image/logo file must be uploaded to the root of the Blog\'s media dir'),
1316 'defaultvalue' => 'logo.png',
1317 'valid_pattern' => array( 'pattern'=>'¤^[a-z0-9_\-][a-z0-9_.\-]*$¤i',
1318 'error'=>T_('Invalid filename.') ),
1319
1320=== added directory 'blogs/plugins/coll_longdesc_widget'
1321=== renamed file 'blogs/inc/widgets/widgets/_coll_longdesc.widget.php' => 'blogs/plugins/coll_longdesc_widget/_coll_longdesc.widget.php'
1322--- blogs/inc/widgets/widgets/_coll_longdesc.widget.php 2009-12-06 09:37:19 +0000
1323+++ blogs/plugins/coll_longdesc_widget/_coll_longdesc.widget.php 2009-12-21 15:13:16 +0000
1324@@ -39,17 +39,10 @@
1325 */
1326 function coll_longdesc_Widget( $db_row = NULL )
1327 {
1328+ $this->widget_name = $this->T_('Long Description of this Blog');
1329+ $this->widget_title = '';
1330 // Call parent constructor:
1331- parent::ComponentWidget( $db_row, 'core', 'coll_longdesc' );
1332- }
1333-
1334-
1335- /**
1336- * Get name of widget
1337- */
1338- function get_name()
1339- {
1340- return T_('Long Description of this Blog');
1341+ parent::ComponentWidget( $db_row, 'widget', 'coll_longdesc' );
1342 }
1343
1344
1345@@ -58,7 +51,7 @@
1346 */
1347 function get_short_desc()
1348 {
1349- return format_to_output($this->disp_params['title']);
1350+ return format_to_output($this->disp_params['widget_title']);
1351 }
1352
1353
1354@@ -68,33 +61,11 @@
1355 function get_desc()
1356 {
1357 global $Blog;
1358- return sprintf( T_('Long description from the blog\'s <a %s>general settings</a>.'),
1359+ return sprintf( $this->T_('Long description from the blog\'s <a %s>general settings</a>.'),
1360 'href="?ctrl=coll_settings&tab=general&blog='.$Blog->ID.'"' );
1361 }
1362
1363
1364- /**
1365- * Get definitions for editable params
1366- *
1367- * @see Plugin::GetDefaultSettings()
1368- * @param local params like 'for_editing' => true
1369- */
1370- function get_param_definitions( $params )
1371- {
1372- $r = array_merge( array(
1373- 'title' => array(
1374- 'label' => T_('Block title'),
1375- 'note' => T_( 'Title to display in your skin.' ),
1376- 'size' => 40,
1377- 'defaultvalue' => '',
1378- ),
1379-
1380- ), parent::get_param_definitions( $params ) );
1381-
1382- return $r;
1383- }
1384-
1385-
1386 /**
1387 * Display the widget!
1388 *
1389@@ -119,6 +90,4 @@
1390 return true;
1391 }
1392 }
1393-
1394-
1395 ?>
1396\ No newline at end of file
1397
1398=== added directory 'blogs/plugins/coll_media_index_widget'
1399=== renamed file 'blogs/inc/widgets/widgets/_coll_media_index.widget.php' => 'blogs/plugins/coll_media_index_widget/_coll_media_index.widget.php'
1400--- blogs/inc/widgets/widgets/_coll_media_index.widget.php 2009-12-06 09:37:19 +0000
1401+++ blogs/plugins/coll_media_index_widget/_coll_media_index.widget.php 2009-12-21 15:13:16 +0000
1402@@ -40,8 +40,10 @@
1403 */
1404 function coll_media_index_Widget( $db_row = NULL )
1405 {
1406+ $this->widget_name = $this->T_('Photo index');
1407+ $this->widget_title = $this->T_('Recent photos');
1408 // Call parent constructor:
1409- parent::ComponentWidget( $db_row, 'core', 'coll_media_index' );
1410+ parent::ComponentWidget( $db_row, 'widget', 'coll_media_index' );
1411 }
1412
1413
1414@@ -56,55 +58,49 @@
1415 load_funcs( 'files/model/_image.funcs.php' );
1416
1417 $r = array_merge( array(
1418- 'title' => array(
1419- 'label' => T_('Block title'),
1420- 'note' => T_( 'Title to display in your skin.' ),
1421- 'size' => 40,
1422- 'defaultvalue' => T_('Recent photos'),
1423- ),
1424 'thumb_size' => array(
1425- 'label' => T_('Thumbnail size'),
1426- 'note' => T_('Cropping and sizing of thumbnails'),
1427+ 'label' => $this->T_('Thumbnail size'),
1428+ 'note' => $this->T_('Cropping and sizing of thumbnails'),
1429 'type' => 'select',
1430 'options' => get_available_thumb_sizes(),
1431 'defaultvalue' => 'crop-80x80',
1432 ),
1433 'thumb_layout' => array(
1434- 'label' => T_('Layout'),
1435- 'note' => T_('How to lay out the thumbnails'),
1436+ 'label' => $this->T_('Layout'),
1437+ 'note' => $this->T_('How to lay out the thumbnails'),
1438 'type' => 'select',
1439- 'options' => array( 'grid' => T_( 'Grid' ), 'list' => T_( 'List' ) ),
1440+ 'options' => array( 'grid' => $this->T_( 'Grid' ), 'list' => $this->T_( 'List' ) ),
1441 'defaultvalue' => 'grid',
1442 ),
1443 'grid_nb_cols' => array(
1444- 'label' => T_( 'Columns' ),
1445- 'note' => T_( 'Number of columns in grid mode.' ),
1446+ 'label' => $this->T_( 'Columns' ),
1447+ 'note' => $this->T_( 'Number of columns in grid mode.' ),
1448 'size' => 4,
1449 'defaultvalue' => 2,
1450 ),
1451 'limit' => array(
1452- 'label' => T_( 'Max items' ),
1453- 'note' => T_( 'Maximum number of items to display.' ),
1454+ 'label' => $this->T_( 'Max items' ),
1455+ 'note' => $this->T_( 'Maximum number of items to display.' ),
1456 'size' => 4,
1457 'defaultvalue' => 3,
1458 ),
1459 'order_by' => array(
1460- 'label' => T_('Order by'),
1461- 'note' => T_('How to sort the items'),
1462+ 'label' => $this->T_('Order by'),
1463+ 'note' => $this->T_('How to sort the items'),
1464 'type' => 'select',
1465 'options' => get_available_sort_options(),
1466 'defaultvalue' => 'datestart',
1467 ),
1468 'order_dir' => array(
1469- 'label' => T_('Direction'),
1470- 'note' => T_('How to sort the items'),
1471+ 'label' => $this->T_('Direction'),
1472+ 'note' => $this->T_('How to sort the items'),
1473 'type' => 'select',
1474- 'options' => array( 'ASC' => T_('Ascending'), 'DESC' => T_('Descending') ),
1475+ 'options' => array( 'ASC' => $this->T_('Ascending'), 'DESC' => $this->T_('Descending') ),
1476 'defaultvalue' => 'DESC',
1477 ),
1478 'blog_ID' => array(
1479- 'label' => T_( 'Blogs' ),
1480- 'note' => T_( 'IDs of the blogs to use, leave empty for the current blog. Separate multiple blogs by commas.' ),
1481+ 'label' => $this->T_( 'Blogs' ),
1482+ 'note' => $this->T_( 'IDs of the blogs to use, leave empty for the current blog. Separate multiple blogs by commas.' ),
1483 'size' => 4,
1484 ),
1485 ), parent::get_param_definitions( $params ) );
1486@@ -114,20 +110,11 @@
1487
1488
1489 /**
1490- * Get name of widget
1491- */
1492- function get_name()
1493- {
1494- return T_('Photo index');
1495- }
1496-
1497-
1498- /**
1499 * Get a very short desc. Used in the widget list.
1500 */
1501 function get_short_desc()
1502 {
1503- return format_to_output($this->disp_params['title']);
1504+ return format_to_output($this->disp_params['widget_title']);
1505 }
1506
1507
1508@@ -136,7 +123,7 @@
1509 */
1510 function get_desc()
1511 {
1512- return T_('Index of photos; click goes to original image post.');
1513+ return $this->T_('Index of photos; click goes to original image post.');
1514 }
1515
1516
1517
1518=== added directory 'blogs/plugins/coll_page_list_widget'
1519=== renamed file 'blogs/inc/widgets/widgets/_coll_page_list.widget.php' => 'blogs/plugins/coll_page_list_widget/_coll_page_list.widget.php'
1520--- blogs/inc/widgets/widgets/_coll_page_list.widget.php 2009-12-06 09:37:19 +0000
1521+++ blogs/plugins/coll_page_list_widget/_coll_page_list.widget.php 2009-12-21 15:13:16 +0000
1522@@ -23,7 +23,8 @@
1523 */
1524 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
1525
1526-load_class( 'widgets/widgets/_coll_item_list.widget.php' );
1527+$wiCache = get_Cache('WidgetCache');
1528+$wiCache->load_widget( 'coll_item_list' );
1529
1530 /**
1531 * ComponentWidget Class
1532@@ -39,8 +40,10 @@
1533 */
1534 function coll_page_list_Widget( $db_row = NULL )
1535 {
1536+ $this->widget_name = $this->T_('Simple Page list');
1537+ $this->widget_title = $this->T_('Pages');
1538 // Call parent constructor:
1539- parent::ComponentWidget( $db_row, 'core', 'coll_page_list' );
1540+ parent::ComponentWidget( $db_row, 'widget', 'coll_page_list' );
1541 }
1542
1543
1544@@ -55,7 +58,6 @@
1545 // This is derived from coll_post_list_Widget, so we DO NOT ADD ANY param here!
1546 $r = parent::get_param_definitions( $params );
1547 // We only change the defaults and hide some params.
1548- $r['title']['defaultvalue'] = T_('Pages');
1549 $r['title_link']['no_edit'] = true;
1550 $r['item_type']['no_edit'] = true;
1551 $r['follow_mainlist']['no_edit'] = true;
1552@@ -72,20 +74,11 @@
1553
1554
1555 /**
1556- * Get name of widget
1557- */
1558- function get_name()
1559- {
1560- return T_('Simple Page list');
1561- }
1562-
1563-
1564- /**
1565 * Get a very short desc. Used in the widget list.
1566 */
1567 function get_short_desc()
1568 {
1569- return format_to_output($this->disp_params['title']);
1570+ return format_to_output($this->disp_params['widget_title']);
1571 }
1572
1573
1574@@ -94,7 +87,7 @@
1575 */
1576 function get_desc()
1577 {
1578- return T_('Simplified Item list for listing pages.');
1579+ return $this->T_('Simplified Item list for listing pages.');
1580 }
1581
1582
1583
1584=== added directory 'blogs/plugins/coll_post_list_widget'
1585=== renamed file 'blogs/inc/widgets/widgets/_coll_post_list.widget.php' => 'blogs/plugins/coll_post_list_widget/_coll_post_list.widget.php'
1586--- blogs/inc/widgets/widgets/_coll_post_list.widget.php 2009-12-06 09:37:19 +0000
1587+++ blogs/plugins/coll_post_list_widget/_coll_post_list.widget.php 2009-12-21 15:13:16 +0000
1588@@ -23,7 +23,8 @@
1589 */
1590 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
1591
1592-load_class( 'widgets/widgets/_coll_item_list.widget.php' );
1593+$wiCache = get_Cache('WidgetCache');
1594+$wiCache->load_widget( 'coll_item_list' );
1595
1596 /**
1597 * ComponentWidget Class
1598@@ -39,8 +40,10 @@
1599 */
1600 function coll_post_list_Widget( $db_row = NULL )
1601 {
1602+ $this->widget_name = $this->T_('Simple Post list');
1603+ $this->widget_title = $this->T_('Contents');
1604 // Call parent constructor:
1605- parent::ComponentWidget( $db_row, 'core', 'coll_post_list' );
1606+ parent::ComponentWidget( $db_row, 'widget', 'coll_post_list' );
1607 }
1608
1609
1610@@ -55,7 +58,6 @@
1611 // This is derived from coll_post_list_Widget, so we DO NOT ADD ANY param here!
1612 $r = parent::get_param_definitions( $params );
1613 // We only change the defaults and hide some params.
1614- $r['title']['defaultvalue'] = T_('Contents');
1615 $r['title_link']['no_edit'] = true;
1616 $r['item_type']['no_edit'] = true;
1617 $r['follow_mainlist']['no_edit'] = true;
1618@@ -72,20 +74,11 @@
1619
1620
1621 /**
1622- * Get name of widget
1623- */
1624- function get_name()
1625- {
1626- return T_('Simple Post list');
1627- }
1628-
1629-
1630- /**
1631 * Get a very short desc. Used in the widget list.
1632 */
1633 function get_short_desc()
1634 {
1635- return format_to_output($this->disp_params['title']);
1636+ return format_to_output($this->disp_params['widget_title']);
1637 }
1638
1639
1640@@ -94,7 +87,7 @@
1641 */
1642 function get_desc()
1643 {
1644- return T_('Simplified Item list for listing posts.');
1645+ return $this->T_('Simplified Item list for listing posts.');
1646 }
1647
1648
1649
1650=== added directory 'blogs/plugins/coll_related_post_list_widget'
1651=== renamed file 'blogs/inc/widgets/widgets/_coll_related_post_list.widget.php' => 'blogs/plugins/coll_related_post_list_widget/_coll_related_post_list.widget.php'
1652--- blogs/inc/widgets/widgets/_coll_related_post_list.widget.php 2009-12-06 09:37:19 +0000
1653+++ blogs/plugins/coll_related_post_list_widget/_coll_related_post_list.widget.php 2009-12-21 15:13:16 +0000
1654@@ -23,7 +23,8 @@
1655 */
1656 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
1657
1658-load_class( 'widgets/widgets/_coll_item_list.widget.php' );
1659+$wiCache = get_Cache('WidgetCache');
1660+$wiCache->load_widget( 'coll_item_list' );
1661
1662 /**
1663 * ComponentWidget Class
1664@@ -39,8 +40,10 @@
1665 */
1666 function coll_related_post_list_Widget( $db_row = NULL )
1667 {
1668+ $this->widget_name = $this->T_('Simple Related Posts list');
1669+ $this->widget_title = $this->T_('Related posts');
1670 // Call parent constructor:
1671- parent::ComponentWidget( $db_row, 'core', 'coll_related_post_list' );
1672+ parent::ComponentWidget( $db_row, 'widget', 'coll_related_post_list' );
1673 }
1674
1675
1676@@ -55,7 +58,6 @@
1677 // This is derived from coll_post_list_Widget, so we DO NOT ADD ANY param here!
1678 $r = parent::get_param_definitions( $params );
1679 // We only change the defaults and hide some params.
1680- $r['title']['defaultvalue'] = T_('Related posts');
1681 $r['title_link']['no_edit'] = true;
1682 $r['item_type']['no_edit'] = true;
1683 $r['follow_mainlist']['no_edit'] = true;
1684@@ -72,20 +74,11 @@
1685
1686
1687 /**
1688- * Get name of widget
1689- */
1690- function get_name()
1691- {
1692- return T_('Simple Related Posts list');
1693- }
1694-
1695-
1696- /**
1697 * Get a very short desc. Used in the widget list.
1698 */
1699 function get_short_desc()
1700 {
1701- return format_to_output($this->disp_params['title']);
1702+ return format_to_output($this->disp_params['widget_title']);
1703 }
1704
1705
1706@@ -94,7 +87,7 @@
1707 */
1708 function get_desc()
1709 {
1710- return T_('Simplified Item list for listing posts related to the Main list.');
1711+ return $this->T_('Simplified Item list for listing posts related to the Main list.');
1712 }
1713
1714
1715
1716=== added directory 'blogs/plugins/coll_search_form_widget'
1717=== renamed file 'blogs/inc/widgets/widgets/_coll_search_form.widget.php' => 'blogs/plugins/coll_search_form_widget/_coll_search_form.widget.php'
1718--- blogs/inc/widgets/widgets/_coll_search_form.widget.php 2009-12-06 09:37:19 +0000
1719+++ blogs/plugins/coll_search_form_widget/_coll_search_form.widget.php 2009-12-21 15:13:16 +0000
1720@@ -39,17 +39,10 @@
1721 */
1722 function coll_search_form_Widget( $db_row = NULL )
1723 {
1724+ $this->widget_name = $this->T_('Search Form');
1725+ $this->widget_title = $this->T_('Search');
1726 // Call parent constructor:
1727- parent::ComponentWidget( $db_row, 'core', 'coll_search_form' );
1728- }
1729-
1730-
1731- /**
1732- * Get name of widget
1733- */
1734- function get_name()
1735- {
1736- return T_('Search Form');
1737+ parent::ComponentWidget( $db_row, 'widget', 'coll_search_form' );
1738 }
1739
1740
1741@@ -58,7 +51,7 @@
1742 */
1743 function get_short_desc()
1744 {
1745- return format_to_output($this->disp_params['title']);
1746+ return format_to_output($this->disp_params['widget_title']);
1747 }
1748
1749
1750@@ -67,7 +60,7 @@
1751 */
1752 function get_desc()
1753 {
1754- return T_('Display search form');
1755+ return $this->T_('Display search form');
1756 }
1757
1758
1759@@ -80,15 +73,9 @@
1760 function get_param_definitions( $params )
1761 {
1762 $r = array_merge( array(
1763- 'title' => array(
1764- 'label' => T_('Block title'),
1765- 'note' => T_( 'Title to display in your skin.' ),
1766- 'size' => 40,
1767- 'defaultvalue' => T_('Search'),
1768- ),
1769 'disp_search_options' => array(
1770- 'label' => T_( 'Search options' ),
1771- 'note' => T_( 'Display radio buttons for "All Words", "Some Word" and "Entire Phrase"' ),
1772+ 'label' => $this->T_( 'Search options' ),
1773+ 'note' => $this->T_( 'Display radio buttons for "All Words", "Some Word" and "Entire Phrase"' ),
1774 'type' => 'checkbox',
1775 'defaultvalue' => true,
1776 ),
1777@@ -124,12 +111,12 @@
1778 {
1779 $sentence = get_param( 'sentence' );
1780 echo '<div class="search_options">';
1781- echo '<div class="search_option"><input type="radio" name="sentence" value="AND" id="sentAND" '.( $sentence=='AND' ? 'checked="checked" ' : '' ).'/><label for="sentAND">'.T_('All Words').'</label></div>';
1782- echo '<div class="search_option"><input type="radio" name="sentence" value="OR" id="sentOR" '.( $sentence=='OR' ? 'checked="checked" ' : '' ).'/><label for="sentOR">'.T_('Some Word').'</label></div>';
1783- echo '<div class="search_option"><input type="radio" name="sentence" value="sentence" id="sentence" '.( $sentence=='sentence' ? 'checked="checked" ' : '' ).'/><label for="sentence">'.T_('Entire phrase').'</label></div>';
1784+ echo '<div class="search_option"><input type="radio" name="sentence" value="AND" id="sentAND" '.( $sentence=='AND' ? 'checked="checked" ' : '' ).'/><label for="sentAND">'.$this->T_('All Words').'</label></div>';
1785+ echo '<div class="search_option"><input type="radio" name="sentence" value="OR" id="sentOR" '.( $sentence=='OR' ? 'checked="checked" ' : '' ).'/><label for="sentOR">'.$this->T_('Some Word').'</label></div>';
1786+ echo '<div class="search_option"><input type="radio" name="sentence" value="sentence" id="sentence" '.( $sentence=='sentence' ? 'checked="checked" ' : '' ).'/><label for="sentence">'.$this->T_('Entire phrase').'</label></div>';
1787 echo '</div>';
1788 }
1789- echo '<input type="submit" name="submit" class="submit" value="'.T_('Search').'" />';
1790+ echo '<input type="submit" name="submit" class="submit" value="'.$this->T_('Search').'" />';
1791 echo '</form>';
1792
1793 echo $this->disp_params['block_end'];
1794
1795=== added directory 'blogs/plugins/coll_tag_cloud_widget'
1796=== renamed file 'blogs/inc/widgets/widgets/_coll_tag_cloud.widget.php' => 'blogs/plugins/coll_tag_cloud_widget/_coll_tag_cloud.widget.php'
1797--- blogs/inc/widgets/widgets/_coll_tag_cloud.widget.php 2009-12-06 09:37:19 +0000
1798+++ blogs/plugins/coll_tag_cloud_widget/_coll_tag_cloud.widget.php 2009-12-21 15:13:16 +0000
1799@@ -39,8 +39,10 @@
1800 */
1801 function coll_tag_cloud_Widget( $db_row = NULL )
1802 {
1803+ $this->widget_name = $this->T_('Tag cloud');
1804+ $this->widget_title = $this->T_('Tag cloud');
1805 // Call parent constructor:
1806- parent::ComponentWidget( $db_row, 'core', 'coll_tag_cloud' );
1807+ parent::ComponentWidget( $db_row, 'widget', 'coll_tag_cloud' );
1808 }
1809
1810
1811@@ -60,20 +62,11 @@
1812
1813
1814 /**
1815- * Get name of widget
1816- */
1817- function get_name()
1818- {
1819- return T_('Tag cloud');
1820- }
1821-
1822-
1823- /**
1824 * Get a very short desc. Used in the widget list.
1825 */
1826 function get_short_desc()
1827 {
1828- return format_to_output($this->disp_params['title']);
1829+ return format_to_output($this->disp_params['widget_title']);
1830 }
1831
1832
1833@@ -82,7 +75,7 @@
1834 */
1835 function get_desc()
1836 {
1837- return T_('Cloud of all tags; click filters blog on selected tag.');
1838+ return $this->T_('Cloud of all tags; click filters blog on selected tag.');
1839 }
1840
1841
1842@@ -95,33 +88,27 @@
1843 function get_param_definitions( $params )
1844 {
1845 $r = array_merge( array(
1846- 'title' => array(
1847- 'type' => 'text',
1848- 'label' => T_('Block title'),
1849- 'defaultvalue' => T_('Tag cloud'),
1850- 'maxlength' => 100,
1851- ),
1852 'max_tags' => array(
1853 'type' => 'integer',
1854- 'label' => T_('Max # of tags'),
1855+ 'label' => $this->T_('Max # of tags'),
1856 'size' => 4,
1857 'defaultvalue' => 50,
1858 ),
1859 'tag_separator' => array(
1860 'type' => 'text',
1861- 'label' => T_('Tag separator'),
1862+ 'label' => $this->T_('Tag separator'),
1863 'defaultvalue' => ' ',
1864 'maxlength' => 100,
1865 ),
1866 'tag_min_size' => array(
1867 'type' => 'integer',
1868- 'label' => T_('Min size'),
1869+ 'label' => $this->T_('Min size'),
1870 'size' => 3,
1871 'defaultvalue' => 8,
1872 ),
1873 'tag_max_size' => array(
1874 'type' => 'integer',
1875- 'label' => T_('Max size'),
1876+ 'label' => $this->T_('Max size'),
1877 'size' => 3,
1878 'defaultvalue' => 22,
1879 ),
1880@@ -202,7 +189,7 @@
1881
1882 echo $Blog->get_tag_link( $row->tag_name, $tag_name_disp, array(
1883 'style' => 'font-size: '.$size.'pt;',
1884- 'title' => sprintf( T_('%d posts'), $row->tag_count ) ) );
1885+ 'title' => sprintf( $this->T_('%d posts'), $row->tag_count ) ) );
1886 $count++;
1887 }
1888 echo $this->disp_params['tag_cloud_end'];
1889
1890=== added directory 'blogs/plugins/coll_tagline_widget'
1891=== renamed file 'blogs/inc/widgets/widgets/_coll_tagline.widget.php' => 'blogs/plugins/coll_tagline_widget/_coll_tagline.widget.php'
1892--- blogs/inc/widgets/widgets/_coll_tagline.widget.php 2009-12-06 09:37:19 +0000
1893+++ blogs/plugins/coll_tagline_widget/_coll_tagline.widget.php 2009-12-21 15:13:16 +0000
1894@@ -39,17 +39,10 @@
1895 */
1896 function coll_tagline_Widget( $db_row = NULL )
1897 {
1898+ $this->widget_name = $this->T_('Blog tagline');
1899+ $this->widget_title = '';
1900 // Call parent constructor:
1901- parent::ComponentWidget( $db_row, 'core', 'coll_tagline' );
1902- }
1903-
1904-
1905- /**
1906- * Get name of widget
1907- */
1908- function get_name()
1909- {
1910- return T_('Blog tagline');
1911+ parent::ComponentWidget( $db_row, 'widget', 'coll_tagline' );
1912 }
1913
1914
1915@@ -70,7 +63,7 @@
1916 function get_desc()
1917 {
1918 global $Blog;
1919- return sprintf( T_('&laquo;%s&raquo; from the blog\'s <a %s>general settings</a>.'),
1920+ return sprintf( $this->T_('&laquo;%s&raquo; from the blog\'s <a %s>general settings</a>.'),
1921 '<strong>'.$Blog->dget('tagline').'</strong>', 'href="?ctrl=coll_settings&tab=general&blog='.$Blog->ID.'"' );
1922 }
1923
1924@@ -88,6 +81,8 @@
1925
1926 // Collection tagline:
1927 echo $this->disp_params['block_start'];
1928+ $this->disp_title();
1929+
1930 // TODO: there appears to be no possibility to wrap the tagline in e.g. "<h2>%s</h2>"
1931 // Should there be a widget param for this? fp> probably yes
1932 $Blog->disp( 'tagline', 'htmlbody' );
1933@@ -96,6 +91,4 @@
1934 return true;
1935 }
1936 }
1937-
1938-
1939 ?>
1940
1941=== added directory 'blogs/plugins/coll_title_widget'
1942=== renamed file 'blogs/inc/widgets/widgets/_coll_title.widget.php' => 'blogs/plugins/coll_title_widget/_coll_title.widget.php'
1943--- blogs/inc/widgets/widgets/_coll_title.widget.php 2009-12-06 09:37:19 +0000
1944+++ blogs/plugins/coll_title_widget/_coll_title.widget.php 2009-12-21 15:13:16 +0000
1945@@ -39,17 +39,10 @@
1946 */
1947 function coll_title_Widget( $db_row = NULL )
1948 {
1949+ $this->widget_name = $this->T_('Blog title');
1950+ $this->widget_title = '';
1951 // Call parent constructor:
1952- parent::ComponentWidget( $db_row, 'core', 'coll_title' );
1953- }
1954-
1955-
1956- /**
1957- * Get name of widget
1958- */
1959- function get_name()
1960- {
1961- return T_('Blog title');
1962+ parent::ComponentWidget( $db_row, 'widget', 'coll_title' );
1963 }
1964
1965
1966@@ -70,7 +63,7 @@
1967 function get_desc()
1968 {
1969 global $Blog;
1970- return sprintf( T_('&laquo;%s&raquo; from the blog\'s <a %s>general settings</a>.'),
1971+ return sprintf( $this->T_('&laquo;%s&raquo; from the blog\'s <a %s>general settings</a>.'),
1972 '<strong>'.$Blog->dget('name').'</strong>', 'href="?ctrl=coll_settings&tab=general&blog='.$Blog->ID.'"' );
1973 }
1974
1975
1976=== added directory 'blogs/plugins/coll_xml_feeds_widget'
1977=== renamed file 'blogs/inc/widgets/widgets/_coll_xml_feeds.widget.php' => 'blogs/plugins/coll_xml_feeds_widget/_coll_xml_feeds.widget.php'
1978--- blogs/inc/widgets/widgets/_coll_xml_feeds.widget.php 2009-12-06 09:37:19 +0000
1979+++ blogs/plugins/coll_xml_feeds_widget/_coll_xml_feeds.widget.php 2009-12-21 15:13:16 +0000
1980@@ -39,17 +39,10 @@
1981 */
1982 function coll_xml_feeds_Widget( $db_row = NULL )
1983 {
1984+ $this->widget_name = $this->T_('XML Feeds (RSS / Atom)');
1985+ $this->widget_title = '$icon$ '.$this->T_('XML Feeds');
1986 // Call parent constructor:
1987- parent::ComponentWidget( $db_row, 'core', 'coll_xml_feeds' );
1988- }
1989-
1990-
1991- /**
1992- * Get name of widget
1993- */
1994- function get_name()
1995- {
1996- return T_('XML Feeds (RSS / Atom)');
1997+ parent::ComponentWidget( $db_row, 'widget', 'coll_xml_feeds' );
1998 }
1999
2000
2001@@ -67,7 +60,7 @@
2002 */
2003 function get_desc()
2004 {
2005- return T_('List of all available XML feeds.');
2006+ return $this->T_('List of all available XML feeds.');
2007 }
2008
2009
2010@@ -81,22 +74,16 @@
2011 {
2012 global $use_strict;
2013 $r = array_merge( array(
2014- 'title' => array(
2015- 'label' => T_( 'Title' ),
2016- 'size' => 40,
2017- 'note' => T_( 'This is the title to display, $icon$ will be replaced by the feed icon' ),
2018- 'defaultvalue' => '$icon$ '.T_('XML Feeds'),
2019- ),
2020 'disp_info_link' => array(
2021- 'label' => T_( 'Help link' ),
2022+ 'label' => $this->T_( 'Help link' ),
2023 'type' => 'checkbox',
2024- 'note' => T_( 'Check this to display "What is RSS?" link' ),
2025+ 'note' => $this->T_( 'Check this to display "What is RSS?" link' ),
2026 'defaultvalue' => 1,
2027 ),
2028 'info_link' => array(
2029- 'label' => T_( 'New Window' ),
2030+ 'label' => $this->T_( 'New Window' ),
2031 'type' => 'checkbox',
2032- 'note' => T_( 'Check this to add target="_blank" to the "What is RSS?" link' ),
2033+ 'note' => $this->T_( 'Check this to add target="_blank" to the "What is RSS?" link' ),
2034 'defaultvalue' => !$use_strict,
2035 ),
2036 ), parent::get_param_definitions( $params ) );
2037@@ -109,7 +96,7 @@
2038 {
2039 global $rsc_url;
2040
2041- $title = str_replace( '$icon$', '<img src="'.$rsc_url.'icons/feed-icon-16x16.gif" width="16" height="16" class="top" alt="" /> ', $this->disp_params['title']);
2042+ $title = str_replace( '$icon$', '<img src="'.$rsc_url.'icons/feed-icon-16x16.gif" width="16" height="16" class="top" alt="" /> ', $this->disp_params['widget_title']);
2043 // fp> TODO: support for different icon sizes and backgrounds (at least black and white; mid grey would be cool also)
2044
2045 return $title;
2046@@ -147,10 +134,10 @@
2047
2048 echo $this->disp_params['item_start'];
2049 echo $Skin->name.': ';
2050- echo '<a href="'.$Blog->get_item_feed_url( $Skin->folder ).'">'.T_('Posts').'</a>';
2051+ echo '<a href="'.$Blog->get_item_feed_url( $Skin->folder ).'">'.$this->T_('Posts').'</a>';
2052 if ( $Blog->allowcomments != 'never' )
2053 {
2054- echo ', <a href="'.$Blog->get_comment_feed_url( $Skin->folder ).'">'.T_('Comments').'</a>';
2055+ echo ', <a href="'.$Blog->get_comment_feed_url( $Skin->folder ).'">'.$this->T_('Comments').'</a>';
2056 }
2057
2058 echo $this->disp_params['item_end'];
2059
2060=== added directory 'blogs/plugins/colls_list_owner_widget'
2061=== renamed file 'blogs/inc/widgets/widgets/_colls_list_owner.widget.php' => 'blogs/plugins/colls_list_owner_widget/_colls_list_owner.widget.php'
2062--- blogs/inc/widgets/widgets/_colls_list_owner.widget.php 2009-12-06 09:37:19 +0000
2063+++ blogs/plugins/colls_list_owner_widget/_colls_list_owner.widget.php 2009-12-21 15:13:16 +0000
2064@@ -25,40 +25,29 @@
2065
2066 load_class( 'widgets/model/_widget.class.php' );
2067
2068+$wiCache = get_Cache('WidgetCache');
2069+$wiCache->load_widget( 'colls_list' );
2070+
2071 /**
2072 * ComponentWidget Class
2073 *
2074 * A ComponentWidget is a displayable entity that can be placed into a Container on a web page.
2075 *
2076+ * @deprecated replaced with coll_list_Widget
2077+ *
2078 * @package widgets
2079 */
2080-class colls_list_owner_Widget extends ComponentWidget
2081+class colls_list_owner_Widget extends colls_list_Widget
2082 {
2083 /**
2084 * Constructor
2085 */
2086 function colls_list_owner_Widget( $db_row = NULL )
2087 {
2088+ $this->widget_name = $this->T_('Same owner\'s blog list');
2089+ $this->widget_title = '';
2090 // Call parent constructor:
2091- parent::ComponentWidget( $db_row, 'core', 'colls_list_owner' );
2092- }
2093-
2094-
2095- /**
2096- * Get name of widget
2097- */
2098- function get_name()
2099- {
2100- return T_('Same owner\'s blog list');
2101- }
2102-
2103-
2104- /**
2105- * Get a very short desc. Used in the widget list.
2106- */
2107- function get_short_desc()
2108- {
2109- return format_to_output($this->disp_params['title']);
2110+ parent::ComponentWidget( $db_row, 'widget', 'colls_list_owner' );
2111 }
2112
2113
2114@@ -67,7 +56,7 @@
2115 */
2116 function get_desc()
2117 {
2118- return T_('Display list of all blogs owned by the same user.');
2119+ return $this->T_('Display list of all blogs owned by the same user.');
2120 }
2121
2122
2123@@ -79,34 +68,12 @@
2124 */
2125 function get_param_definitions( $params )
2126 {
2127- global $use_strict;
2128- $r = array_merge( array(
2129- 'title' => array(
2130- 'label' => T_( 'Title' ),
2131- 'size' => 40,
2132- 'note' => T_( 'This is the title to display, $icon$ will be replaced by the feed icon' ),
2133- 'defaultvalue' => T_('My blogs'),
2134- ),
2135- ), parent::get_param_definitions( $params ) );
2136+ $r = parent::get_param_definitions( $params );
2137
2138+ $r['coll_list_type']['type'] = 'text';
2139+ $r['coll_list_type']['defaultvalue'] = 'owner';
2140+ $r['coll_list_type']['no_edit'] = true;
2141 return $r;
2142 }
2143-
2144-
2145- /**
2146- * Display the widget!
2147- *
2148- * @param array MUST contain at least the basic display params
2149- */
2150- function display( $params )
2151- {
2152- $this->init_display( $params );
2153-
2154- $this->disp_coll_list( 'owner' );
2155-
2156- return true;
2157- }
2158 }
2159-
2160-
2161 ?>
2162\ No newline at end of file
2163
2164=== added directory 'blogs/plugins/colls_list_public_widget'
2165=== renamed file 'blogs/inc/widgets/widgets/_colls_list_public.widget.php' => 'blogs/plugins/colls_list_public_widget/_colls_list_public.widget.php'
2166--- blogs/inc/widgets/widgets/_colls_list_public.widget.php 2009-12-06 09:37:19 +0000
2167+++ blogs/plugins/colls_list_public_widget/_colls_list_public.widget.php 2009-12-21 15:13:16 +0000
2168@@ -25,40 +25,29 @@
2169
2170 load_class( 'widgets/model/_widget.class.php' );
2171
2172+$wiCache = get_Cache('WidgetCache');
2173+$wiCache->load_widget( 'colls_list' );
2174+
2175 /**
2176 * ComponentWidget Class
2177 *
2178 * A ComponentWidget is a displayable entity that can be placed into a Container on a web page.
2179 *
2180+ * @deprecated replaced with coll_list_Widget
2181+ *
2182 * @package widgets
2183 */
2184-class colls_list_public_Widget extends ComponentWidget
2185+class colls_list_public_Widget extends colls_list_Widget
2186 {
2187 /**
2188 * Constructor
2189 */
2190 function colls_list_public_Widget( $db_row = NULL )
2191 {
2192+ $this->widget_name = $this->T_('Public blog list');
2193+ $this->widget_title = '';
2194 // Call parent constructor:
2195- parent::ComponentWidget( $db_row, 'core', 'colls_list_public' );
2196- }
2197-
2198-
2199- /**
2200- * Get name of widget
2201- */
2202- function get_name()
2203- {
2204- return T_('Public blog list');
2205- }
2206-
2207-
2208- /**
2209- * Get a very short desc. Used in the widget list.
2210- */
2211- function get_short_desc()
2212- {
2213- return format_to_output($this->disp_params['title']);
2214+ parent::ComponentWidget( $db_row, 'widget', 'colls_list_public' );
2215 }
2216
2217
2218@@ -67,7 +56,7 @@
2219 */
2220 function get_desc()
2221 {
2222- return T_('Display list of all blogs marked as public.');
2223+ return $this->T_('Display list of all blogs marked as public.');
2224 }
2225
2226
2227@@ -79,34 +68,12 @@
2228 */
2229 function get_param_definitions( $params )
2230 {
2231- global $use_strict;
2232- $r = array_merge( array(
2233- 'title' => array(
2234- 'label' => T_( 'Title' ),
2235- 'size' => 40,
2236- 'note' => T_( 'This is the title to display, $icon$ will be replaced by the feed icon' ),
2237- 'defaultvalue' => T_('All blogs'),
2238- ),
2239- ), parent::get_param_definitions( $params ) );
2240+ $r = parent::get_param_definitions( $params );
2241
2242+ $r['coll_list_type']['type'] = 'text';
2243+ $r['coll_list_type']['defaultvalue'] = 'public';
2244+ $r['coll_list_type']['no_edit'] = true;
2245 return $r;
2246 }
2247-
2248-
2249- /**
2250- * Display the widget!
2251- *
2252- * @param array MUST contain at least the basic display params
2253- */
2254- function display( $params )
2255- {
2256- $this->init_display( $params );
2257-
2258- $this->disp_coll_list( 'public' );
2259-
2260- return true;
2261- }
2262 }
2263-
2264-
2265-?>
2266\ No newline at end of file
2267+?>
2268
2269=== added directory 'blogs/plugins/colls_list_widget'
2270=== added file 'blogs/plugins/colls_list_widget/_colls_list.widget.php'
2271--- blogs/plugins/colls_list_widget/_colls_list.widget.php 1970-01-01 00:00:00 +0000
2272+++ blogs/plugins/colls_list_widget/_colls_list.widget.php 2009-12-21 15:13:16 +0000
2273@@ -0,0 +1,171 @@
2274+<?php
2275+/**
2276+ * This file implements the Colls List Widget class.
2277+ *
2278+ * This file is part of the QuamPlures framework - {@link http://quamplures.net/}
2279+ *
2280+ * @copyright (c)2009 by QuamPlures - {@link http://quamplures.net/}
2281+ *
2282+ * {@internal License choice
2283+ * - If you have received this file as part of a package, please find the license.txt file in
2284+ * the same folder or the closest folder above for complete license terms.
2285+ * - If you have received this file individually
2286+ * then you must choose one of the following licenses before using the file:
2287+ * - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
2288+ * - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
2289+ * }}
2290+ *
2291+ * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
2292+ * @author yabs.
2293+ *
2294+ * @package widgets
2295+ */
2296+if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
2297+
2298+// dependency
2299+load_class( 'widgets/model/_widget.class.php' );
2300+
2301+/**
2302+ * Colls List Class
2303+ *
2304+ * Displays a list of public or same owner blogs
2305+ *
2306+ * @package widgets
2307+ */
2308+class colls_list_Widget extends ComponentWidget
2309+{
2310+ /**
2311+ * Constructor
2312+ */
2313+ function colls_list_Widget( $db_row = NULL )
2314+ {
2315+ $this->widget_name = $this->T_('Blog List');
2316+ $this->widget_title = '';
2317+ // Call parent constructor:
2318+ parent::ComponentWidget( $db_row, 'widget', 'colls_list' );
2319+ }
2320+
2321+
2322+ /**
2323+ * Get a very short desc. Used in the widget list.
2324+ */
2325+ function get_short_desc()
2326+ {
2327+ return format_to_output($this->disp_params['widget_title']);
2328+ }
2329+
2330+
2331+ /**
2332+ * Get short description
2333+ */
2334+ function get_desc()
2335+ {
2336+ return $this->T_('Display chosen list of blogs.');
2337+ }
2338+
2339+
2340+ /**
2341+ * Get definitions for editable params
2342+ *
2343+ * @see Plugin::GetDefaultSettings()
2344+ * @param local params like 'for_editing' => true
2345+ */
2346+ function get_param_definitions( $params )
2347+ {
2348+ $r = array_merge( array(
2349+ 'coll_list_type' => array(
2350+ 'label' => $this->T_( 'List' ),
2351+ 'type' => 'select',
2352+ 'options' => array(
2353+ 'owner' => $this->T_('Same owner'),
2354+ 'public' => $this->T_('Public' ),
2355+ ),
2356+ 'note' => $this->T_( 'Blogs to list' ),
2357+ 'defaultvalue' => 'public',
2358+ ),
2359+ ), parent::get_param_definitions( $params ) );
2360+
2361+ return $r;
2362+ }
2363+
2364+
2365+ /**
2366+ * Display the widget!
2367+ *
2368+ * @param array MUST contain at least the basic display params
2369+ */
2370+ function display( $params )
2371+ {
2372+ $this->init_display( $params );
2373+
2374+ /**
2375+ * @var Blog
2376+ */
2377+ global $Blog, $baseurl;
2378+
2379+ echo $this->disp_params['block_start'];
2380+
2381+ $this->disp_title();
2382+
2383+ /**
2384+ * @var BlogCache
2385+ */
2386+ $BlogCache = & get_Cache( 'BlogCache' );
2387+
2388+ if( $this->disp_params['coll_list_type'] == 'owner' )
2389+ { // Load blogs of same owner
2390+ $blog_array = $BlogCache->load_owner_blogs( $Blog->owner_user_ID, 'ID' );
2391+ }
2392+ else
2393+ { // Load all public blogs
2394+ $blog_array = $BlogCache->load_public( 'ID' );
2395+ }
2396+
2397+ if( !empty( $blog_array ) )
2398+ {
2399+ echo $this->disp_params['list_start'];
2400+
2401+ foreach( $blog_array as $l_blog_ID )
2402+ { // Loop through all blogs:
2403+
2404+ $l_Blog = & $BlogCache->get_by_ID( $l_blog_ID );
2405+
2406+ if( $Blog && $l_blog_ID == $Blog->ID )
2407+ { // This is the blog being displayed on this page:
2408+ echo $this->disp_params['item_selected_start'];
2409+ $link_class = $this->disp_params['link_selected_class'];
2410+ }
2411+ else
2412+ {
2413+ echo $this->disp_params['item_start'];
2414+ $link_class = $this->disp_params['link_default_class'];;
2415+ }
2416+
2417+ echo '<a href="'.$l_Blog->gen_blogurl().'" class="'.$link_class.'" title="'
2418+ .$l_Blog->dget( 'name', 'htmlattr' ).'">';
2419+
2420+ if( $Blog && $l_blog_ID == $Blog->ID )
2421+ { // This is the blog being displayed on this page:
2422+ echo $this->disp_params['item_selected_text_start'];
2423+ printf( $this->disp_params['item_selected_text'], $l_Blog->dget( 'shortname', 'htmlbody' ) );
2424+ echo $this->disp_params['item_selected_text_end'];
2425+ echo '</a>';
2426+ echo $this->disp_params['item_selected_end'];
2427+ }
2428+ else
2429+ {
2430+ echo $this->disp_params['item_text_start'];
2431+ printf( $this->disp_params['item_text'], $l_Blog->dget( 'shortname', 'htmlbody' ) );
2432+ echo $this->disp_params['item_text_end'];
2433+ echo '</a>';
2434+ echo $this->disp_params['item_end'];
2435+ }
2436+ }
2437+
2438+ echo $this->disp_params['list_end'];
2439+ }
2440+
2441+ echo $this->disp_params['block_end'];
2442+ }
2443+}
2444+?>
2445\ No newline at end of file
2446
2447=== added directory 'blogs/plugins/free_html_widget'
2448=== renamed file 'blogs/inc/widgets/widgets/_free_html.widget.php' => 'blogs/plugins/free_html_widget/_free_html.widget.php'
2449--- blogs/inc/widgets/widgets/_free_html.widget.php 2009-12-06 09:37:19 +0000
2450+++ blogs/plugins/free_html_widget/_free_html.widget.php 2009-12-21 15:13:16 +0000
2451@@ -39,18 +39,10 @@
2452 */
2453 function free_html_Widget( $db_row = NULL )
2454 {
2455+ $this->widget_name = $this->T_( 'Free HTML' );
2456+ $this->widget_title = '';
2457 // Call parent constructor:
2458- parent::ComponentWidget( $db_row, 'core', 'free_html' );
2459- }
2460-
2461-
2462- /**
2463- * Get name of widget
2464- */
2465- function get_name()
2466- {
2467- $title = T_( 'Free HTML' );
2468- return $title;
2469+ parent::ComponentWidget( $db_row, 'widget', 'free_html' );
2470 }
2471
2472
2473@@ -62,12 +54,12 @@
2474 */
2475 function get_short_desc()
2476 {
2477- if( empty( $this->disp_params['title'] ) )
2478+ if( empty( $this->disp_params['widget_title'] ) )
2479 {
2480 return strmaxlen( htmlspecialchars( $this->disp_params['content'] ), 60 );
2481 }
2482
2483- return format_to_output( $this->disp_params['title'] );
2484+ return format_to_output( $this->disp_params['widget_title'] );
2485 }
2486
2487
2488@@ -76,7 +68,7 @@
2489 */
2490 function get_desc()
2491 {
2492- return T_('Custom text/HTML of your choice.');
2493+ return $this->T_('Custom text/HTML of your choice.');
2494 }
2495
2496
2497@@ -90,13 +82,9 @@
2498 {
2499 // Demo data:
2500 $r = array_merge( array(
2501- 'title' => array(
2502- 'label' => T_('Block title'),
2503- 'size' => 60,
2504- ),
2505 'content' => array(
2506 'type' => 'html_textarea',
2507- 'label' => T_('Block content'),
2508+ 'label' => $this->T_('Block content'),
2509 'rows' => 10,
2510 ),
2511 ), parent::get_param_definitions( $params ) );
2512@@ -120,7 +108,7 @@
2513 // Collection common links:
2514 echo $this->disp_params['block_start'];
2515
2516- $this->disp_title( $this->disp_params['title'] );
2517+ $this->disp_title();
2518
2519 echo format_to_output( $this->disp_params['content'] );
2520
2521
2522=== added directory 'blogs/plugins/linkblog_widget'
2523=== renamed file 'blogs/inc/widgets/widgets/_linkblog.widget.php' => 'blogs/plugins/linkblog_widget/_linkblog.widget.php'
2524--- blogs/inc/widgets/widgets/_linkblog.widget.php 2009-12-06 09:37:19 +0000
2525+++ blogs/plugins/linkblog_widget/_linkblog.widget.php 2009-12-21 15:13:16 +0000
2526@@ -23,7 +23,8 @@
2527 */
2528 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
2529
2530-load_class( 'widgets/widgets/_coll_item_list.widget.php' );
2531+$wiCache = get_Cache('WidgetCache');
2532+$wiCache->load_widget( 'coll_item_list' );
2533
2534 /**
2535 * linkblog_widget class
2536@@ -39,8 +40,10 @@
2537 */
2538 function linkblog_Widget( $db_row = NULL )
2539 {
2540+ $this->widget_name = $this->T_('Simple Linkblog Links list');
2541+ $this->widget_title = $this->T_('Linkblog');
2542 // Call parent constructor:
2543- parent::ComponentWidget( $db_row, 'core', 'linkblog' );
2544+ parent::ComponentWidget( $db_row, 'widget', 'linkblog' );
2545 }
2546
2547
2548@@ -55,7 +58,6 @@
2549 // This is derived from coll_post_list_Widget, so we DO NOT ADD ANY param here!
2550 $r = parent::get_param_definitions( $params );
2551 // We only change the defaults and hide some params.
2552- $r['title']['defaultvalue'] = T_('Linkblog');
2553 $r['title_link']['no_edit'] = true;
2554 $r['follow_mainlist']['no_edit'] = true;
2555 $r['blog_ID']['defaultvalue'] = 0; // zero is a magic number that we'll use to try and use defaults used in previous versions of B2evo
2556@@ -72,20 +74,11 @@
2557
2558
2559 /**
2560- * Get name of widget
2561- */
2562- function get_name()
2563- {
2564- return T_('Simple Linkblog Links list');
2565- }
2566-
2567-
2568- /**
2569 * Get a very short desc. Used in the widget list.
2570 */
2571 function get_short_desc()
2572 {
2573- return format_to_output($this->disp_params['title']);
2574+ return format_to_output($this->disp_params['widget_title']);
2575 }
2576
2577
2578@@ -94,7 +87,7 @@
2579 */
2580 function get_desc()
2581 {
2582- return T_('Simplified Item list for listing links from another blog.');
2583+ return $this->T_('Simplified Item list for listing links from another blog.');
2584 }
2585
2586
2587
2588=== added directory 'blogs/plugins/menu_link_widget'
2589=== renamed file 'blogs/inc/widgets/widgets/_menu_link.widget.php' => 'blogs/plugins/menu_link_widget/_menu_link.widget.php'
2590--- blogs/inc/widgets/widgets/_menu_link.widget.php 2009-12-06 09:37:19 +0000
2591+++ blogs/plugins/menu_link_widget/_menu_link.widget.php 2009-12-21 15:13:16 +0000
2592@@ -25,15 +25,6 @@
2593
2594 load_class( 'widgets/model/_widget.class.php' );
2595
2596-global $menu_link_widget_link_types;
2597-$menu_link_widget_link_types = array(
2598- 'home' => T_('Blog home'),
2599- 'arcdir' => T_('Archive directory'),
2600- 'catdir' => T_('Category directory'),
2601- 'latestcomments' => T_('Latest comments'),
2602- 'ownercontact' => T_('Blog owner contact form'),
2603- 'login' => T_('Log in form')
2604- );
2605
2606 /**
2607 * ComponentWidget Class
2608@@ -44,22 +35,26 @@
2609 */
2610 class menu_link_Widget extends ComponentWidget
2611 {
2612+
2613+ var $menu_link_widget_link_types = array();
2614+
2615 /**
2616 * Constructor
2617 */
2618 function menu_link_Widget( $db_row = NULL )
2619 {
2620+ $this->widget_name = $this->T_('Menu link');
2621+ $this->widget_title = '';
2622+ $this->menu_link_widget_link_types = array(
2623+ 'home' => $this->T_('Blog home'),
2624+ 'arcdir' => $this->T_('Archive directory'),
2625+ 'catdir' => $this->T_('Category directory'),
2626+ 'latestcomments' => $this->T_('Latest comments'),
2627+ 'ownercontact' => $this->T_('Blog owner contact form'),
2628+ 'login' => $this->T_('Log in form')
2629+ );
2630 // Call parent constructor:
2631- parent::ComponentWidget( $db_row, 'core', 'menu_link' );
2632- }
2633-
2634-
2635- /**
2636- * Get name of widget
2637- */
2638- function get_name()
2639- {
2640- return T_('Menu link');
2641+ parent::ComponentWidget( $db_row, 'widget', 'menu_link' );
2642 }
2643
2644
2645@@ -68,14 +63,12 @@
2646 */
2647 function get_short_desc()
2648 {
2649- global $menu_link_widget_link_types;
2650-
2651 $this->load_param_array();
2652
2653 if( !empty($this->param_array['link_type']) )
2654 {
2655 // TRANS: %s is the link type, e. g. "Blog home" or "Log in form"
2656- return sprintf( T_( '%s link' ), $menu_link_widget_link_types[$this->param_array['link_type']] );
2657+ return sprintf( $this->T_( '%s link' ), $this->menu_link_widget_link_types[$this->param_array['link_type']] );
2658 }
2659 else
2660 {
2661@@ -90,7 +83,7 @@
2662 */
2663 function get_desc()
2664 {
2665- return T_('Display a configurable menu entry/link');
2666+ return $this->T_('Display a configurable menu entry/link');
2667 }
2668
2669
2670@@ -102,14 +95,13 @@
2671 */
2672 function get_param_definitions( $params )
2673 {
2674- global $menu_link_widget_link_types;
2675
2676 $r = array_merge( array(
2677 'link_type' => array(
2678- 'label' => T_( 'Link Type' ),
2679- 'note' => T_('What do you want to link to?'),
2680+ 'label' => $this->T_( 'Link Type' ),
2681+ 'note' => $this->T_('What do you want to link to?'),
2682 'type' => 'select',
2683- 'options' => $menu_link_widget_link_types,
2684+ 'options' => $this->menu_link_widget_link_types,
2685 'defaultvalue' => 'home',
2686 ),
2687 ), parent::get_param_definitions( $params ) );
2688@@ -133,43 +125,44 @@
2689 {
2690 case 'arcdir':
2691 $url = $Blog->get('arcdirurl');
2692- $text = T_('Archives');
2693+ $text = $this->T_('Archives');
2694 break;
2695
2696 case 'catdir':
2697 $url = $Blog->get('catdirurl');
2698- $text = T_('Categories');
2699+ $text = $this->T_('Categories');
2700 break;
2701
2702 case 'latestcomments':
2703 $url = $Blog->get('lastcommentsurl');
2704- $text = T_('Latest comments');
2705+ $text = $this->T_('Latest comments');
2706 break;
2707
2708 case 'ownercontact':
2709 $Blog->get_owner_User();
2710- // fp> TODO: move this test into $Blog->get_contact_url( true );
2711+ // fp> TODO: move this test into $Blog->get_contact_url( true );
2712 if( ! $Blog->owner_User->allow_msgform )
2713 { // user does not allow contact form
2714 return;
2715 }
2716 $url = $Blog->get_contact_url( true );
2717- $text = T_('Contact');
2718+ $text = $this->T_('Contact');
2719 break;
2720
2721 case 'login':
2722 if( is_logged_in() ) return false;
2723 $url = get_login_url();
2724- $text = T_('Log in');
2725+ $text = $this->T_('Log in');
2726 break;
2727
2728 case 'home':
2729 default:
2730 $url = $Blog->get('url');
2731- $text = T_('Home');
2732+ $text = $this->T_('Home');
2733 }
2734
2735 echo $this->disp_params['block_start'];
2736+ $this->disp_title();
2737 echo $this->disp_params['list_start'];
2738
2739 echo $this->disp_params['item_start'];
2740@@ -182,6 +175,4 @@
2741 return true;
2742 }
2743 }
2744-
2745-
2746 ?>
2747
2748=== added directory 'blogs/plugins/user_tools_widget'
2749=== renamed file 'blogs/inc/widgets/widgets/_user_tools.widget.php' => 'blogs/plugins/user_tools_widget/_user_tools.widget.php'
2750--- blogs/inc/widgets/widgets/_user_tools.widget.php 2009-12-06 09:37:19 +0000
2751+++ blogs/plugins/user_tools_widget/_user_tools.widget.php 2009-12-21 15:13:16 +0000
2752@@ -39,8 +39,10 @@
2753 */
2754 function user_tools_Widget( $db_row = NULL )
2755 {
2756+ $this->widget_name = $this->T_('User Tools');
2757+ $this->widget_title = $this->T_('User tools');
2758 // Call parent constructor:
2759- parent::ComponentWidget( $db_row, 'core', 'user_tools' );
2760+ parent::ComponentWidget( $db_row, 'widget', 'user_tools' );
2761 }
2762
2763
2764@@ -53,74 +55,60 @@
2765 function get_param_definitions( $params )
2766 {
2767 $r = array_merge( array(
2768- 'title' => array(
2769- 'label' => T_('Block title'),
2770- 'note' => T_( 'Title to display in your skin.' ),
2771- 'size' => 40,
2772- 'defaultvalue' => T_('User tools'),
2773- ),
2774 'user_login_link' => array(
2775- 'label' => T_( 'Login link'),
2776+ 'label' => $this->T_( 'Login link'),
2777 'size' => 40,
2778- 'note' => T_( 'Link text to display' ),
2779+ 'note' => $this->T_( 'Link text to display' ),
2780 'type' => 'text',
2781- 'defaultvalue' => T_( 'Login' ),
2782+ 'defaultvalue' => $this->T_( 'Login' ),
2783 ),
2784 'user_logout_link' => array(
2785- 'label' => T_( 'Logout link'),
2786+ 'label' => $this->T_( 'Logout link'),
2787 'size' => 40,
2788- 'note' => T_( 'Link text to display' ),
2789+ 'note' => $this->T_( 'Link text to display' ),
2790 'type' => 'text',
2791- 'defaultvalue' => T_( 'Logout' ),
2792+ 'defaultvalue' => $this->T_( 'Logout' ),
2793 ),
2794 'user_profile_link' => array(
2795- 'label' => T_( 'Profile link'),
2796+ 'label' => $this->T_( 'Profile link'),
2797 'size' => 40,
2798- 'note' => T_( 'Link text to display' ),
2799+ 'note' => $this->T_( 'Link text to display' ),
2800 'type' => 'text',
2801- 'defaultvalue' => T_( 'Profile' ),
2802+ 'defaultvalue' => $this->T_( 'Profile' ),
2803 ),
2804 'user_subs_link' => array(
2805- 'label' => T_( 'Subscriptions link'),
2806+ 'label' => $this->T_( 'Subscriptions link'),
2807 'size' => 40,
2808- 'note' => T_( 'Link text to display' ),
2809+ 'note' => $this->T_( 'Link text to display' ),
2810 'type' => 'text',
2811- 'defaultvalue' => T_( 'Subscriptions' ),
2812+ 'defaultvalue' => $this->T_( 'Subscriptions' ),
2813 ),
2814 'user_admin_link' => array(
2815- 'label' => T_( 'Admin link'),
2816+ 'label' => $this->T_( 'Admin link'),
2817 'size' => 40,
2818- 'note' => T_( 'Link text to display' ),
2819+ 'note' => $this->T_( 'Link text to display' ),
2820 'type' => 'text',
2821- 'defaultvalue' => T_( 'Admin' ),
2822+ 'defaultvalue' => $this->T_( 'Admin' ),
2823 ),
2824 'user_register_link' => array(
2825- 'label' => T_( 'Register link'),
2826+ 'label' => $this->T_( 'Register link'),
2827 'size' => 40,
2828- 'note' => T_( 'Link text to display' ),
2829+ 'note' => $this->T_( 'Link text to display' ),
2830 'type' => 'text',
2831- 'defaultvalue' => T_( 'Register' ),
2832+ 'defaultvalue' => $this->T_( 'Register' ),
2833 ),
2834 ), parent::get_param_definitions( $params ) );
2835
2836 return $r;
2837 }
2838
2839- /**
2840- * Get name of widget
2841- */
2842- function get_name()
2843- {
2844- return T_('User Tools');
2845- }
2846-
2847
2848 /**
2849 * Get a very short desc. Used in the widget list.
2850 */
2851 function get_short_desc()
2852 {
2853- return format_to_output($this->disp_params['title']);
2854+ return format_to_output($this->disp_params['widget_title']);
2855 }
2856
2857
2858@@ -129,7 +117,7 @@
2859 */
2860 function get_desc()
2861 {
2862- return T_('Display user tools: Log in, Admin, Profile, Subscriptions, Log out');
2863+ return $this->T_('Display user tools: Log in, Admin, Profile, Subscriptions, Log out');
2864 }
2865
2866
2867@@ -145,9 +133,7 @@
2868 // User tools:
2869 echo $this->disp_params['block_start'];
2870
2871- echo $this->disp_params['block_title_start'];
2872- echo $this->disp_params['title'];
2873- echo $this->disp_params['block_title_end'];
2874+ $this->disp_title();
2875
2876 echo $this->disp_params['list_start'];
2877 user_login_link( $this->disp_params['item_start'], $this->disp_params['item_end'], $this->disp_params[ 'user_login_link' ] );
2878
2879=== modified file 'blogs/skins/asevo/style.css'
2880--- blogs/skins/asevo/style.css 2009-07-21 22:11:10 +0000
2881+++ blogs/skins/asevo/style.css 2009-12-21 15:13:19 +0000
2882@@ -151,7 +151,7 @@
2883 margin: 2em 0 0 0;
2884 padding: 0;
2885 }
2886-div.evo_title_area div.widget_core_coll_tagline {
2887+div.evo_title_area div.widget_widget_coll_tagline {
2888 letter-spacing: 4px;
2889 margin: 1ex 0;
2890 }
2891@@ -284,12 +284,12 @@
2892 * Special SideItems:
2893 */
2894 .widget_plugin_evo_Calr,
2895-.widget_core_coll_title,
2896-.widget_core_coll_longdesc {
2897+.widget_widget_coll_title,
2898+.widget_widget_coll_longdesc {
2899 padding: 0;
2900 }
2901-.widget_core_coll_title,
2902-.widget_core_coll_longdesc {
2903+.widget_widget_coll_title,
2904+.widget_widget_coll_longdesc {
2905 border-bottom: none;
2906 }
2907
2908
2909=== modified file 'blogs/skins/custom/style.css'
2910--- blogs/skins/custom/style.css 2009-07-21 22:11:10 +0000
2911+++ blogs/skins/custom/style.css 2009-12-21 15:13:19 +0000
2912@@ -164,7 +164,7 @@
2913 color: #9ae;
2914 }
2915
2916-.widget_core_coll_tagline {
2917+.widget_widget_coll_tagline {
2918 color: #fff;
2919 letter-spacing: 4px;
2920 text-align: center;
2921@@ -303,13 +303,13 @@
2922
2923 /* Special SideItems: */
2924 .widget_plugin_evo_Calr,
2925-.widget_core_coll_title,
2926-.widget_core_coll_longdesc {
2927+.widget_widget_coll_title,
2928+.widget_widget_coll_longdesc {
2929 /* background-color: #fee; */
2930 padding: 0;
2931 border-bottom: 0;
2932 }
2933-.widget_core_coll_title a {
2934+.widget_widget_coll_title a {
2935 text-decoration: none;
2936 color: #78a;
2937 }
2938
2939=== modified file 'blogs/skins/evocamp/style.css'
2940--- blogs/skins/evocamp/style.css 2009-07-21 22:11:10 +0000
2941+++ blogs/skins/evocamp/style.css 2009-12-21 15:13:19 +0000
2942@@ -355,7 +355,7 @@
2943
2944 /* -------------------[ Misc Tags and Classes ]------------------- */
2945
2946-#header .widget_core_coll_tagline {
2947+#header .widget_widget_coll_tagline {
2948 color:#FAF7E8;
2949 font-size: 12pt;
2950 padding: 0 100px;
2951@@ -599,6 +599,6 @@
2952 text-decoration: underline;
2953 }
2954
2955-div.widget_core_coll_title {
2956+div.widget_widget_coll_title {
2957 padding-top: 45px;
2958 }
2959
2960=== modified file 'blogs/skins/evopress/style.css'
2961--- blogs/skins/evopress/style.css 2009-07-21 22:11:10 +0000
2962+++ blogs/skins/evopress/style.css 2009-12-21 15:13:19 +0000
2963@@ -483,7 +483,7 @@
2964 }
2965
2966
2967-div.widget_core_coll_title {
2968+div.widget_widget_coll_title {
2969 padding-top: 70px;
2970 }
2971
2972
2973=== modified file 'blogs/skins/glossyblue/style.css'
2974--- blogs/skins/glossyblue/style.css 2009-07-21 22:11:10 +0000
2975+++ blogs/skins/glossyblue/style.css 2009-12-21 15:13:19 +0000
2976@@ -112,7 +112,7 @@
2977 height: 60px;
2978 }
2979
2980-#header .widget_core_coll_tagline{
2981+#header .widget_widget_coll_tagline{
2982 position: absolute;
2983 left: 110px;
2984 bottom: 3px;
2985@@ -420,13 +420,13 @@
2986 }
2987 /*blogroll */
2988 ul.list-blogroll li,
2989-li.widget_core_linkblog ul li ul li{
2990+li.widget_widget_linkblog ul li ul li{
2991 background: url(img/mini-blogroll.gif) no-repeat !important;
2992 padding-left: 16px !important;
2993 }
2994 /*category widget */
2995 ul.list-cat li, li.widget_categories li,
2996-li.widget_core_coll_category_list ul li{
2997+li.widget_widget_coll_category_list ul li{
2998 background: url(img/mini-category.gif) no-repeat !important;
2999 padding-left: 20px !important;
3000 }
3001@@ -439,7 +439,7 @@
3002 /*pages widget */
3003 ul.list-page li, li.widget_pages li,
3004 li.widget_recent_entries li,
3005-li.widget_core_coll_page_list ul li{
3006+li.widget_widget_coll_page_list ul li{
3007 background: url(img/mini-page.gif) no-repeat !important;
3008 padding-left: 20px !important;
3009 }
3010@@ -528,25 +528,25 @@
3011 }
3012
3013
3014-#footer div.widget_core_coll_comment_list ul {
3015+#footer div.widget_widget_coll_comment_list ul {
3016 list-style: none;
3017 padding: 0px;
3018 }
3019
3020-#footer div.widget_core_coll_comment_list ul li {
3021+#footer div.widget_widget_coll_comment_list ul li {
3022 background: url(img/mini-footer-comments.gif) no-repeat;
3023 padding: 0px 0px 10px 20px;
3024 }
3025
3026-#footer div.widget_core_coll_page_list ul,
3027-#footer div.widget_core_coll_post_list ul {
3028+#footer div.widget_widget_coll_page_list ul,
3029+#footer div.widget_widget_coll_post_list ul {
3030 list-style: none;
3031 padding: 0px;
3032 font-size: 92%;
3033 line-height: 110%;
3034 }
3035-#footer div.widget_core_coll_page_list ul li,
3036-#footer div.widget_core_coll_post_list ul li {
3037+#footer div.widget_widget_coll_page_list ul li,
3038+#footer div.widget_widget_coll_post_list ul li {
3039 background: url(img/mini-footer-post.gif) no-repeat;
3040 padding: 0px 0px 10px 20px;
3041 font-size: 107%;
3042
3043=== modified file 'blogs/skins/miami_blue/style.css'
3044--- blogs/skins/miami_blue/style.css 2009-07-21 22:11:10 +0000
3045+++ blogs/skins/miami_blue/style.css 2009-12-21 15:13:19 +0000
3046@@ -117,7 +117,7 @@
3047 color: #fff;
3048 text-decoration: none;
3049 }
3050-div.pageHeader div.widget_core_coll_tagline {
3051+div.pageHeader div.widget_widget_coll_tagline {
3052 color: #fff;
3053 letter-spacing: 2px;
3054 margin: 3px 0 0 13px;
3055
3056=== modified file 'blogs/skins/natural_pink/style.css'
3057--- blogs/skins/natural_pink/style.css 2009-07-21 22:11:10 +0000
3058+++ blogs/skins/natural_pink/style.css 2009-12-21 15:13:19 +0000
3059@@ -155,7 +155,7 @@
3060 div.pageHeader h1 a:hover {
3061 color: #c0c;
3062 }
3063-div.pageHeader div.widget_core_coll_tagline {
3064+div.pageHeader div.widget_widget_coll_tagline {
3065 letter-spacing: 4px;
3066 margin: 1ex 0;
3067 font-size: 109%;
3068@@ -254,11 +254,11 @@
3069
3070 /* Special SideItems: */
3071 .widget_plugin_evo_Calr,
3072-.widget_core_coll_title,
3073-.widget_core_coll_longdesc {
3074+.widget_widget_coll_title,
3075+.widget_widget_coll_longdesc {
3076 padding: 0;
3077 }
3078-.widget_core_coll_title a {
3079+.widget_widget_coll_title a {
3080 color: #f09;
3081 }
3082
3083
3084=== modified file 'blogs/skins/nifty_corners/style.css'
3085--- blogs/skins/nifty_corners/style.css 2009-07-21 22:11:10 +0000
3086+++ blogs/skins/nifty_corners/style.css 2009-12-21 15:13:19 +0000
3087@@ -165,7 +165,7 @@
3088 div.pageHeader h1 a:hover {
3089 color: #c0c;
3090 }
3091-div.pageHeader div.widget_core_coll_tagline {
3092+div.pageHeader div.widget_widget_coll_tagline {
3093 letter-spacing: 4px;
3094 padding: 0 0 3px 0;
3095 font-size: 109%;
3096@@ -268,11 +268,11 @@
3097
3098 /* Special SideItems: */
3099 .widget_plugin_evo_Calr,
3100-.widget_core_coll_title,
3101-.widget_core_coll_longdesc {
3102+.widget_widget_coll_title,
3103+.widget_widget_coll_longdesc {
3104 padding: 0;
3105 }
3106-.widget_core_coll_title a {
3107+.widget_widget_coll_title a {
3108 color: #06a3c4;
3109 }
3110
3111
3112=== modified file 'blogs/skins/pixelgreen/style.css'
3113--- blogs/skins/pixelgreen/style.css 2009-07-21 22:11:10 +0000
3114+++ blogs/skins/pixelgreen/style.css 2009-12-21 15:13:19 +0000
3115@@ -153,7 +153,7 @@
3116 margin: 0 auto; padding: 0;
3117 position: relative;
3118 }
3119-#header-content .widget_core_coll_title h1 a {
3120+#header-content .widget_widget_coll_title h1 a {
3121 font: bold 40px 'Trebuchet MS', Sans-serif;
3122 letter-spacing: -2px;
3123 color: #FFF;
3124@@ -162,7 +162,7 @@
3125
3126 }
3127
3128-#header-content .widget_core_coll_tagline {
3129+#header-content .widget_widget_coll_tagline {
3130 font: bold 12px 'Trebuchet Ms', Sans-serif;
3131 text-transform: none;
3132 color: #FFF;
3133@@ -382,7 +382,7 @@
3134 .clear { clear: both; }
3135 .gray { color: #BFBFBF; }
3136
3137-#sidebar .widget_core_coll_xml_feeds ul.sidemenu li a {
3138+#sidebar .widget_widget_coll_xml_feeds ul.sidemenu li a {
3139 display: inline;
3140 }
3141
3142
3143=== modified file 'blogs/skins/terrafirma/style.css'
3144--- blogs/skins/terrafirma/style.css 2009-12-05 14:46:02 +0000
3145+++ blogs/skins/terrafirma/style.css 2009-12-21 15:13:19 +0000
3146@@ -152,7 +152,7 @@
3147 text-decoration:none;
3148 border:none;
3149 }
3150-.widget_core_coll_tagline
3151+.widget_widget_coll_tagline
3152 {
3153 font-size: 100%;
3154 font-weight: normal;
3155
3156=== modified file 'blogs/skins/vastitude/style.css'
3157--- blogs/skins/vastitude/style.css 2009-12-05 14:46:02 +0000
3158+++ blogs/skins/vastitude/style.css 2009-12-21 15:13:19 +0000
3159@@ -9,17 +9,17 @@
3160 font:86% Tahoma, "Lucida Sans", Arial, Verdana, Sans-Serif;
3161 background:#4c4c4e;}
3162
3163-li.widget_core_coll_title, li.widget_core_coll_longdesc, li.widget_plugin_evo_Calr, li.widget_core_coll_search_form, li.widget_core_linkblog, li.widget_core_coll_category_list, li.widget_core_coll_common_links, li.widget_core_coll_xml_feeds, li.widget_core_user_tools, li.widget_core_coll_xml_feeds ul li, li.prevnext {list-style:none;}
3164+li.widget_widget_coll_title, li.widget_widget_coll_longdesc, li.widget_plugin_evo_Calr, li.widget_widget_coll_search_form, li.widget_widget_linkblog, li.widget_widget_coll_category_list, li.widget_widget_coll_common_links, li.widget_widget_coll_xml_feeds, li.widget_widget_user_tools, li.widget_widget_coll_xml_feeds ul li, li.prevnext {list-style:none;}
3165 table.prevnext_post {margin: 20px 0;}
3166 div#sidebar {margin-left:-10px;}
3167 div#sidebar h2 {font: 1.4em Tahoma, "Lucida Sans", Arial, Verdana, Sans-Serif;color:#4b3528;}
3168-li.widget_core_coll_title h2 a {font-size: 1.1em; text-decoration:none;}
3169-li.widget_core_coll_search_form h2 {}
3170-
3171-li.widget_core_coll_xml_feeds h2 img {display:none;}
3172-li.widget_core_coll_xml_feeds {background:url(img/vast_rss.gif) top left no-repeat; margin-top:28px;padding-top:50px;}
3173-
3174-li.widget_core_coll_longdesc, li.widget_core_coll_search_form, li.widget_core_coll_category_list, li.widget_core_coll_common_links, li.widget_core_coll_xml_feeds {margin-bottom:20px;}
3175+li.widget_widget_coll_title h2 a {font-size: 1.1em; text-decoration:none;}
3176+li.widget_widget_coll_search_form h2 {}
3177+
3178+li.widget_widget_coll_xml_feeds h2 img {display:none;}
3179+li.widget_widget_coll_xml_feeds {background:url(img/vast_rss.gif) top left no-repeat; margin-top:28px;padding-top:50px;}
3180+
3181+li.widget_widget_coll_longdesc, li.widget_widget_coll_search_form, li.widget_widget_coll_category_list, li.widget_widget_coll_common_links, li.widget_widget_coll_xml_feeds {margin-bottom:20px;}
3182
3183 /* COLOR MANAGEMENT */
3184

Subscribers

People subscribed via source and target branches