You can do this:
$data = array($model-alias = array('x' = $y 'filename' =
array(..)));
$this-MyModel-save($data);
var $actsAs = array(
'ImageUpload' = array(
'fileFormat'= '{$x}/{$filename}',
)
);
Maybe an example will be great.
Scaffold is wonderfuland cake is very flexible (gymnast :D) framework ;)
I suggest to exclude field with beforeRender (controller) + array_diff:
//example to exclude created modified
function beforeRender(){
if ($this-action=='index'){
In views i can use smarty or fasttemplate or any other template
language but i'm not quite atracted about any of them
http://www.qadram.com/vcl4php/docwiki/index.php/Component_Writer%27s_Guide_::_Template_Engines
I wonder what if i use no template engine at all and keep the html
separated and
and btw you know you arent restricted to create read update delete ?
you can add your own fields like _admin to the db table and use it too
/me goes to update the book
--
Marcin Domanski
http://kabturek.info
On Wed, Sep 3, 2008 at 1:47 AM, Juan Luis Baptiste
[EMAIL PROTECTED] wrote:
Hi
Looking to the tutorial Jonathan Snook's camps it shows how to create
simple type of text, checkbox and textarea, but does not explain how
to create a field directly select the type of model.
I wanted a way to enter something like:
class Contact extends AppModel {
var $useTable = false;
Hi all,
I want to build the change password form that has username,old
password, new password and retype new password as input fields. I have
a link called change password. when I click the change password link.
the form should open in edit mode ie. username should be shown but it
doesn't
cake has a built-in template system . . . .why change it? Seems like
more work if you're using the framework anyways.
On Sep 3, 4:54 am, mariuz [EMAIL PROTECTED] wrote:
In views i can use smarty or fasttemplate or any other template
language but i'm not quite atracted about any of
if you are new in cakephp it's better to start reading from book.cacephp.org
On Wed, Sep 3, 2008 at 12:15 PM, saumya [EMAIL PROTECTED] wrote:
Hi,
I am pretty new here.I am going to work in Flex and PHP in my new
project. So thinking of using CakePHP and making webservices out of it
to be
You can do this:
$data = array($model-alias = array('x' = $y 'filename' =
array(..)));
$this-MyModel-save($data);
var $actsAs = array(
'ImageUpload' = array(
'fileFormat'= '{$x}/{$filename}',
)
);
Maybe an example will be great.
I am trying to create a search function for my site in which tags
(HABTM) is searched for. I am using something like the following but
am having no success w/ the Tags.name part. I get a unknown column
error. Any suggestions? Thank you as always for the help.
if(!empty($filters['search'])) {
I see. looks like good to put the code in beforeFilter
On Sep 2, 4:27 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Hi guys,
I was just wondering if doing a login check is what you are doing or
if that was just an example?
I ask because verifying login-status is not something you need to
On Sep 2, 2:25 pm, Defranco [EMAIL PROTECTED] wrote:
Hi,
I just noticed that assertEqual() function (test suite) in cakephp 1.2
RC2 is consuming some memory inside test cases.
I noticed that 300 assertEqual() executions, gets about 20 MB of PHP
free mem usage.
It sounds a Memory Leak
If the actions are on the same controller perhaps look into
setAction(). You can also use persistModels to maintain model state
from one request to the next. Perhaps those are options you can
consider as well.
-Mark
On Sep 3, 12:31 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
I see. looks
Hi there,
I've built a search engine for my app and defined a route for it:
Router::connect('/search/companies/*', array('controller' =
'companies', 'action' = 'search'));
The search box is a HTML form sent via GET method. So url are like
this:
/search/companies?where=london;name=bla
Notice
On Wed, Sep 3, 2008 at 9:47 AM, Marcin Domanski [EMAIL PROTECTED] wrote:
and btw you know you arent restricted to create read update delete ?
you can add your own fields like _admin to the db table and use it too
/me goes to update the book
Now I didn't knew !! that it's awesome too !!
Hi Jaime,
the paginator helper has to know the parameters in order to create the
right links, so you have to pass them to the view and set them in the
url-option of the helper functions.
The passing options-array could look like:
array('url' = array('where:'.$city,
Here is a few links I found. . . .haven't tried them yet . . .
http://www.littlehart.net/atthekeyboard/2007/03/13/how-easy-are-web-services-in-cakephp-12-really-easy/
Behavior: http://bakery.cakephp.org/articles/view/webservice-behavior
These should, at least, get you started . . .the google
If you're connecting with Flex, I'd recommend the CakeAMF plugin.
https://trac.cakefoundation.org/amf
-- John
On Sep 3, 2008, at 2:15 AM, saumya wrote:
Hi,
I am pretty new here.I am going to work in Flex and PHP in my new
project. So thinking of using CakePHP and making webservices out of
I also do that custom programming. I want know which typpe do that with
cakephp.
secondly i want implement captcha with registration page .this is urgent.
pls help me.
thanks
On Wed, Sep 3, 2008 at 9:33 AM, Graham Weldon [EMAIL PROTECTED] wrote:
Hey Ranjana,
I would make the following
Hi there,
On Sep 2, 8:36 pm, villas [EMAIL PROTECTED] wrote:
Hi, IMHO your post is not OT at all. I had already spotted your
project and I think it is terrific.
Thanks :-)
I know that there are other projects for CMS's out there as plugins
etc. However, yours seems to be a much cleaner
hi,
how can i remove the query results from the bottom of the page, i've
created the default.ctp in the layout folder, but the query results
still appears at the bottom
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Nice find, fixed in: https://trac.cakephp.org/changeset/7546
On Aug 6, 6:53 am, XuMiX [EMAIL PROTECTED] wrote:
Array
(
[0] = Array
(
[Film] = Array
(
[id] = 160
)
[Person] = Array
(
/**
* CakePHP Debug Level:
*
* Production Mode:
* 0: No error messages, errors, or warnings shown. Flash messages
redirect.
*
* Development Mode:
* 1: Errors and warnings shown, model caches refreshed, flash
messages halted.
* 2: As in 1, but also with full debug messages
thanks..
On Sep 3, 11:34 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
/**
* CakePHP Debug Level:
*
* Production Mode:
* 0: No error messages, errors, or warnings shown. Flash messages
redirect.
*
* Development Mode:
* 1: Errors and warnings shown, model caches
Hi,
I'm trying to install openx on my cakephp site and it should be
accessible through domain.name/openx. That's OK, I upload openx dir to
app/webroot/openx and its accessible through domain.name/openx but I
get redirected to domain.name/app/webroot/openx which might be the
reason my openx
Hi All,
I'm new to CakePHP and I used the cake bake tool to generate my model
classes, controllers and views for a fairly complex data model. One of my
model classes is returning the message below and appears to be sending
'setFlash' to the database as a query. Can someone point me to where
Hey guys,
I'm not sure if there is anyone who still uses older versions (pre
1.2) of CakePHP, but I'm on 1.1.17.5612 and I have a question about
some output that shows up in the bottom of my views.
Does anyone know if it is possible to remove the html commented time
elapsed line that shows
On Sep 3, 10:27 am, Doychi [EMAIL PROTECTED] wrote:
Hi All,
I'm new to CakePHP and I used the cake bake tool to generate my model
classes, controllers and views for a fairly complex data model. One of my
model classes is returning the message below and appears to be sending
'setFlash' to
I dunno about the browser, but if you run the example on
https://trac.cakefoundation.org/amf/wiki/amf you should not have any
issues
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this
Cakephp doesn't have a built in Forget Password. . . .you have to do
custom programming to get that.
On Sep 3, 12:47 am, Ranjana Sriavastava [EMAIL PROTECTED]
wrote:
I also do that custom programming. I want know which typpe do that with
cakephp.
secondly i want implement captcha with
i second donkeybob, CakePHP is a *FRAMEWORK* *NOT* a *CMS*
On Wed, Sep 3, 2008 at 1:38 PM, Donkeybob [EMAIL PROTECTED] wrote:
Cakephp doesn't have a built in Forget Password. . . .you have to do
custom programming to get that.
On Sep 3, 12:47 am, Ranjana Sriavastava [EMAIL PROTECTED]
Hi Mark,
Thanks for the reply.
I've noticed the memory leak is caused due to call of ob_start() inside
cake/tests/lib/cake_reporter.php (paintPass($message) function) without any
ob_end_flush() call.
In this way, successive assertEqual() calls will result in ob_start() calls
without any
Erico,
That is a little strange. I'll look further into it. If the leak is
coming from paintPass() / paintFail() it should exist for every
assertion not just assertEqual().
-Mark
On Sep 3, 1:43 pm, Erico Franco [EMAIL PROTECTED] wrote:
Hi Mark,
Thanks for the reply.
I've noticed the
Hi Mark,
Thanks for the attention about this.
I did 2 tests: in one I removed ob_start from paintFall():
function paintPass($message) {
//removed ob_start();
parent::paintPass($message);
if ($this-_show_passes) {
echo li class='pass'\n;
echo
Ok, i've been breaking my head over this.
I'm trying to change the routing of my app so that (for my base
controller, lets say 'posts') it will be hidden in the url. That is to
say that i can use url's like www.mysite.com/view/1 instead of
www.mysite.com/posts/view/1. Effectively just hiding (or
Hello,
In the trac ticket https://trac.cakephp.org/ticket/470, it explains
that we can indicate alternatives paths for models, controllers and
views. And it works perfectly when we add in the bootstrap.php file
alternatives paths.
But what about elements, components, behaviours, ... (in
http://bakery.cakephp.org/articles/view/improved-captcha-component
try it. Very simple.
On Sep 2, 9:29 pm, Ranjana Sriavastava [EMAIL PROTECTED]
wrote:
I am new with cakephp. I want implement captcha in own site but i am unable
to implement captcha. pls hep me.
Has anyone tried to use client certificates to login with CakePHP?
I'm developing on a server that already has apache mod_ssl set up, but
I can't figure out how to get Cake to utilize it. I'm trying to have
a button that they click which sends them to an ssl protected page,
then read the client
Not sure if this is the best place to report this, but I couldn't find
any contact info for the bakery.
Basically, it seems like comments cannot be left for articles at the
bakery. There is some problem with the title validation as it reports
a blank field even when there is text in there.
I
I have been spending some time with this problem as of late trying to
figure out the solution but I haven't gotten anywhere, so I thought I
would ask on here.
I am trying to put newlines into the data I am sending via the email
component.
My code is as follows:
So I ask me if this feature if only limited to models, controllers
and views? If really it's limited to these three folders, could it be
extended to components, elements...?
Read Configure::__loadBootstrap() - don't be afraid to read code, it
is just piece of cake :)
Hey thats great, thanx works like a charm!
Can someone also tell me what is happening here...?!
On 3 sep, 20:39, Nate [EMAIL PROTECTED] wrote:
Router::connect(
/view/:id,
array(controller = posts, action = view),
array('id' = '[0-9]+', 'pass' = array('id'))
);
On Sep 3, 1:37
Router::connect(
/view/:id,
array(controller = posts, action = view),
array('id' = '[0-9]+', 'pass' = array('id'))
);
On Sep 3, 1:37 pm, aka [EMAIL PROTECTED] wrote:
Ok, i've been breaking my head over this.
I'm trying to change the routing of my app so that (for my base
How do I, from a controller, count the number of queries made? I would
like to log the count of queries without using the table that debug=2
prints out.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
Please consult the documentation:
http://book.cakephp.org/view/542/Defining-Routes
On Sep 3, 3:36 pm, aka [EMAIL PROTECTED] wrote:
Hey thats great, thanx works like a charm!
Can someone also tell me what is happening here...?!
On 3 sep, 20:39, Nate [EMAIL PROTECTED] wrote:
Extra question - is there any way to hide debug output on div's, that
are returned from Ajax request (without turning on production mode)?
I update one cell in table and this debug output blows my table up.
On 3 Wrz, 17:50, phanorcoll [EMAIL PROTECTED] wrote:
thanks..
On Sep 3, 11:34 am,
sorry the correct link is http://book.cakephp.org
On Wed, Sep 3, 2008 at 12:15 PM, saumya [EMAIL PROTECTED] wrote:
Hi,
I am pretty new here.I am going to work in Flex and PHP in my new
project. So thinking of using CakePHP and making webservices out of it
to be consumed by Flex. Can you
How do I, from a controller, count the number of queries made? I would
like to log the count of queries without using the table that debug=2
prints out.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
Hi there,
well, this is a very basic question and I hope someone is able to help
me with this.
Given is a three level association like
User - hasOne Profile - hasMany ProfileAttachment
My problem with this is to make sure a user does not save foreign
ProfileAttachments.
Saving the profile is
My solution for this was to disable the debug mode for that specific request
via Configure::write('debug', 0) in the beforeFilter() action.
2008/9/3 red [EMAIL PROTECTED]
Extra question - is there any way to hide debug output on div's, that
are returned from Ajax request (without turning on
thank you guys for your replies.
I have already gone through the tutorials and developed an simple
application in cakePHP itself.
Now the thing is communicating into flash/flex. I have counted the
option of making it in the amf plugin, but then that depends upon the
server config some what.Which
I also try that ,but i unable to imalepmet captcha with cakephp.
On Wed, Sep 3, 2008 at 11:35 PM, Tankist [EMAIL PROTECTED] wrote:
http://bakery.cakephp.org/articles/view/improved-captcha-component
try it. Very simple.
On Sep 2, 9:29 pm, Ranjana Sriavastava [EMAIL PROTECTED]
wrote:
I am
Erico,
I will look into this tonight, and get it fixed. I'm not sure why the
buffering is there, perhaps someone else on the team knows why it is
there. But as far as I can see there is no need for it to be there.
-Mark
On Sep 3, 2:16 pm, Erico Franco [EMAIL PROTECTED] wrote:
Hi Mark,
I want send email with cakephp.pls help me.
--~--~-~--~~~---~--~~
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
Thanks for the information, I consulted the Configure class and if I
understood well, we can define in the bootstrap.php file alternatives
paths for components, helpers, behaviors, plugins, vendors like for
models, views and controllers.
But what about elements? They don't appear in the
Google for cakephp email send for numerous examples. Emailing the
group for this is just pure laziness.
On Wed, Sep 3, 2008 at 2:19 PM, Ranju [EMAIL PROTECTED] wrote:
I want send email with cakephp.pls help me.
--~--~-~--~~~---~--~~
You received this message
Why do you think the license would interfere? As long it's GPLed,
there is no problem. Or did you think about commercial sites?
The licence is fine, I was just making an observation. Unlike the
Cake MIT, all derived work from Neutrino would be GPLed too. Yes, I
was thinking about the
Hello,
I try to use the Auth component to authentificate users but It seems
I can't have a username and a password in two different models.
I explain the situation in details: a user can connect to the Web
site with his email and his password. But my application allows a user
to have
On Wed, Sep 3, 2008 at 7:32 PM, Wayne Fay [EMAIL PROTECTED] wrote:
Google for cakephp email send for numerous examples. Emailing the
group for this is just pure laziness.
This is like the 5th or 6th email Ranju has sent clearly showing he is here
to waste everyone's time. He even emailed me
I have faced this situation before, and the best solution I have came
with is to search only one model at a time.
I mean, let the user fill the search query and select a model to
search in: Skatepark OR tags.
I'm currently developing a site where the user can search in Companies
OR News OR
Thanks schneimi, but I'm already familiar with named parameters. The
problem is that after submiting a HTML form where data is passed by
GET, you are driven to a new url with the query string (/?
param=value) instead of a nice named-params one (/param:value).
Of course I can force a redirect
Hi: I'm using 1.1.19* and have a simple question that I cannot find
answer to from either manual or search here...
I have 2 methods in a controller, let's call them methodA and
methodB. In methodA, I do some work and I want to store the result of
that work so that methodB can access and
try
$data .= 'Business: ' . $this-data['Contact']['business'] . \n
--
Marcin Domanski
http://kabturek.info
On Wed, Sep 3, 2008 at 9:17 PM, Arak Tai'Roth [EMAIL PROTECTED] wrote:
I have been spending some time with this problem as of late trying to
figure out the solution but I haven't
I'm not sure if I'm understanding you correctly, because seems to be
trivial:
class my_controller extends AppController {
var $data;
function MethodA() {
$this-data = 'hello world';
}
function MethodB() {
die($this-data); // hello world.
}
}
Or even:
class my_controller extends
class AppController extends Controller {
var $components = array(..., 'RequestHandler');
function beforeRender() {
if ($this-params['isAjax'])
Configure::write('debug', 0);
}
}
--~--~-~--~~~---~--~~
You received this message because you are
Remove ?php echo $cakeDebug? in /views/layouts/default.ctp
--~--~-~--~~~---~--~~
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,
Hi,
I have an static controller, which should just act as wrapper for two
other controllers:
?php
class StartsController extends AppController {
var $name = 'Starts';
var $uses = array('Businesses', 'Tags');
var $helpers = array('Html');
function index() {
You should use the singular form when referencing your model in code -
only your controller and table name should be plural.
class Business extends AppModel {
var $name = 'Business';
}
class StartsController extends AppController {
var $name = 'Starts';
var $uses =
Maybe, you can create a dummy controller which collects the data from
openx(?) and passes it to an dummy view...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to
Wow, thank you Adam!
Fixed!
--~--~-~--~~~---~--~~
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 [EMAIL
I'm assuming you're not calling methodA and methodB from the same
request from what you've said above.
Really depends on the type and amount of data you're talking about...
you could save the data into the session variable in methodA and pick
it up in methodB during a subsequent request.
Or you
Perhaps this helps:
http://groups.google.com/group/cake-php/browse_thread/thread/f3653bac41f58733/ff236e99a8313057?lnk=gstq=change+password#ff236e99a8313057
?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP
The SSL stuff is not connected to cake! This is something your
server (apache) handles.
An certificate just encrypts the connection between browser and
server. Therefore your user (his browser) needs this certifcate.
Normally it is just enough to lead the user to https://www.asdf.com
instead of
I think what he meant was to make parts of his cakephp app secure by
redirecting it to https.
On Sep 4, 10:40 am, powtac [EMAIL PROTECTED] wrote:
The SSL stuff is not connected to cake! This is something your
server (apache) handles.
An certificate just encrypts the connection between browser
I'm not sure why, but gwoo seems don't like the links I added into the
tutorial page of amf. :(
I just found Adam had three articles about amf plugin:
Connecting Cakephp and Flex
http://www.adamdyson.com.au/index.php/blog/cakephp/2-connecting-cakephp-and-flex
Extended CakeAMF
hello...all i'm newbie in cakephp
nice to join in this group
thanks
--~--~-~--~~~---~--~~
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
Hi and Welcome.
Remember that the Good Book and the Good API shall be your lords first
and foremost.
http://book.cakephp.org
http://api.cakephp.org/classes.html
Ask for things that are not in them and you shall receive answers from
the group. ;o)
Happy bakin',
Dav
On 4 Sep 2008, at 11:57,
Hi All
please i want one full example for working in Cakephp like small site
can you help please
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to
I have a controller ...
class Testcontroller extends AppController{
function beforefilter(){
$this-Session-write('sess',hello);
}
function index(){
$var2=$this-Session-read('sess');
$this-set('var1',$var2);
}
}
now when i
I have a controller ...
class Testcontroller extends AppController{
function beforefilter(){
$this-Session-write('sess',hello);
}
function index(){
$var2=$this-Session-read('sess');
$this-set('var1',$var2);
}
}
now when i
try
http://groups.google.com/group/cake-php/browse_thread/thread/21521ad73a3133cb/bfc225830f77aa90?lnk=raot
2008/9/4 wael altahawi [EMAIL PROTECTED]
Hi All
please i want one full example for working in Cakephp like small site
can you help please
Thanks
Works for me...
function beforefilter() {
$this-Session-write('testo', 'こんにちは');
}
function index() {
debug($this-Session-read('testo'));
}
Some other problem maybe?
On 4 Sep 2008, at 13:43, ビシャルfrom Nepal wrote:
I have a controller ...
class Testcontroller extends
Password code! I think it's probably a good idea to ignore his emails
requesting someone else to do his work and only reply to the ones that have
specific questions whose answers are not easily found on public resources.
Fair enough -- Gmail showed him as Ranjana for the first 5 or 6, and
83 matches
Mail list logo