[symfony-users] schema.sql why generate to create same table twice?

2010-04-05 Thread Sela
I generate the sql from the schema.yml and get this
CREATE TABLE sf_guard_user_profile (id BIGINT AUTO_INCREMENT, user_id
INT NOT NULL, email VARCHAR(80) NOT NULL UNIQUE, firstname
VARCHAR(30), lastname VARCHAR(70), validate_at datetime, validate
VARCHAR(33), created_at DATETIME NOT NULL, updated_at DATETIME NOT
NULL, INDEX user_id_idx (user_id), PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE sf_guard_user_profile (id BIGINT AUTO_INCREMENT, user_id
INT NOT NULL, email VARCHAR(80) NOT NULL UNIQUE, firstname
VARCHAR(30), lastname VARCHAR(70), validate_at datetime, validate
VARCHAR(33), created_at DATETIME NOT NULL, updated_at DATETIME NOT
NULL, PRIMARY KEY(id)) ENGINE = INNODB;

the difference is that the first one create an index, i checked the
model doctrine base table and the table sf_guard_user_profile has just
one set of files to create it, so not sure why 2 lines are been
created what cause an error when i run the insert-sql

-- 
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

To unsubscribe, reply using remove me as the subject.


[symfony-users] symfony and doctrine svn commit history visualization with Gource and Code Swarm

2010-04-05 Thread ruslanix
Gource (http://code.google.com/p/gource) and CodeSwarm (http://
code.google.com/p/codeswarm) are software version control
visualization tools.

We used this programs for symfony and doctrine repositories.
You can view some videos here: 
http://simsym.com/codeswarm-gource-symfony-doctrine/

It's pretty fun to watch visualized svn activities...

-- 
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

To unsubscribe, reply using remove me as the subject.


[symfony-users] REST webservices

2010-04-05 Thread Beo
Hi, which is the best suggested practice to develop webservices and
applications using them in symfony?

I mean, I want to define a set of API in application A, and use these
in application B.

My basic approach should be:

for application A:
  - define a schema (Doctrine rules)
  - define some modules/actions with XML responses (ala Facebook)

for application B:
  - copy part of the schema and build only models/forms? I couldn't
use some of the Doctrine validations?
  - define models and forms by hand?

What would you do?

-- 
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

To unsubscribe, reply using remove me as the subject.


Re: [symfony-users] REST webservices

2010-04-05 Thread Alexandru-Emil Lupu
Hi!
If you are using the same project, you can define the global schema which
will create forms for both applications.
You could better create a plugin and put whole the logic there. That will
allow you to keep it modular. Also the logic will be groupped. The rest will
be just enable and disable the plugin modules.

sent via htc magic

On Apr 5, 2010 11:51 AM, Beo pietrino.atz...@gmail.com wrote:

Hi, which is the best suggested practice to develop webservices and
applications using them in symfony?

I mean, I want to define a set of API in application A, and use these
in application B.

My basic approach should be:

for application A:
 - define a schema (Doctrine rules)
 - define some modules/actions with XML responses (ala Facebook)

for application B:
 - copy part of the schema and build only models/forms? I couldn't
use some of the Doctrine validations?
 - define models and forms by hand?

What would you do?

--
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.comsymfony-users%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

To unsubscribe, reply using remove me as the subject.

-- 
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] sfOutputEscaper behaviour

2010-04-05 Thread Apul Gupta
Hi,

Actually, I want to show some HTML text from the database to a
template.

I am using
echo $sf_data-getRaw('sf_content');

to get un-escaped value from the database but still it shows escaped
data to me. What should I do to get unescaped value?

I don't want to SET escaping-strategy = off in settings.yml for the
entire application.

I will appreciate any help.


---
Thanks
Apul Gupta

-- 
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

To unsubscribe, reply using remove me as the subject.


Re: [symfony-users] symfony and doctrine svn commit history visualization with Gource and Code Swarm

2010-04-05 Thread Frank Stelzer

Very nice!
I have seen CodeSwarm already for other projects and it is always  
impressive :)
Very interesting  to see, how the swarm looks like and behaves during  
release times.


I recommend an additional english version of this blog post :)

Frank


Am 03.04.2010 um 20:17 schrieb ruslanix:


Gource (http://code.google.com/p/gource) and CodeSwarm (http://
code.google.com/p/codeswarm) are software version control
visualization tools.

