symfony

Sql query (inner join + count + group by) using Propel

I want to show the number of comments for each blog post (along with category, date, author etc) on a page that has a list of blog posts. How do i write the following mysql query in propel? SELECT post.id, post.title, post.more_columns , COUNT(comments.post_id) AS numofcomments FROM post INNER JOIN comments ON post.id = comments.post_id...

How can I get Javascript to work within Prototype AJAX Request

I'm trying to pull in HTML/Javascript from an external PHP page using Prototype/AJAX, and the HTML renders fine, but the Javascript doesn't work after the AJAX request. I'm also showing a loading bar while the page loads the data, and this part works fine. My Symfony PHP + Prototype code is below. Any advice that might put me in the rig...

What is the function for moving local files in Symfony?

Example, move /var/www/1.jpg to /var/www/aaa/1.jpg ...

Which unit testing framework do you use for Symfony?

Which unit testing framework do you use for Symfony? Lime or PHPUnit? What are the pros and cons of using them? ...

symfony vs cakephp

What is conceptually the difference between symfony and cakephp? ...

which is the best PHP framework to use for large scale web applications

We need to build a large scale web application (say... a CRM or Learning Management Systems). We plan to do it using the LAMP stack and we are still researching on as to which Framework to use. We have mainly 3 frameworks: Codeigniter Symfony Yiiframework Can anyone suggest which is the best one to choose among these? ...

Template not found in action method after calling a library method in symfony

Hi, I'm calling a method of a library that I've created in symfony 1.2. If I don't call the library method in the action method, then the method in the action class works as it should, and it finds the template. But, if I call the library method in the action class, symfony tells me that it cannot find the template associated to the acti...

Select multiple options by default using object_select_tag

I am running Symfony 1.2 and utilizing the object helper to create some inline editable fields outside of a form. Because there is no symfony or scriptalicious short cut to create an inline edit tag for multiple choice select boxes (much like input_in_place_editor_tag or Ajax.InPlaceCollectionEditor), I am using object_select_tag with t...

Filter content in Symfony 1.2.x admin generator?

I have a Symfony 1.2.7 application where 3 different sites coexist in the same database. All content has a foreign key, 'site_id', that says which site it belongs to. In my generated admin interface I want to be able to show content from the currently selected site (actually set using a filter class, based on the domain used to access t...

Calling Symfony Phing Build Targets - Custom Taskdef or Call the Symfony target directly?

I was just setting up a Phing build.xml file for a Symfony 1.2 application and came across the need to call the symfony propel init tasks. <!-- build symfony generated libs --> <!-- TODO: what about calling these from their respective buildfiles? --> <exec command="/usr/bin/symfony propel:build-model" dir="${build.dir}" passthru="true" ...

How to allow certain HTML tags in a form field in Symfony 1.2

I'm playing around with Symfony and have encountered a road block. I created a model "CmsPage" which has a field called "content" which is stored as a clob (this is specific to doctrine I believe). When I created the app I set "--escaping-strategy=on" so if I enter any html when editing a CmsPage that gets encoded with html entities or...

How to encrypt database in symfony

I work with symfony framework and Propel and i was wandering what is the easiest way to encrypt a database. I'm not talking about passwords but all the database . I built a small web application for a client that manages some information (user accounts, passwords etc) and i don;t want it to be visible if someone has access to phpmyadmin ...

Clearing Symfony cache for another application

I would like to clear my frontend application's cache from an action in my backend application. How can I achieve this? ...

Symfony Propel: Join Query Across different Database

I have two tables that should be joined together by a foreign key relationship, unfortunately they are separate into two different database. My question is that is it possible for me to create a Criteria thingy that allows me to create cross database join query? ...

Django-like framework on Ruby?

Django as a framework is a neat little package. There are very few files (compared to Rails) and it's got a clean structure. The fact that you can plug and unplug apps between different projects is an extremely nifty feature. At the same time, Ruby's hacking ability is unparalleled. It's complete object-orientedness makes it more express...

Saving a symfony checkbox list

If you create a checkbox list in symfony 1.2 you get an array with the checked options back in the form. If you save the form, your database now contains the words "Array". Is there a way around this? Or should I just json_encode / json_decode the array as ncecessary and save it manually? Seems awfully tedious. Thanks for reading. ...

Url Routing Problem in Php Symfony 1.2 Framework

i have started to learn symfony framework by reading joobet-propel book.i was in URL Routing chapter ,i tried every sample in my sample application.But it gives me error. Compeletely My issue: a small part of routing.yml file: bookmark_deneme_user: url: /post/:title_slug/:id/:summary_slug class: sfPropelRoute options:...

Symfony - task - working with options

Is anywhere written( tutorial or documentation ) how work properly with options in custom symfony task? class mloMaintainceTask extends sfBaseTask { protected function configure() { // ... $this->setOptions(array( new sfCommandOption('mloOption'); )); } private function method3() { return $this->getOptio...

How to solve the "error 500" issue of Symfony PHP framework with Webkit browsers?

Hi there, I'm having an issue with the visualization of my site on Google Chrome and Safari (both using Webkit rendering engine), the site is built upon Symfony framework, version 1.1 (unmaintained version). When navigating to the site, this shows an error 500 when loading a page, I read somewhere that it might be related to Symfony cac...

Javascript acting differently on different hosts

I'm using Lightwindow v2 in a Symfony project to create a modal window (here is the plugin I'm using). The modal window works perfectly on my local wamp server. But when I access the page from my remote AWS server, the "greyed out" background element of the lightwindow is too short--it covers the part of the screen that is initially vis...