Yes http://book.cakephp.org/view/122/Core-Definition-Constants
- S
2009/6/10 eiji
>
> But doesn't $this->action only gets the action, eg. in my example add/
> edit?
>
> I was wondering is there a way in cakephp, a constant variable
> perhaps, that gets the absolute path of a certain project?
>
But doesn't $this->action only gets the action, eg. in my example add/
edit?
I was wondering is there a way in cakephp, a constant variable
perhaps, that gets the absolute path of a certain project?
Alec
On Jun 10, 12:22 pm, Sam Sherlock wrote:
> this->action is good for this. I find it useful
Hi there,
I'm trying to learn more about the ajax helper and making
some experiences with it.
I have a long form (about 40 fields) to a model that has
HABTM relationships. The related data are inserted
via an ajax call with properly input hidden fields.
I get these related data by its IDs. Bu
this->action is good for this. I find it useful setting a js var in a script
block and then in my main script eg common.js I use this var - also this
controller
- S
2009/6/10 eiji
>
> Hi Sam,
>
> Thanks for that, is there an easier way to get the absolute path of a
> certain project?
>
> or is
ok,
Open a Terminal window ( Applications > Accessories > Terminal )
cd CAKE_ROOT/cake/console
chmod +x cake
where CAKE_ROOT is the directory where you unpacked cake in my case:
~/opt/cake
Also to make cake available to the shell, use :
cd
mkdir bin
cd bin
ln -s ~/opt/cake/ca
Hi Sam,
Thanks for that, is there an easier way to get the absolute path of a
certain project?
or is this the best way ->
http://groups.google.co.uk/group/cake-php/browse_thread/thread/e40c3cf038c2f01c
Thanks. :)
On Jun 10, 11:22 am, Sam Sherlock wrote:
> use absolute urls in cake
>
> - S
>
You should use
$html->css([path/file], null, array(), false);
the fourth parameter is what you should set to "false" cause it is the
inline attribute.
Assuming you have the variable $scripts_for_layout at the head, it
would be outputted in the head part of the html.
Regards,
Alec
On Jun 10,
Setting the 'content' field type to BLOB in the secrets table solved
this problem.
On Jun 9, 12:10 pm, foldiman wrote:
> I'm trying to figure out why on one host, my CakePHP app will read/
> write ciphered text in and out of a MySQL table while on another it
> fails. I've set up a simple test t
use absolute urls in cake
- S
2009/6/10 eiji
>
> bump..
>
> Has no body encountered this with Cakephp + Mootools?
> >
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send
Hi there,
I'd like to insert rows in a table and generate a valid
xhtml output. So, in the main view I have
Column 1
Column 2
Column 3
and in the ajax method view there are the corresponding
table cells. I'd like to put they inside table's tbody section,
but the $ajax->submi
Having a go at the Wizard component...only issue I have is routing it. The
routes they have defined will not work in my setup.
They have
Router::connect('/signup', array('controller' => 'signup', 'action' =>
'wizard'));
I need to modify that into:
Router::connect('employers/:employer_slug/sig
bump..
Has no body encountered this with Cakephp + Mootools?
--~--~-~--~~~---~--~~
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 gr
$this->Model->save($data);
After a save, you can get the id at:
$this->Model->id;
--~--~-~--~~~---~--~~
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 un
Sorry for the silly question
'order' => 'rand()',
_
From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com]
Sent: June-09-09 11:57 PM
To: cake-php@googlegroups.com
Subject: Select random records
I am generating "Post by the author" as a side module in the Post View.
Pro
I am generating "Post by the author" as a side module in the Post View.
Problem is its displaying the same 5 over and over. For testing I added 50
Posts by 1 author but how can I select 5 random posts rather than now where
its displaying the first 5 it finds.
Dave
--~--~-~--~~--
Hi Sam,
I thought you wanted to extract data to make this array
Array
(
[0] => Array
(
[0] => John
[1] => Sumani
[2] => Eric
[3] => Sam
[4] => Moses
[5] => Kwabena
)
)
as that was highlighted red.
- S
To clarify a bit: I know how to redirect and I know how to use routes.
What I need to know is hot to invoke a route from within a controller
or other file - like you do with redirect. I can't find anything in
the docs on how to do that. Any ideas?
--~--~-~--~~~---~--~--
I am trying to get the ID of the last record inserted with
$last_id = $this->Applicant->getInsertID();
debug($last_id);
But nothing
What am I missing?
Dave
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
See my comment here
http://groups.google.com/group/cake-php/browse_thread/thread/b477f59240d739fa/3f2a8764042fc470
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to
You dont use $form->select(), you use $form->input() and pass 'type'
=> 'select'
--~--~-~--~~~---~--~~
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 unsub
Hi Dave,
You can use addScript to ensure it gets added to the head block at the
top of the page like so:
$this->addScript($html->css('my_file'));
Cheers,
Graham
Dave Maharaj :: WidePixels.com wrote:
> Can you include CSS per view as you do js?
>
> I need sifr css on only 1 view. Is there a
Hi,
When I disable Cookies I get a white page after logging into my website
(using Auth Component).
Is there a way view an error page instead of just a white page?
Marcel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
I like using the Form helper, but I also want to keep my forms
organized in a table (CSS noobs, please do not try to reply about
this). To do this, I use the Before,between,after options to allow
CakePHP to spit out the label and all and it works fine until using
special fields.
The problem is th
Thanks, Sam.
But I'm pulling data from the 'Jurisdiction' model, not 'Agent' as in:
$this->Jurisdiction->Agent->find(..)
-sam
On Jun 9, 4:57 pm, Sam Sherlock wrote:
> using this as the path with set::extract
>
> /agents/@*
> - S
>
> 2009/6/9 samuel darko
>
> > Hi All:
> > I need
Yes its you session id.
--~--~-~--~~~---~--~~
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 group, send email to
cake-php+unsubscr.
In case you can't see the 'highlighted' portion (it is what I need to
extract), here it is:
agents" => array(
"John" => "Mensah",
"Sumani" => "Abdulai",
"Eric" => "Adotey",
"Sam" => "Darko",
"Moses" => "Adjei",
"Kwabena" => "Kyeremeh"*
),
-sa
using this as the path with set::extract
/agents/@*
- S
2009/6/9 samuel darko
> Hi All:
> I need help in extracting data from my find('list') result.
>
> I have $this->Jurisdiction->Agent->find(..)
>
> and getting the result below but want just a portion of it, highlighted in
> pi
If I change the email, the record gets edited (no new records are
created). In trying to debug this, I put a pr($this->data); statement
at the beginning of the action's function. When I change the email, all
of the fields are there, including user_id. However, when I leave the
email the same
Hi bakers,
I went through the tutorials on l10n and i18n and enjoyed it but I was
wondering if there's a way in cakePHP for me to translate a whole
page,not just a couple of strings,like an "About us " page or even a
FAQ page.In other terms,how can the static pages stored in app/views/
pages/ be a
Hi All:
I need help in extracting data from my find('list') result.
I have $this->Jurisdiction->Agent->find(..)
and getting the result below but want just a portion of it, highlighted in
pink (I've tried using set::combine() to no avail)
$___viewFn =
"/home/ilcs/website_
On Tue, Jun 9, 2009 at 4:22 PM, Dave Maharaj ::
WidePixels.com wrote:
> Can you include CSS per view as you do js?
>
> I need sifr css on only 1 view. Is there a way to include it in the specific
> view?
Try
echo $html->css('file'); // in your view
Best regards.
--
MARCELO DE F. ANDRADE
Belem,
Is it normal that you keep getting new CAKEPHP cookies?
Try loading
http://ketchup.book.dinnerbooking.com/
and click on a date.
A set-cookie header is sent every time. Is that normal?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
in views/subscribers/view.ctp
$this->element('../subscribers/subview1');
$this->element('../subscribers/subview2');
- S
2009/6/9 RhythmicDevil
>
> Hello,
> I have a view.ctp for a Subscriber. I want to break up the view into
> several smaller templates as there are tabs and all sort of stuff on
Can you include CSS per view as you do js?
I need sifr css on only 1 view. Is there a way to include it in the specific
view?
Dave
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this
Are you sure you're passing the model's ID? If you change the email,
is the record edited, or do you get a completely new record? Cake will
check the ID to see if the unique field it finds belongs to the
currently-edited object. If so, it should let it pass.
On Tue, Jun 9, 2009 at 1:32 PM, Jon Ch
Hello,
I have a view.ctp for a Subscriber. I want to break up the view into
several smaller templates as there are tabs and all sort of stuff on
the view. However logically the small pieces dont belong in elements
as they are not used anywhere else. I want to put them in views/
subscribers and jus
Thanks Brian! Worked like a charm!
On Jun 8, 6:20 pm, brian wrote:
> Use the '#' key:
>
> $paginator->options(
> array(
> 'url' => array(
> 'controller' => 'projects',
> 'action' => 'view',
> $projec
I don't have the .htaccess file in my cake folder, but it isn't in the
cake zip archive either.
But excuse me, I don't understand what the .htaccess has to do with my
problem in the first post. Cake writes a relative URL, that works ok
if you put the helper in the action.ctp, but I have it in the
I'm hoping somebody here can help me figure out how to use isUnique in
my model correctly.
I have a db table with email, name, etc. I developed an action in my
controller and a view for the purpose of allowing the user to editing
the data stored here. I created a rule isUnique for the email f
Instances of AppModel are created when cake can not find model class
(feature for fast prototyping or access to tables without need of
model). That could be caused by several things - improper filesystem
permissions for model files, mispelled filenames or class names,
disabled debug and improper c
On Tue, Jun 9, 2009 at 12:19 PM, Rob Conner wrote:
>
> Wow, generateList is an old function. where did you find that example
> code?
>
> Perhaps just try $this->Book->Author->find('list');
I assumed the OP was referring to the TreeBehavior method. I'd
forgotten about that old one from Model class
by old, I mean deprecated, and I don't think it exists in newer
versions of cake.
--~--~-~--~~~---~--~~
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 unsu
Wow, generateList is an old function. where did you find that example
code?
Perhaps just try $this->Book->Author->find('list');
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group,
I'm trying to figure out why on one host, my CakePHP app will read/
write ciphered text in and out of a MySQL table while on another it
fails. I've set up a simple test to comparetry it and you can see
for yourself
On this host it works:
http://www.foldifoldi.com/cakeapps/cipher/secrets/
It's generateTreeList(). Also, ensure that Author has $actsAs = array('Tree')
On Tue, Jun 9, 2009 at 5:39 AM, engfaruque wrote:
>
>
>
>
> $authors = $this->Book->Author->generateList();
>
> For the above code following error occur
>
> 1064: You have an error in your SQL syntax; check the manual t
You can check out:
https://www.sandbox.paypal.com/
If you make a Paypal Sandbox account, you can create buyers and
sellers accounts and use them to pratice on your site.
I'm not sure, but i'll probably have all the information you need in
teh documentation-link on that page. From what I heard abo
Check out the Wizard component for sure. Otherwise, use a helper or
element that will display the data differently -- if the POST'd values
are present, it will display it as static, non-editable. If they
aren't there, it will display them as input fields.
On Jun 8, 9:13 am, brian wrote:
> I su
Agreed with Brian. It may seem like the table is getting huge (which
it eventually will). But you're just keeping record of 2-3 INT data
types (depending on how you do the key), so much of it will fit into
memory anyhow. I wouldn't worry too much about join tables being a
source of slowness (un
Allright,
I;ve been cracking my head on this.
I have a HABTM relation between users and products. Users can select a
product to put on his favorite list. Everything works great (A lot of
thanks to this Googlegroups for that!) but now I need something heavy.
So I have a users table, products tabl
iFeghali,
Your decision will need to be based on your specific application. Take
a look at the following tradeoffs and determine what's best for you.
1) Will a telephone EVER POSSIBLY have both a supplier AND a
customer? If so, you def. want to go with option a; otherwise, you'll
need to have t
I have the following code for my model 'Order':
array('numeric'),
'point_of_sales_id' => array('rule' => 'numeric', 'message' =>
'numeric'),
'logistic' => array('rule' => 'numeric', 'message' =>
'numeric'),
'status' => array('rule' => 'numeric', '
Hello,
Thanks for providing this great script and marvelous forum here.
I try to show google adsense ads on my cakephp site, but no matter how
I am trying, using include php function, put the ads directly on the
main page, etc etc, my ads is not showing up
You can view it at
http://www.letsfol
)
)
$model->data @ AutoCode::beforeValidate (end of function)
Note: the "Code" field is successfully added to model data array
Array
(
[Order] => Array
(
[customer_id] => 30
[ref] => T
[Code] => 20090609
)
)
@@@ Aut
if htdocs is the root folder your urls should look something like
localhost/jtcms/controller/action
You might also have lost one of the ".htaccess" files that help Apache
give Cake the correct path info. There should be one (usually
invisible) in each of the folders jtcms, app, webroot. Especial
I can't deal without this script which copies contents to i18n table,
though. It's because when I leave those original fields -
they have "higest priority", and they're the same as last saved
translation ;) So I just need to copy them, and drop those fields.
Needed to experience lot's of pain befo
I'm getting the same 404 error when trying to access my controllers.
However when I access the AppController, everything's work perfect.
Has anyone a solution?
On May 5, 5:28 pm, brian wrote:
> Look in /app/tmp/logs. There should be both error and debug logs. Make
> sure the webserver owns the
here's my code.
i removed all the comments.
class OrderModel extends AppModel {
var $actsAs = array("AutoCode", "AutoDate");
var $validate = array(
"Code" => array(
"unique" => array(
"rule" => "isUnique",
$authors = $this->Book->Author->generateList();
For the above code following error occur
1064: You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
'generateList' at line 1
How i solve it. I am new in cake php
$authors = $this->Book->Author->generateList();
For the above code following error occur
1064: You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
'generateList' at line 1
How i solve it. I am new in cake php
And I'm fairly sure I don't need to do that trick in save method ;)
On 9 Cze, 15:30, Grzegorz Pawlik wrote:
> Ok, I'll suppress my 'general why questions compulsive behaviour' ;)
>
> About not existing callback - just a mistake. I meant beforeFind of
> course. But it's not the point.
> I Talk ab
Ok, I'll suppress my 'general why questions compulsive behaviour' ;)
About not existing callback - just a mistake. I meant beforeFind of
course. But it's not the point.
I Talk about ArticleVersion and ArticlePage, because those two models
I want to have translatable, but that is not the problem e
I would like to route instead of redirecting from inside my
app_error.php file. So instead of just redirecting and having the URL
change I would like to keep the URL the same and just have it load a
specified controller and action. Is that possible?
--~--~-~--~~~---~--~
You probably should paste code, your "in theory" based on code you
told us your wrote is correct. But that doesn't solve the problem. So
there must be some error in your code.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
Hi,
I am wondering whether it is possible to use counterCache for two
fields... let me explain:
I need to cache count on Post level its (hasMany) images. Now I have
field 'image_count' in Post DB table. and it is working fine but what
to do if I need to cache to different scopes?? It is possible
Hi MGriesbach,
I like the idea of having a simple-to-setup queue system. This way
it's much more easy to get into the queuing and parallel/deferred
processing topic. Relying on the database for doing all the locking is
also ok in regards that it should be easy to setup, requiring no
additional da
Hi
I'm currently implementing a Plugin for CakePHP, which enables a
developer to Queue up any kind of Script execution (for example
Sending Emails, uploads/downloads etc.) and would like to ask for
feedback.
The Plugin is aimed to be a simple to setup, simple to use alternative
to systems like G
Is there a quick way to make the two fields "created" and "modified"
visible/editable in scaffold views? thx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-p
Hi Ernesto,
> i still haven't find a solution.
Could you please paste your model, controller and behaviour please, I
think you've had no real help because it doesn't make sense, each
beforeSave should run in succession, I think in the order the
behaviours are attached followed by the model's own
If you set onError both in model and AppModel, you should call
parent::onError() in your model onError.
On Jun 8, 6:17 pm, "marco.rizze...@gmail.com"
wrote:
> Hi
> I have this strange behaviour that I can't to understand.
> I would try to use the onError callback function.
> Now If i set the onE
Model::hasField('mySpecialField') - but you should restrict models
cache for your case or this call will check cached schema.
On Jun 9, 4:26 am, Henrik Gemal wrote:
> I'm accessing databases stored on difference computers. Everything
> works just fine now since all the databases have the same co
Can you describe the context of the problem? ie. what is it that you
want to achieve?
On Jun 6, 1:38 am, Greg Baker wrote:
> Is it possible to use TreeBehavior where parent_id points to an id in
> another model, which also uses TreeBehavior?
--~--~-~--~~~---~--~~
Isn't it easier to make domain .com.pl point at the same location as
domain .pl ?
I don't believe messing with .htaccess is what You need ;)
On Jun 8, 10:58 am, Anna P wrote:
> Thank you for suggestion, but that doesn't seem to work either. Still
> when I enter .com.pl it doesn't redirect me to
i still haven't find a solution.
some1 help me please :(
On 8 Giu, 09:47, Ernesto wrote:
> ops sry i wrote the code straight.
>
> in my cake app all beforeSaves returns TRUE
>
> On 6 Giu, 20:41, brian wrote:
>
>
>
> > You must return true or false from beforeSave().
>
> > On Fri, Jun 5, 2009 a
Do you have beforeSave method in User model? If yes, can it handle one
field save situation correctly?
On Jun 8, 5:47 pm, Snirre wrote:
> Just a SELECT query.
>
> On 8 Juni, 00:55, Miles J wrote:
>
>
>
> > Is a query ran in the output at the bottom?
--~--~-~--~~~---~
htdocs/jtcms/app
htdocs/jtcms/cake
But if I configure cake correct, it does output the full image path? I
couldn't believe I was the only one with this problem...
On 8 jun, 16:11, Martin Westin wrote:
> Not a bug. You either have a configuration problem or just missed how
> your install does it
Hi Guys,
I'm trying to use the Request.HTML of Mootools and I've got it working
on the DropDown onchange event. Really great indeed. I just noticed an
error when I was trying to implement it in the edit action.
Ok, so.. my JS request is like this
function clientTypeChange(value) {
var r
76 matches
Mail list logo