Ah ha! That's what I was looking for, dead on. I knew cake would
have something. Thanks to both of you. :)
On Oct 23, 1:46 am, Miles J wrote:
> Or you know, use the built in Media view.
>
> http://book.cakephp.org/view/489/Media-Views
--~--~-~--~~~---~--~~
You
If you just don't like the way Cake spits out debug information,
the Debug Kit plugin might be what you want.
http://www.ohloh.net/p/cakephp-debugkit
hth
Kyo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP
On Oct 23, 7:43 pm, Miles J wrote:
> Im curious as how you think a join would be better? You are you going
> to grab multiple comment rows for a single post, while paginating
> posts? 2 queries is faster then sub-queries.
>
> More queries is sometimes better than complex queries.
Well, you may c
dear all,
i had been using cakephp for long time already and never had that
problem.
i have to create a site for a client and they give me a hosting
running on a CentOS machine.
i uploaded all cakephp files, changed the salt, made connection to db,
etc... BUT the CSS is not loaded and URL rewritin
Hi, so I noticed that if I change the type from "json" to "JSON" it prints
the alert. However, if I try to print data.result in the alert, the alert
prints "undefined". If I print data, the alert responds with
"{"result":"SHOE"}". This is weird... why is the JSON not working properly?
Dr. Lobo
This callback is executed only on success. Maybe it is not success?
On Oct 24, 3:22 am, hahmadi82 wrote:
> any help please?
>
>
>
>
>
> hahmadi82 wrote:
>
> > I'm trying to write a simple JSON post and the callback alert does not
> > show up no matter what I do. I used firebugs to see if the po
Why "not cake way"? It's just simple "use the thing only when you need
this thing". Same as "do not list all models in $uses but load them
when need" and etc.
Of course, have behavior that can work with multiple models is better.
On Oct 24, 1:19 am, benjam wrote:
> Thanks for the info... I thin
Observe stops to work if you replace observed elements by AJAX, for
example.
On Oct 23, 8:59 pm, Gaioshin wrote:
> Hi guys,
>
> I am trying to use the Ajax helper method observeForm, yet however it
> appears to only fire once. By that I mean, I am using it to change
> dropdowns but once the drop
What 404 page do you see, Apache or Cake one? In first case it is
mod_rewrite problem. In second - the problem is in your app. Probably
in routes or filenames.
On Oct 23, 11:09 pm, dpinion wrote:
> Greetings All,
> I have an issue that I am trying to resolve. I have it setup so:
>
> www.mysite.c
Im curious as how you think a join would be better? You are you going
to grab multiple comment rows for a single post, while paginating
posts? 2 queries is faster then sub-queries.
More queries is sometimes better than complex queries.
--~--~-~--~~~---~--~~
You rec
You might want to look into :
http://book.cakephp.org/view/816/counterCache-Cache-your-count
Andras
On Oct 23, 2009, at 7:30 PM, bonecandy wrote:
>
>> How slow. Feel free to propose an alternative that achieves the same
>> thing.
>
> Okay, well, I researched IN again and it appears that IN i
> How slow. Feel free to propose an alternative that achieves the same
> thing.
Okay, well, I researched IN again and it appears that IN is really
only slow in sub-selects where a join would be much faster. Sorry, I
posted without double-checking, I conflated sub-selects with any
select ;(
> So
how can I compare if a value is between two values in the database ?
Ex:
In the database I have a table sequences with the fields sequence_ini
and sequence_end
I wanna know if the value 1000 is between the sequence_ini and the
sequence_end
In SQL:
SELECT count(id) FROM sequences WHERE 1000 BETW
when you start developing a website, what are the common features you
would want? pages, a blog, a contact form? and if there is already an
existing cms that utilizes a framework, I think developers will find
it useful and will help save their time.
On Oct 24, 4:11 am, Miles J wrote:
> Personall
Dont you mean beforeSave()? Why would you sanitize after grabbing
data?
http://www.milesj.me/blog/read/47/Automatically-Sanitizing-Data-With-BeforeSave
http://www.milesj.me/blog/read/49/Stripping-HTML-Automatically-From-Your-Data
On Oct 23, 1:56 pm, Lucas Costa wrote:
> Hello fellows,
>
> what
Yeah I have the same issues in different areas of my app with no success.
Same with delete, need to refresh after the first delete, and on login. My
login is on the index page. When you login it redirects you back to the
index page showing login, hit refresh and it shows Logged in...
If you find
Personally, I find it redundant to build a CMS with a framework.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this
cool thanks a lot. I figured I must have been missing something when
I considered doing the route thing. Guess not.
On Oct 23, 2:53 am, Céryl wrote:
> You're actually quite right... It's kind of a staticpagefrom the
> getgo...
>
> However, there are two ways to make it dynamic. You can use a
>
And, to get a site wide template of your own, copy www\cake\libs\view
\layouts\default.ctp into www\app\view\layouts\default.ctp and edit it
to match your style/liking.
All your content will be rendered where is.
On Oct 23, 10:53 am, Céryl wrote:
> You're actually quite right... It's kind of
Hello fellows,
what do you think about putting an Sanitize::clean on the AfterFind of every
Model?
Wouldn't that ensure same security and a lot less code?
What would be the down side?
Regards...
--~--~-~--~~~---~--~~
You received this message because you are sub
Was pretty clear to me that the OP has developed a CMS, moved to
Cakephp, and wants to start his new Cakephp based CMS on an existing
Cakephp based CMS, instead of rewriting everything.
In which case, I'd recommend taking a look at Wildflower, OvenCMS and
Croogo. :)
On Oct 23, 10:49 pm, Miles J
Thank you both very much. I had no idea about both solutions.
-Beer
On Oct 23, 10:06 am, jacmoe wrote:
> You can also just put var $uses = array(); in the controller - no need
> to make a model then. :)
>
> On Oct 23, 2:10 pm, mike karthauser
> wrote:
>
> > create a model for simple page and ad
Well CakePHP is NOT a CMS, its a framework. Perhaps read a bit more on
the differences.
On Oct 23, 1:42 pm, jacmoe wrote:
> Maybehttp://fahad19.com/(Croogo) ?
>
> On Oct 23, 7:03 pm, jacmoe wrote:
>
> > Wildflower, maybe?
> > Seems to be the most developed CakePhp based CMS I was able to
> > fi
Maybe http://fahad19.com/ (Croogo) ?
On Oct 23, 7:03 pm, jacmoe wrote:
> Wildflower, maybe?
> Seems to be the most developed CakePhp based CMS I was able to
> find. :)
>
> On Oct 23, 3:14 pm, Ziki wrote:
>
> > Hi, i have my own CMS which was developed before i start using
> > CakePHP, now i don
I will have a look at various other projects which upgraded to Cake
1.3 to see if I can spot what exactly I am doing wrong. :)
On Oct 23, 10:38 pm, jacmoe wrote:
> Well.
> Looks like I ain't gonna upgrade this time. :)
> I have a dead-line.
> Maybe in a months time or so.
> But thanks anyway, Ma
Well.
Looks like I ain't gonna upgrade this time. :)
I have a dead-line.
Maybe in a months time or so.
But thanks anyway, Mark. :)
On Oct 23, 7:50 pm, mark_story wrote:
> The update key needs to be a CSS selector, and I don't think anything
> except Prototype will support an 'indicator' key.
>
>
you should use the array format for this!!
url=>array('action'=>'whatever')
and not the /controller/action/ hardcoded strings
gimperdan...@gmail.com schrieb:
> Thanks. That's exactly what I had in mind, just couldn't figure out
> how to catch the errors. It's a bit of work, just to display error
any help please?
hahmadi82 wrote:
>
> I'm trying to write a simple JSON post and the callback alert does not
> show up no matter what I do. I used firebugs to see if the post was
> getting any response and "SHOE" returns. So why is the alert not working
> in the callback?
>
> view code:
>
Wondering if there is some method of moving the SQL debug information
from the bottom of the page with some kind of variable.
This may be nitpicking, but I'm sort of irritated with how cake is
placing it outside my tag.
something like:
... default.ctp layout file ...
--~--~-~
good luck for them, they were robust.
as for the great CakePHP framework, I want to see PHP4 in the hell as
soon as possible.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, se
Thanks. That's exactly what I had in mind, just couldn't figure out
how to catch the errors. It's a bit of work, just to display errors,
but it will work for now.
On Oct 23, 2:30 pm, Céryl wrote:
> I struggled with this, excactly this week! I'm doing it by heart right
> now, but I guess you can
I struggled with this, excactly this week! I'm doing it by heart right
now, but I guess you can guess the gist of it.
Basicly, build the add form at page that you want. Use the $form-
>create('Model', array('url' => '/controller/add')) to redirect to the
add action of the controller you want after
Thanks for the help. I tried both suggestions but am still receiving
the same error. Any other adjustments I could try?
On Oct 23, 12:35 pm, "O.J. Tibi" wrote:
> Hi,
>
> Looks like you have a RewriteBase problem my friend.
>
> I think it's a similar problem to GoDaddy-hosted CakePHP apps, so you
Thanks for the info... I think I'm going to go with possibly attaching
the MeioUpdate behavior in the beforeFilter method of my controllers.
It doesn't seem like a very "cake" way to do it, but if it's the only
way...
On Oct 23, 8:22 am, Miles J wrote:
> You can try my uploader system, it suppo
I take most of that back. I see now that the backtick operator is
shell_exec. I've done this:
$output = `textutil -convert html filename.rtf -stdout`;
and it works... now to tackle Tidy.
On Oct 23, 2:04 pm, Ian R wrote:
> Thanks O.J.!
>
> The Magic reference was unintentional -- though a l
Don't worry about itI moved it from my Mac to a Linux box and it
worked.
On Oct 22, 7:06 pm, jacmoe wrote:
> You either need to downgrade your PHP to 5.2, or upgrade your Cake to
> 1.3. :)
>
> On Oct 22, 10:07 pm, aaron wrote:
>
> > Versions: MySQL 5, PHP 5.3, Apache2 (Snow Leopard)
>
> > I
This is what my console says:
Welcome to CakePHP v1.3.0.0 Console
---
App : app
odd huh?
On Oct 22, 7:06 pm, jacmoe wrote:
> You either need to downgrade your PHP to 5.2, or upgrade your Cake to
> 1.3. :)
>
> On Oct 22, 10:07 p
Thanks O.J.!
The Magic reference was unintentional -- though a ladyfriend and I did
once find some Magic cards in the woods once and invented a game that
involved yelling the name of the card and throwing it at the other
person. I gather this is incorrect.
I have a shell script that seems to w
I figured I can just do a redirect() but I can't figure out how to
pass the validation errors along. Anyone?
On Oct 23, 1:18 pm, "gimperdan...@gmail.com"
wrote:
> Ok,
>
> Here's the situation:
>
> I have a page that allows users to post comments, but this is not a
> ADD page...
>
> when I create
The update key needs to be a CSS selector, and I don't think anything
except Prototype will support an 'indicator' key.
-Mark
On Oct 22, 6:13 pm, jacmoe wrote:
> I tried Mootools, jQuery and Prototype - no luck. :)
> Prototype and Mootools seems to be ignored by Cake..
> 'Js' => array('Prototyp
Ok,
Here's the situation:
I have a page that allows users to post comments, but this is not a
ADD page...
when I create the add() function in the CommentController it
automatically looks for a add.ctp because it assumes that's where my
form was. All the data gets saved, but it doesn't know wher
Did you try with 'order' => array('Person.surname' => 'ASC') ?
((I'm away from any code, so I can't check atm))
On Oct 23, 6:38 pm, ark0n3 wrote:
> Yes, a related model but in the form
>
> Teacher -> belongsTo User -> hasOne Person
>
> so that I need to order by Person.surname,Person.name..
>
>
You can also just put var $uses = array(); in the controller - no need
to make a model then. :)
On Oct 23, 2:10 pm, mike karthauser
wrote:
> create a model for simple page and add $useTable = false; which means you
> wont need the db.
>
> regards
> mikek
>
> On Fri, Oct 23, 2009 at 11:31 AM, Bee
On 23 oct, 18:38, jayarjo wrote:
> Nice.
>
> But I don't quiet get why he is not counting database impact.
What database impact would that be.
Regarding your original question: use elements. If something is hard
to do it's because you're doing it wrong/fighting what cake does for
you.
AD
--~
Wildflower, maybe?
Seems to be the most developed CakePhp based CMS I was able to
find. :)
On Oct 23, 3:14 pm, Ziki wrote:
> Hi, i have my own CMS which was developed before i start using
> CakePHP, now i don't want to redeveloped my CMS for CakePHP, i just
> want to start with another one, whic
If you are using Ajax, just use $this->AutoRender(false); in your
controller.
And you can just use $this->renderElement(someelement) in your view,
if you need a view (which you don't when using the AutoRender(false)
option.
((Take this with grains of salt as I am still wet behind the ears when
it
Ooops, as I was saying
> In our admin pages we see some strange behaviour in IE. Broadly it
> goes like this:
>
> 1. Create new instance of model (controller/admin_add), which on
> success...
> 2. Redirects back to controller/admin_index
> 3. Delete new item using link to controller/admin_delet
Hi there,
In our admin pages we see some strange behaviour in IE. Broadly it
goes like this:
1. Create new instance of model (controller/admin_add), which on
success...
2. Redirects back to controller/admin_index
3. Delete new item using link to controller/admin_delete on the admin
index page.
Yes, a related model but in the form
Teacher -> belongsTo User -> hasOne Person
so that I need to order by Person.surname,Person.name..
I tried 'order' => array('Person.surname ASC') but got no results..
On 23 Ott, 01:04, jacmoe wrote:
> What do you mean?
> A totally unrelated model, or ?
>
>
Nice.
But I don't quiet get why he is not counting database impact.
On Oct 23, 4:40 pm, robustsolution wrote:
> Dear @jayarjo
> just read
> thishttp://cakedc.com/eng/developer/mark_story/2009/02/27/benchmarking-re...
--~--~-~--~~~---~--~~
You received this messa
Hi,
Looks like you have a RewriteBase problem my friend.
I think it's a similar problem to GoDaddy-hosted CakePHP apps, so you
should read this.
http://bakery.cakephp.org/articles/view/mod-rewrite-on-godaddy-shared-hosting
Note that the article is updated, take a look at the newer example and
Does it still do it if you change custom.steps.1.icon to just icon?
On Oct 23, 7:51 am, tantalum wrote:
> I have two file fields in a form like so:
> input('custom.header.image', array('label'=>'Header Image',
> 'type'=>'file')) ?>
> input('custom.steps.1.icon', array('label'=>'Step 1 icon',
> '
I would like to thank both of them and the best of luck. It was nice
meeting Nate at Zendcon.
But dont worry, ill still be around here as well :]
On Oct 23, 8:54 am, mark_story wrote:
> CakePHP Project Manager Garrett Woodworth and Developer Nate Abele
> have left the CakePHP development team.
Greetings All,
I have an issue that I am trying to resolve. I have it setup so:
www.mysite.com/cake/
However, when I go there, it should redirect to:
www.mysite.com/cake/login/login
All applicable views/controllers/etc.. are in place
Allowoverride is set to All
mod_rewrite is enabled
When I
CakePHP Project Manager Garrett Woodworth and Developer Nate Abele
have left the CakePHP development team. The entire team would like to
thank them for their amazing work and efforts towards the core,
cultivating the community and various other contributions associated
to ongoing CakePHP developme
Hi Ian,
Noticed that you have that "Magic: The Gathering" reference in your
post (aka, "tapped out") haha!
Anyway, back to your post, I'm not gonna dive into the specifics of
your procedure, but I guess what you want to do is:
1. move_uploaded_file() the uploaded file by your user, in case you
I have two file fields in a form like so:
input('custom.header.image', array('label'=>'Header Image',
'type'=>'file')) ?>
input('custom.steps.1.icon', array('label'=>'Step 1 icon',
'type'=>'file')) ?>
There is more then one step and both 'header' and 'step.n' have a
couple of other sub fields too
Hi there! I apologize, because this is not very Cake-specific, but
I'm tapped out and I was really hoping somebody could suggest a
solution.
In my CMS, I'd like to take an RTF, upload it with a form... and then
process that file with textutil (RTF->HTML) and probably tidy. I can
do thi
Hi guys,
I am trying to use the Ajax helper method observeForm, yet however it
appears to only fire once. By that I mean, I am using it to change
dropdowns but once the dropdown has changed, changing it again has no
effect whatsoever.
Previously I had used observeField and that had worked very w
Scenario:
Plan HABTM Status
Plan Belongsto Department
Plan Belongsto Element
Controller code:
$data= $this->Plan->find('all', array(
'contain' => array (
'Status.name = "approved"',
'Element',
It's called once for rendering the layout, and a second time for
rendering the view that gets inserted into $content_for_layout.
-jperras.
On Oct 21, 9:09 am, Amit Rawat wrote:
> Hello friends,
>
> I am having a problem my before render function in app controller is being
> called twice. can a
Hi, i have my own CMS which was developed before i start using
CakePHP, now i don't want to redeveloped my CMS for CakePHP, i just
want to start with another one, which is simple and that i can change
them on my own way. I must make two simple sites, and it must be
quick, and i need CMS for them,
Dear @Amit,
use this snippet in your app controller beforefilter callback
if (!array_key_exists('requested', $this->params)) {
//anything you put here will be called just one time
}
have a nice baking day
--~--~-~--~~~---~--~~
You received this message because
Dear @jayarjo
just read this
http://cakedc.com/eng/developer/mark_story/2009/02/27/benchmarking-requestaction
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake
create a model for simple page and add $useTable = false; which means you
wont need the db.
regards
mikek
On Fri, Oct 23, 2009 at 11:31 AM, BeerMan wrote:
>
> Hey all,
> I have a very stupid question. I have a default.ctp which all the
> pages except the homepage will be rendered using this vie
Hey all,
I have a very stupid question. I have a default.ctp which all the
pages except the homepage will be rendered using this view file. So
the homepage will not be using that default layout and contains no
data that needs a database. I created a different layout for the
homepage named homepage
ok
but to me putting view/pages/about.ctp is creating view for action
about() in pages_controller (and it should work without any files
there just with layouts/index.ctp)
is it good thinking that cake take url's part and looks to
controllers/ if it finds the name then it takes next url part and
s
i have 3 tables
1. users
fields. id , name
2. projects
field: id , name
3. projects_users
field : id , project_id , user_id
when i select multiple users in a single project data are only saved
in project table.
but didnt save in projects_users table
echo $form->select('
Little update:
It looks like $this->render sets $this->hasRendered property to true,
preventing successive renderings. It can be avoided by setting $this-
>hasRendered to false after each call to $this->render method.
And finally you always can simply do: include
('whatever_path_you_need_and da
Probably because he doesn't know about recursion (yet)?
A find('all') command will do exaclty that, find all... So if you do a
find('all') of the posts, itll also get all the commens, tags, users,
whatever the post has relationships with... If in a certain action you
just need the posts, add $this
You're actually quite right... It's kind of a static page from the
getgo...
However, there are two ways to make it dynamic. You can use a
requestAction on the home.ctp to call an action from another
controller and get dynamic data on the home.ctp, or you can make a new
homepage as the standard (l
I really hate looking into source code, 'cause I'd rather think that
there is everything clean and neat, then look and find out that it is
nowhere cleaner then my own (which I kinda dislike a bit :) But
anyway...
It turned out that there is "render" function included in the View
class, so that r
I haven't used routes allot, so struggling a bit with it.
What I want to do is:
=> /* to the RedirectController, action index
=> /Api/* to the ApiController, action index
So by default, redirect everything to the RedirectController
for example: http://domain.com/param to the index method in
Re
Since no one have responded. I guess you'll have just to test it.
Doing it in app_controller.php only can be tricky, if not impossible.
Theoretically it is possible to check for current controller in
app_controller.php. Not sure if that's supported in cake though. And
it will be more logical if y
@robustsolution
But it is said that requestAction adds unnecessary load on the
backend, making another http request, isn't that true? If yes, then
why should anyone need something like that when it's just a matter of
simple include? It can be though, that I miss some point in what
you've suggeste
I actually am confused about something similar (but I have read
through most of the manual). I understand that the app/views/pages/
home.ctp acts as the web site's root index page but since it's under
the /pages directory doesn't that force it to be a static page? I
wonder how to use home.ctp as
On 23 oct, 05:32, bonecandy wrote:
> Hi, this is my first post here - I'm new to CakePHP, but not to
> programming or PHP.
> Anyway, to get acquainted with Cake I've been making a blog (I know,
> crazy, huh?). So, I have my posts table and model, which has a hasMany
> relationship with comments
Okay, that could also work :)
On Fri, Oct 23, 2009 at 8:46 AM, Miles J wrote:
>
> Or you know, use the built in Media view.
>
> http://book.cakephp.org/view/489/Media-Views
> >
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Go
78 matches
Mail list logo