[symfony-users] Re: mobile site strategy

2010-09-13 Thread popofr13
How do you manage the case which symfony actions are different between
mobile and not mobile website ?

Case Study : Home page

In the not mobile website, we could display 3 modules (each connected
to some data in database)
In the mobile, we could only display 1 module

Note: in this case, only the display is different, but we could
imagine that the data processing is different

Thanks.
Sébastien PORATI

On Sep 8, 8:06 pm, Gustavo Adrian  wrote:
> That's a nice tip that I didn't know. Thanks for mention it!
>
> On Wed, Sep 8, 2010 at 2:57 PM, Kevin  wrote:
> > I found also you can add .sf_format to a layout: layout.mobile.php to
> > automatically use that layout when sf_format is not html
>
> > (this was mentioned above my klemens_u)
>
> > On Sep 8, 1:48 pm, Gustavo Adrian  wrote:
> > > You could create a custom layout for mobile sites. Then, in the action:
>
> > > $this->setLayout( 'myMobileLayout' );
>
> > > You could create a custom "base" action that extends from sfActions,
> > where
> > > you check for the "sf_format" value for the request in the "preExecute"
> > > method. Then, based on that value, set the layout you need. Finally,
> > extend
> > > every action from this "base" action. For example:
>
> > > *class myBaseAction extends sfActions
> > > {
> > >     public function preExecute()
> > >     {
> > >         if ( $this->getRequest()->getParameter( 'sf_format' ) == 'mobile'
> > )
> > >         {
> > >             $this->setLayout( 'myMobileLayout' );
> > >         }
> > >     }}
>
> > > *
> > > Then in your action
>
> > > class myOwnAction extends myBaseAction
> > > {
> > >     public function preExecute()
> > >     {
> > >         parent::preExecute();
>
> > >         // More stuff
> > >     }
>
> > > }
>
> > > Regards.
>
> > > On Wed, Sep 8, 2010 at 2:26 PM, Kevin  wrote:
> > > > How do you get it to work for layouts?
>
> > > > On Sep 7, 8:40 am, Kevin  wrote:
> > > > > Thanks, this stuff is great.  Never thought of that.
>
> > > > > On Sep 7, 3:49 am, klemens_u  wrote:
>
> > > > > > Hi,
>
> > > > > > it's basically really just a question of view.
>
> > > > > > Here's an old blog post about creating an iphone view:
> > > >http://www.symfony-project.org/blog/2008/06/09/how-to-create-an-optim.
> > ..
> > > > > > Most of it is still valid and it works.
>
> > > > > > But there is one serious drawback: You have to provide amobile
> > > > > > template for each action.
> > > > > > That's why we created a tiny patch (for our "ullright" platform) to
> > > > > > provide a fallback to normal templates in case there is no
> > > > specialmobileone.
>
> > > > > > Here are the required parts:
>
> > > > > > Mobiledetection: This belongs into your project configuration:
> > > >http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/config/u.
> > ..
>
> > > > > > Symfony patch enabling fallback to html templates: (Patches
> > > > > > sfView.class.php)
> > > >http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/patch/sf.
> > ..
>
> > > > > > Finally provide amobiletemplate (or not):
> > > > > > Normaly you would put your template in
> > apps/frontend/modules/myModule/
> > > > > > templates/myActionSuccess.php
> > > > > > Now you can provide amobiletemplate by creating the following file:
> > > > > > apps/frontend/modules/myModule/templates/myActionSuccess.mobile.php
>
> > > > > > This also works for layouts, partials and components. Example:
> > apps/
> > > > > > frontend/modules/myModule/templates/_head.mobile.php
>
> > > > > > Have a nice day,
>
> > > > > > Klemens
>
> > > > > > On 6 Sep., 00:29, Alexandre Salomé 
> > wrote:
>
> > > > > > > It's just a question of view.
>
> > > > > > > You should create dedicated routes with a sf_format "mini"
>
> > > > > > > 2010/9/2 Dennis 
>
> > > > > > > > Rather than go the plugin route, why not use either a '.mobi'
> > tld,
> > > > or
> > > > > > > > '.movi' subdomain, and symlinnk any directories that you need
> > > > between
> > > > > > > > the two projects?
>
> > > > > > > > On Sep 1, 4:57 am, Benoit Montuelle <
> > benoit.montue...@gmail.com>
> > > > > > > > wrote:
> > > > > > > > > I've done it by adding specific layout, templates and
> > stylesheet
> > > > to the
> > > > > > > > existing app.
>
> > > > > > > > > You can trigger events in your project configuration upon
> > user
> > > > agent to
> > > > > > > > change templates and specific configuration.
>
> > > > > > > > > The strategy to use another app depends wether yourmobileapp
> > > > should
> > > > > > > > have the same functionnality as the 'classic' web app does, but
> > it
> > > > will be
> > > > > > > > easier if most code still shared.
>
> > > > > > > > > -Original Message-
> > > > > > > > > From: Kevin 
> > > > > > > > > Sent: mercredi 1 septembre 2010 12:51
> > > > > > > > > To: symfony users 
> > > > > > > > > Subject: [symfony-users]mobilesite strategy
>
> > > > > > > > > I am wondering what others have done to create amobilesite
> > for
> > > > their
> > > > > > > > > symfony

