Re: Re : [symfony-users] Re: sfLightboxPlugin/1_0_9 released

2009-04-04 Thread dziobacz

Hello - am I invisible ? ;) LOL - Noboty listen to me :) I use symfony
1.2 - not 1.0. It still doesn't work. I reinstalled lightbox. And
lightbox doesn't work. I had to paste in \plugins\sfLightboxPlugin\lib
\helper LightboxHelper from old version Your lightbox and then it
works. Are you sure your current version of lightbox works on symfony
1.2 ? (I use also Doctrine - if it is important)
I found mistake - I deleted in \plugins\sfLightboxPlugin\lib\helper in
file LightboxHelper.php this line:
"if (in_array($version, array('1.0', '1.1')))" - then it works - IS IT
NORMAL 

And could you also answer for these questions:
1. How can I add css style to delete borders around image (in css
class it should be: border:0 to delete borders)
2. As I understand I can't display for example 3. images in one row in
Your lightbox ?? - it is pseudo code:
$i=1;
foreach ($pictures as $p)
{
//show picture
i++;

if($i==3) {echo ""; $i=1;}
}




On 5 Kwi, 04:28, Pablo Godel  wrote:
> Thanks a lot! I am sure I will use it in one of the sites I am
> currently working on.
>
> Pablo
>
> On Sat, Apr 4, 2009 at 7:11 PM, Loïc Vernet  wrote:
> > I have corrected the helper and README for symfony 1.0.x. in SVN.
>
> > Moreover the Prototype version bundled with symfony 1.0 (1.5.0.0) is not
> > supported by Lightbox 2.0.4 , so you will have to upgrade
> > your prototype version (you can also copy/paste the /web/sf folder of the
> > symfony 1.1 sandbox into your /web folder)
>
> > ++ COil
>
> > 
> > De : dziobacz 
> > À : symfony users 
> > Envoyé le : Samedi, 4 Avril 2009, 22h53mn 11s
> > Objet : [symfony-users] Re: sfLightboxPlugin/1_0_9 released
>
> > LOL xD
>
> > 1. Tutorial is much better
> > 2. Plugin doesn't work :) Some mistake is in \plugins\sfLightboxPlugin
> > \lib\helper\LightboxHelper.php - I am sure because with previous
> > version of LightboxHelper.php everything is ok.
> > 3. How can I add css style to delete borders around image (in css
> > class it should be: border:0 to delete borders)
> > 4. As I understand I can't display for example 3. images in one row in
> > Your lightbox:
> > $i=1;
> > foreach ($pictures as $p)
> > {
> > //show picture
> > i++;
>
> > if($i==3) {echo ""; $i=1;}
> > }
>
> > yes ? :)
>
> > On 4 Kwi, 21:51, Loïc Vernet  wrote:
> >> The plugin and README was updated for symfony 1.2.x and my new friend
> >> dziobacz  ^^
>
> >> -->http://www.symfony-project.org/plugins/sfLightboxPlugin/1_0_9?tab=plu...
>
> >> ++ COil
>
> >> 
> >> De : Pablo Godel 
> >> À : symfony-users@googlegroups.com
> >> Envoyé le : Samedi, 4 Avril 2009, 18h40mn 48s
> >> Objet : Re: Re : [symfony-users] lightbox in symfony - how can I use it ?
>
> >> are there plans to update this plugin for symfony 1.2.x ?
>
> >> Pablo
>
> >> On Sat, Apr 4, 2009 at 9:59 AM, Loïc Vernet  wrote:
> >> > Hi,
>
> >> > To summaruze the helpers make the foreach for you
>
> >> > The examples are quit explicit... Check out the exemple files witch are
> >> > in
> >> > the sfLightbox/ module
> >> > of the plugin.
>
> >> > ++ COil
>
> >> > 
> >> > De : dziobacz 
> >> > À : symfony users 
> >> > Envoyé le : Samedi, 4 Avril 2009, 14h41mn 15s
> >> > Objet : [symfony-users] lightbox in symfony - how can I use it ?
>
> >> > I found sfLightBoxPlugin:
> >> >http://www..symfony-project.org/plugins/sfLightboxPlugin
>
> >> > I download it from this website, unzipped and moved it to \plugins
> >> > directory, in \plugins\sfLightboxPlugin I have folders:
> >> > config, lib, modules, web. I don't need to move files from these
> >> > folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
> >> > \modules and \web ?
>
> >> > I have read 'Readme' from this site but I don't understand this. In
> >> > normal php and normal lightbox I could use lightbox to show images
> >> > like that:
>
> >> > 
>
> >> >      >> > rel="lightbox[images]">
> >> >     
> >> >     
>
> >> > 
>
> >> > But in symfony when I click MiniImage I go to site where I see white
> >> > page and NormalImage. I don't see slideshow.. Could somebody help me ?
> >> > I have never used lightbox in symfony and I am new in symfony ;)
>
>
--~--~-~--~~~---~--~~
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: how do you create an OR statement using Propel?

2009-04-04 Thread Ant Cunningham

$c = new Criteria();
$criterion = $c->getNewCriterion(GamePeer::ID, 
5)->addOr($c->getNewCriterion(GamePeer::ID, 3);
$c->add($criterion)

In most inistance i think you can skip the criterion part as simply 
calling Critera::addOr() will work like so:

$c = new Criteria();
$c->add(GamePeer::ID, 5);
$c->addOr(GamePeer::ID, 7);

Lawrence Krubner wrote:
> 
> If I want SQL that has an OR in it, like this:
> 
> select * from teams where game_id=5 OR game_id=7
> 
> How do I get that with Propel. This is not covered in Chapter 8 of the
> Symfony book.
> > 


--~--~-~--~~~---~--~~
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: how do you create an OR statement using Propel?

2009-04-04 Thread Sid Bachtiar

Try something like:

$c = new Criteria();

$c1 = $c->addNewCriterion(TeamsPeer::GAME_ID, 5);
$c2 = $c->addNewCriterion(TeamsPeer::GAME_ID, 7);
$c1->addOr($c2);

$c->add($c1);


On Sat, Apr 4, 2009 at 7:23 PM, Lawrence Krubner  wrote:
>
>
> If I want SQL that has an OR in it, like this:
>
> select * from teams where game_id=5 OR game_id=7
>
> How do I get that with Propel. This is not covered in Chapter 8 of the
> Symfony book.
> >
>



-- 
Blue Horn Ltd - System Development
http://bluehorn.co.nz

--~--~-~--~~~---~--~~
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] how do you create an OR statement using Propel?

2009-04-04 Thread Lawrence Krubner


If I want SQL that has an OR in it, like this:

select * from teams where game_id=5 OR game_id=7

How do I get that with Propel. This is not covered in Chapter 8 of the
Symfony book.
--~--~-~--~~~---~--~~
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: Re : [symfony-users] Re: sfLightboxPlugin/1_0_9 released

2009-04-04 Thread Pablo Godel

Thanks a lot! I am sure I will use it in one of the sites I am
currently working on.

Pablo


