Re: Question about Reverse Routing

2009-10-08 Thread Kyle Decot
Anyone know how to do this? I've yet to figure it out...I'm really stumped On Sep 17, 1:29 pm, Kyle Decot wrote: > Anyone have any other suggestions? I could hardcode the urls, but I > would rather use reverse routing if possible. Thanks. > > On Sep 16, 9:57 pm, Kyle Decot wrote: > > > > > Than

why would redirect and session read not work in a controller?

2009-10-08 Thread Jas
I have an uploads controller to handle files and it works well apart from these two methods: $this->redirect(array('controller'=>'records','action'=>'view',$this- >data['Upload']['record_id'])); Gives me a headers already sent error and debug($this->Session->read()) returns nothing They both w

Controller Local Variable Confusion

2009-10-08 Thread armen
Hi all, I think you can tell I'm a newbie from my question. I have a controller like so: class MediaController extends AppController { var $name = 'Media'; var $images = array(); var $panoramas = array(); var $videos = array(); function getMedia() {

RE: Layout Help

2009-10-08 Thread Dave Maharaj :: WidePixels.com
Sweet! Exactly the idea I was looking for. Thanks, Dave _ From: Sam Sherlock [mailto:sam.sherl...@gmail.com] Sent: October-09-09 12:13 AM To: cake-php@googlegroups.com Subject: Re: Layout Help You can see Hannibal Lecter's answer to the question on stackoverflow http://stackover

Re: Layout Help

2009-10-08 Thread Sam Sherlock
You can see Hannibal Lecter's answer to the question on stackoverflow http://stackoverflow.com/questions/1024518/cakephp-block-region hth - S 2009/10/8 Dave Maharaj :: WidePixels.com > I have 2 layouts crated one with a left

Re: cakephp recursion