Re: [symfony-users] Re: mobile site strategy

2010-09-08 Thread Gustavo Adrian
That's a nice tip that I didn't know. Thanks for mention it!

On Wed, Sep 8, 2010 at 2:57 PM, Kevin  wrote:

> I found also you can add .sf_format to a layout: layout.mobile.php to
> automatically use that layout when sf_format is not html
>
> (this was mentioned above my klemens_u)
>
> On Sep 8, 1:48 pm, Gustavo Adrian  wrote:
> > You could create a custom layout for mobile sites. Then, in the action:
> >
> > $this->setLayout( 'myMobileLayout' );
> >
> > You could create a custom "base" action that extends from sfActions,
> where
> > you check for the "sf_format" value for the request in the "preExecute"
> > method. Then, based on that value, set the layout you need. Finally,
> extend
> > every action from this "base" action. For example:
> >
> > *class myBaseAction extends sfActions
> > {
> > public function preExecute()
> > {
> > if ( $this->getRequest()->getParameter( 'sf_format' ) == 'mobile'
> )
> > {
> > $this->setLayout( 'myMobileLayout' );
> > }
> > }}
> >
> > *
> > Then in your action
> >
> > class myOwnAction extends myBaseAction
> > {
> > public function preExecute()
> > {
> > parent::preExecute();
> >
> > // More stuff
> > }
> >
> > }
> >
> > Regards.
> >
> > On Wed, Sep 8, 2010 at 2:26 PM, Kevin  wrote:
> > > How do you get it to work for layouts?
> >
> > > On Sep 7, 8:40 am, Kevin  wrote:
> > > > Thanks, this stuff is great.  Never thought of that.
> >
> > > > On Sep 7, 3:49 am, klemens_u  wrote:
> >
> > > > > Hi,
> >
> > > > > it's basically really just a question of view.
> >
> > > > > Here's an old blog post about creating an iphone view:
> > >http://www.symfony-project.org/blog/2008/06/09/how-to-create-an-optim.
> ..
> > > > > Most of it is still valid and it works.
> >
> > > > > But there is one serious drawback: You have to provide amobile
> > > > > template for each action.
> > > > > That's why we created a tiny patch (for our "ullright" platform) to
> > > > > provide a fallback to normal templates in case there is no
> > > specialmobileone.
> >
> > > > > Here are the required parts:
> >
> > > > > Mobiledetection: This belongs into your project configuration:
> > >http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/config/u.
> ..
> >
> > > > > Symfony patch enabling fallback to html templates: (Patches
> > > > > sfView.class.php)
> > >http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/patch/sf.
> ..
> >
> > > > > Finally provide amobiletemplate (or not):
> > > > > Normaly you would put your template in
> apps/frontend/modules/myModule/
> > > > > templates/myActionSuccess.php
> > > > > Now you can provide amobiletemplate by creating the following file:
> > > > > apps/frontend/modules/myModule/templates/myActionSuccess.mobile.php
> >
> > > > > This also works for layouts, partials and components. Example:
> apps/
> > > > > frontend/modules/myModule/templates/_head.mobile.php
> >
> > > > > Have a nice day,
> >
> > > > > Klemens
> >
> > > > > On 6 Sep., 00:29, Alexandre Salomé 
> wrote:
> >
> > > > > > It's just a question of view.
> >
> > > > > > You should create dedicated routes with a sf_format "mini"
> >
> > > > > > 2010/9/2 Dennis 
> >
> > > > > > > Rather than go the plugin route, why not use either a '.mobi'
> tld,
> > > or
> > > > > > > '.movi' subdomain, and symlinnk any directories that you need
> > > between
> > > > > > > the two projects?
> >
> > > > > > > On Sep 1, 4:57 am, Benoit Montuelle <
> benoit.montue...@gmail.com>
> > > > > > > wrote:
> > > > > > > > I've done it by adding specific layout, templates and
> stylesheet
> > > to the
> > > > > > > existing app.
> >
> > > > > > > > You can trigger events in your project configuration upon
> user
> > > agent to
> > > > > > > change templates and specific configuration.
> >
> > > > > > > > The strategy to use another app depends wether yourmobileapp
> > > should
> > > > > > > have the same functionnality as the 'classic' web app does, but
> it
> > > will be
> > > > > > > easier if most code still shared.
> >
> > > > > > > > -Original Message-
> > > > > > > > From: Kevin 
> > > > > > > > Sent: mercredi 1 septembre 2010 12:51
> > > > > > > > To: symfony users 
> > > > > > > > Subject: [symfony-users]mobilesite strategy
> >
> > > > > > > > I am wondering what others have done to create amobilesite
> for
> > > their
> > > > > > > > symfony projects (when more than just a handheld stylesheet
> is
> > > > > > > > required).
> >
> > > > > > > > What I am planning on doing is moving all my modules to a
> plugin
> > > and
> > > > > > > > creating another app called 'mobile'.  I can then override
> any
> > > modules
> > > > > > > > I need optimized for amobiledevice.
> >
> > > > > > > > What strategies have you come up with?  Is there an agreed
> upon
> > > best
> > > > > > > > practice?
> >
> > > > > > > > --
> > > > > > > > If you want to report a vulnerability issue on symfony,
> please
> > > send it to
> > > > > > > security at s

