Re: Problem when downloading a video file

2011-10-11 Thread thomaus
; '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

Re: Problem when downloading a video file

2011-10-05 Thread thomaus
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

Re: Problem when downloading a video file

2011-10-04 Thread thomaus
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'

Re: Problem when downloading a video file

2011-10-03 Thread thomaus
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 > > > > > > > >

Problem when downloading a video file

2011-10-03 Thread thomaus
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

Re: 2nd order pagination using Containable with a filter

2011-06-23 Thread thomaus
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... >

Re: 2nd order pagination using Containable with a filter

2011-06-23 Thread thomaus
>         '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

Re: 2nd order pagination using Containable with a filter

2011-06-20 Thread thomaus
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

Re: 2nd order pagination using Containable with a filter

2011-06-20 Thread thomaus
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

2nd order pagination using Containable with a filter

2011-06-17 Thread thomaus
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;

Re: Recursive pagination

2011-06-09 Thread thomaus
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

Re: Recursive pagination

2011-06-01 Thread thomaus
...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'); &

Re: Recursive pagination

2011-05-31 Thread thomaus
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

Cannot access anything from webroot on my server

2011-05-23 Thread thomaus
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

Re: Recursive pagination

2011-05-20 Thread thomaus
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

Re: Recursive pagination

2011-05-19 Thread thomaus
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

Recursive pagination

2011-05-19 Thread thomaus
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

Re: Problem with Cake session time out and security level

2010-11-20 Thread thomaus
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:

Re: Problem with Cake session time out and security level

2010-11-19 Thread thomaus
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

Re: Problem with Cake session time out and security level

2010-11-17 Thread thomaus
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

Re: Problem with Cake session time out and security level

2010-11-16 Thread 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

Problem with Cake session time out and security level

2010-11-15 Thread thomaus
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

Re: Auth->deny problem

2010-10-29 Thread thomaus
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'? > >

Auth->deny problem

2010-10-29 Thread thomaus
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

Re: Change id for checkboxes

2010-10-03 Thread thomaus
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

Re: Change id for checkboxes

2010-10-03 Thread thomaus
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!

Change id for checkboxes

2010-10-02 Thread thomaus
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

Re: Problem with internationalization

2010-05-18 Thread thomaus
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

Re: Problem with internationalization

2010-05-18 Thread thomaus
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

Problem with internationalization

2010-05-18 Thread thomaus
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

Re: JSON View

2010-02-01 Thread thomaus
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

Re: JSON View

2010-01-29 Thread thomaus
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

Re: JSON View

2010-01-28 Thread thomaus
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

Re: PHP proxy in CakePHP

2010-01-27 Thread thomaus
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

PHP proxy in CakePHP

2010-01-27 Thread thomaus
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

Re: Change default language on the fly in a view

2010-01-25 Thread thomaus
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&

Re: Change default language on the fly in a view

2010-01-22 Thread 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

Re: Change default language on the fly in a view

2010-01-22 Thread thomaus
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: > >

Re: Relative URL for Javascript

2010-01-22 Thread thomaus
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? > > >

Re: Empty form after reloading a page

2010-01-22 Thread thomaus
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

Change default language on the fly in a view

2010-01-20 Thread thomaus
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

Re: Relative URL for Javascript

2010-01-20 Thread thomaus
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

Re: Empty form after reloading a page

2010-01-20 Thread thomaus
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

Relative URL for Javascript

2010-01-19 Thread thomaus
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

Empty form after reloading a page

2010-01-19 Thread thomaus
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

Re: Pagination with 2nd order recursive conditions filter

2010-01-13 Thread thomaus
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

Re: Pagination with 2nd order recursive conditions filter

2010-01-12 Thread thomaus
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

Re: Pagination with 2nd order recursive conditions filter

2009-12-27 Thread thomaus
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:

Form Builder

2009-12-26 Thread thomaus
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

Re: Pagination with 2nd order recursive conditions filter

2009-12-26 Thread thomaus
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, > > >

Problem Prototype / jQuery

2009-12-24 Thread thomaus
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

Re: Pagination with 2nd order recursive conditions filter

2009-12-21 Thread thomaus
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'

Pagination with 2nd order recursive conditions filter

2009-12-18 Thread thomaus
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

Re: Problem with AJAX submission

2009-12-14 Thread thomaus
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

Re: Share Javascripts and CSSs in various layouts

2009-12-11 Thread thomaus
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

Share Javascripts and CSSs in various layouts

2009-12-11 Thread thomaus
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

Re: Problem with AJAX submission

2009-12-11 Thread thomaus
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,

Re: Problem with AJAX submission

2009-12-11 Thread thomaus
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

Re: Problem with AJAX submission

2009-12-10 Thread thomaus
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: > > >

Re: Problem with AJAX submission

2009-12-09 Thread thomaus
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

Problem with AJAX submission

2009-12-09 Thread thomaus
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')); ?>

Re: Big problem with cake production setup

2009-12-03 Thread thomaus
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! :-( >

Views/layouts/js folder

2009-12-01 Thread thomaus
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

Re: Big problem with cake production setup

2009-12-01 Thread thomaus
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

Re: Big problem with cake production setup

2009-12-01 Thread thomaus
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

Big problem with cake production setup

2009-12-01 Thread thomaus
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

Re: About multilingual websites

2009-11-26 Thread thomaus
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

Re: About multilingual websites

2009-11-26 Thread thomaus
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

Re: About multilingual websites

2009-11-25 Thread thomaus
). > 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

Re: About multilingual websites

2009-11-24 Thread thomaus
/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

Re: Pass variables to Javascript

2009-11-24 Thread thomaus
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'

Re: Pass variables to Javascript

2009-11-23 Thread thomaus
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. > >

Re: Pass variables to Javascript

2009-11-23 Thread thomaus
; > 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

About multilingual websites

2009-11-23 Thread thomaus
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

Pass variables to Javascript

2009-11-23 Thread thomaus
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