Re: Building Facebook app on CakePHP
http://apps.facebook.com/votigofbapp On Aug 4, 1:09 am, Gwoo <[EMAIL PROTECTED]> wrote: > what more do you need? --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: save() not working
Yes, here's my view: Registration Information First Name*:input('Account.first_name', array('class'=>'required','label'=>false,'size'=>'30'));?> Last Name*:input('Account.last_name',array('label'=>false,'size'=>30)); ? > submit('Save') ?> *Required field --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: what did I do wrong to generate a PHP Notice ?
Hi, I am using Cake 1.1.xxx ... On Aug 3, 7:02 pm, francky06l <[EMAIL PROTECTED]> wrote: > Cake 1.2 ? > > echo $form->input('username'); > > On Aug 4, 3:45 am, phpcurious <[EMAIL PROTECTED]> wrote: > > > when I use $html helper, > > and code > > $html->input("username",array("type"=>"text")); > > > it says, > > Notice: Undefined offset: 1 in XXX\cake\libs\view\helpers\html.php on > > line 947 > > > I had to hide this by changing debug from 1 to 0... > > > I hope somebody tells me what I am doing wrong... --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: save() not working
I suppose you have a form submitting data to your create function ? can you paste the form code (view) as well ? On Aug 4, 4:07 am, pbland <[EMAIL PROTECTED]> wrote: > Forgot to mention that I had cake 1.1 and it didn't work, so I > upgraded to 1.2.0.5427 and still nothing. --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: save() not working
Forgot to mention that I had cake 1.1 and it didn't work, so I upgraded to 1.2.0.5427 and still nothing. --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
save() not working
I've spent the last 2 days trying to get my save() to work with no luck. I've reviewed everything. Twice. I've checked this group for things to look for and everything looks correct. I've printed my model and it has the data: Array ( [Account] => Array ( [first_name] => Joe [last_name] => Tester ) ) Here's my database schema: CREATE TABLE accounts ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(30) NOT NULL, last_name VARCHAR(50) NOT NULL, createdDATETIME DEFAULT NULL, modified DATETIME DEFAULT NULL) And my controller: class AccountsController extends AppController { var $name = 'Accounts'; function create() { pr($this-data); if($this->Account->save($this->data)) { echo 'save successful'; else echo 'no good'; } } I don't have any redirects. I have debug at 2 and I don't see any INSERT statement, nor any error messages. Does anyone have some other things for me to check? Thanks, Paul --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Is CakePHP right for me?
Regardless of what anyone one thinks, I'm here partly by luck. I downloaded both Cake and CI. My initial decision was made in the first 10 minz. I could get Cake up and running but not CI. That's it. So cake it was. A lot of people say that Cake is more difficult to set up that CI, but I didn't find that. The second and most important reason why I'm here is because I'm lazy After the initial setup, I started running through the tutorials. Simple enough. I love the automagic. Stuff just loads and it's just there. I didn't really like the "load this" and "load that" with CI. One thing I rather with CI is that all the files are PHP. I'm lazy and sometimes I need to dump stuff in Dreamweaver and make some tweaks. I'm sorry, I'm not one of these guys who designs in Notepad. I'm sorry. I need to SEE what's going on, so sometimes it would be nice to be able to just dump a view/element/layout in dreamweaver without having to rename files. BUT, I have to say it. The documentation. It's killing me. I guess if I knew more PHP I could fudge my way around, but that is precisely why I'm using Cake. I can "get things done" in PHP. However, it would take forever and probably not be as reliable as it would need to be. So once again, I apologize to the Cake community for my utter laziness, but CI got you guys beat on the documentation. Let's hope things change for the better after 1.2 goes beta. -- Baz L Day In The Life of Baz http://www.LifeOfBaz.com On 8/3/07, Geoff Ford <[EMAIL PROTECTED] > wrote: > > > Silly question to ask here - you going to get a bunch of Cake fans > saying that Cake is the best (which of course it is) :) > > As far as actually deciding which framework is for you, a useful tool > is the Frequent Discussions page. > http://groups.google.com/group/cake-php/web/frequent-discussions > It shows alot of the common questions and problems that people face > when using cake. > > Geoff Ford > -- > http://lemoncake.wordpress.com > > On Aug 3, 11:18 am, walterbyrd <[EMAIL PROTECTED]> wrote: > > On Aug 2, 2:46 pm, webmosher < [EMAIL PROTECTED]> wrote: > > > > > CodeIgnitor is very similar to Cake in many aspects. However, if you > > > think your project will require complex data relationships, stick it > > > out with Cake. It handles this sort of thing much much better. > > > > That is very good to know. I fully expect fairly complex data > > relationships. Can you briefly give me an idea of why CakePHP is > > better in this regard? > > > > BTW: CI now has 3rd party libraries called "Rapyd" and "CodeCrafters" > > those are suposed to add database functionality. But, I'm a little > > uneasy with these solutions. CodeCrafters is supposed to be a code > > generator, and is not that well documented. And Rapyd does not seem to > > be all that well supported. > > > > > --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: what did I do wrong to generate a PHP Notice ?
Cake 1.2 ? echo $form->input('username'); On Aug 4, 3:45 am, phpcurious <[EMAIL PROTECTED]> wrote: > when I use $html helper, > and code > $html->input("username",array("type"=>"text")); > > it says, > Notice: Undefined offset: 1 in XXX\cake\libs\view\helpers\html.php on > line 947 > > I had to hide this by changing debug from 1 to 0... > > I hope somebody tells me what I am doing wrong... --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
what did I do wrong to generate a PHP Notice ?
when I use $html helper, and code $html->input("username",array("type"=>"text")); it says, Notice: Undefined offset: 1 in XXX\cake\libs\view\helpers\html.php on line 947 I had to hide this by changing debug from 1 to 0... I hope somebody tells me what I am doing wrong... --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How do I link comments to a post?
The exact line to add to your post model is: var $hasMany = array('Comments'); And yep it is that easy :) As for the error - when you turned debug on up to 2 do you get a Controller missing action or something like that? Geoff On 8/3/07, Dan Soendergaard <[EMAIL PROTECTED]> wrote: > > > > This usually indicates that either mod_rewrite is not working or you > > have fiddled with your paths in config/core.php > > mod_rewrite is working as far as I can see. Also, since I can navigate > to /posts/ without any problem, there must be some other cause. Oh, I > sorted it out by turning on debugging. There was a couple of errors > with the database query which made it go wrong. > > > Post hasMany Comments > > $data = $this->Post->read($postId); > > The first line goes into the Post model and the second line goes into > the Post view, right? > If it really is that easy I'm never going to code plain PHP again! > > Thanks a lot, > > Dan > > > > > -- http://lemoncake.wordpress.com --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Associations Weirdness? Pls Advise.
I apologize for the waste of space, I figured it out. My AppController file had a $uses = Angler and it was giving everyone a free ride. That's why the Trip controller could invoke it directly instead of $this->Trip->Angler-> etc. pr($this) can be a powerful tool if you look closely enough -- it might even show you your question was wrong! --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Associations Weirdness? Pls Advise.
I forgot to mention I'm using the 1.2 5427 alpha code --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Associations Weirdness? Pls Advise.
I am having a bit of strange behavior I hope someone can straighten me out on. 2 classes, Angler and Trip: Angler hasMany Trip Trip belongsTo Angler angler_id is in the Trip Table I have a function showtrips($angler_id = null) in the Trips Controller that displays trips or angler trips depending on the input parm. showtrips has a line that says "$this->Angler->read(null, $angler_id)" and it executes fine. Then I have another 2 classes, Catch and Imagefile. Similarly: Catch hasMany Imagefile Imagefile belongsTo Catch catch_id is in the Trip Table I have a function showimages($catch_id = null) in the Images controller that displays images or catch images depending on the input parm. showimages has a line that says $this->Catch->read(null, $catch_id) and I get the old member function non-object error thrown. If I recode it to say $this->Imagefile->Catch->read(null, $catch_id) all is OK (or cheat things up and put the Catch class in a $uses stmt in the Trips controller). The Trips controller DOES NOT have a $uses, but the Imagefiles controller DOES have one (var $uses = array('Imagefile', 'Folder') since it needs the Folder class. What is going on here? Is there an implied $uses in the Trips controller from the associations? Is my explicit $uses in the Imagefiles controller perhaps messing that up from its associations? --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to pass and rephrase MySQL error (Is there a mysql_error counterpart in Cake?)
Try: cake 1.1 ( uses('model' . DS . 'connection_manager');) $db = & ConnectionManager::getDataSource('default'); if (isset($db->error)) { debug($db->error); } On Aug 3, 8:45 pm, Steveston <[EMAIL PROTECTED]> wrote: > My Question > > (Short version) > > Can anybody tell me how to capture MySQL error and pass it to end > users? > > Is there something like $this->set('db_error', some-built-in-function- > to-get-db-error-msg-as-a-string) in Cake? > > PHP has mysql_error function, which returns mysql error msg as a > string. Is there a counterpart in Cake? > > Thanks > > (Verbose version) > > For example, I have two tables > > Table 1 (Entry) > > id > entry_title > author_id > > Table 2 (Author) > > id > author_name > > I have set referential integrity rule on these two tables. > > Obviously, I cannot add an entry that its author_id does not exist in > Author table. > > If trying to do this in MySQL, I will get a #1452 error, which tells > me DB cannot add or update a child row because a foreign key > constraint fails. > > What I want is : > > 1) (bottom line) Get this #1452 error, pass the error message to users > > or > > 2) (preferred) Get this $1452 error, rephrase it with the language > that an ordinary user can understand > > To do 2), I think I need a dictionary to translate MySQL's built-in > error msg to user friendly language, which seems to be a time > consuming job > > So my current expectation is to do 1) > > How shall I do? > > Thanks, --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: cakephp 1.2: i18n german core.po
come one ... can anyone help me? --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Help with Advanced Installation
What if I did NOT want the webroot files to be at the actual webroot (at least during develpment/testing, where there are multiple websites on a shared server?) i.e. How can I move the /cake_install/app/webroot files into / public_html/app/webroot WITHOUT having to set the actual www webroot to be /public_html/app/webroot and leaving it as /public_html/ ?? On Aug 3, 4:47 pm, takabanana <[EMAIL PROTECTED]> wrote: > This is the structure that I was thinking of... > > /cake/cake/ > /cake/cake/config/ > /cake/cake/docs/ > /cake/cake/libs/ > /cake/cake/scripts/ > /cake/cake/app_controller.php > /cake/cake/app_model.php > /cake/cake/basics.php > /cake/cake/bootstrap.php > /cake/cake/dispatcher.php > /cake/vendors/ > > /public_html/app/ <-- I assume EVERYTHING under this is site- > specific??? > /public_html/app/config/ > /public_html/app/controllers/ > /public_html/app/models/ > /public_html/app/plugins/ > /public_html/app/tmp/ > /public_html/app/vendors/ > /public_html/app/views/ > > /public_html/ <-- I assume, what was /cake_install/app/webroot > /public_html/css/ > /public_html/files/ > /public_html/img/ > /public_html/js/ > /public_html/.htaccess > /public_html/css.php > /public_html/favicon.ico > /public_html/index.php --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Help with Advanced Installation
This is the structure that I was thinking of... /cake/cake/ /cake/cake/config/ /cake/cake/docs/ /cake/cake/libs/ /cake/cake/scripts/ /cake/cake/app_controller.php /cake/cake/app_model.php /cake/cake/basics.php /cake/cake/bootstrap.php /cake/cake/dispatcher.php /cake/vendors/ /public_html/app/ <-- I assume EVERYTHING under this is site- specific??? /public_html/app/config/ /public_html/app/controllers/ /public_html/app/models/ /public_html/app/plugins/ /public_html/app/tmp/ /public_html/app/vendors/ /public_html/app/views/ /public_html/ <-- I assume, what was /cake_install/app/webroot /public_html/css/ /public_html/files/ /public_html/img/ /public_html/js/ /public_html/.htaccess /public_html/css.php /public_html/favicon.ico /public_html/index.php --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: integrate third party ajax library
Okay I modified the library source to redirect to my controller (observations/add) new Ajax.Request( 'cake/observations/add', { method: 'POST',parameters: pars, onComplete: onCompleteCallBack }); The debug log message is below. Not really sure how to deal with this (sorry, new to Cake and Ajax). The url is weird. Should I redirect the request from within my function (i.e. change the url to the appropriate path i.e. cake/vendors/sc_select_ajax_handler.php or something)? In which case I will need to do that in all of my controllers that use this library (or I could add it to my appController)? Any help greatly appreciated. 2007-08-03 15:17:20 Debug: Array ( [pass] => Array ( ) [controller] => observations [action] => add [form] => Array ( [linkval] => 1 [table] => taxonomic_units [key] => id [text] => name [order] => name [extra_where] => type='Phylum' [select_prompt_text] => Please select a Phylum [linkfld] => parent_id [_] => [_method] => POST ) [url] => Array ( [url] => observations/add/cake/observations/add ) [bare] => 1 [webservices] => [return] => 1 [requested] => 1 [plugin] => ) --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Help with Advanced Installation
I'm new to CakePHP - ready to learn it - so I'm trying to set it up on a shared hosting account. currently, when I log into my account via FTP, i get into one level above the public_html (webroot). I'd like to put the CakePHP libraries/framework there... and all of the site's stuff (i.e. "apps/views") be within public_html, which is one level below where I want the CakePHP's core/libraries. so how do I set up index.php? Thanks for any help. --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
HTML/CSS problem
I don't know whether you all face this problem but i have faced it but i don't know why ? I have installed cakephp and writes an view etc. having some form fileds with code as "Name : *input('UnivcommMember/ lname'))?>" having 3-4 text fields. when i saw the form in the FIREFOX and try to click on the input box to put some text into my cursor goes on the end of label such as Name e.g. Name : * ## my cursor went to the place where ## symbols are now when i try to enter the text in the input filed and i am able to type from ##. Then disabled the CSS then it works fine. I think it is some thing to deal with the CSS or HTML etc Please Suggests. Thanks --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CakePHP and Poedit
Hi! Just one question. I need to localize a Cake app. I thought on using Poedit to generate the .pot file, but I don't know where to start. I've used Poedit in the past to localize a few WordPress plugins, but a Cake app is a totally different beast. Can anyone help me, please? Thanks in advance --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Pages don't show up with Pagination Component
I'm on cake 1.1 and am using the pagination component to do the paging for a site I am doing. Everything was working fine until a few minutes ago when I noticed that the page numbers weren't showing up. Upon closer inspection, I realized that the number of results wasn't showing up and neither was the "Results per page" option. The interesting thing is, however, that the component is limiting the number of results on each page to 5 and the $paging variable seems to be alright. I emptied out my database today and the only code that I have changed has been pagination.thtml where changed the display to: result(); ? > "; ?> Results per page: resultsPerPage(NULL, ' '); ?> Thanks, Chris Barna --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Building Facebook app on CakePHP
what more do you need? --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How to pass and rephrase MySQL error (Is there a mysql_error counterpart in Cake?)
My Question (Short version) Can anybody tell me how to capture MySQL error and pass it to end users? Is there something like $this->set('db_error', some-built-in-function- to-get-db-error-msg-as-a-string) in Cake? PHP has mysql_error function, which returns mysql error msg as a string. Is there a counterpart in Cake? Thanks (Verbose version) For example, I have two tables Table 1 (Entry) id entry_title author_id Table 2 (Author) id author_name I have set referential integrity rule on these two tables. Obviously, I cannot add an entry that its author_id does not exist in Author table. If trying to do this in MySQL, I will get a #1452 error, which tells me DB cannot add or update a child row because a foreign key constraint fails. What I want is : 1) (bottom line) Get this #1452 error, pass the error message to users or 2) (preferred) Get this $1452 error, rephrase it with the language that an ordinary user can understand To do 2), I think I need a dictionary to translate MySQL's built-in error msg to user friendly language, which seems to be a time consuming job So my current expectation is to do 1) How shall I do? Thanks, --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Reading Model Properties
When saving the data are store in the model in the $data array. So you can use : $this->flash('The post \'' .$this->Post->data['Post']['name']. '\' has been added.', '/ posts'); Do not mix $this->data at controller level and $this->Model->data. Of course the field is present if it was saved (part of the $this- >data used during save); Hope this helps On Aug 3, 7:35 pm, David <[EMAIL PROTECTED]> wrote: > Hi guys, > > This is probably a stupid noob question but I wanted a bit more > clarification on how the fields are stored in a model. When you call > read() or save() on the model, is the data stored anywhere inside the > model? For example, if I have this code in a controller: > > function add() > { > if (!empty($this->data)) > { > if ($this->Post->save($this->data)) > { > $this->flash('The post \'' . ? . '\' has > been added.', '/ > posts'); > } > } > } > > and I want to display the title of the post where the question marks > are, can I use $this->Post->xxx? Or do I have to use the $data > variable ($this->data['Merchant']['name'])? > > Thanks for your help, and sorry if this is a stupid question. > > David --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP installed, but i only get text - no colors or fonts
On Aug 3, 10:24 am, "Sam Sherlock" <[EMAIL PROTECTED]> wrote: > define ('BASE_URL', env('SCRIPT_NAME')); That seemed to do it. Thanks. --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Reading Model Properties
Hi guys, This is probably a stupid noob question but I wanted a bit more clarification on how the fields are stored in a model. When you call read() or save() on the model, is the data stored anywhere inside the model? For example, if I have this code in a controller: function add() { if (!empty($this->data)) { if ($this->Post->save($this->data)) { $this->flash('The post \'' . ? . '\' has been added.', '/ posts'); } } } and I want to display the title of the post where the question marks are, can I use $this->Post->xxx? Or do I have to use the $data variable ($this->data['Merchant']['name'])? Thanks for your help, and sorry if this is a stupid question. David --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Building Facebook app on CakePHP
Hi, I'm curious if there exists anything similar to rfacebook (http:// rfacebook.rubyforge.org/) for cakephp ? I'm starting to build facebook port for my cake application, does anyone have any experience with making this combination work ? I found this little article : http://www.zenperfect.com/2007/07/24/facebook-api-with-cakephp/ but nothing more. Best, Andrzej --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Problem with specifyings condition in hasMany association
Say, i made some sort of blog. I have Post model and Comment model. Post has-many Comment. post view only show comment related to that certain post, thus, only show comments which id equals to the current post id. I am trying to make that kind of conditions, but that doesn't work. It gave me error: "Parse error: syntax error, unexpected '"' in C:\xampp \htdocs\cake\app\models\event.php on line 19" Looks like cake doesn't like variable in an associative array? This is the snippet of the code. The conditions is on line 5: http://pastebin.com/m6f8bba01 --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Menus in default.thtml
On Aug 3, 2007, at 10:32 AM, CakeMan wrote: > > Hi friends, > i am very new to Cakephp and developing an application in which i have > menus that are dyanmic and i am extracting from the database. So i > want to show them in all the pages for that these menus will be in the > Default.thtml. But the problem is default.thtml has no controller and > model. Try this: Create a controller that does the logic for your menu. Create an element that contains the markup for the menu, along with any presentational logic. Use requestAction() to grab the logic from the controller, and hand that data to a renderElement() call. -- John --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Menus in default.thtml
Hi friends, i am very new to Cakephp and developing an application in which i have menus that are dyanmic and i am extracting from the database. So i want to show them in all the pages for that these menus will be in the Default.thtml. But the problem is default.thtml has no controller and model. How can i use this. Please help. Thanks --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP installed, but i only get text - no colors or fonts
You can try using cakes internal rewrite (shared hosts often impose restrictions) in the config/core.php /* * To configure CakePHP *not* to use mod_rewrite and to * use CakePHP pretty URLs, remove these .htaccess * files: * * /.htaccess * /app/.htaccess * /app/webroot/.htaccess * * And uncomment the define below: */ define ('BASE_URL', env('SCRIPT_NAME')); - S On 03/08/2007, walterbyrd < [EMAIL PROTECTED]> wrote: > > > > > On Aug 3, 9:12 am, "Christophe C." < [EMAIL PROTECTED]> wrote: > > Hi, > > > > Make sure you have the directive AllowOverride set to All for your > > current directory, for your htaccess to override apache's default > > configuration. > > I changed that, and then did an apache stop/apache start, but it > didn't help. I have DocumentRoot set to /var/www. and I have cake > installed in /var/www/cake. I am a little reluctant to change to the > DocumentRoot setting because 1) I would like to be able to use > applications other than cake. 2) I intend to work with shared hosting > eventually, and I doubt I will be able to change the DocumentRoot in > shared hosting. So I would like to know that cake will work with > standard settings. > > > > > --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Is CakePHP right for me?
On Aug 2, 11:25 pm, Geoff Ford <[EMAIL PROTECTED]> wrote: > Silly question to ask here - you going to get a bunch of Cake fans > saying that Cake is the best (which of course it is) :) > But, I'm also in forums for: django, turbogears, pylons, and codeignitor. Although there is often some bias, I am happy to report that most posters are sensible. Most posters will reasonably point out the strengths, and weaknesses, of whatever platforms they use, or have tried. I think most serious developers realize that it's not so much a matter of a platform being "good" or "bad" as it is a matter of suitability for purpose. For example: django is a great platform, if you know, or don't mind learning python, and you don't have to worry about deployment issues. CodeIgnitor is also a great platform - but I'm not so sure if you want to use it for apps that require complex data relations. Cake is also a great platform, although a bit "heavier" than CI: a bit harder to setup and learn, not quite as lightweight, maybe not quite as fast (although 1.2 may change that). So, I fairly happy with the intelligent responses that I am getting. A lot different than the insane windows vs macos vs linux zealotry I read elsewhere. Still, as helpful as all the responses have been, it seems I never really know until I actually kick the tires, and drive it around the block. Thanks for link, I will check it out. --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Including php file with normal variables
Excellent! Worked great! Thanks, francky06l --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Japanese rendering bug between euc-jp and utf-8 linux
On 8/3/07, Jerome Eteve <[EMAIL PROTECTED]> wrote: > > We have encountered similar problems for Indian languages in the past... > > > > Do you remember how you solved it ? > We did not solve it - since it was a system level problem, fedora core 6 on wards the problem was solved Tarique -- = Cheesecake-Photoblog: http://cheesecake-photoblog.org PHP for E-Biz: http://sanisoft.com = --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP installed, but i only get text - no colors or fonts
On Aug 3, 9:12 am, "Christophe C." <[EMAIL PROTECTED]> wrote: > Hi, > > Make sure you have the directive AllowOverride set to All for your > current directory, for your htaccess to override apache's default > configuration. I changed that, and then did an apache stop/apache start, but it didn't help. I have DocumentRoot set to /var/www. and I have cake installed in /var/www/cake. I am a little reluctant to change to the DocumentRoot setting because 1) I would like to be able to use applications other than cake. 2) I intend to work with shared hosting eventually, and I doubt I will be able to change the DocumentRoot in shared hosting. So I would like to know that cake will work with standard settings. --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP installed, but i only get text - no colors or fonts
On Aug 3, 8:07 am, citrus <[EMAIL PROTECTED]> wrote: > Are you sure that mod_rewrite is enabled in your setup? > I can not find mod_rewrite anywhere in my httpd.conf file. I am using debian 4.0 testing, and I installed apache with a: aptitude install apache. I think I may have an old version. Maybe I should try to install apache 2.x? --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP installed, but i only get text - no colors or fonts
Hi, Make sure you have the directive AllowOverride set to All for your current directory, for your htaccess to override apache's default configuration. --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Japanese rendering bug between euc-jp and utf-8 linux
On 3 Aug, 12:23, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote: > On 8/3/07, Jerome Eteve <[EMAIL PROTECTED]> wrote: > > > > > This problem doesn't appear in ie for linux ( from > >http://www.tatanka.com.br/ies4linux/page/Main_Page) nor in ie or > > firefox for windows > > > I'm a bit confused. > > Just hazarding a guess here - could it be that different fonts set are > being used for different encoding and the jp page in the utf-8 font > set is not very good under linux? > > We have encountered similar problems for Indian languages in the past... > Do you remember how you solved it ? --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP installed, but i only get text - no colors or fonts
Are you sure that mod_rewrite is enabled in your setup? On Aug 3, 8:52 pm, walterbyrd <[EMAIL PROTECTED]> wrote: > Trying to learn cake. I installed cake on my local debian system in / > var/www/cake. I have apache 1.3 installed. When I go tohttp://localhost/cake/, > I the intro page, but there is only black on white text. No images, no > colors - except for blue links. > > I'm using the IceWeasle browser, it works fine everywhere else. --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CakePHP installed, but i only get text - no colors or fonts
Trying to learn cake. I installed cake on my local debian system in / var/www/cake. I have apache 1.3 installed. When I go to http://localhost/cake/, I the intro page, but there is only black on white text. No images, no colors - except for blue links. I'm using the IceWeasle browser, it works fine everywhere else. --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How do I link comments to a post?
> This usually indicates that either mod_rewrite is not working or you > have fiddled with your paths in config/core.php mod_rewrite is working as far as I can see. Also, since I can navigate to /posts/ without any problem, there must be some other cause. Oh, I sorted it out by turning on debugging. There was a couple of errors with the database query which made it go wrong. > Post hasMany Comments > $data = $this->Post->read($postId); The first line goes into the Post model and the second line goes into the Post view, right? If it really is that easy I'm never going to code plain PHP again! Thanks a lot, Dan --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to get the return value from cakephp save method.
Just a typo : $this->set('savedProject', $savedProject); On Aug 3, 2:26 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote: > > I am using the below lines of code to save the 'project' module in my > > cakephp application. After saving the project module i like to > > retrieve the id,name of the project. The current save method is not > > returning the saved the row from database. (Note: I am 3 days old in > > Cake. Please apologize my mistakes) > > if ($this->Project->save($this->data)) { > > $this->set('savedProject', $this); > > $this->Session->setFlash('The Project has been saved'); > > save only returns true or false (the API would have answered this for you) > > try: > > if ($this->Project->save($this->data)) > { > $project_id = $this->Project->getLastInsertId(); > $savedProject = $this->Project->findById($project_id); > > $this->set('savedProject', $this); > $this->Session->setFlash('The Project has been saved'); > > } > > hth > > jb > > -- > > jon bennett > t: +44 (0) 1225 341 039 w:http://www.jben.net/ > iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to get the return value from cakephp save method.
> Just a typo : > $this->set('savedProject', $savedProject); good eyes - well spotted... jb -- jon bennett t: +44 (0) 1225 341 039 w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP+SMF (again?)
Hi again, Okay, so I finally experimented enough and got cookie sharing working. However, since CakePHP rewrites the cookie every time a page is loaded, if I login to SMF, go to the cake section and then go back to SMF, I have to login again. I figure I need to direct Cake to use SMF's cookie data (or vica versa--but SMF's cookie data is much more complex), right? Also, both Cake and SMF create their own session id's. Although I could survive by using the SMF cookie for everything (and hence getting the SMF session id from there) and ignoring the Cake cookie completely, I was wondering if there was a compelling reason to make them use the same session. Thanks, -Sohum. On Aug 3, 5:03 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Okay, that makes sense. I will go ahead and do this but I have another > question which I may need to address. > > The data stored in the two cookies are different. It seems CakePHP > stores the session ID (right?) whereas SMF stores the session ID in > some sort of scrambled format. Would it matter which application > created the cookie first? Does CakePHP ever overwrite cookies or would > the setcookie call from SMF be sufficient to overwrite the initial > cookie created by Cake? > > -Sohum. > > On Aug 3, 4:40 pm, "Geoff Ford" <[EMAIL PROTECTED]> wrote: > > > Ok that sheds some light - the two cookies will have different paths > > associated with them. > > > Correct me if I am wrong but you are using smf to log a user in. This > > creates a cookie with the path /forum associated with it. When you go to / > > or /controller Cake cannot access the cookie because it is outside the path. > > > You need to find where in smf the cookie is being set and either change or > > add a path to the setcookie() call so that the path is set as the root level > > path. This will make the cookie available to the entire domain including > > all the cake controller/action paths. > > > Fromhttp://php.net/setcookie > > *path* > > > The path on the server in which the cookie will be available on. If set to > > '/', the cookie will be available within the entire *domain*. If set to > > '/foo/', the cookie will only be available within the /foo/ directory and > > all sub-directories such as /foo/bar/ of *domain*. The default value is the > > current directory that the cookie is being set in. > > Geoff > > > On 8/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > Also, not sure if this will help, but browsing to the forum creates a > > > new cookie by the same name as CakePHP (since I changed CakePHP's > > > session name to be the same as SMF). I verify this using web developer > > > toolbar's cookie information tool. There are two cookies, both by the > > > name SMFCookie655, both containing different information. > > > > - Sohum. > > > > On Aug 3, 3:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > > wrote: > > > > Hi Geoff, > > > > > First of all, thanks for your response. > > > > > Now, the SSI.php file that SMF provides for includes has defined a > > > > bunch of functions that have the prefix ssi. For example, the function > > > > ssi_welcome() prints out a welcome message (Welcome back username, you > > > > have x messages) or a login message (Welcome guest. Please login or > > > > register) depending on the session information. There is also a > > > > provided ssi_examples.php file that shows the output of all these > > > > functions. > > > > > Now when I'm logged out, of course everything works. The user is > > > > logged out and all the functions behave like that. When I then login > > > > to SMF, the ssi_examples.php functions all update, but the same > > > > function calls in my layouts, it still treats the user as not logged > > > > in. Printing out the SMF contextual data confirms this--CakePHP > > > > doesn't "update" the session data it seems. > > > > > I have included the "SSI.php" in my layout file. Perhaps I should > > > > include this somewhere else? Although that doesn't seem like the > > > > solution. > > > > > - Sohum. > > > > > On Aug 3, 10:38 am, Geoff Ford <[EMAIL PROTECTED]> wrote: > > > > > > What are the ssi calls - From my understanding Cake shouldn't need to > > > > > use these. Cake will just add its own keys to the existing session (I > > > > > think). > > > > > > The only trouble you might have is if cake and smf use the same key > > > > > and one overwrites the other all the time (not sure that this will > > > > > happen, just that it could) > > > > > > Geoff > > > > > --http://lemoncake.wordpress.com > > > > > > On Aug 3, 12:30 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > > > > wrote: > > > > > > > Hi, > > > > > > > I checked out the two threads regarding integration of Simple > > > Machines > > > > > > Forum (SMF) and CakePHP but was unable to get far. I posted > > > something > > > > > > in one of those threads, but it seems to have gotten lost. So > > > anyways, > > > > > > here's my post: > > > > > > > I have come across a little bit of tr
Is it apocalipse?
cakephp.org is down? Anybody can tell me what happened? --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to get the return value from cakephp save method.
> I am using the below lines of code to save the 'project' module in my > cakephp application. After saving the project module i like to > retrieve the id,name of the project. The current save method is not > returning the saved the row from database. (Note: I am 3 days old in > Cake. Please apologize my mistakes) > if ($this->Project->save($this->data)) { > $this->set('savedProject', $this); > $this->Session->setFlash('The Project has been saved'); save only returns true or false (the API would have answered this for you) try: if ($this->Project->save($this->data)) { $project_id = $this->Project->getLastInsertId(); $savedProject = $this->Project->findById($project_id); $this->set('savedProject', $this); $this->Session->setFlash('The Project has been saved'); } hth jb -- jon bennett t: +44 (0) 1225 341 039 w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP+SMF (again?)
Okay, that makes sense. I will go ahead and do this but I have another question which I may need to address. The data stored in the two cookies are different. It seems CakePHP stores the session ID (right?) whereas SMF stores the session ID in some sort of scrambled format. Would it matter which application created the cookie first? Does CakePHP ever overwrite cookies or would the setcookie call from SMF be sufficient to overwrite the initial cookie created by Cake? -Sohum. On Aug 3, 4:40 pm, "Geoff Ford" <[EMAIL PROTECTED]> wrote: > Ok that sheds some light - the two cookies will have different paths > associated with them. > > Correct me if I am wrong but you are using smf to log a user in. This > creates a cookie with the path /forum associated with it. When you go to / > or /controller Cake cannot access the cookie because it is outside the path. > > You need to find where in smf the cookie is being set and either change or > add a path to the setcookie() call so that the path is set as the root level > path. This will make the cookie available to the entire domain including > all the cake controller/action paths. > > Fromhttp://php.net/setcookie > *path* > > The path on the server in which the cookie will be available on. If set to > '/', the cookie will be available within the entire *domain*. If set to > '/foo/', the cookie will only be available within the /foo/ directory and > all sub-directories such as /foo/bar/ of *domain*. The default value is the > current directory that the cookie is being set in. > Geoff > > On 8/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > > > Also, not sure if this will help, but browsing to the forum creates a > > new cookie by the same name as CakePHP (since I changed CakePHP's > > session name to be the same as SMF). I verify this using web developer > > toolbar's cookie information tool. There are two cookies, both by the > > name SMFCookie655, both containing different information. > > > - Sohum. > > > On Aug 3, 3:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > > > Hi Geoff, > > > > First of all, thanks for your response. > > > > Now, the SSI.php file that SMF provides for includes has defined a > > > bunch of functions that have the prefix ssi. For example, the function > > > ssi_welcome() prints out a welcome message (Welcome back username, you > > > have x messages) or a login message (Welcome guest. Please login or > > > register) depending on the session information. There is also a > > > provided ssi_examples.php file that shows the output of all these > > > functions. > > > > Now when I'm logged out, of course everything works. The user is > > > logged out and all the functions behave like that. When I then login > > > to SMF, the ssi_examples.php functions all update, but the same > > > function calls in my layouts, it still treats the user as not logged > > > in. Printing out the SMF contextual data confirms this--CakePHP > > > doesn't "update" the session data it seems. > > > > I have included the "SSI.php" in my layout file. Perhaps I should > > > include this somewhere else? Although that doesn't seem like the > > > solution. > > > > - Sohum. > > > > On Aug 3, 10:38 am, Geoff Ford <[EMAIL PROTECTED]> wrote: > > > > > What are the ssi calls - From my understanding Cake shouldn't need to > > > > use these. Cake will just add its own keys to the existing session (I > > > > think). > > > > > The only trouble you might have is if cake and smf use the same key > > > > and one overwrites the other all the time (not sure that this will > > > > happen, just that it could) > > > > > Geoff > > > > --http://lemoncake.wordpress.com > > > > > On Aug 3, 12:30 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > > > wrote: > > > > > > Hi, > > > > > > I checked out the two threads regarding integration of Simple > > Machines > > > > > Forum (SMF) and CakePHP but was unable to get far. I posted > > something > > > > > in one of those threads, but it seems to have gotten lost. So > > anyways, > > > > > here's my post: > > > > > > I have come across a little bit of trouble while using the SMF API. > > > > > > Even when I do > > > > > > > > > > require_once("forums/SSI.php"); > > > > > // ssi_* calls > > > > > ?> > > > > > > I am unable to get access to the SMF session data. I'm sure I'm > > doing > > > > > something stupid seeing that I'm not really knowledgeable at all > > when > > > > > it comes to PHP sessions, so here's what I did, so anyone can figure > > > > > out: > > > > > > 1. I installed CakePHP as it comes out of the box. > > > > > 2. I installed SMF to the same database as CakePHP under webroot/ > > > > > forums > > > > > 3. I included the above require call in my default.thtml. > > > > > 4. I set CAKE_SESSION_COOKIE to SMFCookie655 (which is what it is > > for > > > > > SMF) and changed management to database. > > > > > 5. I changed CAKE_SESSION_TABLE to forums_sessions, which is where > > the > > > > > SMF session are kept. >
How to get the return value from cakephp save method.
I am using the below lines of code to save the 'project' module in my cakephp application. After saving the project module i like to retrieve the id,name of the project. The current save method is not returning the saved the row from database. (Note: I am 3 days old in Cake. Please apologize my mistakes) if ($this->Project->save($this->data)) { $this->set('savedProject', $this); $this->Session->setFlash('The Project has been saved'); Thanks, Prem --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP+SMF (again?)
Ok that sheds some light - the two cookies will have different paths associated with them. Correct me if I am wrong but you are using smf to log a user in. This creates a cookie with the path /forum associated with it. When you go to / or /controller Cake cannot access the cookie because it is outside the path. You need to find where in smf the cookie is being set and either change or add a path to the setcookie() call so that the path is set as the root level path. This will make the cookie available to the entire domain including all the cake controller/action paths. >From http://php.net/setcookie *path* The path on the server in which the cookie will be available on. If set to '/', the cookie will be available within the entire *domain*. If set to '/foo/', the cookie will only be available within the /foo/ directory and all sub-directories such as /foo/bar/ of *domain*. The default value is the current directory that the cookie is being set in. Geoff On 8/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > Also, not sure if this will help, but browsing to the forum creates a > new cookie by the same name as CakePHP (since I changed CakePHP's > session name to be the same as SMF). I verify this using web developer > toolbar's cookie information tool. There are two cookies, both by the > name SMFCookie655, both containing different information. > > - Sohum. > > On Aug 3, 3:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > Hi Geoff, > > > > First of all, thanks for your response. > > > > Now, the SSI.php file that SMF provides for includes has defined a > > bunch of functions that have the prefix ssi. For example, the function > > ssi_welcome() prints out a welcome message (Welcome back username, you > > have x messages) or a login message (Welcome guest. Please login or > > register) depending on the session information. There is also a > > provided ssi_examples.php file that shows the output of all these > > functions. > > > > Now when I'm logged out, of course everything works. The user is > > logged out and all the functions behave like that. When I then login > > to SMF, the ssi_examples.php functions all update, but the same > > function calls in my layouts, it still treats the user as not logged > > in. Printing out the SMF contextual data confirms this--CakePHP > > doesn't "update" the session data it seems. > > > > I have included the "SSI.php" in my layout file. Perhaps I should > > include this somewhere else? Although that doesn't seem like the > > solution. > > > > - Sohum. > > > > On Aug 3, 10:38 am, Geoff Ford <[EMAIL PROTECTED]> wrote: > > > > > What are the ssi calls - From my understanding Cake shouldn't need to > > > use these. Cake will just add its own keys to the existing session (I > > > think). > > > > > The only trouble you might have is if cake and smf use the same key > > > and one overwrites the other all the time (not sure that this will > > > happen, just that it could) > > > > > Geoff > > > --http://lemoncake.wordpress.com > > > > > On Aug 3, 12:30 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > > wrote: > > > > > > Hi, > > > > > > I checked out the two threads regarding integration of Simple > Machines > > > > Forum (SMF) and CakePHP but was unable to get far. I posted > something > > > > in one of those threads, but it seems to have gotten lost. So > anyways, > > > > here's my post: > > > > > > I have come across a little bit of trouble while using the SMF API. > > > > > > Even when I do > > > > > > > > > require_once("forums/SSI.php"); > > > > // ssi_* calls > > > > ?> > > > > > > I am unable to get access to the SMF session data. I'm sure I'm > doing > > > > something stupid seeing that I'm not really knowledgeable at all > when > > > > it comes to PHP sessions, so here's what I did, so anyone can figure > > > > out: > > > > > > 1. I installed CakePHP as it comes out of the box. > > > > 2. I installed SMF to the same database as CakePHP under webroot/ > > > > forums > > > > 3. I included the above require call in my default.thtml. > > > > 4. I set CAKE_SESSION_COOKIE to SMFCookie655 (which is what it is > for > > > > SMF) and changed management to database. > > > > 5. I changed CAKE_SESSION_TABLE to forums_sessions, which is where > the > > > > SMF session are kept. > > > > 6. I added the "expires" field to the forums_sessions table. > > > > 7. I made minor modifications to lib/sessions.php to make sure that > > > > _read, _write, etc. worked correctly (SMF stores session id in a > > > > session_id field, whereas Cake stores it in id) > > > > > > When I viewhttp://path/to/forums/ssi_examples.php, all the data is > > > > populated correctly. However, when I call any function from within > the > > > > Cake layout, the data is blank. > > > > > > It seems to me that in Cake's call to the SSI functions, it attempts > > > > to populate data using the information from the Cake session. > > > > Regardless of the way everything is set-up, it seems Cake
Re: Japanese rendering bug between euc-jp and utf-8 linux
On 8/3/07, Jerome Eteve <[EMAIL PROTECTED]> wrote: > > This problem doesn't appear in ie for linux ( from > http://www.tatanka.com.br/ies4linux/page/Main_Page ) nor in ie or > firefox for windows > > I'm a bit confused. > Just hazarding a guess here - could it be that different fonts set are being used for different encoding and the jp page in the utf-8 font set is not very good under linux? We have encountered similar problems for Indian languages in the past... Tarique -- = Cheesecake-Photoblog: http://cheesecake-photoblog.org PHP for E-Biz: http://sanisoft.com = --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Check mod_rewite through programming
no need to work hard: google.com: php.net modules apache http://il.php.net/apache [this was the first sub-result] (PHP: Apache- specific Functions - Manual) http://il.php.net/manual/en/function.apache-get-modules.php (after reading the page..) On Aug 2, 5:00 pm, "Sascha Fröhlich" <[EMAIL PROTECTED]> wrote: > Damn... > phpinfo() spits out some information about apache2handler, take a look at > "loaded modules"... > perhaps you can parse the output, see this page:http://de3.php.net/phpinfo > > Regards, > Sascha > > 2007/8/2, Sascha Fröhlich <[EMAIL PROTECTED]>: > > > > > Hi there, --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Japanese rendering bug between euc-jp and utf-8 linux
Hi all, we are currently translating our website in japanese. Our system and our website is full utf-8 . Here is a problem we have: Under linux/firefox 2.0 , the rendering is different if a webpage is encoded in euc-jp or in utf-8. I did some tests with yahoo.jp home page: - Have a look at yahoo.jp in firefox . All the characters are nicely displayed and antialiased. This page is encoded as euc-jp - Save the yahoo.jp home page html . - Change the encoding from euc-jp to utf-8: iconv -f euc-jp -t utf-8 yahoohome.html > yahoohome_utf8.html - Now open yahoohome_utf8.html in firefox, set the view -> character encoding to utf8 (it's still stated in the file that it's a euc-jp page). If you compare the two versions, - the one with euc-jp encoded character is perfect. - the one with utf-8 encoded characters have got the same characters everywhere but about half of them is display very roughly, without any antialising. As far as I understand how character encoding works, the encoding of the page should not influence the picked code point of the displayed character, but here apparently it's the case. The encoding seems to have an effect on which character is picked from the character set. This problem doesn't appear in ie for linux ( from http://www.tatanka.com.br/ies4linux/page/Main_Page ) nor in ie or firefox for windows I'm a bit confused. Thanks for any help ! Jerome --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
cakephp.org website
Why is the server not available? --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP+SMF (again?)
Also, not sure if this will help, but browsing to the forum creates a new cookie by the same name as CakePHP (since I changed CakePHP's session name to be the same as SMF). I verify this using web developer toolbar's cookie information tool. There are two cookies, both by the name SMFCookie655, both containing different information. - Sohum. On Aug 3, 3:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi Geoff, > > First of all, thanks for your response. > > Now, the SSI.php file that SMF provides for includes has defined a > bunch of functions that have the prefix ssi. For example, the function > ssi_welcome() prints out a welcome message (Welcome back username, you > have x messages) or a login message (Welcome guest. Please login or > register) depending on the session information. There is also a > provided ssi_examples.php file that shows the output of all these > functions. > > Now when I'm logged out, of course everything works. The user is > logged out and all the functions behave like that. When I then login > to SMF, the ssi_examples.php functions all update, but the same > function calls in my layouts, it still treats the user as not logged > in. Printing out the SMF contextual data confirms this--CakePHP > doesn't "update" the session data it seems. > > I have included the "SSI.php" in my layout file. Perhaps I should > include this somewhere else? Although that doesn't seem like the > solution. > > - Sohum. > > On Aug 3, 10:38 am, Geoff Ford <[EMAIL PROTECTED]> wrote: > > > What are the ssi calls - From my understanding Cake shouldn't need to > > use these. Cake will just add its own keys to the existing session (I > > think). > > > The only trouble you might have is if cake and smf use the same key > > and one overwrites the other all the time (not sure that this will > > happen, just that it could) > > > Geoff > > --http://lemoncake.wordpress.com > > > On Aug 3, 12:30 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > > > > Hi, > > > > I checked out the two threads regarding integration of Simple Machines > > > Forum (SMF) and CakePHP but was unable to get far. I posted something > > > in one of those threads, but it seems to have gotten lost. So anyways, > > > here's my post: > > > > I have come across a little bit of trouble while using the SMF API. > > > > Even when I do > > > > > > require_once("forums/SSI.php"); > > > // ssi_* calls > > > ?> > > > > I am unable to get access to the SMF session data. I'm sure I'm doing > > > something stupid seeing that I'm not really knowledgeable at all when > > > it comes to PHP sessions, so here's what I did, so anyone can figure > > > out: > > > > 1. I installed CakePHP as it comes out of the box. > > > 2. I installed SMF to the same database as CakePHP under webroot/ > > > forums > > > 3. I included the above require call in my default.thtml. > > > 4. I set CAKE_SESSION_COOKIE to SMFCookie655 (which is what it is for > > > SMF) and changed management to database. > > > 5. I changed CAKE_SESSION_TABLE to forums_sessions, which is where the > > > SMF session are kept. > > > 6. I added the "expires" field to the forums_sessions table. > > > 7. I made minor modifications to lib/sessions.php to make sure that > > > _read, _write, etc. worked correctly (SMF stores session id in a > > > session_id field, whereas Cake stores it in id) > > > > When I viewhttp://path/to/forums/ssi_examples.php, all the data is > > > populated correctly. However, when I call any function from within the > > > Cake layout, the data is blank. > > > > It seems to me that in Cake's call to the SSI functions, it attempts > > > to populate data using the information from the Cake session. > > > Regardless of the way everything is set-up, it seems Cake creates it's > > > own cookie and SMF creates it's own cookie. Should it do this? > > > > Any help will be appreciated. :D > > > > - Sohum. --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP+SMF (again?)
Hi Geoff, First of all, thanks for your response. Now, the SSI.php file that SMF provides for includes has defined a bunch of functions that have the prefix ssi. For example, the function ssi_welcome() prints out a welcome message (Welcome back username, you have x messages) or a login message (Welcome guest. Please login or register) depending on the session information. There is also a provided ssi_examples.php file that shows the output of all these functions. Now when I'm logged out, of course everything works. The user is logged out and all the functions behave like that. When I then login to SMF, the ssi_examples.php functions all update, but the same function calls in my layouts, it still treats the user as not logged in. Printing out the SMF contextual data confirms this--CakePHP doesn't "update" the session data it seems. I have included the "SSI.php" in my layout file. Perhaps I should include this somewhere else? Although that doesn't seem like the solution. - Sohum. On Aug 3, 10:38 am, Geoff Ford <[EMAIL PROTECTED]> wrote: > What are the ssi calls - From my understanding Cake shouldn't need to > use these. Cake will just add its own keys to the existing session (I > think). > > The only trouble you might have is if cake and smf use the same key > and one overwrites the other all the time (not sure that this will > happen, just that it could) > > Geoff > --http://lemoncake.wordpress.com > > On Aug 3, 12:30 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > Hi, > > > I checked out the two threads regarding integration of Simple Machines > > Forum (SMF) and CakePHP but was unable to get far. I posted something > > in one of those threads, but it seems to have gotten lost. So anyways, > > here's my post: > > > I have come across a little bit of trouble while using the SMF API. > > > Even when I do > > > > require_once("forums/SSI.php"); > > // ssi_* calls > > ?> > > > I am unable to get access to the SMF session data. I'm sure I'm doing > > something stupid seeing that I'm not really knowledgeable at all when > > it comes to PHP sessions, so here's what I did, so anyone can figure > > out: > > > 1. I installed CakePHP as it comes out of the box. > > 2. I installed SMF to the same database as CakePHP under webroot/ > > forums > > 3. I included the above require call in my default.thtml. > > 4. I set CAKE_SESSION_COOKIE to SMFCookie655 (which is what it is for > > SMF) and changed management to database. > > 5. I changed CAKE_SESSION_TABLE to forums_sessions, which is where the > > SMF session are kept. > > 6. I added the "expires" field to the forums_sessions table. > > 7. I made minor modifications to lib/sessions.php to make sure that > > _read, _write, etc. worked correctly (SMF stores session id in a > > session_id field, whereas Cake stores it in id) > > > When I viewhttp://path/to/forums/ssi_examples.php, all the data is > > populated correctly. However, when I call any function from within the > > Cake layout, the data is blank. > > > It seems to me that in Cake's call to the SSI functions, it attempts > > to populate data using the information from the Cake session. > > Regardless of the way everything is set-up, it seems Cake creates it's > > own cookie and SMF creates it's own cookie. Should it do this? > > > Any help will be appreciated. :D > > > - Sohum. --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: setting pear for cakephp
Download PEAR.php from the pear site and put it in your vendors folder. That should do the trick. On Aug 2, 9:24 am, rtanz <[EMAIL PROTECTED]> wrote: > im trying to use pear with cakephp, i installed it using the uniserver > installer so now pear is located at W:\home\admin\www\plugins\pear/ > PEAR. my cakephp code on the other hand is failing to find it, so how > can i set cake to included that pear file? thanks > > Warning: require_once(PEAR.php) [function.require-once]: failed to > open stream: No such file or directory in W:\www\cake\app\vendors > \Upload.php on line 42 > > Fatal error: require_once() [function.require]: Failed opening > required 'PEAR.php' (include_path='W:\www\cake;W:\www\cake\app\;.;/ > usr/ > local/PHP/includes;/usr/local/PHP/pear') in W:\www\cake\app\vendors > \Upload.php on line 42 --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: phpGACL and params in action.
Who used phpgacl-cake component? --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How should I allow Users only to edit their own Posts in a Cake App? Acl related
On 8/3/07, luke BAKING barker <[EMAIL PROTECTED]> wrote: > > Ketan you may be right so far as scaling it goes, but I think that > there may be reasonable ways around it like (if member of EDITORS > group OR if its this users ID) then > If simple control is all you want then don't bother with ACL use the auth component and use $this->Auth->authorize = 'controller'; Then your controller should have an isAuthorized method which returns true or false depending upon the role of the user logged in at a later date if you decide to go the ACL way you can change it with simply doing $this->Auth->authorize = 'actions'; (well an oversimplification but more or less thats it) HTH Tarique P.S. the auth component has got some gotchas be sure to look them up in the archives -- = Cheesecake-Photoblog: http://cheesecake-photoblog.org PHP for E-Biz: http://sanisoft.com = --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How should I allow Users only to edit their own Posts in a Cake App? Acl related
Hi Ketan you may be right so far as scaling it goes, but I think that there may be reasonable ways around it like (if member of EDITORS group OR if its this users ID) then let them edit etc else don't... thanks for all your replies, a good help. Luke On Aug 2, 11:31 am, Fran Simó <[EMAIL PROTECTED]> wrote: > Ketan...so you're saying that is a good idea to create an ARO for each > post? > > On 1 ago, 18:27, Ketan Patel <[EMAIL PROTECTED]> wrote: > > > If you are sticking to very basic level like user x can edit his own > > records and not others, then it is OK. However, as your application > > grows, you may not find this good enough for management and will start > > giving you nightmares later on. I would suggest to go with ACL as it > > does not add that much of an overhead as you might think! > > > Cheers, > > Ketan --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Threaded menu
thanks for your replies! I'll try today... --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Multiple duplicate Fields Validation
Hi, I have a form to add users to my database. I want the Doctornumber(id) & subdomain to be unique( no duplicates) I tried the following http://bakery.cakephp.org/articles/view/checking-for-duplicate-records-unique-record the add user function has the following code if (!empty($this->data)) { if ($this->User->isUnique('id', $this->data['User']['id']) && $this->User->isUnique('subdom', $this->data['User']['subdom'])) { if ($this->User->save($this->data)) { $this->flash('Doctor has been saved.','/users/ adddoctor'); } } } and my view files has this Subdomain Name: input('User/subdom', array('size' => '40'))? > tagErrorMsg('User/subdom', 'Subdomain is required.') ?> tagErrorMsg('User/ unique_subdom', 'Enter another subdomain, this is already used.'); ?> Doctor Number: input('User/id', array('size' => '40'))?> tagErrorMsg('User/id', 'Doctor Number is required.') ?> tagErrorMsg('User/ unique_id', 'Enter another number, this is already used.'); ?> the problem is when any of the fields is wrong it always says "Enter another number, this is already used" even if the subdomain field is wrong the result is "Enter another number, this is already used" what would be the problem? Can't i do multiple field validations? Please Help me Thank you Isaac Raja --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Extending AppController
Ok, so move your app_controller.php to vendors too, and call vendor('app_controller'); before calling vendor('model_controller'); On Aug 2, 4:35 pm, safl <[EMAIL PROTECTED]> wrote: > I just tried out your suggestion, however i ended up with the same > issue as just doing a "require" from bootstrap. > The ModuleController can't see AppController and extend that class, > the actual error msg is: > > "Class 'AppController' not found in module_controller.php on line 3". > > On Aug 2, 3:05 pm, Grzegorz Pawlik <[EMAIL PROTECTED]> wrote: > > > Sorry if i just write 2nd time something- thread is long and i could > > miss something. > > Have You tried something like: > > > put in /app/vendors file called module_controller.php with definition > > class ModuleController extends AppController. > > Then in /config/bootstrap.php call vendor('module_controller'); > > Now your ModuleController should be accessible and it extends your > > AppController. And some off Your controllers can be an extension of > > AppController or ModelController- just like (I think) You want to do > > this. Am I right? > > > On Aug 2, 12:59 pm, safl <[EMAIL PROTECTED]> wrote: > > > > Hmm unfortunately no. As an example of one of the things that > > > ModuleController will be doing is this: > > > > ... > > > var $components = array('Preferences'); > > > > > > function index() { > > > > > > $this->redirect($this->Preferences->get('App',$this->name,null,'action'),true); > > > > } > > > ... > > > > What the code does is fetch the preferred action from a users > > > preferences of any given controller and then redirect the user to that > > > action. > > > I used to have that index function defined in all of the controllers > > > that needed this "preferred redirection", that lead to redundant code > > > which was a pain to maintain. > > > > But since having it in AppController would be very annoying since not > > > all Controllers must behave like this for their "index". > > > In some cases doing it would be very wrong (eg. the controller which > > > handles login/logout stuff among others) and when using scaffolding in > > > the early stages of adding something new to the project. > > > > On Aug 2, 11:57 am, "Jon Bennett" <[EMAIL PROTECTED]> wrote: > > > > > Hi Simon, > > > > > > Hmm it just seems weird that it's not possible to go down this road.. > > > > > all I'm doing is simple OO.. I'm merely extending an object.. > > > > > > I've considered another strategy, if you could comment on whether this > > > > > strides against Cake I would appreciate it very much. > > > > > > Inspired by "Scaffold" i could do something like this: > > > > > > class Module extends Object {..} > > > > > > Then I implement logic in AppController that loads functions and > > > > > properties from "Module" if "var $module;" is set, just like > > > > > scaffolding works. > > > > > Then "modules" are now a new abstract object in cake that wasn't there > > > > > before, managing logic for controllers with the property of being a > > > > > "module". > > > > > > Is this more in compliance with cake? > > > > > hmm, no, not really, at least not IMHO. A more cake way to do it would > > > > be to have your usual controllers/models/views, which are _generally_ > > > > mapped to your data structure (but not always), and a single > > > > app_controller. I would then abstract the functionality you require > > > > for each 'module' into components, and either include them all in > > > > app_controller, so all controllers have access to the one they need, > > > > or add the correct one to each controllers own $components array. > > > > > Woudl you be able to abstract the code you need like this? > > > > > Cheers, > > > > > Jon > > > > ps: lets keep this on-list please. > > > > > -- > > > > > jon bennett > > > > t: +44 (0) 1225 341 039 w:http://www.jben.net/ > > > > iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
phpGACL and params in action.
Hello guys, please say me, how i can make rule for PHPGacl. I need DENY /news/view/123, and ALLOW all another articles, but i don't see this features in PHPGACL CAke Control panel. I try make Controllable Elements (AXOs) as view(123) and view/123,but it's not work. Help me please. --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---