[symfony-users] Re: mobile site strategy

2010-09-08 Thread Kevin
I found also you can add .sf_format to a layout: layout.mobile.php to
automatically use that layout when sf_format is not html

(this was mentioned above my klemens_u)

On Sep 8, 1:48 pm, Gustavo Adrian  wrote:
> You could create a custom layout for mobile sites. Then, in the action:
>
> $this->setLayout( 'myMobileLayout' );
>
> You could create a custom "base" action that extends from sfActions, where
> you check for the "sf_format" value for the request in the "preExecute"
> method. Then, based on that value, set the layout you need. Finally, extend
> every action from this "base" action. For example:
>
> *class myBaseAction extends sfActions
> {
>     public function preExecute()
>     {
>         if ( $this->getRequest()->getParameter( 'sf_format' ) == 'mobile' )
>         {
>             $this->setLayout( 'myMobileLayout' );
>         }
>     }}
>
> *
> Then in your action
>
> class myOwnAction extends myBaseAction
> {
>     public function preExecute()
>     {
>         parent::preExecute();
>
>         // More stuff
>     }
>
> }
>
> Regards.
>
> On Wed, Sep 8, 2010 at 2:26 PM, Kevin  wrote:
> > How do you get it to work for layouts?
>
> > On Sep 7, 8:40 am, Kevin  wrote:
> > > Thanks, this stuff is great.  Never thought of that.
>
> > > On Sep 7, 3:49 am, klemens_u  wrote:
>
> > > > Hi,
>
> > > > it's basically really just a question of view.
>
> > > > Here's an old blog post about creating an iphone view:
> >http://www.symfony-project.org/blog/2008/06/09/how-to-create-an-optim...
> > > > Most of it is still valid and it works.
>
> > > > But there is one serious drawback: You have to provide amobile
> > > > template for each action.
> > > > That's why we created a tiny patch (for our "ullright" platform) to
> > > > provide a fallback to normal templates in case there is no
> > specialmobileone.
>
> > > > Here are the required parts:
>
> > > > Mobiledetection: This belongs into your project configuration:
> >http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/config/u...
>
> > > > Symfony patch enabling fallback to html templates: (Patches
> > > > sfView.class.php)
> >http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/patch/sf...
>
> > > > Finally provide amobiletemplate (or not):
> > > > Normaly you would put your template in apps/frontend/modules/myModule/
> > > > templates/myActionSuccess.php
> > > > Now you can provide amobiletemplate by creating the following file:
> > > > apps/frontend/modules/myModule/templates/myActionSuccess.mobile.php
>
> > > > This also works for layouts, partials and components. Example: apps/
> > > > frontend/modules/myModule/templates/_head.mobile.php
>
> > > > Have a nice day,
>
> > > > Klemens
>
> > > > On 6 Sep., 00:29, Alexandre Salomé  wrote:
>
> > > > > It's just a question of view.
>
> > > > > You should create dedicated routes with a sf_format "mini"
>
> > > > > 2010/9/2 Dennis 
>
> > > > > > Rather than go the plugin route, why not use either a '.mobi' tld,
> > or
> > > > > > '.movi' subdomain, and symlinnk any directories that you need
> > between
> > > > > > the two projects?
>
> > > > > > On Sep 1, 4:57 am, Benoit Montuelle 
> > > > > > wrote:
> > > > > > > I've done it by adding specific layout, templates and stylesheet
> > to the
> > > > > > existing app.
>
> > > > > > > You can trigger events in your project configuration upon user
> > agent to
> > > > > > change templates and specific configuration.
>
> > > > > > > The strategy to use another app depends wether yourmobileapp
> > should
> > > > > > have the same functionnality as the 'classic' web app does, but it
> > will be
> > > > > > easier if most code still shared.
>
> > > > > > > -Original Message-
> > > > > > > From: Kevin 
> > > > > > > Sent: mercredi 1 septembre 2010 12:51
> > > > > > > To: symfony users 
> > > > > > > Subject: [symfony-users]mobilesite strategy
>
> > > > > > > I am wondering what others have done to create amobilesite for
> > their
> > > > > > > symfony projects (when more than just a handheld stylesheet is
> > > > > > > required).
>
> > > > > > > What I am planning on doing is moving all my modules to a plugin
> > and
> > > > > > > creating another app called 'mobile'.  I can then override any
> > modules
> > > > > > > I need optimized for amobiledevice.
>
> > > > > > > What strategies have you come up with?  Is there an agreed upon
> > best
> > > > > > > practice?
>
> > > > > > > --
> > > > > > > If you want to report a vulnerability issue on symfony, please
> > send it to
> > > > > > security at symfony-project.com
>
> > > > > > > You received this message because you are subscribed to the
> > Google
> > > > > > > Groups "symfony users" group.
> > > > > > > To post to this group, send email to
> > symfony-users@googlegroups.com
> > > > > > > To unsubscribe from this group, send email to
> > > > > > > symfony-users+unsubscr...@googlegroups.com
> > 
>
> > > > > > > For more options, visit this group athttp://
> > > > > > groups.google.com/group/symf

