[symfony-users] Re: an intermitent bug, involving an error about favicon.ico

2009-09-10 Thread Fabrice B
I experienced the same as Thomas. The solution, it seems, would be to edit your sfGuardAuth module to remove any forwarding to the referer. But I still don't understand how symfony can actually reference the favicon url as a referer ! I have not taken the time to verify if the favicon.ico url is

[symfony-users] Re: Symfony Facebook Integration

2009-09-06 Thread Fabrice B
http://www.symfony-project.org/plugins/sfFacebookConnectPlugin It's been released two weeks ago, and we are 4 people (I know) using it in projects already. For the moment I did not open the svn, but I am very responsive when given a patch. It is theoretically propel/1.0 and doctrine/1.2 compatibl

[symfony-users] Re: How to automatically add stars on required fields using sfForm in Symfony 1.2

2009-08-31 Thread Fabrice B
> > > ho ho !! a third solution ;) > > > The solution is mainly : > > > > call a static method > > > it goes through the widgetSchema recursively > > > update the label to be an *object* and not a sting. > > > echo $label will invoke the __toString method > > > the __toString format the label with

[symfony-users] Re: sfEasyGMapPlugin not working

2009-07-16 Thread Fabrice B
Hi Zach, this is a really strange problem but will be actually be solved unintentionally in the next release of the plugin : the new version will use autoloading of the maps source file at the same time as the generic google js api file. You can already check how it works in the dev branch of the

[symfony-users] Re: sfEasyGMapPlugin not working

2009-07-15 Thread Fabrice B
Hi Zach, possible sources of errors : - you are using output escaping. In this case you should write in your template $gMap = $sf_data->getRaw(’gMap’); to disable output escaping on the $gMap variable - you are not connected to the Internet. This may seem stupid but that can happen :-) In that

[symfony-users] Re: Symfony-Doctrine Migrations and Branches

2009-05-14 Thread Fabrice B
A less technical solution : - everybody has on its own computer the main branch and his own branch, which share the same development database - the rule is to create migration files only in the main branch As long as migrations only affect database structure in a non- destructive way, this wor

[symfony-users] Re: Exporting using sfPhpExcel displays in browser rather than to file

2009-05-10 Thread Fabrice B
Ok here is my code, if that can help you (dirty version, i merged everything together): set_time_limit(1800); $this->setLayout(false); $response = $this->getResponse(); $response->clearHttpHeaders(); // version 2007 $response->setHttpHeader('Content-Type', 'application/ vn

[symfony-users] Re: sfEasyGMapPlugin v1.0 out

2009-03-13 Thread Fabrice B
For the official page I meant of course: http://www.symfony-project.org/plugins/sfEasyGMapPlugin Fabrice Bernhard --http://www.theodo.fr --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post

[symfony-users] sfEasyGMapPlugin v1.0 out

2009-03-13 Thread Fabrice B
sfEasyGmapPlugin is a very easy to use Google Maps API plugin for symfony, inspired by the Phoogle class... but better :-) A very simple version has been available for a few months but I have now finally released the 1.0 version, with the following new features : - it is now sf1.2 compatible st

[symfony-users] Re: Bigger or smaller modules ?

2009-03-10 Thread Fabrice B
When trying to architecture an application, the best is to find an objective justification to your design. The simplest I would suggest is : one crud = one module In your case, the question is : do you have a separate page to edit user's preferences ? Then it's a separate crud and deserves its ow

[symfony-users] Re: Symfony Production Performance improvements

2009-03-10 Thread Fabrice B
> Naturally there is one problem with a hash; the > possibility that two different string would create the same hash. So create > two hashes and concatenate them, an SHA1 hash and an MD5 hash. By definition a hash is supposed to statistically avoid this problem. But well, it doesn't cost you much

[symfony-users] Re: Overriding javascript_include_tag

