From: Alex B. <en...@tu...> - 2001-08-20 21:13:06
|
hi all, Sync to sourceforge is done, you can update your checkouts :) _alex |
From: jason <ja...@gr...> - 2001-08-20 22:23:56
|
i thought i'd be the first to report that the Query_Example no longer works after this last CVS sync. Warning: Supplied argument is not a valid MySQL result resource in /home/jason/r2/binarycloud/build/en/ext/metabase/metabase_mysql.php on line 166 on a side note, i wanted to ask for a recommendation as to how to implement a simple application under BC in regards to how to handle a single module that uses multiple classes/libraries. for example, i've got a forum application underway with the following structure. build/en/user/mod/forum/lib/Forum.php <- the required library (included by the other files) build/en/user/mod/forum/ForumIndex.php <- forum listing, default page. build/en/user/mod/forum/ForumList.php <- lists the messages in a forum build/en/user/mod/forum/ForumRead.php <- displays a thread build/en/user/mod/forum/ForumPost.php <- to post a thread/reply now, these classes each contain a constructor, and Output() method. so far so good, no troubles... as for the document root side, i have a question as to handle this. i know either way will work, but i'm wanting to stay as conforming as possible while BC is still under development. should i have this...: build/en/htdocs/forum/index.php <- builds/imports build/en/htdocs/forum/list.php <- builds/imports ForumList.php build/en/htdocs/forum/read.php <- builds/imports ForumRead.php . . etc. which is working fine, although all the gPageDef is redundant. OR this...: build/en/htdocs/forum/index.php <- a switch looking for $mode which builds/imports the desired module such as ForumIndex.php,ForumList.php, etc... this seems like a trivial question to ask, but i'm not exactly sure how module distribution is to be handled in the future. i hope this is clear enough for a response. jason Alex Black wrote: > Sync to sourceforge is done, you can update your checkouts :) |
From: Alex B. <en...@tu...> - 2001-08-20 23:24:37
|
> > i thought i'd be the first to report that the Query_Example no longer > works after this last CVS sync. > > Warning: Supplied argument is not a valid MySQL result resource in > /home/jason/r2/binarycloud/build/en/ext/metabase/metabase_mysql.php on > line 166 hrm... I haven't tested any of this, I'll do that and see what I see. andreas? > as for the document root side, i have a question as to handle this. i > know either way will work, but i'm wanting to stay as conforming as > possible while BC is still under development. > > should i have this...: > build/en/htdocs/forum/index.php <- builds/imports > build/en/htdocs/forum/list.php <- builds/imports ForumList.php > build/en/htdocs/forum/read.php <- builds/imports ForumRead.php > . > . > etc. > which is working fine, although all the gPageDef is redundant. > > OR this...: > build/en/htdocs/forum/index.php <- a switch looking for $mode which > builds/imports the desired module such as ForumIndex.php,ForumList.php, > etc... > > this seems like a trivial question to ask, but i'm not exactly sure how > module distribution is to be handled in the future. > > i hope this is clear enough for a response. yes, it is. One of the things I would like to do is build a "PageDefBuilder" class which is capable of accepting some rules from a 'definition file' so you could do something like this: setup an alias for htdocs/forum/* to htdocs/forum/index.php, which would allow you to receive requests like forum/post/1928374. The page in htdocs/index.php would not contain module definitions: it would import PageDefBuilder, which would import a file from your module dir which tells it how to build up the module list (in this case, based on the request uri), put that array into $gPageDef - then import & run Page->BuildPage(); That would make your urls elegant (you can parse the request uri into an array which will tell you what modules to use, and still retain the ability to cache those module's output) ------ That's sort of fancy, but it makes your 'external face' to the world very orderly and clean (and if your forums are public, search engine friendly, not to mention easily memorable and bookmarkable. Barring the above, the other way, i.e. a separate page with some duplicative $gPageDef stuff is I think the best way to go. If you're into it, you're welcome to build a PageDefBuilder class :) I'll help :) best, _alex |
From: jason <ja...@gr...> - 2001-08-20 23:31:29
|
Apologies -- i was in a bit of a hurry. CVS simply overwrote some configured stuff. doh. It does work. jason > > i thought i'd be the first to report that the Query_Example no longer > > works after this last CVS sync. > > > > Warning: Supplied argument is not a valid MySQL result resource in > > /home/jason/r2/binarycloud/build/en/ext/metabase/metabase_mysql.php on > > line 166 > > hrm... > > I haven't tested any of this, I'll do that and see what I see. |
From: Alex B. <en...@tu...> - 2001-08-20 23:36:59
|
oh, good! :) > > Apologies -- i was in a bit of a hurry. > > CVS simply overwrote some configured stuff. doh. > > It does work. > jason > >>> i thought i'd be the first to report that the Query_Example no longer >>> works after this last CVS sync. >>> >>> Warning: Supplied argument is not a valid MySQL result resource in >>> /home/jason/r2/binarycloud/build/en/ext/metabase/metabase_mysql.php on >>> line 166 >> >> hrm... >> >> I haven't tested any of this, I'll do that and see what I see. > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: Andreas A. <a.a...@th...> - 2001-08-21 09:04:23
|
Hi > i thought i'd be the first to report that the Query_Example no longer > works after this last CVS sync. > > Warning: Supplied argument is not a valid MySQL result resource in > /home/jason/r2/binarycloud/build/en/ext/metabase/metabase_mysql.php on > line 166 Guess, datasources has been overwritten. Debug should output errors beacuse I used CaptureError() in case of errors and CaptureMessage() for informations messages. But Debug does not output errors properly so you dont get a descriptive err message. Andi |
From: jason <ja...@gr...> - 2001-08-21 01:56:26
|
While this makes sense in theory, let me try and approach this from a different angle. My train of thought is blocked by a lingering question on how modules will be distributed once BC is mainlined. Are page definition (bcp.xml) files to be included with the module package? While the easy answer may be "yes, why not", it also makes sense to allow for modules to be dropped in the module directory by themselves, so that the site-owners can add the new module to their _already existing_ page definitions where they see fit. The problem I see with replacing the $gPageDef declaration in the page definition is: (begin scenerio) Let's say, my forum app uses this new PageDefBuilder to parse incoming URI's. So this would mean that my forum app module package would contain a 'uri definition file' like you described. Now, on my _already existing_ page definition where I have a navigation module, content management, whatever, I want a forum to appear at the bottom. I would have to lose my existing $gPageDef array to make room for the new module which uses the PageDefBuilder. Something just doesn't make sense here. My first idea/proposal here would be to create a new public method in $Page that gets passed the necessary info to handle the incoming URI and load up the right module. I think this was a bit wordy, but it took some writing before my thoughts were clear. To sum.. instead of a PageDefBuilder to replace the $gPageDef array, we add a $Page->BuildDynamicModule which acts as a gateway to launch a multi-module application, and the appropriate module is determined by comparing the incoming URI to an XML definition file in the module directory. jason Alex Black wrote: > One of the things I would like to do is build a "PageDefBuilder" class which > is capable of accepting some rules from a 'definition file' so you could do > something like this: > > setup an alias for htdocs/forum/* to htdocs/forum/index.php, which would > allow you to receive requests like forum/post/1928374. > > The page in htdocs/index.php would not contain module definitions: it would > import PageDefBuilder, which would import a file from your module dir which > tells it how to build up the module list (in this case, based on the request > uri), put that array into $gPageDef - then import & run Page->BuildPage(); > > That would make your urls elegant (you can parse the request uri into an > array which will tell you what modules to use, and still retain the ability > to cache those module's output) |
From: Alex B. <en...@tu...> - 2001-08-21 02:24:39
|
> > While this makes sense in theory, let me try and approach this from a > different angle. > > My train of thought is blocked by a lingering question on how modules > will be distributed once BC is mainlined. Tarballs with a simple installer. There will be a distribution-packing utility that tars files assuming binarycloud/ as the root of the tar. > Are page definition (bcp.xml) files to be included with the module > package? While the easy answer may be "yes, why not", > it also makes sense to allow for modules to be dropped in the module > directory by themselves, so that the site-owners can add the new module > to their _already existing_ page definitions where they see fit. Yes, the pages will be included in the modules distro tarballs. You _should_ have a functional installation of a module that you can run in a browser right after installation (including db setup + make) And if you want to delete, move, etc htdocs (or module files) you can. > The problem I see with replacing the $gPageDef declaration in the page > definition is: > > (begin scenerio) > Let's say, my forum app uses this new PageDefBuilder to parse incoming > URI's. So this would mean that my forum app module package would > contain a 'uri definition file' like you described. > > Now, on my _already existing_ page definition where I have a navigation > module, content management, whatever, I want a forum to appear at the > bottom. I would have to lose my existing $gPageDef array to make room > for the new module which uses the PageDefBuilder. Something just > doesn't make sense here. > > My first idea/proposal here would be to create a new public method in > $Page that gets passed the necessary info to handle the incoming URI and > load up the right module. > > I think this was a bit wordy, but it took some writing before my > thoughts were clear. That's effectively the same thing as PageDefBuilder. You could have PageDefBuilder build only _part_ of your page definition (say, the 'forum' group). :) > To sum.. instead of a PageDefBuilder to replace the $gPageDef array, we > add a $Page->BuildDynamicModule which acts as a gateway to launch a > multi-module application, and the appropriate module is determined by > comparing the incoming URI to an XML definition file in the module > directory. I still prefer the idea of PageDefBuilder, because page definitions to not have to be built 100% - you can run it simply to _add_ some modules to a page definition.... So, let's consider the possibilities: 1) you want to run the forum 'alone' in its own location: forums/index.php -you create an apache alias for forum/* to forum/index.php -you create a 'request uri' class which is used by PageDefBuilder to parse the request uri and build an array in $gPageDef. -You run $gPageDef through Page and get output. 2) You want to have a forum for every single page on your site (hey, possible right? :) -you create a normal page def for each page, but include PageDefBuilder. -it uses the request_uri class to determine the forum name, and puts the ForumList module into the page def. -user clicks 'post' or soemthing, and gets sent to the 'normal forum post page elsewhere in htdocs. I don't see a reason why that wouldn't work... best, -alex |
From: jason <ja...@gr...> - 2001-08-21 03:48:38
|
Alex Black wrote: > -you create a normal page def for each page, but include > PageDefBuilder. Ah. This was it. I was assuming the PageDefBuilder would build the entire page definition, not work with it if it existed. > -it uses the request_uri class to determine the forum name, and puts > the ForumList module into the page def. > -user clicks 'post' or soemthing, and gets sent to the 'normal forum > post page elsewhere in htdocs. Sounds like the PageDefBuilder is going to need a few libraries. What, besides handling URI's will it need to accommodate? And what would be example syntax of the url->module mapping? (it's now 68.33% clear in my mind) =] jason |
From: alex b. <en...@tu...> - 2001-08-21 07:51:22
|
> Ah. This was it. I was assuming the PageDefBuilder would build the > entire page definition, not work with it if it existed. I don't see a reason why it couldn't/shoudn't do both. > > -it uses the request_uri class to determine the forum name, and puts > > the ForumList module into the page def. > > -user clicks 'post' or soemthing, and gets sent to the 'normal forum > > post page elsewhere in htdocs. > > Sounds like the PageDefBuilder is going to need a few libraries. What, > besides handling URI's will it need to accommodate? > And what would be example syntax of the url->module mapping? I imagine it would actually take a 'custom' library for each case... it would only really supervise the process. So you'd write your own class that gets variables, etc and PageDefBuilder would give you a simple way of assigning those values. _a > (it's now 68.33% clear in my mind) > =] > > jason > > _______________________________________________ > binarycloud-dev mailing list > bin...@li... > http://lists.sourceforge.net/lists/listinfo/binarycloud-dev > |
From: Andreas A. <a.a...@th...> - 2001-08-21 09:33:30
|
Hi > > Warning: Supplied argument is not a valid MySQL result resource in > > /home/jason/r2/binarycloud/build/en/ext/metabase/metabase_mysql.php on > > line 166 > I haven't tested any of this, I'll do that and see what I see. I guess it's wrong datasources.php entries. The actual MetabaseError is captured by Debug->CaptureError() and should be printed by Debug->Output('errors'). But the output method for errors is currently not implemented. I'll do this today. Andi |
From: John P. C. <jca...@in...> - 2001-08-24 10:04:02
|
I have had trouble with my responses showing up. This is a test. |