We used this programs for symfony and doctrine repositories.
You can view some videos here: 
http://simsym.com/codeswarm-gource-symfony-doctrine/

It's pretty fun to watch visualized svn activities...

--
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

To unsubscribe, reply using remove me as the subject.


--
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] Doctrine Behavior example in symfony 1.4 book - CountCache

2010-04-05 Thread mstralka
Hi,

An example in The More with symfony book chapter 8 shows how to
create a doctrine behavior called CountCache that counts the number of
Posts a Thread has related to it:
http://www.symfony-project.org/more-with-symfony/1_4/en/08-Advanced-Doctrine-Usage

I'm trying to use this behavior in my domain model but the sample code
doesn't provide getters and setters for the num_posts column.  For
example, I want to be able to do this:

?php echo $thread-getNumPosts() ?

But a 500 exception is thrown which reads:
Unknown record property / related component num_posts on Thread

Am I missing something?

Thanks

-- 
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

To unsubscribe, reply using remove me as the subject.


[symfony-users] help

2010-04-05 Thread safa boubekri
hello

i  follow   http://www.symfony-project.org/jobeet/1_2/Doctrine/en/13

 i need your help i  create an administrator user  but in the exuction i
have The username and/or password is invalid.  i cant  access to my apps
backend


thank you

-- 
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

To unsubscribe, reply using remove me as the subject.


[symfony-users] Re: sfDoctrineGuardPlugin: Edit only own pofile

2010-04-05 Thread Tom Ptacnik
You can disable this edit route and create your ow route without user
id. And in the action retrieve logged user id from the session.


On 3 dub, 00:49, comb sa...@gmx.net wrote:
 Hey

 (symfony 1.4 + Doctrine)

 In the backend I have a list of members where each member is connected
 to a sfGuardUser. .
 Now I want that every Member can only edit his own profil, but not the
 ones of others.

 For the list-view I already got a solution with the table_methode
 where I can specify a $q-andWhere():

 //Member.class.php
 [...]
 public function retrieveBackendMember(Doctrine_Query $q)
     {
                 try {
                         // not-admin-users may only edit their own profiles
                         $user = sfContext::getInstance()-getUser();
                         $user_id = $user-getGuardUser()-getId();
                 if (!$user-hasCredential('admin'))
                 {
                         $rootAlias = $q-getRootAlias();
                         $q-andWhere($rootAlias.'.sf_guard_user_id = ?', 
 $user_id);
                 }
                 } catch (Exception $e) {
                         // show none...
                         $q-andWhere('false');
                 }

         return $q;
     }
 [...]

 But if I change the id in the URL I can edit others, too..
 ../backend_dev.php/members/23/edit
 - ../backend_dev.php/members/24/edit *WORKS, BUT I WANT A NEED-AUTH-
 MESSAGE*

 How can I do that?

 Thanks!
 comb
 ... who is tired from symfony-google-maraton :-(

-- 
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

To unsubscribe, reply using remove me as the subject.


[symfony-users] Trying to copy the project root folder to a pendrive. Error making symbolic link: Operation not permitted

2010-04-05 Thread Javier Garcia

Hi,

im trying to copy the root folder of my sf project to a pendrive but im 
getting this error:


Error while copying sfProtoculous
There was an error copying the file into /media/KINGSTON/rs/web.
Error making symbolic link: Operation not permitted

I've tried with the project unfreezed and freezed. Sf 1.2.

Any idea?

Javi

--
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

To unsubscribe, reply using remove me as the subject.


Re: [symfony-users] Trying to copy the project root folder to a pendrive. Error making symbolic link: Operation not permitted

2010-04-05 Thread Daniel Lohse
Just delete those symbolic links in your symfony project. On the target machine 
you can run the tasks project:permissions and plugin:publish and all those 
symbolic links will be created for you. :)

Cheers, Daniel

On 05.04.2010, at 14:50, Javier Garcia wrote:

 Hi,
 
 im trying to copy the root folder of my sf project to a pendrive but im 
 getting this error:
 
 Error while copying sfProtoculous
 There was an error copying the file into /media/KINGSTON/rs/web.
 Error making symbolic link: Operation not permitted
 
 I've tried with the project unfreezed and freezed. Sf 1.2.
 
 Any idea?
 
 Javi
 
 -- 
 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
 
 To unsubscribe, reply using remove me as the subject.