On Sat, Apr 4, 2009 at 7:11 PM, Loïc Vernet  wrote:
> I have corrected the helper and README for symfony 1.0.x. in SVN.
>
> Moreover the Prototype version bundled with symfony 1.0 (1.5.0.0) is not
> supported by Lightbox 2.0.4 , so you will have to upgrade
> your prototype version (you can also copy/paste the /web/sf folder of the
> symfony 1.1 sandbox into your /web folder)
>
> ++ COil
>
> 
> De : dziobacz 
> À : symfony users 
> Envoyé le : Samedi, 4 Avril 2009, 22h53mn 11s
> Objet : [symfony-users] Re: sfLightboxPlugin/1_0_9 released
>
>
> LOL xD
>
> 1. Tutorial is much better
> 2. Plugin doesn't work :) Some mistake is in \plugins\sfLightboxPlugin
> \lib\helper\LightboxHelper.php - I am sure because with previous
> version of LightboxHelper.php everything is ok.
> 3. How can I add css style to delete borders around image (in css
> class it should be: border:0 to delete borders)
> 4. As I understand I can't display for example 3. images in one row in
> Your lightbox:
> $i=1;
> foreach ($pictures as $p)
> {
> //show picture
> i++;
>
> if($i==3) {echo ""; $i=1;}
> }
>
> yes ? :)
>
> On 4 Kwi, 21:51, Loïc Vernet  wrote:
>> The plugin and README was updated for symfony 1.2.x and my new friend
>> dziobacz  ^^
>>
>>
>> -->http://www.symfony-project.org/plugins/sfLightboxPlugin/1_0_9?tab=plu...
>>
>> ++ COil
>>
>> 
>> De : Pablo Godel 
>> À : symfony-users@googlegroups.com
>> Envoyé le : Samedi, 4 Avril 2009, 18h40mn 48s
>> Objet : Re: Re : [symfony-users] lightbox in symfony - how can I use it ?
>>
>> are there plans to update this plugin for symfony 1.2.x ?
>>
>> Pablo
>>
>> On Sat, Apr 4, 2009 at 9:59 AM, Loïc Vernet  wrote:
>> > Hi,
>>
>> > To summaruze the helpers make the foreach for you
>>
>> > The examples are quit explicit... Check out the exemple files witch are
>> > in
>> > the sfLightbox/ module
>> > of the plugin.
>>
>> > ++ COil
>>
>> > 
>> > De : dziobacz 
>> > À : symfony users 
>> > Envoyé le : Samedi, 4 Avril 2009, 14h41mn 15s
>> > Objet : [symfony-users] lightbox in symfony - how can I use it ?
>>
>> > I found sfLightBoxPlugin:
>> >http://www..symfony-project.org/plugins/sfLightboxPlugin
>>
>> > I download it from this website, unzipped and moved it to \plugins
>> > directory, in \plugins\sfLightboxPlugin I have folders:
>> > config, lib, modules, web. I don't need to move files from these
>> > folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
>> > \modules and \web ?
>>
>> > I have read 'Readme' from this site but I don't understand this. In
>> > normal php and normal lightbox I could use lightbox to show images
>> > like that:
>>
>> > 
>>
>> >     > > rel="lightbox[images]">
>> >     
>> >     
>>
>> > 
>>
>> > But in symfony when I click MiniImage I go to site where I see white
>> > page and NormalImage. I don't see slideshow.. Could somebody help me ?
>> > I have never used lightbox in symfony and I am new in symfony ;)
>
>
>
> >
>

--~--~-~--~~~---~--~~
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: testing code in plugins

2009-04-04 Thread Bernhard Schussek

Hi Matthias,

> I'm already using the sfTaskExtraPlugin. The problem I actually had
> was thet the bootstrap scripts were not working out of the box for me
> as they don't have access to the symfony libs by default..

Yeah, that's one thing I forgot to mention. You need to export the
path variable SYMFONY when running the tests with the bootstrap files.
You can either do this temporarily for a test execution by calling

$ SYMFONY=/path/to/sf/libs php plugins/myPlugin/test/unit/myClassTest.php

or for a whole console session, by calling

$ export SYMFONY=/path/to/sf/libs

first. You could, of course, hardcode the sf library path in the
plugin tests, but then the plugin isn't portable anymore and probably
won't work in other environments/projects without modifications.

> Is there a trick to enable cookies for testing?

Hm, basically it's the same as for functional tests in normal
applications. You should make sure that the following lines are
written in the factories.yml of the tested application (probably the
fixture project in the plugin)

test:
  storage:
class: sfSessionTestStorage
param:
  session_path: %SF_TEST_CACHE_DIR%/sessions

But this is the default content ...  Maybe you could try adding the line

  session_name: symfony

to the "param" key, but I doubt this will change anything.

If you want to see some working unit tests in a plugin, you can look
at the tests of sfGridPlugin for reference.
http://trac.symfony-project.org/browser/plugins/sfGridPlugin/trunk/test/unit

Unfortunately there are no functional tests yet though.


Bernhard

--~--~-~--~~~---~--~~
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: sfLightboxPlugin/1_0_9 released

2009-04-04 Thread Loïc Vernet
I have corrected the helper and README for symfony 1.0.x. in SVN.

Moreover the Prototype version bundled with symfony 1.0 (1.5.0.0) is not 
supported by Lightbox 2.0.4 , so you will have to upgrade
your prototype version (you can also copy/paste the /web/sf folder of the 
symfony 1.1 sandbox into your /web folder)

++ COil





De : dziobacz 
À : symfony users 
Envoyé le : Samedi, 4 Avril 2009, 22h53mn 11s
Objet : [symfony-users] Re: sfLightboxPlugin/1_0_9 released


LOL xD

1. Tutorial is much better
2. Plugin doesn't work :) Some mistake is in \plugins\sfLightboxPlugin
\lib\helper\LightboxHelper.php - I am sure because with previous
version of LightboxHelper.php everything is ok.
3. How can I add css style to delete borders around image (in css
class it should be: border:0 to delete borders)
4. As I understand I can't display for example 3. images in one row in
Your lightbox:
$i=1;
foreach ($pictures as $p)
{
//show picture
i++;

if($i==3) {echo ""; $i=1;}
}

yes ? :)

