Verify username, Ajax observeField - How to display the error message?

2010-08-26 Thread Louie Miranda
I am trying to get ajax to work on my username field to check if the account is taken or not using this function. http://bin.cakephp.org/view/1632401399 The function works. And the view/register.ctp (below) http://bin.cakephp.org/view/258044293 Works too, I debug using Firebug. I am just

$html-link problem

2010-08-26 Thread hoss7
i want create some link like this: a class=tooltip href=#Informationspan class=custom infoimg src=Info.png alt=Information height=48 width=48 /emInformation/em text/span/a what is $html-link code? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP

Does every model need a name field? Why?

2010-08-26 Thread psybear83
Hi all I'm just digging into CakePHP and continue an application of my previous co-worker. He told me that every model needs a name field in the database. Why's that? I did a search on Google but could't find an answer... Thanks Josh Check out the new CakePHP Questions site http://cakeqs.org

Re: Does every model need a name field? Why?

2010-08-26 Thread Robert J. Maiolo
perhaps he meant a name variable, as shown in the following example: 1. ?php 2. class Ingredient extends AppModel { 3. var $name = 'Ingredient'; 4. } 5. ? On Thu, Aug 26, 2010 at 1:23 AM, psybear83 psybea...@gmail.com wrote: Hi all I'm just digging into CakePHP and

Re: Does every model need a name field? Why?

2010-08-26 Thread Jeremy Burns | Class Outfit
Not strictly accurate - you do not need to have either a name or title field in your table, but they have their uses. Cake can use a 'name' or 'title' field to automatically populate lists and such. Having said that, you can override it with var $displayField in your model. See:

XML to Array

2010-08-26 Thread Yusuf Widiyatmono
hi there.. i have an xml file which was generated by me from an array by cakephp function xml-compose(true) ?xml version=1.0 encoding=UTF-8 ? category id=255 name=accomodation relation=5 concept id=249 name=hotel / concept id=277 name=inn / concept id=289 name=appartement / concept id=301

Re: using javascript helper on 404

2010-08-26 Thread ohcibi
Try including the JSHelper in app_helper.php On 25 Aug., 23:34, M mask1...@gmail.com wrote: javascript helper is used in default.ctp. when Missing Controller, javascript is not loaded. i thought pages controller is reading 404.ctp so i copied it from cake/lib to app/ controller and added

Master / Slave switch support / load balancing

2010-08-26 Thread MissYeh
I have found 3 resources on how to implement master/slave into Cake 1) (preferable) http://www.gamephase.net/posts/view/master-slave-datasource-behavior-cakephp 2) http://bakery.cakephp.org/articles/view/master-slave-support-also-with-multiple-slave-support 3)

Add stuff to scaffold's add action using a hook or so?

2010-08-26 Thread psybear83
Hi all I'd like to change some stuff of a scaffold's add action, but I don't want to re-write its whole code. I'd rather just sneak some more code into it, e.g. to set the flash based on the value of some input. Is this possible? Thanks. Josh Check out the new CakePHP Questions site

Re: Online Documentation

2010-08-26 Thread McBuck DGAF
Why not just generate your own on the fly so it is always up to date? paste this link: http://groups.google.com/group/cake-php/web/faq and follow the instructions. On Aug 25, 10:39 am, Okto Silaban o...@silaban.net wrote: You can get it here :http://www.doocu.com/pdf/view/17590 It's not

send email message to HABTM clients

2010-08-26 Thread fadh capaik
hi everyone. i have a problem to build send mass email message to selected client in HABTM. i have read the manuals. but i dont find how to use it in a HABTM. anyone can help me or send me an example. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP

Cheat Sheet is DOwn

2010-08-26 Thread Adam
I went to download the cheat sheet, because it's awesome, and I got a file not found error: Error: The requested address '/files/Resources/CakePHP-1.2- Cheatsheet.pdf' was not found on this server. Luckily google had it cached, but it might be a good idea to fix it for other folks. Adam Check

Controller::render not running actions?

2010-08-26 Thread jostster
Is it just me misunderstanding what this is supposed to do or is it a bug? I have an Upload controller with 2 actions. index(): This is where the database query is done to retrieve dropdown list values and send them to the index.ctp where the form is created. upload(): This is where the