Re: [symfony-users] Re: mobile site strategy

2010-09-08 Thread Gustavo Adrian
You could create a custom layout for mobile sites. Then, in the action:

$this->setLayout( 'myMobileLayout' );

You could create a custom "base" action that extends from sfActions, where
you check for the "sf_format" value for the request in the "preExecute"
method. Then, based on that value, set the layout you need. Finally, extend
every action from this "base" action. For example:

*class myBaseAction extends sfActions
{
public function preExecute()
{
if ( $this->getRequest()->getParameter( 'sf_format' ) == 'mobile' )
{
$this->setLayout( 'myMobileLayout' );
}
}
}
*
Then in your action

class myOwnAction extends myBaseAction
{
public function preExecute()
{
parent::preExecute();

// More stuff
}
}



Regards.



On Wed, Sep 8, 2010 at 2:26 PM, Kevin  wrote:

> How do you get it to work for layouts?
>
> On Sep 7, 8:40 am, Kevin  wrote:
> > Thanks, this stuff is great.  Never thought of that.
> >
> > On Sep 7, 3:49 am, klemens_u  wrote:
> >
> > > Hi,
> >
> > > it's basically really just a question of view.
> >
> > > Here's an old blog post about creating an iphone view:
> http://www.symfony-project.org/blog/2008/06/09/how-to-create-an-optim...
> > > Most of it is still valid and it works.
> >
> > > But there is one serious drawback: You have to provide amobile
> > > template for each action.
> > > That's why we created a tiny patch (for our "ullright" platform) to
> > > provide a fallback to normal templates in case there is no
> specialmobileone.
> >
> > > Here are the required parts:
> >
> > > Mobiledetection: This belongs into your project configuration:
> http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/config/u...
> >
> > > Symfony patch enabling fallback to html templates: (Patches
> > > sfView.class.php)
> http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/patch/sf...
> >
> > > Finally provide amobiletemplate (or not):
> > > Normaly you would put your template in apps/frontend/modules/myModule/
> > > templates/myActionSuccess.php
> > > Now you can provide amobiletemplate by creating the following file:
> > > apps/frontend/modules/myModule/templates/myActionSuccess.mobile.php
> >
> > > This also works for layouts, partials and components. Example: apps/
> > > frontend/modules/myModule/templates/_head.mobile.php
> >
> > > Have a nice day,
> >
> > > Klemens
> >
> > > On 6 Sep., 00:29, Alexandre Salomé  wrote:
> >
> > > > It's just a question of view.
> >
> > > > You should create dedicated routes with a sf_format "mini"
> >
> > > > 2010/9/2 Dennis 
> >
> > > > > Rather than go the plugin route, why not use either a '.mobi' tld,
> or
> > > > > '.movi' subdomain, and symlinnk any directories that you need
> between
> > > > > the two projects?
> >
> > > > > On Sep 1, 4:57 am, Benoit Montuelle 
> > > > > wrote:
> > > > > > I've done it by adding specific layout, templates and stylesheet
> to the
> > > > > existing app.
> >
> > > > > > You can trigger events in your project configuration upon user
> agent to
> > > > > change templates and specific configuration.
> >
> > > > > > The strategy to use another app depends wether yourmobileapp
> should
> > > > > have the same functionnality as the 'classic' web app does, but it
> will be
> > > > > easier if most code still shared.
> >
> > > > > > -Original Message-
> > > > > > From: Kevin 
> > > > > > Sent: mercredi 1 septembre 2010 12:51
> > > > > > To: symfony users 
> > > > > > Subject: [symfony-users]mobilesite strategy
> >
> > > > > > I am wondering what others have done to create amobilesite for
> their
> > > > > > symfony projects (when more than just a handheld stylesheet is
> > > > > > required).
> >
> > > > > > What I am planning on doing is moving all my modules to a plugin
> and
> > > > > > creating another app called 'mobile'.  I can then override any
> modules
> > > > > > I need optimized for amobiledevice.
> >
> > > > > > What strategies have you come up with?  Is there an agreed upon
> best
> > > > > > practice?
> >
> > > > > > --
> > > > > > If you want to report a vulnerability issue on symfony, please
> send it to
> > > > > security at symfony-project.com
> >
> > > > > > You received this message because you are subscribed to the
> Google
> > > > > > Groups "symfony users" group.
> > > > > > To post to this group, send email to
> symfony-users@googlegroups.com
> > > > > > To unsubscribe from this group, send email to
> > > > > > symfony-users+unsubscr...@googlegroups.com
> 
> >
> > > > > > For more options, visit this group athttp://
> > > > > groups.google.com/group/symfony-users?hl=en
> >
> > > > > --
> > > > > If you want to report a vulnerability issue on symfony, please send
> it to
> > > > > security at symfony-project.com
> >
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "symfony users" group.
> > > > > To post to this group, send email to
> symfony-users@googlegroups.com
> > > > > To un

