From: Geoff S. <Ge...@Ho...> - 2001-03-25 01:33:01
|
Yes, I'll do it on a branch. But, following is my "specification" for the changes. Please review. I'd like to know that this approach is agreeable to everyone and that, assuming it is done correctly and isn't buggy, it will be accepted! Add the following variable to config.php: $dbp = ""; $dbp can be set to a prefix for database tables. When it is empty, the tables will be unchanged from their current "no prefix" names. Setup up a variable for every table in the system using the following example as a model. Place them toward the bottom of config.php: $tbl_stories = $dbp."stories" Edit all code in the system per the following example: Existing code: $result = mysql_query("SELECT sid, aid, title, time, hometext, bodytext, comments, counter, topic, informant, notes FROM stories ORDER BY sid DESC limit $storynum"); New Version: $result = mysql_query("SELECT sid, aid, title, time, hometext, bodytext, comments, counter, topic, informant, notes FROM $tbl_stories ORDER BY sid DESC limit $storynum"); Do this for all SQL calls in the system. Now, SEVERAL QUESTIONS TO BE ANSWERED: 1. Is "$dbp" an appropriate name for the database table prefix variable? 2. Is the config.php file the best place to put the "$tbl" variables? 3. Is "$tbl_stories" the appropriate name for the variable to contain the table name for the stories table? Finally, a housekeeping issue: I can make these changes in short order. So, I'd like to take the most current copy of the code, make the changes, and make them available for inspection before committing to the base code. What I don't want to do is get into a situation where the base code cannot be updated without merging a bunch of stuff. So, is there anything special I need to do other then grab the code out of CVS, make the changes and then make the branch available for review? Here's a list of all tables in the system: adminblock authors banner bannerclient bannerfinish omments counter ephem flags help image_category images lblocks links_categories links_links links_newlink links_subcategories main_page_content mainblock menu messages mod_cal_category mod_cal_events mod_cal_images mod_cal_location mod_cal_subcat new_referer page_content plugins poll_data poll_desc pollcomments queue quotes rblocks seccont sections stories template_icons topics user_pages users Geoff Dallas, Texas 214.599.0260 -----Original Message----- From: php...@li... [mailto:php...@li...]On Behalf Of Todd Owen Sent: Saturday, March 24, 2001 2:46 PM To: php...@li... Subject: [Phpwebsite-developers] PHPlib & Multiple Instances I spoke with Jason by phone for about 30 minutes today and we are in TOTAL agreement that we need a good roadmap for the future of phpWebSite before significant changes are made (like database abstraction). The database design needs some more tweaking and the themes need to be rethought in a more object oriented approach. Jason and I think phpWebSite should have customizable themes in the database, not in php code. Steven, could you elaborate on your XML idea? Geoff, since this is such a sweeping change, please create a cvs branch for these changes and let us know the branch name. Everyone can review and test the branch code before committing it to the main repository. Since Karsten seems to be in charge of documentation, let's make sure our comments fit the phpdoc format. --Todd _______________________________________________ Phpwebsite-developers mailing list Php...@li... http://lists.sourceforge.net/lists/listinfo/phpwebsite-developers |