I think Is better to use the original path:
function afterSave() {
if (!empty($this->data[$this->name]['logo'])) {
$path= $output = str_replace("//", "/",
$this->data[$this->name]['original']);
@unlink($path);
Now everything is working like i expected.
To keep the file in {IMAGE}... and delete the file in {APP}... im
using the afterSave callback in my model:
function afterSave() {
if (!empty($this->data[$this->name]['logo'])) {
$baseDir= ROOT .
I never realized there was a difference. I am sorry for my previous
statement. This did indeed work for me, thank you.
On Sep 6, 6:50 am, "Marcin Domanski" <[EMAIL PROTECTED]> wrote:
> i belive you should pay more attantion ;)
> greets,
>
> --
> Marcin Domanskihttp://kabturek.info
>
> On Fri, Sep
Im sharing the replace of double slashes and the path to convert, maybe
exist
a better way to achieve that.
function __imConvert(&$model, $input, $params = array(), $output =
null, $return = false) {
if (isset($params['return'])) {
$return = $params['return'];
Hi,
there is no need to use the afterDelete event, because the delete
function of the model class gives a return value. Depending on the
return value you can set the flash message.
Pls. have a look at the API:
http://api.cakephp.org/class_model.html#680f1a7876f7be4d87308d4df3252e77
I hope this
looking for your .htaccess.
--~--~-~--~~~---~--~~
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 PROTECTE
Yes, you would alter the view.ctp file. Something along these lines...
Wayne
> AND THE FOLLOWING IS THE view.ctp FILE
>
Application Pack
image('pdf-icon.gif', array('alt'=>'',
'style'=>'vertical-align: bottom; margin-right: 5px')) ?>link('Application Form', UPLOADS_URL . "/{$
Hi AD7six,
I was wondering how to auto-delete int add action the file uploaded to
{APP} after the file is converted in {IMAGES}?
Just only to keep the converted file and not the original uploaded
file.
Now i can save my image in a single field. Based in modifications to
allow
using a single fie
1. Open up app/config/core.php
2. Look for debug.
3. Set to 1 or 2
Refresh your browser and see the actual problem.
lizzeelike wrote:
i have create all files for creating new blog. but when i try to
access the following url
http://localhost/cakePHP/posts/index
it shows such error:
Not
i have create all files for creating new blog. but when i try to
access the following url
http://localhost/cakePHP/posts/index
it shows such error:
Not Found
The requested URL /cakePHP/posts/index was not found on this server.
--
Can anyone tell me why its happening?
Sabrina
--~-
How do you set the default formatting for date. Its set to m-d-y as
default, this is great, but when you need user interaction and the
standard is d-m-Y. Its really not practical to add formatting to each
$form->input, is there a better way?
--~--~-~--~~~---~--~~
Yo
Hey,
after I delete from a DB something I want to set a Flash message
saying if it's successfully been deleted or if there was an error.
I'm not sure how to implement this with afterDelete. Any ideas?
Thanks.
--~--~-~--~~~---~--~~
You received this message becaus
Wayne,
I just worked out how to remove "not null" in the "information_doc"
entry in the DB, so that you dont have to attach a file.
But as I said previously I dont really know any thing about cakephp/
php.
How can I make the "Information" download link only appear if there is
a file uploaded for i
Hi guys,
I'm currently localizing my application in English and German.
Everything works as expected. Except the authError and loginError
messages of the Auth component. I'm trying to set these messages in
the app_controller beforeFilter event. But the messages are always
shown in German (default
I know that , iwant drop down with pach country,state,city.
On Mon, Sep 8, 2008 at 1:58 AM, Bernhard J. M. Grün <
[EMAIL PROTECTED]> wrote:
> Yes it is possible.
> Look into the manual (FormHelper -> input (select box)). There are many
> examples you can look at.
>
> 2008/9/7 Ranju <[EMAIL PROTEC
Try something like this.
define('APP_PATH', ROOT . APP_DIR . DS); // line 79
- Warringer
yaqoob wrote:
> Hi there
> I have a large problem in deploying my cake application - you can see
> the problem here:
> http://www.beta.branzowo.pl/
>
> the thing is, as far as I managed to examine the prob
Yes it is possible.
Look into the manual (FormHelper -> input (select box)). There are many
examples you can look at.
2008/9/7 Ranju <[EMAIL PROTECTED]>
>
> I want implement dropdown with country ,state,city.It is possible on
> cakephp .pls help me.
> >
>
--~--~-~--~~~---
I want implement dropdown with country ,state,city.It is possible on
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.co
Hi there
I have a large problem in deploying my cake application - you can see
the problem here:
http://www.beta.branzowo.pl/
the thing is, as far as I managed to examine the problem, is that on
this server (home.pl) the document root for a domain is only single
slash "/" (nothing like usr/bin/.
I have a database driven galery.
CREATE TABLE EXISTS `galeries` (
`id` int(11) NOT NULL auto_increment,
`year` year(4) NOT NULL,
`titel` tinytext NOT NULL,
`subtitle` tinytext NOT NULL,
`folder` tinytext NOT NULL,
PRIMARY KEY (`id`)
)
CREATE TABLE EXISTS `images` (
`id` int(11) N
I'm still having trouble with this. Any ideas?
On Aug 27, 8:36 am, Jonathan <[EMAIL PROTECTED]> wrote:
> I did this http://www.pagebakers.nl/2007/06/05/using-json-in-
> cakephp-12/"Using JSON in CakePHP 1.2> tutorial from the Pagebakers
> blog to get JSON working with my installation of CakePHP.
Not sure if you seen that, but there are two versions of docs...
sounds like you did tutorial for 1.2, while using 1.1
I also agree that you should use 1.2 as it is a lot more powerful, but
either way make sure you pick the right version of the docs in the
book.
On Sep 7, 8:59 am, Ryan <[EMAIL P
If you've just saved the data you still have it at you disposal to
make any changes... that being said, could you give an exact example
where you save data, modify it and save it again, why would you need
to do that?...
On Sep 6, 2:30 pm, MarcS <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have trouble
On Sep 7, 4:04 pm, Michael <[EMAIL PROTECTED]> wrote:
> Perfect. Thanks.
>
> My initial usage was straight from the Cake online docs for 1.2.
> Sounds like there's an update in order . (That's not a complaint,
> I understand that they are a work in progress.)
http://book.cakephp.org/#How-it-W
Perfect. Thanks.
My initial usage was straight from the Cake online docs for 1.2.
Sounds like there's an update in order . (That's not a complaint,
I understand that they are a work in progress.)
thanks again,
Michael
On Sep 6, 8:52 am, [EMAIL PROTECTED] wrote:
> On Sat, Sep 6, 2008 at 3:32 P
The customer is not always right. Lets say you are a roofer and the
customer tells you to use that you cannot use an air-nailer as they
are not as proven and effective as a hand hammer. Would you simply
accept that they 'are right' and do the job? There are a time when
the customer is not knowl
Maybe you could overload the afterSave callback (method) of the model
you are trying to make changes to its data.
On Sep 6, 1:30 pm, MarcS <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have trouble understanding why the Model::data array is being set to
> false after saving the model.
> Many times I nee
Thanks a ton guys. Being new to Cake, I am impressed with the
community helpfulness so far.
Just knowing that if Cake is kicking an error, the root cause may be a
version/documentation issue and not my own mistake will be a big help
in fixing problems.
-Ryan
(And although it doesn't sound like
On 14 Aug, 00:26, Lance Willett <[EMAIL PROTECTED]> wrote:
> > Does anyone have any more suggestions I can try, please?
>
> Mark, have you read through all the Installation instructions (http://
> book.cakephp.org/view/32/installation)? That document covers most of
Ah - the answer was there - at
thanks for all the replies
and I tried to explain that stable means 'considered stable' and that
RC2 was working perfectly for we had to do. I think they would have
preferred me to craft custom code which would have been far less
secure and stable than using cakephp but that would not have been
t
Hi,
thanks, that's what I was looking for, indeed. But now, how would you
control static pages, which you have routed ? Because I guess the
pages_controller takes over here right ?
Ojonam
On Sep 5, 11:08 pm, BrendonKoz <[EMAIL PROTECTED]> wrote:
> This took me what seemed like forever to find -
I admit it may not actually be a memory leak, given the way that cake
caches information.
The problem, though, is that whenever more than one person logs in at
the same time and tries to save or call the database concurrently, we
have a huge CPU usage happen, and both time out.
If this isn't cau
I've been using Netbeans PHP from the first time playing with CakePHP..
Of course i'll vote..
Okto.Silaban.Net
On Sun, Sep 7, 2008 at 1:36 AM, ĸεиلı <[EMAIL PROTECTED]> wrote:
>
> Netbeans 6.5 is coming soon. The main focus of version 6.5 is PHP
> development. Many works has been done to support
I cannot agree with this :)))
I have a multi-document, multi-dom templating engine with almost no
performance loss. It has some cakephp dedicated solutions, but
generally it's completly standaone.
It will be published soon, when final API will be ready.
It based on phpQuery, which i'm also auth
Hi there,
i am using Paginator component. Everything is fine but i would prefer
to have URLs line following:
/posts/2
instead of defaults generated by Paginator:
/posts/page:2
How can I achieve that ?
--~--~-~--~~~---~--~~
You received this message because
try this:
rename you schema to have the name of the appdir. ie your directory struct is:
-project
---app/webroot/index.php
---cake/
---vendors/
so name the schema
AppSchema extends CakeSchema { ...
run cake schame from the app dir (all cake console shells should be
run when in the app dir)
HTH,
36 matches
Mail list logo