Thanks Brian! I realize nobody is paid. Yes there is frustration and
desperation at times. I do know how to live with it and continue to
forge ahead.
Indeed I was treating check() incorrectly. I read the entry in
book.cakephp.org about six times until it finally sunk in. Once you
understand what
Suppose that you have any validation, in your saveAll, you have to
chance your this->data. First, if you used save, the correct is save
($this->data), and not $this->data['Recipe']. As you are using
saveAll, your this->data must have similar to this below
$this->data = array(
0 => array(Recipe
Yes. You can retrieve data using this variable $_SESSION
use debug($_SESSION) and you'll see that the info will be there, more
especifically $_SESSION['Auth']
On 3 ago, 20:39, DigitalDude wrote:
> Hey,
>
> for a little validation-function in my model I need to get the data
> from the logged-in
Nobody on this list is being paid to answer anyone's questions. We've
all been there before where our desperate queries have gone ignored.
Learn to live with it. In the meantime, maybe you should give this a
read:
http://catb.org/esr/faqs/smart-questions.html
But back to your problem, you're tre
Controller::set(), as you can see, adds a variable with the supplied
name & value to the $viewVars array which, in turn, is made available
to the View object. However, you're not creating a *local* variable
with the given name & value. For that, you'd need to first asign it to
a variable, then use
function catfun($id = null) {
$this->set('cats', $this->Cat->find('all'));
$this->Cat->cat_id = $id;
$this->set('cats', $this->Cat->read());
}
You're setting a variable $cats twice here.
On Fri, Aug 7, 2009 at 5:59 AM, kishore chatna wrote:
I'm not sure that I understand your question. But you can call the
model's function directly from the controller.
On Fri, Aug 7, 2009 at 4:42 PM, leafchild wrote:
>
> Thanks, brian. but can I associate with my validation macadamized
> function?
>
> so if set validation in Size model:
>
>
Check the permissions for the directory. The webserver has to have
write access to the dir.
On Fri, Aug 7, 2009 at 4:02 PM, leafchild wrote:
>
> I'm trying to make this plugin(http://www.milesj.me/resources/script/
> uploader-plugin) works.
>
> However, after I install I'm getting an error - Warn
Are you using FormHelper to create your form elements? If you do, for example:
echo $form->input('Post')
... the helper will add the value of the element based upon $this->data.
If you are using the helper, maybe you should post your controller and
view code.
On Fri, Aug 7, 2009 at 6:56 PM, le
On Thu, Aug 6, 2009 at 1:12 PM, Vincent wrote:
>
> I got a problem with SQLite3:
> Warning (2): sqlite_query() [function.sqlite-query]: file is encrypted
> or is not a database [CORE/cake/libs/model/datasources/dbo/
> dbo_sqlite.php, line 133]
>
> This is my configuration file:
> class DATABASE_CO
as soon as you post the data, you dont need the /id anymore
it is "hidden" in the form and gets passed on each submit
if you "need" it in your url for some reason, dont use
"action"=>"edit", but "url"=>"/".$this->params['url]['url']
on creating the form
now it will stick to the url
On 8 Aug., 0
URL some page .../id disappeared ?
I have site there are different form pages to organize products.
Some form page such as admin_edit page - URL: ... admin/product/edit/
1
After I submit URL still same either there is an error or not.
However, some form page lose id from URL after submit,
and
Like a charm! Added parent::beforeFilter(); to all my controllers and
it works as expected.
Thanks a lot.
On 7 Aug, 20:12, Josh wrote:
> My problem was that I had removed the parent::beforeFilter();
> statement from my controllers. It seems like the section of the
> Cookbook where it says to in
I have a page with form.
If user entered name, address,,,and ,all kinds of information and
submit but there is mistakes such as not entered email
properly and came back to form page with error message. How can I keep
the entered value user entered properly.
Currently in my form page, if user has
I agree with Miles - 'the' book (book.cakephp.org) is the best
resource. Print it out if you must. Beware that most of the third-
party CakePHP books out there pale in comparison.
- Jamie
On Aug 7, 7:41 am, vtbludgeon wrote:
> Hello
>
> Cake noob here, but I have no fear of PHP/MySQL and some e
Never mind. So far two posts... ZERO answers... I kept banging on it
and fixed it.
Instead of using ($session->check...), which now I learned returns
true or false, I am now using ($session->read...) which works well.
I guess I have to figure out the right combination of things to put
into a pos
Sometimes I hit myself with a small, embarrassing clue stick
immediately after posting.
I thought I had tried using $this->viewVars['whatever' ] in my find
conditions and that it just didn't work.
But I just tried that little test of:
$this->set('menu_link', "/budgets" );
$this->set('menu_n
Background: i am trying to build a little database-driven 2-level
menu system that checks authorization to access menu pages and actions
*before* they are displayed. If you are not authorized to use the
"budgets" table in any way, you won't be presented with a "budgets"
menus option (I am using
It turns out there were 2 problems and there are two minor ongoing
issues. For anybody setting up the cake shell on godaddy to run as a
cron job, here is a description of my own issues:
First: The "line12: cake: command not found" was cause because
cakeshell couldn't find the cake bash file. I ch
Personally, the docs are the only way to go. There are some CakePHP
books but they are either outdated or poorly written.
On Aug 7, 7:41 am, vtbludgeon wrote:
> Hello
>
> Cake noob here, but I have no fear of PHP/MySQL and some experience
> with Zend Framework. I want to do a project with typica
So what exactly are we looking at here? Where is the problem?
--~--~-~--~~~---~--~~
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
>adam,
I know it's array and if you see my first post I had set array
already.
>Miles J
Thanks, Miles J
OK, I try to use $form->input()
Probably if i use $form->input() then if there is error the info user
enter is still there?
except the one invalid value??
I've been using $form->text style and
Thanks, brian. but can I associate with my validation macadamized
function?
so if set validation in Size model:
=
...
'size_name' => array(
'namechk'=>array(
'rule'=>array(
I'm trying to make this plugin(http://www.milesj.me/resources/script/
uploader-plugin) works.
However, after I install I'm getting an error - Warning (2): mkdir()
[function.mkdir]: Permission denied [CORE/cake/libs/folder.php, line
466]
Actually I tried another behavior to upload file and got sam
And some more
http://en.wikipedia.org/wiki/Ctags
*On Thu, Aug 06, 2009 at 04:44:18PM -0400 Jon Molesa wrote:
> Date: Thu, 6 Aug 2009 16:44:18 -0400
> From: Jon Molesa
> Subject: Re: CakePHP Editor/IDE
> To: cake-php@googlegroups.com
>
>
> I get code completion in Vim with ctags-exuberant. I
A list of editors and tools supporting ctags
http://ctags.sourceforge.net/tools.html
*On Thu, Aug 06, 2009 at 04:44:18PM -0400 Jon Molesa wrote:
> Date: Thu, 6 Aug 2009 16:44:18 -0400
> From: Jon Molesa
> Subject: Re: CakePHP Editor/IDE
> To: cake-php@googlegroups.com
>
>
> I get code comple
My problem was that I had removed the parent::beforeFilter();
statement from my controllers. It seems like the section of the
Cookbook where it says to insert this line might lead you to believe
that you only need it when using $this->Auth->allowedActions. In fact,
this is the only way to assure t
Hello everyone!
I've been trying to make a simple site using Acl/Auth. Everything is going
fine, except that I don't quite understand the differences between the 4
kinds of 'authorizes', nor how to implement them.
For example, I don't understand how can I use the AclComponent::check() to
authen
Hello everyone!
I've been trying to make a simple site using Acl/Auth. Everything is going
fine, except that I don't quite understand the differences between the 4
kinds of 'authorizes', nor how to implement them.
For example, I don't understand how can I use the AclComponent::check() to
authen
Hi,
(Sorry, meant to reply to the group)
Have you had any joy with this issue? I am struggling with exactly the
same problem you have described.
Cheers
On Aug 3, 5:53 am, Josh wrote:
> Hello,
>
> I have been working on an app for quite a while now, and I have just
> noticed that myACLdoesn't
I am in a quandary as to what is wrong with this code:
check('Auth.User.group_id') == 1):
?>
link(__
('distributors',true),''.'/'.'distributors'); ?>
link(__('dealers
well i didn't want to do it this way but
in my bootstrap:
define('SEO_SEPERATOR', '_');
now in my links:
$html->link('mylink', array('controller'=>'mycontroler',
'action'=>'myaction', 'sid'=>$sid, 'slug'=>$slug . SEO_SEPERATOR));
in my router
connect('/:slug:sid/*, etc etc')
this works for ri
ok this is driving me nuts now. basically if i put an underscore after
the parameter e.x :slug_
cake is expecting to find a match on 'slug_' not 'slug' as i want. if
i put an underscore before slug ex _:slug it works fine.
it appears underscore doesn't work as a variable delimiter.
On Aug 6, 2:03
I have read through the Cookbook, searched on the Bakery and read Mark
Story's two blog postings about testing controllers. I am primarily a
Rails developer, so there is certainly some bias here, but: either I
am missing something or controller testing is far more complicated
with Cake than it sho
I'm setting up paypal and have everything running fine except for one
last thing which is encrypting the form that is sent to PayPal. I have
this setup with no problems on a server not running cakephp, but when
I try to set it up while running Cakephp it just wont access the files
it needs. It us
Hi,
i am getting this error while calling the function
my db table
--
CREATE TABLE IF NOT EXISTS `cats` (
`cat_id` int(11) NOT NULL AUTO_INCREMENT,
`cat_name` varchar(150) NOT NULL,
PRIMARY KEY (`cat_id`)
)
SUHOSIN and swfupload gave me nightmares
http://www.hardened-php.net/suhosin/index.html
On Aug 6, 9:38 pm, Robert McWay wrote:
> Also..the swf upload settings in my view might help also:
>
> link(array('swfupload/swfupload', 'swfupload/plugins/
> swfupload.queue', 'swfupload/fileprogress', 'swfu
I need a opensource simple cms plugin to use in my tutor application,
is there any one who has used cms as plugin to cake.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send
The certificate *.cakephp.org has expired! Just for anyone wondering,
it's still safe to go there! Firefox get's a little over cautious on
expired certs.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" grou
i'm use komodo
it's nice to me..and work well for cakephp
--~--~-~--~~~---~--~~
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,
It's a quick and dirty solution that worked for me. Saved me alot of
time. Until it's fixed in the build, I'm okay with this...
On Jul 12, 12:31 am, 10drill wrote:
> I've just upgraded PHP to 5.3.0 on my development server and found all
> of my Cake sites have about 20 warning messages startin
Hi,
I have a form to add recipes to a database. I have got a HABTM
Relationship and a hasMany.
recipe HABTM subcategories
recipe hasMany ingredients
In my controller I using the following:
$this->Recipe->saveAll($this->data['Recipe'])
This updates my Recipe table with the HABTM Relationship.
Cool. I thought URLs should map to the view name ie. users/view_list,
but if they map to the controller action then it works for me.
I'm still getting my head around the naming conventions - takes a bit
of getting used to.
Thanks
On Aug 7, 2:50 pm, Jamie wrote:
> Are you going to the URL "/use
well ok
serializing/unseriazing is still different than implode/explode
both are not very handy though
implode could be better if you want to search your in your "pseudo
array" with LIKE %{...}%
serializing if you dont want to do anything expect then saving/reading
hasMany or even HABTM as Robe
i wouldn't say that vijay was incorrect - he ment the same thing, just
didn't express it as clear as you, miles :)
either way it is way cleaner to normalize the database - this way you
have more control over the multiple choices
and if you delete one "choice", you can make sure it is not related
Hello
Cake noob here, but I have no fear of PHP/MySQL and some experience
with Zend Framework. I want to do a project with typical stuff: CRUD
with relational db data, authentication and simple user-group-based
access control, ajax. What book do you like? (Yes the online docs and
toots are fine b
You should save each separately. Set up your association as HABTM.
Event model:
public $hasAndBelongsToMany = array(
'Tag' => array(
'className'=> 'Tag',
'joinTable'=> 'events_tags',
'foreignKey' => 'event_id',
'as
I think there is a way to do this, but it is escaping me ..
I have two tables: entries and votes
Users vote on entry, which are stored inside table "votes" like:
id entry_idip
1 2 129.192.12.4
2 1 129.192.12.4
3 2
In AppController::beforeFilter()
$this->Auth->logoutRedirect = array('controller' => 'pages', 'action'
=> 'display', 'home);
Or 'index', or whatever points to your default page.
On Thu, Aug 6, 2009 at 1:40 PM, FrederickD wrote:
>
> Would you show me how you put the element to log in on the side
Why would you not want a primary key, even if just to make saving and
deleting easier? In my opinion, the lack of a primary key in a
database table just makes things harder to deal with, without many (if
any) benefits.
- Jamie
On Aug 6, 5:05 pm, gjofum wrote:
> I can set up primaryKey in model
Are you going to the URL "/users/viewList" or "/users/view_list"?
Basically, given these conditions:
- controller action is 'Users::ViewList()'
- view file is 'view_list.ctp'
the URL will be: users/viewList
The code engine will look for the view file in underscored form, but
the resulting URL
Can you supply the schema of the table in question?
On Aug 7, 2:40 am, gjofum wrote:
> You're right.
> But I merge 2 tables (in db) together, because retrieving data will be
> more faster (now i can join only 2 tables, but before I had to join 3
> tables, so it's much faster. I will query from t
Hi Vijay,
Thanks for your reply. Are you suggesting I use "function viewlist()"
in my controller?
I was following the convention at:
http://book.cakephp.org/view/26/View-Conventions
or more specifically:
"View template files are named after the controller functions they
display, in an underscor
Hi Mateo;
It's true - getting your head around Acl takes some time, but if I may
say so - you're probably overthinking the problem. My experience was
that it is conceptually simpler than I had imagined, but more
complicated to implement than I hoped... if that makes sense! So I
suggest you actuall
OK, I made it...
one point that did not work:
if the physical view-name differs from the generated model:pluralized-
name it does NOT SEEM to work.
I had a view called search, model-name was RegSearch
setting $useTable = "search" did not work, after renaming the view to
searches everything worke
Hi,
is there a way to specify which db connection the console uses to
connect to the db?
Regards,
cronet
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php
Hey all,
I would like to use a database-view instead of a table for a certain
model in my application.
the $useTable = #viewname# does not seem to work...an error is thrown
telling me that the table could not be found
background:
the view collects data from accross 6-7 tables together and i woul
Right on
That’s the idea I was looking for.
Thanks.
Dave
-Original Message-
From: Jamie [mailto:jamie@gmail.com]
Sent: August-07-09 2:57 AM
To: CakePHP
Subject: Re: Curious how to question
Try something like this (assuming you're using the standard array
conventions for you
Hi tt;
How long are these strings? What datatype are you using to store these
strings in the db? b.t.w. the links in your post to the examples don't
appear to go anywhere useful... :(
On Aug 6, 8:23 pm, technicaltitch wrote:
> Dear all,
>
> Please I'm desperate - if you had a simple CakePHP app,
Maybe this? http://swfupload.org/forum/generaldiscussion/176
On Aug 6, 3:38 pm, Robert McWay wrote:
> Also..the swf upload settings in my view might help also:
>
> link(array('swfupload/swfupload', 'swfupload/plugins/
> swfupload.queue', 'swfupload/fileprogress', 'swfupload/handlers')) ?>
>
>
You're right.
But I merge 2 tables (in db) together, because retrieving data will be
more faster (now i can join only 2 tables, but before I had to join 3
tables, so it's much faster. I will query from this table every page,
so speed is more important than saving data for me.)
That's why I have id
On 7 ago, 11:15, albe wrote:
> I have found a solution in this way:
>
> $post['Post']['haswarnings'] = count($this->Warning->query("SELECT *
> FROM `db`.`warnings` WHERE `post_id` ='".$post_id."'"));
>
> Thank you, anyhow!
>
For that you'd use ->find('count', array('conditions' =>
$conditions
The Cakebook?
http://thechaw.com/cakebook
El 07/08/2009, a las 11:12, leop escribió:
> Does anyone know of a knowledge base / wiki application built with
> Cake?
---
Fran Iglesias
http://cakephpilia.blogspot.com
--~--~-~--~~~---~--~~
You received this message
Yep, my mistake. what I meant when I asked was...
Does anyone know of a knowledge base / wiki application built with
Cake?
On Aug 6, 12:00 am, Miles J wrote:
> What your asking for seems more like a full blown plugin, not a
> component.
>
> I for one havent heard of anything like your asking.
--
I have found a solution in this way:
$post['Post']['haswarnings'] = count($this->Warning->query("SELECT *
FROM `db`.`warnings` WHERE `post_id` ='".$post_id."'"));
Thank you, anyhow!
On 7 Ago, 01:32, albe wrote:
> Hi everybody!
> maybe my problem is banal but I really don't know how to solve i
Thanks for the reply Vijay.
The problem is, when the form with the large file is submitted, the
code in the controller is not executed. This only happens when the
file is larger than the post_max_size, if the file is equal or smaller
than the post_max_size, I can handle the data pretty well.
Tha
return $result[0][0];
Thats the only way to fix what your doing, thats how cakes built.
--~--~-~--~~~---~--~~
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
The matter is a view of a forum site that has to show an alert for
every post that has been warned by one or more user.
I have a "posts" table and a "warnings" table. The warning table
contains (*user_id,*post_id,reason)
When the view shows all the posts of a discussion I want them to have
an aler
Thanks everyone. I have deduced that it is to do with $title being
some sort of reserved word in CakePHP. If I change the table name to
(e.g.) salutations and recreate the M/V/Cs it works fine. The reason
that only the 'view' view failed is that is references $title, while
the other views referenc
$title is a special variabe and it is used to set the page title. This
took me a long time to figure out. Also, if you set variables with
underscored, they don't end up in your views (they are available in
camelCased format). I hope that this will change soon!
On Aug 6, 6:22 pm, jburns wrote:
>
Thanks euromark,
You are right. The problem wasn't the cache. Te problem was that I was
editing the po files directily with netBeans, my editor and when you
save from the editor, the changes don't save. I had to make it from
the poEdit. Now everything is working fine.
On 6 ago, 23:07, "euromark (
Can you just use find('count',$params)?
Mike Karthauser
Brightstorm limited
Tel: 07939252144
On 7 Aug 2009, at 00:32, albe wrote:
>
> Hi everybody!
> maybe my problem is banal but I really don't know how to solve it:
>
> I wrote a query in a controller and put the result in a variable, in
> th
72 matches
Mail list logo