On 4 Kwi, 21:51, Loïc Vernet  wrote:
> The plugin and README was updated for symfony 1.2.x and my new friend 
> dziobacz  ^^
>
> -->http://www.symfony-project..org/plugins/sfLightboxPlugin/1_0_9?tab=plu...
>
> ++ COil
>
> 
> De : Pablo Godel 
> À : symfony-users@googlegroups.com
> Envoyé le : Samedi, 4 Avril 2009, 18h40mn 48s
> Objet : Re: Re : [symfony-users] lightbox in symfony - how can I use it ?
>
> are there plans to update this plugin for symfony 1.2.x ?
>
> Pablo
>
> On Sat, Apr 4, 2009 at 9:59 AM, Loïc Vernet  wrote:
> > Hi,
>
> > To summaruze the helpers make the foreach for you...
>
> > The examples are quit explicit... Check out the exemple files witch are in
> > the sfLightbox/ module
> > of the plugin.
>
> > ++ COil
>
> > 
> > De : dziobacz 
> > À : symfony users 
> > Envoyé le : Samedi, 4 Avril 2009, 14h41mn 15s
> > Objet : [symfony-users] lightbox in symfony - how can I use it ?
>
> > I found sfLightBoxPlugin:
> >http://www..symfony-project.org/plugins/sfLightboxPlugin
>
> > I download it from this website, unzipped and moved it to \plugins
> > directory, in \plugins\sfLightboxPlugin I have folders:
> > config, lib, modules, web. I don't need to move files from these
> > folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
> > \modules and \web ?
>
> > I have read 'Readme' from this site but I don't understand this. In
> > normal php and normal lightbox I could use lightbox to show images
> > like that:
>
> > 
>
> >  > rel="lightbox[images]">
> > 
> > 
>
> > 
>
> > But in symfony when I click MiniImage I go to site where I see white
> > page and NormalImage. I don't see slideshow.. Could somebody help me ?
> > I have never used lightbox in symfony and I am new in symfony ;)


  
--~--~-~--~~~---~--~~
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] sym1.2 Admin Generator Issue with "Form Filter" not found

2009-04-04 Thread Jeof

This is the first time I've played with the admin generator, and I
just upgraded to symfony 1.2 to use the new version.

I followed the instructions in the manual:


1. created a new application

 symfony generate:app backend



2. generated an admin for my "User" model

 symfony propel:generate-admin backend User --module=user



3. cleared the cache a couple times


But when I go to the page:

http://domain/backend_dev.php/user

I get this error:

Fatal error: Class 'UserFormFilter' not found in /path/to/cache/
backend/dev/modules/autoUser/lib/BaseUserGene
ratorConfiguration.class.php on line 330


... this happens for a couple of different Models. I don't even know
where to start debugging this. It seems like its looking for a
specific Form Filter that wasn't created correctly? I've not used the
Forms framework before, either, so I'm kind of at a loss. can anyone
point me in the right direction?

--~--~-~--~~~---~--~~
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: Re : [symfony-users] lightbox in symfony - how can I use it ?

2009-04-04 Thread Eno

On Sat, 4 Apr 2009, dziobacz wrote:

> unzip and again unzip - you should use .zip format, not .tgz format -
> I had to unzipped it two times in windows ;)

Or install Cygwin so you have nice Unix tools like tar.




--~--~-~--~~~---~--~~
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: sfLightboxPlugin/1_0_9 released

2009-04-04 Thread dziobacz

LOL xD

1. Tutorial is much better
2. Plugin doesn't work :) Some mistake is in \plugins\sfLightboxPlugin
\lib\helper\LightboxHelper.php - I am sure because with previous
version of LightboxHelper.php everything is ok.
3. How can I add css style to delete borders around image (in css
class it should be: border:0 to delete borders)
4. As I understand I can't display for example 3. images in one row in
Your lightbox:
$i=1;
foreach ($pictures as $p)
{
//show picture
i++;

if($i==3) {echo ""; $i=1;}
}

yes ? :)

On 4 Kwi, 21:51, Loïc Vernet  wrote:
> The plugin and README was updated for symfony 1.2.x and my new friend 
> dziobacz  ^^
>
> -->http://www.symfony-project.org/plugins/sfLightboxPlugin/1_0_9?tab=plu...
>
> ++ COil
>
> 
> De : Pablo Godel 
> À : symfony-users@googlegroups.com
> Envoyé le : Samedi, 4 Avril 2009, 18h40mn 48s
> Objet : Re: Re : [symfony-users] lightbox in symfony - how can I use it ?
>
> are there plans to update this plugin for symfony 1.2.x ?
>
> Pablo
>
> On Sat, Apr 4, 2009 at 9:59 AM, Loïc Vernet  wrote:
> > Hi,
>
> > To summaruze the helpers make the foreach for you...
>
> > The examples are quit explicit... Check out the exemple files witch are in
> > the sfLightbox/ module
> > of the plugin.
>
> > ++ COil
>
> > 
> > De : dziobacz 
> > À : symfony users 
> > Envoyé le : Samedi, 4 Avril 2009, 14h41mn 15s
> > Objet : [symfony-users] lightbox in symfony - how can I use it ?
>
> > I found sfLightBoxPlugin:
> >http://www..symfony-project.org/plugins/sfLightboxPlugin
>
> > I download it from this website, unzipped and moved it to \plugins
> > directory, in \plugins\sfLightboxPlugin I have folders:
> > config, lib, modules, web. I don't need to move files from these
> > folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
> > \modules and \web ?
>
> > I have read 'Readme' from this site but I don't understand this. In
> > normal php and normal lightbox I could use lightbox to show images
> > like that:
>
> > 
>
> >      > rel="lightbox[images]">
> >     
> >     
>
> > 
>
> > But in symfony when I click MiniImage I go to site where I see white
> > page and NormalImage. I don't see slideshow.. Could somebody help me ?
> > I have never used lightbox in symfony and I am new in symfony ;)
>
>
--~--~-~--~~~---~--~~
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] sfDB4toPropelPlugin/1_0_3 released

2009-04-04 Thread Loïc Vernet
Hi symfonians,

I have released the 1.0.3 version of the sfDB4toPropelPlugin plugin some days 
ago,

--> http://www.symfony-project.org/plugins/sfDB4toPropelPlugin/1_0_3

It introduce a new interesting functionality that allows you "to merge plugin 
schemas". What does this mean ?

You have your DB4 schema and you can create "virtual tables" to make FK to 
plugins tables, for examples, in your schema
you want to make a FK to the PK to the sf_guard_user table. You just have to 
define this table as "external", to do this
just add the "external_tables" new option to the propel:db4-tp-propel task:


symfony propel:db4-to-propel frontend 
  --env=cli 
  --debug=1 
  --file_dir=/doc/database 
  --file=db4.xml 
  --output_dir=/config 
  --output=schema --package=lib.model..forums 
  --external_tables=sf_guard_user
++ COil 


PS: I will publish a little totorial on my blog soon. 



  
--~--~-~--~~~---~--~~
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] sfLightboxPlugin/1_0_9 released

2009-04-04 Thread Loïc Vernet
The plugin and README was updated for symfony 1.2.x and my new friend dziobacz  
^^

-->http://www.symfony-project.org/plugins/sfLightboxPlugin/1_0_9?tab=plugin_readme

++ COil






De : Pablo Godel 
À : symfony-users@googlegroups.com
Envoyé le : Samedi, 4 Avril 2009, 18h40mn 48s
Objet : Re: Re : [symfony-users] lightbox in symfony - how can I use it ?


are there plans to update this plugin for symfony 1.2.x ?

Pablo


