La Vita è Bella

Sunday, September 16, 2007

Patches to make NucleusCMS plugins multi-blog ready

I was struggling to find a good multi-blog system to replace LifeType used on buddie5.com in the past few weeks. I've tried Movable Type but didn't feel satisfy with it. Finally I found that NucleusCMS, which is used here, have good support for multi-blog, so I think it's the solution for me.

Although NucleusCMS itself have good support for multi-blog, as it's mainly used as a single blog system like WordPress, nearly none of the plugins considered the multi-blog situation.

So I made patches for the plugins I used, to make them multi-blog ready.

These patches generally move some option from global to blog, so that every blog can have its own setting. And for some plugins that have an admin area, I also filtered the things it can admin to avoid security risk.

  • patch for NP_TrackBack 2.1.0:
    1. move notify options into blog settings (Notify, NotifyEmail and NoNotifyBlocked)
    2. show admin area when user is blog admin (copied from NP_Referer 1.0 code :D )
    3. in admin area, user can only see/manage the trackbacks in a blog he have admin privilege
  • patch for NP_Referrer 1.0.1:
    1. roll back to 1.0 to show admin area for non-admin users
    2. in admin area, user can only see/modify the referrers in a blog he have admin privilege
  • patch for NP_Calendar: move the locale option into blog option
  • patch for NP_RSSItem: move lang, RSSLink and RSSImage option into blog option.
  • patch for NP_WeatherReport: move city_name, city_id and unit option into blog option.


tags: , , , , , , , , ,

22:06:35 by fishy - opensource - Permanent Link

Revision: 1.1/1.1, last modified on 2007-09-15 @ 23:25.

Karma: 107 (74.65% out of 217 were positive) [+/-]

You can subscribe to RSS 2.0 feed for comments and trackbacks

Trackbacks:
There are currently no trackbacks for this item.
Use this TrackBack url to ping this item (right-click, copy link target). If your blog does not support Trackbacks you can manually add your trackback by using this form.

Jon Daley

Jon Daley wrote:

Hi there. Slightly off-topic question - what did you not like about LifeType?

Monday, September 17, 2007 10:30:23

fishy

fishy wrote:

1. receive a trackback ping will cause a core dump in my host after 1.2, this is the most inconvenience thing
2. time-offset is applied on display but not on store, this will cause problem when one of the 2 time-zones(myself and my host) have DST and the other didn't
3. way too heavy, this should be caused by the smarty engine

Monday, September 17, 2007 10:36:19

Jon Daley

Jon Daley wrote:

1. Did you ever say anything on the forums or bug reports? I don't recall anyone ever mentioning this.

2. I am not exactly sure what you mean. There has been some talk of changing the way the dates are stored to always store in GMT, since people have complained that when they move to a different host, the posts are now dated differently.

3. I am not sure what you are talking about - a heavy load when visitors are viewing the pages? Yes, the flexibility that lifetype has does make it heavier than some other blog software. The caching mechanism resolves this problem for most people. Spammers/fast queries do cause some loading issues currently.

It would help LifeType (and Nucleus and whoever else) if you reported the problem you have.

Tuesday, September 18, 2007 00:33:07

fishy

fishy wrote:

1. here it is (ok, I was wrong, it's from 1.1.6):
http://forums.lifetype.net/...

2. for example, my host is at PDT with DST, and I myself am at CST without DST, so in some time of year, the time offset is 15, and in other times it's 16. I post a blog, it's local time(PDT) Sep. 17, 09:42 and this is what stored in db. For me it should be Sep. 18, 00:42 (offset 15), so when displaying, LifeType just add 15 hours to the time. But when DST switches, the time offset becomes 16, so when I look back to this post, it shows Sep. 18, 01:42 then.

3. I mean the directory size. for this Nucleus working directory, it's just 6.5M, but for my LifeType working directory, it's 66M, 28M for tmp. As I can recognize, the tmp sub-directory cause many problems (mainly permission problems) in the past, I really don't like it. (It's generated by Smarty, right?)

Besides, I really like the plugins from Nucleus community, which are mostly useful and interesting.

Anyway, I should thank you guys that resolved the sucking MySQL collation problem in LifeType, nice code. I used the code in my Nucleus and WikkaWiki :)
( http://wang.yuxuan.org/blog... )

Tuesday, September 18, 2007 00:56:25

Jon Daley

Jon Daley wrote:

1. Ah, I see. Yes, a core dump doesn't help much - at least I don't figure it is worth wading through a core dump from someone else's (presumably modified) php.cgi, when no one else has this trouble. Thanks for reporting it though - it helps to track down things if it is reproducible and/or multiple experience similar problems.

2. Ah, I see. Yeah, that is hard to trivially fix without changing how things are stored.

3. That size seems too large. You must be counting the .svn directories too? That doubles your size. Anyway, disk space is cheap, right? I'd rather have comments and well separated code than everything together without any comments. (I am not commenting on Nucleus's code, I don't know). I suppose we could run an uncommenter/whitespace remover on the installed version, but I wouldn't think the disk space that it would save would be worth the extra pain of having line numbers different for the users and developers.

I haven't really understood all of the permission issues with the tmp directory. As I understand it, PHP will be removing support for "safe" mode, which will fix a bunch of the headaches that various users have. If you run as a cgi, there aren't any permission problems - every once in a while there is an assumption during an upgrade that the permissions should be 400 rather than 444 or something like that, I am planning on adding a permission picker in 2.0 that will let "safe" mode folks use their insecure permissions, and suphp folks have better settings as well.

Tuesday, September 18, 2007 02:05:26

Jon Daley

Jon Daley wrote:

Speaking of timestamps - what's up with this blog and the current dates? My last comment says it was made on September 18th, and that is today?

Maybe it is a time zone thing? It is currently 9:15AM, EDT.

Tuesday, September 18, 2007 21:15:57

fishy

fishy wrote:

All time displayed (and stored) in this blog is in CST (China Standard Time, GMT+8, no DST) :)

Tuesday, September 18, 2007 21:19:11

Jon Daley

Jon Daley wrote:

Ah, I didn't realize that timezones were not specific. CST means all sorts of things, like:
GMT-6 (Central Standard Time US)
GMT+9 (Central Standard Time Australia)
GMT+10.5 (Central Summer Time Australia).

That's annoying.

Thursday, September 20, 2007 00:43:58

mmorpg

mmorpg wrote:

Just found out about Nucleus today...I knew WP and Movable type were good but this system seems so flexible.

Friday, March 07, 2008 04:40:53

Add Comment

 

May the Force be with you. RAmen