Hello,
I am using jquery and cakephp.
I wrote some info on this link.
Can you pls tell me if this is the right way to do it ? or if there is
a better way ?
http://pastebin.com/m247e9d3d
Thanks
Salim.
--~--~-~--~~~---~--~~
You received this message because you
Hi
Is it possible to make the reverse routing work so that it doesn't add
an index action to the url? For example:
//In routes.php:
Router::connect('/contact/:action/*', array('controller' =
'contacts'));
//in some other file:
$url = Helper::url(array(controller=contacts));
$url now contains
On Thu, May 15, 2008 at 12:18 PM, Marcelius [EMAIL PROTECTED] wrote:
Hi
Is it possible to make the reverse routing work so that it doesn't add
an index action to the url? For example:
//In routes.php:
Router::connect('/contact/:action/*', array('controller' =
'contacts'));
- Before
Wy is it so damn simple :-p
Thanks!
Amit Badkas schreef:
On Thu, May 15, 2008 at 12:18 PM, Marcelius [EMAIL PROTECTED] wrote:
Hi
Is it possible to make the reverse routing work so that it doesn't add
an index action to the url? For example:
//In routes.php:
Hi!
The situation:
//in some view I have:
?php
echo $form-create(array(controller=search, action=index));
echo $form-input(Region.region_name);
echo $form-end();
?
Straight forward, nothing to it... Now I want to post data via GET.
Cake doesn't have to worry about handling the 'posted' data
The security component validates the allowed fields in a post.
What I was wondering is wether it really should validate (and
blackhole) fields in fields in fields the way it does at present?
Say a model has these fields:
User
id -int
prefs - blob
password - varchar
In this case the
I'm trying to use the command cake acl initdb to set up ACL tables
in an oracle system, but my queries are returning errors because
apparently acos and alias are keywords in oracle. Is there any way I
can use acl short of renaming every bad field to something acceptable
by oracle?
Ajax would have very little differences in your mailing list
registration,
- some in the (view) submission form
- none in model
- none in comtroller (maybe the add of request handler)
- some helpers such as javascript and ajax
I think this is very close to a user registration, and there are
I'm wondering if there is any way that I can know if I'm updating or
deleting when I'm inside the beforeSave function
afterSave has the $created parameter. But beforeSave doesn't have this.
--~--~-~--~~~---~--~~
You received this message because you are subscribed
On Thu, May 15, 2008 at 5:12 PM, MarcS [EMAIL PROTECTED] wrote:
I'm wondering if there is any way that I can know if I'm updating or
deleting when I'm inside the beforeSave function
- If $this-id (in model's beforeSave() callback) is false then you are
creating record otherwise it has id of
I'm wondering if there is any way that I can know if I'm updating or
deleting when I'm inside the beforeSave function
Assuming you meant updating or creating...
function beforeSave() {
if ($this-exists()) {
// It's an update
}
else {
// It's a create
}
}
thanks,
I guess I should've come up with that one myself.
Stupid question :)
On Thu, May 15, 2008 at 1:05 PM, grigri [EMAIL PROTECTED] wrote:
I'm wondering if there is any way that I can know if I'm updating or
deleting when I'm inside the beforeSave function
Assuming you meant updating or
There's an open ticket about this, the guy you want to talk to is
phishy (Jeff Loiselle) http://jeff.loiselles.com/wordpress/ :
https://trac.cakephp.org/ticket/2024
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
- If $this-id (in model's beforeSave() callback) is false then you are
creating record otherwise it has id of record which will be getting updated
Although generally true, this is not always the case. If you specify
the primary key, but that record does not exist, it will be an insert,
but the
Alright - I was unable to check this at all last night, so I'll try to
answer all the questions in one go here:
The $design configuration is:
var $design = array(
'persistent' = false,
'driver' = 'adodb',
'connect' = 'mssql',
I added that little code snippet to the adodb file, and the query is
no longer all screwy :) thanks so much for your help.
Tracy
On May 14, 6:51 pm, egi [EMAIL PROTECTED] wrote:
if you're using adodb for database connection, i have filed the error
on
thanks for your suggestions..
turns out it was an htacces config
RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L]
---
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
note the '/' before the index.php
On May 14, 9:48 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
did you replace the 'app'
Yup, you've got it right. The only improvement would be that you don't
need to give an index for each of the rules under zip.
var $validate = array(
'zip' = array(
array(
'rule' = array('postal', null, 'us'),
'message' = 'Must be a valid
I had a go at altering dispatcher.php to enable this functionality. It
is a bit of a mess but it does work for me using naming conventions
from the documentation. I have not been able to create a good test-
case for it.
Also, you would probably need to change little things here and there
to
After playing around a bit more I'd say my second way would be
preferable since it tricks methods like url() to use the pretty
controller name. It seems to work fine for me so far.
on line 556 I have simply added an elseif. See the ticket or:
if (App::import('Controller', $pluginPath .
I believe there is already a plugin in wordpress that does this.
If not, it wouldn't be too hard to do what you want.
On May 15, 3:28 am, Abhimanyu Grover [EMAIL PROTECTED] wrote:
Looks like I have to do the same thing in coming days for a new
project.
On May 12, 4:37 pm, darkblack [EMAIL
Hello to all.
I would like to share with you a problem I'm having and I need your
suggestions.
We have the following models:
Video, Album, Artist.
Video and Album are not relationed using HABTM; but Video hasMany
AlbumVideo; AlbumVideo hasMany Albums.
AlbumVideo has an Order field to sort
I have a section of my site called 'Ask Vinny' and I would like the
URL to look something like mysite.com/vinny (not mysite.com/vinnies)
so I renamed the controller and moved the views into the vinny/ dir,
and it works fine, except that when submitting the 'ask question' form
( @ vinny/ask), it
Hi all
I've got a ajax-form with buttons on it which submit the form just
fine and produce the expected behaviour.
I've just added a drop down list (i.e. select element) to the form and
tried to get its onchange event to submit the form using:
onchange = submit();
However, I find that
http://book.cakephp.org/view/39/configuration#routes-configuration-46
-Joel.
On May 15, 11:18 am, benjam [EMAIL PROTECTED] wrote:
I have a section of my site called 'Ask Vinny' and I would like the
URL to look something like mysite.com/vinny (not mysite.com/vinnies)
so I renamed the
Hi All,
I'm building a CakePHP app for tracking clinic patients, their visits,
their symptoms and questionnaire answers. The barrier I've encountered
is that each patient has many visits AND many symptoms. I want to view
the patient record and their aggregate visits and symptoms.
I've defined a
Have you checked that:
$patient['M5Symptom']
is the correct way of referencing the array of symptoms within the
patients array? I've not checked, but often Cake puts model results in
an array like this:
Patient array:
array([0] = array('M5Symptom' = array of all the symptoms...
What I mean
Maybe you should do an obverseField and use Form.serialize as
with parameter?
On May 15, 6:15 pm, Dovdimus Prime [EMAIL PROTECTED] wrote:
Hi all
I've got a ajax-form with buttons on it which submit the form just
fine and produce the expected behaviour.
I've just added a drop down list
Yep: 'undefined index' definitely means you're not referencing your
part of the patients array properly. The problem may well be nothing
to do with the associations in your model.
Use print_r to look at the array you're passing into the view.
David
print_r($patient['M5Symptom']) results in the expected list of
symptoms:
Array
(
[0] = Array
(
[id] = 19
[patient_id] = 5007
[symptom] = Stuffy Nose
[start_date] = 12/18/2006
[end_date] = 12/21/2006
[severity] =
Hi Tony,
What do you have in the $patient variable when you debug it?
debug($patient)
/Martin
On May 15, 5:37 pm, Tony Thomas [EMAIL PROTECTED] wrote:
Hi All,
I'm building a CakePHP app for tracking clinic patients, their visits,
their symptoms and questionnaire answers. The barrier I've
debug($patient) produces:
Array
(
[Patient] = Array
(
[id] = 5007
[med_hist_id] = 0
[gender] = M
[st_of_birth] = [redacted]
[st_of_res] = [redacted]
[res_length] = 11 yrs
[cntry_of_origin] = U.S.
I'm having some difficulty figuring out how to make pagination links
use the path I need. I have a model, Members, for which the index
lists all members and requires pagination. However, the client insists
on putting this in a directory named membership, the index page of
which is actually other
Yeah, I forgot to mention that I tried:
$paginator-next('Next', array('url' =array('/membership/members')));
with similar result. This is really unfortunate :-/
On Thu, May 15, 2008 at 3:30 PM, Nicolás Andrade
[EMAIL PROTECTED] wrote:
I'm having a similar problem with paginator too.
In
I'm having a similar problem with paginator too.
In view, I've :
echo $paginator-prev(' Prev', array('url' = array('name' = $SearchFor)),
null, array('class'='disabled'));
I expect it to link to /admin/artists/page:1/name:SEARCHSTRING
but instead of this, it links to:
Hi!
I am developing my web application with cake, but I need to deliver
the diagram of classes of the application with the Model-View-
Controller that uses. I have been searching very much but I do not
find anything of help. If someone can say me any link or something i
will great.
Thanks and
That's a big help, but not enough to fix the issue. In fact just the
opposite.
I'm not trying to adjust the controller to the URL, I'm trying to
adjust the URL in the controller.
The issue I'm having is when I tell Cake that I want to use the
'Vinny' Controller, it runs off and grabs
On Thu, May 15, 2008 at 4:00 PM, benjam [EMAIL PROTECTED] wrote:
That's a big help, but not enough to fix the issue. In fact just the
opposite.
I'm not trying to adjust the controller to the URL, I'm trying to
adjust the URL in the controller.
The issue I'm having is when I tell Cake that
Hi,
as CakePHP is able to detect the language of the visitor on the
website, i would like to use the cache and put the language in front
of the cache filename like this :
tmp/cache/views/fre_articles_index.php
actually i have
tmp/cache/views/_articles_index.php
What happens actuallay ?
when
To solve my issue, I've added the following lines:
if(strpos($url['action'], Configure::read('Routing.admin') .
'_') !== false){
$url['action'] =
str_replace(Configure::read('Routing.admin') . '_' , '', $url['action']);
}
in
OK, some additional information. (I apologize, because I think this is
getting into PHP territory and may not be specifically related to
CakePHP.)
If I place debug($patient) before the first foreach loop (for
'Visit'), I get the arrays as below. If I place it after the foreach
loop I get the
Just curious,
If you've created some app with cake, you could think of a mvc diagram
yourself I think :-)
Just think of how you work with it... You create a controller that
extends from some other class, you can reference a model from that
controller (which also extends from some other class),
I have a problem with validating data without saveing anything in
database.
For example this script work good
if ($this-Post-save($this-data)) {
$this-flash('blabla.','/posts');
}
but when I use some my function form is not validating
if
On Fri, May 16, 2008 at 3:28 PM, dandreta [EMAIL PROTECTED] wrote:
Hi!
I am developing my web application with cake, but I need to deliver
the diagram of classes of the application with the Model-View-
Controller that uses. I have been searching very much but I do not
find anything of help.
On Thu, May 15, 2008 at 4:32 PM, Nicolás Andrade
[EMAIL PROTECTED] wrote:
To solve my issue, I've added the following lines:
if(strpos($url['action'], Configure::read('Routing.admin') .
'_') !== false){
$url['action'] =
Ping!
Thanks to all the people who have helped out so far. Just as a final
warning, in less than 48 hours all enhancements for 1.2 will be
frozen, and any/all tickets without patches will either be closed or
punted on until a future version, which means you probably won't see
them in the core
Are you saying that this foreach loop is modifying the contents of the
array?
--~--~-~--~~~---~--~~
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
Thanks for all of the help. The tips I got pointed me in the right
direction. Once I changed my foreach loops to while (list($key,
$value) = each($patient['Visit'])) and while (list($key, $value) =
each($patient['M5Symptoms'])) respectively, my data appeared. I
figured this out once I realized
is there somebody can help me?
On 14 Mag, 15:13, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
I use cake 1.2
With cake 1.1.13 it works
On 14 Mag, 09:37, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
I try the blog tutorial in cake and all works fine.
Then I have add the model Tag(with its
Yeah, I tried all of those, and none of them were working for me, but
I noticed further down on the page in the link that was supplied by
Joel that there was a section called Custom Inflections, and so I
edited /config/inflections and added 'vinny' to the $uninflectedPlural
var.
It works now,
Speaking of generic, I'm wondering if Nicolás' bug is more of an admin
routing one or something specific to pagination/routing. IOW, I still
don't know if what I want to do has an existing solution or I need to
hack Router as well. For the moment, I'm rolling my own pagination but
I'd really
I would like to see each php code and the resulting HTML link, if possible.
It might help us to help you.
On Thu, May 15, 2008 at 6:36 PM, b logica [EMAIL PROTECTED] wrote:
Speaking of generic, I'm wondering if Nicolás' bug is more of an admin
routing one or something specific to
Thanks nate for the reminder ... I do my best tomorrow and day after
(I am about 8 hours ahead here, but was away before) ...
Thanks all core team
On May 15, 11:01 pm, nate [EMAIL PROTECTED] wrote:
Ping!
Thanks to all the people who have helped out so far. Just as a final
warning, in less
There's not much to show. All I want to do is prepend '/membership/'
to all members routes.
This works fine:
Router::connect('/membership/members', array('controller' =
'members', 'action' = 'index'));
MembersController:
var $paginate = array(
'url' = array('/membership/members'),
Hi all,
I've been trying to run cake on a godaddy hosting service. mod_rewrite
is not available, so I set up cake to use its Pretty URLs, by
uncommenting the line inside core.php and by deleting .htaccess files.
I got the index page to perfectly, with CSS styling and connection to
the database,
Well, I have solved this in another way, but depends if you know the
languages you are handling .. I mean, I have applications in
production, that are supporting up to 3 languages. In such case, it's
quite easy, you define 1 cache config per language (ie: en_conf,
fre_cong, ru_conf). Then in all
I believe you can use the RequestHandler (?) component to
automatically check for an AJAX request, and disable layouts based on
that,
so you can eliminate your $layout=false. Just include the
RequestHandler component, and you can also call its isAjax() method to
check for yourself.
I also think
Old time programmer (since 1979) and fan of PHP (since '97) who decided to
venture out and see what all the fussing over the OS frameworks was all
about. I was enticed by a PHP Magazine article on CakePHP and after reading
a lot of the pros and cons of different frameworks this seemed like the
Hi all,
I have been looking around for a while now without finding a solution
to my problem and it is driving me nuts...
I have a website build with Cake 1.2...
I have somewhere a request that take a bit of time, more than 2
seconds anyway. In addition I have a AJAX periodical observer running.
There are many different server configurations and I too have had
problems installing cakephp. I guess the first step would be to see if
php is working. You could do that by placing a php file there with the
code ?php phpinfo(); ?. That should print out a bunch of your php
settings.
If you
All -
I'm trying to wrap my brain around the HABTM 'with' or 'auto-
with' (I've seen this term?) relationship. I think I've got it to a
degree, but I need some help. I have the following:
Site hasOne Prospectingplaylist (dependent = true)
Prospectingplaylist belongsTo Site
Prospectingplaylist
Hi Francky,
no i dont know it depends on the visitors.
but i am always interesting in any idea to reach my goal ;)
regards.
On 16 mai, 01:41, francky06l [EMAIL PROTECTED] wrote:
Well, I have solved this in another way, but depends if you know the
languages you are handling .. I mean, I have
62 matches
Mail list logo