On Sat, Apr 4, 2009 at 9:59 AM, Loïc Vernet  wrote:
> Hi,
>
> To summaruze the helpers make the foreach for you...
>
> The examples are quit explicit... Check out the exemple files witch are in
> the sfLightbox/ module
> of the plugin.
>
> ++ COil
>
> 
> De : dziobacz 
> À : symfony users 
> Envoyé le : Samedi, 4 Avril 2009, 14h41mn 15s
> Objet : [symfony-users] lightbox in symfony - how can I use it ?
>
>
> I found sfLightBoxPlugin:
> http://www..symfony-project.org/plugins/sfLightboxPlugin
>
> I download it from this website, unzipped and moved it to \plugins
> directory, in \plugins\sfLightboxPlugin I have folders:
> config, lib, modules, web. I don't need to move files from these
> folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
> \modules and \web ?
>
>
> I have read 'Readme' from this site but I don't understand this. In
> normal php and normal lightbox I could use lightbox to show images
> like that:
>
> 
>
>  rel="lightbox[images]">
> 
> 
>
> 
>
> But in symfony when I click MiniImage I go to site where I see white
> page and NormalImage. I don't see slideshow.. Could somebody help me ?
> I have never used lightbox in symfony and I am new in symfony ;)



  
--~--~-~--~~~---~--~~
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: testing code in plugins

2009-04-04 Thread Matthias N.

On 4 Apr., 15:13, Bernhard Schussek  wrote:
> Hi Matthias,
>
> If you want to execute particular tests, you can just execute them
> from the console using "php". E.g.
> $ php plugins/myPlugin/test/unit/myClassTest.php

Hi Bernhard,

thanks for your detailed information! Let's hope the patch will make
it into symfony soon.
I'm already using the sfTaskExtraPlugin. The problem I actually had
was thet the bootstrap scripts were not working out of the box for me
as they don't have access to the symfony libs by default.. I changed
them for my needs and now I can write tests.

But I'm not that successful so far.. Testing seems to be pretty hard -
documentation is not that good here.
For example, I need to test several "myUser" methods and currently I
wonder why there is no session cookie when using this:

$browser = new sfTestFunctional(new sfBrowser());
$browser->get('/some/url')->with('request')->hasCookie('symfony');

no session cookie here

Is there a trick to enable cookies for testing?

regards,
Matthias

--~--~-~--~~~---~--~~
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: [sfForms] set a field required (or not) ONLY if a checkbox is checked

2009-04-04 Thread Gandalf

This is what I did in one of my forms:

inside the form configure method:

$post_validators [] = new gStep3Validator (
 sfConfig::get
("app_procurement_wizard_select_prefix").$provision -> id,
 sfConfig::get
("app_procurement_wizard_explanation_prefix").$provision -> id,
 array(),
 array ('invalid' => 'Explanation is
required') );

The explanation field is required only for certain values of the
wizard select field.

and this is my validator, Ii an be easily extended to specify the
values of the left fiedl for wich the reigth field is requeried.



[code]

addOption('left_field', $leftField);
$this->addOption('right_field', $rightField);

$this->addOption('throw_global_error', false);

parent::__construct(null, $options, $messages);
  }

  /**
   * @see sfValidatorBase
   */
  protected function doClean($values)
  {
if (is_null($values))
{
  $values = array();
}

if (!is_array($values))
{
  throw new InvalidArgumentException('You must pass an array
parameter to the clean() method');
}

$leftValue  = isset($values[$this->getOption('left_field')]) ?
$values[$this->getOption('left_field')] : null;
$rightValue = isset($values[$this->getOption('right_field')]) ?
$values[$this->getOption('right_field')] : null;
// the actual verification
$valid = $leftValue == "Yes" || strlen ($rightValue) > 0;


if (!$valid)
{
  $error = new sfValidatorError($this, 'invalid', array(
'left_field'  => $leftValue,
'right_field' => $rightValue,
  ));
  if ($this->getOption('throw_global_error'))
  {
throw $error;
  }
  throw new sfValidatorErrorSchema($this,
array($this->getOption('right_field') => $error));
}

return $values;
  }

  /**
   * @see sfValidatorBase
   */
  public function asString($indent = 0)
  {
$options = $this->getOptionsWithoutDefaults();
$messages = $this->getMessagesWithoutDefaults();
unset($options['left_field'], $options['right_field']);

$arguments = '';
if ($options || $messages)
{
  $arguments = sprintf('(%s%s)',
$options ? sfYamlInline::dump($options) : ($messages ? '{}' : ''),
$messages ? ', '.sfYamlInline::dump($messages) : ''
  );
}

return sprintf('%s%s %s%s %s',
  str_repeat(' ', $indent),
  $this->getOption('left_field'),
  $arguments,
  $this->getOption('right_field')
);
  }
}



On 4/4/09, Sylvain Deloux  wrote:
>
> Hi,
>
> I'm using sfForms (with symfony 1.2) to create a form.
>
> I'd like to set a field required ONLY if a checkbox is checked,
> otherwise it doesn't not to be required.
>
> I'm looking on the forms documentation, but without success. Anybody
> could help me ?
>
> Thanks,
> Sylvain
> >
>

--~--~-~--~~~---~--~~
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: Re : Re : [symfony-users] lightbox in symfony - how can I use it ?

2009-04-04 Thread dziobacz

Ok - it works but it wasn't easy, tutorial is hard to understand - it
is mine easier tutorial:
download lightbox from: http://www.symfony-project.org/plugins/sfLightboxPlugin
unzip and again unzip - you should use .zip format, not .tgz format -
I had to unzipped it two times in windows ;)
Create in \plugins folder 'sfLightboxPlugin' and move there: LICENSE
file, README file, config folder, lib folder (from unzipped folder),
create in \web folder 'sfLightboxPlugin' and move there: css folder,
image folder and js folder (from unzipped folder from 'web').

Now you can write in template:
  <- this is very important
 '/uploads/'.$z->getMiniImage(),
'image' => '/uploads/'.$z->getNormalImage(),
'options'   => array('title' => 'some text')
);

endforeach;

$link_options = array(
'title' => 'Lightbox2',
'slidename' => 'lightbox',
);
echo light_slideshow($images, $link_options);
?>

I don't know why '$link_options' is obligatory and I prefer
normal code to show images like in normal php and lightbox - I have
hope you change it ;]

But the worst thing is that I SEE BORDERS AROUND PICTURES !! In normal
php and lightbox I could use css style and write: border:0; to disable
it but in this lightbox I don't know how can I add css to disable
borders. Could somebody help me ?



