Re: Select input

2009-03-13 Thread Miles J
This removes the empty option, and sets low as default. echo $form->select('level', array ('0'=>'Low','1'=>'Medium','2'=>'High'), 0, false, false); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To

Re: one or two parameters

2009-03-13 Thread Miles J
In the link you sent me, that code isn't even existent. This is however: // uses the ticket to reset the password for the correct user. function password($hash = null) { if ( $email = $this->Tickets->get($this->params['controller'], $hash) ) { --~--~-~--~~-

Re: Select input

2009-03-13 Thread Marcelo Andrade
On Fri, Mar 13, 2009 at 10:12 PM, Samuel DeVore wrote: > > echo $form->select('level', > array('0'=>'Low','1'=>'Medium','2'=>'High'), array('selected'=>'0')); Or, in this particular case, just echo $form->select('level', array('Low','Medium','High')); Best regards. -- MARCELO DE F. ANDRADE (a

Ajax observeField()

2009-03-13 Thread Aurelius
Whats wrong whit this code, why doesn't it work? I'm getting no Error or Wanring from Cake, but the code is not added to the html output :-/ [code lang=php] ... form: echo $form->input('User.name', array('id'=>'username')); ... array('controller'=>'users','action'=>'getAJAX', $user ['User']['id'

RE: Select input

2009-03-13 Thread Dave Maharaj :: WidePixels.com
Yes..i see the false setting you pointed out for the blank field. Thanks Dave -Original Message- From: Samuel DeVore [mailto:sdev...@gmail.com] Sent: March-13-09 11:00 PM To: cake-php@googlegroups.com Subject: Re: Select input On Fri, Mar 13, 2009 at 6:23 PM, Dave Maharaj :: WidePixe

Re: Select input

2009-03-13 Thread Samuel DeVore
On Fri, Mar 13, 2009 at 6:23 PM, Dave Maharaj :: WidePixels.com wrote: > > > > echo $form->select('level', array('0'=>'Low','1'=>'Medium','2'=>'High'), > array('selected'=>'Low')); > > Renders this > > > Low > Medium > High > Is it safe to say that you sent this before reading my response? --

RE: Select input

2009-03-13 Thread Dave Maharaj :: WidePixels.com
echo $form->select('level', array('0'=>'Low','1'=>'Medium','2'=>'High'), array('selected'=>'Low')); Renders this Low Medium High -Original Message- From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] Sent: March-13-09 10:46 PM To: cake-php@googlegroups.com Subject: RE:

Re: Select input

2009-03-13 Thread Samuel DeVore
http://api.cakephp.org/class/form-helper#method-FormHelperselect (hint look at the last param) http://book.cakephp.org/view/204/Form-Element-Specific-Methods#select-728 (hint look at the last param) -- (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line b

RE: Select input

2009-03-13 Thread Dave Maharaj :: WidePixels.com
Thanks, it’s a bit closer. That did get rid of the 1 and 2 that was showing in the drop down. Only thing is there is still a blank field at the top. Dave -Original Message- From: Samuel DeVore [mailto:sdev...@gmail.com] Sent: March-13-09 10:43 PM To: cake-php@googlegroups.com Subject: R

Re: Select input

2009-03-13 Thread Samuel DeVore
echo $form->select('level', array('0'=>'Low','1'=>'Medium','2'=>'High'), array('selected'=>'0')); try that On Fri, Mar 13, 2009 at 5:55 PM, Dave Maharaj :: WidePixels.com wrote: > I been looking at the API for this and still cant get it right. > API echo $form->select( $fieldName, $options = arr

Select input

2009-03-13 Thread Dave Maharaj :: WidePixels.com
I been looking at the API for this and still cant get it right. API echo $form->select( $fieldName, $options = array ( ), $selected = NULL, $attributes = array ( ), $showEmpty = '' ) Can someone tell me whats wrong with this? echo $form->select('level', array(array('0'=>'Low'), array('1'=>'Med

Re: Book Comments - Should they be removed

2009-03-13 Thread aranworld
I like where Martin is going. I think it would be fantastic if we could see all proposed/submitted edits for a particular section. That would be much more useful than the comments, and I think it would also encourage people to provide edits if they were able to see what kinds of submissions had

Re: one or two parameters

2009-03-13 Thread Delirium tremens
The get function is defined with one parameter ($ticket), then it is called with two parameters ($this->params['controller'] and $hash). How come that is right??? On 13 mar, 18:10, Miles J wrote: > Yes? Theres nothing wrong with that code. --~--~-~--~~~---~--~~ Yo

Re: authorize.net redirect

2009-03-13 Thread SergioTorresC.
Thank you Samuel, I think your solution is valid and it's going to solve my problem. Have a nice day, Sergio. On Mar 13, 1:43 pm, Samuel DeVore wrote: > I had a similar problem and I created a page in between them filling > out 'my form' and sending them to Authorize.net (it is a confirmation

Re: one or two parameters

2009-03-13 Thread Miles J
Yes? Theres nothing wrong with that code. --~--~-~--~~~---~--~~ 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

Re: Performance different between cakephp 1.1 and 1.2

2009-03-13 Thread Miles J
Ive never had cake 1.2 load longer then 2 seconds. I would suggest downloading and installing the plugin, debug kit. It shows how long everything takes to load (controller, model, queries, etc). You can use this to determine the problem. I would double check all your model associations as well. -

Re: Search Function

2009-03-13 Thread Miles J
You should build it into pagination. --~--~-~--~~~---~--~~ 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-

Re: Multiple User Levels Without ACL

2009-03-13 Thread Chez17
Thank you for the article and the advice. I decided not to use it because there wasn't a lot of documentation around the web on it and I didn't want to go "all in" on something that is experimental. Again, thanks for the article. On Mar 13, 2:41 pm, brian wrote: > On Fri, Mar 13, 2009 at 2:34 PM

Re: Jake question: rewrite problem?

2009-03-13 Thread Robin
Anybody can help please? Thanks so much! Robin On Mar 13, 1:08 am, Robin wrote: > Hi Brendon, Thanks for the response. I am following the documentation > on Jake's > website:http://dev.sypad.com/projects/jake/documentation/configuration/. > It didn't specify whether joomla has to be installed

Re: Manual sorting of data records (datasets)

2009-03-13 Thread brian
On Fri, Mar 13, 2009 at 3:50 PM, hasentopf wrote: > > Hi all. > > One more question: > > I tried it with the "Table Drag and Drop JQuery plugin" from > http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/ > > The Plugin returns a string of the form "tableId[]=rowId1&tableId[] > =rowId

RE: Search Function

2009-03-13 Thread Dave Maharaj :: WidePixels.com
I have this as a basic starting point. Which does the basic search of the 2 fields title and description. If I search for 1 word it works. If I use some, word, other it returns nothing. How can I search other tables for related data (TAGS) CONTROLLER: function search() { if (!empty($this->

Re: Manual sorting of data records (datasets)

2009-03-13 Thread hasentopf
Hi all. One more question: I tried it with the "Table Drag and Drop JQuery plugin" from http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/ The Plugin returns a string of the form "tableId[]=rowId1&tableId[] =rowId2&tableId[]=rowId3…" via Ajax. I wrote an Action which receives thi

Re: Auth Component custom error message for different situations

2009-03-13 Thread Dhana
Great, I will try that out when I get home today. Thanks Dhana On Mar 13, 6:09 am, Brendon Kozlowski wrote: > I can't look up the exact steps to do this at the moment (rushing to > prepare for a meeting), but going from memory I believe you'd actually > take advantage of the empty login() funct

Re: authorize.net redirect

2009-03-13 Thread Samuel DeVore
I had a similar problem and I created a page in between them filling out 'my form' and sending them to Authorize.net (it is a confirmation looking page and explains why they are going to a new site) this page is a form of just hidden fields and a 'Continue' (the submit button) and a 'Cancel' butt

Re: how to generate .mo file

2009-03-13 Thread Alexandru Ciobanu
K3 wrote: > What i would like to do is to allow the client to change msgid and > msgstr in the .po file and geneerate .mo file. This way they can > update translation withouth asking me to change .po/.mo files manualy. > While .po file is plain text and its easy to update it, i coudlnt find > a wa

Re: Multiple User Levels Without ACL

2009-03-13 Thread brian
On Fri, Mar 13, 2009 at 2:34 PM, Chez17 wrote: > > I am trying to code a system with 3 different user levels, admin, > technicians, and clients. They all have logins and will use the users > controller. My question is a philosophical one, not a technical one. > So I have the technicians and clien

Re: authorize.net redirect

2009-03-13 Thread SergioTorresC.
Thank you for your help Samuel, I am not sure I understand what you say. Do you mean you pass the client all the authorize.net hidden fields and set the form action to be processed by authorize.net instead of your app? In this case I would have problems with this solution, since I need to do so

Multiple User Levels Without ACL

2009-03-13 Thread Chez17
I am trying to code a system with 3 different user levels, admin, technicians, and clients. They all have logins and will use the users controller. My question is a philosophical one, not a technical one. So I have the technicians and clients, for the most part they are similar, but they will be d

Re: Search Function

2009-03-13 Thread Mike Cook
Hi Dave, I've just started looking into this myself. You could try these links; http://www.assembla.com/wiki/show/searchable_behavior http://thechaw.com/cakebook/source/plugins/searchable http://bakery.cakephp.org/articles/view/search-feature-to-cakephp-blog-example http://bakery.cakephp.org/ar

Re: Integrating Paypal in Cakephp 1.2

2009-03-13 Thread brian
On Fri, Mar 13, 2009 at 12:06 PM, Sunchaser wrote: > > Is there an easy way to integrate Paypal in a CakePHP website, maybe > using the PHP Paypal Kit? > > I have been on the bakery and i found the Mariano Component, but it > seems rather complicated, i Just need to put some BUY NOW buttons. If

Search Function

2009-03-13 Thread Dave Maharaj :: WidePixels.com
Does anyone know a starting place to read up on creating a search function? I want to put the search on my POSTS controller where the search will look thru not only the POSTS but related HABTM tables. So for example if the POST article has a TAG "Beauty" and the person searching types in Beauty e

OT: odd undefined offset

2009-03-13 Thread brian
This isn't strictly a Cake issue but I wonder if someone has an idea why I'm seeing the following notice: Notice (8): Undefined offset: 1 [APP/controllers/membership_fees_controller.php, line 107] Line 107 is the line below with explode(). This code is parsing PayPal's PDT response. $lines = e

Re: the blog post problem

2009-03-13 Thread bilal
when i bypass the rewrite, it gives me the fancy cake layout but still the same result, i am going to try to install xampp now! On Mar 11, 9:58 am, Jon Bennett wrote: > Hi bilal, > > > You are right, all three files are different, the server had > > mod_rewrite off, i turned it on and tried agai

Re: copying data to hidden fields

2009-03-13 Thread brian
On Fri, Mar 13, 2009 at 11:10 AM, jsundquist wrote: > > I am currently working on an application that I am in need of > populating fields with data that users are entering data into. > However I would like to just copy that text from the field they are > entering text into into the database field

Re: autocomplete default value

2009-03-13 Thread brian
On Fri, Mar 13, 2009 at 8:36 AM, rrd...@gmail.com wrote: > > It would be nice to have more options for $ajax->autocomplete's input > box, like setting default value, etc. ok, send a link to pastebin when you have the code ready. --~--~-~--~~~---~--~~ You received

Re: Use functions from other controllers

2009-03-13 Thread brian
On Fri, Mar 13, 2009 at 6:06 AM, Ernesto wrote: > > Hello > > i have 2 models > Order hasMany Item > > each model has his own Controller > - OrdersController > - ItemsController > > in OrdersController i have a function like this > > function orderCode_exists ($orderCode) { >        //this functi

Re: Error with use Upload Behaviour of MI-BASE

2009-03-13 Thread AD7six
On Mar 13, 12:55 pm, byqsri wrote: > I have another problem with upload behaviour of MI-BASE. > All works fine only that if I set no image to upload I get a > validation error: > "The submitted file extension is not permitted, only > jpeg,jpg,gif,png,bmp permitted." > > I have set the option 'm

Integrating Paypal in Cakephp 1.2

2009-03-13 Thread Sunchaser
Is there an easy way to integrate Paypal in a CakePHP website, maybe using the PHP Paypal Kit? I have been on the bakery and i found the Mariano Component, but it seems rather complicated, i Just need to put some BUY NOW buttons. Thanks --~--~-~--~~~---~--~~ Yo

Re: CakePHP in Google Summer of Code

2009-03-13 Thread Gwoo
Nice ideas everyone. I submitted the organization application two days ago, so now we just have to wait until monday when they announce the accepted orgs. I should also say that everyone in #gsoc on freenode was very helpful and had great appreciation for CakePHP. So, we got that going for us, whi

Re: FormHelper methods clarification

2009-03-13 Thread Marcelo Andrade
On Fri, Mar 13, 2009 at 10:53 AM, Ernesto wrote: > > Hello. > Qhat's the difference between > > $form->input("a", array("type" => "checkbox)); > > and > > $form->checkbox("a"); There's no difference at all. These two forms are available just for convenience. When you pass "type"=>"checkbox" to

Re: Class dispatcher not found - Solved, bug maybe?

2009-03-13 Thread Gwoo
Can you run the Inflector tests? --~--~-~--~~~---~--~~ 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+

Re: Class dispatcher not found - Solved, bug maybe?

2009-03-13 Thread Gwoo
On Mar 12, 1:48 pm, Brett Wilton wrote: > We managed to track down why the class Dispatcher was failing to load. > > What we found was that the Inflector::underscore() function called > from the bootstrap.php App::import('Core', array('Dispatcher')); was > converting 'Dispatcher' to _dispatcher

copying data to hidden fields

2009-03-13 Thread jsundquist
I am currently working on an application that I am in need of populating fields with data that users are entering data into. However I would like to just copy that text from the field they are entering text into into the database field that I have instead of making them type the data in twice. Is

Re: Dynamic Model to universalize/generalize an Ajax-Handler-Action

2009-03-13 Thread Alfredo Quiroga-Villamil
The first thing needed I think is to re-adjust the function a bit. Although not mandatory, it should be something like the function depicted below for a public method that will process only ajax requests: function your_function() { $this->layout = 'ajax'; if ( $this->RequestHandler->isAja

Performance different between cakephp 1.1 and 1.2

2009-03-13 Thread namsouth
Performance different between cakephp 1.1 and 1.2 I really thanks for the cakephp team develop very powerful and easy to use php frame I am wondering the performance different with two version of cakephp on my VDS(virtual desktop service) hosting.Let say if I want to list the content of each cat

Re: xml parser removing html entities

2009-03-13 Thread blckspder
After working with several people on the irc channel. We found that there is a bug with versions of libxml2 before version 2.7.3. Also in my case there seems to be a problem with the php 5.2.6 that is bundled for Fedora 10. I still haven't gotten everything to work correctly. I may look at a diff

how to generate .mo file

2009-03-13 Thread K3
Hi i am using i18n/l10n within cake application and everything works ok. however, when i add some new text in ctp.files i need to rebuild the .po/.mo files using bake script and .po editor. What i would like to do is to allow the client to change msgid and msgstr in the .po file and geneerate .

Dynamic Model to universalize/generalize an Ajax-Handler-Action

2009-03-13 Thread hasentopf
Hi Cake-Friends. I wrote an Action to handle an Ajax-Request: function admin_ajax_state() { if($this->params['form']['ajax']) { $id = $this->params['form']['id']; $teaser = $this->Teaser->read('state', $id);

FormHelper methods clarification

2009-03-13 Thread Ernesto
Hello. Qhat's the difference between $form->input("a", array("type" => "checkbox)); and $form->checkbox("a"); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to ca

Scriptaculous issue (ajax in place editor)

2009-03-13 Thread Celso
Hi ! I tried this: editor( "in_place_editor_id", array( 'controller' => 'Posts', 'action' => 'update_title', 8 ), array() ); ?> But: Error: Ajax.InPlaceEditor is not a constructor File-source: http://localhost/blog/posts Line: 28 I downloaded the scripta

Re: Auth Component custom error message for different situations

2009-03-13 Thread Brendon Kozlowski
I can't look up the exact steps to do this at the moment (rushing to prepare for a meeting), but going from memory I believe you'd actually take advantage of the empty login() function in your UsersController in this instance so that you can send a specific use-case error depending on the circumst

how to add extra authintication rule n according to that do redirection

2009-03-13 Thread sagu
Hello all.. I am working on matrimonial site.. In that whenever user tries to login, before his login I want to check his membership end_date.. If his membership is still active then he will be redirected to his profile page otherwise he will be redirected to buy membership page.. I have tried

one or two parameters

2009-03-13 Thread Delirium tremens
I found these two lines function get($ticket = null) if ( $email = $this->Tickets->get($this->params['controller'], $hash) ) at http://bakery.cakephp.org/articles/view/ticket-component-resetting-user-passwords Are they right??? --~--~-~--~~~---~--~~ You received

autocomplete default value

2009-03-13 Thread rrd...@gmail.com
It would be nice to have more options for $ajax->autocomplete's input box, like setting default value, etc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-ph

Re: MVC Design Question

2009-03-13 Thread mark_story
On Mar 11, 11:51 pm, Alex Jeffery wrote: > Hi, Hi, > > (Fat Model) > 1. The controller calls a custom function on the Users model. Eg > registerUser($formData) > 2. The User model validates and saves the new user. > 3. The user model then calls the Portfolio model to create a new > portfolio fo

Re: Error with use Upload Behaviour of MI-BASE

2009-03-13 Thread byqsri
I have another problem with upload behaviour of MI-BASE. All works fine only that if I set no image to upload I get a validation error: "The submitted file extension is not permitted, only jpeg,jpg,gif,png,bmp permitted." I have set the option 'mustUploadFile' => false but nothing. Can someone t

Re: search engine bots and sessions

2009-03-13 Thread majna
you can detect spider form UA string: @see http://user-agents.org $ua = env('HTTP_USER_AGENT'); if (strpos($ua, '+http') == true || strpos($ua, 'http') == true || strpos($ua, 'www.') == true || strpos($ua, '@') == true) { // i'm spider } On Mar 13, 11:14 am, wowfka wrote: > Yes thank your f

Re: search engine bots and sessions

2009-03-13 Thread wowfka
Yes thank your for suggestion, i was thinking about this solution also, just thought that cake take care of bots. On Mar 13, 12:04 pm, WyriHaximus wrote: > Most search engine bots/crawlers don't store cookies when they are > crawling your site. A way to solve this is creating a list with known >

Re: search engine bots and sessions

2009-03-13 Thread wowfka
I am just tracking, currently visiting users last 30 min, so i can use session database, also increased session expirity a little. As i know cake deletes only expired sessions. On Mar 13, 12:01 pm, Braindead wrote: > Cake deletes expired entries from the session table automatically. > Therefore

yogesh kumar wants to chat

2009-03-13 Thread yogesh kumar
--- yogesh kumar wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-60d09f8474-0eaaf653b5-adfd8dacdca90889 You'll need to cli

Use functions from other controllers

2009-03-13 Thread Ernesto
Hello i have 2 models Order hasMany Item each model has his own Controller - OrdersController - ItemsController in OrdersController i have a function like this function orderCode_exists ($orderCode) { //this function checks if the order exists } is there any way to call that function

Re: search engine bots and sessions

2009-03-13 Thread WyriHaximus
Most search engine bots/crawlers don't store cookies when they are crawling your site. A way to solve this is creating a list with known bots and their useragent strings. If a visitor visits your site check if it's a bot or not and if so look in your sessions table if it has been here before so yo

Re: search engine bots and sessions

2009-03-13 Thread Braindead
Cake deletes expired entries from the session table automatically. Therefore using the session table to track users could lead to wrong figures. Multiple records for the same IP address are ok. Try to open your site with Firefox and IE at the same time. There will be 2 records for your IP address

MI-BASE documentation

2009-03-13 Thread marco.rizze...@gmail.com
Hi I very interesting to use the MI-BASE like the base for my projects. Is it some documentation for speed up the use of mi-base behaviours,helpers, components etc.? Many thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

search engine bots and sessions

2009-03-13 Thread wowfka
Hi, Have little prob with search engine bots :) I am storing sessions in database and also track visitors in site, with records from that database, recently i saw multiple records with same IP adress tracked it, and found that it is search engine bots, google,yahoo, etc there was many records w

Re: validation problem

2009-03-13 Thread ShuXun Liu
Try use the third param in Save action. like this: $this->User->save( $this->data, // make sure there is a "id" in data array true, array('email') //just save email ) 2009/3/13 kaushik > > I have validate different field using cakephp's in-bulit validation > system. but now problem i

is it a defect of Auth component?

2009-03-13 Thread ShuXun Liu
hi,all Is there any way to pre-define the fields of users model in Auth component as it control the login action automatically. By default , Auth retrieves all the fields in the user model, and save it into session. i think it's not necessary and will burden session's job . For example,

how to make XML of this format in Cake

2009-03-13 Thread aman batra
hello, i want to make the video sitemaps and according to google te xml should be like http://search.yahoo.com/mrss"; xmlns:dcterms="http://purl.org/dc/terms/"; xmlns:gm="http:// www.google.com/schemas/gm/1.1"> 2005-06-18 http://www.google.com/samples/ localandmaps.mpeg" type

Re: send POST with redirect()

2009-03-13 Thread gsenas
You can also set the required variables in the session, and delete them when you reach the desired method. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php

validation problem

2009-03-13 Thread kaushik
I have validate different field using cakephp's in-bulit validation system. but now problem is that the system does not persist all the values even if they are valid, e.g in a form, i have to give name, email, state, and the value given in email is not valid, but other values given in the field is