Yes I agree with these last 3 answers.
I was imagining comments like in php.net web that show a lot of
different ways to use the code in action so you don't need to go
around searching for all those bits of code here and there on
different blogs...
In this case if comments are needed much better
Thanks for the input
I agree that it sometimes can seem like overkill. However, defining
such things in bootstrap creates a separation that doesn't seem very
elegant to me. I'd rather have the association completely within the
DB. Using an ENUM column within the main table might be
Hi,
Have you outputted the authentication flash message (mostly in layout) using
following code?
echo $session-flash('auth');
You can also set your own error message when login fails, please have a look
at http://book.cakephp.org/view/1272/loginError
Hope this helps.
Amit Badkas
PHP
Hey
I'm very close to launching a new website but this particular bug is very
frustrating.
I have the following:
http://pastie.org/private/pg2yyscxo54vliustpp6ua
I have trouble with is the final step *$this-add_options().*
From the action *add_options() ..*
pr($options); ## Returns an
Okay, I think I've found out why it isn't working - the Javascript in
the Ajax response is coming through surrounded in CDATA tags, which is
why it's getting stripped.
I can't remember if JS has always come back in CDATA tags because like
I said, it was working at one point, which would indicate
hi,
i m on one script where i want to store data of one variable in to the
file by creating in in script itself.
i have collected data as fallows in $stateJs variable.
?php
class CitiesController extends AppController{
var $name = 'Cities';
var $helper = array('html' ,'form');
Ah I have solved this now.
Because I was using some actions for edit and create (create is ajax only,
edit starts with everything loaded then ajax).
After tracing things around I found another instance of $this-render I
didn't realise was being called.
Whoops.
On 25 January 2011 10:12, Stephen
Hi group,
can any one tell me about .htaccess expiry for 1 month.
should it works for js,images and css.
With Best Regards,
AviSingh RAJPUT
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and
Can anyone help with this ?
Steve
On Sun, 2011-01-23 at 15:22 +, Steve wrote:
I have a database with the following tables.
book - Holds id, title, description, publisher ...
author - Holds id, name
books_author - Holds id, book_id, author_id
So a many-to-many relationship on the
Hello, I'm new to cake php but i know a bit bout basic php.. I
understand the MVC concept i think^^, i need to change the whole
appearance and layout of a site powered by cakePhp..where can i find
the file that controls the structure and appearance of the pages and
how?? Sorry for my noobness.. tq
Hi;
I am not expert in php and trying to make a php script for making
random user names from a list of first names in a text file and write
it to a new text file, I got some simple php code but I am not sure
how to proceed,
I am very grateful if anyone can help here.,
I have a list of first
Start here: http://book.cakephp.org/view/1078/Views.
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.classoutfit.com
On 25 Jan 2011, at 00:16, Kid wrote:
Hello, I'm new to cake php but i know a bit bout basic php.. I
understand the MVC concept i think^^, i need to change the
hi kid,
u wont be kid for longer, don't worry.
now first u need to find out the layout.
the layout is created by default.ctp
the path is as fallows
cakephp/app/view/layout/default.ctp
hope u r using cakephp 1.3.
there u will get every aspect of layout. go and try.
hope u got it.
On Jan 25, 5:16
Hello, I'm new to cake php but i know a bit bout basic php.. I
understand the MVC concept i think^^, i need to change the whole
appearance and layout of a site powered by cakePhp..where can i find
the file that controls the structure and appearance of the pages and
how?? Sorry for my
hi,
first thing is u r very much confusing about ur sayings. do seprate
the things u want to do, rather to to solve entire problem at a time,
u need to devide it and then go step by step.
second thing in ur code u have forgot to close curly braes. take a
look of it.
now post the ur issue once
The default one is in cake/libs/views/layouts/default.ctp
copy that to app/views/layouts where you can modify it to be as you
wish.
you can also add your own layouts and specify which is used through the
controller.
On Mon, 2011-01-24 at 16:16 -0800, Kid wrote:
Hello, I'm new to cake php but
aren't the models related? If so a find 'all' call would do the work ..
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe
Hello everyone,
this issue ...
I have an autocomplete text field that displays the field
codice but i would assign the value cod_mezzi.
I state that the table does not use conventional names.
These lines that I wrote.
model mean.php
?php
class mean extends AppModel
{
var $name = 'mean';
var
foreach ($lines as $line)
$lines is not even defined? omg!?
php has nothing to do with magic (although some say it is automagic^^)
On 25 Jan., 13:21, andy_the ultimate baker
anandghaywankar...@gmail.com wrote:
hi,
first thing is u r very much confusing about ur sayings. do seprate
the
i meant cakephp^^ not php
On 25 Jan., 13:21, andy_the ultimate baker
anandghaywankar...@gmail.com wrote:
hi,
first thing is u r very much confusing about ur sayings. do seprate
the things u want to do, rather to to solve entire problem at a time,
u need to devide it and then go step by step.
Maybe we can use a search engine like SphinxSearch, Solr, ZendLucene.
On Tue, Jan 25, 2011 at 1:22 PM, Steve step...@foundfamily.co.uk wrote:
Can anyone help with this ?
Steve
On Sun, 2011-01-23 at 15:22 +, Steve wrote:
I have a database with the following tables.
book - Holds
Maybe you can use a search engine like SphinxSearch, Solr, ZendLucene.
On Tue, Jan 25, 2011 at 3:26 PM, Vivi Vivi vivianbog...@gmail.com wrote:
Maybe we can use a search engine like SphinxSearch, Solr, ZendLucene.
On Tue, Jan 25, 2011 at 1:22 PM, Steve step...@foundfamily.co.uk wrote:
Can
I have solved this by overriding the paginate and paginateCount methods
in my Book model.
/**
* Overridden paginate
*/
function paginate($conditions, $fields, $order, $limit, $page = 1,
$recursive = null, $extra = array()) {
if( $this-searchCategories){
$this-bindModel(array('hasOne' =
Hello,
I'm on CakePHP 1.3 stable and have a routing problem for which I
haven't been able to figure a solution out (read through the docs,
googled for it, searched the group).
What I'm trying to achieve is have all pages referred to as site.com/
page-slug - except for some cases (such as product
I am amazed by how comment boxes work.Am making a web site using php
and would like visitors to live a comment.How do i store this comments
into the database Mysql and retreive them so that i can know the
number of comments left by the visitors.Any assistance?
--
Our newest site for the
Thanks for your information.
It is absolutely helpful for me.
Best regards.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To
Yeah. my mistake.
The post I referred also was saying user(id). :D
Thanks for your kind reply. Raymond.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP
Hey everybody
When having DEBUG set to 2 (or 1), my sweet little error500 is shown
correctly.
SomeController extends AppController {
function _error500() {
$this-cakeError('error500');
exit;
}
}
But when it's set to 0, then I'm just getting a plain Error: The
I think you need to provide a appError class. The default code turns off
the error routing when you disable DEBUG ( set it to 0 ) so it looks for
a URL which your server is correctly reporting the absence of.
http://book.cakephp.org/view/154/Error-Handling
On Tue, 2011-01-25 at 08:21 -0800,
@euromark - what a cool solution. I struggles with this same question
and I think you hit on a great alternative.
Ken
On Jan 24, 7:27 pm, euromark dereurom...@googlemail.com wrote:
you might wanna
try:http://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-at...
On 25 Jan.,
I'm developing an app in 1.3x and I'm trying to find the best way to
paginate the results in an index-like view.
So far I have:
$large = $this-Proposal-find('all',
array('conditions'=array('project_type_id' = 2)));
$this-set('large', $this-paginate());
in the controller.
In the view, I'm
as i wrote at the end
as long as you don't use lazyloading for models
this is a great way of doing it
with lazyloading you either need to App::import() the model before
using its constants or static functions (which works for me right now)
or PHP 5.3.3 and some new magic static functions
If
Pagination works through the model, not through query results...
Try:
$this-paginate = array('conditions'=array('project_type_id' = 2)));
$this-set('large', $this-paginate('Proposal'));
On Tue, 2011-01-25 at 10:06 -0800, butterlamb wrote:
I'm developing an app in 1.3x and I'm trying to find
Thanks! That worked quite well. I appreciate your help and quick response.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe
No they are not related. User hasMany ModelA
User hasMany ModelB
But A and B are not related to each other.
From: huoxito [mailto:huox...@gmail.com]
Sent: Tuesday, January 25, 2011 9:39 AM
To: cake-php@googlegroups.com
Subject: Re: Paginate 2 models data as 1
aren't the models
Does anyone have any ideas for how to connect to a remote database via SSH?
It's a development thing so that people working remotely can develop against
the same database hosted on our virtual server.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check
On Tue, Jan 25, 2011 at 9:00 AM, Steve step...@foundfamily.co.uk wrote:
I have solved this by overriding the paginate and paginateCount methods
in my Book model.
Instead of that, you could use Containable.
And you don't need to have the else block in the index action. Declare
$paginate as a
On Tue, Jan 25, 2011 at 5:21 AM, andy_the ultimate baker
anandghaywankar...@gmail.com wrote:
hi,
i m on one script where i want to store data of one variable in to the
file by creating in in script itself.
i have collected data as fallows in $stateJs variable.
?php
class CitiesController
I've decided to use your method euromark, it seems pretty well thought out,
I must admit the only pet peeve I have with this is having to define the
constants in my model.
I'm talking about 20 protential enum fields.
Having 20 sets of *const FIELD_VALUE = 0; *etc, it could create many lines
in
what RDBMS??? What OS???
2011/1/25 Jeremy Burns jeremybu...@classoutfit.com:
Does anyone have any ideas for how to connect to a remote database via SSH?
It's a development thing so that people working remotely can develop against
the same database hosted on our virtual server.
--
Our newest
Linux. Apache. MySQL.
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.classoutfit.com
On 25 Jan 2011, at 20:03, Moises Alberto Lindo Gutarra wrote:
what RDBMS??? What OS???
2011/1/25 Jeremy Burns jeremybu...@classoutfit.com:
Does anyone have any ideas for how to connect
For any of you who have been looking for a search plugin in CakePHP, CakePHP
DC has released that and a video has been created it about it (video is NOT
from CakePHP DC), but I had my search form working up and running within an
hour!
Hope it helps!
Here is the link:
You should upload your video to http://tv.cakephp.org you know there is a
contest for the initial launch?
http://tv.cakephp.org/launch-competition
--
Larry E. Masters
On Tue, Jan 25, 2011 at 2:41 PM, OldWest jason.wy...@gmail.com wrote:
For any of you who have been looking for a search
Oh and another thing, it is CakeDC (Cake Development Corporation)
Not CakePHP DC :)
--
Larry E. Masters
On Tue, Jan 25, 2011 at 2:41 PM, OldWest jason.wy...@gmail.com wrote:
For any of you who have been looking for a search plugin in CakePHP,
CakePHP DC has released that and a video has
On Tue, Jan 25, 2011 at 5:17 AM, Rory rygilchr...@gmail.com wrote:
I can't remember if JS has always come back in CDATA tags because like
I said, it was working at one point, which would indicate JS wasn't
coming back within CDATA tags.
If you can't remember whether it was wrapped in CDATA,
Hi Cricket...
Could you describe what you mean in more detail ? I have not used
Containable before
On Tue, 2011-01-25 at 14:35 -0500, cricket wrote:
On Tue, Jan 25, 2011 at 9:00 AM, Steve step...@foundfamily.co.uk wrote:
I have solved this by overriding the paginate and paginateCount methods
Hi Larry,
It's a privilege to hear from you :-) Had no idea about the contest. But I
will certainly put it up there! : ) Thanks a lot. I plan on creating more
tuts with this plugin.
And sorry about the name! I corrected it in the youtube details to CakeDC
and will make a sub-note in the video
Cool this is just one of the new things the CakePHP team did for the
community this year. Expect to see a lot more coming not only with CakePHP
code releases, but also with tools for the community.
I took a quick look @ the video will watch it in full later. Upload your
other CakePHP related
Having just found this... you are right it is exactly what I need.
Thanks for this pointer.
As for my code... I have spent the day tidying it up as each book has 2
many to many relationships ( Categories and Authors ) so it was getting
in a mess.
On Tue, 2011-01-25 at 14:35 -0500, cricket
Security as in secure not the Security component to not confuse anyone.
Is it better / more secure / better practise to have a table with password
information only ,with fields like user_id, reset_token, question, answer,
password, email, attempts and keep plain text (firstname, lastname, so
Why do you think this be more secure?
--
Larry E. Masters
On Tue, Jan 25, 2011 at 3:13 PM, Dave Maharaj m...@davemaharaj.com wrote:
Security as in secure not the Security component to not confuse anyone.
Is it better / more secure / better practise to have a table with
“password”
Hello,
Will cake2 have any sort of automatic table schema creation and
management?
I have been using grails for a bit and it has an orm built in that
creates and manages table schemas.
So to create a table for people i create a class: People and add
properties for firstName, lastName, etc... and
Hi Larry,
It's a privilege to hear from you :-) Had no idea about the contest. But I
will certainly put it up there! : ) Thanks a lot. I plan on creating more
tuts with this plugin.
And sorry about the name! I am going to put a few sub-titles on the video
and I'll note the correct spelling.
Thanks. Look forward to seeing what's to come. If you're ever looking for a
volunteer screen caster (unfortunately I only speak English), I would be
glad to try to create them on the CakeDC site or CakePHP site.
--
Our newest site for the community: CakePHP Video Tutorials
I do not think if it is or is not.hence the question.
From: Larry E. Masters [mailto:php...@gmail.com]
Sent: Tuesday, January 25, 2011 5:49 PM
To: cake-php@googlegroups.com
Subject: Re: Security question
Why do you think this be more secure?
--
Larry E. Masters
On Tue, Jan 25,
There is no benefit to doing this.
--
Larry E. Masters
On Tue, Jan 25, 2011 at 3:23 PM, Dave Maharaj m...@davemaharaj.com wrote:
I do not think if it is or is not…hence the question.
*From:* Larry E. Masters [mailto:php...@gmail.com]
*Sent:* Tuesday, January 25, 2011 5:49 PM
*To:*
That is good, I only understand English :)
No worries on that though, we will have a new feature soon that will help
get the message of the tutorial across no matter what the language is.
--
Larry E. Masters
On Tue, Jan 25, 2011 at 3:22 PM, OldWest jason.wy...@gmail.com wrote:
Thanks. Look
Thanks. That's all I needed to know J
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
Welcome. You might want to look at this plugin on github too, it might save
you some time.
https://github.com/CakeDC/users
--
Larry E. Masters
On Tue, Jan 25, 2011 at 3:32 PM, Dave Maharaj m...@davemaharaj.com wrote:
Thanks. That’s all I needed to know J
--
Our newest site for the
: ) .. Looking forward to that feature. This is such a new era of
development with a framework like this. No offense to the ruby and rails
devs, but CakePHP is where its at. Convert now or take the path of Perl ; )
- Ok that was politically incorrect but it is what it is : ) Perl was one of
my
I think a lot of us old timers started with Perl, CGI and many of the
other pre PHP languages which BTW, was just a wrapper to Perl right before I
started using it :)
--
Larry E. Masters
On Tue, Jan 25, 2011 at 3:38 PM, OldWest jason.wy...@gmail.com wrote:
: ) .. Looking forward to that
Yup. Larry Wall was a genius for creating Perl. And in my opinion it truly
was the first programming language for the web - it really changed the web
in every way shape and form. Created a job for all of us : )
--
Our newest site for the community: CakePHP Video Tutorials
actually it is no overhead at all - compared to boostrap where it
would be loaded every time (even if the model is not needed at all).
but even there it does not hurt.
the main reason why this SHOULD be in the model (and as class
constants) is that it belongs to it
and you can address it with
No. Cake has always taken the approach of basing the models off the
schema, not the other way around. This is not planned to change for
2.0.
-Mark
On Jan 25, 2:56 pm, maxarbos maxar...@yahoo.com wrote:
Hello,
Will cake2 have any sort of automatic table schema creation and
management?
I
On Tue, Jan 25, 2011 at 5:51 PM, euromark dereurom...@googlemail.com wrote:
actually it is no overhead at all - compared to boostrap where it
would be loaded every time (even if the model is not needed at all).
but even there it does not hurt.
the main reason why this SHOULD be in the model
I have a site with 2 databases (same server)
1. Being resources_db (data that never changes, Country, States,
various selects and options to select from throughout the site)
2. default_db users, profiles, things that can be changed, edited by
users.
Now join tables happen to
I have made join_table models for ones that did not have any and set the db
to use for the join_models that I had existing, but no matter what even
when specified to use
var $useDbConfig = 'default';
or
var $useDbConfig = 'resources'; it will not find the table.
Cleared cache. Both
Hi Larry,
I have tried to upload my video 4-5 times. I maxed my browser timeout and
tried several other things. My video is 1/2gb, so it's within the correct
size params. Maybe I am doing something wrong? Thanks for any tips on why it
might not be working for me : )
--
Our newest site for
Not sure if this is exactly what you had in mind, but...
If you have a local work server with a local router which you can open up a port on you can use a SSH tunnel on your local work server to forward that port to a remote VPN or remote server which has its ports locked down but accessible to
Thanks - I was hoping that someone could suggest a database.php setting that
would make the connection.
Jeremy Burns
Class Outfit
jeremybu...@classoutfit.com
http://www.classoutfit.com
On 26 Jan 2011, at 05:01, bdwilton wrote:
Not sure if this is exactly what you had in mind, but...
If
1. You need port 22 and 3306 to be open on the remote server
2. Install mysql workbench
3. In the new connection form set the connection method to tcp over ssh.
4. If you are using terminal and not GUI use ssh tunnel.
And you may find more info here:
No matter what table is missing.
Database has table categories_posts
I have a categories_post.php
?php class CategoriesPost extends AppModel {
public $name = 'CategoriesPost';
public $useDbConfig = 'default';
I don't think I am explaining myself clearly. I am connecting to the database
fine (using Sequel Pro). That is not my problem.
I want to get my local instance of a CakePHP application to connect to a remote
database via SSH, so need to have the right configuration in database.php.
That's where
So would the model be automatically be built with the correct
properties and types by telling it which table to read from?
If I just have to setup the tables, that would work too, but what I
dont want is to have to maintain a model as well as a table structure
independently.
On Jan 25, 7:02 pm,
edit /etc/ssh/sshd_config on your local machine
Add:
AllowTcpForwarding yes
GatewayPorts yes
restart sshd
Edit my.cnf on remote machine.
Uncomment the following line.
bind-address = 127.0.0.1
restart mysql
On you local machine run the following command
ssh -i e-keypair -f
75 matches
Mail list logo