-- 
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] ¿Hay algun chat irc en español sob re symfony?

2010-04-05 Thread Javier Garcia

Hola,

solo eso.

Javi

Ubuntu 8.04

--
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

To unsubscribe, reply using remove me as the subject.


[symfony-users] Doctrine_Record accessors

2010-04-05 Thread Ettore
Hello all,

i'm developing an app with Symfony 1.4 (tag, not last svn version) and
Doctrine and i found a strange behavoir with the following code.

 schema.yaml ---
User:
  columns:
name: { type: string(40), notnull: true }
surname:  { type: string(40), notnull: true }
email:{ type: string(40), notnull: true }
fcode:{ type: string(16), notnull: true }
last_login:   { type: timestamp, notnull: true }


--- .php ---

$user = Doctrine_Core::getTable( 'User' )-findOneById( 3 );

echo $user-getLastLogin(); // OK!
echo $user-getlast_login(); // OK!
echo $user-LastLogin; // ERROR: Unknown record property / related
component LastLogin on User
echo $user-last_login; // OK!
//echo $user[LastLogin]; // ERROR: Unknown record property / related
component LastLogin on User
echo $user[last_login]; //OK!

Is this a bug or, for some good reasons, is correct?

-- 
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] help

2010-04-05 Thread Germana Oliveira
the only thing i can tell you, is to double check the username you create
and be sure you remember the password exactly as you typed it iwhe you
create the user.

But if you need to work on the backend, you just have to edit your
security.yml file and say 'off'



2010/4/5 safa boubekri boubekri.s...@gmail.com

 hello

 i  follow   http://www.symfony-project.org/jobeet/1_2/Doctrine/en/13

  i need your help i  create an administrator user  but in the exuction
 i have The username and/or password is invalid.  i cant  access to my apps
 backend


 thank you

 --
 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.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




-- 
Germana Oliveira

germanaoliveirab arroba gmail punto com
http://626f67.wordpress.com
http://slcarabobo.wordpress.com

-- 
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

To unsubscribe, reply using remove me as the subject.


Re: [symfony-users] Doctrine_Record accessors

2010-04-05 Thread Stéphane
What about $user-lastLogin ?

Cheers,

Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!


On Mon, Apr 5, 2010 at 6:39 PM, Ettore ete@gmail.com wrote:

 Hello all,

 i'm developing an app with Symfony 1.4 (tag, not last svn version) and
 Doctrine and i found a strange behavoir with the following code.

  schema.yaml ---
 User:
  columns:
name: { type: string(40), notnull: true }
surname:  { type: string(40), notnull: true }
email:{ type: string(40), notnull: true }
fcode:{ type: string(16), notnull: true }
last_login:   { type: timestamp, notnull: true }


 --- .php ---

 $user = Doctrine_Core::getTable( 'User' )-findOneById( 3 );

 echo $user-getLastLogin(); // OK!
 echo $user-getlast_login(); // OK!
 echo $user-LastLogin; // ERROR: Unknown record property / related
 component LastLogin on User
 echo $user-last_login; // OK!
 //echo $user[LastLogin]; // ERROR: Unknown record property / related
 component LastLogin on User
 echo $user[last_login]; //OK!

 Is this a bug or, for some good reasons, is correct?

 --
 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.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://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

To unsubscribe, reply using remove me as the subject.


Re: [symfony-users] timezones, symfony 1.0 and propel

2010-04-05 Thread Jacob Coby
Anyone?  Surely someone has implemented timezones in symfony before?

On Apr 1, 2010, at 11:11 AM, Jacob Coby wrote:

 Has anyone successfully implemented timezone support with symfony 1.0?  I 
 store my timestamps in America/New_York but need to display them in the 
 user's timezone.
 
 The only approach I can see that would work is adding a helper to make the 
 temporal changes in the view or to override the getters/setters for every 
 datetime field for every model.
 
 --
 Jacob Coby
 
 
 
 
 
 
 -- 
 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
 
 To unsubscribe, reply using remove me as the subject.

--
Jacob Coby






-- 
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: Doctrine_Record accessors

2010-04-05 Thread Ettore
echo $user-lastLogin; // ERROR
echo $user[lastLogin]; // ERROR