On 4 Kwi, 18:58, Loïc Vernet  wrote:
> Your wishes will become true in a few minutes...  ^^
>
> 
> De : Pablo Godel 
> À : symfony-users@googlegroups.com
> Envoyé le : Samedi, 4 Avril 2009, 18h40mn 48s
> Objet : Re: Re : [symfony-users] lightbox in symfony - how can I use it ?
>
> are there plans to update this plugin for symfony 1.2.x ?
>
> Pablo
>
> On Sat, Apr 4, 2009 at 9:59 AM, Loïc Vernet  wrote:
> > Hi,
>
> > To summaruze the helpers make the foreach for you...
>
> > The examples are quit explicit... Check out the exemple files witch are in
> > the sfLightbox/ module
> > of the plugin.
>
> > ++ COil
>
> > 
> > De : dziobacz 
> > À : symfony users 
> > Envoyé le : Samedi, 4 Avril 2009, 14h41mn 15s
> > Objet : [symfony-users] lightbox in symfony - how can I use it ?
>
> > I found sfLightBoxPlugin:
> >http://www..symfony-project.org/plugins/sfLightboxPlugin
>
> > I download it from this website, unzipped and moved it to \plugins
> > directory, in \plugins\sfLightboxPlugin I have folders:
> > config, lib, modules, web. I don't need to move files from these
> > folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
> > \modules and \web ?
>
> > I have read 'Readme' from this site but I don't understand this. In
> > normal php and normal lightbox I could use lightbox to show images
> > like that:
>
> > 
>
> >      > rel="lightbox[images]">
> >     
> >     
>
> > 
>
> > But in symfony when I click MiniImage I go to site where I see white
> > page and NormalImage. I don't see slideshow. Could somebody help me ?
> > I have never used lightbox in symfony and I am new in symfony ;)
>
>
--~--~-~--~~~---~--~~
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: Re : Re : [symfony-users] lightbox in symfony - how can I use it ?

2009-04-04 Thread dziobacz

Ok - it works but it wasn't easy, tutorial is hard to understand - it
is mine easier tutorial:
download lightbox from: http://www.symfony-project.org/plugins/sfLightboxPlugin
unzip and again unzip - (to AUTHOR this plugin: you should use .zip
format, not .tgz format -
I had to unzipped it two times in windows) ;)
Create in \plugins folder 'sfLightboxPlugin' and move there: LICENSE
file, README file, config folder, lib folder (from unzipped folder),
create in \web folder 'sfLightboxPlugin' and move there: css folder,
image folder and js folder (from unzipped folder from 'web').

Now you can write in template:
  <- this is very important
 '/uploads/'.$z->getMiniImage(),
'image' => '/uploads/'.$z->getNormalImage(),
'options'   => array('title' => 'some text')
);

endforeach;

$link_options = array(
'title' => 'Lightbox2',
'slidename' => 'lightbox',
);
echo light_slideshow($images, $link_options);
?>

I don't know why '$link_options' is obligatory and I prefer
normal code to show images like in normal php and lightbox - I have
hope you change it ;]

But the worst thing is that I SEE BORDERS AROUND PICTURES !! In normal
php and lightbox I could use css style and write: border:0; to disable
it but in this lightbox I don't know how can I add css to disable
borders. Could somebody help me ?

On 4 Kwi, 18:58, Loïc Vernet  wrote:
> Your wishes will become true in a few minutes...  ^^
>
> 
> De : Pablo Godel 
> À : symfony-users@googlegroups.com
> Envoyé le : Samedi, 4 Avril 2009, 18h40mn 48s
> Objet : Re: Re : [symfony-users] lightbox in symfony - how can I use it ?
>
> are there plans to update this plugin for symfony 1.2.x ?
>
> Pablo
>
> On Sat, Apr 4, 2009 at 9:59 AM, Loïc Vernet  wrote:
> > Hi,
>
> > To summaruze the helpers make the foreach for you...
>
> > The examples are quit explicit... Check out the exemple files witch are in
> > the sfLightbox/ module
> > of the plugin.
>
> > ++ COil
>
> > 
> > De : dziobacz 
> > À : symfony users 
> > Envoyé le : Samedi, 4 Avril 2009, 14h41mn 15s
> > Objet : [symfony-users] lightbox in symfony - how can I use it ?
>
> > I found sfLightBoxPlugin:
> >http://www..symfony-project.org/plugins/sfLightboxPlugin
>
> > I download it from this website, unzipped and moved it to \plugins
> > directory, in \plugins\sfLightboxPlugin I have folders:
> > config, lib, modules, web. I don't need to move files from these
> > folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
> > \modules and \web ?
>
> > I have read 'Readme' from this site but I don't understand this. In
> > normal php and normal lightbox I could use lightbox to show images
> > like that:
>
> > 
>
> >      > rel="lightbox[images]">
> >     
> >     
>
> > 
>
> > But in symfony when I click MiniImage I go to site where I see white
> > page and NormalImage. I don't see slideshow. Could somebody help me ?
> > I have never used lightbox in symfony and I am new in symfony ;)
>
>
--~--~-~--~~~---~--~~
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: Re : [symfony-users] lightbox in symfony - how can I use it ?

2009-04-04 Thread dziobacz

Ok - it works but it wasn't easy, tutorial is hard to understand - it
is mine easier tutorial:
download lightbox from: http://www.symfony-project.org/plugins/sfLightboxPlugin
unzip and again unzip - you should use .zip format, not .tgz format -
I had to unzipped it two times in windows ;)
Create in \plugins folder 'sfLightboxPlugin' and move there: LICENSE
file, README file, config folder, lib folder (from unzipped folder),
create in \web folder 'sfLightboxPlugin' and move there: css folder,
image folder and js folder (from unzipped folder from 'web').

Now you can write in template:
  <- this is very important
 '/uploads/'.$z->getMiniImage(),
'image' => '/uploads/'.$z->getNormalImage(),
'options'   => array('title' => 'some text')
);

endforeach;


$link_options = array(
'title' => 'Lightbox2',
'slidename' => 'lightbox',
);
echo light_slideshow($images, $link_options);
?>


I don't know why '$link_options' is obligatory and I prefer
normal code to show images like in normal php and lightbox - I have
hope you change it ;]


But the worst thing is that I SEE BORDERS AROUND PICTURES !! In normal
php and lightbox I could use css style and write: border:0; to disable
it but in this lightbox I don't know how can I add css to disable
borders. Could somebody help me ?



On 4 Kwi, 18:40, Pablo Godel  wrote:
> are there plans to update this plugin for symfony 1.2.x ?
>
> Pablo
>
> On Sat, Apr 4, 2009 at 9:59 AM, Loïc Vernet  wrote:
> > Hi,
>
> > To summaruze the helpers make the foreach for you...
>
> > The examples are quit explicit... Check out the exemple files witch are in
> > the sfLightbox/ module
> > of the plugin.
>
> > ++ COil
>
> > 
> > De : dziobacz 
> > À : symfony users 
> > Envoyé le : Samedi, 4 Avril 2009, 14h41mn 15s
> > Objet : [symfony-users] lightbox in symfony - how can I use it ?
>
> > I found sfLightBoxPlugin:
> >http://www..symfony-project.org/plugins/sfLightboxPlugin
>
> > I download it from this website, unzipped and moved it to \plugins
> > directory, in \plugins\sfLightboxPlugin I have folders:
> > config, lib, modules, web. I don't need to move files from these
> > folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
> > \modules and \web ?
>
> > I have read 'Readme' from this site but I don't understand this. In
> > normal php and normal lightbox I could use lightbox to show images
> > like that:
>
> > 
>
> >      > rel="lightbox[images]">
> >     
> >     
>
> > 
>
> > But in symfony when I click MiniImage I go to site where I see white
> > page and NormalImage. I don't see slideshow. Could somebody help me ?
> > I have never used lightbox in symfony and I am new in symfony ;)
>
>
--~--~-~--~~~---~--~~
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 : Re : [symfony-users] lightbox in symfony - how can I use it ?