[symfony-users] Re: mobile site strategy

2010-09-08 Thread Kevin
How do you get it to work for layouts?

On Sep 7, 8:40 am, Kevin  wrote:
> Thanks, this stuff is great.  Never thought of that.
>
> On Sep 7, 3:49 am, klemens_u  wrote:
>
> > Hi,
>
> > it's basically really just a question of view.
>
> > Here's an old blog post about creating an iphone 
> > view:http://www.symfony-project.org/blog/2008/06/09/how-to-create-an-optim...
> > Most of it is still valid and it works.
>
> > But there is one serious drawback: You have to provide amobile
> > template for each action.
> > That's why we created a tiny patch (for our "ullright" platform) to
> > provide a fallback to normal templates in case there is no specialmobileone.
>
> > Here are the required parts:
>
> > Mobiledetection: This belongs into your project 
> > configuration:http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/config/u...
>
> > Symfony patch enabling fallback to html templates: (Patches
> > sfView.class.php)http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/patch/sf...
>
> > Finally provide amobiletemplate (or not):
> > Normaly you would put your template in apps/frontend/modules/myModule/
> > templates/myActionSuccess.php
> > Now you can provide amobiletemplate by creating the following file:
> > apps/frontend/modules/myModule/templates/myActionSuccess.mobile.php
>
> > This also works for layouts, partials and components. Example: apps/
> > frontend/modules/myModule/templates/_head.mobile.php
>
> > Have a nice day,
>
> > Klemens
>
> > On 6 Sep., 00:29, Alexandre Salomé  wrote:
>
> > > It's just a question of view.
>
> > > You should create dedicated routes with a sf_format "mini"
>
> > > 2010/9/2 Dennis 
>
> > > > Rather than go the plugin route, why not use either a '.mobi' tld, or
> > > > '.movi' subdomain, and symlinnk any directories that you need between
> > > > the two projects?
>
> > > > On Sep 1, 4:57 am, Benoit Montuelle 
> > > > wrote:
> > > > > I've done it by adding specific layout, templates and stylesheet to 
> > > > > the
> > > > existing app.
>
> > > > > You can trigger events in your project configuration upon user agent 
> > > > > to
> > > > change templates and specific configuration.
>
> > > > > The strategy to use another app depends wether yourmobileapp should
> > > > have the same functionnality as the 'classic' web app does, but it will 
> > > > be
> > > > easier if most code still shared.
>
> > > > > -Original Message-
> > > > > From: Kevin 
> > > > > Sent: mercredi 1 septembre 2010 12:51
> > > > > To: symfony users 
> > > > > Subject: [symfony-users]mobilesite strategy
>
> > > > > I am wondering what others have done to create amobilesite for their
> > > > > symfony projects (when more than just a handheld stylesheet is
> > > > > required).
>
> > > > > What I am planning on doing is moving all my modules to a plugin and
> > > > > creating another app called 'mobile'.  I can then override any modules
> > > > > I need optimized for amobiledevice.
>
> > > > > What strategies have you come up with?  Is there an agreed upon best
> > > > > practice?
>
> > > > > --
> > > > > If you want to report a vulnerability issue on symfony, please send 
> > > > > it to
> > > > security at symfony-project.com
>
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "symfony users" group.
> > > > > To post to this group, send email to symfony-users@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > symfony-users+unsubscr...@googlegroups.com
> > > > > For more options, visit this group athttp://
> > > > groups.google.com/group/symfony-users?hl=en
>
> > > > --
> > > > If you want to report a vulnerability issue on symfony, please send it 
> > > > to
> > > > security at symfony-project.com
>
> > > > You received this message because you are subscribed to the Google
> > > > Groups "symfony users" group.
> > > > To post to this group, send email to symfony-users@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > symfony-users+unsubscr...@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/symfony-users?hl=en
>
> > > --
> > > Alexandre Saloméhttp://alexandre-salome.fr

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: mobile site strategy

