更正历史blog的图片链接错误

今天整理blog,发现部分blog的图片缺失,经过查找,原因是多次迁移,造成原来在/wp-content/upload/year/month/下面的图片都被放到了/wp-content/upload/下面,路径发生改变。

用phpmyadmin,如下sql,查找用旧链接位置的帖子
SELECT *
FROM `3qs_wp_posts`
WHERE post_content LIKE ‘%www.3qs.com/file%’

用如下sql更新
UPDATE 3qs_wp_posts SET post_content=REPLACE(post_content, ‘www.3qs.com/files’, ’3qs.com/wp-content/uploads/2011/03′) where id=458

然后手工将/wp-content/upload下面的图片移动到对应的/wp-content/upload/year/mongth下面。

进行中~~~~~~~~~~

setup a new blog todo list

  • 购买域名 done
  • 购买空间 done
  • setup wordpress done
  • choose a simple theme and setup a color schema  done
  • setup category  done
  • setup a internal short link system, used to track internal and external link, tried yourls.org, and make a little modification to suite my requirement. done
  • choose a image storage, for the web server is lack for space and bindwidth (600M,20GB). tried amazon s3 and GAE, I think GAE is a good solutions for free 5G space and 1G bindwidth per day. but there is no a good image storage system in GAE, try to modify s3album or GAE photos. and I want to setup 3 sites, for domain i1,i2,i3.domains.com, now, and can easily move to 3 different webspace in future.  working
  • add amazon Affiliate links to site, todo
  • choose a image directory organize method,todo
  • do some research with web.config for iis 7 servers. todo

为wordpress复制文章时自动加版权

给wordpress博客内容加版权网上还没有现成的插件,不过个人认为wordpress最好的地方就是源码可以随便修改,从后台主题编辑就行,相信这也是很多网友选择wordpress的原因吧。

给文章加版权分两种,一种是在文章上方或下方显示你的版权声明,这种方法可以加以下代码

    <p>转载原创文章请注明,转载自:<strong><?php bloginfo(‘name’); ?></strong>[<a href="<?php echo get_settings('home'); ?>"><?php echo get_settings('home'); ?></a>]</p> <p>本文链接: <a href=”<?php the_permalink() ?>” title=”<?php the_title(); ?>”><?php the_permalink(); ?></a></p>
    那到底应该放到什么地方呢? 找到single.php(单篇文章页),找到类似下面的这样一句话: <?php the_content(); ?>

继续阅读

夏日炎炎,苦中作乐

夏日,在草花退出舞台之际,苦儿,粉墨登场~~~~~~
没有发过苦科专门的帖子,今天吹着空调,吃着自己做的“哈根达斯”,好好整理一番,把近期拍的苦儿,晒晒……
咱是苦科新手,队伍正在逐步壮大中,先上个容易养的,紫长筒

紫长筒真是极好的长筒入门品种,家里其他长筒还是小苗的状态,它已经成长为大姑娘了

继续阅读

从11.1.0.7 32bit ASM OMF rman backup恢复数据到11.1.0.7 64bit filesystem OMF

 

准备工作
安装64bit软件
Install 11.1.0.6 db software
Upgrate to 11.1.0.7

复制rman备份到新机器
复制init.ora到新机器,修改相关路径如下

*.control_files=’/apps/oradata/DESTDB/controlfile/control01.ctl’
*.db_create_file_dest=’/apps/oradata’
*.db_create_online_log_dest_1=’/apps/oradata’

开始恢复
继续阅读

2011-06-22 6-1-7 Quantifiers

Quantifiers are used to describe the number or amount of something. Certain quantifiers are used with certain kinds of nouns.
The nouns on the left side are examples of countable nouns. They can follow “a” or “an” in the singular. Adding “s” or “es” makes them plural. The nouns on the right side are examples of uncountable nouns. They cannot follow “a” or “an” and cannot be made plural.  继续阅读

ASM ORA-01031: insufficient privileges.

when startup goldengate extract processes,  following errors showed in ggserr.log

2011-06-16 23:24:47  ERROR   OGG-00868  Oracle GoldenGate Capture for Oracle, extgrp1.prm:  Establishing ASM session for login user SYS: (1031) ORA-01031: insufficient privileges.
2011-06-16 23:24:47  ERROR   OGG-01668  Oracle GoldenGate Capture for Oracle, extgrp1.prm:  PROCESS ABENDING.
2011-06-16 23:24:47  ERROR   OGG-00868  Oracle GoldenGate Capture for Oracle, extgrp2.prm:  Establishing ASM session for login user SYS: (1031) ORA-01031: insufficient privileges.
2011-06-16 23:24:47  ERROR   OGG-01668  Oracle GoldenGate Capture for Oracle, extgrp2.prm:  PROCESS ABENDING.
2011-06-16 23:24:47  ERROR   OGG-00868  Oracle GoldenGate Capture for Oracle, extgrp3.prm:  Establishing ASM session for login user SYS: (1031) ORA-01031: insufficient privileges.
2011-06-16 23:24:47  ERROR   OGG-01668  Oracle GoldenGate Capture for Oracle, extgrp3.prm:  PROCESS ABENDING.

继续阅读