From: Ton O. <ton...@he...> - 2004-10-30 08:08:55
|
I am almost finished extending the Menuman module with category capability. The last obstacle is the following. I want to show a menu if the menu's category equals the category of one of the other modules that are displayed. So I have to detect which categories are currently displayed. The problem is how to code this in PHP. I thought the following method was the shortest: - loop through mod_fatcat_elements; - extract module_id, module_title and cat_id; - check if module title is displayed with " if (isset($_REQUEST['module']) && $_REQUEST['module']==module_title) " So far so good, now I know if a module is displayed, but how can I check that it is displayed with module_id? For Pagemaster this would be with $_REQUEST['PAGE_id'], but is there some generic expression I can use ? Something like .. && $_REQUEST['module_id']==module_id? Some suggestions? Or maybe an other approach? Thx in advance. Ton Oosterhoff. |
From: Steven L. <st...@tu...> - 2004-11-02 18:21:15
|
On Sat, 2004-10-30 at 04:08, Ton Oosterhoff wrote: > I am almost finished extending the Menuman module with category > capability. >=20 > The last obstacle is the following. >=20 > I want to show a menu if the menu=E2=80=99s category equals the categor= y of > one of the other modules that are displayed. So I have to detect which > categories are currently displayed. >=20 > The problem is how to code this in PHP. >=20 > I thought the following method was the shortest: >=20 > - loop through mod_fatcat_elements; >=20 > - extract module_id, module_title and cat_id; >=20 > - check if module title is displayed with =E2=80=9C if > (isset($_REQUEST['module']) && $_REQUEST['module']=3D=3Dmodule_title) =E2= =80=9C >=20 > So far so good, now I know if a module is displayed, but how can I > check that it is displayed with module_id? >=20 > For Pagemaster this would be with $_REQUEST[=E2=80=98PAGE_id=E2=80=99],= but is there > some generic expression I can use ? >=20 > Something like =E2=80=A6. && $_REQUEST[=E2=80=98module_id=E2=80=99]=3D=3D= module_id? >=20 > Some suggestions? >=20 > Or maybe an other approach?=20 I would suggest using the function call: $_SESSION['OBJ_fatcat']->getModulesCategories($module_title,$module_id); Then check to see if what it returns matches the category of your menu. Right now there is now what to use one request var for any module id because it differs between modules. announce is $_REQUEST['ANN_id'] pagemaster is $_REQUEST['PAGE_id'] faq is $_REQUEST['FAQ_id'] etc... But a proposal I am about to post across the list would change that so most modules will use $_REQUEST['id'], we'll just have to see if folks agree with it. --=20 Steven Levin Computer Systems Admin I Electronic Student Services Appalachian State University http://phpwebsite.appstate.edu |
From: Ryan R. <to...@gm...> - 2004-11-01 19:19:37
|
Ton, What you describe is something I've been looking at in a more general case: Triggering (for lack of a better term). Basically, be able to display a block (menu, login, other) when a certain set of criteria are met. Maybe when a certain module is being used, or simply on a page-by-page/article-by-article basis. While I've been deep in the bowels of server building for the last few months, I haven't been able to keep up with what has been going on in the IRC channel, but at one time there was a little discussion regarding this. Just not sure whether the dev team followed up on it any. So while I can't offer you any direct suggestions, I did want to let you know that you're not alone in wanting that functionality. Ryan On Sat, 30 Oct 2004 10:08:58 +0200, Ton Oosterhoff <ton...@he...> wrote: > =20 > =20 >=20 > I am almost finished extending the Menuman module with category capabilit= y.=20 >=20 > The last obstacle is the following.=20 >=20 > I want to show a menu if the menu's category equals the category of one o= f > the other modules that are displayed. So I have to detect which categorie= s > are currently displayed.=20 >=20 > The problem is how to code this in PHP.=20 >=20 > I thought the following method was the shortest:=20 >=20 > - loop through mod_fatcat_elements;=20 >=20 > - extract module_id, module_title and cat_id;=20 >=20 > - check if module title is displayed with " if (isset($_REQUEST['module'= ]) > && $_REQUEST['module']=3D=3Dmodule_title) "=20 >=20 > So far so good, now I know if a module is displayed, but how can I check > that it is displayed with module_id?=20 >=20 > For Pagemaster this would be with $_REQUEST['PAGE_id'], but is there some > generic expression I can use ?=20 >=20 > Something like =E2=80=A6. && $_REQUEST['module_id']=3D=3Dmodule_id?=20 >=20 > Some suggestions?=20 >=20 > Or maybe an other approach?=20 >=20 > Thx in advance.=20 >=20 > Ton Oosterhoff.=20 >=20 > |
From: Shaun M. <sh...@ae...> - 2004-11-02 22:31:48
|
On 1 Nov 2004, at 19:19, Ryan Roland wrote: > Ton, > > What you describe is something I've been looking at in a more general > case: Triggering (for lack of a better term). Basically, be able to > display a block (menu, login, other) when a certain set of criteria > are met. Maybe when a certain module is being used, or simply on a > page-by-page/article-by-article basis. I've gone through various iterations of this as well. Currently you can attach blocks to another module. phpwsrssfeeds and kcart can attach to pagemaster pages. I hacked menuman and blockmaker to use phpwsrssfeeds method of attaching to pagemaster pages. There was a hack to show blocks to certain users and I think someone already did one for categories. Tying all this together on a piecemeal basis isn't the best of ideas I think so any method of attaching things together in the core would be ideal. Shaun aegis design - http://www.aegisdesign.co.uk |
From: Shaun M. <sh...@ae...> - 2004-11-02 22:57:45
|
On 2 Nov 2004, at 22:31, Shaun Murray wrote: > > Tying all this together on a piecemeal basis isn't the best of ideas I > think so any method of attaching things together in the core would be > ideal. > Oh, and I can't wait to see the user interface needed for attaching a block to a module in 3 categories only. ;-) Shaun aegis design - http://www.aegisdesign.co.uk |
From: Ryan R. <to...@gm...> - 2004-11-03 01:48:57
|
On Tue, 2 Nov 2004 22:57:50 +0000, Shaun Murray <sh...@ae...> wrote: > Oh, and I can't wait to see the user interface needed for attaching a > block to a module in 3 categories only. ;-) But you don't have to have a UI for a feature to design for the capability. The UI to implement the feature can come later. Ryan |
From: Tony M. <to...@ht...> - 2004-11-02 20:56:45
|
Does anyone have a module that they know about that uses multiple Item Manager classes? I have a manager class set up for maintenance of the Cigar Diary tables, and I would like to have a separate one that simply querys the tables and returns and displays the results. Any ideas would be appreciated. -Tony -- Hometown Enterprises Internet Services Professional, affordable web design and hosting. http://www.hteis.com/ |
From: Wendall C. <wen...@to...> - 2004-11-02 22:12:36
|
Tony, The latest phpwsRSSFeeds uses a multiple item class manager. Wendall On Tue, 2004-11-02 at 12:56, Tony Miller wrote: > Does anyone have a module that they know about that uses multiple Item > Manager classes? I have a manager class set up for maintenance of the > Cigar Diary tables, and I would like to have a separate one that simply > querys the tables and returns and displays the results. > > Any ideas would be appreciated. > > -Tony -- "Only the ideas that we really live have any value." --Hermann Hesse (Demian) |
From: Shaun M. <sh...@ae...> - 2004-11-03 16:15:02
|
On 3 Nov 2004, at 01:48, Ryan Roland wrote: > On Tue, 2 Nov 2004 22:57:50 +0000, Shaun Murray > <sh...@ae...> wrote: > >> Oh, and I can't wait to see the user interface needed for attaching a >> block to a module in 3 categories only. ;-) > > But you don't have to have a UI for a feature to design for the > capability. The UI to implement the feature can come later. I was thinking about this this morning. I reckon some kind of rule based system like a Mail filter or search filter that Apple uses in it's apps. Add an extra row to the rule depending on where you want it displayed. eg. Display [menu] called [menuname] if [module] called [pagemaster] if [page] called [about page] You just add extra rules by hitting +/- buttons. The items in [..] are selected from a list and the second parameter is context sensitive depending on what is selected. You may also want boolean rules in there such as 'if not' or 'contains' instead of 'called' Shaun aegis design - http://www.aegisdesign.co.uk |
From: Ryan R. <to...@gm...> - 2004-11-03 16:55:42
|
+1 I like that idea. It allows non-technical people to add the rules in a sentence builder format which makes sense to them. While at the same time making the translation to the code-logic easy. There are additional benefits mulling around in my head, but aren't coherent thoughts yet :) Ryan On Wed, 3 Nov 2004 16:14:53 +0000, Shaun Murray <sh...@ae...> wrote: > > > > On 3 Nov 2004, at 01:48, Ryan Roland wrote: > > > On Tue, 2 Nov 2004 22:57:50 +0000, Shaun Murray > > <sh...@ae...> wrote: > > > >> Oh, and I can't wait to see the user interface needed for attaching a > >> block to a module in 3 categories only. ;-) > > > > But you don't have to have a UI for a feature to design for the > > capability. The UI to implement the feature can come later. > > I was thinking about this this morning. > > I reckon some kind of rule based system like a Mail filter or search > filter that Apple uses in it's apps. Add an extra row to the rule > depending on where you want it displayed. > > eg. > > Display [menu] called [menuname] > > if [module] called [pagemaster] > > if [page] called [about page] > > You just add extra rules by hitting +/- buttons. The items in [..] are > selected from a list and the second parameter is context sensitive > depending on what is selected. You may also want boolean rules in there > such as 'if not' or 'contains' instead of 'called' > > > > > Shaun > aegis design - http://www.aegisdesign.co.uk > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > |