Page 1 of 1

Doing a blog-wide modification to fonts

Posted: Wed Oct 05, 2005 3:22 am
by vincem

I have been styling the font color of my entries via the WYSIWYG editor for over 120 entries now.

But since nobody is ever happy without change, I decided to completely redesign my template and now with a light colored background, most of the entries' font color is too pale and barely readable.

Does anybody know if there might be a way to do a simple switch of every occurence of one hex color code into another, in a single edit operation, across the whole blog? (Via a plugin maybe or something...)

I know, this is probably too much to ask, so I'll have to manually edit each entry... Sigh...


Re: Doing a blog-wide modification to fonts

Posted: Wed Oct 05, 2005 3:46 am
by garvinhicking
Hehe, that's the reason why putting font tags in the WYSIWYG editor is a bad idea in the beginning. You should've done that via CSS customization from the start on :)

Actually, replacing the stuff is not really a task that an existing plugin can do out of the box. I recommend this:

1. Use phpMyAdmin to create a DB dump of your serendipity_entries and serendipity_entryproperties tables. Check the "DROP TABLE IF EXISTS" checkbox when exporting. Make sure you export DATA *AND* STRUCTURE.

2. Use a text editor to replace all <font> tags in your DB dump file. Or even better, remove all <font> tags.

3. Upload the DB dump file again - this will overwrite your existing table and use all the new entrys with replaced <font> tags.

Of course this is a possibly dangerous operation, so if you're a bit paranoid, you might better want to edit each entry.

If you remove the font tags, go ahead and edit your templates' style.css file. Locate a div.serendipity_entry field and just insert

Code: Select all

color: red

(or any other coler) inside that style, and you never need font tags again.


Posted: Wed Oct 05, 2005 8:33 am
by vincem
Hello Garvin,

Thank you, once again, for your invaluable help. Yours was an impeccable answer to my question; I followed your instructions to create a dump with phpMyAdmin, I corrected the file and uploaded the result. Done!

And yes, I realize that using font tags was a pretty dumb idea to begin with, so from now on I will go with CSS... :-)

Thanks again!