2010-09-07 Thread Kevin
Thanks, this stuff is great.  Never thought of that.

On Sep 7, 3:49 am, klemens_u  wrote:
> Hi,
>
> it's basically really just a question of view.
>
> Here's an old blog post about creating an iphone 
> view:http://www.symfony-project.org/blog/2008/06/09/how-to-create-an-optim...
> Most of it is still valid and it works.
>
> But there is one serious drawback: You have to provide amobile
> template for each action.
> That's why we created a tiny patch (for our "ullright" platform) to
> provide a fallback to normal templates in case there is no specialmobileone.
>
> Here are the required parts:
>
> Mobiledetection: This belongs into your project 
> configuration:http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/config/u...
>
> Symfony patch enabling fallback to html templates: (Patches
> sfView.class.php)http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/patch/sf...
>
> Finally provide amobiletemplate (or not):
> Normaly you would put your template in apps/frontend/modules/myModule/
> templates/myActionSuccess.php
> Now you can provide amobiletemplate by creating the following file:
> apps/frontend/modules/myModule/templates/myActionSuccess.mobile.php
>
> This also works for layouts, partials and components. Example: apps/
> frontend/modules/myModule/templates/_head.mobile.php
>
> Have a nice day,
>
> Klemens
>
> On 6 Sep., 00:29, Alexandre Salomé  wrote:
>
> > It's just a question of view.
>
> > You should create dedicated routes with a sf_format "mini"
>
> > 2010/9/2 Dennis 
>
> > > Rather than go the plugin route, why not use either a '.mobi' tld, or
> > > '.movi' subdomain, and symlinnk any directories that you need between
> > > the two projects?
>
> > > On Sep 1, 4:57 am, Benoit Montuelle 
> > > wrote:
> > > > I've done it by adding specific layout, templates and stylesheet to the
> > > existing app.
>
> > > > You can trigger events in your project configuration upon user agent to
> > > change templates and specific configuration.
>
> > > > The strategy to use another app depends wether yourmobileapp should
> > > have the same functionnality as the 'classic' web app does, but it will be
> > > easier if most code still shared.
>
> > > > -Original Message-
> > > > From: Kevin 
> > > > Sent: mercredi 1 septembre 2010 12:51
> > > > To: symfony users 
> > > > Subject: [symfony-users]mobilesite strategy
>
> > > > I am wondering what others have done to create amobilesite for their
> > > > symfony projects (when more than just a handheld stylesheet is
> > > > required).
>
> > > > What I am planning on doing is moving all my modules to a plugin and
> > > > creating another app called 'mobile'.  I can then override any modules
> > > > I need optimized for amobiledevice.
>
> > > > What strategies have you come up with?  Is there an agreed upon best
> > > > practice?
>
> > > > --
> > > > If you want to report a vulnerability issue on symfony, please send it 
> > > > to
> > > security at symfony-project.com
>
> > > > You received this message because you are subscribed to the Google
> > > > Groups "symfony users" group.
> > > > To post to this group, send email to symfony-users@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > symfony-users+unsubscr...@googlegroups.com
> > > > For more options, visit this group athttp://
> > > groups.google.com/group/symfony-users?hl=en
>
> > > --
> > > If you want to report a vulnerability issue on symfony, please send it to
> > > security at symfony-project.com
>
> > > You received this message because you are subscribed to the Google
> > > Groups "symfony users" group.
> > > To post to this group, send email to symfony-users@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > symfony-users+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/symfony-users?hl=en
>
> > --
> > Alexandre Saloméhttp://alexandre-salome.fr

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: mobile site strategy

