# |
Aug 7th 2008, 12:31 |
TommyO |
stevieboy: assuming it's app/webroot/junk/somecrappy.php you should use url: "/junk/somecrappy.php" and cake will not get fired up |
# |
Aug 7th 2008, 12:30 |
stevieboy |
but that was too much work to just try it |
# |
Aug 7th 2008, 12:30 |
stevieboy |
i'm sure there's a cake-way with update-div etc |
# |
Aug 7th 2008, 12:30 |
stevieboy |
i dont know, just found that and wanted to try it |
# |
Aug 7th 2008, 12:29 |
stevieboy |
the sort.php which updates the div |
# |
Aug 7th 2008, 12:29 |
TommyO |
although I don't know why you wouldn't do that in cake |
# |
Aug 7th 2008, 12:29 |
teknoid |
stevieboy: your controllers should handle all ajxas stuff |
# |
Aug 7th 2008, 12:29 |
stevieboy |
http://baglan.web.tr/ajax-sorting-scriptaculous |
# |
Aug 7th 2008, 12:29 |
TommyO |
stevieboy: ah... yes, the .htaccess rules won't trigger if the file exists in webroot |
# |
Aug 7th 2008, 12:29 |
stevieboy |
but the router interfers with the call |
# |
Aug 7th 2008, 12:29 |
stevieboy |
i have a certain php-file handling an ajax-request |
# |
Aug 7th 2008, 12:28 |
teknoid |
stevieboy: if your php files are under webroot they should work as normal i.e. site.com/somefile.php ... same applies to sub dirs |
# |
Aug 7th 2008, 12:28 |
TommyO |
$html->link() ? |
# |
Aug 7th 2008, 12:28 |
TommyO |
stevieboy: call? as in redirect? |
# |
Aug 7th 2008, 12:26 |
jaredhoyt |
np |
# |
Aug 7th 2008, 12:25 |
thestaff |
jaredhoyt, wokrs ! thanks |
# |
Aug 7th 2008, 12:25 |
stevieboy |
another question: how can I call a specific external php from cake without the routing interfering |
# |
Aug 7th 2008, 12:24 |
TommyO |
tbranyen: no need for constructs because there are tons of handly callbacks. ex: in the controller, beforeFilter() happens before the action is called and is vital for setting stuff up |
# |
Aug 7th 2008, 12:24 |
jaredhoyt |
dunno, haven't used 1.1 in a long time, just try it =P |
# |
Aug 7th 2008, 12:24 |
thestaff |
jaredhoyt, is it the same then ? |
# |
Aug 7th 2008, 12:24 |
charun |
tbranyen: A framework does the opposite - it enables you to code much better :) |
# |
Aug 7th 2008, 12:23 |
thestaff |
i'm in 1.1 tho |
# |
Aug 7th 2008, 12:23 |
tbranyen |
tbh i've never used a framework before, i always thought it would limit my potential |
# |
Aug 7th 2008, 12:23 |
jaredhoyt |
thestaff: just use $this->layout = 'layout_name'; |
# |
Aug 7th 2008, 12:23 |
thestaff |
and that would skip the default one ? |
# |
Aug 7th 2008, 12:23 |
tbranyen |
yeah TommyO I remember reading that |
# |
Aug 7th 2008, 12:23 |
thestaff |
jaredhoyt, setlayout() maybe no ? |
# |
Aug 7th 2008, 12:23 |
TommyO |
tbranyen: FYI all methods in a controller(except the core methods) that do not begin with _ are considered 'actions' and are accesible via the url. so index() is not a construct, but an action, like /somecontroller/index. it is also the default action if someone goes to /somecontroller (no action specified) |
# |
Aug 7th 2008, 12:22 |
tbranyen |
i'm so dumb |
# |
Aug 7th 2008, 12:22 |
tbranyen |
oh god |
# |
Aug 7th 2008, 12:22 |
tbranyen |
read() returns an array |
# |
Aug 7th 2008, 12:22 |
tbranyen |
unless.. |
# |
Aug 7th 2008, 12:22 |
tbranyen |
Just checked the function stripScripts and it asks for a string and returns a string |
# |
Aug 7th 2008, 12:22 |
jaredhoyt |
anthony: why not? |
# |
Aug 7th 2008, 12:22 |
anthony |
i don't think you should set the layout in the View |
# |
Aug 7th 2008, 12:22 |
tbranyen |
$sanitized = Sanitize::stripScripts($this->Post->read()); |
# |
Aug 7th 2008, 12:22 |
tbranyen |
TommyO: Odd that this line will not work |
# |
Aug 7th 2008, 12:21 |
jaredhoyt |
thestaff: $this->layout in the view |
# |
Aug 7th 2008, 12:21 |
thestaff |
one view |
# |
Aug 7th 2008, 12:21 |
thestaff |
no just for on view |
# |
Aug 7th 2008, 12:21 |
anthony |
thestaff: for the whole controller you can set the Controller's layout variable |