On Mon, 2006-08-28 at 15:10 +0200, Sigurd Nes wrote: > > From: Dave Hall [EMAIL PROTECTED] > > Sent: 2006-08-28 10:15:37 CEST > > To: [email protected] > > Subject: Re: [Phpgroupware-developers] New feature - wml - > > class.xslttemplates.inc.php > > > > On Sun, 2006-08-27 at 21:00 +0200, Sigurd Nes wrote: > > > Dave Hall wrote: > > > > On Sun, 2006-08-27 at 14:28 +0200, Sigurd Nes wrote: > > > >> Dave Hall wrote: > > > >>> Hi Sigurd, > > > >>> > > > >>> On Sun, 2006-08-27 at 12:57 +0200, Sigurd Nes wrote: > > > >>>> How about having a detecting-function isMobileUser() - that detects > > > >>>> whether the output should be html or wml - changing the top element > > > >>>> of > > > >>>> the stylesheet as something like this: > > > >>>> > > > >>> I would prefer bool browser::is_mobile(), that said it would not be > > > >>> 100% > > > >>> accurate. Close enough is good enough I suppose :) > > > >>> > > > >>> At the same time WML is more than a DTD. We would need to output the > > > >>> correct content type headers. And also we would need a WML template > > > >>> set. > > > >>> Given we are less than a week from a fetaure freeze for the API, I > > > >>> think > > > >>> we should look at implementing this in HEAD after the branch, instead > > > >>> of > > > >>> rushing it now. > > > >> My intention is not to implement the full framework at this stage - but > > > >> to enable certain pages within applications. > > > >> To accomplish this - it is enough to disable framework,header and > > > >> footer > > > >> like this: > > > >> > > > >> $GLOBALS['phpgw_info']['flags'][noheader] = True; > > > >> $GLOBALS['phpgw_info']['flags'][nofooter] = True; > > > >> $GLOBALS['phpgw_info']['flags']['noframework'] = True; > > > >> > > > >> and to have an appropriate xslt-stylesheet for this page (function) > > > >> alone within the application in question. > > > >> > > > >> Any chance ? > > > > > > > > I will support it if: > > > > > > > > * is_mobile method is implemented in browser not the template class > > > > * is_mobile is an optional method parameter which defaults to false > > > > * we can work a clean and documented way to handle the template files > > > > * it all gets documented when it goes into cvs :) > > > > > > > > Maybe others disagree with me. > > > > > > > Something like this? (attachment) > > > > I would make the is_mobile a static method of the browser class so it > > can be called easily with execMethod > > > > As for the implementation in the xslt class i would change the method > > signature from xsl_parse() to xsl_parse($wml_out = false) so no existing > > code is impacted and the if is just doing a binary comparision on the > > method variable, rather than another method call. > > > > > Second try - seems to work fine for me.
Looks good to me :) Just add return info to the browser method docs :) Cheers Dave -- Dave Hall (aka skwashd) API Coordinator phpGroupWare +-------------------------------------+-------------------------------+ | e [EMAIL PROTECTED] | w phpgroupware.org | | j [EMAIL PROTECTED] | aim skwashd | | icq 278064022 | msn [EMAIL PROTECTED] | | sip [EMAIL PROTECTED] | y! skwashd | +-------------------------------------+-------------------------------+ _______________________________________________ Phpgroupware-developers mailing list [email protected] http://lists.gnu.org/mailman/listinfo/phpgroupware-developers
