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 批量删除垃圾回复

Using Branch in Git

Categories: Development Notes; Tagged with: ; @ May 4th, 2014 10:29

List branch names

git branch

View Branches

git show-branch

Create new branch

git branch liguoliang-com

GDEV SimpleWordPressTheme # git show-branch
! [liguoliang-com] changed version
* [master] changed version

+* [liguoliang-com] changed version

Switch Branch

GDEV SimpleWordPressTheme # git checkout liguoliang-com

GDEV SimpleWordPressTheme # git status
# On branch liguoliang-com

Push new branch to Remote Server. e.g. Github:

GDEV SimpleWordPressTheme # git push origin liguoliang-com

<<Version Control with Git>> Notes: Git Basic Object Types

Categories: Development Notes; Tagged with: ; @ May 1st, 2014 19:11

Good book for Git: http://shop.oreilly.com/product/0636920022862.do

Powerful tools and techniques for collaborative software development

 

The Birth of Git

Prior to Git, the Linux Kernel was developed using commercial BitKeeper VCS,  however, in 2005, “The commercial company that developed BitKeeper broke down, and the tool’s free-of-charge status was revoked. This prompted the Linux development community (and in particular Linus Torvalds, the creator of Linux) to develop their own tool” — http://git-scm.com/book/en/Getting-Started-A-Short-History-of-Git

(more…)

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

Linux Mint: Modify JAVA HOME for All Users

Categories: Linux; Tagged with: ; @ April 27th, 2014 12:14

Solution A:  Modify /usr/bin/java link

# which java
/usr/bin/java
# java -version
java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.12) (7u25-2.3.12-4ubuntu3)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
# ls -ld /usr/bin/java
lrwxrwxrwx 1 root root 22 Apr 16 21:47 /usr/bin/java -> /etc/alternatives/java
# rm /usr/bin/java
# ln -s /guoliangDev/tools/sun-jdk/jdk1.7.0_55/bin/java /usr/bin/java
# java -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)

Solution B: Modify /etc/profile

#vi /etc/profile

Append:

export JAVA_HOME=/guoliangDev/tools/sun-jdk/jdk1.7.0_55
export PATH=$JAVA_HOME/bin:$PATH

save the file, and

source /etc/proflie

Newer Posts <-> Older Posts



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