Monday, August 29, 2011

flowplayer error 2036

Took me hours figuring this out,
and finally found a post on the same error.

First, makesure the control swf is located in the same root as flowplayer swf.
Example: flowplayer.controls-3.2.5.swf and flowplayer-3.2.7.swf in the same folder.

then, makesure your unique id.
Example: id="myflowplayer" ...

This shall works fine :)

Tuesday, August 23, 2011

Kloxo /script empty!

For some freaking vps problem, i was facing very slow processing with vps from as usual.
running /script/upcp seems to somehow run halfway and hang...

So i decided to stop it, and realize, the entire folder /script is empty!...

To fix it:
cd /usr/local/lxlabs/kloxo/httpdocs
sudo lphp.exe ../bin/update.php

And wait for it to complete.. duh...

Saturday, August 20, 2011

MODx Revolution and UTF8

If you ever need to insert in latin symbol or unicode into modx title or content...
Modify modx_site_content fields:
+ pagetitle, longtitle, description, introtext, content
to unicode_general_ci encoding.
(Note: This is a fulltext index, so you will have to execute 1 statement to alter all 5 fields)
And also modify template variable content:
ALTER TABLE  `modx_site_tmplvar_contentvalues` CHANGE  `value`  `value` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL

Next, modify core/config/ and change the line:
+ $database_connection_charset = 'utf8';
+ $database_dsn = 'mysql:host=...;dbname=...;charset=utf8';

And you may start testing it it works :)
In my setup, its somehow in njis charset... (im not sure why)

Tuesday, August 9, 2011

MODx Revolution Root resource alias / path?

I tried google around on this, and find it difficult to find the result.
I've found a solution to based my resource alias to the root of the site.
By going to system > settings
use_alias_path : no

This will change all your resource alias to be based from root.
Container1 > My page (resourcealias: mypage)
now become:

If you need the container path, just put the full folder path:
Resource alias: container1/mypage

Monday, August 1, 2011

convert pdf to image in linux

convert -density 150 file.pdf outputname.png

-density to set pixel / resolution, the bigger the number, the bigger the image size