HtmlHelper->input vs FormHelper->input

2007-03-26 Thread Adrian Maier
Hello, I am a little confused about about why both HtmlHelper and FormHelper have an input() method. It looks like the I am reluctant to use the HtmlHelper because : - i saw in the archives that the plan is to deprecate the common methods in favour of FormHelper - (if i remember correctly) i've

Re: Spam-protected, accessible forms?

2007-03-26 Thread mac joost
Hi, I would absolutely recommend the Akismet service (http://akismet.com/) Felix has written a Model for it which is really easy to implement in your controller. No other view or model changes needed. See: http://cakeforge.org/snippet/detail.php?type=package&id=18 --~--~-~--~~---

Re: Data cleanup in Model

2007-03-26 Thread ianh
Hi, Thanks for trying the code out - there are no SQL queries within the __sanitize function and the error as described sounds *really* counter- intuitive. What version of cake are you using out of interest? In terms of your controller block, nothing obviously wrong there, you may wish to consid

Re: WithCake.com relaunched

2007-03-26 Thread Dr. Tarique Sani
On 3/25/07, jonathan.snook <[EMAIL PROTECTED]> wrote: > There's still two main features that I need to add: > 1) RSS feeds for the job listing > 2) a way for people to contact you through the site > > I'll see about getting those in sometime within the week. > Tried it - Nice :) Tarique --

Re: Problem Redirecting to Servlet

2007-03-26 Thread g
Hi. Thanks to everybody who replied. I was able to fix the problem by using single quotes. Hehe. On Mar 12, 3:10 pm, Chris Lamb <[EMAIL PROTECTED]> wrote: > "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > > This issue was solved some time ago: > > >https://trac.cakephp.org/ticket/2060 > > I looke

Re: Admin Routing Techniques

2007-03-26 Thread R. Rajesh Jeba Anbiah
On Mar 27, 12:17 am, "fr3nch13" <[EMAIL PROTECTED]> wrote: > Ir Even better just bake it... if you can't bake it then: > > (i haven't played with 1.2 yet, but unless it was drastically changed > from 1.1.x, this is how you i do it:) > > change: > turn on admin routing, then:http://www.domain.com/a

Re: Spam-protected, accessible forms?

2007-03-26 Thread jitka
Hi Alex, I think You will want to review what AD7six has done - You can (at least) grab some idea how this can be done without modification of core helpers: http://www.noswad.me.uk/MiBlog/Spam Jitka --~--~-~--~~~---~--~~ You received this message because you are

Re: Hierarchical Models and associations?

2007-03-26 Thread TekJansen
One small correction - below, when I said I hoped I could define the "belongsTo" relationship at some superclass level and have it inherited by subclasses, I meant, at least for my hypothetical example, the "hasMany" relationship. thanks. On Mar 26, 8:06 pm, "TekJansen" <[EMAIL PROTECTED]> wrote

Re: getLastInsertID - multiple user are entering data??

2007-03-26 Thread [EMAIL PROTECTED]
As I understand, it works on the last query performed by that user, so you are always going to get the correct ID. I've never had any trouble with it with a heavily used CRM/CMS system. On Mar 27, 1:07 pm, "bingo" <[EMAIL PROTECTED]> wrote: > Hi, > > I wanted to know how getLastInsertID works. I

Re: getLastInsertID - multiple user are entering data??

2007-03-26 Thread Langdon Stevenson
Hi bingo Nate made the comment a little while ago (in response to my question along similar lines) that getLastIntertID will do what it is meant to. I don't remember the details, however a quick search of this group should turn up the thread. Given that no-one ever complains that getLastInser

getLastInsertID - multiple user are entering data??

2007-03-26 Thread bingo
Hi, I wanted to know how getLastInsertID works. I am especially concerned when two different users are posting two different articles at the exactly same time (although chances are extremely rare but is possible), then what getLastInsertID returns..does it works within a particular session or is

Hierarchical Models and associations?

2007-03-26 Thread TekJansen
Is it possible to create a hierarchy of model classes? Cake doesn't seem too happy when I try. What I mean is that I have a table, let's say "People". I've created two models which use this table, let's say "Man" and "Woman". The reason they're different is that they have different validation rul

RE: modularity and MVC

2007-03-26 Thread Mariano Iglesias
Not at all, calling requestAction() from elements/view is perfectly acceptable. Though you could also call it from the controller and set a var for the view to get, but again, I see no issue on the way you are doing it now (as a matter of fact much of The Bakery elements use this approach.) Where

Re: Site wide variable.

