![]() |
|
#1
|
|||
|
|||
|
GPL automotive photojournal database design
With the help of Hotrodders Bulletin Board member grouch, we've come up with a rough draft of the database for our idea for a free automotive photojournal in PHP/MySQL, in this thread on the HRBB.
All code is copyright 2005 Crankshaft Coalition, and is licensed under the GNU GPL. Here are the CREATE TABLE statements for the database. Code:
We're open to any and all feedback on this. This current database design allows for multiple photojournals per user (to record multiple hotrodding projects). However, we may not be incorporating the multiple-journal feature into the first release. The journal photos will be stored in the filesystem, like this: /journal_photo_directory/userid/journalid/photoid.type Users will be able to assign a title, description, and image for each journal. Last edited by Jon : 11-13-2005 at 07:25 PM. Reason: updated to reflect changes discussed in this thread |
|
#2
|
|||
|
|||
|
Will user authentication be handled by the new journal code?
|
|
#3
|
|||
|
|||
|
Yes.
My thought was that we would start by emulating vBulletin authentication, and then including options for other popular forum software packages. |
|
#4
|
|||
|
|||
|
Some slightly random thoughts...
* need: authentication, form for adding entries, page to display a list or summary of all journals, page to display summary of 1 journal, page to display entries of a journal * probably should keep the page generation and the SQL work separate as much as possible, like entry_form.php and entry_form_db.php * You mentioned elsewhere that it might be a good idea to have the comment thread starter check for a threadid one last time before commit, just in case someone started a thread while the first one was still being typed. I think that's a good idea, based on personal experience. I'm on dial-up and also kinda slow about hitting "Submit Reply" as well as being long-winded and have noticed several times that new posts were made in a thread while I was working on mine. |
|
#5
|
|||
|
|||
|
We'll need a "front" page too, which will be different than the summary page. It would probably include the most recent entries, most recent photos, largest journals, etc.
We definitely need a simple journal search engine. We'll need a method for referencing and displaying individual journal entries. That way, we can store individual entries in our Knowledge Base, or otherwise link to them, etc. How about a few simple PHP objects to handle database connections? A mechanism for incorporating RSS feeds will also be necessary. Anything else you can think of? |
|
#6
|
|||
|
|||
|
I'm rotten at object-oriented stuff. Right now I'm just trying to get something that works to put data in and get it back out. The exercise is showing me just how long it's been since I did anything with php.
|
|
#7
|
|||
|
|||
|
Quick and dirty is fine. We can always clean it up later.
|
|
#8
|
|||
|
|||
|
[begin edit:]
N/M. The following is just too fugly in practice. I'm leaving it here just because I don't like to delete stuff and because it might entertain. [end edit] "Dirty" I can do; it's the "quick" that's bogging me down. But then, all things are relative. ![]() I know this needs to keep human readability as a higher priority than compactness or cleverness, but fetching a row as an associative array looks to be a really common thing. How about a generalized function for that? The same chores get done over and over to retrieve rows for the entry form, journal summary, journal display, etc. (Hope the spacing and indentation holds up) Code:
Last edited by grouch : 11-08-2005 at 08:24 PM. Reason: second thoughts |
|
#9
|
|||
|
|||
.It might be best to keep the query whole, rather than dividing it up into clauses. Try doing this with a simple database connection object. |
|
#10
|
|||
|
|||
|
I just plain messed up. That happens a lot; I get started and think if this or that were changed a little, it would be much more generalized, so the whole thing becomes a generalized mess to do everything, but does nothing well. I've started over 3 or 4 times and fallen victim to that each time.
This time I will try to keep the KISS principle in mind. Simple forms, simple pages, simple queries ... and then I can make it into the Ronco Dat-O-Matic and become Supreme Evil Overlord of the Universe! Well, um, anyway, back to it. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|