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

Small Flex Tool for parsing column names to SQL format string

Categories: Development NotesFlex分享; Tagged with: ; @ November 19th, 2012 18:40

Hi all,

I wrote a small Flex tool for parsing column names to SQL format, for example:

when I want to select those fields:

ColumnName
ACCOUNT
SECURITYEXCHANGE
ORDREFNO
ORDERID
BUYSELL

 

I need to copy those fields into my SQL editor, and put “,” for each of them, it’s boring and waste time, So I wrote a Flex tool, which can parse the fields into:

1: Added comma:

ACCOUNT,

SECURITYEXCHANGE,

ORDREFNO,

ORDERID,

BUYSELL

2: Added quotation marks and comma:

‘ACCOUNT’,

‘SECURITYEXCHANGE’,

‘ORDREFNO’,

‘ORDERID’,

‘BUYSELL’

 

image

Hope it can save your time if you are doing such kind of SQL jobs.

Get the tool: http://liguoliang.com/wp-content/uploads/2012/11/ParseStrForSQL.swf

Check FlashPlayer SharedObject setting using ActionScript / 使用AS检查FP本地存储

Categories: Flex; Tagged with: ; @ February 7th, 2012 21:45

FlashPlayer provide a cool local storage mechanism called ‘SharedObject’,  we can store some user info in user local machine. for example, douban.fm store the last channel in sharedObject.

You can check the local storage setting for current domain by right click, or check all setting from Control Panel>FlashPlayer, additionally, you can manage all settings by this: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager07.html

Flashplayer need the user configure this setting manually, but some times we want change the setting automatically, especially for some enterprise application, like E-Learning, Banking, HIS.

Currently, I did not found any API or workaround to change the local storage automatically 🙁

I just write a small tool to check the local storage setting directly, >>Link<<
(you may download and upload this swf to your server if needed)

image
 

/**
	 * Check local storage setting.
	 */ 
	protected function checkLocalStorage(event:MouseEvent):void
	{
		var sharedObjectForTest:SharedObject = SharedObject.getLocal("sharedObjectTest", "/");
		
		sharedObjectForTest.addEventListener(NetStatusEvent.NET_STATUS, onSharedObjectEvent);
		sharedObjectForTest.data.result = "OK";
		try
		{
			var result:String = sharedObjectForTest.flush();
			if(result == SharedObjectFlushStatus.FLUSHED) {
				traceLog("OK, and currect size is: " + sharedObjectForTest.size);
			}else {
				traceLog("Failed, and the Flashplayer security setting panel is shown.");
			}
		} 
		catch(error:Error) 
		{
			traceLog("Error, and show the seeting panel manually;");
			Security.showSettings(SecurityPanel.LOCAL_STORAGE);
		}
	}

WordPress插件: post2Qzone – 文章同步发送到QQ空间

Categories: Development NotesWordPress; Tagged with: ; @ October 9th, 2010 1:03

2013.1.13 更新:

默认使用SSL进行发送; 同时修正了部分已知bug.

2010.11.12 Update

注意:  本插件需要远程登陆到QQ邮箱才能正常同步, 因此, 如果您的主机无法连接到QQ邮箱, 就会出现同步失败 – 此种情况下, 您需要暂时禁用本插件.

近日我的LP Star主机也无法访问QQ邮箱, 因此正在寻找其他解决方案中, 如果您的插件已无法正常工作, 请暂时停用本插件, 日后有更新时再启用. 谢谢.


假期在家窝出来的, 第一次写插件, 测试了一段时间, 感觉应该没问题了, 今天发一下. 希望能对你有用.

基本功能

在Wordpress新增文章时自动发布到Qzone, 你可以通过后台设置:

  • 设置新文章的发布目录(如果Qzone中目录不存在会自动创建)
  • 设置文章前缀/后缀
  • 设置抄送邮箱

Post2Qzone 插件主页: http://wordpress.org/extend/plugins/post2qzone/

使用指南(2分钟即可完成配置)

1. 自动安装插件

WordPress后台>Plugins>Add New> Search: by Tag, 使用关键字: “qzone”搜索, 将会得到:
image

(分是我自己评的…嘿嘿)点击Install Now自动安装, 安装完毕后激活插件

2. 配置信息

进入Setting > Post2Qzone页面:

image

除了登录信息为必填之外, 其他选项均为选填. 配置完毕后点击”保存”.

3. 使用

在发布文章 – 包括使用WP后台或其他离线写作软件如: Windows Live Writer 发布文章之后,  将会自动发布到Qzone上, 同时如果填写了抄送邮箱, 该邮箱也会收到一份拷贝.

4. 其他

1.  为什么要提供QQ号及密码

使用Email发布日志到Qzone, 需要使用自己的QQ邮箱进行发送, 因此必须填写正确的QQ号及密码. 本插件基于PHPMailer编写,  QQ密码仅用于在您的服务器上登陆QQ邮箱服务器, 不会泄露, 请放心.

2. 如果发布失败怎么办?

1. 首先检查QQ邮箱的发信状态及登录状态, 查看是否在文章发布后进行过登录及发邮件的操作, 如果没有请进行第二步:
2. 进入Plugin>Editor, 编辑Post2Qzone, 将文件首部的$debug变量设置为true, 然后使用Wordpress后台编写并发布新文章, 点击发布后会显示发送的详细情况, 你可通过查看该信息已获得进一步的帮助.

附录:有图有真相

1. Windows Live Writer发布新文章:

image

2. QQ空间已发布:

image

Over.

字符串连续空格处理 – 在线小工具(使用Flex与正则表达式创建)

Categories: Flex; Tagged with: ; @ October 3rd, 2010 22:05

功能: 将会替换所有的(连续)空格为”,”
原理: Flex中使用RegExp替换. (more…)

Older Posts



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