[symfony-users] Permalink route

2010-08-15 Thread Arnau Alcázar Lleopart
Hi everybody, I've got urls like http://example.com/browse/one/two and I have creayed a route where url is /browse/:permalink The problem is this route is only selected when there is only one name after browse (browse/one). How cab I solve it? Thank you in advance! -- If you want to report a

[symfony-users] Re: Symfony 1.4-compatible minifier for Symfony now included in Apostrophe, can be used in any Symfony project

2010-08-15 Thread Tom Boutell
The cached versions are removed by 'symfony cc' and subsequently regenerated by the next request. They are files in the web/uploads/ asset-cache folder, so they are not cached by the browser any more or less aggressively than the original files in web/css, web/ apostrophePlugin/css, etc. would be.

[symfony-users] Re: Permalink route

2010-08-15 Thread Tom Ptacnik
/browse/:permalink/* or /browse/* or something like that ;) On 15 srp, 00:05, Arnau Alcázar Lleopart ar...@alcalleop.net wrote: Hi everybody, I've got urls likehttp://example.com/browse/one/twoand I have creayed a route where url is /browse/:permalink The problem is this route is only

[symfony-users] Symfony2 - error with validator

2010-08-15 Thread roydon
i'm using a modified symfony-sandbox. I made a simple application(myapp) with simple entity. everything is working fine while i'm online. When on offline it produce this error: Warning: DOMDocument::schemaValidate(): php_network_getaddresses: getaddrinfo failed: Name or service not known in

[symfony-users] Re: Symfony2 - error with validator

2010-08-15 Thread roydon
On Aug 15, 7:40 pm, roydon roydonsthara...@gmail.com wrote: i'm using a modified symfony-sandbox. I made a simple application(myapp) with simple entity. everything is working fine while i'm online. When on offline it produce this error: Warning: DOMDocument::schemaValidate():

[symfony-users] Re: Symfony 1.4-compatible minifier for Symfony now included in Apostrophe, can be used in any Symfony project

2010-08-15 Thread Johannes
I'm wondering what is going to happen in the following use case: You got two pages A and B. - Page A uses script C (10kb), and script D (20kb) - Page B uses script D (20 kb), and script E (1kb) Do you generate two different files for each page, or do you have any heuristics to decide when to

Re: [symfony-users] retrieving sfuser in the model

2010-08-15 Thread Nibsirahsieu
Have a look at this tutorial.. http://prendreuncafe.com/blog/post/2010/02/17/User-Dependant-Forms-with-Symfony http://prendreuncafe.com/blog/post/2010/02/17/User-Dependant-Forms-with-Symfony On Sun, Aug 15, 2010 at 10:20 PM, Cosimo Zecchi c.zec...@gmail.com wrote: Hi all. I'd like to use the

[symfony-users] Re: Tuto Jobeet

2010-08-15 Thread Seb
Thanks to 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

[symfony-users] 1.4 - Action/template for one model with form for another

2010-08-15 Thread Gabriel Comeau
Hello all, I'm fairly new to to Symfony and have a structural question of sorts. I have a problem with a few ideas of how to solve, but they don't seem very elegant and I'm looking to hear from someone more experienced with the framework who can point me in the direction of a cleaner solution.

[symfony-users] Re: [DI] How can I put data into getFooService?

2010-08-15 Thread Константин
Yes, it similar to factory. Constructor of Translate class receive 2 args: DriverInstance (wich inject via container) and namespace (I may convey it) On 14 авг, 15:20, Fabien Potencier fabien.potenc...@symfony- project.com wrote: On 8/14/10 9:39 AM, Константин wrote: I need send data to some

Re: [symfony-users] Re: How i can implement this with sfGuard plugin

2010-08-15 Thread Alexandre Salomé
getGuardUser() can return a null value. Take care of it. Using a method on the table is smartest (I think) : Doctrine::getTable('Jobs')-findByAuthor($this-getUser()-getGuardUser()); 2010/8/14 Alan Bem alan@gmail.com Wouldn't it be better? $this-getUser()-getGuardUser()-getJobs()? You

[symfony-users] Re: Symfony 1.4-compatible minifier for Symfony now included in Apostrophe, can be used in any Symfony project

2010-08-15 Thread pghoratiu
It might be worthwhile to take things a step further by versioning them in the URL so that they can be given an infinite cache expiration date, although this requires a database hit or perhaps a glob call when outputting the pages that contain them. The code is a big step forward as-is if you

Re: [symfony-users] 1.4 - Action/template for one model with form for another

2010-08-15 Thread Alexandre Salomé
Create a component. In your product template : ?php if ($product-canBeAlerted()): ? ?php include_component('product', 'alert', array('product_id' = $productId)); ? ?php endif ? Create your component in components.class.php, with your code : ?php class productComponents extends sfComponents {

[symfony-users] Trying to create a patch. What should be my first step(s) ?

2010-08-15 Thread Javier Garcia
Hi, i created this ticked some days ago. http://trac.symfony-project.org/ticket/8922#preview I'm interested in creating a patch (if possible). I dont have experience debugging (just using var_dump). What should be my first step(s) ? Javi Ubuntu 8.04 -- If you want to report a

[symfony-users] Re: retrieving sfuser in the model

2010-08-15 Thread cosmy
Wow! thank you very much. I'll try this way On 15 Ago, 17:22, Nibsirahsieu nibsirahs...@gmail.com wrote: Have a look at this tutorial.. http://prendreuncafe.com/blog/post/2010/02/17/User-Dependant-Forms-wi... http://prendreuncafe.com/blog/post/2010/02/17/User-Dependant-Forms-wi... On Sun,

[symfony-users] Re: sfDoctrineGuardPlugin: get a 401 response code on non GET unauthorized request?

2010-08-15 Thread wodzik
Hi, got the same problem in sfDoctrineGuardPlugin is problem with this. I resolve this like that... if ($request-isMethod('post') $request- hasParameter('signin')) { // some code } else { if ($request-isXmlHttpRequest()) { $this-setLayout(null);

Re: [symfony-users] Re: sfDoctrineGuardPlugin: get a 401 response code on non GET unauthorized request?

2010-08-15 Thread Gustavo Adrian
Thanks for your answer! I thought on using the way you suggest. I could use a custom action and then inherit from it on my module actions. In the preExecute do some check like the one you suggest and just set the response code to 401 (in my case I just need that). But I was thinking on just change

Re: [symfony-users] Re: sfDoctrineGuardPlugin: get a 401 response code on non GET unauthorized request?

2010-08-15 Thread Gustavo Adrian
BTW, I fixed just creating the sfGuardAuth module on my app and using this code on the preExecute: require_once( sfConfig::get( 'sf_plugins_dir' ).'/sfDoctrineGuardPlugin/modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php' ); class sfGuardAuthActions extends BasesfGuardAuthActions

Re: [symfony-users] Re: [DI] How can I put data into getFooService?

2010-08-15 Thread Alexandre Salomé
I'm preparing an article, but there's one thing I really don't understand : Why do you want to get the whole container ? Target of DI is to inject n services in your custom service, not to inject the container (equals to universe) in your service. Why have you choose such a solution ? Why does

Re: [symfony-users] Re: [DI] How can I put data into getFooService?

2010-08-15 Thread Alexandre Salomé
The article is about dependency injection, and there's a chapter sfContext has changed to a Container. I'm afraid of usages that could be made of it. What are master rules about DI ? 2010/8/15 Alexandre Salomé alexandre.sal...@gmail.com I'm preparing an article, but there's one thing I really

[symfony-users] Yaml and html tags

2010-08-15 Thread Reo
Hi, I was wondering if it is possible to put some HTML tags in YAML files. Exemple: job: title: my job description: Cooker, i can find more information at : a href=a_website.commy_website.com/a. (Here, title and description are both string type). When i'm doing that, i get the full

[symfony-users] Base URL

2010-08-15 Thread Joshua Estes
I have a few different projects that are in sub directories. I'm trying to generate a url with an image in it. So the base url would be http://www.site.com/project/web The image is in the sf_upload_dir (http://www.site.com/project/web/uploads/image.png) How do I get the base URL with no script

[symfony-users] Re: Base URL

2010-08-15 Thread f1gm3nt
var_dump(sfContext::getInstance()-getRequest()- getUriPrefix(),sfContext::getInstance()-getRequest()- getRelativeUrlRoot()); string 'http://localhost' string '/project/trunk/web' $uri = sfContext::getInstance()-getRequest()- getUriPrefix().sfContext::getInstance()-getRequest()-