2009-04-04 Thread Loïc Vernet
Your wishes will become true in a few minutes...  ^^





De : Pablo Godel 
À : symfony-users@googlegroups.com
Envoyé le : Samedi, 4 Avril 2009, 18h40mn 48s
Objet : Re: Re : [symfony-users] lightbox in symfony - how can I use it ?


are there plans to update this plugin for symfony 1.2.x ?

Pablo


On Sat, Apr 4, 2009 at 9:59 AM, Loïc Vernet  wrote:
> Hi,
>
> To summaruze the helpers make the foreach for you...
>
> The examples are quit explicit... Check out the exemple files witch are in
> the sfLightbox/ module
> of the plugin.
>
> ++ COil
>
> 
> De : dziobacz 
> À : symfony users 
> Envoyé le : Samedi, 4 Avril 2009, 14h41mn 15s
> Objet : [symfony-users] lightbox in symfony - how can I use it ?
>
>
> I found sfLightBoxPlugin:
> http://www..symfony-project.org/plugins/sfLightboxPlugin
>
> I download it from this website, unzipped and moved it to \plugins
> directory, in \plugins\sfLightboxPlugin I have folders:
> config, lib, modules, web. I don't need to move files from these
> folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
> \modules and \web ?
>
>
> I have read 'Readme' from this site but I don't understand this. In
> normal php and normal lightbox I could use lightbox to show images
> like that:
>
> 
>
>  rel="lightbox[images]">
> 
> 
>
> 
>
> But in symfony when I click MiniImage I go to site where I see white
> page and NormalImage. I don't see slideshow. Could somebody help me ?
> I have never used lightbox in symfony and I am new in symfony ;)
>
> >
>



  
--~--~-~--~~~---~--~~
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: Add Foreign Key to mysql table

2009-04-04 Thread DEEPAK BHATIA
Hi,

The problem is solved when I run below command

ALTER TABLE projecttype_table TYPE=InnoDB;

Thanks

Deepak Bhatia

On 4/2/09, whalexis  wrote:
>
>
> Hi you should have a look at this
> http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html
> Everything you need is there
>
> On Apr 2, 4:10 am, DeepakBhatia  wrote:
> > I have two tables as given below. I need to add a column in
> > project_table which is INT and refers to the projecttype_table(id)
> > field.
> >
> > project_table
> > {
> > Name Varchar(100)
> >
> > }
> >
> > projecttype_table
> > {
> > id INT AUTO INCREMENT NOT NULL,
> > projecttype_name Varchar(50)
> >
> > }
> >
> > Approach #1
> > ===
> >
> > mysql> alter table project_table add foreign key(project_type)
> > references projecttype_table(id);
> > ERROR 1005 (HY000): Can't create table 'rtdb2.#sql-358a_96c' (errno:
> > 150)
> >
> > Approach #2
> > ===
> > mysql> ALTER TABLE project_table TYPE=InnoDB;
> > Query OK, 7 rows affected, 1 warning (0.02 sec)
> > Records: 7 Duplicates: 0 Warnings: 0
> >
> > mysql> alter table project_table add Foreign key (project_type)
> > REFERENCES projecttype_table(id);
> > ERROR 1005 (HY000): Can't create table 'rtdb2.#sql-358a_96c' (errno:
> > 150)
> >
>

--~--~-~--~~~---~--~~
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: Re : [symfony-users] lightbox in symfony - how can I use it ?

2009-04-04 Thread Pablo Godel

are there plans to update this plugin for symfony 1.2.x ?

Pablo


On Sat, Apr 4, 2009 at 9:59 AM, Loïc Vernet  wrote:
> Hi,
>
> To summaruze the helpers make the foreach for you...
>
> The examples are quit explicit... Check out the exemple files witch are in
> the sfLightbox/ module
> of the plugin.
>
> ++ COil
>
> 
> De : dziobacz 
> À : symfony users 
> Envoyé le : Samedi, 4 Avril 2009, 14h41mn 15s
> Objet : [symfony-users] lightbox in symfony - how can I use it ?
>
>
> I found sfLightBoxPlugin:
> http://www..symfony-project.org/plugins/sfLightboxPlugin
>
> I download it from this website, unzipped and moved it to \plugins
> directory, in \plugins\sfLightboxPlugin I have folders:
> config, lib, modules, web. I don't need to move files from these
> folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
> \modules and \web ?
>
>
> I have read 'Readme' from this site but I don't understand this. In
> normal php and normal lightbox I could use lightbox to show images
> like that:
>
> 
>
>      rel="lightbox[images]">
>     
>     
>
> 
>
> But in symfony when I click MiniImage I go to site where I see white
> page and NormalImage. I don't see slideshow. Could somebody help me ?
> I have never used lightbox in symfony and I am new in symfony ;)
>
> >
>

--~--~-~--~~~---~--~~
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: Re : Re : [symfony-users] lightbox in symfony - how can I use it ?

2009-04-04 Thread dziobacz

You have wrote:
"If you don't want to use the following web resources paths :

*

  /sfLightboxPlugin/js/
*

  /sfLightboxPlugin/css/
*

  /sfLightboxPlugin/javascript/"

So it means that I shouldn't move js and css to \web directory but
leave them in sfLightboxPlugin directory, but in sfLightboxPlugin
directory I don't see folder js, css ans javascript - I don't
understand your instruction.


On 4 Kwi, 17:40, dziobacz  wrote:
> I have read but the instruction isn't simply - how can I download it
> not manualy ? What should I write in console ? You haven't wrote it in
> your tutorial.
>
> On 4 Kwi, 17:25, Loïc Vernet  wrote:
>
> > 
>
> > Well if you have manually downloaded the plugin, yes you must copy the 
> > ressources in /web or use the plugin:publish-assets symfony task
>
> > You should read the plgind chatpter of the doc and Jobeet.
>
> > ++
>
> > 
> > De : dziobacz 
> > À : symfony users 
> > Envoyé le : Samedi, 4 Avril 2009, 16h11mn 41s
> > Objet : Re: Re : [symfony-users] lightbox in symfony - how can I use it ?
>
> > But all lightbox files should be in \plugins\sfLightboxPlugin or I
> > should for example move lightbox images to \web\images, lightbox css
> > to \web\css etc ??
>
> > On 4 Kwi, 15:59, Loïc Vernet  wrote:
>
> > > Hi,
>
> > > To summaruze the helpers make the foreach for you...
>
> > > The examples are quit explicit... Check out the exemple files witch are 
> > > in the sfLightbox/ module
> > > of the plugin.
>
> > > ++ COil
>
> > > 
> > > De : dziobacz 
> > > À : symfony users 
> > > Envoyé le : Samedi, 4 Avril 2009, 14h41mn 15s
> > > Objet : [symfony-users] lightbox in symfony - how can I use it ?
>
> > > I found 
> > > sfLightBoxPlugin:http://www.symfony-project.org/plugins/sfLightboxPlugin
>
> > > I download it from this website, unzipped and moved it to \plugins
> > > directory, in \plugins\sfLightboxPlugin I have folders:
> > > config, lib, modules, web. I don't need to move files from these
> > > folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
> > > \modules and \web ?
>
> > > I have read 'Readme' from this site but I don't understand this. In
> > > normal php and normal lightbox I could use lightbox to show images
> > > like that:
>
> > > 
>
> > >      > > rel="lightbox[images]">
> > >     
> > >     
>
> > > 
>
> > > But in symfony when I click MiniImage I go to site where I see white
> > > page and NormalImage. I don't see slideshow. Could somebody help me ?
> > > I have never used lightbox in symfony and I am new in symfony ;)
>
>
--~--~-~--~~~---~--~~
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: Re : Re : [symfony-users] lightbox in symfony - how can I use it ?