2010-09-07 Thread klemens_u
Hi,

it's basically really just a question of view.

Here's an old blog post about creating an iphone view:
http://www.symfony-project.org/blog/2008/06/09/how-to-create-an-optimized-version-of-your-website-for-the-iphone-in-symfony-1-1
Most of it is still valid and it works.

But there is one serious drawback: You have to provide a mobile
template for each action.
That's why we created a tiny patch (for our "ullright" platform) to
provide a fallback to normal templates in case there is no special
mobile one.

Here are the required parts:

Mobile detection: This belongs into your project configuration:
http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/config/ullCorePluginConfiguration.class.php

Symfony patch enabling fallback to html templates: (Patches
sfView.class.php)
http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/patch/sfView.patch.txt

Finally provide a mobile template (or not):
Normaly you would put your template in apps/frontend/modules/myModule/
templates/myActionSuccess.php
Now you can provide a mobile template by creating the following file:
apps/frontend/modules/myModule/templates/myActionSuccess.mobile.php

This also works for layouts, partials and components. Example: apps/
frontend/modules/myModule/templates/_head.mobile.php

Have a nice day,

Klemens





On 6 Sep., 00:29, Alexandre Salomé  wrote:
> It's just a question of view.
>
> You should create dedicated routes with a sf_format "mini"
>
> 2010/9/2 Dennis 
>
>
>
> > Rather than go the plugin route, why not use either a '.mobi' tld, or
> > '.movi' subdomain, and symlinnk any directories that you need between
> > the two projects?
>
> > On Sep 1, 4:57 am, Benoit Montuelle 
> > wrote:
> > > I've done it by adding specific layout, templates and stylesheet to the
> > existing app.
>
> > > You can trigger events in your project configuration upon user agent to
> > change templates and specific configuration.
>
> > > The strategy to use another app depends wether your mobile app should
> > have the same functionnality as the 'classic' web app does, but it will be
> > easier if most code still shared.
>
> > > -Original Message-
> > > From: Kevin 
> > > Sent: mercredi 1 septembre 2010 12:51
> > > To: symfony users 
> > > Subject: [symfony-users] mobile site strategy
>
> > > I am wondering what others have done to create a mobile site for their
> > > symfony projects (when more than just a handheld stylesheet is
> > > required).
>
> > > What I am planning on doing is moving all my modules to a plugin and
> > > creating another app called 'mobile'.  I can then override any modules
> > > I need optimized for a mobile device.
>
> > > What strategies have you come up with?  Is there an agreed upon best
> > > practice?
>
> > > --
> > > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > > You received this message because you are subscribed to the Google
> > > Groups "symfony users" group.
> > > To post to this group, send email to symfony-users@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > symfony-users+unsubscr...@googlegroups.com
> > > For more options, visit this group athttp://
> > groups.google.com/group/symfony-users?hl=en
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
> --
> Alexandre Saloméhttp://alexandre-salome.fr

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: mobile site strategy

2010-09-07 Thread klemens_u
Hi,

it's basically really just a question of view.

Here's an old blog post about creating an iphone view:
http://www.symfony-project.org/blog/2008/06/09/how-to-create-an-optimized-version-of-your-website-for-the-iphone-in-symfony-1-1
Most of it is still valid and it works.

But there is one serious drawback: You have to provide a mobile
template for each action.
That's why we created a tiny patch (for our "ullright" platform) to
provide a fallback to normal templates in case there is no special
mobile one.

Here are the required parts:

Mobile detection: This belongs into your project configuration:
http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/config/ullCorePluginConfiguration.class.php

Symfony patch enabling fallback to html templates: (Patches
sfView.class.php)
http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/patch/sfView.patch.txt

Finally provide a mobile template (or not):
Normaly you would put your template in apps/frontend/modules/myModule/
templates/myActionSuccess.php
Now you can provide a mobile template by creating the following file:
apps/frontend/modules/myModule/templates/myActionSuccess.mobile.php