I took a look inside symfony's code. As what i have understood, the
behavoir of ArrayAccess ( $user[...] ) and properties ( $user-field )
doesn't normalize the field value. But i can't found where this
normalizations takes place when using accessors/setters methods
($user-get... $user-set..), my skills stopped inside the __call
method of Doctrine_Record (get/set methods seems implemented using
some default template).

-- 
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

To unsubscribe, reply using remove me as the subject.


[symfony-users] Re: Doctrine_Record accessors

2010-04-05 Thread Ettore
Found it:

--- sfDoctrineRecordClass:166 ---
public function __call($method, $arguments)
{

}

This overrides the __call of Doctrine_Record.

So, shouldn't this be done also for every other acessor/setter (__get
__set __isset __unset and ArrayAccess methods) ?

-- 
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

To unsubscribe, reply using remove me as the subject.


[symfony-users] How to do upgrades

2010-04-05 Thread Samuel Morhaim
I have a question.. once I finish coding and the site goes into production,
I can't rebuild the DB every time I need to add a field etc.

How do people workaround this? What is the process for migrations?

Thank you.

-- 
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

To unsubscribe, reply using remove me as the subject.


Re: [symfony-users] How to do upgrades

2010-04-05 Thread Jacob Coby
if you're using doctrine, migrations are part of symfony.

