Re: how to get rendered view with layout using requestAction
thank you. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: hierarchical controllers
I asked the same question a month ago. Someone suggested using plugins. I have nog tried this yet, but it looks like the way to go. The only 'problem' is that it's not really hierarchical, because you can only separate your controllers into folders, not subfolders into that etc. See http://groups.google.com/group/cake-php/browse_frm/thread/e1ab09307c2898b2/46eda28e81620220 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
about multiple select
PHP: selectTag('Tag/Tag', array(1,3,4), null, array('multiple' => 'multiple'));?> Page Source: 1 3 4 Why does the SELET have an empty option? How to make it come without any empty option? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Cake PHP and templates
Philip, > I wanted to use a PHP template system with CakePHP.. Why? Please read this. [0] > My idea was to convert the PHP variables to Javascript using JSON (but > didn't work out how to do this successfully). Then to use these > variables in Javascript to be passed through the Javascript template > as above. *blinks* Are you on sure you really want to do this? The TrimPath engine is meant for static (ie non server-side) pages to be able to perform quasi-queries on static data (say, a whole load of HTML pages burnt to a CD or DVD), not to do the job of PHP. --lamby [0] http://www.phppatterns.com/docs/design/templates_and_template_engines -- Chris Lamb, Cambridgeshire, UK [EMAIL PROTECTED] WWW: www.chris-lamb.co.uk GPG: 0x634F9A20 signature.asc Description: PGP signature
Cake PHP and templates
Hi, I wanted to use a PHP template system with CakePHP but I don't know how to get started. In fact I also had a different idea which was to use TrimPath Javascript templates http://trimpath.com/project/wiki/JavaScriptTemplates My idea was to convert the PHP variables to Javascript using JSON (but didn't work out how to do this successfully). Then to use these variables in Javascript to be passed through the Javascript template as above. Any ideas? Has anyone had any success with using a template with CakePHP? One problem I have is how can you get things like the HTML from. $ajax->link('Home', '/pages/cms', array('update' => 'maincontent')); to the template? Thanks, Philip --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: how to get rendered view with layout using requestAction
What you want is to set the $this->autoLayout = true for the target controller. You can't do this where you are calling the requestAction though, it needs to be in the execution of the target controller/action. The way I've done this (I email the final output), is to put: $Route->connect('/email/:controller/:action/*', array('email' => '1')); in my app/config/routes.php (so, anything prefixed with /email/ will set a variable, but work as normal). And then, in my app/app_controller.php I have: function beforeFilter() { if ( @$this->params['email'] == '1' ){ $this->autoLayout = true; ... } } So that I can easily prefix any controller/action with /email/, and the output is suitable for emailing (links become absolute rather than relative, css is inlined etc). --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: flash() not working
remember that the automatic redirect only works with a DEBUG set to 0 in the config/core.php for other debug levels you have to manually click on the link Sam D On 8/1/06, anir <[EMAIL PROTECTED]> wrote: > > Hi all, > > I am new to cakephp. In my controllers after adding a record, I am > trying to use flash() to display a confirmation mesage and redirect to > my home page. But the problem is although it is showing the message in > the next page but it is far from redirecting it to the index page. It > is showing the message and stands there. > > The line is: > > $this->flash('Your note has been added.','/notes/',3); > > I was initially trying with : > > $this->flash('Your note has been added.','/notes/'); > > But both are not working. I have tested this on both IE and firefox. > > I am working in windows xp with apache. I have configured apache for > mod_rewrite and it is working properly. > > Thanking you all in advance. > > - Anir > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: flash() not working
On Aug 1, 2006, at 4:32 PM, anir wrote: > > But both are not working. I have tested this on both IE and firefox. What is your DEBUG setting in /app/config/core.php? If it's > 0, then flash will not redirect (so you can see your SQL or other debugging information for that request). -- 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 -~--~~~~--~~--~--~---
flash() not working
Hi all, I am new to cakephp. In my controllers after adding a record, I am trying to use flash() to display a confirmation mesage and redirect to my home page. But the problem is although it is showing the message in the next page but it is far from redirecting it to the index page. It is showing the message and stands there. The line is: $this->flash('Your note has been added.','/notes/',3); I was initially trying with : $this->flash('Your note has been added.','/notes/'); But both are not working. I have tested this on both IE and firefox. I am working in windows xp with apache. I have configured apache for mod_rewrite and it is working properly. Thanking you all in advance. - Anir --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Will Sanitize->cleanArray protect against XSS attacks?
Just to say a bit more, I found this in the article for UTF-8 on Wikipedia: "A badly-written (and not compliant with current versions of the standard) UTF-8 parser could accept a number of different pseudo-UTF-8 representations and convert them to the same Unicode output. This provides a way for information to leak past validation routines designed to process data in its eight-bit representation." http://en.wikipedia.org/wiki/UTF-8 That's the kind of thing I'm worried about, but don't really know much about. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Cake joins and conditions improperly placed?
I am working on a project where in each table there is a deleted column. For example, I have User.deleted, Group.deleted. The below is written by cake incorrectly (Unless I modeled something wrong, but I must say I used the bake script to make the models, controllers, and views then added the conditions myself). What that statement is saying if Group.deleted <> Y AND User.deleted <> Y (in this case Group.deleted is set to Y) then don't show the user, this is an incorrect assumption. Is there a way to correct this problem? If so, how to go about it? Below is my model, and User/index produces the following SQL (core.php debug is 2)statement: SELECT `User`.`id`, `User`.`lastname`, `User`.`firstname`, `User`.`username`, `User`.`password`, `User`.`group_id`, `User`.`deleted`, `User`.`emailAddress`, `Group`.`id`, `Group`.`name`, `Group`.`deleted` FROM `users` AS `User` LEFT JOIN `groups` AS `Group` ON `User`.`group_id` = `Group`.`id` WHERE ( ucase(ifnull(User.deleted,"N"))<>"Y") AND ( ucase(ifnull(Group.deleted,"N"))<>"Y") IMO the statement should have been written as (This way User still shows up, but has Group information as nulls since their group has been marked as deleted): SELECT `User`.`id`, `User`.`lastname`, `User`.`firstname`, `User`.`username`, `User`.`password`, `User`.`group_id`, `User`.`deleted`, `User`.`emailAddress`, `Group`.`id`, `Group`.`name`, `Group`.`deleted` FROM `users` AS `User` LEFT JOIN `groups` AS `Group` ON `User`.`group_id` = `Group`.`id` AND ( ucase(ifnull(Group.deleted,"N"))<>"Y") WHERE ( ucase(ifnull(User.deleted,"N"))<>"Y") array('className' => 'Group', 'conditions' => 'ucase(ifnull(Group.deleted,"N"))<>"Y"', 'order' => '', 'foreignKey' => 'group_id', 'counterCache' => ''), ); var $hasMany = array( 'MileageClaim' => array('className' => 'MileageClaim', 'conditions' => 'ucase(ifnull(MileageClaim.deleted,"N"))<>"Y"', 'order' => '', 'foreignKey' => 'user_id', 'dependent' => '', 'exclusive' => '', 'finderSql' => '', 'counterSql' => ''), ); var $hasAndBelongsToMany = array( 'Department' => array('className' => 'Department', 'conditions' => 'ucase(ifnull(deleted,"N"))<>"Y"', 'order' => '', 'foreignKey' => 'user_id', 'joinTable' => 'users_departments', 'associationForeignKey' => 'department_id', 'uniq' => '', 'finderQuery' => '', 'deleteQuery' => '', 'insertQuery' => ''), ); } ?> --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Will Sanitize->cleanArray protect against XSS attacks?
I can't seem to find the specific example I was looking for, but I did find this when looking back in my database for one of the tests I did: ¼script¾alert(¢Another Test¢)¼/script¾ It didn't seem to cause a problem, though I don't know if that's because of some PHP or Apache setting; my fear is that what doesn't cause a program for my local setup might cause a problem when deployed on a server that is configured differently. I could have sworn I saw the above example at... http://ha.ckers.org/xss.html ...yesterday, but I can't seem to find it now. Incidentally, the site I linked above is supposedly referenced in that OWASP site you mentioned (in the appendix). I'll have to take a look at that site as well. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: FCK eventually sorted out - For AD7Six (and those interested)
Nevermind. WidgEditor does not load if you have an onload function defined in your body tag.I had Kind of annoying. I was preloading images with my startup function. On 8/1/06, John Zimmerman [gmail] <[EMAIL PROTECTED]> wrote: @Jon BennettCan you post a snippet of what you did to get widgEditor working? I am trying to get it up and running but can't get it to load within cake.Thanks On 7/24/06, Jon Bennett <[EMAIL PROTECTED]> wrote: > > (and this is just my personal preference), I've much preferred TinyMCE> > to FCK. It's much lighter-weight, has a more new-school API, and works> > well with Cake's field-naming conventions. >> Thanks for that, I will definitely be checking out TinyMCE.I've just implementedTheManInBlue's widgEditor, very lightweight,though it also doesn't work with Cake's naming conventions (nothing in _POST even, just 'true'), so I have to do:html_entity_decode($html->tagValue('News/body'); ?> check out: http://www.themaninblue.com/experiment/widgEditor/ I need to extend it though to handle images better, what I'm, thinkingof doing is having a fixed height, scrollable div with all the uploaded images as thumbnails in it, which if you click inserts thatimage into the textfield, hopefully at the last cursor insertationpoint, but at the beginning would be fine also.I'll try to knock up a snippet at some point if it all works according to plan. jb--jon bennettt: +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 -~--~~~~--~~--~--~---
Re: FCK eventually sorted out - For AD7Six (and those interested)
@Jon BennettCan you post a snippet of what you did to get widgEditor working? I am trying to get it up and running but can't get it to load within cake.ThanksOn 7/24/06, Jon Bennett <[EMAIL PROTECTED]> wrote: > > (and this is just my personal preference), I've much preferred TinyMCE> > to FCK. It's much lighter-weight, has a more new-school API, and works> > well with Cake's field-naming conventions. >> Thanks for that, I will definitely be checking out TinyMCE.I've just implementedTheManInBlue's widgEditor, very lightweight,though it also doesn't work with Cake's naming conventions (nothing in _POST even, just 'true'), so I have to do:html_entity_decode($html->tagValue('News/body'); ?> check out: http://www.themaninblue.com/experiment/widgEditor/I need to extend it though to handle images better, what I'm, thinkingof doing is having a fixed height, scrollable div with all the uploaded images as thumbnails in it, which if you click inserts thatimage into the textfield, hopefully at the last cursor insertationpoint, but at the beginning would be fine also.I'll try to knock up a snippet at some point if it all works according to plan. jb--jon bennettt: +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 -~--~~~~--~~--~--~---
Re: Will Sanitize->cleanArray protect against XSS attacks?
On Aug 1, 2006, at 2:17 PM, Eric Farraro wrote: > > To focus my question a little further, I pointed out that in the > Sanitize->html function, a simple find and replace was done on certain > characters. My (very basic) understanding of XSS attacks is that they > will often evade filters by using certain characters that can be > expressed with patterns not caught by the filter, but when rendered, > are considered the same. Do you have a few examples of these characters? The OWASP articles[1] I referenced when creating Sanitize only mentioned watching out for < and >. If you know of some more characters that it should watch out for, let's gather them up and get it fixed. -- John [1] http://www.owasp.org/index.php/XSS http://www.owasp.org/index.php/XSS_Attacks --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Will Sanitize->cleanArray protect against XSS attacks?
Sorry if it sounds like I made that assumption -- I guess my question was a little too broad and the title a bit sensational. To focus my question a little further, I pointed out that in the Sanitize->html function, a simple find and replace was done on certain characters. My (very basic) understanding of XSS attacks is that they will often evade filters by using certain characters that can be expressed with patterns not caught by the filter, but when rendered, are considered the same. To say that cleanArray is the end-all solution to XSS attacks is silly, I agree :) I'm more interested in the particular issue I pointed out -- using characters not caught by the regular expression in Sanitize->html -- and whether or not such an attack would be foiled by cleanArray. My feeling is that it would not, but I don't know enough about XSS attacks to craft one that would use these other characters. Thanks for the response Sam. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Will Sanitize->cleanArray protect against XSS attacks?
I think to make the assumption that because no one either feels confident enough to answer the question of whether or not cleanArray or the CakePHP framework in generally protects against XSS attacks, no one understands the vulnerabilities is fairly shallow. I think given the variety and varying levels of sophistication of XSS attacks (as well as other attacks on a site in this day and age) to assume that one verb or a framework can protect you from them is 'crazy'. Only you can know how your application is vulnerable and what can be done with it. Can cleanArray help? yes. Can it foil all efforts? don't be silly. Does the framework reduce a sites vulnerablity? yes. Is it perfect? no.That is why there is the SecurityComponent, the cleanArray, and other functions. It is a battle we all must wage and continue to learn and share methods and practices to solve. cleanArray would only address a small fraction of the possible ways to 'break' into your app. Humbly Sam DOn 8/1/06, Eric Farraro <[EMAIL PROTECTED]> wrote: Surely someone must know a bit about XSS vulnerabilities! :) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
social networking
Hello, I am working (Free) on a social networking site for a community. I have decided to do this in cakephp. I was going to use Jsp or aspx but for whatever reason Im' choosing CakePHP. I am in the final stages of datbase design and i was hoping that this community would look it over for me. If you have the time to look at my design along with the notes (My notes show you what the purpose of the table is and what it will do) I'd appreciate it alot. Thank you. If interested, please do email me . Thanks. [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Will Sanitize->cleanArray protect against XSS attacks?
Surely someone must know a bit about XSS vulnerabilities! :) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Re: image -> link should be simple right
If this old dog can learn this new CakePHP tricks thing then any one can. On 8/1/06, kestrelid <[EMAIL PROTECTED]> wrote: > > Sorted. If the quality of this response is the future in cakePHP I have > to look forward to, the future is bright. > > thanks Samuel > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Use cake session outside of framework
Took another look at this issue. There *is* an easy way to access to the Cake session from outside of the framework, you just have to reference it correctly: if(isset($_COOKIE[CAKEPHP])){ session_id($_COOKIE[CAKEPHP]); } session_start(); *not just* session_start(); Since cake uses a special session name, you need to reference that ID before starting the session. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: image -> link should be simple right
Sorted. If the quality of this response is the future in cakePHP I have to look forward to, the future is bright. thanks Samuel --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: OthAuth and sql error
kestrelid ha scritto: > not known to me, but you might want to try putting brackets around Should work without modifed anything ... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: image -> link should be simple right
You should try making the 5th parameter false so that it doesn't escape the title (or the link text) in your case the image tag Sam D ps the api is your guide http://api.cakephp.org/ ;) and welcome from the grumpy old man who leave short useless answers scattered all over the place link ($title, $url=null, $htmlAttributes=null, $confirmMessage=false, $escapeTitle=true, $return=false) On 8/1/06, kestrelid <[EMAIL PROTECTED]> wrote: > > New to cakePHP so forgive me a potentially stupid question. > > Creating an image link should be simple, right! I have gone through the > manual I don't know how many times. Looked through code snippets, etc. > yet I still get bogus output rather than my chosen picture as a link! > > An image link as I understand it should be something like this > link( $html->image("edit.png", > array('alt'=>'edit')),"/users/edit/{$user['User']['id']}"); ?> > > For output, I am getting a working link but it is this actual text that > you have to click to activate the link! > > > rather than the image at > www.kestrelid.com/cakePHP/app/webroot/img/edit.png > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: OthAuth and sql error
not known to me, but you might want to try putting brackets around (`groups_permissions`.`group_id` = '1' AND `groups_permissions`.`permission_id` = `Permission`.`id`). shot in the dark? haven't tried this myself! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
image -> link should be simple right
New to cakePHP so forgive me a potentially stupid question. Creating an image link should be simple, right! I have gone through the manual I don't know how many times. Looked through code snippets, etc. yet I still get bogus output rather than my chosen picture as a link! An image link as I understand it should be something like this link( $html->image("edit.png", array('alt'=>'edit')),"/users/edit/{$user['User']['id']}"); ?> For output, I am getting a working link but it is this actual text that you have to click to activate the link! rather than the image at www.kestrelid.com/cakePHP/app/webroot/img/edit.png --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
OthAuth and sql error
I'am try OthAuth; i can login but this query failed : SELECT `Permission`.`id`, `Permission`.`name`, `Permission`.`created`, `Permission`.`modified` FROM `permissions` AS `Permission` JOIN `groups_permissions` ON `groups_permissions`.`group_id` = '1' AND `groups_permissions`.`permission_id` = `Permission`.`id` WHERE 1 = 1 1064: You have an error in your SQL syntax near 'ON `groups_permissions`.`group_id` = '1' AND `groups_permissions`.`permission_id' at line 1 It's a know bug? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: ways to detect httpRequest or just render 'bare'?
So let's build it. All i've done so far is create a custom headhelper component that does the dojo.js include and the dojo.requires. Everything else i'm just coding straight into the views. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: cake & dojo (generally external libraries)
Dojo is mostly working for me. I ended up creating a headhelper singleton component that is an array of dojo pagkages and adding it to my appcontroller. In my layout It loops through and writes out all of the requires in the layout. As long as there is at least one package it also puts the link to dojo.js in the header. That way all packages get required once and only once even if I have multiple requestsActions, ect in my page. I am not using the built in ajax prototype stuff so I don't know if there are compatibility problems there. I am having some javascript errors, possibly due to bad layout, race conditions on the loading of dojo and use of it. Also the rich text editor seems to be crashing IE. I need to upgrade to the latest version and see if that addresses some of these issues. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: How use query command
http://www.titov.net/2005/09/21/do-not-use-order-by-rand-or-how-to-get-random-rows-from-table/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: How use query command
alepane ha scritto: > Hi, I have used this instructions in a controller's method : > > $data = $this->Lavorus->sql("SELECT * FROM lavori ORDER BY RAND() LIMIT > 1"); try this: $data = $this->Lavorus->findAll(null,null,'ORDER BY RAND()'); --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: ajax-link -- unable to get it working
Hi AD7six, I am not sure...actually I even don't know asp...I am not sure from where I got that file...definitely I downloaded it from prototype website. and can you expand on RequestHandler...I am new to CakePHP and never used RequestHandler...but don't worry if you don't have time..I can search on cakephp website... Thanks for the help CakePHP rocks Regards --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
How use query command
Hi, I have used this instructions in a controller's method : $data = $this->Lavorus->sql("SELECT * FROM lavori ORDER BY RAND() LIMIT 1"); $this->set('data',$data); But, the sql debug of CakePHP give me an error : 1064: Errore di sintassi nella query SQL vicino a 'sql' linea 1. Can you help me ? 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 -~--~~~~--~~--~--~---
Re: ajax-link -- unable to get it working
Hi Bingo, Include the RequestHandler component, and it will take care of the layout for you. Cheers, AD7six PS What were asp tags doing in your prototype js file ? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Plugins for everything!
As far as the plugin thing, you can certainly try, but high-level components like that aren't always re-useable. Certain things like forums are definitely more trouble than they're worth to build from scratch over 90% of the time, but with other things, the stuff that's specific to the application it is being plugged into can almost outweigh the plugin itself. If you try to compensate by writing your plugin to be flexible enough for every possible scenario, you end up with an unwieldy beast that's more complex than most of the applications you're plugging it into. As far as JavaScript and vendors, there's really only one use for that, and Cake already has built-in support for it. If you put any JavaScript files in /vendors/js (the vendors folder in the root, not in app), or any CSS files in /vendors/css, you can load them the same as if they were in webroot/js or webroot/css. Well, almost the same, as any files loaded from here are PHP-enabled, meaning you can embed PHP that will be evaluated before the file is sent to the browser. So, why only the root vendors folder? Because if you're running multiple apps off of a single Cake core, all those apps can share the same JavaScript files. Imagine being able to update Prototype and script.aculo.us once for all your applications. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: ajax-link -- unable to get it working
Hi , I got it working..the problem was with properly loading prototype.js But my default layout is getting rendered twice..it is getting repeated within the details section also...is it possible to render without layout --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: ajax-link -- unable to get it working
hi update on my pursuit...I did a fresh install of scriptaculous and now javascript is not complaining about the illegal xml character...but I am still getting the Event.Observe error i.e Event.Observe is not a function Regards, Bingo --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: ajax-link -- unable to get it working
hi, I did some debugging using web developer's toolbar and found this...Javascript console is showing two errors 1. illegal XML character in http://localhost/cake/js/prototype/prototype.jsLine 1 <%= include 'Header' %> on checking the prototype.js, here how it looks <%= include 'HEADER' %> var Prototype = { Version: '<%= PROTOTYPE_VERSION %>', ScriptFragment: '(?:)((\n|\r|.)*?)(?:<\/script>)', emptyFunction: function() {}, K: function(x) {return x} } <%= include 'base.js', 'string.js' %> <%= include 'enumerable.js', 'array.js', 'hash.js', 'range.js' %> <%= include 'ajax.js', 'dom.js', 'form.js', 'event.js', 'position.js' %> 2. Event.Observe is not a function I think the second error is due to the first one...thus for reference, here is how I installed prototype.js...I unzipped all the js file within app/webroot/js/prototype and including prototype.js in my default.thtml using I am using cake in src because my cakephp is not on localhost but inside a directory a called cake Please let me know where I am making a mistake Regards, Bingo --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: ajax-link -- unable to get it working
hi AD7six, I do have prototype.js in my webroot/js and i have included in my layout. Is that what you meant by installing the prototype files. About the undefined variable, actually it is being raised when the view loads for the first time. Since at loading, no specific article is selected, no data is being passed to the second div. I placed a isset condition and now I am not getting any error div("details")); ?> array2table($data, true); } ?> divEnd("details")); ?> Regards --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: aptana
Looks good, gonna try out that Eclipse plugin On 8/1/06, Daniel Hofstetter <[EMAIL PROTECTED]> wrote: > > Thanks for the link, the screenshots look promising. > > -- > Daniel Hofstetter > http://cakebaker.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 -~--~~~~--~~--~--~---
how to get rendered view with layout using requestAction
im using something like this: $content=$this->requestAction('/something/preview/'.$id,array('return')); and ofcourse its without layout i need to get this view with layout wraper (to save it to db or static file) how to achive this? maybe other way? i can always do something like this but i prefer requestAction : $socketConnection = fsockopen($domain, 80, $errno, $errstr, $numberOfSeconds); if (!$socketConnection) { print (""); } // end if else { $xml = ''; fputs($socketConnection, "GET /$resourcePath HTTP/1.0\r\nHost: $domain\r\n\r\n"); while (!feof($socketConnection)) { $xml .= fgets($socketConnection, 128); } // end while fclose($socketConnection); } // end else echo $xml ; --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Character sets
On 2006-07-31 22:58:16 +0100 AD7six <[EMAIL PROTECTED]> wrote: > If you get the text "" being output you have BOMs at the > beginning of your files which you need to remove The default configuration of Vim on some distributions (I think I last saw it on SuSE 10) puts BOMs on files by default. Edit the system vimrc (maybe /etc/vimrc) to switch them off. Why is that the default? Hope that helps, -- MJ Ray <[EMAIL PROTECTED]> www.ttllp.co.uk +44 870 4321 9 10 Web, localisation, koha, databases, gnu/linux and statistics Registered in England and Wales, partnership number OC303457 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: aptana
Thanks for the link, the screenshots look promising. -- Daniel Hofstetter http://cakebaker.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 -~--~~~~--~~--~--~---
Re: cake & dojo (generally external libraries)
Im also interested in getting dojo working with cake php and am having problems would be good to hear from anyone who has succeeded. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Plugins for everything!
Is there a good reason for not using plugins for all my app files. Most websites I create are multiple apps i.e. forum, blog.. in a way it seems more organised to keep these together as plugins and shared resorces only in the app folder. Would it also make sense to keep libraries like scriptaculous, dojo,.. in the vendors directory? Anyone got a view on either proposition? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
aptana
Came across a new IDE for AJAX and Web development. Supposedly you can add in PHP support in conjunction with an Apache install. I wonder how it will work with Cake... http://www.aptana.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 -~--~~~~--~~--~--~---
Re: AJAX Autocomplete silently failing
Nate - I would like to pass in some SQL code (e.g. ORDER BY model.field) into the autocomplete.php component. It looks like handles is set to an array and then checked to see if it's empty? Sorry if I am missing the obvious... Thanks, Jonathan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: ajax-link -- unable to get it working
You probably want to fix that undefined variable. Have you got
Look that happen in Cuba!!!!!
It proclaims of the Commandant in Boss Fidel Castro to the town of Cuba. July 31, 2006 22:26:01 GMT With reason of the enormous effort carried out to visit the Argentinean city of Córdoba, to participate in the Meeting of MERCOSUR, in the closing of the Summit of the Towns in the historical University of Córdoba and in the visit to Altagracia, the city where Che lived in its childhood and together to this to attend immediately the commemoration of the 53 anniversary from the assault to the barracks Moncada and Carlos Manuel of Grasses, July 26, 1953 in the counties of Granma and Holguín, days and nights of continuous work without sleeping hardly gave place that my health that has resisted all the tests, underwent to an extreme stress and it was smashed. This provoked me an intestinal sharp crisis with sustained spill of blood that forced me to face a surgical complicated operation. All the details of this accident of health consist in the x-rays, endoscopies and filmed materials. The operation forces me to remain several weeks of rest, far from my responsibilities and positions. As our country it is threatened in circumstances like this by the Government from the United States, I have made the following decision: 1) I delegate with provisional character my functions as First Secretary of the Central Committee of Communist Party of Cuba in the Second Secretary, partner Raúl Castro Ruz. 2) I delegate with provisional character my functions as Major in Boss of the Revolutionary heroic Armed Forces in the mentioned partner, General of Army Raúl Castro Ruz. 3) I delegate with provisional character my functions as President of the Council of State and of the Government of the Republic of Cuba in the First Vice-president, partner Raúl Castro Ruz. 4) I delegate with provisional character my functions as main instigator of the National and International Program of Public Health in the Member of the Political Desk and Secretary of Public Health, partner José Ramón Balaguer Goatherd. 5) I delegate with provisional character my functions as main instigator of the National and International Program of Education in the partners José Ramón Machado Ventura and Esteban Lazo Hernández, Members of the Political Desk. 6) I delegate with provisional character my functions as main instigator of the National Program of the Energy Revolution in Cuba and of collaboration with other countries in this environment in the partner Carlos Lage Dávila, Member of the Political Desk and Secretary of the Executive Committee of the Council of Secretaries. The corresponding funds for these three programs, Health, Education and Energy, they will continue being negotiated and prioritized, like I have come making it personally, for the partners Carlos Lage Dávila, Secretary of the Executive Committee of the Council of Secretaries, Francisco Soberón Valdés, Secretary President of the Central Bank of Cuba, and Felipe Pérez Roque, Secretary of External Relationships who they accompanied me in these managements and they will constitute a commission for that objective. Our Communist glorious Party, supported by the organizations of masses and the whole town, has the mission of assuming the task commended in this it Proclaims. The meeting Summit of the Movement of Not Aligned Countries, to be carried out among the days 11 and 16 of September, will receive the biggest attention in the State and the Cuban Nation to take place with the maximum of brightness in the agreed date. The 80 anniversary of my birthday that so generously thousands of personalities agreed to celebrate the next one August 13, I request to all to postpone it for December 2 of the present year, on the 50 anniversary of the Landing of Granma. I request to the Central Committee of Party and the National Assembly of the Popular Power the firmest support to this it Proclaims. I don't house the smallest doubt that our town and our Revolution will fight until the last drop of blood to defend these and other ideas and measures that are necessary to safeguard this historical process. The imperialism will never be able to squash Cuba. The Battle of Ideas will continue ahead. Alive the Homeland! Alive the Revolution! Alive the Socialism! Until Victoria Always! Fidel Castro Ruz Major in Boss First Secretary of Party and President of the State Advice And of Secretaries of the Republic of Cuba. July 31, 2006 6:22 p.m. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Integrating Cake & phpBB sessions
Hey nate! Thanks a billion. Setting session.auto_start in php.ini did the trick for me. I would just like to ask if there are any security vulnerabilities in doing this, and if calling session_start() every time would, by any chance, be more secure? @understasis: You're right about phpBB storing its sessions in cookies. But, reading the cookie, and then starting a Cake session seems too roundabout. Just add the following lines to /phpbb/login.php around line 100: if( $session_id ) { $_SESSION['user_id'] = $row['user_id']; $_SESSION['username'] = $row['username']; $_SESSION['session_id'] = $sid; // and any other info you may need $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx"; redirect(append_sid($url, true)); } else {... That's to set the session while logging in. Add the following around line 172 in login.php (to unset the session while logging out): if( $userdata['session_logged_in'] ) { unset($_SESSION['user_id']); unset($_SESSION['username']); unset($_SESSION['session_id']); // and any other $_SESSION variables you may have set session_end($userdata['session_id'], $userdata['user_id']); }. That's it! Make sure you have session.auto_start = 1 in php.ini, and use phpBB's login & logout scripts for user authentication in your app. Pretty cool eh? :D I hope someone else finds this thread useful too. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---