Two symfony routes with same url?
Is it possible two have to symfony routes (sfDoctrineRoute) with same url ( /:sf_culture/:slug/), but different model? ...
Is it possible two have to symfony routes (sfDoctrineRoute) with same url ( /:sf_culture/:slug/), but different model? ...
Hi, I have this query inside a method: public static function pincopalla(){ $con = Propel::getConnection(SediI18nPeer::DATABASE_NAME); $sql = "select * from sedii18n where culture = :country UNION select * from sedii18n where culture <> :country"; $stmt = $con->prepare($sql); $result = $stmt->execute(a...
sfValidatorChoice is not working on multiple select element, my code $this->form=new MyTestForm(); $options_array=array("php","python","java"); $widgetSchema["my_select"] =new sfWidgetFormChoice(array('choices' => $options_array,'multiple' => true,'expanded' => true )); $validatorSchema["my_select"] = new sfValidatorCh...
I don't develop with symphony but need to update the database connection details for a couple websites developed by third parties running it. They appear to make use of propel. I've updated the dsn in database.yml but this has just taken the site offline (500 error) Any idea what I might have done wrong or may need to do to force the ...
I'm doing a blog engine using symfony as a learning exercice. How do I get the list of tags from the id of a blog post ? Here's the database shema : I added the following in the model : public static function getTags($id) { return Doctrine_Core::getTable('Tag') ->createQuery('t') ->select('t.name, t.slug') ->leftJoin('t...
Well I was developing an application usin Symfony 1.4 and Doctrine when I realized a major drawback on my Zend Lucene implementation. I have a model called Publication that is related (via foreign key relations) with a few other models (subjects, genres, languages, authors, etc.) and I'm getting they're names when adding a new document ...
Hi everyone! I'm trying to set a different template for components/partials, but nothing works. Here is the problem, the pattern is in another folder, not a folder module. Can I somehow set the template for a component/partial from another folder? ...
Suppose there is a call to get Analytics data from a third party or through our cache data on a server, for the "most popular items", and we show these items' names on all of our pages, should we put this code in Model, Controller, or View (Helper) component? Maybe it is not strictly Model, because it is not directly in our data store. ...
Let's consider the following simple schema (in Doctrine, but Propel users are welcome too): User: columns: name: string Article: columns: user_id: integer content: string relations: User: local: user_id foreign: id Now, if you create a route for Article model and generate a module via doctrine:generat...
Hi, i have this schema and fixtures: sedi: _attributes: { isI18N: true, i18nTable: sediI18n } id: ~ sediI18n: id: { type: integer, required: true, primaryKey: true, foreignTable: sedi, foreignReference: id } culture: { isCulture: true, type: varchar, size: 7, required: true, primaryKey: true } paes...
Hi, I have this: SediI18n: XXXXXX: { id: sede_foo_1, culture: it, paese_indirizzo: it, ufficio: "Ufficio di XXX 1", indirizzo: "Foo Bar FooBar" } Now, when i prints this register the field "indirizzo": Foo Bar FooBar Everything is in one line. Any way to write the value of "indirizzo" to print directly in my web page some...
Hi, i have retrieved a group of elements using a propel criteria. Now are at $Sedi18ns When i use this: $SediI18ns->prev() I get: ( ! ) Fatal error: Call to undefined method sfOutputEscaperArrayDecorator::prev() No problems when i use next(). Any idea? Regards Javi ...
Hi, I have some code that retrieves the production URL and check some staff. Im prefer to work in the dev invoroment so I have to write in my code something like this <?php if(sfConfig::get('sf_environment') == 'dev'): ?> <?php $url = "http://www.mysite.com/foobar" ?> <?php else: ?> <?php $url = $sf_request->getUri() ?> <?php endif; ?...
I'm having a little problem with a tables that are using the i18n behaviour on a Symfony 1.4 project that I'm developing. For example on the following model defined on YAML (I have others that follow the same pattern): Subject: actAs: Timestampable: ~ I18n: fields: [name] columns: name: { type: string(255), notnull...
I am writing a functional test for a page that requires user authentication. I am using the sfDoctrineGuard plugin. How do I authenticate a user in my test? Do I have to enter every test through the sign in screen? Here is my incorrect code: $b->post('/sfGuardAuth/signin', array('signin[password]' => 'password', '...
Possible Duplicate: CMS: Build or Buy? I'm in the same boat as a lot of other folks. Trying to decide between two competing vendor's solutions for my company (build vs. buy, basically). I won't be coding it myself, we'll be hiring one of the two firms. It'll be a total bottom-to-top rebuild of a magazine-style site with regu...
Hello, i want to output an array containing numbers. I'm creating the array like this (it recieved the statistics for the last 7 days) : <?php public function getStatisticsTeams() { $tab = array(); for($i=7;$i=0;$i--) { $q = Doctrine_Query::create() ->from('stJob j') ->where('j.created_at = ?', date('Y-m-d h:i:s...
Hi, I am using Symfony 1.3 and I have the following problem: I need a url in this format www.domain.com/folder (no suffix) however the application sets the default suffix to be .html Is there a way to override the global suffix in the routing.yml file? I could use mod_rewrite but I would like this link to be able to work without relying ...
Hey Guys, i have a Problem building a Web Spider in PHP, which is able to crawl hundreds of websites. I tried several approaches...one with the snoopy browser class, one with Simple HTML DOM Parser and one with the sfWebBrowserPlugin for Symfony. I run into the same problem with all aproaches. My crawler crawls a site in 3 stages...cate...
Hello, i'm using form filtering to filter data in the frontend. The problem is that the URL is ugly http://............./players/game/?st_player_cv_filters[location_id]=1&st_player_cv_filters[plateforme_id]=3&st_player_cv_filters[level_id]=3&st_player_cv_filters[_csrf_token]=023c5c9fb5fc7e7b6ed60d6839c36f67 (form rende...