This also works for layouts, partials and components. Example: apps/
frontend/modules/myModule/templates/_head.mobile.php

Have a nice day,

Klemens





On 6 Sep., 00:29, Alexandre Salomé  wrote:
> It's just a question of view.
>
> You should create dedicated routes with a sf_format "mini"
>
> 2010/9/2 Dennis 
>
>
>
> > Rather than go the plugin route, why not use either a '.mobi' tld, or
> > '.movi' subdomain, and symlinnk any directories that you need between
> > the two projects?
>
> > On Sep 1, 4:57 am, Benoit Montuelle 
> > wrote:
> > > I've done it by adding specific layout, templates and stylesheet to the
> > existing app.
>
> > > You can trigger events in your project configuration upon user agent to
> > change templates and specific configuration.
>
> > > The strategy to use another app depends wether your mobile app should
> > have the same functionnality as the 'classic' web app does, but it will be
> > easier if most code still shared.
>
> > > -Original Message-
> > > From: Kevin 
> > > Sent: mercredi 1 septembre 2010 12:51
> > > To: symfony users 
> > > Subject: [symfony-users] mobile site strategy
>
> > > I am wondering what others have done to create a mobile site for their
> > > symfony projects (when more than just a handheld stylesheet is
> > > required).
>
> > > What I am planning on doing is moving all my modules to a plugin and
> > > creating another app called 'mobile'.  I can then override any modules
> > > I need optimized for a mobile device.
>
> > > What strategies have you come up with?  Is there an agreed upon best
> > > practice?
>
> > > --
> > > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > > You received this message because you are subscribed to the Google
> > > Groups "symfony users" group.
> > > To post to this group, send email to symfony-users@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > symfony-users+unsubscr...@googlegroups.com
> > > For more options, visit this group athttp://
> > groups.google.com/group/symfony-users?hl=en
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
> --
> Alexandre Saloméhttp://alexandre-salome.fr

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: mobile site strategy

2010-09-05 Thread Alexandre Salomé
It's just a question of view.

You should create dedicated routes with a sf_format "mini"

2010/9/2 Dennis 

> Rather than go the plugin route, why not use either a '.mobi' tld, or
> '.movi' subdomain, and symlinnk any directories that you need between
> the two projects?
>
>
>
> On Sep 1, 4:57 am, Benoit Montuelle 
> wrote:
> > I've done it by adding specific layout, templates and stylesheet to the
> existing app.
> >
> > You can trigger events in your project configuration upon user agent to
> change templates and specific configuration.
> >
> > The strategy to use another app depends wether your mobile app should
> have the same functionnality as the 'classic' web app does, but it will be
> easier if most code still shared.
> >
> > -Original Message-
> > From: Kevin 
> > Sent: mercredi 1 septembre 2010 12:51
> > To: symfony users 
> > Subject: [symfony-users] mobile site strategy
> >
> > I am wondering what others have done to create a mobile site for their
> > symfony projects (when more than just a handheld stylesheet is
> > required).
> >
> > What I am planning on doing is moving all my modules to a plugin and
> > creating another app called 'mobile'.  I can then override any modules
> > I need optimized for a mobile device.
> >
> > What strategies have you come up with?  Is there an agreed upon best
> > practice?
> >
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
> >
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group athttp://
> groups.google.com/group/symfony-users?hl=en
> >
> >
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Alexandre Salomé
http://alexandre-salome.fr

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: mobile site strategy

2010-09-02 Thread Dennis
Rather than go the plugin route, why not use either a '.mobi' tld, or
'.movi' subdomain, and symlinnk any directories that you need between
the two projects?



On Sep 1, 4:57 am, Benoit Montuelle 
wrote:
> I've done it by adding specific layout, templates and stylesheet to the 
> existing app.
>
> You can trigger events in your project configuration upon user agent to 
> change templates and specific configuration.
>
> The strategy to use another app depends wether your mobile app should have 
> the same functionnality as the 'classic' web app does, but it will be easier 
> if most code still shared.
>
> -Original Message-
> From: Kevin 
> Sent: mercredi 1 septembre 2010 12:51
> To: symfony users 
> Subject: [symfony-users] mobile site strategy
>
> I am wondering what others have done to create a mobile site for their
> symfony projects (when more than just a handheld stylesheet is
> required).
>
> What I am planning on doing is moving all my modules to a plugin and
> creating another app called 'mobile'.  I can then override any modules
> I need optimized for a mobile device.
>
> What strategies have you come up with?  Is there an agreed upon best
> practice?
>
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/symfony-users?hl=en
>
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en