[Evocms-plugins-commits] SF.net SVN: evocms-plugins:[793] sorted_bloglist_plugin/trunk/ _sorted_blo
Brought to you by:
blueyed
From: <af...@us...> - 2008-07-28 01:56:09
|
Revision: 793 http://evocms-plugins.svn.sourceforge.net/evocms-plugins/?rev=793&view=rev Author: afwas Date: 2008-07-28 01:56:06 +0000 (Mon, 28 Jul 2008) Log Message: ----------- Bugfix thanks to cslepage. Modified Paths: -------------- sorted_bloglist_plugin/trunk/_sorted_bloglist.plugin.php Modified: sorted_bloglist_plugin/trunk/_sorted_bloglist.plugin.php =================================================================== --- sorted_bloglist_plugin/trunk/_sorted_bloglist.plugin.php 2008-07-27 21:44:22 UTC (rev 792) +++ sorted_bloglist_plugin/trunk/_sorted_bloglist.plugin.php 2008-07-28 01:56:06 UTC (rev 793) @@ -24,7 +24,7 @@ var $name = 'Sorted Public bloglist'; var $code = 'sorted_bloglist'; var $priority = 50; - var $version = '0.6'; + var $version = '0.6.1'; var $author = 'Foppe Hemminga'; var $group = 'Amazing Discoveries'; var $help_url = 'http://www.blog.hemminga.net/index.php/2008/02/09/sorted-public-bloglist?blog=8'; @@ -95,16 +95,16 @@ $params['item_selected'] = '<li class="selected"><a href="$blog_url$" title="" class="mBlog$blog_ID$ selected">$blog_name$</a></li>'; $params['item_normal'] = '<li><a href="$blog_url$" title="" class="mBlog$blog_ID$ default">$blog_name$</a></li>'; - // $params['items_before'] = '<div class="widget_core_colls_list_public">'; - // $params['items_after'] = '</div>'; + $params['items_before'] = '<div class="widget_core_colls_list_public widget_plugin_sorted_bloglist">'; + $params['items_after'] = '</div>'; $this->init_display( $params ); $this->show_blogs( $params ); echo $this->disp_params['list_end']."\n"; - // echo $this->disp_params['items_after']."\n"; - echo $this->disp_params['block_end']."\n"; + echo $this->disp_params['items_after']."\n"; + // echo $this->disp_params['block_end']."\n"; } @@ -115,9 +115,18 @@ if ( $this->Settings->get( 'show_member_blogs' ) && is_logged_in() ) { // fetch public blogs, arranged in plugin Settings - $public_blogs = $this->get_userBlogs(); + $public_blogs = $this->get_userBlogs(); + pre_dump($public_blogs); // only load blogs this user is member of - $public_blogs += $this->BlogCache->load_user_blogs(); + $user_Blogs = $this->BlogCache->load_user_blogs(); + foreach ( $user_Blogs as $value) + { + if ( ! in_array( $value, $public_blogs ) ) + { + $public_blogs[] = $value; + } + } + pre_dump($public_blogs); } else { @@ -135,9 +144,9 @@ } // Start the output - echo $this->disp_params['block_start']."\n"; - // echo $this->disp_params['items_before']."\n"; - if( $this->Settings->get( 'title' ) ) + // echo $this->disp_params['block_start']."\n"; + echo $this->disp_params['items_before']."\n"; + if( $this->disp_params[ 'title' ] ) { echo '<h2>' . $this->disp_params[ 'title' ] . '</h2>' . "\n"; } @@ -175,7 +184,7 @@ function get_userBlogs() { - $sort_blogs = $this->Settings->get( 'available_blogs' ); + $sort_blogs = $this->disp_params[ 'available_blogs' ]; // disp_params because it takes Settingsa from the widget, not the plugin $sort_blogs = str_replace(' ', '', $sort_blogs); $sort_blogs = explode( ',', $sort_blogs); $get_all_Blogs = array(); @@ -190,7 +199,6 @@ } $get_all_Blogs[] = $curr_blog_ID; // Build a new array } - return $get_all_Blogs; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |