WIKI使用導(dǎo)航
站長(zhǎng)百科導(dǎo)航
站長(zhǎng)專(zhuān)題
- 網(wǎng)站推廣
- 網(wǎng)站程序
- 網(wǎng)站賺錢(qián)
- 虛擬主機(jī)
- cPanel
- 網(wǎng)址導(dǎo)航專(zhuān)題
- 云計(jì)算
- 微博營(yíng)銷(xiāo)
- 虛擬主機(jī)管理系統(tǒng)
- 開(kāi)放平臺(tái)
- WIKI程序與應(yīng)用
- 美國(guó)十大主機(jī)
WordPress: WPMU List All Postings Widget:修訂間差異
(新頁(yè)面: This code is the code needed to create a widget to show a list of on post in each of your blogs. It is dependent on the plug-in [http://wpmudev.org/project/List-All-Posts List All Posts]...) ? |
無(wú)編輯摘要 ? |
||
第1行: | 第1行: | ||
This code is the code needed to create a widget to show a list of on post in each of your blogs.? It is dependent on the plug-in [http://wpmudev.org/project/List-All-Posts List All Posts], that should be installed first.? Create a blank text file named widget_list_all_posts.php in your plugins folder, add the following php code.? You should them be able to activate the List All Posts plugin and the List-All-Posts Widget on the plugins tab.? Then look over in the presentation/widgets tab and you should have a new widget named List All Posts Widget. | This code is the code needed to create a widget to show a list of on post in each of your blogs.? It is dependent on the plug-in [http://wpmudev.org/project/List-All-Posts List All Posts], that should be installed first.? Create a blank text file named widget_list_all_posts.php in your plugins folder, add the following php code.? You should them be able to activate the List All Posts plugin and the List-All-Posts Widget on the plugins tab.? Then look over in the presentation/widgets tab and you should have a new widget named List All Posts Widget. | ||
需要這個(gè)代碼,創(chuàng)建widget顯示你的博客上的文章列表。這個(gè)代碼依賴(lài)的插件,插件[http://wpmudev.org/project/List-All-Posts List All Posts]必須先安裝。在你的插件文件夾中創(chuàng)建名為widget_list_all_posts.php的空白文本文件,添加以下的php代碼,然后你就可以激活插件標(biāo)簽中的List All Posts 插件和List-All-Posts Widget。然后查看presentation/widgets標(biāo)簽,你應(yīng)該有個(gè)新的,名為L(zhǎng)ist All Posts Widget的widget。 | |||
<pre> | <pre> | ||
<?php | <?php | ||
第8行: | 第11行: | ||
Author: Unkown - last edited Iolaire McFadden ? | Author: Unkown - last edited Iolaire McFadden ? | ||
Author URI: http://codex.wordpress.org/WPMU_List_All_Blogs_Widget | Author URI: http://codex.wordpress.org/WPMU_List_All_Blogs_Widget | ||
Version: 0.0.1 | |||
*/ | |||
function widget_list_all_posts_init() { | |||
if ( !function_exists('register_sidebar_widget') ) | |||
return; | |||
function widget_list_all_posts($args) { | |||
? ? ? ? extract($args); | |||
? ? ? ? if(function_exists(list_all_wpmu_blogs)) { | |||
? ? ? ? ? ? ? ? echo $before_widget; | |||
? ? ? ? ? ? ? ? echo $before_title . 'All Recent Deals' . $after_title; | |||
? ? ? ? ? ? ? ? ? ? ? ? list_all_wpmu_posts(20, 0, '<p>', '</p>', '<p>', '</p>','show','hide','hide'); | |||
? ? ? ? ? ? ? ? echo $after_widget; | |||
? ? ? ? } | |||
else | |||
{ | |||
? ? ? ? ? ? ? ? echo "Error - function? list_all_wpmu_blogs not found"; | |||
? ? ? ? } | |||
} | |||
? ? if ( function_exists('wp_register_sidebar_widget') ) // fix for wordpress 2.2.1 | |||
? ? ? wp_register_sidebar_widget(sanitize_title('Widgetize list all posts' ), 'Widgetize list all posts', 'widget_list_all_posts', array(), 1); | |||
? ? else | |||
? ? ? register_sidebar_widget('Widgetize list all posts', 'widget_list_all_posts', 1); | |||
} | |||
add_action('plugins_loaded', 'widget_list_all_posts_init'); | |||
?> | |||
</pre> | |||
<pre> | |||
<?php | |||
/* | |||
插件名: List-All-Blogs Widget | |||
插件 URI: http://codex.wordpress.org/WPMU_List_All_Blogs_Widget | |||
描述: 在WPMU站點(diǎn)上創(chuàng)建所有文章列表,從先前以http://www.erik-rasmussen.com/blog/2006/11/30/widgetize-anything/上的代碼為基礎(chǔ),轉(zhuǎn)變 | |||
作者: 未知 –最后由 Iolaire McFadden 編輯 | |||
作者 URI: http://codex.wordpress.org/WPMU_List_All_Blogs_Widget | |||
Version: 0.0.1 | Version: 0.0.1 | ||
*/ | */ |
2008年9月25日 (四) 14:06的最新版本
This code is the code needed to create a widget to show a list of on post in each of your blogs. It is dependent on the plug-in List All Posts, that should be installed first. Create a blank text file named widget_list_all_posts.php in your plugins folder, add the following php code. You should them be able to activate the List All Posts plugin and the List-All-Posts Widget on the plugins tab. Then look over in the presentation/widgets tab and you should have a new widget named List All Posts Widget.
需要這個(gè)代碼,創(chuàng)建widget顯示你的博客上的文章列表。這個(gè)代碼依賴(lài)的插件,插件List All Posts必須先安裝。在你的插件文件夾中創(chuàng)建名為widget_list_all_posts.php的空白文本文件,添加以下的php代碼,然后你就可以激活插件標(biāo)簽中的List All Posts 插件和List-All-Posts Widget。然后查看presentation/widgets標(biāo)簽,你應(yīng)該有個(gè)新的,名為L(zhǎng)ist All Posts Widget的widget。
<?php /* Plugin Name: List-All-Blogs Widget Plugin URI: http://codex.wordpress.org/WPMU_List_All_Blogs_Widget Description: Creates a list of all posts on a WPMU site as a widget, conversion from previous version based on code in http://www.erik-rasmussen.com/blog/2006/11/30/widgetize-anything/ Author: Unkown - last edited Iolaire McFadden Author URI: http://codex.wordpress.org/WPMU_List_All_Blogs_Widget Version: 0.0.1 */ function widget_list_all_posts_init() { if ( !function_exists('register_sidebar_widget') ) return; function widget_list_all_posts($args) { extract($args); if(function_exists(list_all_wpmu_blogs)) { echo $before_widget; echo $before_title . 'All Recent Deals' . $after_title; list_all_wpmu_posts(20, 0, '<p>', '</p>', '<p>', '</p>','show','hide','hide'); echo $after_widget; } else { echo "Error - function list_all_wpmu_blogs not found"; } } if ( function_exists('wp_register_sidebar_widget') ) // fix for wordpress 2.2.1 wp_register_sidebar_widget(sanitize_title('Widgetize list all posts' ), 'Widgetize list all posts', 'widget_list_all_posts', array(), 1); else register_sidebar_widget('Widgetize list all posts', 'widget_list_all_posts', 1); } add_action('plugins_loaded', 'widget_list_all_posts_init'); ?>
<?php /* 插件名: List-All-Blogs Widget 插件 URI: http://codex.wordpress.org/WPMU_List_All_Blogs_Widget 描述: 在WPMU站點(diǎn)上創(chuàng)建所有文章列表,從先前以http://www.erik-rasmussen.com/blog/2006/11/30/widgetize-anything/上的代碼為基礎(chǔ),轉(zhuǎn)變 作者: 未知 –最后由 Iolaire McFadden 編輯 作者 URI: http://codex.wordpress.org/WPMU_List_All_Blogs_Widget Version: 0.0.1 */ function widget_list_all_posts_init() { if ( !function_exists('register_sidebar_widget') ) return; function widget_list_all_posts($args) { extract($args); if(function_exists(list_all_wpmu_blogs)) { echo $before_widget; echo $before_title . 'All Recent Deals' . $after_title; list_all_wpmu_posts(20, 0, '<p>', '</p>', '<p>', '</p>','show','hide','hide'); echo $after_widget; } else { echo "Error - function list_all_wpmu_blogs not found"; } } if ( function_exists('wp_register_sidebar_widget') ) // fix for wordpress 2.2.1 wp_register_sidebar_widget(sanitize_title('Widgetize list all posts' ), 'Widgetize list all posts', 'widget_list_all_posts', array(), 1); else register_sidebar_widget('Widgetize list all posts', 'widget_list_all_posts', 1); } add_action('plugins_loaded', 'widget_list_all_posts_init'); ?>