as an example, in my View, i put this:
?php echo pr($phase['Stage']); ?
then the output will be : Array
(
[0] = Array
(
[status] = 0
[duration] =
[p_date] =
[a_date] =
[id] = 4584
[remarks] =
Hello,
I'm implementing a very simple authentication using Auth component.
In my login.ctp view I have the two essential fields at the form:
- user
- password
But when log the data from the view, I always get the password field
in blank. Any sugestion?
Thank you in advantage
Configure::write('debug', n );
Setting debug to 0 will make make respond with a 404.
Anytime debug is on (more than 0), Cake expects you to be building or
testing the application. Cake does not try to make a difference
between the missing file /posts/edit/1 and /files/images/
not_here.jpg. It
hi
i want get my form fields values in Model with name of each fields , i
need this for writing
custom validation function , i don't ind good solution for this .
anybody have idea ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Auth does that to ensure the password is never shown in plain text...
in a log, in an unexpected debug output or some similar situation. By
the time you get the data Auth has already done it's authentication
and the password should be more or less unimportant.
On Aug 17, 9:38 am, Veoempleo
hi,
I have done a site by cakephp, and I have used the example
of Simple Acl controlled
Applicationhttp://book.cakephp.org/view/641/Simple-Acl-controlled-Application
.
the site can run very good.
now I copied the source and all the table (no data),
and imported these tables's data of
Which model doesn't have an id field?
If it has an pk or uid or some other name you should just let Cake
know via the attribute $primaryKey.
The join-table can manage without any primary key as long as you don't
store any extra data in it. But this is not encouraged, it seems to be
considered as
Thanks Martin, so the real answer to my question was .. yes, you are
just being daft :o) Just goes to show I have not put a CakePHP
project into production.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP
?php //echo pr($phase['Stage'][0]['id']); ?
at this line,the echo came out nicely
?php
$i=0;
foreach ($phase['Stage'] as $stage):
echo $stage[$i]['id'];
$i++;
echo $i;
?
?php endforeach; ?
but after trying the loop,it says undefined offset,from 0 to the end
of the loop index...anyone help me
You can find out the location of the php.ini file your setup is using
by creating a php page somewhere with the following line:
?php
phpinfo();
View the page in a browser and look for the string Loaded
Configuration File
On Aug 15, 8:43 am, Walther waltherl...@gmail.com wrote:
If you had no
In a foreach loop you don't need to reference the arrays index ($i).
Just use $stage['id'].
Examining $stage would have lead you to this answer. This isn't a
Learning PHP thread, so please think for yourself...
On Aug 17, 4:08 pm, keanoppy keano0...@gmail.com wrote:
?php //echo
in that case,how can i play around within the loop?
i.e. a[i+1]-a[i]
without the index,how may i do so?
On Aug 17, 5:36 pm, Robert P shiftyrobs...@gmail.com wrote:
In a foreach loop you don't need to reference the arrays index ($i).
Just use $stage['id'].
Examining $stage would have lead you
or is there a way to make a loop using the index?
On Aug 17, 5:42 pm, keanoppy keano0...@gmail.com wrote:
in that case,how can i play around within the loop?
i.e. a[i+1]-a[i]
without the index,how may i do so?
On Aug 17, 5:36 pm, Robert P shiftyrobs...@gmail.com wrote:
In a foreach loop
Thanks for replying :).
I have just read through and digested what your behaviour does and it
seems to be just what I need. I'll have a go at implementing it in to
my application.
On Aug 16, 8:33 am, jmcneese jmcne...@gmail.com wrote:
this might work for
foreach ($phase['Stage'] as $index=$stage):
echo $stage['id'];
echo index;
...
On Aug 17, 11:43 am, keanoppy keano0...@gmail.com wrote:
or is there a way to make a loop using the index?
On Aug 17, 5:42 pm, keanoppy keano0...@gmail.com wrote:
in that case,how can i play around within the
Again: these are PHP basics. Use the PHP manual, not the CakePHP
mailing list.
On Aug 17, 6:17 pm, majna majna...@gmail.com wrote:
foreach ($phase['Stage'] as $index=$stage):
echo $stage['id'];
echo index;
...
On Aug 17, 11:43 am, keanoppy keano0...@gmail.com wrote:
or is there a way to
meaning there is no way to manipulate using the view?
On Aug 17, 7:22 pm, Robert P shiftyrobs...@gmail.com wrote:
Again: these are PHP basics. Use the PHP manual, not the CakePHP
mailing list.
On Aug 17, 6:17 pm, majna majna...@gmail.com wrote:
foreach ($phase['Stage'] as $index=$stage):
The original post about problem strings and TinyMCE reminds me of a
problem I recently had. Search for 500.shtml error? What is this?
Help!? in this group.
But I had built a basic CMS that allowed an admin to change text in
specific views. Whenever the text contained from or other specific
Hi everyone
I am integrating cakePHP and phpBB3 to display latest forum topics on the
main page, phpBB3 requires special characters on the url such as () tried
to use something like this:
?php echo $html-link($item['Topic']['topic_title'],
Hey guys, its solved now... I just got rid of $html-url() and used plain
text:
?php echo $html-link($item['Topic']['topic_title'],
'/forum/viewtopic.php?f='.$item['Topic']['forum_id'].'t='.$item['Topic']['topic_id']);
?
I was hoping i could display absolute url using the $html-url('/', true)
but
If you don't deal with the webserver config much it would be easy to
overlook that the whole Cake app more or less acts as an error page
for missing files. Any real file is sent directly and any missing
file results in php and Cake getting the url to try to make sense of
it.
On Aug 17, 10:08
Unfortunately the Permissionable behaviour is not adequate for my
needs as some users need to be allowed to view certain tickets that
they do not own and are not a member of a group with permission to
view them.
I need a way to get a list of all the records in a certain model the
current logged
Hi Dave,
it seems you have simply forgot to reference correctly the paginator
helper, you used:
$paginator-prev()
instead of
$this-paginator-prev()
/// Gianluca
On Aug 15, 2:59 am, Dave Maharaj :: WidePixels.com
d...@widepixels.com wrote:
[...]
Now the search index shows up with
I'm trying to create a page for organizing comic books. One table needs to
have multiple hasone relations and I can't figure out how to do it. Any help
would be appreciated. Here's what I have so far:
?
class Comic extends AppModel {
var $name = 'Comic';
var $belongsTo = array('User');
var
hi there,
i like cake but my problem is finding ressources from which i can
learn.
The cake manual does not provide every data i need, and often i have
to test something 1000 times after shutting down my computer going
outside and yelling ** it does not work.
The problem is not the amount
I placed my webroot outside the app directory. Actual structure is:
/app
/cake
/www - contains web files (previously in /app/webroot)
Everything works fine when Apache docroot points to /www, but when
docroot points to /, some weird things start occurring: it doesn´t
find appropriately CSS and
I urgently need a weekly/monthly/daily planner similar to google
calender to be integrated in my current project, please suggest that
uses prototype etc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP
I have a User Edit page that submits data over https /user/edit. The
controller saves data and redirects via http to /user/view.
In the process I use php session to read/write some data. If I access
session data using Cake Session component, I loose my session. As a
result I get redirected to a
If AD7six says not to upgrade a Cake 1.1 app to Cake 1.2, then I
apologize. I didn't think there'd be that many upgrade changes from
1.1 to 1.2 (my memory must be getting bad - oops).
Anyway, as far as baking from a different table, I did not mean to
create an entirely different app. You can
Hi,
I hope find help here .
I just need a tutorial to make my cakePHP application multilingual
I read this
http://book.cakephp.org/view/162/Internationalizing-Your-Application
but it do nothing and I don't know where's the Error
I need a simple tutorial to do that plz
Hi there,
I run a photo hosting site and we're having some problems. photie(dot)
com, please have a look and if you think you know how to help us out
drop me an email photie@gmail.com, all help appreciated...
Cheers
--~--~-~--~~~---~--~~
You received this
The Session Helper and Component are wrapper classes that allow you to
access values stored in PHP's $_SESSION superglobal. You can access
anything in it from the Helper and Component just as easily as the
superglobal as well.
On Aug 16, 6:26 am, Fabs lord.f...@gmail.com wrote:
Ahh, I see
On Aug 17, 4:26 pm, Brendon Kozlowski (Realm)
brendon...@hotmail.com wrote:
If AD7six says not to upgrade a Cake 1.1 app to Cake 1.2, then I
apologize. I didn't think there'd be that many upgrade changes from
1.1 to 1.2 (my memory must be getting bad - oops).
It's not that it's a bad idea
ok..so its my first time here..past few days ive been reading and
coding with cakephp for my school_enrollment system project..now im
stuck with this simple problem that i cant solve.4 hours of reading
and rereading about some cakephp articles but still no luck.. so i
think, you guys can be a
On Aug 17, 10:35 am, adilraufk...@gmail.com adilraufk...@gmail.com
wrote:
I urgently need a weekly/monthly/daily planner similar to google
calender to be integrated in my current project, please suggest that
uses prototype etc.
What did urgently googling yield ;) ?
ok..so its my first time here..past few days ive been reading and
coding with cakephp for my school_enrollment system project..now im
stuck with this simple problem that i cant solve.4 hours of reading
and rereading about some cakephp articles but still no luck.. so i
think, you guys can be a
It's exactly as it says: Too many levels of symbolic links. This is
a Linux issue which will probably require the attention of your web
servers administrator to solve.
On Aug 17, 9:40 pm, Photie photie@googlemail.com wrote:
Hi there,
I run a photo hosting site and we're having some
App was built Oct 2007 but it's taken the organization this long to
find funding for someone to test and work on it, (hence I'm struggling
to get my head round stuff again).
I will have a go at creating a test subdirectory and adding that debug
code- fantastic fantastic ideas thanks - probably
I experienced a very similar problem, but with textile, not TinyMCE.
Basically in certain circumstances, upon submission of a textarea
field, I received a 500 internal server error (I also had issues with
the word 'from'). This only happened on production, which, per
foldiman's post, suggests it
Does your mother know you use that name?
On Mon, Aug 17, 2009 at 10:42 AM, hymen breakerlunaro...@gmail.com wrote:
ok..so its my first time here..past few days ive been reading and
coding with cakephp for my school_enrollment system project..now im
stuck with this simple problem that i cant
Read the API, don't like the docs? Right some of your own stuff if you
believe you can present it clearer. But the API and Book are very nice
and show everything that is needed.
On Aug 17, 6:29 am, anders als andersa...@googlemail.com wrote:
hi there,
i like cake but my problem is finding
foreach($phase['Stage'] as $foo)
{
echo $foo['Stagesname']['name'];
}
// PSC TC Endorsement
// CTC Endorsement
// etc.
On Mon, Aug 17, 2009 at 3:37 AM, keanoppykeano0...@gmail.com wrote:
as an example, in my View, i put this:
?php echo pr($phase['Stage']); ?
then the output will be :
Use https for the redirect, also. Either that, or redesign your app so
you don't require the session vars in the other view. Are you doing
this to save doing a find() in the view view?
On Mon, Aug 17, 2009 at 10:22 AM, vb13val.brod...@gmail.com wrote:
I have a User Edit page that submits data
Is it possible to paginate with a variable in the link?
Instead of /index/page:2
I need /index/[my_variable]/page:2
How would I add that into the standard code?
?php echo $paginator-prev(' '.__('previous', true), array(), null,
array('class'='disabled'));?
Dave
Each model should just be listed as a string :
var $hasOne = array(
'Artist',
'Author',
'Rating',
'Publisher'
);
Also, you only need to use inner arrays if you want to be detailed.
var $hasOne = array(
'Artist' = array('className' = '...'),
Hello everyone,
Sorry for my noob question.
Please clarify each message in Debugkit Timer. I don't understand it
clearly.
They are:
1. Component initialization and startup
2. Controller Action
3. Render Controller Action
4. Rendering View
I think I can figure out #1 and #4 but what is the
Please note I am a very GREEN newby to MVC programing.
I have 2 tables.
1. users
Fields: id, user, type_id
2. types
Fields: id, type
Each user can have only 1 type and each type can have many
users.
I have created the following models.
user.php
?
class User extends AppModel {
var $name =
You forgot the array part:
var $hasOne = array('Type');
BUT you probably want:
var $belongsTo = array('Type');
Type:
var $hasMany = array('User');
If you used Group instead of Type it would make more sense.
On Mon, Aug 17, 2009 at 12:52 PM, Maguamdm...@gmail.com wrote:
Please note I am a
Ok I managed to get all my pagination up and running the way I needed.
The only thing left is removing /page:3 to only display /3
Router::connect('/bookmarks/index/:id_key/*', array('controller' =
'bookmarks', 'action' = 'index'),array('id_key' = '[-_A-Za-z0-9]+','pass'
= array('id_key')));
Yes, I am doing this to save a find in a view. You are good Brian :).
Except that the find is not a database call, it calls Salesforce via
an API so I want to save a couple of seconds of a user's time.
Still do not understand why Cake does this while I can use $_SESSION
directly and everything
Thanks I have it working now.
But i now need a another $belongs to declaration in my user.php
model.
How does cake handle this.
For example i have now added an organizations table with the
following fields
id, name
and i have added the following field to the users table.
organization_id
Each
Just add the model to $belongsTo array.
User:
var $belongsTo = array('Type', 'Organization');
Organization:
var $hasMany = array('User');
On Mon, Aug 17, 2009 at 3:04 PM, Maguamdm...@gmail.com wrote:
Thanks I have it working now.
But i now need a another $belongs to declaration in my
I am now generating the following error when i load users
Warning (512): SQL Error: 1054: Unknown column 'User.organization_id'
in 'on clause' [CORE/cake/libs/model/datasources/dbo_source.php, line
524]
Here are my models
organizaton.php
?
class organization extends AppModel {
I have added an ajax sort to pagination.
script type=text/javascript
$(document).ready(function()
{
$(#bookmarks).tablesorter();
$('a[href*=/sort:]').livequery('click', function(){
$('#testLoad').load($(this).attr('href'));
return false;
});
}
);
/script
So it
This sample should help you
http://www.palivoda.eu/2008/04/i18n-in-cakephp-12-database-content-translation/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to
I need to use my own sql code, because if I use your code for find it
will do 2 queries and it'll take more time.
But thank you for that link, it may be useful for me.
On Aug 17, 2:45 am, brian bally.z...@gmail.com wrote:
Use paginate(). Obviously, that's not the answer you were looking for
URL
http://beta.openaccessinc.com/users
On Aug 17, 3:46 pm, Magua mdm...@gmail.com wrote:
I am now generating the following error when i load users
Warning (512): SQL Error: 1054: Unknown column 'User.organization_id'
in 'on clause' [CORE/cake/libs/model/datasources/dbo_source.php, line
The funny thing is, 2 queries compared to 1 doesn't make a difference.
You have a problem when you are reaching 1000 queries. I honestly
don't see a problem with a few extra queries as it doesn't really
cause a performance problem.
--~--~-~--~~~---~--~~
You
Maybe you're right. But even I can't make silimar cakephp find method
to my own sql code.
For example:
If I use brian's code above I got error: Unknown column
'ItemContent.language_id' in 'where clause'. It's because table
ItemContent is just used at 2. query. And I do not know how to set
Hi,
I am trying to understand how to get internationalization to work in
CakePHP. After reading the docs and searching around, looking at
Teknoid and some other place this is what I am left with.
CakePHP has a class I18n that handles the loading of the correct
string from a .po file based upon
I am currently working on some PayPal, Auction Stuff with cake, but i
did not get any results
On Aug 17, 5:14 pm, Dave Maharaj :: WidePixels.com
d...@widepixels.com wrote:
Has anyone integrated PayPal Pro with cake? Is there anything online that
might be of help?
All I found is standard
It is __(); notice the double underscore.
--
/**
* @author Larry E. Masters
* @var string $userName
* @param string $realName
* @returns string aka PhpNut
* @access public
*/
On Mon, Aug 17, 2009 at 3:52 PM, RhythmicDevil rhythmicde...@gmail.comwrote:
Hi,
I am trying to understand how to
Ok problem solved is that my PHP was not compiled with gettext. So
thats done. The page loads but there is not message being displayed.
On Aug 17, 4:52 pm, RhythmicDevil rhythmicde...@gmail.com wrote:
Hi,
I am trying to understand how to get internationalization to work in
CakePHP. After
Hahaha I am such a dummy. Thanks.
On Aug 17, 4:59 pm, Larry E. Masters aka PhpNut php...@gmail.com
wrote:
It is __(); notice the double underscore.
--
/**
* @author Larry E. Masters
* @var string $userName
* @param string $realName
* @returns string aka PhpNut
* @access public
*/
Thanks Larry, thats the trick.
On Aug 17, 4:59 pm, Larry E. Masters aka PhpNut php...@gmail.com
wrote:
It is __(); notice the double underscore.
--
/**
* @author Larry E. Masters
* @var string $userName
* @param string $realName
* @returns string aka PhpNut
* @access public
*/
On
Hello,
I am having a strange behavior using pagination with Cake 1.2.3.8166 and
Cake 1.2.4.8284
I defined the $paginate variable in the controller as:
var $paginate = array(
'PurchaseOrder' = array(
'limit' = 20,
'conditions' = array('PurchaseOrder.status_id'
Hello everybody!
I have to realize a form with two drop-down lists related.
Let me explain: the first d.d.l. takes its data directly from the
database and the data on the second d.d.l. change depending on the
choice that the user performs on the first d.d.l.
I'd like to do this without make any
Hello there!
Yes, you certainly can do what you want in Cake... but it requires the
use of AJAX. It took me many hours to get this working in my
application and a little frustration. So don't give up.
There are many posts on this group on this topic. Distilling all that
has been written, for my
I get this error when I try to load the scaffold view.
I have tables called artists and comics in the comic database and models
call artist.php and comic.php. i have no idea what I'm doing wrong.
Missing Database Table
Error: Database table artists_comics for model ArtistsComic was not found.
I have a regular baked pagination set to test out why my sort does not work.
table id=bookmarks cellpadding=0 cellspacing=0
thead
tr
th?php echo $paginator-sort('Title');?/th
th?php echo $paginator-sort('Status');?/th
th?php echo $paginator-sort('Note');?/th
th?php echo
I am trying to set up the app so the admin section is in SSL.
So I have the ssl.php component
In my app_controller i have
var $components = array('Auth', 'Acl', 'RequestHandler', 'Cookie', 'Ssl');
in my beforeFilter
$admin = Configure::read('Routing.admin');
if
Dave, Just wondering, what's your interest in the PayPal Pro?
Anders, what about you?
On Aug 17, 4:54 pm, anders als andersa...@googlemail.com wrote:
I am currently working on some PayPal, Auction Stuff with cake, but i
did not get any results
On Aug 17, 5:14 pm, Dave Maharaj ::
You have a HABTM assoc. between those two models so you need to have a
join table named artists_comics. Create that with 2 columns, artist_id
comic_id (note the singular). The type for the columns should match
whatever you're using for artists.id comics.id (though not
auto_increment/serial, of
Heh, normally, having the link wouldn't do much good; you'd need to
provide your find() code. But:
SELECT `User`.`id`, `User`.`type_id`, `User`.`organizations_id`, ...
It looks to me like you created a column named 'organizations_id'
rather than 'organization_id'. The latter is what you want.
Odd. Can you set debug = 2 and post Cake's query?
You don't have any afterFind() stuff happening?
2009/8/17 Jorge Horacio Cué Cantú jorge@gmail.com:
Hello,
I am having a strange behavior using pagination with Cake 1.2.3.8166 and
Cake 1.2.4.8284
I defined the $paginate variable in the
I'm just wondering if anybody has had trouble with the update index in
the options array for ajax-form. According to the docs, it exists,
however I was only able to get an update when I put the update setting
in an options array for ajax-submit.
Check out the docs for the code (I only changed
button got stuck? ;-)
BTW, you shouldn't need to use livequery if you have jquery 1.3+. You
can use live() instead.
http://docs.jquery.com/Events/live#typefn
On Mon, Aug 17, 2009 at 3:58 PM, Dave Maharaj ::
WidePixels.comd...@widepixels.com wrote:
I have added an ajax sort to pagination.
To accept credit cards and have Pay Pal process the transaction behind the
scenes.
Dave
-Original Message-
From: eusef [mailto:johns...@gmail.com]
Sent: August-17-09 10:32 PM
To: CakePHP
Subject: Re: PayPal Website Payments Pro integration
Dave, Just wondering, what's your interest
Thanks. Working now except on my forms the drop-down lists display the
id # instead of the field.
for example the drop down for Organization displays id 3 and id 4
instead of the Organization Name.
Here is all my code:
organization model
?
class organization extends AppModel {
FormHelper will do the right thing if you set a var for the view
holding the Organization names. This is something I've tried--and
failed-- to figure out from the source.
controller:
public function whatever()
{
if (!empty($this-data))
{
// ...
}
Also worth mentioning, if SecFilterScanPOST Off doesn't do it, or
causes new 500 server errors, you can rebuild apache (easily if you
have easyApache!), just be sure to not include the Security Mod module.
--~--~-~--~~~---~--~~
You received this message because you
Hello,
Thanks problem solved!
It was a problem with the PuchaseOrders hasMany Equipment configuration:
1: The PuchaseOrders hasMany Equipment was configured in the belongsTo
part inside the PuchaseOrders model.
2: The foreignKey element in the PuchaseOrder hasMany Equipment was on
a
I am having the same problem and here is the fix that I used:
http://stackoverflow.com/questions/308659/session-not-saving-when-moving-from-ssl-to-non-ssl
Hope that helps you.
On Aug 17, 11:49 am, vb13 val.brod...@gmail.com wrote:
Yes, I am doing this to save a find in a view. You are good
I am trying to set up additional admin routes.
I want to add 'manage' to selected controllers.
So in core.php
Configure::write('Routing.manage', 'manage');
in app_controller beforeFilter
$manage = Configure::read('Routing.manage');
if (isset($this-params[$manage])
84 matches
Mail list logo