Linux 软件免费装
Banner图

Moo Collapsing Categories

开发者 3dolab
更新时间 2016年2月6日 19:35
PHP版本: 2.8 及以上
WordPress版本: 4.4.2

标签

widget posts sidebar categories menu navigation collapsible mootools collapsing

下载

0.1 0.2 0.3 0.4 0.5 0.5.1 0.5.2 0.5.3 0.5.4 0.5.5 0.5.6 0.5.8

详情介绍:

This is a relatively simple plugin that uses Javascript based on MooTools framework to make each Categories links in the sidebar collapsable. Every post corresponding to a given category will be expanded. Fork of Rob Felty's Collapsing Categories. Multiple languages content is now fully supported through compatibility with qTranslate and WPML Multilingual CMS Plugin Homepage: http://www.3dolab.net/en/mootools-collapsing-categories-and-archives Running Demo banner image by Karora icon by Jdforrester 有什么新东西? See the CHANGELOG for more information 兼容性 This plugin is compatible with WordPress 2.8+, but not with prior versions (2.7.1 or earlier). If you prefer to insert code into your theme manually instead of using widgets, please check the manual installation instructions.

安装:

IMPORTANT! Please deactivate before upgrading, then re-activate the plugin. Unpackage contents to wp-content/plugins/ so that the files are in a mootools-collapsing-categories/ directory. Widget installation Activate the plugin, then simply go the Presentation > Widgets section and drag over the Moo Collapsing Categories Widget. 手动安装 Activate the plugin, then insert the following into your template: (probably in sidebar.php). See the Options section for more information on specifying options. echo "<ul class='collapsCatList'>\n"; if (function_exists('collapsCat')) { collapsCat(); } else { wp_get_categories('your_options_here'); } echo "</ul>\n";

屏幕截图:

  • the widget in action
  • the Admin Widget Settings page

其他记录:

Options and configuration Style options can be set via the settings panel. All other options can be set from the widget panel. If you wish to insert the code into your theme manually instead of using a widget, you can use the following options. These options can be given to the collapsCat() function either as an array or in query style, in the same manner as the wp_list_categories function. $defaults=array( 'showPostCount' => true, 'inExclude' => 'exclude', 'inExcludeCats' => '', 'showPosts' => true, 'showPages' => false, 'linkToCat' => true, 'olderThan' => 0, 'excludeAll' => '0', 'catSortOrder' => 'ASC', 'catSort' => 'catName', 'postSortOrder' => 'ASC', 'postSort' => 'postTitle', 'expand' => '0', 'defaultExpand' => '', 'postTitleLength' => 0, 'animate' => 0, 'catfeed' => 'none', 'catTag' => 'cat', 'showPostDate' => false, 'postDateAppend' => 'after', 'postDateFormat' => 'm/d', 'useCookies' => true, 'showTopLevel' => true, 'postsBeforeCats' => false, 'debug'=>'0' ); 比如 collapsCat('animate=1&catSort=ASC&expand=3&inExcludeCats=general,uncategorized') This will produce a list with: Fallback Currently this plugin relies on Javascript to expand and collapse the links. If a user's browser doesn't support javascript they won't see the links to the posts, but the links to the categories will still work (which is the default behavior in wordpress anyways)

常见问题:

What is the option about the ID of the sidebar?

Here is the deal. If you have a rule in your theme like: #sidebar ul li ul li {color:blue} it will override a rule like li.collapsArch {color:red} because it uses an ID, instead of a class. That is the way CSS works. So if you change our rule to: #sidebar li.collapsArch {color:red} then this alleviates that problem. The option for the ID of the sidebar does this automatically for you.

How do I use different symbols for collapsing and expanding?

If you want to use images, you can upload your own images to http://yourblogaddress/wp-content/plugins/collapsing-categories/img/collapse.gif and expand.gif There is an option for this.

I have selected a category to expand by default, but it doesn't seem to work

If you select a sub-category to expand by default, but not the parent category, you will not see the sub-category expanded until you expand the parent category. You probably want to add both the parent and the sub-category into the expand by default list.

I can't get including or excluding to work

Make sure you specify category names, not ids.

There seems to be a newline between the collapsing/expanding symbol and the category name. How do I fix this?

If your theme has some css that says something like sidebar li a {display:block} that is the problem. You probably want to add a float:left to the .sym class

No categories are showing up! What's wrong?"

Are you using categories or tags? By default, collapsing categories only lists categories. Please check the options in the settings page (or in the widget if you are using the widget)

How do I change the style of the collapsing categories lists?

There are several default styles that come with the plugin. You can choose from these in the settings panel, or you can create your own custom style. A good strategy is to choose a default, then modify it slightly to your needs. The following classes are used:

  • collapsing - applied to all ul and li elements
  • categories - applied to all ul and li elements
  • list - applied to the top-level ul
  • item - applied to each li which has no sub-elements
  • expand - applied to a category which can be expanded (is currently collapsed)
  • collapse - applied to a category which can be collapsed (is currently expanded)
  • sym - class for the expanding / collapsing symbol

更新日志:

0.5.8 (2016.02.06) 0.5.6 (2011.07.12) 0.5.5 (2011.06.21) 0.5.4 (2011.06.06) 0.5.3 (2010.12.21) 0.5.2 (2010.12.07) 0.5.1 (2010.10.31) 0.5 (2010.10.30) 0.4 (2010.10.20) 0.3 (2010.09.25) 0.2 (2010.06.28) 0.1 (2010.06.16)