RE: Getting Error ("Call to undefined method UsersController::element()")

2011-03-23 Thread Krissy Masters
Cookbook cookbook cookbook! Did you read any of it? NO! The answers are in the guide to get all the NEWBIES started! It was written so NEWBIES can read it and start with some idea of how to move forward. Want to get $abc to the controller read the book there is a sections dealing with it and other

Re: Getting Error ("Call to undefined method UsersController::element()")

2011-03-23 Thread Jeremy Burns | Class Outfit
Instead of struggling, guessing and experimenting the online guide is a really good place to find these answers: http://book.cakephp.org/view/1082/Passing-Variables-into-an-Element Jeremy Burns Class Outfit jeremybu...@classoutfit.com (t) +44 (0) 208 123 3822 (m) +44 (0) 7973 481949 Skype: jere

Re: Getting Error ("Call to undefined method UsersController::element()")

2011-03-23 Thread Shashank
ok thanks a lot for your support bro...I got it working with your help..Cheers!!! On Thu, Mar 24, 2011 at 11:16 AM, Jeremy Burns | Class Outfit < jeremybu...@classoutfit.com> wrote: > In your controller: > - $this->set('abc', $abc); > > In your view: > - echo $this-element('left', array('abc' =>

Re: Getting Error ("Call to undefined method UsersController::element()")

2011-03-23 Thread Jeremy Burns | Class Outfit
In your controller: - $this->set('abc', $abc); In your view: - echo $this-element('left', array('abc' => $abc)); In your element: - echo $abc; Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 24 Mar 2011, at 05:43, Shashank wrote: > so then tell me one thing

Re: Getting Error ("Call to undefined method UsersController::element()")

2011-03-23 Thread Shashank
so then tell me one thing... i have a varibale $abc in my controller... How can i get it in my app/views/elements/left.ctp file?? On Thu, Mar 24, 2011 at 11:10 AM, Jeremy Burns | Class Outfit < jeremybu...@classoutfit.com> wrote: > Yes, this is a view function. Think of an element as an include t

Re: Getting Error ("Call to undefined method UsersController::element()")

2011-03-23 Thread Jeremy Burns | Class Outfit
Yes, this is a view function. Think of an element as an include that renders data; so it can only be called in a view. A navigation menu or log in panel are good examples. If you want to have common functions that process data and are accessible from many controllers, use a component. Elements

Re: Getting Error ("Call to undefined method UsersController::element()")

2011-03-23 Thread Shashank
i am calling it in my controller why?? Am i doing it wrong?? I am new to cake php so dont have much idea abt this.. On Thu, Mar 24, 2011 at 11:03 AM, Jeremy Burns | Class Outfit < jeremybu...@classoutfit.com> wrote: > Are you calling this in a view or in a controller? > > Jeremy Burns > Class Out

Re: Getting Error ("Call to undefined method UsersController::element()")

2011-03-23 Thread Jeremy Burns | Class Outfit
Are you calling this in a view or in a controller? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 24 Mar 2011, at 05:31, Shashank wrote: > I am getting this error while using echo $this->element('left', > array("b" => "current")); > > Error i am getting

Getting Error ("Call to undefined method UsersController::element()")

2011-03-23 Thread Shashank
I am getting this error while using echo $this->element('left', array("b" => "current")); Error i am getting is: Call to undefined method UsersController::element() Can someone tell me wats the issue here is?? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp

Re: i'm newbie

2011-03-23 Thread Sam Sherlock
Cake bakes php app - app contain various classes or templates (.ctp) all php so it is possible to auto make files - sets of MVCs that related to each other behaviours, componants, helpers use php classes to extend app functionality ctp files call helpers and allow you to mix php /html using var

Re: i'm newbie

2011-03-23 Thread aji ipank
is this possible for us to write .php files? and when it possible, where i can put that .php files? in app/views/pages or in another directory? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and

Re: CakePHP pre populate select box based on existing selection on related model

2011-03-23 Thread cricket
On Wed, Mar 23, 2011 at 8:25 PM, OldWest wrote: > I am trying to pre-populate this State select box with the existing > selection when editing records. in a related model. > > plan_details/view.ctp > > echo $this->Form->input('State',array('empty' => false,'options' => > $state)); > > plan_details

RE: New to CakePhp

2011-03-23 Thread Krissy Masters
Hi, lets say you read the book! It has answers! It really does. It was written for that purpose of explaining how to do things! You have to create a controller / model / view for everything that needs a controller / model / view. K -Original Message- From: cake-php@googlegroups.com [ma

Re: New to CakePhp

2011-03-23 Thread drjproduct...@gmail.com
Hi let's say I have created a user and admin panel so how can I come about creating another space for clients in the admin panel? Do I have to do another file like client_controller and a clients.ctp and client.php? Sent from my iPhone On Mar 24, 2011, at 5:45 AM, "Krissy Masters" wrote: > Y

form helper hides all form inputs

2011-03-23 Thread arron
I am using a jquery plugin stepy which turns my long form into a wizard. My whole form is written to comply with the form helper example create('relate',array('id'=>'default','name'=>'submit'));?> input('FirstOwner.fname');?> input('FirstOwner.lname');?>

Re: Performance of CakePHP 2.0

2011-03-23 Thread Ziki
Currently it is on shared hosting with eAccelerator, HTML caching can be provided for few pages, but with other it is not possible because content is full dynamically and it will be changed all the time. This web application is complex, because its complexity I choose Cake. On 23 ožu, 19:49, "Ma'

RE: New to CakePhp

2011-03-23 Thread Krissy Masters
Your best to, like all new to Cake is to read the cookbook. Try the blog tutorial to get familiar with how things work, then you can attempt your own and ask specific questions. No one is going to answer general vague questions like that without actually building everything for you. Panes? Related

New to CakePhp

2011-03-23 Thread cakenewbie
hi, I have knowledge about PHP but i am totally new to the cakephp. I have really no idea how can i come about to create these features using the cakephp. Can anyone give me some idea or some guide? 1. Create User Panels 2. Create Clients Panel 3. Create Listing Of Clients with Categories Listin

Re: CakeDC users plugin

2011-03-23 Thread Sam Sherlock
I think connecting the admin login to the non admin login will work Router::connect('/admin/users/login', array('plugin' => 'users', 'prefix' => null, controller' => 'users', 'action' => 'login')); On 23 March 2011 18:39, Ryan Schmidt wrote: > > On Mar 23, 2011, at 10:16, Sam Sherlock wrote:

Re: SQLNull Character

2011-03-23 Thread Kole Reece
I figured it out.I was using the form helper.The has many realtionship expects field names like $this->form->input( Account.0.new).Instead I was just using Account.new and placed a random null character.Does anyone no why it expects the field name in this format ? On Wed, Mar 23, 2011 at 1:49 PM,

Re: Performance of CakePHP 2.0

2011-03-23 Thread Ma'moon
1) Have you tried using a bytecode cacher? i think that you should consider using APC or Xcache if you are not using one of them already! 2) Have you considered using HTML Caching for your site, this will "seriously" help reducing server processing! On Wed, Mar 23, 2011 at 1:28 PM, Ziki wrote: >

Re: CakeDC users plugin

2011-03-23 Thread Ryan Schmidt
On Mar 23, 2011, at 10:16, Sam Sherlock wrote: > http://localhost/sample/admin/users/users/ > is the one > > this works fine for me as far as I recall When I access http://localhost/admin/users/users It redirects to http://localhost/admin/users/login and says Error: LoginController could n

Re: How to Configure Search Url...?

2011-03-23 Thread Mr.Jayesh
Thanks for the tip. But, On integrating this, I am getting an error: Invalid argument supplied for foreach() I tries various methods to get it done. But, no success. Anything else can I try. Thanks again. Regards Jayesh On Mar 23, 1:05 pm, Tilen Majerle wrote: > //try this > > function search(

Re: CakeDC users plugin

2011-03-23 Thread Zaky Katalan-Ezra
In a dozen other projects yes but not in this one. Thank you On Wed, Mar 23, 2011 at 7:44 PM, Sam Sherlock wrote: > have you got > line 88 (ish) - Configure::write('Routing.prefixes', array('admin')); > of app/config/core.php > > http://book.cakephp.org/view/950/Prefix-Routing > - S > > > > >

Re: SQLNull Character

2011-03-23 Thread cricket
On Wed, Mar 23, 2011 at 12:50 PM, Kreece wrote: > I am having a  problem where replaces the first character of my data > with a null character here is the SQL that cake generates. > > INSERT INTO `locations` (`new`) VALUES ('\0reen') Looks like something's replacing random words in your message w

Re: CakeDC users plugin

2011-03-23 Thread Sam Sherlock
have you got line 88 (ish) - Configure::write('Routing.prefixes', array('admin')); of app/config/core.php http://book.cakephp.org/view/950/Prefix-Routing - S On 23 March 2011 17:33, Zaky Katalan-Ezra wrote: > I get this message: > Missing Controller > > *Error: * *AdminController* could not

APC / Memcache

2011-03-23 Thread Krissy Masters
I have found 2 pretty slick pages that display APC / and Memcache server variables, charts what not. Original files: http://livebookmark.net/journal/2008/05/21/memcachephp-stats-like-apcphp/ http://www.electrictoolbox.com/apc-php-cache-information/ <= file comes with APC just a read doc here Now

Re: CakeDC users plugin

2011-03-23 Thread Zaky Katalan-Ezra
I get this message: Missing Controller *Error: * *AdminController* could not be found. *Error: * Create the class *AdminController* below in file: app/controllers/admin_controller.php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakeP

Re: Performance of CakePHP 2.0

2011-03-23 Thread Ziki
My site is not so slow, but if I will have a lot of users this will be a problem. Here is image http://dl.dropbox.com/u/905349/loadtimer.png of timer for loading the site. Only problem is cake core, and because of this I am asking is 2.0 version faster. On 23 ožu, 14:42, MaxDao wrote: > I have sa

SQLNull Character

2011-03-23 Thread Kreece
I am having a problem where replaces the first character of my data with a null character here is the SQL that cake generates. INSERT INTO `locations` (`new`) VALUES ('\0reen') -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questi

Re: CakeDC users plugin

2011-03-23 Thread Sam Sherlock
http://localhost/sample/admin/users/users/ is the one this works fine for me as far as I recall On 23 March 2011 04:28, Zaky Katalan-Ezra wrote: > Also in the users index view the edit and view buttons next to each users > pass the user id when view is looking for slug parameter and edit need

Re: Performance of CakePHP 2.0

2011-03-23 Thread MaxDao
I have same question about performance, and can't wait till we have more stable version to test it. I have cakephp 1.1 project willing to upgrade, however 1.3 is slower than 1.1 On 22 Бер, 15:19, Ziki wrote: > Hi, > > I am developing complex website (business and social network) with > 1.3.6 vers

Re: Putting several views inside a single layout

2011-03-23 Thread Tilen Majerle
yes, use elements http://book.cakephp.org/view/1081/Elements -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/3/23 SasMaster > Hi All. I am new to CakePHP. Trying to make my way through the basics > now.In the Blog tutorial I have learned that the layouts wrap views.So > in the tutoria

Putting several views inside a single layout

2011-03-23 Thread SasMaster
Hi All. I am new to CakePHP. Trying to make my way through the basics now.In the Blog tutorial I have learned that the layouts wrap views.So in the tutorial the example layout shows this line $content_for_layout which loads a specific view.My question is if I wish to put several views inside a sing

Re: PHP_EOL bug in cake 1.2

2011-03-23 Thread Stephen
Good idea :) On 23 March 2011 11:23, designv...@gmail.com wrote: > Ahhh - I'm running 4.3.4 > > I have fixed it with: > > if (!defined('PHP_EOL')) { >switch (strtoupper(substr(PHP_OS, 0, 3))) { >case 'WIN': >define('PHP_EOL', "\r\n"); >break; >case 'DA

Re: PHP_EOL bug in cake 1.2

2011-03-23 Thread designv...@gmail.com
Ahhh - I'm running 4.3.4 I have fixed it with: if (!defined('PHP_EOL')) { switch (strtoupper(substr(PHP_OS, 0, 3))) { case 'WIN': define('PHP_EOL', "\r\n"); break; case 'DAR': define('PHP_EOL', "\r"); break; default:

Re: PHP_EOL bug in cake 1.2

2011-03-23 Thread Stephen
*PHP_EOL* (string ) Available since PHP 4.3.10 and PHP 5.0.2 It's so that it generates the correct newline for the correct OS. Have anymore information on your issue? On 23 March 2011 10:23, designv...@gmail.com wrote: > I have just upd

PHP_EOL bug in cake 1.2

2011-03-23 Thread designv...@gmail.com
I have just updated one of my apps to latest 1.2 version and found that emails being sent by the app were broken due to cake using PHP_EOL. My server is php4 and PHP_EOL is a php5 constant I think? I thought 1.2 was fully compatible with php4? If it's not then I will rollback to the last working

Re: how do i customize a error404 for themes?

2011-03-23 Thread kimsia
Thank you. I have resolved it in another way. Albeit convoluted. Regards KimSia 金城 On Wed, Mar 23, 2011 at 5:27 PM, Stephen wrote: > Could this snippet help you? > > http://pastie.org/private/v8ektthqwkqgpntqxxyxoa > > This is how the 404 errors are handled in 1.2 > > On 23 March 2011 06:40,

Re: how do i customize a error404 for themes?

2011-03-23 Thread Stephen
Could this snippet help you? http://pastie.org/private/v8ektthqwkqgpntqxxyxoa This is how the 404 errors are handled in 1.2 On 23 March 2011 06:40, Zeu5 wrote: > Hi, > > > i am currently using http://github.com/m3nt0r/cakephp-twig-view plugin > for theming issues. > > Long story short, instead

Re: i'm newbie

2011-03-23 Thread Stephen
It's the same as using a .php extension, .ctp stands for "Cake Template" On 23 March 2011 07:55, Tilen Majerle wrote: > yes it is... > -- > Lep pozdrav, Tilen Majerle > http://majerle.eu > > > > 2011/3/23 aji ipank > >> emmhh...1 more question, is this .ctp file is compatible if i write >> php

Re: Passing variable From Controller to a View

2011-03-23 Thread Tilen Majerle
$this->set('variable_name_in_view', $her_value); //in controller -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/3/23 Shashank > Hi Guys, > This might be a stupid question, but i am really not getting it into > play after so many tries. > What i have is a left.ctp file in my app/views/ele

Passing variable From Controller to a View

2011-03-23 Thread Shashank
Hi Guys, This might be a stupid question, but i am really not getting it into play after so many tries. What i have is a left.ctp file in my app/views/elements And what i am trying to do is, i have a function show in my users controller and in that function i am setting a variable to use in view fi

Re: How to Configure Search Url...?

2011-03-23 Thread Tilen Majerle
//try this function search() { $url['action'] = 'index'; foreach ($this->data['Search'] as $k=>$v){ foreach ($v as $kk=>$vv){ $url[$k.'.'.$kk]=$vv; } } $this-

How to Configure Search Url...?

2011-03-23 Thread Mr.Jayesh
Ho All, Hope Baking is at its Peak. I am using below code from which I am getting url like this: example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3 How to configure this, so that I get url like these: example.com/cake/posts/index/keywords:mykeyword/tag_id:3 function search()

Re: i'm newbie

2011-03-23 Thread Tilen Majerle
yes it is... -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/3/23 aji ipank > emmhh...1 more question, is this .ctp file is compatible if i write > php code inside the .ctp file? sory for my bad english.. thank you.. > > On 22/03/2011, Ryan Schmidt wrote: > > > > On Mar 22, 2011, at 08:4

Re: i'm newbie

2011-03-23 Thread aji ipank
emmhh...1 more question, is this .ctp file is compatible if i write php code inside the .ctp file? sory for my bad english.. thank you.. On 22/03/2011, Ryan Schmidt wrote: > > On Mar 22, 2011, at 08:43, Robert Bodley wrote: > >> Hi I'm also a Newbie can someone please expain how the function page

RE: cache action not working

2011-03-23 Thread Krissy Masters
All that is set up correct. Caching works on other models for me. Just having issues with this 1 data set. Seems like it just does not want to delete. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp

Re: cache action not working

2011-03-23 Thread ava
debug 0 Cache.disable Cache.check 1 Cache.disable was set to false. However, I reading it returns empty string On Mar 22, 11:26 pm, gremlin wrote: > Do you have debug set to 0? If you are seeing the query log then you > likely don't and with a setting of anything higher than 0 the ca