2009-04-04 Thread dziobacz

I have read but the instruction isn't simply - how can I download it
not manualy ? What should I write in console ? You haven't wrote it in
your tutorial.

On 4 Kwi, 17:25, Loïc Vernet  wrote:
> 
>
> Well if you have manually downloaded the plugin, yes you must copy the 
> ressources in /web or use the plugin:publish-assets symfony task
>
> You should read the plgind chatpter of the doc and Jobeet.
>
> ++
>
> 
> De : dziobacz 
> À : symfony users 
> Envoyé le : Samedi, 4 Avril 2009, 16h11mn 41s
> Objet : Re: Re : [symfony-users] lightbox in symfony - how can I use it ?
>
> But all lightbox files should be in \plugins\sfLightboxPlugin or I
> should for example move lightbox images to \web\images, lightbox css
> to \web\css etc ??
>
> On 4 Kwi, 15:59, Loïc Vernet  wrote:
>
> > Hi,
>
> > To summaruze the helpers make the foreach for you...
>
> > The examples are quit explicit... Check out the exemple files witch are in 
> > the sfLightbox/ module
> > of the plugin.
>
> > ++ COil
>
> > 
> > De : dziobacz 
> > À : symfony users 
> > Envoyé le : Samedi, 4 Avril 2009, 14h41mn 15s
> > Objet : [symfony-users] lightbox in symfony - how can I use it ?
>
> > I found 
> > sfLightBoxPlugin:http://www.symfony-project.org/plugins/sfLightboxPlugin
>
> > I download it from this website, unzipped and moved it to \plugins
> > directory, in \plugins\sfLightboxPlugin I have folders:
> > config, lib, modules, web. I don't need to move files from these
> > folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
> > \modules and \web ?
>
> > I have read 'Readme' from this site but I don't understand this. In
> > normal php and normal lightbox I could use lightbox to show images
> > like that:
>
> > 
>
> >      > rel="lightbox[images]">
> >     
> >     
>
> > 
>
> > But in symfony when I click MiniImage I go to site where I see white
> > page and NormalImage. I don't see slideshow. Could somebody help me ?
> > I have never used lightbox in symfony and I am new in symfony ;)
>
>
--~--~-~--~~~---~--~~
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 : Re : [symfony-users] lightbox in symfony - how can I use it ?

2009-04-04 Thread Loïc Vernet


Well if you have manually downloaded the plugin, yes you must copy the 
ressources in /web or use the plugin:publish-assets symfony task

You should read the plgind chatpter of the doc and Jobeet.

++





De : dziobacz 
À : symfony users 
Envoyé le : Samedi, 4 Avril 2009, 16h11mn 41s
Objet : Re: Re : [symfony-users] lightbox in symfony - how can I use it ?


But all lightbox files should be in \plugins\sfLightboxPlugin or I
should for example move lightbox images to \web\images, lightbox css
to \web\css etc ??



On 4 Kwi, 15:59, Loïc Vernet  wrote:
> Hi,
>
> To summaruze the helpers make the foreach for you...
>
> The examples are quit explicit... Check out the exemple files witch are in 
> the sfLightbox/ module
> of the plugin.
>
> ++ COil
>
> 
> De : dziobacz 
> À : symfony users 
> Envoyé le : Samedi, 4 Avril 2009, 14h41mn 15s
> Objet : [symfony-users] lightbox in symfony - how can I use it ?
>
> I found 
> sfLightBoxPlugin:http://www.symfony-project.org/plugins/sfLightboxPlugin
>
> I download it from this website, unzipped and moved it to \plugins
> directory, in \plugins\sfLightboxPlugin I have folders:
> config, lib, modules, web. I don't need to move files from these
> folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
> \modules and \web ?
>
> I have read 'Readme' from this site but I don't understand this. In
> normal php and normal lightbox I could use lightbox to show images
> like that:
>
> 
>
>  rel="lightbox[images]">
> 
> 
>
> 
>
> But in symfony when I click MiniImage I go to site where I see white
> page and NormalImage. I don't see slideshow. Could somebody help me ?
> I have never used lightbox in symfony and I am new in symfony ;)


  
--~--~-~--~~~---~--~~
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: Re : [symfony-users] lightbox in symfony - how can I use it ?

2009-04-04 Thread dziobacz

But all lightbox files should be in \plugins\sfLightboxPlugin or I
should for example move lightbox images to \web\images, lightbox css
to \web\css etc ??



On 4 Kwi, 15:59, Loïc Vernet  wrote:
> Hi,
>
> To summaruze the helpers make the foreach for you...
>
> The examples are quit explicit... Check out the exemple files witch are in 
> the sfLightbox/ module
> of the plugin.
>
> ++ COil
>
> 
> De : dziobacz 
> À : symfony users 
> Envoyé le : Samedi, 4 Avril 2009, 14h41mn 15s
> Objet : [symfony-users] lightbox in symfony - how can I use it ?
>
> I found 
> sfLightBoxPlugin:http://www.symfony-project.org/plugins/sfLightboxPlugin
>
> I download it from this website, unzipped and moved it to \plugins
> directory, in \plugins\sfLightboxPlugin I have folders:
> config, lib, modules, web. I don't need to move files from these
> folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
> \modules and \web ?
>
> I have read 'Readme' from this site but I don't understand this. In
> normal php and normal lightbox I could use lightbox to show images
> like that:
>
> 
>
>      rel="lightbox[images]">
>     
>     
>
> 
>
> But in symfony when I click MiniImage I go to site where I see white
> page and NormalImage. I don't see slideshow. Could somebody help me ?
> I have never used lightbox in symfony and I am new in symfony ;)
--~--~-~--~~~---~--~~
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] lightbox in symfony - how can I use it ?

2009-04-04 Thread Loïc Vernet
Hi,

To summaruze the helpers make the foreach for you...

