PDA

View Full Version : One database, two pixelpost blogs, two different templates


rymus
02-17-2009, 01:39 PM
Want to add a second blog (to be a mobile version of main blog) to my current setup. Have the main blog at www.glasseyalley.com and the mobile at mob.glasseyalley.com

in mob.glasseyalley.com subdomain, have symlinks redirecting images/ and thumbnails/ to www.glasseyalley.com images and thumbnails dirs. Using same database for mob as www.

As pixelpost stores the template in use in the database, how can I run one database with two templates on two different sites? Thanks for any pointers.

Dennis
02-18-2009, 05:05 AM
Well, you can hack the index.php of the mobile version. Right after the initial variables have been read from the database you can reset the $cfgrow['template'] value to the template you want.


$cfgrow['template']='mobiletemplate';


As you might have guessed you can do this for every var in the configtable.

rymus
02-18-2009, 04:23 PM
That sorted out the index page.. but when I go to anything that's not index (x=about or x=browse) it's giving me a 404. Maybe I put the code in at the wrong place or something?

rymus
02-18-2009, 04:42 PM
erm.. never mind.. I think it was a bad piece editing on my part. all good now. Thanks