[symfony-users] perform global logic check in admin rather than in each action

2010-10-24 Thread Joshua
I have an admin application with various modules set up. In one of the
modules a user can schedule an "import" can often take a considerable
amount of time to complete. While the import is running, no changes
should be made to the database.

I'm looking for a solution to lock down the admin while the import is
running. I want to prevent any modules from making admin changes
through the forms. How can I insert a global logic check to see if an
import is running? The alternative would be to have the code for the
logic check in every module action, which is not preferable. The only
other way I can think of is to put the code in the layout, but you're
not supposed to run queries from the templates.

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] perform symfony task function in module action

2010-10-18 Thread Joshua
I'm using Symfony's Tasks to run cronjobs at periodic times. There is
a need to perform the same functions manually in the admin
application. Looking for suggestions how to do this properly.
Obviously, I would prefer not to have duplicate code, one in the Task
class and one in the Action class. Please and thank 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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] code execution in action vs lib model

2010-09-09 Thread Joshua
Any help appreciated. There are no errors anywhere in these processes.
Permissions are correct.


In the action, the file is downloaded:
  public function executeDownloadfile(sfWebRequest $request)
  {
//download feed file
$connection = ssh2_connect($ftp_server, 22);
ssh2_auth_password($connection, 'user', 'password');
ssh2_scp_recv($connection, $filename, $path.$local_filename);

  }

Using the way below, the file is not downloaded. However, if I "exit;"
in the getFile() function then the file is downloaded. WTF?

In the action

  public function executeDownloadfile(sfWebRequest $request)
  {
$category = CategoryPeer::retrieveByPk($request->getParameter('id'));
$category->getFile();
  }

lib/model

class Category extends BaseCategory
{
public function getFile()
{
//download feed file
$connection = ssh2_connect($ftp_server, 22);
ssh2_auth_password($connection, 'user', 'password');
ssh2_scp_recv($connection, $filename, $path.$local_filename);

//exit; //uncommenting this will successfully download the file
}
}

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: organizing partials in folders

2010-08-26 Thread Joshua
Or just not use the include_partial function at all and handle all
partials as normal php include() files. Its actually easier because I
don't have to pass a specific array of variables.

On Aug 24, 2:30 pm, James Cauwelier  wrote:
> You can support it yourself:
>
> 1. Disable standard Partial helper in the settings.yml
> 2. Copy the partial helper from the symfony lib and adjust to suit
> your needs.  You will probably want to create a new view class that
> inherits from sfParialView
>
> Good luck with it...
>
> James
>
> On Aug 24, 6:06 pm,Joshua wrote:
>
> > Thanks Alex. I have tried all ways to pass the include path. I think
> > now Symfony does not support partials in folders. This is very dumb
> > and a big problem for Symfony. It should be supported.
>
> > On Aug 21, 5:57 am, Alexandre Salomé 
> > wrote:
>
> > >   He is looking for a module "folder". Try setting explicitly your module 
> > > :
>
> > > include_partial('my_module/folder/headline_news');
>
> > > But (maybe) you will have to put _ on folders :
>
> > > /modules/my_module/templates/_folder/headline_new
>
> > > Alex'
>
> > > Le 19/08/10 22:24,Joshuaa crit :
>
> > > > include_partial("headline_news");
>
> > > > How can I do this with partial _headline_news.php inside a folder
> > > > within templates? If I try something like
> > > > project_root/apps/frontend/modules/some_module/templates/folder/
> > > > _headline_news.php
>
> > > > Then in the template index
> > > > include_partial("folder/headline_news");
>
> > > > The template "_headline_news.php" does not exist or is unreadable in
> > > > "".
>
> > > > Am I using the wrong approach? I have symfony managing two separate
> > > > site templates that will each have separate partials. But the same
> > > > actions are used for each template. I need a way to organize all the
> > > > files in the module /template folder.
>
> > > --
> > > Alexandre Salom -http://alexandre.salome.fr

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: organizing partials in folders

2010-08-24 Thread Joshua
Thanks Alex. I have tried all ways to pass the include path. I think
now Symfony does not support partials in folders. This is very dumb
and a big problem for Symfony. It should be supported.


On Aug 21, 5:57 am, Alexandre Salomé 
wrote:
>   He is looking for a module "folder". Try setting explicitly your module :
>
> include_partial('my_module/folder/headline_news');
>
> But (maybe) you will have to put _ on folders :
>
> /modules/my_module/templates/_folder/headline_new
>
> Alex'
>
> Le 19/08/10 22:24,Joshuaa crit :
>
>
>
> > include_partial("headline_news");
>
> > How can I do this with partial _headline_news.php inside a folder
> > within templates? If I try something like
> > project_root/apps/frontend/modules/some_module/templates/folder/
> > _headline_news.php
>
> > Then in the template index
> > include_partial("folder/headline_news");
>
> > The template "_headline_news.php" does not exist or is unreadable in
> > "".
>
> > Am I using the wrong approach? I have symfony managing two separate
> > site templates that will each have separate partials. But the same
> > actions are used for each template. I need a way to organize all the
> > files in the module /template folder.
>
> --
> Alexandre Salom -http://alexandre.salome.fr

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] organizing partials in folders

2010-08-19 Thread Joshua
include_partial("headline_news");

How can I do this with partial _headline_news.php inside a folder
within templates? If I try something like
project_root/apps/frontend/modules/some_module/templates/folder/
_headline_news.php

Then in the template index
include_partial("folder/headline_news");

The template "_headline_news.php" does not exist or is unreadable in
"".

Am I using the wrong approach? I have symfony managing two separate
site templates that will each have separate partials. But the same
actions are used for each template. I need a way to organize all the
files in the module /template folder.

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Ajax Forms

2010-08-17 Thread Joshua Estes
A picture is worth a thousand words, so I attached one.

My idea is to create an Ajax form. As you can see from the image this
is a very basic form. The one I will make would be slightly more
complex. The code is all in the filter forms. What I am wanting to do
with this is each group, users will be able to add more fields to the
filter form. Right now I'm using the "groups" as embedded forms. I
want the "add another field" to do an ajax call and just render
another widget that is a dropdown/text area.

I've started off with creating my own widgetFormSchemaFormatter, but
the uri that I set for the call back is the own on the main form and
not the embedded form. Any ideas on some other ways I can go about
doing this? I assumed this would be fairly easy and straight forward,
but I keep running into issues. Anyone ever tried this before?

Thanks
f1g

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
<>

[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 name? ie
http://www.site.com/project/web

Thanks,
f1g

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] suffix to links on page

2010-08-03 Thread Joshua Estes
Check out the routes documentation. If I understand your correctly,
you would need to add a route like