2007-03-26 Thread BlenderStyle
To have a variable available in your views and elements try this in your controller (or AppController): function beforeRender() { $this->set('variable', 'whatever you want'); } In your views and elements you should be able to access $variable. On Mar 22, 9:36 pm, "dizz" <[EMAIL PROTECTED]> wr

Re: Setting time zone

2007-03-26 Thread Grant Cox
What version of PHP, and what OS? As far as I am concerned, dealing with timezones on PHP4 and Windows is just too much trouble - the timezones need to be in a windows specific format ( http://bugs.php.net/bug.php?id=22418 ) rather than the common TZ format. If you have PHP5, just use date_defa

modularity and MVC

2007-03-26 Thread DJ Spark
I'd like to know if using requestAction in the view breaks (too much) the MVC concept, or is it a good use? I've been doing due to the 'high' load of a website i'm working. An example: renderElement('listas/destaque-principal', array('listas' => $this->controller->requestAction('/listas/desta

Re: Spam-protected, accessible forms?

2007-03-26 Thread Grant Cox
So all you want is for your helper to have the same interface as the Form/Html helper, but save the requested field names to the session and generate new random field names which are passed to the real Form/ Html helper? In that case, your helper can either have var $helpers = array('Form','Html'

Re: Email Component and UTF8 Subject

2007-03-26 Thread Alex
I opened a ticket for this topic: https://trac.cakephp.org/ticket/2298#preview --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To un

Spam-protected, accessible forms?

2007-03-26 Thread Alex
Hi, Since my site was attacked by spammers, I was working on a solution, that generates some random input boxes inside my formula. when these (hidden by several methods) were filled by an automated spam-robot, the following action will not take place. the other inputs had to be randomly renamed.

Re: how to do Multi-Row Edit ?

2007-03-26 Thread dima
CC96AI, You're right about modifying the tag templates. There would have to be more changes than the ones i mentioned above. However, it's a starting point :). As for it being a good idea, you can implement your own tags. Since you're subclassing HtmlHelper you can redefine the $tags class attr

Re: phpThumb Component

2007-03-26 Thread AzzzY
I just want to note, that I use the phpThumb (with ImageMagick) with Cake 1.2, and it works fine. On Mar 25, 9:20 pm, "dizz" <[EMAIL PROTECTED]> wrote: > Does anyone know if this works with Cake 1.2xxx? I keep on getting the > following error: > > ( > [0] => could not generate thumbnail > ) >

Re: Yet another Ajax->link question

2007-03-26 Thread Christopher E. Franklin, Sr.
Really wierd but, it's working now. When I included scriptaculous using $javascript->link("scriptaculous");, the script would include the needed file by itself add a whole url in the src tag (example: http://localhost/js/builder.js"; type="text/javascript">). I commented out the part where i

Re: Strange problem with $javascript in renderElement

2007-03-26 Thread Siegfried Hirsch
2007/3/26, Samuel DeVore <[EMAIL PROTECTED]>: > > Sometimes I have found that different installs are more picky about > the case of these kind of things > > try $Javascript and see if that helps Thanks, I tried that and I have done similar thinks before, but it did not help. The strange thing is,

Re: Yet another Ajax->link question

2007-03-26 Thread Christopher E. Franklin, Sr.
Well, I found a quick tutorial on cakebaker that I have tried and even that doesn't seem to work. It is a bare user plugin so I am just uploading it to this group as test_user_plugin.zip. The only thing you would need to change is the user_app_model.php public $useTable = false; Then you can ju

Re: A question on reusing ,parts'

2007-03-26 Thread nitsuj
Thanks for your help, I'll be looking into elements then. On Mar 25, 3:06 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > elements :) > > On Mar 25, 12:13 pm, "nitsuj" <[EMAIL PROTECTED]> wrote: > > > Hi everyone, > > I've just started trying to use cake, I've followed a few tutorials > > an

Re: how to do Multi-Row Edit ?

2007-03-26 Thread cc96ai
in your provided code, we might to update helper.php var $tags = array('link' => '%s', 'mailto' => 'mailto:%s"; %s>%s', 'form' => '',

Re: Yet another Ajax->link question

2007-03-26 Thread Samuel DeVore
can you post some more code in the bin http://bin.cakephp.org maybe there is a simple typo that some fresh eyes might see. Sam D On 3/26/07, Christopher E. Franklin, Sr. <[EMAIL PROTECTED]> wrote: > > I did. It is loading. When it doesn't I get the error about the > undefined function Event

Re: Yet another Ajax->link question

2007-03-26 Thread Christopher E. Franklin, Sr.
I did. It is loading. When it doesn't I get the error about the undefined function Event something or other. On Mar 26, 12:03 pm, "Samuel DeVore" <[EMAIL PROTECTED]> wrote: > make sure that your defauly layout includes the prototype/ > scriptalicious stuff, and that it is actually loding > > On

Re: Admin Routing Techniques

2007-03-26 Thread fr3nch13
Ir Even better just bake it... if you can't bake it then: (i haven't played with 1.2 yet, but unless it was drastically changed from 1.1.x, this is how you i do it:) change: turn on admin routing, then: http://www.domain.com/admin/controller/action class ControllerController extends AppControll

Re: Data cleanup in Model

2007-03-26 Thread Michael Tuzi
@ianh I followed your instructions, but I am now getting an SQL error during validation! I don't understand how, why or where the query takes place, but the error I get shows that a query ('__sanitize') is being made to the db. I am using Zend's IDE that I purched a few years ago, but it isn't po

Re: Yet another Ajax->link question

2007-03-26 Thread Samuel DeVore
make sure that your defauly layout includes the prototype/ scriptalicious stuff, and that it is actually loding On 3/26/07, Christopher E. Franklin, Sr. <[EMAIL PROTECTED]> wrote: > > Oh yeah, this is the source in the page after it is rendered: > > Log In > > Event.observe('link191330890', 'c

Re: Yet another Ajax->link question

2007-03-26 Thread Christopher E. Franklin, Sr.
Oh yeah, this is the source in the page after it is rendered: Log In Event.observe('link191330890', 'click', function(event){ new Ajax.Updater('mainContent','/user/login/', {asynchronous:true, evalScripts:true, requestHeaders:['X-Update', 'mainContent']}) }, false); On Mar 26, 11:48 am, "Chris

Yet another Ajax->link question

2007-03-26 Thread Christopher E. Franklin, Sr.
I feel like an idiot for asking since there are so many posts in this group on Ajax->link questions but, I have already wasted 2 hours trying to find the answer. I was following a small tutorial to get Ajax working (the one with the stars =D ) and it didn't work. So, I tried to do a little test

Re: sessions in cake db _gc

2007-03-26 Thread jyrgen
hello all, can anybody help please ? thanks, jyrgen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group,

Re: how to do Multi-Row Edit ?

2007-03-26 Thread digital spaghetti
Absolutly steve, get posting so we can get baking :). I haven't had to do this yet but I know it'll be coming soon. Tane On 3/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Another method that was referenced in this group a while back was to > use tags like > ['model0']['Name'] > ['mode

Re: how to do Multi-Row Edit ?

2007-03-26 Thread [EMAIL PROTECTED]
Another method that was referenced in this group a while back was to use tags like ['model0']['Name'] ['model1']['Name'] Then in your controller, dynamically create a new model for each 'modelX' that you have and validate() it and then save() it. This way you also get the proper validation messag

RE: Bakery Article

2007-03-26 Thread Mariano Iglesias
This is the problem we discussed gwoo. Should be fixed today. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.Ma

Re: Bakery Article

2007-03-26 Thread Erich C. Beyrent
Forbidden TICKET_CREATE privileges are required to perform this operation TracGuide — The Trac User and Administration Guide gwoo wrote: > Please submit bug reports to https://trac.cakephp.org/newticket. > > > > --~--~-~--~~~---~--~~ You received this messa

Setting time zone

2007-03-26 Thread squidliberty
I live in the south-eastern US and I'm storing timestamps in my database. I need date() to reflect my time zone when viewing this data. Without access to php.ini, how can I do this for CakePHP? Ive tried adding putenv("TZ = America/New_York"); and ini_set("date.timezone","America/New_York"); in c

problem with hasOne

2007-03-26 Thread salimk786
My problem is that every time i update my profile, it does an insert instead of an update sql command. Is my associations incorrect ? Thanks. class Member extends AppModel { var $name = 'Member'; var $hasOne = array('Profile' => array('className'

Re: Bakery Article

2007-03-26 Thread gwoo
Please submit bug reports to https://trac.cakephp.org/newticket. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from t

IIS reloaded with 1.2

2007-03-26 Thread Jeremy Pointer
Can anyone point me in the right direction to get 1.2 working on an IIS server without url rewriting and over which I have no control other than uploading pages, I've tried searching but either the links point to the discontinued wiki, or to someones blog from early last year on which I can't f

Re: Strange problem with $javascript in renderElement

2007-03-26 Thread Samuel DeVore
Sometimes I have found that different installs are more picky about the case of these kind of things try $Javascript and see if that helps Sam d On 3/26/07, Siegfried Hirsch <[EMAIL PROTECTED]> wrote: > Hello, > > I have a strange problem. Developing in Win2k with php5 eveything is > working. >

Strange problem with $javascript in renderElement

2007-03-26 Thread Siegfried Hirsch
Hello, I have a strange problem. Developing in Win2k with php5 eveything is working. But porting to Linux with php4, I get an error when calling $javascript->link(...); in a renderElement('header'); First I thought it could be the readerElement, which has problems, but putting the same code into t

phpGACL

2007-03-26 Thread Michael Tuzi
I'd like to use this, but I can't figure out how to access MySQL, because the database is running on a non-standard port. With CakePHP, I can define the host as hostname:port, but this doesn't work with the plugin. It's using ADOdb, and I can't seem to define a port using any of the included drive

Re: one to one relationship (ADD)

2007-03-26 Thread dima
in your afterSave() of the Person model you can do something along these lines: if (isset($this->Judge) && !empty($this->data['Judge'])) { $this->data['Judge']['person_id'] = $this->id; $this->Judge->save($this->data); } Dimitry Z. On Mar 26, 12:05 pm, "christianandradet" <[EMAIL PROTECT

Re: Data cleanup in Model

2007-03-26 Thread Michael Tuzi
Thank you very much for the response. I will work on integrating your code. I'm new to Cake, so this provides me with a bit more insight as to how I need to accomplish certain tasks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

one to one relationship (ADD)

2007-03-26 Thread christianandradet
hi, i am traing to insert data with a one to one relationship, i am working with this tables: CREATE TABLE 'people` ( `id` smallint(5) unsigned NOT NULL auto_increment, `lastname` varchar(40) NOT NULL, `firstname` varchar(40) NOT NULL, PRIMARY KEY (`id`) ) CREATE TABLE `judges` ( `pe

Re: how to do Multi-Row Edit ?

2007-03-26 Thread cc96ai
I cant generate this kind of format ['model'][0]['Name'], ['model'][1] ['Name] but I m trying to put the id into tag name $html->input("product/qty".$product['Product']['id']); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Bakery Article

2007-03-26 Thread Erich C. Beyrent
I am trying to add a new article to the Bakery, but there are no categories. The article cannot be submitted without a category, so I'm stuck. Can the person/people who maintain the Bakery take a look at this? -Erich- --~--~-~--~~~---~--~~ You received this me

one to one relationship (ADD)

2007-03-26 Thread christianandradet
hi, i am traing to insert data with a one to one relationship, i am working with this tables: CREATE TABLE 'people` ( `id` smallint(5) unsigned NOT NULL auto_increment, `lastname` varchar(40) NOT NULL, `firstname` varchar(40) NOT NULL, PRIMARY KEY (`id`) ) CREATE TABLE `judges` ( `pe

Re: Links and Images with correct path from pure html

2007-03-26 Thread dima
Korcs, Thanks for re-posting on the Group :) Could you provide some additional code? >From what I can tell, you would need a custom helper like so: class CustomHelper { function parseAnchors($content) { // Replaces all anchors locations to an absolute value. return preg_repla

Links and Images with correct path from pure html

2007-03-26 Thread korcs
Hi Bakers, I am working on a refactoring project for an existing cms andI have decided to make it using cake. The CMS has an existing database with thousands of articles, stored basically as HTML code, where all the links and images appear as HTML tags like http://groups.google.com/group/cake-ph

Re: how to do Multi-Row Edit ?

2007-03-26 Thread dima
You would have to use a custom model to overwrite some functionality (cake 1.x): E.g class MyHtml extends Html { ... function setFormTag($tagValue) { $parts = explode("/", $tagValue); $this->model = $parts[0]; $this->field= array_pop($parts); // We add a class

Re: Inflector: Plural for "Menu"

2007-03-26 Thread guigouz
Is 1.2 recommended for production websites ? The $uses = array('Menu') and $useTable='menus' hack worked, but not for scaffold. I get the following error Notice: Undefined property: Menus in /Users/guigouz/Sites/php/WebBook/ cake/libs/controller/scaffold.php on line 383 Fatal error: ConnectionM

Re: PHPmailer

2007-03-26 Thread Brian Dailey
You won't need to use $this-> when calling it from a controller. You'll probably need to do something like: $mailer = new Mailer; $mailer->AddAddress('[EMAIL PROTECTED]'); I suggest brushing up on PHP OOP techniques. The book "PHP 5 Objects, Patterns, and Practice" by Zandstra is a great way to

Re: how to do Multi-Row Edit ?

2007-03-26 Thread francky06l
Well to insert multiple record in your save action, you would have to loop on the submitted data and do not forget to call for each new record : foreach($this->data ... as $v) { $this-->"Model"->create(); $this->"Model"->save($v); } On Mar 26, 3:39 pm, "Diona K" <[EMAIL PROTECTED]> wrote:

Re: PHPmailer

2007-03-26 Thread Daniel Pape
Is $this->Mailer an instance of class.phpmailer?? 2007/3/26, Enchy <[EMAIL PROTECTED]>: > > > Hi > > I installed phpmailer > > Calling it like the tutorial says: > vendor('phpmailer/class.phpmailer'); > > And then error: > Call to undefined function: addaddress() in /usr/www/users/struts/cake/

PHPmailer

2007-03-26 Thread Enchy
Hi I installed phpmailer Calling it like the tutorial says: vendor('phpmailer/class.phpmailer'); And then error: Call to undefined function: addaddress() in /usr/www/users/struts/cake/ app/controllers/hunters_controller.php on line 37 line 37: $this->Mailer->AddAddress('[EMAIL PROTECTED]');

Re: how to do Multi-Row Edit ?

2007-03-26 Thread Diona K
What a timely post! I'm doing the same thing...showing a table of data and allowing the user to edit it. By using this 'hack' will CakePHP handle the insert without any additional considerations? --~--~-~--~~~---~--~~ You received this message because you are subs

Re: 1.2 ready?

2007-03-26 Thread R. Rajesh Jeba Anbiah
On Mar 26, 6:34 pm, "Mariano Iglesias" <[EMAIL PROTECTED]> wrote: > Why would you think it's really ready if it's on Alpha stage? > > When not yet Stable, don't expect a lot of documentation, as the primary > focus is in making the code stable. > > On a side note there are quite a few articles on

RE: 1.2 ready?

2007-03-26 Thread Mariano Iglesias
Why would you think it's really ready if it's on Alpha stage? When not yet Stable, don't expect a lot of documentation, as the primary focus is in making the code stable. On a side note there are quite a few articles on the Bakery and around the web particularly for 1.2 (Behaviors in the bakery

e - the textmate on windows

2007-03-26 Thread purepear
Just check it.. you'll love it. http://www.e-texteditor.com/ While i was waiting InType to gain some speed and development i found e-texteditor which saved my day :P --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: how to do Multi-Row Edit ?

2007-03-26 Thread francky06l
You can use a "hack" to format the tags using an "indice" ... such as ['model'][0]['Name'], ['model'][1]['Name] etc ... You can use : 'Model/'.$indice.'][fieldname' into the tag name to produce the above format .. On Mar 26, 5:37 am, "cc96ai" <[EMAIL PROTECTED]> wrote: > I know how to do in PHP

Re: R: where to put my functions ?

2007-03-26 Thread feelexit
hi, M. thanx. I am using echo checktags(); this gives me error. after I change it to echo $this->checktags(); it works now.. thanx alot. On Mar 26, 6:02 pm, <[EMAIL PROTECTED]> wrote: > hello feelexit > Are you calling your function like this? > > function checktags() { > return 'B

R: where to put my functions ?

2007-03-26 Thread m.sbragi
hello feelexit Are you calling your function like this? function checktags() { return 'Bravo!'; } function add() { $retVal = $this->checktags(); } > -Messaggio originale- > Da: cake-php@googlegroups.com > [mailto:[EMAIL PROTECTED] Per conto di feelexit > Inviato: lunedì 26 m

1.2 ready?

2007-03-26 Thread R. Rajesh Jeba Anbiah
I'm fairly new here (except that I did lurk in the early stage). I'd like to know if 1.2 is really ready? I don't seem to find good plugins/articles based on 1.2. TIA. -- Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/ --~--~-~--~~~---~--~

Re: where to put my functions ?

2007-03-26 Thread Mike Griffin
Hey Felix. Check the spelling of your functions. You mention checktags() in the posts_controller.php but the error is saying checktag() HTH Mike. On 3/26/07, feelexit <[EMAIL PROTECTED]> wrote: > > in the posts_controller.php file, I have a function called funcation > add() to add new posts.

where to put my functions ?

2007-03-26 Thread feelexit
in the posts_controller.php file, I have a function called funcation add() to add new posts. inside add function, i want to call another function checktags(), where do i write this function. I place it in the posts_controllers.php file, and get this error message. Fatal error: Call to undefi