WordPress: Disable Comment and Ping/Trackback 彻底停用评论/引用功能

Categories: Development NotesWordPress; Tagged with: ; @ May 4th, 2014 12:29

Requirement:

Spam comments try to rape my blog everyday,  I want to disable the comment feature.

Step 1: Disable the comment /pingback/trackback in WordPress admin console:

image

 

By un-checking these two boxes, no body can comment or pingback/trackback to the  *NEW* posts from now on.

but,  “(These settings may be overridden for individual articles.)”, this means all your post *prior* to the change still can be commented of pingback, let’s move to next step.

Step 2: Disable ALL posts comment and pingback/trackback

Run this SQL:

UPDATE ‘wordpress_posts’ SET comment_status='closed', ping_status='closed'

From now on, NO ONE can comment / ping / trackback to any post. Life is much better.

If you want to delete all pending/spam comments, you may refer to :  WordPress: batch deleting spam comments 批量删除垃圾回复

Simple WordPress Theme

Categories: Development NotesFrontEndWordPress; Tagged with: ; @ May 1st, 2014 17:18

WordPress default themes are much more complicated than ever, there’re lots of customize features,  functions…. however, I prefer simple themes and that’s why I created  this one:

 

As a developer, I have my requirement:

I need to know how to change the Style  — but I’m not a web designer;
I don’t need so fat themes, I don’t want spend time to read the codes;
I want to control my blog;

So, I started this theme —  the one I’m using now.

It can :  display the post list, post details, tags, achieves;

It cannot: Comment or display comment;  no UI for customize any thing;

CSS

All styles are using default Bootstrap CDN;

How to use

I have no plan to submit it to WordPress.org, so please download the .zip and install it manually:

https://raw.githubusercontent.com/guoliang-dev/SimpleWordPressTheme/master/build/SimpleWordPressTheme_0.1.zip

 

Source Code:

https://github.com/guoliang-dev/SimpleWordPressTheme

WordPress: batch deleting spam comments 批量删除垃圾回复

Categories: Development NotesWordPress; Tagged with: ; @ March 16th, 2013 10:50

Use sql to delete all the spam comments quickly:

Status of comment

SELECT DISTINCT comment_approved  FROM `x_comments`

Results:

0 – Pending

1 – approved

spam – spam

trash – trash

 

Deleting SQL

–delete spam & trash:

DELETE FROM `dbName`.`x_comments` WHERE comment_approved = 'spam' or comment_approved = 'trash'
--delete pending:
DELETE FROM `dbName`.`x_comments` WHERE comment_approved = '0'

WordPress: change language 更改语言中文/英文

Categories: Development NotesWordPress; Tagged with: ; @ March 16th, 2013 10:39

Modify the wp_config.php

 

If you want to change the language to ‘English’

 

/**
* WordPress Localized Language, defaults to English.
*
* Change this to localize WordPress.  A corresponding MO file for the chosen
* language must be installed to wp-content/languages. For example, install
* de.mo to wp-content/languages and set WPLANG to ‘de’ to enable German
* language support.
*/
define (‘WPLANG’, ”);

 

Keep the value empty.

 

如果你想改变为中文:

/**
* WordPress 语言设置,中文版本默认为中文。
*
* 本项设定能够让 WordPress 显示您需要的语言。
* wp-content/languages 内应放置同名的 .mo 语言文件。
* 要使用 WordPress 简体中文界面,只需填入 zh_CN。
*/
define(‘WPLANG’, ‘zh_CN’);

修改后控制台会有提示下载语言包.

WordPress-Post2Qzone 1.2.2: 同步每一次更新到QZone

Categories: Development NotesWordPress; Tagged with: ; @ January 19th, 2013 14:02

上一周,  收到一条关于Post2Qzone的评论:

你好,我想问一下,我用了你的post2Qzone插件后,更新了一篇文章,同步到了我设置好的空间日志里,然后我又设置了个另一个QQ号码,然后又更新了这篇文章,结果没同步到另一个QQ空间日志里呢?然后我把数据库postmeta表里post_id列为该日志id并且meta_key为postToQzone这一列中的meta_value手动改成false后再更新此文章,结果还是没有同步到我另一个QQ空间里,我想知道这是为什么。

一开始我没太理解, 我想可能是他的第二个账户没有设置妥当. 于是发邮件去让他从新测试.

我又测试了下:

我发布一篇新的文章,可以同步到我的QQ空间里,如果我发布了这篇文章后,我又重新设置了一个QQ号码,然后编辑数据库postmeta表里post_id列为该日志id并且meta_key为posttoqzone这一列中的meta_value修改成false后,然后编辑这篇文章,更新这篇文章的时候,就不会同步到我现在设置的QQ号的空间里了,QQ号码设置没问题,邮箱的pop3/smtp服务我也打开了。

如果发布新文章的话,我重新设置的这个QQ号码也可以发布的。不知道为什么。

我想做的事情是,发布新文章的时候该文章会同步到我一个QQ空间里,我又设置了一个别的QQ号码,更新这篇文章的时候,会自动同步到我这个QQ空间里。

就是想要同一篇文章没一次更新的时候都会同步到设置的QQ空间里。不知道这个功能好不好实现呢。

 

最后一句话点明了需求:同一篇文章没(每)一次更新的时候都会同步到设置的QQ空间里.

 

所以有两点:

1. Metadata的更新/检查 有bug.

2. 增加新功能: 同步每次更新(暂时没有配置页面, 需要手动修改代码).

 

开启同步每次更新的方法:

编辑插件:post2qzone/post2qzone.php

image

Older Posts



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.