; 'video/mp4'),
'path' => WWW_ROOT . 'videos' . DS
);
$this->set($params);
Don't forget the mimeType, otherwise it doesn't work.
On Oct 5, 10:23 am, thomaus wrote:
> Sure! Here it is :
>
> function dowloadVide
flush();
readfile($path);
exit;
}
On Oct 4, 5:36 pm, "Ma'moon" wrote:
> Can you post your controller code and let us see how you exactly implemented
> this?
>
>
>
>
>
>
>
> On Tue, Oct 4, 2011 at 10:4
Nobody no clue?
On Oct 3, 5:36 pm, thomaus wrote:
> Thanks for your answers.
>
> Here is how I set my header (the video file is a .mp4 one)
>
> header('Content-Description: File Transfer');
> header('Content-Type: video/mp4'
ader problem.
On Oct 3, 5:11 pm, somebody who carez
wrote:
> You may need to set a correct header for the file to get the browser to
> process it correctly.
>
> http://php.net/manual/en/function.readfile.php
>
> Thank you,
> -Alex Goretoy
>
>
>
>
>
>
>
>
Hi there,
I'm experiencing a very strange problem. I'm trying to remotely
download a video file.
I've done a very basic PHP code using the readfile() function. This
code works absolutely fine.
Now when I copy / paste the exact same code into my CakePHP
controller, the URL works, a file is actual
ce again, what works fine for "find" doesn't work for
"paginate".
I finally use a nasty hack cause I was really tired to try to do it
properly!
On Jun 23, 5:32 pm, thomaus wrote:
> Hi Johan,
>
> I agree with you, it should not return an SQL error. Strange...
>
> 'fields' => array('language_id'),
> 'conditions' => array('Nationality.language_id LIKE ?' =>
> 2) // Do you really need to use LIKE instead of equals?
> )
> )
> )
> );
>
> If you require the Nation
Majerle wrote:
> emm...try this
>
> $filter = array();
> $filter['Nationality.language_id LIKE'] = 2;
>
> --
> Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> 2011/6/20 thomaus
>
>
>
>
>
>
>
> > Nobody no clue?
>
> > On
Nobody no clue?
On Jun 17, 5:43 pm, thomaus wrote:
> Hi there,
>
> I am doing 2nd order pagination using Containable. It is working fine
> but when I try to paginate with a 2nd order filter, it doesn't work
> anymore.
>
> Here are my models relations :
>
> &q
Hi there,
I am doing 2nd order pagination using Containable. It is working fine
but when I try to paginate with a 2nd order filter, it doesn't work
anymore.
Here are my models relations :
"Result" belongs to "Test"
"Test" belongs to "Nationality"
Here is my code :
$this->Result->recursive = 2;
Hi, first thanks a lot for answering.
I just tried what you said, and it doesn't work either...
On Jun 1, 9:54 pm, Tilen Majerle wrote:
> no..in view just this
>
> $paginator->sort('title', 'RelatedModelName.fieldName');
> --
> Lep pozdrav, Tilen Ma
...it works to me
>
> if you are on CakePHP >= 2.0.0-alpha then do this in view:
> $this->Paginator->sort('your title', 'ModelName.fieldName');
>
> else do this
>
> $this->Paginator->sort('your title', 'ModelName.fieldName');
&
I there. Nobody had this problem before? Strange...
Little reminder : on 2nd order related model pagination, only
ascending sorting is working with the CakePHP pagination helper.
On May 20, 2:20 pm, thomaus wrote:
> Nobody no clue?
>
> On May 19, 7:55 pm, thoma
Hi there,
I just installed a CakePHP app on a remote server and a strange thing
happened. The model-controller-view is working fine but anything which
is on webroot doesn't work (no CSS, JS and img).
I tried to check the main CSS on a new browser window and it said "Not
Found- The requested docum
Nobody no clue?
On May 19, 7:55 pm, thomaus wrote:
> Thanks for your help. Using the containable, I could solve my problem.
>
> Now I'm facing a related bug. The $paginator->sort helper on my view
> only works once for the 2nd order models.
>
> On the column "T
19, 6:48 pm, Tilen Majerle wrote:
> check the core cake's containable
> behaviorhttp://book.cakephp.org/view/1323/Containable
> --
> Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> 2011/5/19 thomaus
>
>
>
>
>
>
>
> > Hi there,
>
> > I would like
Hi there,
I would like to paginate a model with a recursive field.
My main model is called "Result". "Result" belongsTo "Test" and "Test"
belongsTo "Language"
What I would like to achieve is to get the field "Language.name" (only
available in the model "Language") as a sortable field of my "Resu
Badkas wrote:
> Hi,
>
> I think following code will do the trick alongwith custom session settings,
> try
>
> Configure::write('Session.timeout', 0.9);
>
> Amit Badkas
>
> PHP Applications for E-Biz:http://www.sanisoft.com
>
> On Tue, Nov 16, 2010 at 6:
Nobody no clue?
On Nov 17, 12:37 pm, thomaus wrote:
> I already tried this. You are right, this removes existing session
> cookies manually from the browser, but then there is no time
> limitation for the Cookie. Still the same problem then...
>
> On Nov 17, 5:49 am, Amit Badkas
m session settings file?
>
> ini_set('session.cookie_lifetime', 0);
>
> Also try after removing existing session cookies manually from the browser.
>
> Amit Badkas
>
> PHP Applications for E-Biz:http://www.sanisoft.com
>
> On Tue, Nov 16, 2010 at 7:37 PM, thomaus
->path);
>
> Hope this helps.
>
> Amit Badkas
>
> PHP Applications for E-Biz:http://www.sanisoft.com
>
> On Tue, Nov 16, 2010 at 12:41 AM, thomaus wrote:
> > Hi,
>
> > My question is simple. Is it possible to have these 3 things set-up
> > for
Hi,
My question is simple. Is it possible to have these 3 things set-up
for my project:
1) Security level to "medium" (and not "high")
2) A given time-out of 90 seconds
3) An automatic log-out after browser closing
???
>From what I understood, if I want 3, then I need to set the Security
leve
Ok, thanks. I can now deny some acces, following this article
http://book.cakephp.org/view/396/authorize
But still, what is the use of the "deny" function then?
On Oct 29, 1:12 pm, Marco wrote:
> Is the variable $this->Auth->authorize set to 'controller'?
>
>
Hi there,
I don't know what's happening with the Auth->deny function, but I
can't make it work properly.
Such a function:
function beforeFilter()
{
parent::beforeFilter();
$this->Auth->deny('overview');
}
in my Users controllers should forbid the access to the url '/users/
over
select',
'multiple' => 'checkbox',
'options' => array(1 => 'Pilot', 2 => 'Medical', 3 =>
'Other'),
'div' => 11)
);
?>
and then after, accessing the class of a checkbox with jQuery is
box',
'options' => array(1 => 'Pilot', 2 => 'Medical', 3 =>
'Other'),
'class' => 11)
);
?>
this doesn't change anything at all, I mean my checkboxes they are not
assigned "11" as a class.
Cheers!
Hi there,
I'm using the form helper to create checkboxes this way :
input('Group',
array(
'label' => 'Group',
'type' => 'select',
'multiple' => 'checkbox',
'options' => array(1 => 'Pilot', 2 => 'Medical', 3 => 'Other'),
'id' => 11)
);
?>
and I then
A stupid bug of mine. Sorry for bugging!
On May 18, 5:35 pm, thomaus wrote:
> I just tried but it did not change anything...
>
> On May 18, 3:34 pm, "Dr. Loboto" wrote:
>
>
>
> > Not "fr", but "fre".
>
> > On May 18, 7:29 pm, thoma
I just tried but it did not change anything...
On May 18, 3:34 pm, "Dr. Loboto" wrote:
> Not "fr", but "fre".
>
> On May 18, 7:29 pm, thomaus wrote:
>
>
>
> > Hi,
>
> > I already made some multilingual websites with CakePHP but this
Hi,
I already made some multilingual websites with CakePHP but this time,
it doesn't work and I don't get it.
What I did :
1) Wrote this function in my app_controller.php file
function beforeFilter()
{
$this->Session->write('Config.language', 'fr');
pr($this->Ses
Solved. The problem was indeed the missing "exit();"
Again, thank you very much Dave. You were a great help! :-)
On Jan 29, 5:03 pm, "Dave" wrote:
> This is my controller function
>
> function manage_edit($id = null)
> {
> if ($this->RequestHandler->isAjax()) {
> Co
is->autoRender = false;
>
> In the controller action to stop the view from output. All you get is the
> json data then do what you need with it
>
> Dave
>
> -Original Message-
> From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
> Of th
Hi there,
I need to render a full HTML view with header, css and js includes and
pass it as a JSON.
I liked Dave's trick :
$response['html'] = $this->render('my_view_needed');
Then echo back my json_encode($response) and use response.html in the
js to
render the view / messages / errors.
But th
it and pass it back to your JQuery processor.
> Enjoy,
> John
>
> On Jan 27, 4:14 pm, thomaus wrote:
>
> > Hi there,
>
> > I need to do a JQuery ajax request to an action of my CakePHP app but
> > with the Javascript in a different domain than the Cake a
Hi there,
I need to do a JQuery ajax request to an action of my CakePHP app but
with the Javascript in a different domain than the Cake app's one.
After reading this very good article :
http://developer.yahoo.com/javascript/howto-proxy.html
I created a proxy PHP file following these explanations
ocale/fr_fr/
default.po and the rest stays in English.
Thanks!
On Jan 23, 7:48 pm, euromark wrote:
> i guess john's example implied that you could stay in the current
> language scope
> although it might not be the cleanest approach, it would be the
> simpliest for thomaus&
rote:
> Hi Thomaus,
>
> I have some questions! When you write that the content is french, do
> you mean the data or the static text?
> Are you using .po files or i18n in the database?
>
> If I had to solve it only for the static text, then I would just use a
> specific
Nobody no clue?
On Jan 20, 4:38 pm, thomaus wrote:
> Hi,
>
> I made an multilingual app which works nice but now I would need to
> change the language but only in a given of my view. Is this
> possible and how?
>
> Means that my content page would be like that:
>
>
Hi,
Thanks! Nice trick. So, problem technically solved but still, why the
urls are not relative in Javascript with Cake? Is it a Cake problem or
something else?
On Jan 20, 4:29 pm, Akeda Bagus wrote:
> On Wed, Jan 20, 2010 at 10:16 PM, thomaus wrote:
> > Anybody a clue?
>
> >
ter a
> form submission.
>
> On Jan 20, 7:16 am, thomaus wrote:
>
> > Thanks Cricket, holding the shift key down when reloading worked but
> > still, how can avoid this in my browser?
>
> > On Jan 19, 8:10 pm, cricket wrote:
>
> > > Hold the shift key down when
Hi,
I made an multilingual app which works nice but now I would need to
change the language but only in a given of my view. Is this
possible and how?
Means that my content page would be like that:
English Header
English Title
Some English Content
Some French Content
Some English Content aga
Anybody a clue?
On Jan 19, 10:28 am, thomaus wrote:
> Hi,
>
> In my Javascript, I need to use full paths
> (e.g.http://localhost/MySite/controller/action)
> instead of relative URLs (e.g. controller/action), otherwise the
> actions calls they don't work.
>
> Is t
Thanks Cricket, holding the shift key down when reloading worked but
still, how can avoid this in my browser?
On Jan 19, 8:10 pm, cricket wrote:
> Hold the shift key down when reloading. This is a browser issue.
>
> On Jan 19, 4:26 am, thomaus wrote:
>
> > Hi,
>
> > I
Hi,
In my Javascript, I need to use full paths (e.g.
http://localhost/MySite/controller/action)
instead of relative URLs (e.g. controller/action), otherwise the
actions calls they don't work.
Is there something I can do about that?
Thanks in advance,
Check out the new CakePHP Questions site htt
Hi,
I noticed that when I reload a filled form page by doing Apple + R (or
F5 for Windows) in my web browser (which is Firefox for Mac), the form
is still filled with the data I just entered.
Is there a way in Cake to avoid this? I mean, can I get a blank form
after reloading a page?
Thanks,
Che
the include pagination with
hasAndBelongsToMany.
Thanks again!
On Jan 12, 8:29 pm, John Andersen wrote:
> Hej Thomaus,
>
> I have a modified Containable behaviour, that may help you solve your
> problem.
>
> Find it herehttp://bin.cakephp.org/view/763226357and place it in
I can't believe there are no solution to this problem. I mean, it's
just paginating a model with a second order filter!
HELP! HELP! HELP! This is urgent!
On Jan 11, 8:50 am, Fran Iglesias wrote:
> Hi,
> El 11/01/2010, a las 8:35, Jeremy Burns escribió:
>
> > I have had the very same annoying pro
sen wrote:
> Try to just specify:
>
> $this->Campaign->recursive = 3;
> $filter = array('User.parent_id = ' => 204); /* Changed this */
> $campaigns = $this->paginate(null, $filter);
>
> Enjoy,
> John
>
> On Dec 19, 3:43 am,thomaus wrote:
Hi,
I need to create a form builder this way:
- It should generate a JS code that I could copy / paste to any
external HTML webpage
- A simple contact form would then appear in the HTML page
- By validating this form, it would save the data to my database
I'm ok with PHP and CakePHP but really ba
I can't believe nobody knows how to do that. I'm pretty sure somebody
has ever experienced this issue and knows how to solve it.
Please, help me! :-)
On Dec 21, 9:06 am, thomaus wrote:
> Nobody no clue?
>
> On Dec 19, 2:43 am,thomaus wrote:
>
> > Hi,
>
> >
Hi there,
I have an issue using both Prototype and jQuery in my app.
Here is my JS includes in my head folder:
link('/js/scriptaculous-js-1.8.3/lib/prototype');
echo $javascript->link('/js/scriptaculous-js-1.8.3/src/
scriptaculous');
// jQuery
echo $javascript->l
Nobody no clue?
On Dec 19, 2:43 am, thomaus wrote:
> Hi,
>
> I have to do a 2nd order filter por pagination.
>
> My pagination var:
>
> var $paginate = array(
> 'limit' => 10,
> 'fields' => array('Campaign.id'
Hi,
I have to do a 2nd order filter por pagination.
My pagination var:
var $paginate = array(
'limit' => 10,
'fields' => array('Campaign.id', 'Campaign.name',
'Campaign.description'),
'order' => array(
'Campaign.id' => 'asc'),
);
My controller function:
$thi
Nobody no clue?
On Dec 11, 7:16 pm, thomaus wrote:
> No request with Firebug. I don't get it, really...
>
> On Dec 11, 11:04 am, Mukhamad Ikhsan wrote:
>
> > do you have a firebug? you can see what the response for XHR request
>
> > On Fri, Dec 11, 2009 at 4:57 P
The problem is that not all the pages will have the ame structure,
some will call header, some not, ... but yes it's feasible.
This aid, I'd like to know how to share CSS and JS.
On Dec 11, 7:57 pm, pomares wrote:
> How about creating a custom layout and calling it from the controller
> with: $t
Hi there,
I have to share the same Javascripts and CSSs for various layouts so I
created an element called "css_js.ctp" and I call it in each layout
this way :
charset(); ?>
element("css_js"); ?>
The problem is that I now get
No request with Firebug. I don't get it, really...
On Dec 11, 11:04 am, Mukhamad Ikhsan wrote:
> do you have a firebug? you can see what the response for XHR request
>
>
>
> On Fri, Dec 11, 2009 at 4:57 PM, thomaus wrote:
> > Nobody no clue?
>
> > On Dec 10,
Nobody no clue?
On Dec 10, 10:04 am, thomaus wrote:
> Hi John,
>
> I just did and... still nothing at all when clicking!
>
> Thanks,
>
> On Dec 10, 7:20 am, John Andersen wrote:
>
> > Have you added the javascript libraries?
> > - prototype
> > - scrip
Hi John,
I just did and... still nothing at all when clicking!
Thanks,
On Dec 10, 7:20 am, John Andersen wrote:
> Have you added the javascript libraries?
> - prototype
> - scriptaculous
>
> Enjoy,
> John
>
> On Dec 9, 9:03 pm, thomaus wrote:
>
> >
alse);
//]]>
Thanks,
On Dec 9, 6:42 pm, John Andersen wrote:
> I do observe that your ajax->submit is supposed to call your "login"
> action in your "users" controller and not your "recoverPassword"
> action!
> Please check your code or your statement :)
> En
Hi there,
I just built an AJAX form and it doesn't work at all!
My code:
Recover lost password
Enter your e-mail address and we will send a reset link to your
email
create('User'); ?>
input('email', array('label' =>
__('Your
Email', true), 'class' => 'text-input')); ?>
linking to the wrong directory.
>
> On Tue, Dec 1, 2009 at 6:32 AM, thomaus wrote:
> > Hi Jeremy,
>
> > Thanks for helping. I tried to add the line RewriteBase / into
> > the .htaccess files in the root, /app/ and /app/webroot/ and I get the
> > same error! :-(
>
Hi,
Just a simple question. I can't figure out why is there a default
Views/layouts/js/ folder in Cake. I thought that all the Javascripts
should go into webroot/js/
Does anybody know?
Thanks in advance.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their Cake
working on some hosts. The answer was in my .htaccess
> files - it might be worth you taking a
> look?http://www.jeremy-burns.co.uk/2009/08/setting-up-cakephp-on-a-11-server/
>
> On Dec 1, 10:39 am, thomaus wrote:
>
> > Hi,
>
> > My CakePHP website is perfectly wo
t, but I had trouble getting
> > my installations working on some hosts. The answer was in my .htaccess
> > files - it might be worth you taking a look?
> >http://www.jeremy-burns.co.uk/2009/08/setting-up-cakephp-on-a-11-server/
>
> > On Dec 1, 10:39 am, thomaus wrote:
&g
Hi,
My CakePHP website is perfectly working on my localhost and also
online.
But I figured out that it's was a bit insecure to put both cake,
vendors and app folders in my public_html folder so I decided to do it
properly following the instructions I found here:
http://book.cakephp.org/view/308/I
CakePHP v1.2.4.8284 Console
> ---
> App : app
> Path: /Users/thomaus/Sites/MyApp/app
> ---
> What is the full path you would like to extract?
> Example: /Users/thomaus/Sites/MyApp/myapp
> [Q]uit
> [/Users/thomaus/Sit
Ok, I found a way to get .po files.
1) You have to type : "cake i18n extract" or "cake/console/cake i18n
extract"
2) Once you get :
> Welcome to CakePHP v1.2.4.8284 Console
> ---
> App : app
> Path
).
> The simple workaround is to specify it with the full path:
>
> /Users/thomaus/Sites/MyApp/cake/consol/cake -app /Users/thomaus/Sites/
> MyApp/app i18n extract
>
> That is the foolproof and disgustingly verbose way of making sure you
> target the right app (= how to call the c
/MyApp/app
---
What is the full path you would like to extract?
Example: /Users/thomaus/Sites/MyApp/myapp
[Q]uit
[/Users/thomaus/Sites/MyApp/app] >
I don't get why it does so.
2) Is there a clear and updated tutorial or blog to do multilingual
applicatio
27;someExternalJsScript.js'); ?>
>
> This way you can use you variables inside your external scripts, just
> use the var someJsArr. By the way most of the time I place all
> variables needed in script into an array and use $this->set
> ('someArraySetByCake'
I could do that but in my case, the images names must be dynamic so
the problem would be the same.
On Nov 23, 6:36 pm, Miles J wrote:
> Instead of pre-loading images, just use css rollovers.
>
> On Nov 23, 9:20 am, thomaus wrote:
>
> > Thanks for your answer.
>
>
;
> 2. (Not Recommended) Set up your web server to run .js files through the PHP
> parser. Then you can use php syntax in the .js files
>
> On Mon, Nov 23, 2009 at 6:31 AM, thomaus wrote:
> > Hi there,
>
> > I've been using CakePHP since 6 months and never had a s
Hi there,
One month ago, I did a multilanguage website using CakePHP but putting
all the multilangual content in my dB.
>From what I read today, this was the right way to display short
messages in various languages with CakePHP :
http://book.cakephp.org/view/162/Internationalizing-Your-Applicatio
Hi there,
I've been using CakePHP since 6 months and never had a single problem
BUT now I have one issue I can't solve. Here it is:
I need to Preload some images for my website. I did it using JQuery
and it perfectly works:
CODE
$(document).ready(function(){
// Preload
$.preloadImages("img/butt
75 matches
Mail list logo