From: Todd O. <to...@ow...> - 2001-03-24 20:42:39
|
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 |
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 |
From: Todd O. <to...@da...> - 2001-03-25 03:51:14
|
Geoff, your logic looks good to me. I assume $dbp means "database prefix". My only question is how will $dbp be assigned? Will there be separate config files hard coded for each site? BTW, I don't have anything left to commit; you might check on Matt's calendar rewrite though. As I was writing up my long range goals, I ran across the opposite problem that Geoff had. What if your site(s) get too large for one database server to handle? Let's assume you're using the one table approach and you have 100,000 users and 1,000 sites on a single install. I can forsee the threaded discussion groups and mailing list archives for these organizations growing VERY quickly. I think we need to code with this in mind. I'm thinking about a server for core features and most plug-ins, but a separate database server for forums and list archives and possible a third for images (although not in a database). This can be solved by connecting to separate database servers once and passing the database handler to the appropriate objects in a similar way Geoff proposed abstracting the table name. Thoughts anyone, anyone? --Todd |
From: Geoff S. <Ge...@Ho...> - 2001-03-25 04:14:45
|
Todd: What I plan to do is Install the software on one domain and the database on a separate domain. Or, I will install multiple copies of the software in separate directories on the same domain. So, that would involve complete installs of the software (including the config file) for each "instance". I suppose that I could run multiple instances through the same copy of the software installed in a single location. But, I want to be able to customize each instance if I choose to. I haven't played with the software sufficiently to determine the extent to which I could customize with a single installation of the software. BTW: I have a question about CVS. I haven't used CVS before, so... I found a reference to SSH and downloaded it from ssh.com. But, I can't get it to login as anonymous and I don't have my CVS access yet. Can you tell me what I need to do to at least gain anonymous access? Thanks, Geoff -----Original Message----- From: php...@li... [mailto:php...@li...]On Behalf Of Todd Owen Sent: Saturday, March 24, 2001 9:55 PM To: php...@li... Subject: Re: [Phpwebsite-developers] PHPlib & Multiple Instances Geoff, your logic looks good to me. I assume $dbp means "database prefix". My only question is how will $dbp be assigned? Will there be separate config files hard coded for each site? BTW, I don't have anything left to commit; you might check on Matt's calendar rewrite though. As I was writing up my long range goals, I ran across the opposite problem that Geoff had. What if your site(s) get too large for one database server to handle? Let's assume you're using the one table approach and you have 100,000 users and 1,000 sites on a single install. I can forsee the threaded discussion groups and mailing list archives for these organizations growing VERY quickly. I think we need to code with this in mind. I'm thinking about a server for core features and most plug-ins, but a separate database server for forums and list archives and possible a third for images (although not in a database). This can be solved by connecting to separate database servers once and passing the database handler to the appropriate objects in a similar way Geoff proposed abstracting the table name. Thoughts anyone, anyone? --Todd _______________________________________________ Phpwebsite-developers mailing list Php...@li... http://lists.sourceforge.net/lists/listinfo/phpwebsite-developers |
From: Todd O. <to...@da...> - 2001-03-25 18:14:53
|
Geoff, the following is from the phpwebsite.appstate.edu website under downloads: pserver: cvs -z3 -d:pserver:anonymous@152.10.194.1:/home/cvsroot login Just hit enter (no password) cvs -z3 -d:pserver:anonymous@152.10.194.1:/home/cvsroot co phpwebsite You can just type this in from the command line on a Linux/BSD box. I use Windows most of the time, so it's WinCVS 1.2 for me. Also WinCVS won't take an IP address for the server so substitute res1.resnet.appstate.edu instead. I use the WinCVS admin command line and type in the unix style commands instead of using the GUI commands though. When you get CVS access, just substitute your username ('todd' in my case) for anonymous and enter your password when prompted (anonymous password is blank. The following link from cvshome.org discusses branches: http://www.cvshome.org/docs/manual/cvs_5.html --Todd Owen |
From: Geoff S. <Ge...@Ho...> - 2001-03-25 18:40:29
|
Cool! I thought we were using SourceForge, though. However, I still haven't heard back from Jeremy. Perhaps I'll try the userid and password I requested and see if I get lucky. Geoff 214.599.0260 Hostricity Web Hosting <http://www.hostricity.com/> -----Original Message----- From: php...@li... [mailto:php...@li...]On Behalf Of Todd Owen Sent: Sunday, March 25, 2001 12:18 PM To: php...@li... Subject: [Phpwebsite-developers] CVS access Geoff, the following is from the phpwebsite.appstate.edu website under downloads: pserver: cvs -z3 -d:pserver:anonymous@152.10.194.1:/home/cvsroot login Just hit enter (no password) cvs -z3 -d:pserver:anonymous@152.10.194.1:/home/cvsroot co phpwebsite You can just type this in from the command line on a Linux/BSD box. I use Windows most of the time, so it's WinCVS 1.2 for me. Also WinCVS won't take an IP address for the server so substitute res1.resnet.appstate.edu instead. I use the WinCVS admin command line and type in the unix style commands instead of using the GUI commands though. When you get CVS access, just substitute your username ('todd' in my case) for anonymous and enter your password when prompted (anonymous password is blank. The following link from cvshome.org discusses branches: http://www.cvshome.org/docs/manual/cvs_5.html --Todd Owen _______________________________________________ Phpwebsite-developers mailing list Php...@li... http://lists.sourceforge.net/lists/listinfo/phpwebsite-developers |
From: Geoff S. <Ge...@Ho...> - 2001-03-25 18:56:38
|
Todd: I'm using Wincvs. It appears to be finding your server and I get to the point of it requesting the password. I simply press enter (for anonymous) and then I get an error that userid doesn't exist. Geoff -----Original Message----- From: php...@li... [mailto:php...@li...]On Behalf Of Todd Owen Sent: Sunday, March 25, 2001 12:18 PM To: php...@li... Subject: [Phpwebsite-developers] CVS access Geoff, the following is from the phpwebsite.appstate.edu website under downloads: pserver: cvs -z3 -d:pserver:anonymous@152.10.194.1:/home/cvsroot login Just hit enter (no password) cvs -z3 -d:pserver:anonymous@152.10.194.1:/home/cvsroot co phpwebsite You can just type this in from the command line on a Linux/BSD box. I use Windows most of the time, so it's WinCVS 1.2 for me. Also WinCVS won't take an IP address for the server so substitute res1.resnet.appstate.edu instead. I use the WinCVS admin command line and type in the unix style commands instead of using the GUI commands though. When you get CVS access, just substitute your username ('todd' in my case) for anonymous and enter your password when prompted (anonymous password is blank. The following link from cvshome.org discusses branches: http://www.cvshome.org/docs/manual/cvs_5.html --Todd Owen _______________________________________________ Phpwebsite-developers mailing list Php...@li... http://lists.sourceforge.net/lists/listinfo/phpwebsite-developers |
From: Spiggy T. <th...@me...> - 2001-03-26 00:30:06
|
ok. with wincvs i type cvs -z3 -d:pserver:anonymous@152.10.194.1:/home/cvsroot login then follows the messages: (Logging in to anonymous@152.10.194.1) *****CVS exited normally with code 0***** the same result if i substitute the ip# with res1.resnet.appstate.edu so, what am i doing wrong? paivi |
From: Todd O. <to...@da...> - 2001-03-26 05:02:05
|
Make sure you set up a cvsroot first before logging in. >> *****CVS exited normally with code 0***** You're not doing anything wrong. Now you're logged in. You then have to type the following to actually get the files moving: cvs -z3 -d:pserver:anonymous@152.10.194.1:/home/cvsroot co phpwebsite 'co' = checkout http://www.cvshome.org --Todd |
From: Karsten D. <k.d...@tu...> - 2001-03-26 14:17:27
|
On Sat, Mar 24, 2001 at 07:32:56PM -0600, Geoff Staples wrote: > Add the following variable to config.php: >=20 > $dbp =3D ""; >=20 > $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. Good. > 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: >=20 > $tbl_stories =3D $dbp."stories" Good. > Edit all code in the system per the following example: > [...] > Do this for all SQL calls in the system. Good. > 1. Is "$dbp" an appropriate name for the database table prefix variable? I would say yes. If one would introduce the multilinugal approach I describe in my (other) mail, another prefix might be used, called $lang or whatever. I would add this through a patch being applied during makedistro.sh anyway, so we don't have to worry about htis right now. > 2. Is the config.php file the best place to put the "$tbl" variables? In a way, yes. If we decide on a database abstraction layer, we might introduce a seperate file with databse varibales, subclassing (in case of phplib) or whatever we need. We should put those definitions there, but until then... > 3. Is "$tbl_stories" the appropriate name for the variable to contain the > table name for the stories table? I would call them that way. By doing that all table related variables would show up in the same section of the phpdic element list, and one could always see at first glance, what the variable is for. BTW: If we have all the table names in a single file, it should be easy to give them more consistent names. Although it might be hard enough to settle on a definition of consistent :-) Regards, Karsten --=20 Why do we have to hide from the police, daddy? Because we use emacs, son. They use vi. ----------------------------- mailto:k.d...@tu... w=B3: http://www.k-fish.de/ gpg: http://www.k-fish.de/mykeys.gpg |