Res facta quae tamen fingi potuit (
pauamma) wrote in
dw_dev_training2012-06-22 06:09 pm
Entry tags:
Question thread #7
It's time (more than time, actually) for another question thread!
The rules:
- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer.
The rules:
- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer.

no subject
For the rest, most things have methods in cgi-bin/LJ/User.pm (and that's the best way to abstract things: you don't call the DB directly in the page your'e writing, you call the User.pm method to call the DB, so if you ever need to change it it's only one place to change it); things that are one-offs, or have been around for ages and not converted to using that method, may have the SQL statements in the code itself, but it really shouldn't.
no subject
no subject
no subject
If you mean whatI think you mean, the code for that is in LJ::S2Theme, I don't recall if I actually wrote the editing code into the module or just inlined that into the admin page.
no subject