2009-03-04 Thread Fabrice B
Sumedh, it should work, you just need to be sure you put the file in your lib/ helper directory. Here is the code loading the helpers, you can see that the sfConfig::get('sf_lib_dir').'/helper' directory comes before the sfConfig::get('sf_symfony_lib_dir').'/helper' directory /** * Gets the

[symfony-users] Re: [ Export data To excel ]

2009-02-20 Thread Fabrice B
I know three solutions to do Excel exports. - Csv It is in my opinion not an interesting one, unless your rows are already formatted into arrays. In that case implode(';',$row) might be interesting - HTML table formatted as Excel This is a nice trick I once discovered. You can do a simple H

[symfony-users] Re: URL's with dots ('.')

2008-12-04 Thread Fabrice B
This is a recurrent problem with the default .htaccess or the lighttpd configuration for symfony For example, if you want to pass float values as parameters. The solution lies in customising your rewrite rules in you .htaccess or lighttpd.conf to better reflect your own configuration. You may ne

[symfony-users] Re: Changed images/CSS/JS after a new build...

2008-12-02 Thread Fabrice B
I myself used something very similar to what you see here > http://particletree.com/notebook/automatically-version-your-css-and-j... but overriding javascript_include_tag from the AssetHelper file, inspired by François Baligant (synalabs.com) function javascript_include_tag() { // MODIF FABRI

[symfony-users] Re: sfModerationPlugin - critical bug in last commit !

2008-10-08 Thread Fabrice B
Hi Thomas, Thanks for this suggestion. However it seems http://trac.symfony-project.org/timeline?changeset=on&max=50&daysback=90&format=rss has too many commits a day to be a security-only solution As for the svn status -u, it just gives you the status of local files compared to the repository,

[symfony-users] Re: sfModerationPlugin - critical bug in last commit !

2008-10-07 Thread Fabrice B
n Oct 6, 5:34 pm, blacksun <[EMAIL PROTECTED]> wrote: > Hi Fabrice, > I'm unconfortable with myself too. > I apologize for the inconvenience. > > The bug should be fixed now. > > Gabriele Santini > > On Oct 6, 4:09 pm, Fabrice B <[EMAIL PROTECTED]> wrote: &g

[symfony-users] sfModerationPlugin - critical bug in last commit !

2008-10-06 Thread Fabrice B
If you are using sfModerationPlugin as an external, you may have noticed a critical bug since the last commit by blacksun on Thursday. The introduction of the following new function produces a completely silent error : public static function getWatchedColumns(string $class) It uses type hinting

[symfony-users] Re: Symfony + smarty

2008-10-05 Thread Fabrice B
I used Smarty for a long time because I found the templates much more redable. But from my experience the PHP code generated by Smarty from the templates is quite ugly. And since I discovered the PHP "script version" ie "if(): endif;" I find PHP code in the template quite readable. You can go eve

[symfony-users] Re: sfEasyGMapPlugin: a new plugin to quickly add a Google Map to a symfony project

2008-09-22 Thread Fabrice B
ic to   > 1.1.  Is it using anything that is specific to the 1.1 APIs? > > Thanks > James > > Who for the time being is stuck in Symfony 1.0 land. > > On Sep 22, 2008, at 3:14 PM, Fabrice B wrote: > > > > > Hello, > > > following a conversation o

[symfony-users] sfEasyGMapPlugin: a new plugin to quickly add a Google Map to a symfony project

2008-09-22 Thread Fabrice B
Hello, following a conversation on the French symfony group, I worked to release my pernosal Google Maps plugin. I tried to make it as simple as possible while leaving most of the functionalities I have developed for my personal needs. Here is the link: http://www.symfony-project.org/plugins/sfE

[symfony-users] Re: rendering partial in a task ?

2008-08-19 Thread Fabrice B
> Does anyone have a solution to this??? symfony guesses the root url using the $_SERVER variable, which you can set manually beforehand $_SERVER['HTTP_X_FORWARDED_HOST'] = 'myhost'; sfConfig::set('sf_no_script_name',true); sfConfig::set('sf_relative_url_root',''); echo sfContext::getInstance()-

[symfony-users] Re: How can I see the raw SQL that a Criteria() object is going to execute?

2008-07-14 Thread Fabrice B
> > $c = new Criteria(); > > $c->addAscendingOrderByColumn(VideoPeer::ID); > > $c->add(VideoPeer::ID, $start_id, Criteria::GREATER_EQUAL); > > $c->add(VideoPeer::ID, $end_id, Criteria::LESS_EQUAL); That's a classical limitaion of Propel. Either do : $c = new Criteria(); $c->addAscendingOrderByCo

[symfony-users] Re: order by clause in symfony

2008-07-10 Thread Fabrice B
$c->addAscendingOrderByColumn('RAND()'); without the quotes, rand() was executed in PHP. Your goal is to include it as a string in the SQL clause, so just put quotes aound it. Fabrice On Jul 10, 7:28 am, kusum <[EMAIL PROTECTED]> wrote: > hi, >      i have already used this > addAscendingOrder

[symfony-users] Re: Table joins with Propel

2008-04-17 Thread Fabrice B
> Thanx for the response. This one is surely a better looking option but > again the case I wanted to solve remains unsolved, decrease the number > of queries to generate this page. Say I want to generate a page with > 10 blog posts, now this approach will require at least 11 database > queries, 1

[symfony-users] Re: Table joins with Propel

2008-04-16 Thread Fabrice B
If with your query you only hydrate your "blog posts" then that additional information "get the interest of the user or nothing if no interest" will just disappear, therefore making your approach useless... This is actually a common problem because a common one. My approach would be the following

[symfony-users] Re: Batch and Emails, how to pass parameters to the action ?

2008-04-15 Thread Fabrice B
> The send mail method return the RAW mail, > seehttp://www.symfony-project.org/cookbook/1_0/email Since it is complicated to parse the raw email, I prefer the variant you suggest later on : $this->getRequest()->setAttribute('last_mail', $this->mail); in the action > You cannot sent variables

[symfony-users] Re: Table joins with Propel

2008-04-15 Thread Fabrice B
> By the way, i'm not sure to understand the interest of doing a LEFT > JOIN in this case, as the related objects won't be hydrated (you have > to call doSelectJoinXXX to retrieve hydrated related objects) so you > don't save queries, and a LEFT JOIN doesn't filter (like a INNER JOIN > would). > S

[symfony-users] Re: Table joins with Propel

2008-04-14 Thread Fabrice B
Hi Manoj, Here is your answer, two different solutions : The very clean one (but it needs a hack) : http://www.rabaix.net/articles/2006/9/16/propel-complex-on-clause The quick and dirty one: $c = new Criteria(); $c->addJoin(Table1Peer::ID,Table2Peer::TABLE1_ID.' AND '.Table1Peer::USER_ID.' = 2

[symfony-users] Batch and Emails, how to pass parameters to the action ?

2008-04-13 Thread Fabrice B
Hi, I want to send many emails from a batch. For that I use the following function which works fine : sfContext::getInstance()->getController()->sendEmail('module', 'sendEmailAction'); (Don't forget to create the $mail = new sfMail() object in the action) First question : I wanted to get the r

[symfony-users] Re: Symfony + Propel + Multiple Schemas

2008-04-13 Thread Fabrice B
How many different users/databases do you have ? If you don't have too many, you could create one database connection in the databases.yml per different "connection" (different database or user) all: connection1: class: sfPropelDatabase param: dsn: mysql://user1