Can I hope to see (all? mandatory changeable?) general blog settings in just plain-text files (f.e serendipity_config.inc.php)?
Why?! Because now in order to
- move blog to new hostname|location
- clone blog-skeleton (with big amount of used plugins it have sense)
I must to change in new bog (editing dump|reconfiguring blog by hand) at least
- full absolute path
- Site URL
Move all general settings out of DB?
-
- Regular
- Posts: 176
- Joined: Mon Aug 25, 2008 12:25 pm
- Location: Russia
- Contact:
Move all general settings out of DB?
Quis custodiet ipsos custodes?
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Move all general settings out of DB?
Hi!
Sure, you can just write an event plugin that listens on frontend_configure and then include a PHP file where you simply use:
The whole config of the serendipity_config database is simply populated into the $serendipity array, so you can overwrite that after the config is loaded frmo the DB.
However for your case I'd suggest a simply move.php script like:
(Not tested, just food for thought)
HTH,
Garvin
Sure, you can just write an event plugin that listens on frontend_configure and then include a PHP file where you simply use:
Code: Select all
<?php
$serendipity['key'] = 'your value';
However for your case I'd suggest a simply move.php script like:
Code: Select all
<?php
include 'serendipity_config.inc.php';
serendipity_db_query("UPDATE serendipity_config SET value = "' . dirname(__FILE__) . '" WHERE key = 'serendipityPath'");
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/