├── languages ├── widget_blogs-si_LK.mo ├── widget_blogs.pot └── widget_blogs-si_LK.po ├── .gitmodules ├── changelog.txt ├── README.md └── widget-blogs.php /languages/widget_blogs-si_LK.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wpmudev/blogs-widget/master/languages/widget_blogs-si_LK.mo -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "dash-notice"] 2 | path = dash-notice 3 | url = git@bitbucket.org:incsub/wpmudev-dashboard-notification.git 4 | branch = master 5 | -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | Plugin Name: Blogs Widget 2 | Author: S H Mohanjith (Incsub), Andrew Billits (Incsub) 3 | 4 | Change Log: 5 | ---------------------------------------------------------------------- 6 | ---------------------------------------------------------------------- 7 | 8 | 1.0.9.4 - 12/16/2013 9 | ---------------------------------------------------------------------- 10 | - WordPress 3.8 compatibility 11 | 12 | 1.0.9.3 - 11/11/2013 13 | ---------------------------------------------------------------------- 14 | - Blog Template compatibility fixes 15 | 16 | 1.0.9.2 - 04/28/2013 17 | ---------------------------------------------------------------------- 18 | - SQL query improvements 19 | 20 | 1.0.9.1 - 12/17/2012 21 | ---------------------------------------------------------------------- 22 | - WordPress 3.5 Compatibility 23 | - Fixed plugin link 24 | 25 | 1.0.9 - 05/08/2011 26 | ---------------------------------------------------------------------- 27 | - More internationalization improvements 28 | 29 | 1.0.8 - 04/08/2011 30 | ---------------------------------------------------------------------- 31 | - Rename language files for clarity 32 | 33 | 1.0.7 - 04/08/2011 34 | ---------------------------------------------------------------------- 35 | - Allow users to exclude template blogs 36 | 37 | 1.0.6 - 10/22/2011 38 | ---------------------------------------------------------------------- 39 | - Fixed: Order most recent 40 | 41 | 1.0.5 - 10/09/2011 42 | ---------------------------------------------------------------------- 43 | - Display only public blogs 44 | 45 | 1.0.4 - 05/19/2011 46 | ---------------------------------------------------------------------- 47 | - Fixed: Widget options not saved 48 | 49 | 1.0.3 - 05/07/2011 50 | ---------------------------------------------------------------------- 51 | - Multiple blogs widgets 52 | - Fixed: Undefined function 'get_blog_avatar' 53 | 54 | 1.0.2 - 01/07/2011 55 | ---------------------------------------------------------------------- 56 | - 3.1+ compatibility update 57 | 58 | 1.0.1 - 05/01/2009 59 | ---------------------------------------------------------------------- 60 | - Widget is now multi-site aware 61 | 62 | 1.0.0 - 03/26/2009 63 | ---------------------------------------------------------------------- 64 | - Initial release 65 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Blogs Widget 2 | 3 | **INACTIVE NOTICE: This plugin is unsupported by WPMUDEV, we've published it here for those technical types who might want to fork and maintain it for their needs.** 4 | 5 | Show a feed of recently updated blogs, with avatars, from across an entire Multisite network. 6 | 7 | * Set a feed of recently updated content 8 | * Drag and drop widget integration 9 | * Pulls content from across a network 10 | * Show public and private posts 11 | * Select how many posts to feature 12 | * Show avatars next to content 13 | 14 | 15 | ## Blogs Widget is an incredibly simple, effective and configurable way to show recently updated sites across your entire network. 16 | 17 | Help visitors discover new content and provide users another way to engage. Add a clear simple feed to your homepage or any widget area on your Multisite. 18 | 19 | ### Enhanced your network 20 | 21 | Setup and configuration is native to core. Simply drag the Blogs widget into whatever sidebar should display the content feed. 22 | 23 | ![Adds an entirely new widget][34] 24 | 25 | Adds an entirely new widget 26 | 27 | ### Simplicity and control 28 | 29 | Mange each element with clear simple controls. No hidden modules. Adjust each option right from the ‘Widgets’ screen. 30 | 31 | ![A familiar configuration panel][35] 32 | 33 | A familiar configuration panel 34 | 35 | Share and see fresh content from across your Multisite network at a glance with Blog Widget. 36 | 37 | Once installed go to **Plugins** in the network admin dashboard and Network Activate the Blogs Widget plugin. 38 | 39 | ### To Use: 40 | 41 | 1. Once activated you just go **Appearance > Widgets** in the admin area of any site on your network. 42 | 43 | 2\. Drag the Blogs widget to your desired sidebar 44 | 45 | ![][37] 46 | 47 | 3. Configure the blog widget to your preferred options and then click **Save** 48 | 49 | ![][38] 50 | 51 | 4. When you view your site you will now see it displayed in your sidebar. 52 | 53 | [34]: https://premium.wpmudev.org/wp-content/uploads/2009/03/blogs-drag.jpg 54 | [35]: https://premium.wpmudev.org/wp-content/uploads/2009/03/blogs-widget.jpg 55 | [37]: https://premium.wpmudev.org/wp-content/uploads/2009/03/blogwidget62.jpg "Add blog widget to sidebar" 56 | [38]: https://premium.wpmudev.org/wp-content/uploads/2009/03/blogwidget61.jpg "Blog widget options" 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /languages/widget_blogs.pot: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 Blogs Widget 2 | # This file is distributed under the same license as the Blogs Widget package. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: Blogs Widget 1.0.9.2\n" 6 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/widget-blogs\n" 7 | "POT-Creation-Date: 2013-10-14 20:39:12+00:00\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n" 12 | "Last-Translator: FULL NAME \n" 13 | "Language-Team: LANGUAGE \n" 14 | 15 | #: widget-blogs.php:67 16 | msgid "Display Blogs Pages" 17 | msgstr "" 18 | 19 | #: widget-blogs.php:69 widget-blogs.php:79 widget-blogs.php:154 20 | #: widget-blogs.php:173 21 | msgid "Blogs" 22 | msgstr "" 23 | 24 | #: widget-blogs.php:187 25 | msgid "Title" 26 | msgstr "" 27 | 28 | #: widget-blogs.php:191 29 | msgid "Display" 30 | msgstr "" 31 | 32 | #: widget-blogs.php:193 33 | msgid "Avatar + Blog Name" 34 | msgstr "" 35 | 36 | #: widget-blogs.php:194 37 | msgid "Avatar Only" 38 | msgstr "" 39 | 40 | #: widget-blogs.php:195 41 | msgid "Blog Name Only" 42 | msgstr "" 43 | 44 | #: widget-blogs.php:201 45 | msgid "Blog Name Characters" 46 | msgstr "" 47 | 48 | #: widget-blogs.php:216 49 | msgid "Public Only" 50 | msgstr "" 51 | 52 | #: widget-blogs.php:218 widget-blogs.php:225 53 | msgid "Yes" 54 | msgstr "" 55 | 56 | #: widget-blogs.php:219 widget-blogs.php:226 57 | msgid "No" 58 | msgstr "" 59 | 60 | #: widget-blogs.php:223 61 | msgid "Include Template Blogs" 62 | msgstr "" 63 | 64 | #: widget-blogs.php:230 65 | msgid "Order" 66 | msgstr "" 67 | 68 | #: widget-blogs.php:232 69 | msgid "Most Recent" 70 | msgstr "" 71 | 72 | #: widget-blogs.php:233 73 | msgid "Random" 74 | msgstr "" 75 | 76 | #: widget-blogs.php:236 77 | msgid "Number" 78 | msgstr "" 79 | 80 | #: widget-blogs.php:252 81 | msgid "Avatar Size" 82 | msgstr "" 83 | 84 | #: widget-blogs.php:254 85 | msgid "16px" 86 | msgstr "" 87 | 88 | #: widget-blogs.php:255 89 | msgid "32px" 90 | msgstr "" 91 | 92 | #: widget-blogs.php:256 93 | msgid "48px" 94 | msgstr "" 95 | 96 | #: widget-blogs.php:257 97 | msgid "96px" 98 | msgstr "" 99 | 100 | #: widget-blogs.php:258 101 | msgid "128px" 102 | msgstr "" 103 | 104 | #: widget-blogs.php:276 105 | msgid "" 106 | "Please install the latest version of our free " 108 | "Update Notifications plugin which helps you stay up-to-date with the " 109 | "most stable, secure versions of WPMU DEV themes and plugins. More information »" 112 | msgstr "" 113 | 114 | #. Plugin Name of the plugin/theme 115 | msgid "Blogs Widget" 116 | msgstr "" 117 | 118 | #. Plugin URI of the plugin/theme 119 | msgid "http://premium.wpmudev.org/project/blogs-widget" 120 | msgstr "" 121 | 122 | #. Description of the plugin/theme 123 | msgid "" 124 | "Show recently updated blogs across your site, with avatars, through this " 125 | "handy widget" 126 | msgstr "" 127 | 128 | #. Author of the plugin/theme 129 | msgid "S H Mohanjith (Incsub), Andrew Billits (Incsub)" 130 | msgstr "" 131 | 132 | #. Author URI of the plugin/theme 133 | msgid "http://premium.wpmudev.org" 134 | msgstr "" 135 | -------------------------------------------------------------------------------- /languages/widget_blogs-si_LK.po: -------------------------------------------------------------------------------- 1 | # Translation of the WordPress plugin Blogs Widget 1.0.2 by S H Mohanjith (Incsub), Andrew Billits (Incsub). 2 | # Copyright (C) 2011 S H Mohanjith (Incsub), Andrew Billits (Incsub) 3 | # This file is distributed under the same license as the Blogs Widget package. 4 | # FIRST AUTHOR , 2011. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: Blogs Widget 1.0.2\n" 9 | "Report-Msgid-Bugs-To: http://wordpress.org/tag/blogs-widget\n" 10 | "POT-Creation-Date: 2011-01-07 20:35+0530\n" 11 | "PO-Revision-Date: 2012-04-08 20:49+0530\n" 12 | "Last-Translator: S H Mohanjith \n" 13 | "Language-Team: \n" 14 | "Language: \n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "X-Poedit-Language: Sinhalese\n" 19 | "X-Poedit-Country: SRI LANKA\n" 20 | "X-Poedit-SourceCharset: utf-8\n" 21 | 22 | #: blogs-widget.php:76 23 | #: widget-blogs.php:76 24 | msgid "Title" 25 | msgstr "මාත්‍රුකාව" 26 | 27 | #: blogs-widget.php:80 28 | #: widget-blogs.php:80 29 | msgid "Display" 30 | msgstr "" 31 | 32 | #: blogs-widget.php:82 33 | #: widget-blogs.php:82 34 | msgid "Avatar + Blog Name" 35 | msgstr "" 36 | 37 | #: blogs-widget.php:83 38 | #: widget-blogs.php:83 39 | msgid "Avatar Only" 40 | msgstr "අවතාරය පමණයි" 41 | 42 | #: blogs-widget.php:84 43 | #: widget-blogs.php:84 44 | msgid "Blog Name Only" 45 | msgstr "" 46 | 47 | #: blogs-widget.php:87 48 | #: widget-blogs.php:87 49 | msgid "Blog Name Characters" 50 | msgstr "" 51 | 52 | #: blogs-widget.php:102 53 | #: widget-blogs.php:102 54 | msgid "Order" 55 | msgstr "" 56 | 57 | #: blogs-widget.php:104 58 | #: widget-blogs.php:104 59 | msgid "Most Recent" 60 | msgstr "අලුත්ම" 61 | 62 | #: blogs-widget.php:105 63 | #: widget-blogs.php:105 64 | msgid "Random" 65 | msgstr "" 66 | 67 | #: blogs-widget.php:108 68 | #: widget-blogs.php:108 69 | msgid "Number" 70 | msgstr "" 71 | 72 | #: blogs-widget.php:123 73 | #: widget-blogs.php:123 74 | msgid "Avatar Size" 75 | msgstr "අවතාරයේ ප්‍රමාණය" 76 | 77 | #: blogs-widget.php:125 78 | #: widget-blogs.php:125 79 | msgid "16px" 80 | msgstr "" 81 | 82 | #: blogs-widget.php:126 83 | #: widget-blogs.php:126 84 | msgid "32px" 85 | msgstr "" 86 | 87 | #: blogs-widget.php:127 88 | #: widget-blogs.php:127 89 | msgid "48px" 90 | msgstr "" 91 | 92 | #: blogs-widget.php:128 93 | #: widget-blogs.php:128 94 | msgid "96px" 95 | msgstr "" 96 | 97 | #: blogs-widget.php:129 98 | #: widget-blogs.php:129 99 | msgid "128px" 100 | msgstr "" 101 | 102 | #: blogs-widget.php:196 103 | #: blogs-widget.php:197 104 | #: blogs-widget.php:200 105 | #: blogs-widget.php:201 106 | #: widget-blogs.php:196 107 | #: widget-blogs.php:197 108 | #: widget-blogs.php:200 109 | #: widget-blogs.php:201 110 | msgid "Blogs" 111 | msgstr "" 112 | 113 | #. Plugin Name of the plugin/theme 114 | msgid "Blogs Widget" 115 | msgstr "" 116 | 117 | #. Plugin URI of the plugin/theme 118 | msgid "http://premium.wpmudev.org/project/footer-content" 119 | msgstr "" 120 | 121 | #. Description of the plugin/theme 122 | msgid "Show recently updated blogs across your site, with avatars, through this handy widget" 123 | msgstr "" 124 | 125 | #. Author of the plugin/theme 126 | msgid "S H Mohanjith (Incsub), Andrew Billits (Incsub)" 127 | msgstr "" 128 | 129 | #. Author URI of the plugin/theme 130 | msgid "http://premium.wpmudev.org" 131 | msgstr "" 132 | 133 | -------------------------------------------------------------------------------- /widget-blogs.php: -------------------------------------------------------------------------------- 1 | __('Display Blogs Pages', $this->translation_domain) ); 70 | $control_ops = array( 71 | 'title' => __('Blogs', $this->translation_domain), 72 | 'display' => 'blog_name', 73 | 'blog-name-characters' => 30, 74 | 'public-only' => 'yes', 75 | 'templates' => 'no', 76 | 'order' => 'random', 77 | 'number' => 10, 78 | 'avatar-size' => 16 79 | ); 80 | 81 | parent::__construct('blogs_widget', __('Blogs', $this->translation_domain), $widget_ops, $control_ops ); 82 | } 83 | 84 | public function widget($args, $instance) { 85 | global $wpdb, $current_site, $post, $blogs_tree; 86 | 87 | extract($args); 88 | 89 | $defaults = array('count' => 10, 'blogname' => 'wordpress'); 90 | $options = $instance; 91 | 92 | foreach ( $defaults as $key => $value ) 93 | if ( !isset($options[$key]) ) 94 | $options[$key] = $defaults[$key]; 95 | 96 | $title = apply_filters('widget_title', $options['title']); 97 | ?> 98 | 99 | 100 |
101 | get_col($wpdb->prepare("SELECT * FROM {$wpdb->base_prefix}nbt_templates WHERE network_id = %d", $wpdb->siteid)); 109 | if ($template_blogs && is_array($template_blogs) && count($template_blogs) > 0) { 110 | $template_where .= " AND blog_id NOT IN ( " . join(',', $template_blogs). " ) "; 111 | } 112 | } 113 | //=================================================// 114 | if ( $options['order'] == 'most_recent' ) { 115 | $query = "SELECT blog_id FROM " . $wpdb->base_prefix . "blogs WHERE site_id = '" . $wpdb->siteid . "' AND spam != '1' AND archived != '1' AND deleted != '1' {$public_where} {$template_where} ORDER BY registered DESC LIMIT %d "; 116 | } else if ( $options['order'] == 'random' ) { 117 | $query = "SELECT blog_id FROM " . $wpdb->base_prefix . "blogs WHERE site_id = '" . $wpdb->siteid . "' AND spam != '1' AND archived != '1' AND deleted != '1' {$public_where} {$template_where} ORDER BY RAND() LIMIT %d "; 118 | } 119 | $blogs = $wpdb->get_results( $wpdb->prepare($query, $options['number']), ARRAY_A ); 120 | if (count($blogs) > 0){ 121 | if ( $options['display'] == 'blog_name' || $options['display'] == 'avatar_blog_name' ) { 122 | echo ''; 142 | } 143 | } 144 | //=================================================// 145 | ?> 146 | 147 | __('Blogs', $this->translation_domain), 153 | 'display' => 'blog_name', 'blog-name-characters' => 30, 154 | 'public-only' => 'yes', 'templates' => 'no', 'order' => 'random', 'number' => 10, 155 | 'avatar-size' => 16 156 | ) ); 157 | $instance['title'] = $new_instance['title']; 158 | $instance['display'] = $new_instance['display']; 159 | $instance['blog-name-characters'] = $new_instance['blog-name-characters']; 160 | $instance['public-only'] = $new_instance['public-only']; 161 | $instance['templates'] = $new_instance['templates']; 162 | $instance['order'] = $new_instance['order']; 163 | $instance['number'] = $new_instance['number']; 164 | $instance['avatar-size'] = $new_instance['avatar-size']; 165 | 166 | return $instance; 167 | } 168 | 169 | public function form($instance) { 170 | $instance = wp_parse_args( (array) $instance, 171 | array( 'title' => __('Blogs', $this->translation_domain), 172 | 'display' => 'blog_name', 'blog-name-characters' => 30, 173 | 'public-only' => 'yes', 'templates' => 'no', 'order' => 'random', 'number' => 10, 174 | 'avatar-size' => 16 175 | )); 176 | $options = array('title' => strip_tags($instance['title']), 'display' => $instance['display'], 177 | 'blog-name-characters' => $instance['blog-name-characters'], 178 | 'public-only' => $instance['public-only'], 'templates' => $instance['templates'], 179 | 'order' => $instance['order'], 180 | 'number' => $instance['number'], 181 | 'avatar-size' => $instance['avatar-size']); 182 | 183 | ?> 184 |
185 | 188 | 189 | 199 | 214 | 220 | 221 | 227 | 228 | 234 | 249 | 250 | 259 | 260 | 261 | 262 | 263 |
264 |