[symfony-users] Re: $response->addJavaScript(): disable cache?

2011-02-03 Thread Felix E. Klee
On Thu, Feb 3, 2011 at 1:30 PM, Felix E. Klee wrote: > Is it possible to tell "addJavaScript()" to disable the cache only for > the given JavaScript file? Just had a quick look at the source, and there seems to be no option for disabling the cache. So I decided to just d

[symfony-users] $response->addJavaScript(): disable cache?

2011-02-03 Thread Felix E. Klee
Is it possible to tell "addJavaScript()" to disable the cache only for the given JavaScript file? (i.e. by appending a unique random string) -- 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 sub

Re: [symfony-users] Redirect URL does not work

2011-02-01 Thread Felix E. Klee
On Sat, Jan 29, 2011 at 3:34 PM, Alan Candido wrote: > Try url_for('@redirect', > arry("url",'.urlencode('http://symfony-project.org'))) That syntax is not supported. And, anyway, the generated URL looks perfect. The problem is that the "urldecode"-ing happens to early. But where? Anyone? -- I

[symfony-users] Redirect URL does not work

2011-01-29 Thread Felix E. Klee
I set up a redirect-page for a Symfony 1.x project. Rule: redirect: url: /:sf_culture/redirect/:url param: { module: main, action: redirect } Then, to create the URL of the redirect page, I tried something like: url_for('@redirect?url='.urlencode('http://symfony-project.org')) This

Re: [symfony-users] Including a custom global YAML file?

2011-01-15 Thread Felix E. Klee
On Sat, Jan 15, 2011 at 11:59 AM, Gareth McCumskey wrote: > You do not need to do an include or require. Not in Symfony 1.1: When you need the code based on the map.yml file and generated by the myMapConfigHandler handler in your application, call the following line: include(sfContext::

Re: [symfony-users] Including a custom global YAML file?

2011-01-15 Thread Felix E. Klee
On Sat, Jan 15, 2011 at 11:40 AM, Gareth McCumskey wrote: > I am assumi9ng you are using symfony 1.x. Yes. > If so, then its very simple. You can add any config file to symfony, > clear cache, then access those config settings using sfConfig::get. > Taking your use case, you could access it as:

Re: [symfony-users] app.yml to configure model?

2011-01-15 Thread Felix E. Klee
On Fri, Jan 14, 2011 at 8:31 PM, Gareth McCumskey wrote: > $row = new ModelClass(sfConfig::get('app_my_config_setting'); > $post_processed = $row->getPostProcessedData(); Though this has two disadvantages: * Some of the configuration is actually needed in static member functions. Sorry, I didn

[symfony-users] Including a custom global YAML file?

2011-01-15 Thread Felix E. Klee
I have a set of classes related to retrieving information from web-services, and I placed them in: /lib/WebServices/ Now, I would like to set up a custom configuration file: /config/webservices.yml In fact I got it to work as follows: /config/config_handlers.yml: config/webservices.

[symfony-users] app.yml to configure model?

2011-01-14 Thread Felix E. Klee
In a Symfony 1 application, I put post processing of database data in the model. Thus, one can simply call something like: row->getPostProcessedData() If the data is already in post-processed form in the database, it is returned as is. Otherwise it is first post-processed, then written to the d

Re: [symfony-users] Re: Minified JavaScript in Production

2011-01-11 Thread Felix E. Klee
On Tue, Jan 11, 2011 at 10:20 PM, Thomas Rabaix wrote: > use https://github.com/rande/swCombinePlugin/ Interesting! In fact, I had something like this in mind: Create minified versions only for deployment. The disadvantage though: The minified version cannot be tested in staging, before deployme

Re: [symfony-users] Re: Minified JavaScript in Production

2011-01-10 Thread Felix E. Klee
On Sun, Jan 9, 2011 at 7:51 PM, Tom Boutell wrote: > Apostrophe (a CMS plugin for Symfony, among other things) includes a > minifier for JS and CSS which is integrated into Symfony so that > whatever you have in view.yml, etc. will wind up as part of the > minified bundle. Sounds good - thanks fo

[symfony-users] Minified JavaScript in Production

2011-01-09 Thread Felix E. Klee
I want to compile a bunch of JavaScript files into one minified file, for example with Google's Closure Compiler: http://code.google.com/closure/compiler/ That's for production. In development mode, however, I would like to work with the original JavaScript files. What is the recommended strat

Re: [symfony-users] Elegantly Load Dynamically Created JavaScript?

2010-12-30 Thread Felix E. Klee
On Thu, Dec 30, 2010 at 12:56 AM, Андрей Дягель wrote: > That's exactly what use_dynamic_javascript() helper was created for. Thanks! In "indexSuccess.php" I now simply do: use_dynamic_javascript('main/index') -- If you want to report a vulnerability issue on symfony, please send it to secu

[symfony-users] Elegantly Load Dynamically Created JavaScript?

2010-12-29 Thread Felix E. Klee
Following the suggestion from the Jobeet tutorial, I set up "JavaScript as an Action": http://www.symfony-project.org/jobeet/1_4/Propel/en/18 #chapter_18_user_feedback> Now, I have a dynamically created JavaScript file accessible via: /main/index.js Works fine. Though I wonder: How do I *e

[symfony-users] Propel clob: NULL instead of empty string

2010-12-21 Thread Felix E. Klee
Excerpt from the schema file (Symfony 1.1): response: { type: clob, default: '' } The problem: When a record is created with "save()", the field "response" always has the value NULL. Calling "setResponse('')" before "save()" make no difference. Is this a known problem with Propel/Symfony? (ye

Re: [symfony-users] Re: Different format for :sf_culture

2010-12-10 Thread Felix E. Klee
Hi Jamie! On Fri, Dec 10, 2010 at 1:45 PM, Flukey wrote: > As far as I'm aware if you use example.com/es symfony should > automatically look for the messages.es.xml file. Thanks for pointing that out. However, we need it to somehow redirect to: es_ES With modrewrite this should be no problem, b

[symfony-users] Different format for :sf_culture

2010-12-10 Thread Felix E. Klee
_ES") Now this can be achieved easily with modrewrite. Is that the way to go? Or is there an easy alternative with Symfony routing, at least for case 1? Felix -- Dipl.-Phys. Felix E. Klee Mobile: +34.693759173, +49.174.1386060 Fax: +49.3212.1021049 -- If you want to report a vulnerability i

Re: [symfony-users] Re: we check if the .html version is here (caching)

2010-11-30 Thread Felix E. Klee
On Mon, Nov 29, 2010 at 1:22 PM, pghoratiu wrote: > I think that the sfSuperCache plugin was doing this at one time during > Symfony 1.0, I'm not aware of any plugins doing this for Symfony 1.4 Thanks for the clarification, Gabriel! I now simply discarded that code block. - Felix -- If you wan

[symfony-users] we check if the .html version is here (caching)

2010-11-29 Thread Felix E. Klee
In the default ".htaccess" in Symfony 1.4, the following code block can be found: # we check if the .html version is here (caching) RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f What cache is the comment referring to? Is Symfony ever c

Re: [symfony-users] Where to Put Non-Standard Data-Files, Scripts?

2010-11-23 Thread Felix E. Klee
On Sun, Nov 21, 2010 at 12:28 AM, Alexandre Salomé wrote: > You should create a symfony task, usable this way : > > ./symfony cities-csv-import path/to/file > > [...] > > ./symfony cities.. --from 0 --to 5000 file.Csv Thanks for the suggestions, Alexandr! Importing without a detour via SQL ma

[symfony-users] Where to Put Non-Standard Data-Files, Scripts?

2010-11-20 Thread Felix E. Klee
best integrate into the Symfony project: conversion from CSV and uploading of the SQL data? We use: Symfony Version 1.1 (to be updated to 1.4) with Propel -- Dipl.-Phys. Felix E. Klee Mobile: +34.693759173, +49.174.1386060 Fax: +49.3212.1021049 -- If you want to report a vulnerability i

[symfony-users] Re: I18N: Why Underscore?

2010-11-12 Thread Felix E. Klee
On Fri, Nov 12, 2010 at 2:05 PM, Felix E. Klee wrote: > I am working on an old Symfony 1.1 project [1], and I noticed a > weirdness with I18N. It seems like the previous team working on the code hacked the original Symfony 1.1.1 code, not even documenting that - great... -- If you w

Re: [symfony-users] I18N: Why Underscore?

2010-11-12 Thread Felix E. Klee
On Fri, Nov 12, 2010 at 2:07 PM, Stéphane wrote: > echo __('Home') ? Did you actually read my message? -- 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 "symfon

[symfony-users] I18N: Why Underscore?

2010-11-12 Thread Felix E. Klee
I am working on an old Symfony 1.1 project [1], and I noticed a weirdness with I18N. There is the following code in a PHP file, in a partial template of the "frontend/main" module: __('House') In the translation file, there is: House Casa However, this translation does *not* ge

[symfony-users] Re: Countries and their Continents?

2010-10-18 Thread Felix E. Klee
On Fri, Oct 15, 2010 at 7:03 PM, Felix E. Klee wrote: > My idea, so far, is to feed the first two columns of the following list > in the MySQL database associated with the app: > >  http://en.wikipedia.org/wiki/List_of_soveriegn_states_and_depende >  nt_territories_by_continent_(d

[symfony-users] Countries and their Continents?

2010-10-15 Thread Felix E. Klee
In a Symfony 1.1 app [1], I need to check what continent a country belongs to. Unfortunately, "sfCultureInfo" doesn't contain that information. What may be the simplest solution? My idea, so far, is to feed the first two columns of the following list in the MySQL database associated with the app:

[symfony-users] Re: Unwanted /www/web in URL

2010-10-12 Thread Felix E. Klee
I have now done a test with the Jobeet example, Symfony 1.4, again with ".htaccess". See details below. The test URL associated with "htdocs": http://127.0.0.1:8081 Now, when I visit that URL, then I see the Jobeet index page. The URL does not change. That's perfect! However, all the links on

[symfony-users] Can Symfony strip comments?

2010-10-11 Thread Felix E. Klee
Can Symfony automatically strip comments when serving HTML files? Or is it better to use PHP comments for documenting code? Actually, the following is quite short and readable, and does the trick: Still, I'm curious... -- If you want to report a vulnerability issue on symfony, please send i

Re: [symfony-users] Unwanted /www/web in URL

2010-10-11 Thread Felix E. Klee
On Mon, Oct 11, 2010 at 6:04 AM, Eno wrote: > Maybe update the RewriteBase line in the .htaccess ? Tried that already, but it didn't have an effect. By the way, the problem does not seem to be related to the ".htaccess" that is used. When I access a static resource, such as

[symfony-users] Unwanted /www/web in URL

2010-10-10 Thread Felix E. Klee
I just moved a legacy Symfony 1.1.1 project from the document root into a subdirectory "www". And I changed the file ".htaccess" in the document root as follows. From: RewriteRule !^web/ web%{REQUEST_URI} To: RewriteRule !^www/web/ www/web%{REQUEST_URI} Now everything works fine, except th

[symfony-users] Re: Deploy to Same Server?

2010-09-20 Thread Felix E. Klee
On Sep 20, 9:32 pm, "Felix E. Klee" wrote: > Is it possible to disable SSH in "properties.ini"? Just looked at the source, and the answer is no. Of course, I could try defining some alias for "ssh", but that would not be a robust solution. So, I'll just st

[symfony-users] Deploy to Same Server?

2010-09-20 Thread Felix E. Klee
Is it possible to disable SSH in "properties.ini"? In the environment where I'm working, the production site is just in another directory. Same server, same user. Not optimal, I know. Could not find any exhaustive documentation for "properties.ini". -- If you want to report a vulnerability issu

[symfony-users] Setting up a Staging Environment - Suggestions?

2010-09-14 Thread Felix E. Klee
I am looking for a simple way to setup a staging environment with Symfony 1.4. It will run on the production server. Not optimal, for sure. But, at the moment, unavoidable. Any suggestions on setting up a staging server in a smart way? What comes into my mind: * Set up a staging database. * Set

Re: [symfony-users] The module and action names are not present in the internal URI?

2010-09-13 Thread Felix E. Klee
Shouldn't the documentation then read as follows? the module and action names may be omitted in the internal URI, if hardcoded in routing.yml -- 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 a

Re: [symfony-users] Re: Tabs in Auto-Generated Code

2010-09-13 Thread Felix E. Klee
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 unsubscrib

[symfony-users] The module and action names are not present in the internal URI?

2010-09-13 Thread Felix E. Klee
In "Practical symfony" for Propel, it says: The /job/show/id/1 URL can be created from a template by using the following call to the url_for() helper: url_for('job/show?id='.$job->getId()) You can also use the route name by prefixing it by @: url_for('@default?module=job&action=sh

Re: [symfony-users] Re: Tabs in Auto-Generated Code

2010-09-13 Thread Felix E. Klee
On Sun, Sep 12, 2010 at 2:20 PM, Davide Borsatto wrote: > Which generated file are you referring to? It may be a Propel or > Doctrine issue. The tabs are indeed in the model files, auto generated by Propel 1.4.2. Thanks for pointing me in the right direction. Now it would be nice if Propel could

[symfony-users] Tabs in Auto-Generated Code

2010-09-12 Thread Felix E. Klee
In the Symfony coding standards, it says: Never use tabulations in the code. Source: http://trac.symfony-project.org/wiki/HowToContributeToSymfony#CodingStandards However, some of the PHP code auto-generated by Symfony 1.4, does use tabs. How is that justified? -- If you want to report a vu

[symfony-users] Windows: Paths with Spaces?

2010-09-02 Thread Felix E. Klee
In the book "Practical symfony", it says: Windows users are advised to run symfony and to setup their new project in a path which contains no spaces. Avoid using the Documents and Settings directory, including anywhere under My Documents That's quite a limitation. A workaround may be using NTFS j