Posted on: 10/25/04 07:53pm
By: LWC
In theory, Geeklog lets it be as easy as changing a single URL in config.php (and, if you also change your internal system, possibly a few paths too and one path in lib-common.php).
Alas, it turns out that the database stores some constant static paths.
Here's what I found:
- gl_blocks => older_stories: Well, at least this is only one entry and not to mention a queue based block one - so after some time, it'll be fixed.
- gl_stories => every entry (usually introtext/bodytext) that has image links: this is covered in this FAQ entry (the former problem isn't). One better change the images' links because unlike the older stories, they will stay broken forever.
I should mention that Geeklog 1.3.10rc1 introduced a great feature of dynamic internal links (i.e. [ story: ]), so I think those two tables should work in the same concept and use config.php's $_CONF['site_url'].
Switching sites - not fully automatic
Posted on: 10/29/04 02:23pm
By: LWC
This post can be deleted now.
Switching sites - not fully automatic
Posted on: 10/29/04 11:29pm
By: LWC
This post can be deleted now.
Switching sites - not fully automatic
Posted on: 11/01/04 10:24am
By: LWC
Here are possible solutions you might want to consider adding to that FAQ:
- gl_blocks => older_stories: since it's a specific entry (and not a whole table), I think the best solution is to just edit it manually, copy the entire appropriate field to Notepad, use Notepad's replace function (old url => new url) and copy it back.
- gl_stories => every entry that has image links: since this involves multiple entries, you can use the following MySQL command:
update gl_stories set some_field=replace(some_field, 'old url','new url')
"some_field" being either
"introtext" or
"bodytext" (if you need both, just run this query twice - once with "introtext" and once with "bodytext").
Which leads me to say that the major downside is that you have to go field by field with this (each time instead of "some_field"). Sure, one might say we only deal with two fields anyway (introtext and bodytext), but I still can't consider this a perfect solution.
I've tried to use * and % (instead of "some_field"), but they just cause an error.
So does anyone have a way to make it work in
all fields with a single command?