[pLog-general] Changing Templates Names.

Zaid B. Amireh zamireh at albawaba.com
Sun Oct 2 09:09:23 GMT 2005


Hi all,

I need to rename all the templates that I have installed without 
requiring the user to do a thing.

in the plog_config table we have:
templates = 
'a:11:{i:0;s:15:"blueish-English";i:1;s:12:"grey-English";i:2;s:16:"standard-English";i:3;s:13:"flower-Arabic";i:4;s:18:"pink_lilies-Arabic";i:5;s:11:"toni-Arabic";i:6;s:20:"pastel-blocks-Arabic";i:7;s:16:"girlsucks-Arabic";i:8;s:19:"desert_theme-Arabic";i:9;s:20:"fresh-bananas-Arabic";i:10;s:13:"ocadia-Arabic";}'

changing this won't be a problem, but I'm facing a problem with the 
plog_blogs table, an example entry:
settings = 
'O:12:"blogsettings":3:{s:6:"_objId";N;s:3:"log";N;s:6:"_props";a:11:{s:6:"locale";s:5:"en_UK";s:14:"show_posts_max";s:2:"15";s:8:"template";s:16:"standard-English";s:17:"show_more_enabled";s:1:"1";s:16:"recent_posts_max";s:2:"10";s:17:"xmlrpc_ping_hosts";a:1:{i:0;s:27:"http://rpc.weblogs.com/RPC2";}s:16:"htmlarea_enabled";s:1:"1";s:16:"comments_enabled";s:1:"1";s:16:"categories_order";i:0;s:14:"comments_order";s:1:"1";s:11:"time_offset";s:1:"0";}}'

as you can see, the chosen template is saved as a string and not an 
integer so if I change the name of the template in the 
plog_config.templates column then I need to change the name of the 
template in the plog_blogs.config column too.

Now, should I write a php script that uses the API provided by plog or 
can I write something like the perl substitute command in mysql? a 
better is highly appreciated.

with regards

Zaid Amireh



More information about the pLog-general mailing list