if you're using propel, you can use the sfPropelMigrationsLight plugin from the 
symfony site or my fork of it that allows for out of order migrations (similar 
to rails) - sfPropelMigrations 
(http://github.com/jcoby/sfPropelMigrationsPlugin).  I have not had a chance to 
try my plugin with sf  1.0.  I would love to hear some feedback.  I'm pretty 
sure it will error out on the pake_echo_action calls in recordMigration and 
unrecordMigration 
(http://github.com/jcoby/sfPropelMigrationsPlugin/blob/master/lib/sfMigrator.class.php#L343)

On Apr 5, 2010, at 2:42 PM, Samuel Morhaim wrote:

 I have a question.. once I finish coding and the site goes into production, I 
 can't rebuild the DB every time I need to add a field etc.
 
 How do people workaround this? What is the process for migrations?
 
 Thank you.
 
 -- 
 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

--
Jacob Coby






-- 
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

To unsubscribe, reply using remove me as the subject.


[symfony-users] symfony 1.2 - sfTCPDFPlugin - how to embed a generated pdf to an action or partial

2010-04-05 Thread gato chlr
Hi to every body, i need to generate a PDF file (i'm using symfony 1.2 and
sfTCPDFPlugin) and also get it embedded to an action or to a partial, in
order to be show html code, and also in a little box the embedded pdf.

thanks

-- 
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

To unsubscribe, reply using remove me as the subject.


Re: [symfony-users] Re: sfDoctrineGuardPlugin: Edit only own pofile

2010-04-05 Thread Robert Heim

yeah good idea!

I got a last small problem within the solution, since I do not know how 
to pass the ..-getUser()-getId() to the auto-edit-action?!


I now overwrite the routes from the admin-generator
backend/config/routing.yml
..
# the Route I want to be used..
member_edit:
  url:   /members/edit
  class: sfDoctrineRoute
  options: { model: Member, type: object}
  param: { module: member, action: edit }
  requirements:
sf_method: [get]

member_object:
... #(other route to be overwritten, since it gives access to  to the 
member/id/edit page... and for more security I could overwrite 
update/delete etc, too.. but I'm not that paranoid..^^)



So now I only need to get the ID from the users-session (no problem..) 
and I need to pass this id to the admin-edit auto action... but how do i 
do that??


class memberActions extends autoMemberActions
{
public function executeEdit(sfWebRequest $request)
{
$id=$this-getUser()-getGuardUser()-getId();
// HERE I NEED TO PASS THE ID TO THE 
AUTO-GENERATED-EDIT-ACTION, BUT HOW?

parent::executeEdit($request);
}
}


this does not work:
$id=$this-getUser()-getGuardUser()-getId(); // die($id)==3
$request-setAttribute('id', $id);

it's always displaying the edit-page for id=1 and not for the users id 
3..Help?


comb :-)

Am 05.04.2010 14:49, schrieb Tom Ptacnik:

You can disable this edit route and create your ow route without user
id. And in the action retrieve logged user id from the session.


On 3 dub, 00:49, combsa...@gmx.net  wrote:
   

Hey

(symfony 1.4 + Doctrine)

In the backend I have a list of members where each member is connected
to a sfGuardUser. .
Now I want that every Member can only edit his own profil, but not the
ones of others.

For the list-view I already got a solution with the table_methode
where I can specify a $q-andWhere():

//Member.class.php
[...]
public function retrieveBackendMember(Doctrine_Query $q)
 {
 try {
 // not-admin-users may only edit their own profiles
 $user = sfContext::getInstance()-getUser();
 $user_id = $user-getGuardUser()-getId();
 if (!$user-hasCredential('admin'))
 {
 $rootAlias = $q-getRootAlias();
 $q-andWhere($rootAlias.'.sf_guard_user_id = ?', 
$user_id);
 }
 } catch (Exception $e) {
 // show none...
 $q-andWhere('false');
 }

 return $q;
 }
[...]

But if I change the id in the URL I can edit others, too..
../backend_dev.php/members/23/edit
-  ../backend_dev.php/members/24/edit *WORKS, BUT I WANT A NEED-AUTH-
MESSAGE*

How can I do that?

Thanks!
comb
... who is tired from symfony-google-maraton :-(
 
   


--
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

To unsubscribe, reply using remove me as the subject.


Re: [symfony-users] Re: sfDoctrineGuardPlugin: Edit only own pofile

2010-04-05 Thread Robert Heim

I already solved it with overwriting the whole action:
public function executeEdit(sfWebRequest $request)
{
$id=$this-getUser()-getGuardUser()-getId();
$this-member = Doctrine::getTable('Member')-find($id);
$this-form = $this-configuration-getForm($this-member);
}

but I'm interested in if it's possible to just manipulate the request 
and call parent::executeEdit() like described in the last message..?!


Thanks!!
comb

Am 05.04.2010 23:06, schrieb Robert Heim:

yeah good idea!

I got a last small problem within the solution, since I do not know 
how to pass the ..-getUser()-getId() to the auto-edit-action?!


I now overwrite the routes from the admin-generator
backend/config/routing.yml
..
# the Route I want to be used..
member_edit:
  url:   /members/edit
  class: sfDoctrineRoute
  options: { model: Member, type: object}
  param: { module: member, action: edit }
  requirements:
sf_method: [get]

member_object:
... #(other route to be overwritten, since it gives access to  to the 
member/id/edit page... and for more security I could overwrite 
update/delete etc, too.. but I'm not that paranoid..^^)



So now I only need to get the ID from the users-session (no problem..) 
and I need to pass this id to the admin-edit auto action... but how do 
i do that??


class memberActions extends autoMemberActions
{
public function executeEdit(sfWebRequest $request)
{
$id=$this-getUser()-getGuardUser()-getId();
// HERE I NEED TO PASS THE ID TO THE 
AUTO-GENERATED-EDIT-ACTION, BUT HOW?

parent::executeEdit($request);
}
}


this does not work:
$id=$this-getUser()-getGuardUser()-getId(); // die($id)==3
$request-setAttribute('id', $id);

it's always displaying the edit-page for id=1 and not for the users id 
3..Help?


comb :-)

Am 05.04.2010 14:49, schrieb Tom Ptacnik:

You can disable this edit route and create your ow route without user
id. And in the action retrieve logged user id from the session.


On 3 dub, 00:49, combsa...@gmx.net  wrote:

Hey

(symfony 1.4 + Doctrine)

In the backend I have a list of members where each member is connected
to a sfGuardUser. .
Now I want that every Member can only edit his own profil, but not the
ones of others.

For the list-view I already got a solution with the table_methode
where I can specify a $q-andWhere():

//Member.class.php
[...]
public function retrieveBackendMember(Doctrine_Query $q)
 {
 try {
 // not-admin-users may only edit their own 
profiles

 $user = sfContext::getInstance()-getUser();
 $user_id = $user-getGuardUser()-getId();
 if (!$user-hasCredential('admin'))
 {
 $rootAlias = $q-getRootAlias();
 $q-andWhere($rootAlias.'.sf_guard_user_id 
= ?', $user_id);

 }
 } catch (Exception $e) {
 // show none...
 $q-andWhere('false');
 }

 return $q;
 }
[...]

But if I change the id in the URL I can edit others, too..
../backend_dev.php/members/23/edit
-  ../backend_dev.php/members/24/edit *WORKS, BUT I WANT A 
NEED-AUTH-

MESSAGE*

How can I do that?

Thanks!
comb
... who is tired from symfony-google-maraton :-(




--
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

To unsubscribe, reply using remove me as the subject.


[symfony-users] Fatal error: Call to undefined function remote_function()

2010-04-05 Thread Belgacem TLILI
i'm using sf 1.4
and i'm searching to embed a form using ajax
i start with
echo javascript_tag(
  remote_function(array(
'update'  = 'myzone',
'url' = 'mymodule/myaction',
  ))
) ?

i have use the java script helper in my template  ?php
use_helper('JavascriptBase') ?

but i have an error

Fatal error: Call to undefined function remote_function() in D:
\sfprojects\ajaxembedform\apps\frontend\modules\cap\templates
\newSuccess.php

is there any configuration required  to have a solution for this
error ?

-- 
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] Fatal error: Call to undefined function remote_function()

2010-04-05 Thread Robert Heim

try:

echo javascript_tag(remote_function(array(
'update'  =  'myzone',
'url' =  'mymodule/myaction',
  ))
) ?


you need the  because otherwise its interpreted as an PHP-function..

Am 05.04.2010 23:31, schrieb Belgacem TLILI:

i'm using sf 1.4
and i'm searching to embed a form using ajax
i start with
echo javascript_tag(
   remote_function(array(
 'update'  =  'myzone',
 'url' =  'mymodule/myaction',
   ))
) ?

i have use the java script helper in my template?php
use_helper('JavascriptBase') ?

but i have an error

Fatal error: Call to undefined function remote_function() in D:
\sfprojects\ajaxembedform\apps\frontend\modules\cap\templates
\newSuccess.php

is there any configuration required  to have a solution for this
error ?

   


--
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

To unsubscribe, reply using remove me as the subject.


[symfony-users] Re: Fatal error: Call to undefined function remote_function()

2010-04-05 Thread Belgacem TLILI
great it's work
the problem was resolved
thank you Mr Robert Heim

just one more thing

in Firebug i have an error that i think is not important
-
invalid assignment left-hand side
 'update' = 'myzone',\n
---

??

On 5 avr, 23:34, Robert Heim sa...@gmx.net wrote:
 try:

 echo javascript_tag(remote_function(array(
      'update'  =  'myzone',
      'url'     =  'mymodule/myaction',
    ))
 ) ?

 you need the  because otherwise its interpreted as an PHP-function..

 Am 05.04.2010 23:31, schrieb Belgacem TLILI:

  i'm using sf 1.4
  and i'm searching to embed a form using ajax
  i start with
  echo javascript_tag(
     remote_function(array(
       'update'  =  'myzone',
       'url'     =  'mymodule/myaction',
     ))
  ) ?

  i have use the java script helper in my template?php
  use_helper('JavascriptBase') ?

  but i have an error

  Fatal error: Call to undefined function remote_function() in D:
  \sfprojects\ajaxembedform\apps\frontend\modules\cap\templates
  \newSuccess.php

  is there any configuration required  to have a solution for this
  error ?

-- 
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

To unsubscribe, reply using remove me as the subject.


[symfony-users] Re: Fatal error: Call to undefined function remote_function()

2010-04-05 Thread Belgacem TLILI
i'm using jquery to get the ajax action

this my code in the template

script
$(#MyButton).click(function() {
  remote_function(array(update=item_list,url=cap/new));
});
/script


i have not any result ?

-- 
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

To unsubscribe, reply using remove me as the subject.


Re: [symfony-users] Re: Fatal error: Call to undefined function remote_function()

2010-04-05 Thread Robert Heim
I heard something like that Javascript doesn’t have built in support for 
associative arrays the way PHP and other programming languages do..

try

var Arr=new Array();

 Arr[0] = new Array();
 Arr[0][first_name] = foo;
 Arr[0][last_name] = bar;
 Mitarbeiter[0][Wohnort]= Dresden;

I'm not sure..
Maybe this helps you: 
http://andrewdupont.net/2006/05/18/javascript-associative-arrays-considered-harmful/


cheers!
comb

Am 05.04.2010 23:44, schrieb Belgacem TLILI:

great it's work
the problem was resolved
thank you Mr Robert Heim

just one more thing

in Firebug i have an error that i think is not important
-
invalid assignment left-hand side
  'update' =  'myzone',\n
---

??

On 5 avr, 23:34, Robert Heimsa...@gmx.net  wrote:
   

try:

echo javascript_tag(remote_function(array(
  'update'  =   'myzone',
  'url' =   'mymodule/myaction',
))
) ?

you need the  because otherwise its interpreted as an PHP-function..

Am 05.04.2010 23:31, schrieb Belgacem TLILI:

 

i'm using sf 1.4
and i'm searching to embed a form using ajax
i start with
echo javascript_tag(
remote_function(array(
  'update'  =   'myzone',
  'url' =   'mymodule/myaction',
))
) ?
   
 

i have use the java script helper in my template?php
use_helper('JavascriptBase') ?
   
 

but i have an error
   
 

Fatal error: Call to undefined function remote_function() in D:
\sfprojects\ajaxembedform\apps\frontend\modules\cap\templates
\newSuccess.php
   
 

is there any configuration required  to have a solution for this
error ?
   
   


--
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

To unsubscribe, reply using remove me as the subject.


Re: [symfony-users] timezones, symfony 1.0 and propel

2010-04-05 Thread Disco Duro
Hi,

I need info about manage timezones using doctrine on symfony 1.4.

Anyone know any helper or pluging for this.

Thanks,

Nicolás Moreira

2010/4/5 Jacob Coby jc...@portallabs.com

 Anyone?  Surely someone has implemented timezones in symfony before?

 On Apr 1, 2010, at 11:11 AM, Jacob Coby wrote:

  Has anyone successfully implemented timezone support with symfony 1.0?  I
 store my timestamps in America/New_York but need to display them in the
 user's timezone.
 
  The only approach I can see that would work is adding a helper to make
 the temporal changes in the view or to override the getters/setters for
 every datetime field for every model.
 
  --
  Jacob Coby
 
 
 
 
 
 
  --
  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.comsymfony-users%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/symfony-users?hl=en
 
  To unsubscribe, reply using remove me as the subject.

 --
 Jacob Coby






 --
 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.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://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


[symfony-users] Re: sfWidgetFormJqueryDate - Bug when selecting in list the 8th or 9th of a month

2010-04-05 Thread alberthendriks
What xplo says is true. The fix has not yet been released. The fixed
file can now be found here:

http://svn.symfony-project.com/plugins/sfFormExtraPlugin/branches/1.3/lib/widget/

The diff is this:
86,88c86,88
 jQuery(#%s).val(parseInt(date.substring(0, 4)));
 jQuery(#%s).val(parseInt(date.substring(5, 7)));
 jQuery(#%s).val(parseInt(date.substring(8)));
---
 jQuery(#%s).val(parseInt(date.substring(0, 4), 10));
 jQuery(#%s).val(parseInt(date.substring(5, 7), 10));
 jQuery(#%s).val(parseInt(date.substring(8), 10));

Note, there's still another bug that when selecting August in the
dropdown, you cannot select 31. This is the fix for that:

125c125
   ($this-getOption('can_be_empty') ? 'daysInMonth' :
'daysInMonth - 1'),
---
   ($this-getOption('can_be_empty') ? 'daysInMonth+1' : 'daysInMonth'),

Albert


On Mar 22, 3:57 pm, Raphaël B. zera...@gmail.com wrote:
 Hello,

 I'm using this widget in a symfony form like this:

     $dateWidget = new sfWidgetFormDate(array(
       'format' = '%day%/%month%/%year%',
       'years' = $years_list
     ));

     $this-widgetSchema['date_naissance'] = new
 sfWidgetFormJqueryDate(array(
       'date_widget' = $dateWidget
     ));

 But when I select the 8th or 9th of a month the day select is not
 filled with the value 08 or 09.

 Here the output generated by this widget:

 /
 **/
 select name=info_candidat[date_naissance][day]
 id=info_candidat_date_naissance_day

 option value= selected=selected/option
 option value=101/option
 option value=202/option
 option value=303/option
 option value=404/option
 option value=505/option
 option value=606/option
 option value=707/option
 option value=808/option

 option value=909/option
 option value=1010/option
 option value=/option
 option value=1212/option
 option value=1313/option
 option value=1414/option
 option value=1515/option
 option value=1616/option
 option value=1717/option

 option value=1818/option
 option value=1919/option
 option value=2020/option
 option value=2121/option
 option value=/option
 option value=2323/option
 option value=2424/option
 option value=2525/option
 option value=2626/option

 option value=2727/option
 option value=2828/option
 option value=2929/option
 option value=3030/option
 option value=3131/option
 /select/select name=info_candidat[date_naissance][month]
 id=info_candidat_date_naissance_month
 option value= selected=selected/option
 option value=101/option
 option value=202/option

 option value=303/option
 option value=404/option
 option value=505/option
 option value=606/option
 option value=707/option
 option value=808/option
 option value=909/option
 option value=1010/option
 option value=/option

 option value=1212/option
 /select/select name=info_candidat[date_naissance][year]
 id=info_candidat_date_naissance_year
 option value= selected=selected/option
 option value=20002000/option
 option value=20012001/option
 option value=20022002/option
 option value=20032003/option
 option value=20042004/option
 option value=20052005/option

 /selectinput type=hidden size=10
 id=info_candidat_date_naissance_jquery_control disabled=disabled 
 /script type=text/javascript

   function wfd_info_candidat_date_naissance_read_linked()
   {

 jQuery(#info_candidat_date_naissance_jquery_control).val(jQuery(#info_candidat_date_naissance_year).val()
 + - + jQuery(#info_candidat_date_naissance_month).val() + - +
 jQuery(#info_candidat_date_naissance_day).val());

     return {};
   }

   function wfd_info_candidat_date_naissance_update_linked(date)
   {

 jQuery(#info_candidat_date_naissance_year).val(parseInt(date.substring(0,
 4)));

 jQuery(#info_candidat_date_naissance_month).val(parseInt(date.substring(5,
 7)));

 jQuery(#info_candidat_date_naissance_day).val(parseInt(date.substring(8)));
   }

   function wfd_info_candidat_date_naissance_check_linked_days()
   {
     var daysInMonth = 32 - new
 Date(jQuery(#info_candidat_date_naissance_year).val(),
 jQuery(#info_candidat_date_naissance_month).val() - 1,
 32).getDate();
     jQuery(#info_candidat_date_naissance_day
 option).attr(disabled, );
     jQuery(#info_candidat_date_naissance_day option:gt( +
 (daysInMonth - 1) +)).attr(disabled, disabled);

     if (jQuery(#info_candidat_date_naissance_day).val() 
 daysInMonth)
     {
       jQuery(#info_candidat_date_naissance_day).val(daysInMonth);
     }
   }

   jQuery(document).ready(function() {

 jQuery(#info_candidat_date_naissance_jquery_control).datepicker(jQuery.extend({},
 {
       minDate:    new Date(2000, 1 - 1, 1),
       maxDate:    new Date(2005, 12 - 1, 31),
       beforeShow: wfd_info_candidat_date_naissance_read_linked,
       onSelect:   wfd_info_candidat_date_naissance_update_linked,
       showOn:     button

     }, jQuery.datepicker.regional[], {}, {dateFormat: yy-mm-dd}));
   });

   

[symfony-users] Problem with sfPropelParanoidBehaviorPlugin

2010-04-05 Thread Sky
I have installed the plugin by following these instructions:
http://www.symfony-project.org/plugins/sfPropelParanoidBehaviorPlugin

But, I get the following error message when trying to execute this
statement on one of my model classes:

sfPropelBehavior::add('Program', array('paranoid'));


Propel behavior paranoid is not registered

Question:  how to check if the plugin is properly installed and why is
this error message occurring?

Thank you.

-- 
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

To unsubscribe, reply using remove me as the subject.


Re: [symfony-users] sfOutputEscaper behaviour

2010-04-05 Thread Denis Golovin
Did you try to set escaping-strategy = off in the settings.yml of single module?

Denis

2010/4/5 Apul Gupta apulmca...@gmail.com:
 Hi,

 Actually, I want to show some HTML text from the database to a
 template.

 I am using
 echo $sf_data-getRaw('sf_content');

 to get un-escaped value from the database but still it shows escaped
 data to me. What should I do to get unescaped value?

 I don't want to SET escaping-strategy = off in settings.yml for the
 entire application.

 I will appreciate any help.


 ---
 Thanks
 Apul Gupta

 --
 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

 To unsubscribe, reply using remove me as the subject.


-- 
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