Archive for the ‘WordPress’ Category

7 07 2013

WordPress 后台 "收起菜单" 功能失效

bigCat Posted in WordPress - 0 Comment

chrome 调试器里打开console面板,输入下面的\r\nsetUserSetting("mfold","0");location.reload();

28 08 2012

.htaccess 判断域名做跳转

bigCat Posted in Linux, WordPress - 0 Comment
RewriteCond %{HTTP_HOST} ooxx.me$ [NC]\r\nRewriteRule ^(.*)$ http://av.cm/$1 [L,R=301]

\r\n\r\n这样做了别名之后,就可以做转发了

15 05 2012

您没有足够的权限访问这个页面。You are not allowed to edit this page.

bigCat Posted in WordPress - 0 Comment

http://wordpress.org/support/topic/you-are-not-allowed-to-edit-this-page\r\n修改 wp_options > wp_user_roles > option_value 为下面的值\r\n\r\n

a:5:{s:13:"administrator";a:2:{s:4:"name";s:23:"Administrator|User role";s:12:"capabilities";a:51:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:12:"delete_users";b:1;s:12:"create_users";b:1;s:17:"unfiltered_upload";b:1;s:14:"edit_dashboard";b:1;s:14:"update_plugins";b:1;s:14:"delete_plugins";b:1;}}s:6:"editor";a:2:{s:4:"name";s:16:"Editor|User role";s:12:"capabilities";a:34:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;}}s:6:"author";a:2:{s:4:"name";s:16:"Author|User role";s:12:"capabilities";a:10:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;s:22:"delete_published_posts";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:21:"Contributor|User role";s:12:"capabilities";a:5:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:20:"Subscriber|User role";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}}
19 04 2011

wordpress get all category list and all post list

bigCat Posted in WordPress - 0 Comment
<?php\r\n$category_ids = get_all_category_ids();\r\nforeach ($category_ids as $cat_id) {\r\n$cat_name = get_cat_name($cat_id);?>\r\n\r\n<dl>\r\n<dt>\r\n<a href="<?php echo get_category_link($cat_id);?>"><?php echo $cat_name ?></a>\r\n</dt>\r\n<dd>\r\n<ul>\r\n<?php\r\nwp_reset_query();\r\n$postid = get_the_ID();\r\n$args = array(\r\n'category__in' => array($cat_id),\r\n'showposts' => 255,\r\n);\r\nquery_posts($args);if (have_posts()) : while (have_posts()) : the_post(); ?>\r\n<li><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"<?php if ($postid == get_the_ID()) {echo '';} ?>><?php the_title();?></a></li>\r\n<?php endwhile; else: ?>\r\n<li><p><?php _e('这家伙很懒,什么都没有写.'); ?></p></li>\r\n<?php endif;wp_reset_query();?>\r\n</ul>\r\n</dd>\r\n</dl>\r\n<?php } ?>\r\n
20 02 2011

Incompatible archive: PCLZIP_ERR_BAD_FORMAT (-10)

bigCat Posted in WordPress - 0 Comment

wordpress 后台升级\r\n\r\n因为空间不足..

Host: (miao) | Word: Press | Code: HTML5