I'm not sure of any method - but why do you think that all your rows
as arrays will use up more memory than the same amount of data wrapped
in objects? Is it just a pass by reference vs pass by copy issue?
At the heart of it the dbo_source.php file takes the data from the
database query as an
Like it is written in one of the comments on the page you link to.
Cake does not return objects partly because it does not fit well with
the PHP-language. In ruby, everyhing is an object. Every character,
every number is its own object. So it is very natural to use objects
for the model-data to
Since the AuthComponent uses the url parameter to store the
$loginRedirect url your issue is probably related to the way urls
are generally interpreted. Double slashes are usually bad as in /
controller//action. AuthComponent runs the url through the
normalization routine in Cake where your url
From a brief look at what they're offering, you should have just been
able to upload the Cake files as downloaded and get something working,
bar the database configuration. Nobody else can help you with the
correct settings for the database however, since they'll be detailed
somewhere within
Never tried your way, however is there a reason you need to separate
the frontend and backend apps?
Cheers,
Adam
On Apr 3, 3:53 am, wralph [EMAIL PROTECTED] wrote:
Hi,
I am on shared web hosting and I have a directory setup like so:
app/ - Frontend application
admin/ - Backend application
I have a controller method that gathers stats to be used to create a
graph image. I'm trying to track down whatever is corrupting it,
though, because I can't get it to show up.The very same code works for
the old site (same server). When I compare the wget output of two, I
see that the Cake
Hi,
I found something that was a great help. Posting it here for anyone
else who may search for the same problem:
http://book.cakephp.org/view/249/custom-query-pagination
On 2 Apr, 16:01, rikdc [EMAIL PROTECTED] wrote:
Hello,
This is more a conceptual question. I thought the best place to
I love jQuery more than prototype,but,what i should do before i use it
in CakePHP?
--~--~-~--~~~---~--~~
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
Dear b logica,
I don't know how can i give you my greetings to you.
Thank you very much
You saved my life.. :)
On Apr 2, 11:00 pm, b logica [EMAIL PROTECTED] wrote:
Yes, but you shoulduse__d() instead of __() to translate. Look at
the method in cake/basics.php. In a nutshell, you
To perform some initial setup before sending visitors to a home pae
you have a few options. I do not really get exactly which of these is
what you are looking for.
1.1 You want to run this ONCE (when the index page is accessed):
You can route to a specific action as Jonknee suggests and let that
I think this is the link your a looking for:
http://bin.cakephp.org/saved/1237
On Thu, Apr 3, 2008 at 4:24 AM, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Like it is written in one of the comments on the page you link to.
Cake does not return objects partly because it does not fit well with
Simply, do all the tricks about getting the path in the controller,
then pass it as an array to the view. In the view simply iterate the
array and build the bread crumbs.
Showing a path of links as a bread crumb is a matter of view, it's
just a representation of the data that can be switched
On Wed, Apr 2, 2008 at 11:21 PM, dyh1919 [EMAIL PROTECTED] wrote:
I love jQuery more than prototype,but,what i should do before i use it
in CakePHP?
Nothing. There's no official jQuery helper for CakePHP, so you'll
have to write everything by hand or create your own helper.
--
Chris
One thing to watch out for is open_basedir restrictions. For a
production site, you'll want the cake core (and probably your app
except for the webroot) outside of the document root (webroot). If
that parent directory is not in the open_basedir restrictions, you'll
get errors. You'll want to
Hello,
I'm trying to make a correct validation for my model. To do that i
have to check the unicity of one of my field (the field named texte)
Here is my code of my function:
function isUnique($data, $name)
{
$found = $this-find($this-name..$name=\.$data.'');
A note about steadfast shared hosting - if you want to run the cake
core and your app (except for webroot) outside of the webroot in your
home dir, you'll need to submit a support ticket to have them add your
home dir to the open_basedir restrictions. You'll also want to
mention that you'd still
You can either do nothing at all... well, apart from including jquery
in your layouts, that is.
If you want you can download a jquery helper from the bakery.
http://bakery.cakephp.org/articles/view/jquery-helper
I do not use any helper for jquery, myself. Since all my javascript,
including
Has anyone tried running a cake website on www.nearlyfreespeech.net ?
On Apr 3, 1:24 pm, Sliv [EMAIL PROTECTED] wrote:
A note about steadfast shared hosting - if you want to run the cake
core and your app (except for webroot) outside of the webroot in your
home dir, you'll need to submit a
On Apr 3, 11:51 am, Grant Cox [EMAIL PROTECTED] wrote:
I'm not sure of any method - but why do you think that all your rows
as arrays will use up more memory than the same amount of data wrapped
in objects? Is it just a pass by reference vs pass by copy issue?
snip
I'm sorry, I goofed
On Apr 3, 12:24 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
snip
As on that page I would also suggest you look at some of the bahaviors
in the Bakery that can help with binding and unbinding data not needed
for the current request.
Thanks for your ideas; but none of them are
On Apr 3, 3:48 pm, Matias Lespiau [EMAIL PROTECTED] wrote:
I think this is the link your a looking for:http://bin.cakephp.org/saved/1237
I'm sorry, I actually meant resource; not object.
--
?php echo 'Just another PHP saint'; ?
Email: rrjanbiah-at-Y!comBlog:
Why on earth would you do that?
-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of R.
Rajesh Jeba Anbiah
Sent: 3. april 2008 14:49
To: Cake PHP
Subject: Re: Model find() to return object; instead of array (?)
On Apr 3, 11:51 am, Grant Cox [EMAIL
It would kill all the cakephp filters and magic at best
-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of R.
Rajesh Jeba Anbiah
Sent: 3. april 2008 14:49
To: Cake PHP
Subject: Re: Model find() to return object; instead of array (?)
On Apr 3,
Hey guys,
Thanks a lot for your help. I was actually looking for both
answers, even though I dont think i completely explained my issue. So
i used the route rules to set up an action for the index of my
application which worked great. And of course ill have to deal with
logging the user in
I want to use the Ajax inPlaceEditor and I can't get it working :
I have this in index view: (It work fine)
h3 id=edit?php echo $post['Topic']['title'] ?/h3
?php echo $ajax-editor('edit', 'updateTitle' ); ?
Then in PostsController I have the function updateTitlte :
function updateTitle($id){
For tree based models, use the getpath() function. It does alot of the
controller side work for you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to
Hi, i would like to know how to transfer an array in PHP to JSON ? and
see it with JSON
--~--~-~--~~~---~--~~
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
On Thu, Apr 3, 2008 at 9:26 AM, Tom [EMAIL PROTECTED] wrote:
Hi, i would like to know how to transfer an array in PHP to JSON ? and
see it with JSON
http://ca.php.net/json
--
Chris Hartjes
Internet Loudmouth
Motto for 2008: Moving from herding elephants to handling snakes...
@TheKeyBoard:
On Apr 3, 5:58 pm, Christian Winther [EMAIL PROTECTED] wrote:
Why on earth would you do that?
snip
Read the thread above.. the array dumping doesn't work for all the
cases--especially on exporting the data.
--
?php echo 'Just another PHP saint'; ?
Email: rrjanbiah-at-Y!comBlog:
Hi, i would like to know how to transfer an array in PHP to JSON ? and
see it with JSON
Google not working?
http://api.cakephp.org/1.2/class_javascript_helper.html#d349233dd9dd9a6e7b5234fa268a9a40
JavascriptHelper::object()
Generates a JavaScript object in JavaScript Object Notation (JSON)
On Thu, Apr 3, 2008 at 9:46 AM, R. Rajesh Jeba Anbiah
[EMAIL PROTECTED] wrote:
On Apr 3, 5:58 pm, Christian Winther [EMAIL PROTECTED] wrote:
Why on earth would you do that?
snip
Read the thread above.. the array dumping doesn't work for all the
cases--especially on exporting the
I agree - there's no need for a helper - it seems pointless to add
extra load to PHP processing when you can just add the extra scripting
to your views and layouts directly.
jQuery is concise enough that you don't need to code a helper for
it :)
On Apr 3, 1:08 pm, [EMAIL PROTECTED]
[EMAIL
Thanx, but i would like to use it with Jquery.
I have a filled array in php, and in a js file i've got :
jQuery(document).ready(
function()
{
var lastsel;
jQuery(#list2).jqGrid(
{
url:'/comms/grid',
datatype: json,
I'm trying to make a correct validation for my model.
You can also just use the built-in isUnique function right from
validation. No need to roll your own on this one. (Just make the rule
like so: 'rule' = 'isUnique')
--~--~-~--~~~---~--~~
You received this
Hi,
I'm using nightly builds from 1.2.x.x branch.
My main model Item have this associations:
Item hasOne Article
Item hasOne Photo
Item hasAndBelongsToMany Tag
...
In a form I have these fields :
data['Item']['id'] (it's results on a form input TEXT)
data['Item']['title'] (it's results on a
Sure that's not the problem here.
I don't know how to get back my array in my JQuery function (in my JS
file).
Something that might looklike this :
{name:'!', width:120, editable: true, edittype: select, editoptions:
{value:$Array}}
I don't know the syntaxis
Check out this slide presentation:
http://www.thinkingphp.org/2008/02/26/with-jquery-cakephp-to-world-domination-slides/
On slide 31, it gives you a function for your app controller called
setJson. On slide 32, it shows how to use setJson in your
controller. On slide 33, it shows the code to
Hi there,
I have two forms on two separate pages; one for bug reports and one
for feature requests. Each has a file field for attachments. The
code that both produces the file field is identical, as is the code
that extracts the value.
In the controller, the relevant lines of code is:
I use jQuery, so I'm not overly familiar with the $ajax methods. But I
think you should be checking $this-params['queryString'] or
$this-params['form']['your_field']
At any rate, place a $this-log($this-params) at the top of your
controller method to see what's in there.
On Thu, Apr 3, 2008 at
I'm happy to help!
On Wed, Apr 2, 2008 at 11:38 PM, neeocis [EMAIL PROTECTED] wrote:
Dear b logica,
I don't know how can i give you my greetings to you.
Thank you very much
You saved my life.. :)
On Apr 2, 11:00 pm, b logica [EMAIL PROTECTED] wrote:
Yes, but you shoulduse__d()
Look in $this-params['form']['value'].
Use Firebug to debug AJAX/AHAH requests, otherwise you're going to be
pulling your hair out.
-Joel.
On Apr 3, 11:58 am, b logica [EMAIL PROTECTED] wrote:
I use jQuery, so I'm not overly familiar with the $ajax methods. But I
think you should be checking
I use ajax and it work very well.
form name=basket id=panier method=POST action=?php echo $html-
url('/basket/view')?
?php echo $ajax-submit('Save', array('update' = 'divbasket')); ?
I need to submit my form with ajax every time a change is used in a
select tag.
$javascriptchange =
Hmmm well it is a password field... also it is the same code as i just
get it from my svn repository.. and the cakephp i also get the latest
from svn.. :(
On Apr 1, 4:25 pm, Chris Hartjes [EMAIL PROTECTED] wrote:
On Tue, Apr 1, 2008 at 10:14 AM, Mech7 [EMAIL PROTECTED] wrote:
I am trying to
On Thu, Apr 3, 2008 at 12:53 PM, Mech7 [EMAIL PROTECTED] wrote:
Hmmm well it is a password field... also it is the same code as i just
get it from my svn repository.. and the cakephp i also get the latest
from svn.. :(
Again, I reiterate that the only way a password field would display
On Apr 3, 6:51 pm, Chris Hartjes [EMAIL PROTECTED] wrote:
On Thu, Apr 3, 2008 at 9:46 AM, R. Rajesh Jeba Anbiah
[EMAIL PROTECTED] wrote:
On Apr 3, 5:58 pm, Christian Winther [EMAIL PROTECTED] wrote:
Why on earth would you do that?
snip
Read the thread above.. the array
On Thu, Apr 3, 2008 at 2:13 PM, R. Rajesh Jeba Anbiah
[EMAIL PROTECTED] wrote:
BTW, whenever you reply here with your remarks, I thought of
asking do you really use CakePHP? SCNR
Chris helps out a lot in the CakePHP community (written articles, mailing
list, etc). He has that grumpy
On Thu, Apr 3, 2008 at 1:13 PM, R. Rajesh Jeba Anbiah
[EMAIL PROTECTED] wrote:
Cake's default way of dumping array in controller and iterating
in view file, works only for the small data. But, on a typical project
that requires exporting of data, it doesn't work as it runs out of
On Thu, Apr 3, 2008 at 2:12 PM, Christian Winther [EMAIL PROTECTED] wrote:
I use cake way for documents and sql data way above 100 megabytes in size
I was thinking that unless those records are really small, calling in
60 records via a select is going to be really difficult to do
without
I use cake way for documents and sql data way above 100 megabytes in size
My guess would be your setup is wrongly configured - rather than pointing to
php or cake as the problem.
If you really need the resource, just do the mysql_select() and everything
yourself, it will use your default
i use wampserver and like it.
http://www.wampserver.com/
-d
On Apr 2, 10:05 am, UTDStudent [EMAIL PROTECTED] wrote:
I am a college student who is currently trying to set up a WAMP
installation to run a school project on. Do any of you fine folks have
any recommendations for a setup.
PS -
Note: The ugly/obvious way to do this would be to put a switch inside
every function in contests_controller that checks the stage and then
either redirects if it's not that stage or w/e. I am hoping for a more
glamorous option! :)
On Apr 3, 2:15 pm, John R [EMAIL PROTECTED] wrote:
My
Yeah, I'm using that technique now, but before I cakeified it - the other
solution worked rather well too - just the prove the point that its probably a
local issue on his setup rather than a limit on cakephp / php
-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL
Could probably be solved with a behavior in cakephp 1.2 :)
-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of John R
Sent: 3. april 2008 21:26
To: Cake PHP
Subject: Re: How to manage different site instances...
Note: The ugly/obvious way to do
My application is a series of contests with different stages
(submission, voting, awards, etc.)
For each stage, the site is going to function completely differently.
During Stage 1 (submission) for instance, you will be able to upload,
critique, etc. The front page will be a huge list of all
Careful to not be too specific :)
I don't see how a model behavior would help me here ...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to
I second the recommendation of Wampserver.
Only problem I've found is that it doesn't include a mail server by
default - which means, if you're running under Vista, you can't send
emails from your localhost.
Steve
On Apr 3, 7:04 pm, dw [EMAIL PROTECTED] wrote:
i use wampserver and like
try xampp
On Thu, Apr 3, 2008 at 1:25 PM, Stephen Orr [EMAIL PROTECTED] wrote:
I second the recommendation of Wampserver.
Only problem I've found is that it doesn't include a mail server by
default - which means, if you're running under Vista, you can't send
emails from your localhost.
Dude, uso jQuery, there is a plugin called jEditable, and it´s so easy
to implement...
http://cakebaker.42dh.com/2008/02/24/edit-in-place-with-jquery-and-cakephp/
Cheers,
mbavio
On Apr 3, 1:28 pm, Joel [EMAIL PROTECTED] wrote:
Look in $this-params['form']['value'].
Use Firebug to debug
Another way would be to keep standard method and internal method
having the name of the stage ie :
index
then
indexvote
indexaward
etc...
You index method could check if the indexstage exist, if not do a
default action ... In this way you are not limited by the number of
stage and can
I guess this should be :
?php echo $form-file('uploadfile1',array('size'=43)); ? // not .
in field name
unless you have multiple records fields then :
?php echo $form-file('Model.0.uploadfile',array('size'=43)); ?
?php echo $form-file('Model.1.uploadfile',array('size'=43)); ?
Hth
On Apr 3,
I've been desperately trying to figure out a good method to use
dynamic subdomains and I am so close!
Here is what I have going on:
1) My app_controller checks the subdomain against the database and
makes sure it's valid. If not, it redirect - works great!
2) I put the following hack inside
Hi,
Good guess; actually, the reason for it was pointed
out to me. The problem was in the form declaration,
which should have been:
?php echo $form-create('Featurerequest',
array('type'='file'));?
The array part was missing. Things are working now,
so I hope passing this on helps someone not
What is the name of your ctp ? graph_sales.ctp or graphSales.ctp ?
On Apr 3, 6:31 am, b logica [EMAIL PROTECTED] wrote:
I have a controller method that gathers stats to be used to create a
graph image. I'm trying to track down whatever is corrupting it,
though, because I can't get it to show
You can use $html-image(router::url('admin/webroot/img/image.png',
true)) ..
The router method should format a complete url , image method will
check for :// and avoid formating it..
hth
On Apr 3, 10:05 am, Adam Royle [EMAIL PROTECTED] wrote:
Never tried your way, however is there a reason you
Router::connect('/',
array('controller'='contests', 'action'='index')); maybe ?
On Apr 3, 11:09 pm, John R [EMAIL PROTECTED] wrote:
I've been desperately trying to figure out a good method to use
dynamic subdomains and I am so close!
Here is what I have going on:
1) My
Nope..
--~--~-~--~~~---~--~~
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,
If you're new, I'd try XAMPP Lite
It includes everything you need, including implementation of sendmail.exe,
which gives you a way to send mail through your ISP's SMTP server...
On Thu, Apr 3, 2008 at 3:32 PM, bob [EMAIL PROTECTED] wrote:
try xampp
On Thu, Apr 3, 2008 at 1:25 PM, Stephen
I would do something like this, where getCurrentStage() returns a
string submit or vote:
function beforeFilter(){
$currentStage = $this-Contest-getCurrentStage();
if ($this-action != $currentStage){
$this-setAction($currentStage);
}
}
function submit() {
This has been resolved. I would have replied earlier but google wasn't
showing the message anywhere for me to reply to.
I should have added that, because there was a ~1kb difference in file
size, I was confident that the problem wasn't extra spaces outside the
PHP tags. What was weird, though,
I'm very new to Cake and I've been trying to go through the
documentation on theming. The external tutorials I've read indicate
that the theme is set in app/app_controller.php and the theme default
file is in app/views/themed/(themename)/default.ctp - this part
appears to be working for me.
This suggests that users will need to log in (at least, after the
first stage). So, you could use different controllers and redirect to
the proper one based on a user's stage in the process.
On Thu, Apr 3, 2008 at 3:15 PM, John R [EMAIL PROTECTED] wrote:
My application is a series of contests
Show me your full routes.php, please.
Maybe you have:
if(strlen($subdomain) 0 $subdomain != www) {
Router::connect('/*', array('controller'='contests',
'action'='index'));
Router::connect('/:action/*', array('controller'='contests',
'action'='index'));
}
Router::connect('/*',
That was it! The 'else' worked like a charm. 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
We have some large reports for our application - often involving ~250K
rows from 8 different tables. The problem is, if your reporting needs
to do any kind of collating or comparison, as ours does, you really
can't avoid having all the data loaded somewhere. You may be able to
do much of it in
Hi Martin
I do not use any helper for jquery, myself. Since all my javascript,
including ajax, is applied dynamically to css selectors I have no real
need for a helper.
Do you use the Behaviour js library for this?
http://www.bennolan.com/behaviour/
Or something else?
Regards,
Langdon
Adam -
That's a good idea, except each stage will have a whole bunch of
functions and such, not just a single one for each.
b logica -
This entire area of the app runs through the contests controller, so
unless I am missing something, I don't think I could use other
controllers.
John
On
I have been using jQuery and cake for sometime. I never did make headway
with proto etc
for example
$(document).ready(function() { // fired when document is ready
$(.edit).editable(/post/update/); // attaches editable to
all edit class elements
});
You don't need a cake helper
Hi Sam
Thanks for the reply, but I am not clear exactly what you are talking
about here. I was asking specifically about how Martin attaches
Javascript to CSS selectors. Is this what you are referring to? Or
just to jquery use in general?
Regards,
Langdon
Sam Sherlock wrote:
I have
Woww... is it like we able to create or add much of subdomain? I mean
like social networking site that give their users a special domain
like username1.domain.com, username2.domain.com, and so on..
like that? is that true?
@John R
can u explain me how is ur table structure? i mean as you said
Have you tried asking the jquery list for help?
Once cake have rendered code to the view. jquery can take over from there,
then you just need to adapt any jquery code you learning from to work with
cake (change urls to controller/action/view)
mail me off list if you want some more indepth info
As long as the field is a date field in the database you should be
able to simply use $form-input( 'Model.datefieldname' , ... ) as
usual. I believe it autocreates a number of select boxes.
Good luck._
On Mar 28, 3:53 pm, shabba [EMAIL PROTECTED] wrote:
I'm trying to use the form helper to
Hi All,
I need help in running prototype in using the validation found on :
http://tetlaw.id.au/view/javascript/really-easy-field-validation
i have included in my layout all the files I need :
?php echo $javascript-link('validation/scriptaculous/
validation.js'); ?
?php echo
Hi All,
I need help in running prototype in using the validation found on :
http://tetlaw.id.au/view/javascript/really-easy-field-validation
i have included in my layout all the files I need :
?php echo $javascript-link('validation/scriptaculous/
validation.js'); ?
?php echo
83 matches
Mail list logo