a simple problem-pls help

2010-08-26 Thread cake fan
i have the following controller implementing auth: ?php class TestsController extends AppController{ var $components = array('Auth'); function index(){ } function login(){ } function logout(){

translate SQL query (with subquery) into cake style query

2010-08-26 Thread Mariano C.
I have this SQL query: SELECT * FROM books AS Book INNER JOIN authors AS Author ON Author.id = Book.author_id LEFT JOIN (SELECT bu.book_id, bu.user_id FROM books_users AS bu WHERE bu.user_id = xyz) AS bud ON Book.id = bud.book_id ORDER BY Book.owners DESC LIMIT 5 I have read

Re: Controller::render not running actions?

2010-08-26 Thread Jeremy Burns | Class Outfit
Render just does what it says it will; render a view. It does not run the controller action with the same name. You can try $this-index(); which will run the action, but I'm not sure if the values you have set will be available. You could drop them into a keyed array (instead of loads of

Re: send email message to HABTM clients

2010-08-26 Thread Jeremy Burns | Class Outfit
You'll need to create an array of all the email addresses you want to send the email to (by doing a find) and do a loop through them, calling the email function many times. Don't forget to use $this-Email-reset(); when you are sending emails in a loop. Jeremy Burns Class Outfit

save a model, how to specify to do a INSERT HIGH PRIORITY

2010-08-26 Thread eugenioc...@hotmail.com
Hi to everyone, i have a simple problem, i want to save a model, the Vote model. The Vote model table has a lot of indexes, so the insert i a bit slow. For security reasons (avoid duplicate vote) i need to save the model vote with a INSERT HIGH PRIORITY (i am using mysql). Is there some way to

Re: Controller::render not running actions?

2010-08-26 Thread jostster
Well I would expect Controller::render(); to run the controller action the view and only View::render() to render the view. On Aug 26, 7:31 am, Jeremy Burns | Class Outfit jeremybu...@classoutfit.com wrote: Render just does what it says it will; render a view. It does not run the controller

Re: delete() clears record, does not delete?

2010-08-26 Thread cricket
On Wed, Aug 25, 2010 at 1:40 PM, DragonFlyEye dragonflyey...@gmail.com wrote: Here's an interesting one. I don't know if this has something to do with using the Tree model behavior or not.  What is happening is that, when I go to delete a record, the system clears all values except for the ID

$paginator-numbers() not maintaining sort / direction

2010-08-26 Thread David Cole
I'm having an issue where I want to maintain the sort and direction in the page links. So in sort I do this: ?php echo $paginator-numbers(array('separator' = '', 'tag' = 'span')); ? Which prints my page numbers and appropriate links, and then manually input in the URL:

Re: $paginator-numbers() not maintaining sort / direction

2010-08-26 Thread cricket
On Thu, Aug 26, 2010 at 3:02 PM, David Cole d...@coledesignstudios.com wrote: I'm having an issue where I want to maintain the sort and direction in the page links. So in sort I do this: ?php echo $paginator-numbers(array('separator' = '', 'tag' = 'span')); ? Which prints my page numbers

Re: $paginator-numbers() not maintaining sort / direction

2010-08-26 Thread David Cole
I've tried that as well, it ignores the sort and direction keys. On Aug 26, 2:32 pm, cricket zijn.digi...@gmail.com wrote: On Thu, Aug 26, 2010 at 3:02 PM, David Cole d...@coledesignstudios.com wrote: I'm having an issue where I want to maintain the sort and direction in the page links. So

Re: $paginator-numbers() not maintaining sort / direction

2010-08-26 Thread David Cole
Well, I've done a hack for the time being until someone has a better idea? for($i = 1; $i = $params['pageCount']; $i++) { if ($i == $params['page']) { echo 'span'.$i.'/span'; } else { $args = $this-passedArgs; $args['page'] = $i;

Re: $paginator-numbers() not maintaining sort / direction

2010-08-26 Thread euromark
maybe you have an old version! in my 1.3.3 everything works fine and i actually cannot remember it ever did not.. On 26 Aug., 21:43, David Cole d...@coledesignstudios.com wrote: Well, I've done a hack for the time being until someone has a better idea? for($i = 1; $i = $params['pageCount'];

model-delete error

2010-08-26 Thread lloydhome
Hi, I have v1.3.2 running on a production site that has in a controller: (effectively, some non-related code removed) $results = $this-Pipe-find('all', array('conditions'=$conditions)); if(sizeof($results) 1) { $pipes = sizeof($results); for($i = 0; $i $pipes - 1; $i++) {

Re: Router::connect() not behaving as expected in 1.3?

2010-08-26 Thread SacoDesign
Thanks for the response. I still cannot get the entire directory to respond as a controller without 2 router::connect() calls. I removed the 'action'='index' as suggested. Has anyone else experienced this issue? I removed every route from my routes.php and tried the following:

Re: Controller::render not running actions?

2010-08-26 Thread Dmitry Shevchenko
Hi. You should use a requestAction() http://book.cakephp.org/view/434/requestAction On 26 авг, 18:49, jostster josts...@gmail.com wrote: Well I would expect Controller::render(); to run the controller action the view and only View::render() to render the view. On Aug 26, 7:31 am, Jeremy

How to use $session in the helpers

2010-08-26 Thread Dmitry Shevchenko
Hi. I use $session in my views like $session-read('some_var') and it have same values as on controller (I mean $this-Session-read('some_var')) But when I tried to use it on helper I get error that session are not defined. Is there any way to use $session inside the helper? Thank you for you

Data validation before submit

2010-08-26 Thread sanedevil
heya! is there a way to validate the data before submission using Cake? Thanks! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups CakePHP group. To post to

CakeFest 2010 - The CakePHP Conference - Final chance for tickets

2010-08-26 Thread Graham Weldon
Hey bakers, Just letting you know that we've got 7 days until CakeFest 2010 officially launches! We have a huge lineup for what is our biggest and best event ever! Come and celebrate five years of CakePHP with the community and CakePHP team in Chicago, Illinois from September 2nd through

Error on adding user with Auth component on

2010-08-26 Thread Chuck
When I have the Auth component on (component added to app_controller.php, login(), logout() and beforeFilter() methods added to user_component.php) and I attempt to add a user, the record gets added, but I get the following error: Notice (8): Undefined property: UsersController::$Session [APP/

Applications build with 1.2.6 could run with 1.2.8?

2010-08-26 Thread saidbakr
Hi, I have an application build with CakePHP 1.2.6. I downloaded CakePHP 1.2.8 and then I replaced the current cake folder with the new cake folder, where all paths are kept without change. However, the cake does not able to work with the new 1.2.8. In other word: my cake 1.2.6 library was found

Re: Verify username, Ajax observeField - How to display the error message?

2010-08-26 Thread Louie Miranda
Anyone? -- Louie Miranda - Email: lmira...@gmail.com - Web: http://www.louiemiranda.com On Thu, Aug 26, 2010 at 2:37 PM, Louie Miranda lmira...@gmail.com wrote: I am trying to get ajax to work on my username field to check if the account is taken or not using this function.

partial views with data components ? helper ? ...

2010-08-26 Thread patie
hi, please tell me how can i make some like sidebar boxes (news, ads, subnavigation) - some boxes only on some pages i want call some box from view or from controller please show me the way sry for poor english : THANKS Check out the new CakePHP Questions site http://cakeqs.org and help

Use of unconventional table/field names

2010-08-26 Thread adam_frm
(Posted this at the unofficial cakephp forums as well) Hi everyone, We have a problem we are unable to solve. We have two applications that are supposed to share a specific database, one is coded in ASP Classic and the new one in cakePHP. The problem is that the database structure does not follow

Using cufon with cakephp

2010-08-26 Thread gvphoenix
I'm trying to use cufon font replacement with a cakephp app. I can get the two js files referenced fine in the header with this: ?php echo $html-script(array('cufon- yui','Pigiarniq_Heavy_400.font.js')); ? but I'm hung up on the syntax for the last piece for cufon: script type=text/javascript

Re: Use of unconventional table/field names

2010-08-26 Thread jsalonen
Hi, Recently I had the same problem, originally I had been using Cake's default naming conventions but then had to change the names of the database fields and tables because of a policy change. It's actually easier to do it that it may appear. To change the name of the database table that backs a