The examples are quit explicit... Check out the exemple files witch are in the 
sfLightbox/ module 
of the plugin.

++ COil





De : dziobacz 
À : symfony users 
Envoyé le : Samedi, 4 Avril 2009, 14h41mn 15s
Objet : [symfony-users] lightbox in symfony - how can I use it ?


I found sfLightBoxPlugin: 
http://www.symfony-project.org/plugins/sfLightboxPlugin

I download it from this website, unzipped and moved it to \plugins
directory, in \plugins\sfLightboxPlugin I have folders:
config, lib, modules, web. I don't need to move files from these
folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
\modules and \web ?


I have read 'Readme' from this site but I don't understand this. In
normal php and normal lightbox I could use lightbox to show images
like that:









But in symfony when I click MiniImage I go to site where I see white
page and NormalImage. I don't see slideshow. Could somebody help me ?
I have never used lightbox in symfony and I am new in symfony ;)


  
--~--~-~--~~~---~--~~
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: testing code in plugins

2009-04-04 Thread Bernhard Schussek

Hi Matthias,

If you want to execute particular tests, you can just execute them
from the console using "php". E.g.
$ php plugins/myPlugin/test/unit/myClassTest.php

If you want to execute sets of tests, you have to create PHP files
that execute these sets, and then execute these PHP files. The symfony
libraries, for example, ship the file test/bin/prove.php[1] which is
the equivalent to the task test:all. You can copy this file to a file
plugins/myPlugin/test/bin/myTestGroup.php and modify it to your needs.
Then you just execute it on the shell:
$ php plugins/myPlugin/test/bin/myTestGroup.php

An alternative to the above ways is to install a patch by Klemens
Ullmann and myself that extends the test:xxx tasks to handle plugin
tests. You can find the patch at
http://trac.symfony-project.org/ticket/4873

If you want further information about best practices regarding plugin
testing, I recommend to read
http://groups.google.com/group/symfony-devs/browse_thread/thread/5c38ea3cc619c6fd?hl=en
http://trac.symfony-project.org/wiki/PluginTesting


Bernhard

[1] http://trac.symfony-project.org/browser/branches/1.3/test/bin/prove.php

--~--~-~--~~~---~--~~
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] testing code in plugins

2009-04-04 Thread Matthias N.

Hi,

can someone give some information about how to write and execute
functional tests as well as unit tests in plugins and how to execute
all or particular ones?

I couldn't find any information about that. Any information would be
very appreciated.

regards,
Matthias
--~--~-~--~~~---~--~~
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] lightbox in symfony - how can I use it ?

2009-04-04 Thread dziobacz

I found sfLightBoxPlugin: 
http://www.symfony-project.org/plugins/sfLightboxPlugin

I download it from this website, unzipped and moved it to \plugins
directory, in \plugins\sfLightboxPlugin I have folders:
config, lib, modules, web. I don't need to move files from these
folders to \apps\frontend\config, \apps\frontend\lib, \apps\frontend
\modules and \web ?


I have read 'Readme' from this site but I don't understand this. In
normal php and normal lightbox I could use lightbox to show images
like that:









But in symfony when I click MiniImage I go to site where I see white
page and NormalImage. I don't see slideshow. Could somebody help me ?
I have never used lightbox in symfony and I am new in symfony ;)
--~--~-~--~~~---~--~~
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] Tr : [symfony-fr] [sfForms] rendre un champ requis (ou non) suivant l'état d'un autre champ

2009-04-04 Thread Loïc Vernet
Tu devrais regarder du coté de postValidator. 

++ COil



- Message transféré 
De : Sylvain Deloux 
À : Symfony-fr 
Envoyé le : Samedi, 4 Avril 2009, 12h51mn 54s
Objet : [symfony-fr] [sfForms] rendre un champ requis (ou non) suivant l'état 
d'un autre champ


Bonjour,

Je suis en train de mettre en place un formulaire en utilisant sfForms
en symfony 1.2

J'aimerais rendre un champ requis seulement si une case est cochée,
sinon le rendre facultatif.

Je cherche partout dans la documentation des formulaires, mais ne
trouve pas l'information. Quelqu'un pourrait-il m'aider ?

Merci,
Sylvain


  
--~--~-~--~~~---~--~~
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: resizing image during upload

2009-04-04 Thread dziobacz

THX - it works !! xD


On 4 Kwi, 12:39, Miloslav Kmeť  wrote:
> if ($file instanceof sfValidatedFile)
> {
>    $image = new sfImage($file->getTempName());
>
> }
--~--~-~--~~~---~--~~
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] [sfForms] set a field required (or not) ONLY if a checkbox is checked

2009-04-04 Thread Sylvain Deloux

Hi,

I'm using sfForms (with symfony 1.2) to create a form.

I'd like to set a field required ONLY if a checkbox is checked,
otherwise it doesn't not to be required.

I'm looking on the forms documentation, but without success. Anybody
could help me ?

Thanks,
Sylvain
--~--~-~--~~~---~--~~
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: resizing image during upload

2009-04-04 Thread Miloslav Kmeť

if ($file instanceof sfValidatedFile)
{
   $image = new sfImage($file->getTempName());
}

--~--~-~--~~~---~--~~
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] resizing image during upload

2009-04-04 Thread dziobacz

How can I change size of image during upload ? I use
sfImageTransformPlugin to do that.


//take information about uploading image:
$code = md5(uniqid(mt_rand()));
$file = $this->form->getValue('image');
$filename = $code;
$extension = $file->getExtension($file->getOriginalExtension());
$newname = $filename.$extension;



//use sfImageTransformPlugin to resize image and save:
$img = new sfImage( ..??.);
$response = $this->getResponse();
$response->setContentType($img->getMIMEType());
if($img->getWidth() > 400 || $img->getHeight() > 400)
{
if($img->getWidth() > $img->getHeight()) 
$img->resize(400,null);
else $img->resize(null,400);
}
$img->saveAs(sfConfig::get('sf_upload_dir'). DIRECTORY_SEPARATOR .
$newname);


What should I write in new sfImage() ?? I must write there path to
upload image but image isn't yet uploaded - so what should I write
there ?
--~--~-~--~~~---~--~~
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: Issue when removing created_at form's field

2009-04-04 Thread Adrien Mogenet

I tried but I will retry from scratch...
[ I don't understand why the topic changed so suddenly ;-) ]

--
Adrien

On 3 avr, 23:22, Arnold Ispan  wrote:
> Hello,
>
> Maybe the solution is to rebuild forms and filters with *propel:build-forms
> *and  *propel:build-filters*
>
> On Fri, Apr 3, 2009 at 11:41 PM, Adrien Mogenet 
> wrote:
>
>
>
> > Hi all,
>
> > I have a classical entity, let say `member`, with `created_at` and
> > `updated_at` fields.
> > I performed a  propel:build-model, I generated CRUD module, and when I
> > removed created_at and updated_at fields from the form's template,
> > their values are set to empty once I submit the form...
>
> > How can I avoid this behaviour easily ?
>
> > --
> > Adrien
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---