Page 1 of 1

reading _config table

Posted: Sat Dec 24, 2005 5:45 am
by Ned Keller
I'm just starting to use s9y, and I'm feeling a bit overwhelmed by the many files that it uses. Where does s9y read the fields in the _config table into the variables that it uses later in the program? I'm specifically looking for where the blogTitle entry is read.

Posted: Sat Dec 24, 2005 11:51 am
by Way
s9y is fantastic weblog, you don't need to edit any files
after installation, you just login to admin area and edit every thing you need to edit

to reach admin area just go to this
www.xxx.com/s9y/serendipity_admin.php

login with the user and password you provide while installation
good luck

Posted: Sat Dec 24, 2005 3:54 pm
by Ned Keller
What I'm really trying to do is get s9y to read another field that I've added to _config, blogDisclaimer, which I want to appear in the page header. I figured that if I can find out where the program reads blogTitle, then I'll know where to read my new field.

And on a more fundamental level, I'm also trying to learn how the program works.

Posted: Sat Dec 24, 2005 4:05 pm
by Way
you may Do that directly to the template area
In file index.tpl

Posted: Sat Dec 24, 2005 9:14 pm
by Ned Keller
I really want to keep ALL the content in the database. After poking around some more, I've figured it out (I think - it's working, at any rate).

Serendipity_config.inc.php calls the function serendipity_load_configuration(), which is in the file functions_config.inc.php. That function reads the fields from the _config table, and puts them into $serendipity['foo'] variables. Those variables then get assigned to smarty variable with function serendipity_smarty_init(), in functions_smarty.inc.php. Whew.

So, I added my new blogDisclaimer field to the _config table, created a config.inc.php file in my templates directory for code that mimics the serendipity_smarty_init() code, made a new formatting class in style.css, and stuck a new smarty call into index.tpl. Way more work than sticking some text into the right spot, but I've learned a lot about how Serendipity works, and it will be simple to add the next bit of text in a way that keeps content and presentation separate.

Posted: Mon Dec 26, 2005 8:54 pm
by garvinhicking
I was on vacation, so sorry that I couldn't reply to your original intended question. :-)

However if you find more questions like these in the future, we can surely help you further :-)

Best regards,
Garvin