computers:
  url: /computes/:page/*

the use link_to('Page 8','@computers?page=8&q=blah')

That should give you the link you need. Haven't looked up the info,
but that should point you in the right direction.


- Joshua Estes

-= Contact Me =-
Google Voice: 567-482-0034 or JOSHUA-0034
Cell:               423-432-7562

-= Web Sites =-
http://www.ScenicCityLabs.com - Making the internet pretty!

-= Twitter =-
@JoshuaEstes
@ScenicCityLabs



On Tue, Aug 3, 2010 at 9:01 AM, RaV  wrote:
> Hi again,
>
> is there any possibility to add const suffix to all of links on my page?
> For example i have link like this:
>
> http://myapp/1,computers?q=search_text , where 1 means the first page
>
> and.. while i'm using link_to in template to build links for change sort
> order or order column or something like this, i have to add suffix
> "?q=".$search_text.
>
> Is there any possibility to add it automatically?
>
> Rafał Bednarz
>
>
> --
> 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 unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Symfony 1.4 and PayPal

2010-08-03 Thread Joshua Estes
You would need to create a custom module/action for your project,
(suggest that you do this all as plugin for reuse with other projects
you do) and then point the form action to the module/action, i.e.:
url_for('module/action')

- Joshua Estes

-= Contact Me =-
Google Voice: 567-482-0034 or JOSHUA-0034
Cell:               423-432-7562

-= Web Sites =-
http://www.ScenicCityLabs.com - Making the internet pretty!

-= Twitter =-
@JoshuaEstes
@ScenicCityLabs



On Mon, Aug 2, 2010 at 9:11 PM, Diego Bello  wrote:
> Hi guys,
>
> I'm building an e-commerce site with Symfony 1.4. Right now I have the
> shopping cart and I want to do the payment with Paypal. I got the
> expresscheckout.php and paypalfunctions.php files but I don't know where to
> put them.
>
> So far, I have a cart in .../web/frontend.php/cart/show/id/1 and the paypal
> button appears there as shown in the code from the paypal development site:
>
> 
>  src='https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif' border='0'
> align='top' alt='Check out with PayPal'/>
> 
>
> When I click on it, it sends me to
> .../web/frontend.php/cart/show/id/expresscheckout.php
>
> Does anybody knows how should I handle this, or how to use the paypal files?
>
> Regards,
> --
> Diego Bello Carreño
>
> --
> 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 unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] load to include_partial without using action

2010-08-03 Thread Joshua Estes
Look into components. I've done something similar on a few of my web sites.

- Joshua Estes

-= Contact Me =-
Google Voice: 567-482-0034 or JOSHUA-0034
Cell:               423-432-7562

-= Web Sites =-
http://www.ScenicCityLabs.com - Making the internet pretty!

-= Twitter =-
@JoshuaEstes
@ScenicCityLabs



On Sun, Aug 1, 2010 at 6:33 PM, Sela  wrote:
> i want to load stuff to include_partial without actually doing it
> through the action, i thought about doing it as a filter, but can't
> find any thing similar.
> i need that to build a menu which is populated according to the route,
> so for example if the route is /cars it'll retrieve list of cars from
> database and display it in the menu which is defined in the
> include_partial
> what is the best way to do it?
>
> --
> 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 unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: sfDoctrineGuardPlugin doesn't redirect to the referrer page

2010-07-28 Thread Joshua Estes
Yup, that's the setting I was talking about, sorry I didn't look up more
info for you but I'm on my phone so its a little harder ;p

In the code it checks to see if that setting has anything in it. If it does
then it uses the route you entered, if not then it just uses the referrer
page.

On Jul 28, 2010 6:19 PM, "Gustavo Adrian" 
wrote:

Did you set the signin redirect url in file app.yml?

all:
  sf_guard_plugin:
success_signin_url:  @my_route?param=value # the plugin use
the referer as default
success_signout_url: module/action # the plugin use
the referer as default





On Wed, Jul 28, 2010 at 5:10 PM, Javier Garcia 
wrote:
>
> I'm not sure I...

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] sfDoctrineGuardPlugin doesn't redirect to the referrer page

2010-07-27 Thread Joshua Estes
If you have the setting set to redirct to a certain route once user logs in
it will do this.

On Jul 27, 2010 11:15 AM, "Javier Garcia"  wrote:

 Hi,

I have just installed sfDGP and activated the security on my web app so when
i write an URL the authentication form appears.

The problem: after logging the web app is not redirected to the referrer URL
but to the root URL.

These are my steps:

- I call the URL "http://rs3.localhost/frontend_dev.php/usuario";

- The auth form appears.

- If i write var_dump($user->getReferer($request->getReferer())); inside the
signin action this is showed:

"http://rs3.localhost/frontend_dev.php/";

Any idea?

Regards

Javi

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] CCBill or Epoch Plugins

2010-07-24 Thread Joshua Estes
Yeah, I haven't tried any of the payment plugins but I want to build a site
that requires a membership fee/monthly fee.

Do to the nature of the site, it conflicts with paypal tos. :(

On Jul 23, 2010 4:24 PM, "Gustavo Adrian" 
wrote:

I've just seen prestaPaypalPlugin (
http://www.symfony-project.org/plugins/prestaPaypalPlugin) but I didn't try
it.

I'd like to know about this topic too. Any comment about it will be much
appreciated.

On Wed, Jul 21, 2010 at 5:53 PM, f1gm3nt  wrote:

> >
> > Has anyone used any type of payment plugins or has made some type of
> > payment plugins? I haven'...
> --
> 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 unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

 --
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Conditional based redirects

2010-07-23 Thread Joshua Estes
Could you set a user attribute during step 1 and on your last step it checks
for that and sends user to the url?

On Jul 23, 2010 3:49 AM, "Daniel Kucharski"  wrote:

 Hi,



Sometimes I find myself often in a situation where I need to redirect from a
given action based on how the current action was reached.

For example, from a customer list a user can add a customer(which can be a
multiple step form), which will redirect back to the customer list.
However, a customer can also be created through a web dashboard and should
redirect the user after creating the new customer back to the web
dashboard.



Some solutions that came in my mind using Symfonfy capabilities:

-  Encode the call back route in the requested url (eg.
/customer/create?redirect_after_create=dashboard_overview).  However this
means you won’t have any nice urls anymore.

-  Create a new filter and store redirect data in session.  This
will be then used to ‘look back’ where the user came from.



Both are not really easily maintainable and a bit ‘ugly’.  Anyone has any
other solution?





Kind regards,



Daniel





-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Facebook style multi-select widget

2010-07-21 Thread Joshua Estes
Not that I am aware of. The only thing I have seen that comes close to this
is the jquery autocomleter in the form extra plugin. You could modify that
widget to do this. I have done something like this, but it just extends the
widget and adds a delete icon to it.

On Jul 21, 2010 9:20 PM, "Richtermeister"  wrote:

Hi all,

I could use a widget that works just like the "to" field in facebook
messages, where you start typing a name, get an autocomplete list,
pick an item, and said items goes into the field, gets a remove icon,
and you can repeat this process as often as you want.

Does that already exist?

Daniel

--
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] forward404Unless() problem

2010-07-17 Thread Joshua Estes
You should prolly do some validation on "id" and you don't need limit or
order by. You are prolly trying to get something like the title by doing
$this->articles->getTitle() which won't work because you return a doctrine
collection instead of a doctrine record. Check in fetchOne.

In fact you should be and to just do
Doctrine::getTable('Articles')->find($request->getParameter('id') and use
the $this->articles like you want.

On Jul 16, 2010 1:37 PM, "el-sid"  wrote:

Hi,

i am trying to redirect by action when it returns an empty result set
using foward404Unless(). the problem is it doesnt seem to have any
effect. It just brings me a page without the content

in my action i have this

public function executeIndex(sfWebRequest $request) {

   $this->articles = Doctrine_Core::getTable('Articles')-
>getArticles($request->getParameter('id'));

   $this->forward404Unless($this->articles);
   }



this method is retrieved from the table as follows

public function getArticles($id) {

   $q = $this->createQuery('a')
   ->where('a.category_id =?', $id)
   ->orderBy('a.id')
   ->limit('1');

   return $q->execute();
   }

i have a few records in the database that call this method and data is
displayed. but where there is no record, the forward404Unless() method
does not redirect

--
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Show in admin

2010-07-17 Thread Joshua Estes
What do you mean by show? I have never used the jroller theme. I always just
use the default theme.

On Jul 17, 2010 2:47 AM, "sieboje"  wrote:

Hi,

What is the easiest way to create show action and template on the
backend side of application?

I have been using jroller theme for backend application and it provide
show view. Unfortunately that theme have some weakness and I resign
from it. Now I'm using standard admin theme.

Do I have create show action and view manually for every module or
that process can be automated?

Greetings.

--
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Re: how can I get url without parameters in view ?

2010-07-16 Thread Joshua Estes
You can use $sf_request->get('module') and $sf_request->get('action')

Not sure the reason you need to get them in a view, breadcrumbs maybe?

On Jul 16, 2010 8:28 AM, "Eno"  wrote:

On Thu, 15 Jul 2010, alexmm wrote:

> I would like to have universal template for pagintion - so I n...
You can use the name of the route in url_for().

Read this:
http://www.symfony-project.org/gentle-introduction/1_4/en/09-Links-and-the-Routing-System

So if you have a route like:

article:
 url:   /article/read/:id
 param: { module: article, action: read }


You would do something like:

echo url_for('@article?id=' . $id);

Hopefully you're using one of the pager classes for pagination - there's
an example in the Practical symfony book:
http://www.symfony-project.org/jobeet/1_4/Doctrine/en/07#chapter_07_list_pagination


Amazing what you can find simply by reading heh?



--



-- 
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-...

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: using addMeta() for facebook

2010-05-11 Thread Joshua
that was the answer, simple. thank you!

On May 11, 7:22 am, "chane...@gmail.com"  wrote:
> Hi,
>
> I think it is possible to use a slot as a work around for that.
> Do you achieve to find another solution ?
>
> Regards
>
> On May 10, 9:48 pm, Joshua  wrote:
>
>
>
> > I need to include
> >     
> > in the header for the facebook Like button.
>
> > I don't know the page title until after the module action executes.
>
> > The method only accounts for the traditional name and content meta
> > parameters.
> > $this->getResponse()->addMeta('description', 'Finance in France');
>
> > Any ideas?
>
> > --
> > 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 unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://groups.google.com/group/symfony-users?hl=en
>
> --
> 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 unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/symfony-users?hl=en

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] using addMeta() for facebook

2010-05-10 Thread Joshua
I need to include

in the header for the facebook Like button.

I don't know the page title until after the module action executes.

The method only accounts for the traditional name and content meta
parameters.
$this->getResponse()->addMeta('description', 'Finance in France');

Any ideas?

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: doSelect array result converted to ArrayDecorator in template

2010-04-22 Thread Joshua
damnit. Restricted at every turn

Tell you what, run this RE on all your project folders then eat your
hat

find . -name "*Success.php" | xargs grep '*doSelect*' -sl

On Apr 22, 5:31 pm, Jonathan Wage  wrote:
> Hi,
>
> The idea of a MVC is that you don't do any data retrieving or manipulation
> in your templates. You should do this in your controller and pass the value
> you want to your views.
>
> - Jon
>
>
>
> On Thu, Apr 22, 2010 at 5:24 PM, Joshua  wrote:
>
> > symfony version 1.4.4
>
> > In the action class I'm doing
>
> > $this->var = ClassPeer::doSelect($c);
>
> > When I print_r($this->var) it is an array but in the indexSuccess.php
> > template it is
> > sfOutputEscaperArrayDecorator Object
>
> > In the template when I try to
> > unset($var[$x]);
>
> > I get escape error
> > [22-Apr-2010 21:06:49] Cannot unset values.
>
> > WTF?
>
> > --
> > 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 unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
> --
> Jonathan H. Wage (+1 415 992 5468)
> Open Source Software Developer & Evangelist
> sensiolabs.com | jwage.com | doctrine-project.org | symfony-project.org
>
> You should follow me on Twitter:http://www.twitter.com/jwage
>
> You can contact Jonathan about Doctrine, Symfony and Open-Source or for
> training, consulting, application development, or business related questions
> at jonathan.w...@sensio.com
>
> --
> 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 unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/symfony-users?hl=en

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] doSelect array result converted to ArrayDecorator in template

2010-04-22 Thread Joshua

symfony version 1.4.4

In the action class I'm doing

$this->var = ClassPeer::doSelect($c);

When I print_r($this->var) it is an array but in the indexSuccess.php
template it is
sfOutputEscaperArrayDecorator Object

In the template when I try to
unset($var[$x]);

I get escape error
[22-Apr-2010 21:06:49] Cannot unset values.


WTF?

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: organizing partials in folders

2010-04-16 Thread Joshua
god i freaken hate these group nonsense. why can't symfony guys spring
for a real forum?

mistake in directory, should be
project_root/apps/frontend/modules/some_module/templates/folder/
_headline_news.php

On Apr 16, 5:53 pm, Joshua  wrote:
> I'm doing this from a module. I would want the partial directory to be
> something like
> project_root/apps/frontend/modules/templates/folder/_headline_news.php
>
> On Apr 16, 5:51 pm, Joshua  wrote:
>
>
>
> > include_partial("headline_news");
>
> > How can I do this with partial _headline_news.php inside a folder
> > within templates? If I try
> > include_partial("folder/headline_news");
>
> > The template "_headline_news.php" does not exist or is unreadable in
> > "".
>
> > --
> > 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 unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://groups.google.com/group/symfony-users?hl=en
>
> --
> 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 unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/symfony-users?hl=en

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: organizing partials in folders

2010-04-16 Thread Joshua
I'm doing this from a module. I would want the partial directory to be
something like
project_root/apps/frontend/modules/templates/folder/_headline_news.php

On Apr 16, 5:51 pm, Joshua  wrote:
> include_partial("headline_news");
>
> How can I do this with partial _headline_news.php inside a folder
> within templates? If I try
> include_partial("folder/headline_news");
>
> The template "_headline_news.php" does not exist or is unreadable in
> "".
>
> --
> 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 unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/symfony-users?hl=en

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] organizing partials in folders

2010-04-16 Thread Joshua
include_partial("headline_news");

How can I do this with partial _headline_news.php inside a folder
within templates? If I try
include_partial("folder/headline_news");

The template "_headline_news.php" does not exist or is unreadable in
"".

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: ideas for development architecture in symfony

2010-03-04 Thread Joshua
Thanks but Apostrophe still doesn't do it for me.

I'm looking for specific code implementation suggestions from
developers.

On Mar 4, 1:50 am, Alexandru-Emil Lupu  wrote:
> Apostrophe is symfony based 
>
>
>
> On Thu, Mar 4, 2010 at 7:11 AM, Joshua  wrote:
> > Thanks daniel. There are a lot of CMS' that use similar approaches,
> > but specifically looking for a symfony one.
>
> > On Mar 3, 4:53 pm, Daniel Lohse  wrote:
> > > This sounds a lot like Apostrophe's architecture! Seehttp://
> >www.apostrophenow.com/
>
> > > Daniel
>
> > > On 03.03.2010, at 21:13, Joshua wrote:
>
> > > > I'm working on the following architecture for a site running symfony.
> > > > Seeking ideas and input for the best way this might be implemented on
> > > > a symfony platform.
>
> > > > Blocks
> > > >    * Right now I am using the name block for lack of available
> > > > nomenclature. You could also refer to these as modules, widgets,
> > > > content areas, etc.
> > > >    * A block can be any independent entity assigned to "pages" in the
> > > > frontend. If you go to education.com (as an example, not the site I'm
> > > > developing), "Science Fair Ideas and Help" would be a block, "Featured
> > > > Topics" would be a block, a chunk of html or ads can be made blocks.
> > > >    * Blocks would be developed separately of other blocks. There
> > > > would be some sort of class of all the available blocks which pull in
> > > > the necessary db data, construct and return its individual html
> > > > segment.
> > > >    * In the admin, blocks would be given properties such as order,
> > > > active/visible, etc.
>
> > > > Zones
> > > >    * Each page would also be assigned zones (left side, middle,
> > > > footer, whatever). These would basically determine the page layout.
> > > >    * Blocks would then be assigned to a zone on the page.
> > > >    * When a page loads it pulls its assigned zones and blocks then
> > > > places them where necessary.
>
> > > > --
> > > > 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 unsubscribe from this group, send email to
> > > > symfony-users+unsubscr...@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/symfony-users?hl=en
>
> > --
> > 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 unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
> --
> Have a nice day!
>
> Alecs
> Certified ScrumMaster
>
> There are no cannibals alive! I have ate the last one yesterday ...
> I am on web:  http://www.alecslupu.ro/
> I am on twitter:http://twitter.com/alecslupu
> I am on linkedIn:http://www.linkedin.com/in/alecslupu
> Tel: (+4)0722 621 280

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: ideas for development architecture in symfony

2010-03-03 Thread Joshua
Thanks daniel. There are a lot of CMS' that use similar approaches,
but specifically looking for a symfony one.

On Mar 3, 4:53 pm, Daniel Lohse  wrote:
> This sounds a lot like Apostrophe's architecture! 
> Seehttp://www.apostrophenow.com/
>
> Daniel
>
> On 03.03.2010, at 21:13, Joshua wrote:
>
> > I'm working on the following architecture for a site running symfony.
> > Seeking ideas and input for the best way this might be implemented on
> > a symfony platform.
>
> > Blocks
> >    * Right now I am using the name block for lack of available
> > nomenclature. You could also refer to these as modules, widgets,
> > content areas, etc.
> >    * A block can be any independent entity assigned to "pages" in the
> > frontend. If you go to education.com (as an example, not the site I'm
> > developing), "Science Fair Ideas and Help" would be a block, "Featured
> > Topics" would be a block, a chunk of html or ads can be made blocks.
> >    * Blocks would be developed separately of other blocks. There
> > would be some sort of class of all the available blocks which pull in
> > the necessary db data, construct and return its individual html
> > segment.
> >    * In the admin, blocks would be given properties such as order,
> > active/visible, etc.
>
> > Zones
> >    * Each page would also be assigned zones (left side, middle,
> > footer, whatever). These would basically determine the page layout.
> >    * Blocks would then be assigned to a zone on the page.
> >    * When a page loads it pulls its assigned zones and blocks then
> > places them where necessary.
>
> > --
> > 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 unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] ideas for development architecture in symfony

2010-03-03 Thread Joshua
I'm working on the following architecture for a site running symfony.
Seeking ideas and input for the best way this might be implemented on
a symfony platform.

Blocks
* Right now I am using the name block for lack of available
nomenclature. You could also refer to these as modules, widgets,
content areas, etc.
* A block can be any independent entity assigned to "pages" in the
frontend. If you go to education.com (as an example, not the site I'm
developing), "Science Fair Ideas and Help" would be a block, "Featured
Topics" would be a block, a chunk of html or ads can be made blocks.
* Blocks would be developed separately of other blocks. There
would be some sort of class of all the available blocks which pull in
the necessary db data, construct and return its individual html
segment.
* In the admin, blocks would be given properties such as order,
active/visible, etc.

Zones
* Each page would also be assigned zones (left side, middle,
footer, whatever). These would basically determine the page layout.
* Blocks would then be assigned to a zone on the page.
* When a page loads it pulls its assigned zones and blocks then
places them where necessary.

-- 
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 unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en


[symfony-users] Re: how to set up and configure memcache?

2010-02-09 Thread Joshua
Thank you Norbert.

1) install memcache
2) $cache = new sfMemcacheCache();

Apparently that is all I needed. Not sure why or how everyone is
writing their own 3 page blog posts about doing that. Way to over
complicate things.


On Feb 8, 3:17 pm, Norbert  wrote:
> just rtfm ;-)
>
> http://www.doctrine-project.org/documentation/manual/1_2/en/caching
> &http://www.symfony-project.org/book/1_2/18-Performance
>
> Am 08.02.10 17:29, schrieb Joshua:
>
> > Blogs blogs blogs. How am I supposed to know where to find these
> > things short of a google search?
>
> > On Feb 8, 1:52 am, Frank Stelzer  wrote:
>
> >> Hi,
> >> Here is explained, how you could configure memcache for  the view  
> >> cache or how you can handle memcache using within a singleton using it  
> >> for 
> >> everything:http://dev.esl.eu/blog/2009/06/05/memcached-as-singleton-in-symfony/
>
> >> Frank
>
> >> Am 08.02.2010 um 05:05 schrieb Joshua:
>
> >>> My end goal here is to have propel queries be memcached so common
> >>> queries do not need to be constantly run.
>
> >>> On Feb 7, 11:04 pm, Joshua  wrote:
>
> >>>> I have searched and read and searched but I can't find any clear
> >>>> documentation to set this up for symfony 1.2+. Apparently there are
> >>>> configurations that need to be added to yml files and other things.
> >>>> Where can I go to read about how to do this?
>
> >>> --
> >>> You received this message because you are subscribed to the Google  
> >>> Groups "symfony users" group.
> >>> To post to this group, send email to symfony-us...@googlegroups.com.
> >>> To unsubscribe from this group, send email to 
> >>> symfony-users+unsubscr...@googlegroups.com
> >>> .
> >>> For more options, visit this group 
> >>> athttp://groups.google.com/group/symfony-users?hl=en
> >>> .

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] symfony memcache support by default?

2010-02-08 Thread Joshua
Does symfony come with any level of support for memcache out of the
box? One of our sites was brought down from an influx of traffic from
email blasts.

Monitoring the slow query log, I made some changes to a few propel
queries. That relieved a lot of the stress, the site went from crashed
to sluggish.

Then we installed memcache on the servers. A few minutes later, before
making any actual code updates to use memcache, the slow query log
made a dead stop and the site was very speedy.

Any ideas? Mine are:
a) Symfony has some basic level of memcache support that kicked in
after we installed.
b) MySQL Query Cache kicked in from my previous updates to the slow
queries.

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: how to set up and configure memcache?

2010-02-08 Thread Joshua
Is the sfMemcacheCache link you provide in the blog the same as
http://www.symfony-project.org/plugins/sfMemcachePlugin

The link you provide says 1.1 and the link above says 1.0 (also has
other WARNINGS). I'm using 1.2, a little reluctant to use what appears
to be a fringe plugin no one is monitoring or updating.

Also I'm using this on a distributed load balanced system. The link
you provide says it "ignores multi-memcache-server configuration and
defaults to localhost"

On Feb 8, 1:52 am, Frank Stelzer  wrote:
> Hi,
> Here is explained, how you could configure memcache for  the view  
> cache or how you can handle memcache using within a singleton using it  
> for 
> everything:http://dev.esl.eu/blog/2009/06/05/memcached-as-singleton-in-symfony/
>
> Frank
>
> Am 08.02.2010 um 05:05 schrieb Joshua:
>
> > My end goal here is to have propel queries be memcached so common
> > queries do not need to be constantly run.
>
> > On Feb 7, 11:04 pm, Joshua  wrote:
> >> I have searched and read and searched but I can't find any clear
> >> documentation to set this up for symfony 1.2+. Apparently there are
> >> configurations that need to be added to yml files and other things.
> >> Where can I go to read about how to do this?
>
> > --
> > You received this message because you are subscribed to the Google  
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > symfony-users+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group 
> > athttp://groups.google.com/group/symfony-users?hl=en
> > .

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: how to set up and configure memcache?

2010-02-08 Thread Joshua
Blogs blogs blogs. How am I supposed to know where to find these
things short of a google search?

On Feb 8, 1:52 am, Frank Stelzer  wrote:
> Hi,
> Here is explained, how you could configure memcache for  the view  
> cache or how you can handle memcache using within a singleton using it  
> for 
> everything:http://dev.esl.eu/blog/2009/06/05/memcached-as-singleton-in-symfony/
>
> Frank
>
> Am 08.02.2010 um 05:05 schrieb Joshua:
>
> > My end goal here is to have propel queries be memcached so common
> > queries do not need to be constantly run.
>
> > On Feb 7, 11:04 pm, Joshua  wrote:
> >> I have searched and read and searched but I can't find any clear
> >> documentation to set this up for symfony 1.2+. Apparently there are
> >> configurations that need to be added to yml files and other things.
> >> Where can I go to read about how to do this?
>
> > --
> > You received this message because you are subscribed to the Google  
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > symfony-users+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group 
> > athttp://groups.google.com/group/symfony-users?hl=en
> > .

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: how to set up and configure memcache?

2010-02-07 Thread Joshua
My end goal here is to have propel queries be memcached so common
queries do not need to be constantly run.

On Feb 7, 11:04 pm, Joshua  wrote:
> I have searched and read and searched but I can't find any clear
> documentation to set this up for symfony 1.2+. Apparently there are
> configurations that need to be added to yml files and other things.
> Where can I go to read about how to do this?

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] how to set up and configure memcache?

2010-02-07 Thread Joshua
I have searched and read and searched but I can't find any clear
documentation to set this up for symfony 1.2+. Apparently there are
configurations that need to be added to yml files and other things.
Where can I go to read about how to do this?

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] execute module through php command line

2009-12-28 Thread Joshua
I've set up a module in my frontend application and the
actions.class.php has different functions intended to be run in a
cron. I can run these functions in the browser by going to the path
domain.com/cron_module/function

How can I set this up command line so a cron can run these functions?

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] sfPropelPager bug

2009-09-27 Thread Joshua


symfony version 1.2.8 (/usr/share/pear/symfony)

Below is my query. The pager produces incorrect pagination results.
The data isn't all that important. What is important the pager
produces the wrong offset when it is not being sorted by ID. The
second page will contain elements from the first page. This causes
some elements to not be listed in the results. There were "missing"
services that were in the database but you couldn't get to in the
admin.

Page 1 would stop at the 20th service listed and page 2 would begin at
the 18th service listed from page 1 but still show 20 results for the
page so a few services weren't displayed.

Adding the sort by ID seemed to fix the problem.

$c = new Criteria();
$crit0 = $c->getNewCriterion(CompanyServicePeer::PARENT,
0,Criteria::NOT_EQUAL);
$crit1 = $c->getNewCriterion
(CompanyServicePeer::PARENT,NULL,Criteria::ISNOTNULL);
$crit1->addAnd($crit0);
$c->add($crit1);
$c->addAscendingOrderByColumn(CompanyServicePeer::ID);
$pager = new sfPropelPager('CompanyService', 20);
$pager->setCriteria($c);
$pager->setPage($this->getRequestParameter('page', 1));
$pager->init();
$this->pager = $pager;
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] sf/sf_default does not exist

2009-05-19 Thread Joshua

I recently took over a symfony project that had already been built. I
can't make sense of the setup they are using here. How do I get
symfony to recognize the simple "reports" module?

There is a backend application with module "reports" with no
designation in the schema. This module includes nothing but the
default setup after running this command.

php symfony generate:module backend reports

For better or worse it appears the backend application is using the
routing.yml to direct each module being used. "reports" module is
absent from routing.yml and no matter how I try to include it I get an
"oops" page and these errors in the logs.

[19-May-2009 14:21:33] Action "reports/index" does not exist.
[19-May-2009 14:21:34] Action "sf/sf_default" does not exist.
[19-May-2009 14:21:34] Action "sf/sf_default" does not exist.
[19-May-2009 14:21:34] Action "sf/sf_default" does not exist.

The following is the "routing.yml" file.

office:
  class: sfPropelRouteCollection
  options:
model:   Office
module:  office
prefix_path: office
column:  id
with_wildcard_routes: true

customer:
  class: sfPropelRouteCollection
  options:
model:   Customer
module:  customer
prefix_path: customer
column:  id
with_wildcard_routes: true

invoice:
class: sfPropelRouteCollection
options:
model:   Invoice
module:  invoice
prefix_path: invoice
column:  id
with_wildcard_routes: true

card:
class: sfPropelRouteCollection
options:
model:   CreditCard
module:  card
prefix_path: card
column:  id
with_wildcard_routes: true
user:
class: sfPropelRouteCollection
options:
model:   sfGuardUser
module:  user
prefix_path: user
column:  id
with_wildcard_routes: true
payout:
url:   /payout
class: sfRequestRoute
param: { module: payout, action: index }

# default rules
homepage:
  url:   /
  param: { module: office, action: index }

default_index:
  url:   /:module
  param: { action: index }

default:
  url:   /:module/:action/*

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] validate/send.yml not working

2009-04-01 Thread Joshua

i have this in apps/frontend/modules/module_name/validate/send.yml

When I leave first_name blank I still get the standard Required.
error. Cache cleared

fillin:
  enabled:  true

validators:
  myStringValidator:
class: sfStringValidator
param:
  min:   2
  min_error: This field is too short (2 characters minimum)
  max:   100
  max_error: This field is too long (100 characters maximum)

fields:
  first_name:
required:
  msg:   The name field cannot be left blank
myStringValidator:


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Graceful fail on saving new objects

2009-04-01 Thread Joshua

http://www.symfony-project.org/plugins/tbDuplicateKeyPlugin

On Apr 1, 1:09 pm, Joshua  wrote:
> No I disagree. The application should be able to provide this
> assistance for me. I shouldn't have to make these checks in every
> instance every time. That puts a lot of responsibility on the
> developer and creates overhead. The whole point of a framework is to
> provide that assistance so the developer doesn't need to worry about
> these things.
>
> Autonumber has nothing to do with it. The ID was just for example sake
> it can happen with any primary key value.
>
> There should be an config option at least to get around this problem.
> Maybe an option in the schema.
>
> On Mar 25, 6:59 pm, Steve the Canuck  wrote:
>
> > I would suggest this comes down to application design and logic.
>
> > Your business logic should not be creating duplicates of SomeClass if
> > the instance already exists.
>
> > You can do one of two things:
>
> > 1) Do a lookup to see if the key already exists
> > 2) Add a try catch block around the statement and recover
>
> > Also consider using autonumber fields for your Id's, so you don't need
> > to calculate them.
>
> > Steve
>
> > On Mar 25, 5:20 pm, Joshua  wrote:
>
> > > $SomeClass= new SomeClass();
> > > $SomeClass->setId($number);
> > > $SomeClass->save();
>
> > > In this example if column ID is unique and there is already a row with
> > > ID $number then trying to save this object will get an SQL Insert
> > > rejection and crap the page.
>
> > > Following this futher...
>
> > > foreach($numbers as $number)
> > > {
> > > $SomeClass= new SomeClass();
> > > $SomeClass->setId($number);
> > > $SomeClass->save();
>
> > > }
>
> > > In that example if one of the objects fails it will do a full stop and
> > > you get an Oops page.
>
> > > Is there any way to get symfony to just skip over these failed cases
> > > and continue loading?
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Graceful fail on saving new objects

2009-04-01 Thread Joshua

No I disagree. The application should be able to provide this
assistance for me. I shouldn't have to make these checks in every
instance every time. That puts a lot of responsibility on the
developer and creates overhead. The whole point of a framework is to
provide that assistance so the developer doesn't need to worry about
these things.

Autonumber has nothing to do with it. The ID was just for example sake
it can happen with any primary key value.

There should be an config option at least to get around this problem.
Maybe an option in the schema.



On Mar 25, 6:59 pm, Steve the Canuck  wrote:
> I would suggest this comes down to application design and logic.
>
> Your business logic should not be creating duplicates of SomeClass if
> the instance already exists.
>
> You can do one of two things:
>
> 1) Do a lookup to see if the key already exists
> 2) Add a try catch block around the statement and recover
>
> Also consider using autonumber fields for your Id's, so you don't need
> to calculate them.
>
> Steve
>
> On Mar 25, 5:20 pm, Joshua  wrote:
>
> > $SomeClass= new SomeClass();
> > $SomeClass->setId($number);
> > $SomeClass->save();
>
> > In this example if column ID is unique and there is already a row with
> > ID $number then trying to save this object will get an SQL Insert
> > rejection and crap the page.
>
> > Following this futher...
>
> > foreach($numbers as $number)
> > {
> > $SomeClass= new SomeClass();
> > $SomeClass->setId($number);
> > $SomeClass->save();
>
> > }
>
> > In that example if one of the objects fails it will do a full stop and
> > you get an Oops page.
>
> > Is there any way to get symfony to just skip over these failed cases
> > and continue loading?
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Unable to open PDO connection

2009-03-31 Thread Joshua

I'm trying to move my project to the production server and its having
trouble connecting to the remote database. The development server used
localhost.

[Tue Mar 31 18:40:34 2009] [error] [client xx.xx.xx.xx] Unable to open
PDO connection [wrapped: SQLSTATE[HY000] [2003] Can't connect to MySQL
server on 'xx.xx.xx.xx' (13)]

The development server works fine, only thing changed in below files
are the host and logins.


config/databases.yml

dev:
  propel:
param:
  classname:  DebugPDO

test:
  propel:
param:
  classname:  DebugPDO

all:
  propel:
class: sfPropelDatabase
param:
  classname: PropelPDO
  dsn: 'mysql:host=xx.xx.xx.xx;dbname=walking'
  username: walking
  password: [password]
  encoding: utf8
  persistent: true
  pooling: true



config/propel.ini

propel.targetPackage   = lib.model
propel.packageObjectModel  = true
propel.project = walking
propel.database= mysql
propel.database.driver = mysql
propel.database.url= mysql:dbname=walking;host=xx.xx.xx.xx
propel.database.creole.url = ${propel.database.url}
propel.database.user   = walking
propel.database.password   =
propel.database.encoding   = utf8

; mysql options
propel.mysql.tableType = InnoDB

propel.addVendorInfo   = true
propel.addGenericAccessors = true
propel.addGenericMutators  = true
propel.addTimeStamp= true
propel.addValidators   = false

propel.useDateTimeClass   = true
propel.defaultTimeStampFormat = Y-m-d H:i:s
propel.defaultTimeFormat  = H:i:s
propel.defaultDateFormat  = Y-m-d

propel.schema.validate= false
propel.samePhpName= false
propel.disableIdentifierQuoting = false
propel.emulateForeignKeyConstraints = true

; directories
propel.home= .
propel.output.dir  = /var/www/html/walking
propel.schema.dir  = ${propel.output.dir}/config
propel.conf.dir= ${propel.output.dir}/config
propel.phpconf.dir = ${propel.output.dir}/config
propel.sql.dir = ${propel.output.dir}/data/sql
propel.runtime.conf.file   = runtime-conf.xml
propel.php.dir = ${propel.output.dir}
propel.default.schema.basename = schema
propel.datadump.mapper.from= *schema.xml
propel.datadump.mapper.to  = *data.xml

; builder settings
propel.builder.peer.class  =
plugins.sfPropelPlugin.lib.builder.SfPeerBuilder
propel.builder.object.class=
plugins.sfPropelPlugin.lib.builder.SfObjectBuilder
propel.builder.objectstub.class=
plugins.sfPropelPlugin.lib.builder.SfExtensionObjectBuilder
propel.builder.peerstub.class  =
plugins.sfPropelPlugin.lib.builder.SfExtensionPeerBuilder
propel.builder.objectmultiextend.class =
plugins.sfPropelPlugin.lib.builder.SfMultiExtendObjectBuilder
propel.builder.mapbuilder.class=
plugins.sfPropelPlugin.lib.builder.SfMapBuilderBuilder

propel.builder.addIncludes  = false
propel.builder.addComments  = true
propel.builder.addBehaviors = true


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: can't install symfony via pear

2009-03-31 Thread Joshua

I deleted /usr/share/PEAR and reinstalled pear that fixed it
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: can't install symfony via pear

2009-03-31 Thread Joshua

also

[root@ ]# /usr/share/bin/pear uninstall symfony/symfony-1.2.2
No package to uninstall given

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] can't install symfony via pear

2009-03-31 Thread Joshua

[root@ ]# /usr/share/bin/pear install symfony/symfony-1.2.2
this gave me a PHP fatal error memory exhausted. i updated php.ini
memory_limit to 32MB then restarted

[root@ ]# /usr/share/bin/pear install symfony/symfony-1.2.2
Ignoring installed package symfony/symfony
Nothing to install

[root@ ]# /usr/share/bin/pear uninstall symfony/symfony
No package to uninstall given

so it won't let me uninstall symfony and it wont let me reinstall it
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Graceful fail on saving new objects

2009-03-25 Thread Joshua


$SomeClass= new SomeClass();
$SomeClass->setId($number);
$SomeClass->save();

In this example if column ID is unique and there is already a row with
ID $number then trying to save this object will get an SQL Insert
rejection and crap the page.

Following this futher...

foreach($numbers as $number)
{
$SomeClass= new SomeClass();
$SomeClass->setId($number);
$SomeClass->save();
}

In that example if one of the objects fails it will do a full stop and
you get an Oops page.

Is there any way to get symfony to just skip over these failed cases
and continue loading?


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] symfony errors to display line numbers

2009-03-02 Thread Joshua

one of my actions.classes generates the following error

 Call to undefined method BaseWhatever::getId()

Most symfony errors show up in the logs like this and I have no idea
where it originated from. Is there a way to setup a trace or display
the line numbers?

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] MYSQL errors importing DB backup after rebuilding model with deleted columns

2009-03-01 Thread Joshua

So I take out some columns from a table in the schema and rebuild my
symfony project model. Before rebuilding I backup the database. When I
try to import the DB after rebuilding I get an error

ERROR 1054 (42S22) Unknown column 'whatever' in 'field list'

Is there a mysql command to ignore missing columns on import?
Otherwise I have to delete the columns in mysql before backing up the
database which adds an extra step that needs to be done manually.

Suggestions for other methods of handling this scenario are welcome
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Adding a custom column via addAsColumn to WHERE clause

2009-02-28 Thread Joshua

Yay I figured it out on my own

$c->addHaving($c->getNewCriterion(MlVideoPeer::ID, 'votecount<=10',
Criteria::CUSTOM));

On Feb 28, 1:06 pm, Joshua  wrote:
> Sorry above example should be
>
> while($video = $videos->fetch(PDO::FETCH_ASSOC))
>
> On Feb 28, 1:05 pm, Joshua  wrote:
>
> > Propel 1.3 symfony 1.2.2
>
> > I have gotten this far with custom columns
>
> > $c= new Criteria();
> > $c->addAsColumn('votecount', 'COUNT
> > ('.MlVideoVotesPeer::ML_VIDEO_ID.')');
> > $videos = MlVideoPeer::doSelectStmt($c);
>
> > while($route = $featuredRoutes->fetch(PDO::FETCH_ASSOC))
> > { }
>
> > This allows me to access votecount. But I can't find a way to add
> > votecount to WHERE. I have tried different versions of this
>
> > $c->add('votecount', 'votecount<='. 10, Criteria::CUSTOM);
>
> > Which return errors like
>
> > [wrapped: SQLSTATE[42S22]: Column not found: 1054 Unknown column
> > 'votecount' in 'where clause']
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Adding a custom column via addAsColumn to WHERE clause

2009-02-28 Thread Joshua

Sorry above example should be

while($video = $videos->fetch(PDO::FETCH_ASSOC))

On Feb 28, 1:05 pm, Joshua  wrote:
> Propel 1.3 symfony 1.2.2
>
> I have gotten this far with custom columns
>
> $c= new Criteria();
> $c->addAsColumn('votecount', 'COUNT
> ('.MlVideoVotesPeer::ML_VIDEO_ID.')');
> $videos = MlVideoPeer::doSelectStmt($c);
>
> while($route = $featuredRoutes->fetch(PDO::FETCH_ASSOC))
> { }
>
> This allows me to access votecount. But I can't find a way to add
> votecount to WHERE. I have tried different versions of this
>
> $c->add('votecount', 'votecount<='. 10, Criteria::CUSTOM);
>
> Which return errors like
>
> [wrapped: SQLSTATE[42S22]: Column not found: 1054 Unknown column
> 'votecount' in 'where clause']
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Adding a custom column via addAsColumn to WHERE clause

2009-02-28 Thread Joshua

Propel 1.3 symfony 1.2.2

I have gotten this far with custom columns

$c= new Criteria();
$c->addAsColumn('votecount', 'COUNT
('.MlVideoVotesPeer::ML_VIDEO_ID.')');
$videos = MlVideoPeer::doSelectStmt($c);

while($route = $featuredRoutes->fetch(PDO::FETCH_ASSOC))
{ }

This allows me to access votecount. But I can't find a way to add
votecount to WHERE. I have tried different versions of this

$c->add('votecount', 'votecount<='. 10, Criteria::CUSTOM);

Which return errors like

[wrapped: SQLSTATE[42S22]: Column not found: 1054 Unknown column
'votecount' in 'where clause']

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: How to access a custom added column in propel?

2009-02-28 Thread Joshua

Oh nevermind that is my symfony version, Propel is 1.3 I suppose

On Feb 28, 10:59 am, Joshua  wrote:
> OMG it works! THANK YOU. All I needed was ->fetch(PDO::FETCH_NUM)
>
> I am actually using 1.2.2, couldn't tell you either way about why what
> wasn't working. So much difference between small version numbers, oy
> vey.
>
> On Feb 28, 7:13 am, vadim  wrote:
>
> > Yeah, but read an error he's facing:
>
> > PHP Fatal error:  Call to undefined method RoutesPeer::doselectrs()
> > in /apps/frontend/modules/route/actions/actions.class.php on line 39
>
> > So I've made the conclusion that he uses Propel 1.3.
>
> > Joshua, 1 000 000 dollars question to you:
>
> > What Propel version do you use? ;)
>
> > On Feb 28, 2:39 pm, "michael.pie...@googlemail.com"
>
> >  wrote:
> > > Yes i'm aware of that and i know the difference between 1.2 and 1.3.
> > > But Joshua mentioned doSelectRS in his second post, so i assume he's
> > > using propel 1.2
>
> > > For propel 1.3 it is doSelectStmt, you're right.
>
> > > Michael
>
> > > On 28 Feb., 10:34, vadim  wrote:
>
> > > > Michael, I guess the code you wrote wouldn't work in Propel1.3. As far
> > > > as I'm concerned doSelectRS is not a case in Propel 1.3 anymore. One
> > > > should use doSelectStmt instead. If I were you I would try right that:
>
> > > >     $c = new Criteria();
>
> > > >     $c->clearSelectColumns();
>
> > > >     $c->addSelectColumn( '((ACOS(SIN('.$zipcode->getLat().' * PI
> > > > () / 180) * SIN(`zipcodes`.LAT * PI() / 180) + COS('.$zipcode->getLat
> > > > ().' * PI() / 180) * COS(`zipcodes`.LAT * PI() / 180) * COS(('.
> > > > $zipcode->getLon().' - `zipcodes`.LON) * PI() / 180)) * 180 / PI()) *
> > > > 60 * 1.1515) as distance'); //Jesus Christ!
>
> > > >   $sum = RoutesPeer::doSelectStmt($c);
>
> > > >   $total = array();
>
> > > >   while ($row = $sum->fetch(PDO::FETCH_NUM)) {
> > > >      $total[] = array(
> > > >      'distance' => $row[0],
> > > >     //some other columns...
> > > >   );
>
> > > > On Feb 28, 11:21 am, "michael.pie...@googlemail.com"
>
> > > >  wrote:
> > > > > doSelectRS is the right way to access an array.
> > > > > Example from propel docs:
>
> > > > > $rs = AuthorPeer::doSelectRS(new Criteria());
>
> > > > > $names = array();
>
> > > > > while($rs->next()) {
> > > > >   $names[] = $rs->getString(2);
>
> > > > > }
>
> > > > > Michael
>
> > > > > On 28 Feb., 02:23, Joshua  wrote:
>
> > > > > > On Feb 27, 6:51 pm, Eno  wrote:
>
> > > > > > > On Fri, 27 Feb 2009, Joshua wrote:
> > > > > > > >    $c = new Criteria();
> > > > > > > >    $c->addAsColumn('distance', 
> > > > > > > > '((ACOS(SIN('.$zipcode->getLat().' * PI
> > > > > > > > () / 180) * SIN(`zipcodes`.LAT * PI() / 180) + 
> > > > > > > > COS('.$zipcode->getLat
> > > > > > > > ().' * PI() / 180) * COS(`zipcodes`.LAT * PI() / 180) * COS(('.
> > > > > > > > $zipcode->getLon().' - `zipcodes`.LON) * PI() / 180)) * 180 / 
> > > > > > > > PI()) *
> > > > > > > > 60 * 1.1515)');
> > > > > > > >    RoutesPeer::addSelectColumns($c);
> > > > > > > >    $c->setLimit(10);
> > > > > > > >    $c->addAscendingOrderByColumn('distance');
> > > > > > > >    $c->addJoin(ZipcodesPeer::ZIPCODE, RoutesPeer::ZIP_CODE);
> > > > > > > >    $this->featuredRoutes = RoutesPeer::doSelect($c);
>
> > > > > > > > I need to be able to access "distance" column. The above code 
> > > > > > > > will
> > > > > > > > give me an array of Routes objects but does not include the 
> > > > > > > > distance
> > > > > > > > column.
>
> > > > > > > > What can I do to access all the necessary columns including 
> > > > > > > > custom
> > > > > > > > ones?
>
> > > > > > > I think, if you're using raw SQL inside a peer class, you will 
> > > > > > > have to
> > > > > > > iterate through the rows and hydrate the objects yourself (I 
> > > > > > > guess this
> > > > > > > also means you need the model classes and schema as well right?).
>
> > > > > > > --
>
> > > > > > I thought there was a way to have propel return the exact values as 
> > > > > > a
> > > > > > PHP array. Is that supposed to be done by doSelectRS maybe? It 
> > > > > > returns
> > > > > > an error when I try to use it?
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: How to access a custom added column in propel?

2009-02-28 Thread Joshua

OMG it works! THANK YOU. All I needed was ->fetch(PDO::FETCH_NUM)

I am actually using 1.2.2, couldn't tell you either way about why what
wasn't working. So much difference between small version numbers, oy
vey.


On Feb 28, 7:13 am, vadim  wrote:
> Yeah, but read an error he's facing:
>
> PHP Fatal error:  Call to undefined method RoutesPeer::doselectrs()
> in /apps/frontend/modules/route/actions/actions.class.php on line 39
>
> So I've made the conclusion that he uses Propel 1.3.
>
> Joshua, 1 000 000 dollars question to you:
>
> What Propel version do you use? ;)
>
> On Feb 28, 2:39 pm, "michael.pie...@googlemail.com"
>
>  wrote:
> > Yes i'm aware of that and i know the difference between 1.2 and 1.3.
> > But Joshua mentioned doSelectRS in his second post, so i assume he's
> > using propel 1.2
>
> > For propel 1.3 it is doSelectStmt, you're right.
>
> > Michael
>
> > On 28 Feb., 10:34, vadim  wrote:
>
> > > Michael, I guess the code you wrote wouldn't work in Propel1.3. As far
> > > as I'm concerned doSelectRS is not a case in Propel 1.3 anymore. One
> > > should use doSelectStmt instead. If I were you I would try right that:
>
> > >     $c = new Criteria();
>
> > >     $c->clearSelectColumns();
>
> > >     $c->addSelectColumn( '((ACOS(SIN('.$zipcode->getLat().' * PI
> > > () / 180) * SIN(`zipcodes`.LAT * PI() / 180) + COS('.$zipcode->getLat
> > > ().' * PI() / 180) * COS(`zipcodes`.LAT * PI() / 180) * COS(('.
> > > $zipcode->getLon().' - `zipcodes`.LON) * PI() / 180)) * 180 / PI()) *
> > > 60 * 1.1515) as distance'); //Jesus Christ!
>
> > >   $sum = RoutesPeer::doSelectStmt($c);
>
> > >   $total = array();
>
> > >   while ($row = $sum->fetch(PDO::FETCH_NUM)) {
> > >      $total[] = array(
> > >      'distance' => $row[0],
> > >     //some other columns...
> > >   );
>
> > > On Feb 28, 11:21 am, "michael.pie...@googlemail.com"
>
> > >  wrote:
> > > > doSelectRS is the right way to access an array.
> > > > Example from propel docs:
>
> > > > $rs = AuthorPeer::doSelectRS(new Criteria());
>
> > > > $names = array();
>
> > > > while($rs->next()) {
> > > >   $names[] = $rs->getString(2);
>
> > > > }
>
> > > > Michael
>
> > > > On 28 Feb., 02:23, Joshua  wrote:
>
> > > > > On Feb 27, 6:51 pm, Eno  wrote:
>
> > > > > > On Fri, 27 Feb 2009, Joshua wrote:
> > > > > > >    $c = new Criteria();
> > > > > > >    $c->addAsColumn('distance', '((ACOS(SIN('.$zipcode->getLat().' 
> > > > > > > * PI
> > > > > > > () / 180) * SIN(`zipcodes`.LAT * PI() / 180) + 
> > > > > > > COS('.$zipcode->getLat
> > > > > > > ().' * PI() / 180) * COS(`zipcodes`.LAT * PI() / 180) * COS(('.
> > > > > > > $zipcode->getLon().' - `zipcodes`.LON) * PI() / 180)) * 180 / 
> > > > > > > PI()) *
> > > > > > > 60 * 1.1515)');
> > > > > > >    RoutesPeer::addSelectColumns($c);
> > > > > > >    $c->setLimit(10);
> > > > > > >    $c->addAscendingOrderByColumn('distance');
> > > > > > >    $c->addJoin(ZipcodesPeer::ZIPCODE, RoutesPeer::ZIP_CODE);
> > > > > > >    $this->featuredRoutes = RoutesPeer::doSelect($c);
>
> > > > > > > I need to be able to access "distance" column. The above code will
> > > > > > > give me an array of Routes objects but does not include the 
> > > > > > > distance
> > > > > > > column.
>
> > > > > > > What can I do to access all the necessary columns including custom
> > > > > > > ones?
>
> > > > > > I think, if you're using raw SQL inside a peer class, you will have 
> > > > > > to
> > > > > > iterate through the rows and hydrate the objects yourself (I guess 
> > > > > > this
> > > > > > also means you need the model classes and schema as well right?).
>
> > > > > > --
>
> > > > > I thought there was a way to have propel return the exact values as a
> > > > > PHP array. Is that supposed to be done by doSelectRS maybe? It returns
> > > > > an error when I try to use it?
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: How to access a custom added column in propel?

2009-02-27 Thread Joshua



On Feb 27, 6:51 pm, Eno  wrote:
> On Fri, 27 Feb 2009, Joshua wrote:
> >    $c = new Criteria();
> >    $c->addAsColumn('distance', '((ACOS(SIN('.$zipcode->getLat().' * PI
> > () / 180) * SIN(`zipcodes`.LAT * PI() / 180) + COS('.$zipcode->getLat
> > ().' * PI() / 180) * COS(`zipcodes`.LAT * PI() / 180) * COS(('.
> > $zipcode->getLon().' - `zipcodes`.LON) * PI() / 180)) * 180 / PI()) *
> > 60 * 1.1515)');
> >    RoutesPeer::addSelectColumns($c);
> >    $c->setLimit(10);
> >    $c->addAscendingOrderByColumn('distance');
> >    $c->addJoin(ZipcodesPeer::ZIPCODE, RoutesPeer::ZIP_CODE);
> >    $this->featuredRoutes = RoutesPeer::doSelect($c);
>
> > I need to be able to access "distance" column. The above code will
> > give me an array of Routes objects but does not include the distance
> > column.
>
> > What can I do to access all the necessary columns including custom
> > ones?
>
> I think, if you're using raw SQL inside a peer class, you will have to
> iterate through the rows and hydrate the objects yourself (I guess this
> also means you need the model classes and schema as well right?).
>
> --

I thought there was a way to have propel return the exact values as a
PHP array. Is that supposed to be done by doSelectRS maybe? It returns
an error when I try to use it?
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] How to access a custom added column in propel?

2009-02-27 Thread Joshua


$c = new Criteria();
$c->addAsColumn('distance', '((ACOS(SIN('.$zipcode->getLat().' * PI
() / 180) * SIN(`zipcodes`.LAT * PI() / 180) + COS('.$zipcode->getLat
().' * PI() / 180) * COS(`zipcodes`.LAT * PI() / 180) * COS(('.
$zipcode->getLon().' - `zipcodes`.LON) * PI() / 180)) * 180 / PI()) *
60 * 1.1515)');
RoutesPeer::addSelectColumns($c);
$c->setLimit(10);
$c->addAscendingOrderByColumn('distance');
$c->addJoin(ZipcodesPeer::ZIPCODE, RoutesPeer::ZIP_CODE);
$this->featuredRoutes = RoutesPeer::doSelect($c);

I need to be able to access "distance" column. The above code will
give me an array of Routes objects but does not include the distance
column.

What can I do to access all the necessary columns including custom
ones?

doSelectRS errors:
 PHP Fatal error:  Call to undefined method RoutesPeer::doselectrs()
in /apps/frontend/modules/route/actions/actions.class.php on line 39

doSelectStmt returns the query:

PDOStatement Object ( [queryString] => SELECT routes.ID, routes.TITLE,
routes.DESCRIPTION, routes.MILES, routes.DIFFICULTY, routes.TIME,
routes.ZIP_CODE, routes.USER_ID, routes.SITEID, routes.CREATED_AT,
routes.UPDATED_AT, ((ACOS(SIN(40.73022 * PI() / 180) * SIN
(`zipcodes`.LAT * PI() / 180) + COS(40.73022 * PI() / 180) * COS
(`zipcodes`.LAT * PI() / 180) * COS((73.9885 - `zipcodes`.LON) * PI
() / 180)) * 180 / PI()) * 60 * 1.1515) AS distance FROM `routes`,
`zipcodes` WHERE zipcodes.ZIPCODE=routes.ZIP_CODE ORDER BY distance
ASC LIMIT 10 )
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Creating DB tables for use outside schema

2009-02-27 Thread Joshua

I mean doing the calculations within the SQL queries. I've got this
far.

$c->addAsColumn('distance', '((ACOS(SIN('.$zipcode->getLat().' * PI
() / 180) * SIN(`walking_zipcodes`.LAT * PI() / 180) + COS('.$zipcode-
>getLat().' * PI() / 180) * COS(`walking_zipcodes`.LAT * PI() / 180) *
COS(('.$zipcode->getLon().' - `walking_zipcodes`.LON) * PI() / 180)) *
180 / PI()) * 60 * 1.1515)');


Good enough.

On Feb 27, 5:05 pm, Lee Bolding  wrote:
> I think he means using the MySQL geospacial functionality.
>
> TBH, I'm not entirely sure how you'd do this - interested to hear  
> responses.
>
> I guess you'd use the generated models only for creating, updating and  
> deleting - for reading you'd probably want to use raw SQL.
>
> On 27 Feb 2009, at 21:28, Eno wrote:
>
>
>
> > On Fri, 27 Feb 2009, Joshua wrote:
>
> >> I guess I could, but I think its more efficient to do the distance
> >> calculations directly in SQL so I wouldn't need the classes in that
> >> case, just the table data.
>
> > 'Directly in SQL' meaning what exactly? Straight PHP MySQL  
> > functions? If
> > you're using Propel in symfony, seems to me to make no sense to use
> > straight PHP. After all, you would be duplicating with Propel does  
> > for you
> > anyway.
>
> > --
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Creating DB tables for use outside schema

2009-02-27 Thread Joshua



On Feb 27, 3:07 pm, Eno  wrote:
> On Fri, 27 Feb 2009, Joshua wrote:
> > I don't necessarily need this table defined in schema.yml because it
> > will just be used by propel as a lookup for the long/lat values. I
> > suppose I still have to define it in schema.yml and ignore the created
> > classes or what would be the proper way to address this?
>
> Well, wouldn't you be using the model classes to do the lookup anyway?
>
> --

I guess I could, but I think its more efficient to do the distance
calculations directly in SQL so I wouldn't need the classes in that
case, just the table data.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Creating DB tables for use outside schema

2009-02-27 Thread Joshua

I have a table that stores zip codes with their corresponding
longitude and latitudes to use in calculations of distance between two
points.

I don't necessarily need this table defined in schema.yml because it
will just be used by propel as a lookup for the long/lat values. I
suppose I still have to define it in schema.yml and ignore the created
classes or what would be the proper way to address this?
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Proper way to handle file uploads in 1.2

2009-02-18 Thread Joshua

I can't find any good examples in the documentation on how to address
this.

It used to be files were handled in this way but most of those
functions are now deprecated:
http://www.symfony-project.org/cookbook/1_0/en/upload

A Google code search shows people don't seem to be following any
particular method. If there is a standard way to do this, people
aren't following it.
http://www.google.com/codesearch?hl=en&lr=&q=sfactions+executeupload+-moveFile+-sfThumbnail+lang%3Aphp&sbtn=Search

Are simple image uploads no longer supported with symfony, should I be
using basic PHP methods?

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---