2009-10-08 Thread Miles J
Your code looks correct. Does your comments model have the user relation defined? On Oct 8, 6:41 pm, broxi wrote: > I cant seem to get this to work, here is the code: > > $post = $this->Post->find('first', array( >                                     'conditions' => array( >                    

How to convert tinyint(1) back to boolean?

2009-10-08 Thread Xhaphir
Hi, i have a small problem in cakePHP. I saved a lot of booleans and integers in a mySQL Database and cakePHP is converting my boolean values nicely to a tinyint. But not back. In most cases this is not a problem but I would like to iterate over all values and convert all booleans to "yes"/"no".

Re: cakephp recursion

2009-10-08 Thread broxi
I cant seem to get this to work, here is the code: $post = $this->Post->find('first', array( 'conditions' => array( 'Post.id' => $id ), 'contain' =>

Re: cakephp recursion

2009-10-08 Thread broxi
Thanks for the reply, I will look into that Later Broxi On Oct 8, 7:54 pm, Miles J wrote: > Ditch the recursion and use the Containable behavior. > > http://book.cakephp.org/view/474/Containable > > On Oct 8, 9:52 am, broxi wrote: > > > Hi all, > > > I am a toatl noob with cakephp, i am trying

Re: ability to users to delete their comment's

2009-10-08 Thread Miles J
Check that the logged in user matches the owner of the post. if ($post['Comment']['user_id'] == $this->Auth->user('id')) { $this->Comment->delete(); } On Oct 8, 2:33 pm, Simon wrote: > is there any way for the users delete their own comment's  not the > others how can i do  that ? --~--~---

Layout Help

2009-10-08 Thread Dave Maharaj :: WidePixels.com
I have 2 layouts crated one with a left side menu other with a right. In the layout i have the standard which loads the view. But how can i determine what to put on the sides? The side menu modeuls can be elements, but how do I call them so i can say on say index user login module sponsors e

Ajax Update Help

2009-10-08 Thread hahmadi82
Hi, I have a question about how to get a div to update after an ajax form submission. I have a file index.ctp which displays a list of parts. When you click on "add part", I use: $('a.js-ajax').live('click', function() { $('#ajax-test').load( $(this).attr('href'), function () {

Re: CakePHP Optimization - Apache Stress Test

2009-10-08 Thread robust solution
Dear TiuTalk First Of All I have to mention that the development environment is not like the production one. So in general MySQL server and Apache server are not on the same machine, although they are usually on the same segment of the network to male two things happen -RTT is minimal between t

Re: Problems with paginating HABTM data

2009-10-08 Thread Tamim A.
Anyone? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.

ability to users to delete their comment's

2009-10-08 Thread Simon
is there any way for the users delete their own comment's not the others how can i do that ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegro

Paginate Options

2009-10-08 Thread Dave Maharaj :: WidePixels.com
Any idea how to remove "page" from the pagination? So it shows search/2 rather than search/page:2 I know its been asked and still no luck in this answer. Thanks Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

Re: Auth component bug

2009-10-08 Thread Miles J
Try setting null instead of false, Cake acts weird sometimes with "false". On Oct 8, 12:05 pm, ben wrote: > I was able to overcome this behavior by setting this in my routes.php > > Router::connect('/admin/users/login', array('controller' => 'users', > 'action' => 'login')); > > It did the trick

Re: about https

2009-10-08 Thread Martin Westin
Find a certificate authority you like (price vs trust). They all have tutorials and detailed information on how to install their certificates. Or google for senf-signed certificates. (and non of it has anything to do with CakePHP...) On Oct 8, 5:45 am, wiky wrote: > Hi i am working on Solaris

Re: Auth component bug

2009-10-08 Thread ben
I was able to overcome this behavior by setting this in my routes.php Router::connect('/admin/users/login', array('controller' => 'users', 'action' => 'login')); It did the trick for me. My only issue now is that once the user is logged in they do not go back to the page they were attempting to

Re: cakephp recursion

2009-10-08 Thread Miles J
Ditch the recursion and use the Containable behavior. http://book.cakephp.org/view/474/Containable On Oct 8, 9:52 am, broxi wrote: > Hi all, > > I am a toatl noob with cakephp, i am trying to build a blog and i feel > that i am progresing quite well. I just have one question... > > I currently

CakePHP Optimization - Apache Stress Test

2009-10-08 Thread TiuTalk
Hi there, I'm developping an app with CakePHP runing on LAMPP enviroment using two front-end servers with 4Gb of RAM and one back-end server running only MySQL. The server owner run a stress test and my site can't hold more than 100 requisitions per second (see screenshots). How can I optimize

cakephp recursion

2009-10-08 Thread broxi
Hi all, I am a toatl noob with cakephp, i am trying to build a blog and i feel that i am progresing quite well. I just have one question... I currently have 4 models (post, user, comment, catgeory), when reading a post from the database with recursive=0 i only get the post,user and category data

Re: Cache View dose not work

2009-10-08 Thread Simon
i tired both element('logininfo', array('cache' => false)); ?> => this dosen't work at all in the element i tired which i see no debug error even though i set the debug 2 but when i see the view source page i get the errorr that i posted above thats wired problem that i cant figure out thank you

Re: Cache View dose not work

2009-10-08 Thread Miles J
Try playing the nocache tags in the element itself. You can also pass an option to the element of cache = false. element('logininfo', array('cache' => false)); ?> On Oct 8, 9:26 am, Simon wrote: > haven't tried to remove the cache helper would  that make any > difference ? > > sorry i just wrot

Re: Cache View dose not work

2009-10-08 Thread Simon
haven't tried to remove the cache helper would that make any difference ? sorry i just wrote the twice in this post but the code is like this see below in my layout element('logininfo'); ?> On Oct 8, 9:17 am, Miles J wrote: > Do you get an error when we remove the cache helper? > > Also

Develop Custom Components in PHP for the Conduit Platform

2009-10-08 Thread Avi Hein (Conduit)
Are you up to the challenge? Conduit, a SaaS platform that any web publisher can use to offer content and applications to users across the World Wide Web, has launched the Conduit Awards, to reward developers and programmers of custom components and applications for community toolbars that run on

Re: Notice+error after file upload

2009-10-08 Thread Miles J
Well I tried to take a look at like 695 in my class but you have an older version so we are not looking at the same thing. Try upgrading to 2.3 and let me know if the error happens again. You can also try using my attachment behavior in 2.3 http://www.milesj.me/resources/script/uploader-plugin

Re: Auth component bug

2009-10-08 Thread ben
I have the same exact issue and have been searching for a solution for several days now... On Sep 26, 4:06 am, Marcelo wrote: > I'm using Auth component and this is one of the settings in my > AppController's beforeFilter() method: > > $this->Auth->loginAction = array( >                        

View image from cache directory

2009-10-08 Thread Ziki
Hi, how to view image from cache folder, i have url in database for the image, and when i want them view i got error. I have link like this: /home/hrvatski/public_html/cake/app/tmp/cache/ thumbs/ e6b3c3fca1c6c496727147bb07e6595b_59de3ade3f1df7e79525167bd617bfb8.jpg i put them into doesn't wo

Re: Cache View dose not work

2009-10-08 Thread Miles J
Do you get an error when we remove the cache helper? Also the code should be: element('logininfo'); ?> On Oct 8, 7:44 am, Simon wrote: > well in that element it has the login user info which you dont wanna > cache > here is what i have in post controller > >  var $helpers = array('Cache'); >

Re: install other app under cake

2009-10-08 Thread rrd
The answer is here: http://groups.google.com/group/cake-php/browse_thread/thread/a3b4b82eefeb9d8a --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googleg

Re: Cache View dose not work

2009-10-08 Thread Simon
well in that element it has the login user info which you dont wanna cache here is what i have in post controller var $helpers = array('Cache'); in my view action i have this $this->cacheAction = '1 hour'; then in my default layout i have this element which i put the element('logininfo');

Re: Renaming a baked controller

2009-10-08 Thread vekija
In you viewr add array('action' => 'register') as a second parameter to form create function echo $form->create('ModelName', array('action' => 'register')); On Oct 8, 3:16 pm, toneee wrote: > Hi Guys, > > Im a little confused, im trying to rename a controller that I have > baked. > > I have cr

Renaming a baked controller

2009-10-08 Thread toneee
Hi Guys, Im a little confused, im trying to rename a controller that I have baked. I have created the standard index, add, view and delete controls, but i wanted to rename add to register? I have changed it everywhere I thought I had to, but still when I load the my form called register.ctp (th

Re: Intergrate cakephp with just static html pages

2009-10-08 Thread Matt Curry
Checkout the sample webroot.htaccess in the extras folder: http://github.com/mcurry/html_cache -Matt http://www.pseudocoder.com On Oct 8, 4:09 am, stefanski wrote: > Does anybody know what to do, if the static html page should be the > hompage of the site? > > There usually is by far the most t

Re: Intergrate cakephp with just static html pages

2009-10-08 Thread brian
Create a .ctp file from the static page, put it at app/webroot/home.ctp and let PagesControler serve it up. On Thu, Oct 8, 2009 at 4:09 AM, stefanski wrote: > > Does anybody know what to do, if the static html page should be the > hompage of the site? > > There usually is by far the most traffic

Select-List: Field select over Dialog and Table

2009-10-08 Thread Obelix
Hello, cakephp create in the form a select-list when connected to another table available. For tables with small data sets, it is certainly adequate. For large tables, the user wants select a field information on a table (eg select from index). The mode of operation may be such that it has an inp

Re: Set:sort "A Set-compatible path"

2009-10-08 Thread alberto
take my example , if I have an array like this "" Array ( [0] => Array ( [name_item1] => Array ( [date] => 2009-10-09 ) [name_item2] => Array ( [id] => 49

Re: install other app under cake

2009-10-08 Thread vekija
you can put your blog folder next to the app and edit the .htaccess file something like this... RewriteEngine on RewriteCond%{REMOTE_HOST} !^http://social.cc/blog$ RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] please note that I'm by no means an

install other app under cake

2009-10-08 Thread rrd...@gmail.com
Hari, I have a cake project on http://sociall.cc I want to install a wordpress blog to http://sociall.cc/blog. Where should I upload wordpress files? It seems if I just upload them to / blog near to /app It will not work. should I put the files to /app/ webroot/blog ? rrd --~--~-~--~---

Re: Complex model associations, pagination and containable

2009-10-08 Thread martinp
I've managed to get it working. The answer was simple, yet not obvious. In order to get these deep level associations working you need to add the association in the first model. In my case that's Model1 or CourseResult. This is how: var $belongsTo = array( 'Course' => arra

Re: Intergrate cakephp with just static html pages

2009-10-08 Thread stefanski
Does anybody know what to do, if the static html page should be the hompage of the site? There usually is by far the most traffic, so it would be great to have a static html (which could be generated as well) that the webserver could send without having to initialize the cakephp framework. I gu

access denied to my restricted pages

2009-10-08 Thread san1981
Hello, I'm a newbee in cakephp and I have a little problem with my administration access. I've created a route /admin to have access to all my administration pages with a login/password. The route /admin works nice, I'm automatically redirected to my login/password connection but when I try to c