Re: Problem with internationalization

2010-05-18 Thread Miles J
Its "fre" not "fr". Its always 3 letters. Also try: Configure::write('Config.language', 'fre'); On May 18, 8:35 am, 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, thomaus wrote

Re: Miles J Uploader help

2010-05-17 Thread Miles J
, true) . " {$this->error} span>", E_USER_WARNING); > > $sql    =       "INSERT INTO `user_preferences` (`user_id`, `sex`, > `birthdate`, > `hometown`, `introduction`, `image`, `modified`, `created`) VALUES (5, > 'Male', '2009-05-17', 'Lo

Re: Miles J Uploader help

2010-05-17 Thread Miles J
Also forgot to say, this line should be "image" instead of "file", since thats what you called it with the form helper. 'Uploader.Attachment' => array( 'image' => array( On May 17, 7:57 pm, bradmaxs wrote: > I am trying to implement miles j's uploader plugin and am having > trouble makin

Re: Miles J Uploader help

2010-05-17 Thread Miles J
Im pretty sure you do not need this line: if ($data = $this->Uploader->upload('image')) { The Attachment behavior does the uploading automatically. Also if you want to validate the image (like dimension size), you will need to use the Attachment and FileValidation behavior at the same time. On

Re: Calling controller from view Vs using define

2010-05-14 Thread Miles J
What kind of data are you passing? Just place this in your AppControllers::beforeFender(); $this->set('var', $this->myFunc()); On May 14, 4:56 am, Mandy Singh wrote: > Hi Everyone, > > Quick question: > > I need to get something in the view (all views) for which I have a > function defined in t

Re: i18n / l10n Problem with Cake 1.3

2010-05-12 Thread Miles J
If you want German, its "deu" and not "ger". I ran into this problem also. On May 12, 8:53 am, John Andersen wrote: > Check that your directory names and file names are in the expected > case (upper/lower)! > Ensure that CakePHP have read access to the directories! > Hope this helps you, >    Joh

Re: Can Any One Hellp me To add php extension in netbeans

2010-05-11 Thread Miles J
You have your own web company and website, but couldn't figure out how to get PHP on Netbeans? 1 - Download the PHP version: http://netbeans.org/downloads/index.html OR 2 - Open the IDE and go to Tools > Plugins and download PHP -Miles On May 11, 1:22 am, Dilip Godhani wrote: > hello > Can On

Re: belongsTo not behaving as expected

2010-05-07 Thread Miles J
Can we see your associations and full find query? On May 7, 9:47 am, "WoJo&Co" wrote: > Hi there, > > I've got an associations issue that I can't fathom where I've made the > mistake in. > > I have: > > User hasMany Member > Project hasMany Member > Member belongsTo User, Project > > Which is es

Re: How i change time zone in cakephp?

2010-05-07 Thread Miles J
The only setting I am aware of is the one in core.php. If you need to set any other timezone related variables, you can do so in config/ bootstrap.php. You can also manually set them with the time helper. $this->Time->format('Y-m-d', time(), false, +5); On May 7, 12:31 am, Dilip Godhani wrote:

Re: Model data structure inconsistent?

2010-05-07 Thread Miles J
I don't see the benefit for this structure. Seems like twice the work for no gain. Cakes current implementation is best. The primary model and all relations usually return within the same dimension, as it does not need to be in hierarchical dimensions unless its a deep relationship. On May 7, 9:0

Re: passing more parameters leads to duplicate content

2010-05-05 Thread Miles J
But how are they duplicates? /users/profile/1/ /users/profile/2/ /blog/read/some-slug/123/ /blog/read/slug/12356/ /image/view/15 None of those are duplicates. Why would you pass arguments that ultimately don't decide how the action renders? On May 5, 8:17 am, Lucca Mordente wrote: > What about

Re: Implementing uploadify - File upload issue - param definitions issue

2010-05-03 Thread Miles J
gt; > - S > > On 3 May 2010 18:04, Miles J wrote: > > > It would be better to actually use an uploader that was built for > > Cake. > > >http://github.com/milesj/uploader > > > On May 3, 5:28 am, abocanegra wrote: > > > Could you clarify what you

Re: Implementing uploadify - File upload issue - param definitions issue

2010-05-03 Thread Miles J
It would be better to actually use an uploader that was built for Cake. http://github.com/milesj/uploader On May 3, 5:28 am, abocanegra wrote: > Could you clarify what you mean by admin routing. I have it working > solidly in my multi-user admin system. I have chosen to save the data > outside o

Re: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-05-02 Thread Miles J
Hence why I said just use plugins, cause the conventions are automatic. On May 2, 1:56 am, AD7six wrote: > On May 1, 10:32 pm, Jamie wrote: > > > > > On May 1, 1:21 pm, AD7six wrote: > > > > On May 1, 10:19 pm, Jamie wrote: > > > > > On May 1, 1:17 pm, AD7six wrote: > > > > > > On May 1, 10:1

Re: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-04-30 Thread Miles J
. > don't just read) the blog tutorial and try with a browser. > > On Apr 29, 7:12 pm, Miles J wrote: > > > Well its simple. You cant put controllers within subfolders. Cake > > doesn't support it. > > Miles, > > You're doing that my-assumptions =

Re: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-04-29 Thread Miles J
' ) . DS, >         ... other paths for controller lookup >     ), > )); > > should work for you. I am not sure if you need to set the "normal" > path as one of the array items or not. Play around and let us know. > > On Apr 29, 10:12 am, Miles J wrote: > > > &

Re: 1.3 Session issue

2010-04-29 Thread Miles J
Its public $components, not public $component. On Apr 29, 2:10 pm, Sam Sherlock wrote: > Have you got the code doubled?? within the app controller? > > - S > > On 29 April 2010 20:16, Jørn wrote: > > > > > Hi, > > > i'm having trouble getting sessions to work in 1.3. > > > I've understodd that I

Re: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-04-29 Thread Miles J
Well its simple. You cant put controllers within subfolders. Cake doesn't support it. If you want to put controllers within subfolders, you have to make it a plugin. On Apr 29, 7:38 am, Matthew wrote: > Here is my basic file structure > > app/controllers -> >                      /categories/cat

Re: Updating user values in Auth component

2010-04-28 Thread Miles J
I prefer this method: http://www.milesj.me/blog/read/31/Refreshing-The-Auths-Session On Apr 28, 9:22 am, John Andersen wrote: > Without changing anything in the Auth component, I do think that you > could redo the login of the current user, when you have updated the > users information - for exa

Re: Unsupported operand types

2010-04-28 Thread Miles J
What PHP version are you using? On Apr 28, 2:43 am, emanuele wrote: > Sorry.. > > HtmlHelper::css() no longer has an $inline parameter. Use > $options['inline']instead > > :) > > On Wed, Apr 28, 2010 at 10:44 AM, emanuele wrote: > > Could somebody provides me some information about => $options +

Re: Vendors and Controller

2010-04-27 Thread Miles J
A component is coupled to the controller, a behavior is coupled to the model, and a helper is coupled to the view. Vendors are 3rd-party stand alone scripts. On Apr 27, 12:50 am, emanuele wrote: > is there any chance to use my own component in my own datasource ( > /app/models/datasources/ I nee

Re: Problems with $persistModel and cache

2010-04-26 Thread Miles J
'foreignKey' => 'weapon2_id' ), On Apr 26, 10:19 pm, Jeremy Burns wrote: > Have you cleared down the contents of /app/tmp/cache/persist and > /app/tmp/cache/models? > > Jeremy Burns > jeremybu...@me.com > > On 27 Apr 2010,

Re: Problems with $persistModel and cache

2010-04-26 Thread Miles J
; > On 27 Apr 2010, at 06:13, Miles J wrote: > > > > > I have been upgradingwww.sc2armory.comto 1.3 and have been having a > > terrible cache problem. I have many tables with extreme relations to > > get the game guide working. When I enable $persistModel, all the game &

Problems with $persistModel and cache

2010-04-26 Thread Miles J
I have been upgrading www.sc2armory.com to 1.3 and have been having a terrible cache problem. I have many tables with extreme relations to get the game guide working. When I enable $persistModel, all the game pages go to a white page and I get this in my error logs: Just a heads up as I dont know

Re: Release: CakePHP 1.3.0

2010-04-26 Thread Miles J
I upgraded www.sc2armory.com to the new 1.3 stable :] On Apr 26, 9:27 am, Christian Leskowsky wrote: > This looks like a great release. > > Q for ya: I didn't notice any performance-related above or in the manual. > Have you guys done any internal benchmarking on 1.3? I'd be interested to > hear

Re: Calling actions inside a controller

2010-04-26 Thread Miles J
Or you can use $this->setAction(). On Apr 25, 10:54 pm, Jeremy Burns wrote: > $this->functionName(); > > Jeremy Burns > jeremybu...@me.com > > On 25 Apr 2010, at 23:40, Eric Anderson wrote: > > > > > Hi everyone, > > > I was unable to find the answer to this question in the 1.2.x > > documentatio

Re: Where to draw the line?

2010-04-22 Thread Miles J
Wait, so your saying you used the HTMLHelper div() method to build everything? Should just stick with static divs. On Apr 22, 2:34 am, Sam Sherlock wrote: > I think its a question of clarity and ease to create maintain views > > - S > > On 22 April 2010 09:47, Ed Propsner wrote: > > > > > I'm wi

Re: How to display form submitted data without using model and with model in the same controller

2010-04-22 Thread Miles J
You can also just use $_POST directly. Its not like its disabled or anything. On Apr 22, 10:21 am, Renato de Freitas Freire wrote: > I dont know if I got what you want to know.. > but try to put " in the array key: >  echo this->data["name"]; > > and, since you're echoing in the controller, try t

Re: _controller convention

2010-04-20 Thread Miles J
There is no real reason. Just makes it easier to differentiate files that are open in your editor. On Apr 20, 8:14 pm, Bryan Lim wrote: > But don't the model and view need a _model or _view then? > > what is the rationale behind having a _controller? > > Thanks! > Bryan > > On Apr 20, 10:57 pm, c

Re: Bookmarkable AJAX URLs

2010-04-20 Thread Miles J
Then make the chat AJAX only, not the page. AJAX is primarily used for small sections on the site. On Apr 19, 10:57 pm, Dmitry Shevchenko wrote: > Thank you for you advices, but I can't stop using ajax on my site, I > have a chat window on my pages, so if page will reloaded - I have to > relogin

Re: modelClass value changing - bug of feature?

2010-04-20 Thread Miles J
The $modelClass is only created when you do not define the $uses. On Apr 20, 8:45 am, Leonid Mamchenkov wrote: > Hi, > > On Tue, Apr 20, 2010 at 18:04, jharris wrote: > > > Since you're using multiple models in your controller (the $uses var), > > I think Cake is just getting confused. On constr

Re: mac users, which ide are you using to develop cakephp?

2010-04-19 Thread Miles J
Netbeans user here too :] Loving it. On Apr 19, 1:24 pm, kadanis wrote: > As a Mac user and a netbeans one, I agree.  Its a great app.  I can't > comment or compare against the others as I haven't really tried them > out, except Eclipse which I just didn't get on with. > > Being a PHP and Python

Re: Bookmarkable AJAX URLs

2010-04-19 Thread Miles J
Dont make everything AJAX. Its really pointless if you are loading the whole content anyways. It also breaks SEO and then you run into problems like this. On Apr 19, 9:05 am, Dmitry Shevchenko wrote: > Hi! > Thank you Bert Van den Brande for answer. > > I have added a js script for modify browse

Re: is it advisable to use jquery on cakephp?

2010-04-19 Thread Miles J
You use whatever you are comfortable with. I use jQuery without the helpers, because the helpers just seem pointless. On Apr 19, 7:39 am, Matthew Powell wrote: > I use it, without the helper.  If using jQuery + Cake is wrong, I don't want > to be right. > > Good luck, > > Matt > > > > On Mon, Apr

Re: Proper way to handle empty localization strings?

2010-04-18 Thread Miles J
The proper way in Cake to do l10n is to use full sentences. Not keys/ slugs for the msgids. By doing so you can use Cakes l10n shell. On Apr 18, 9:38 pm, "O.J. Tibi" wrote: > Localization strings in PO files should not be treated on a word-for- > word basis. It is much more convenient to enter p

Re: Proper way to handle empty localization strings?

2010-04-18 Thread Miles J
If there is no msgstr, it outputs the msgid. 1 - Not a bug. 2 - Why do you need to get an empty string? On Apr 18, 2:59 am, Vesa Jääskeläinen wrote: > Hi All, > > In some situations some localization entries in .po file can have > empty strings defined in some languages and in some other langua

Re: the plugins dont work at all

2010-04-17 Thread Miles J
I stand corrected. However, it took me a while to find the tip that the same name for controller and plugin can be used for an index. Dont know why thats not on the plugin controller page. On Apr 17, 3:13 am, jacmoe wrote: > Yes, I know that. :) > That's why I was wondering what was going on. >

Re: the plugins dont work at all

2010-04-16 Thread Miles J
//book.cakephp.org/view/1113/Plugin-Controllers > > On Apr 16, 9:47 pm, AD7six wrote: > > > > > On Apr 16, 9:39 pm, Miles J wrote: > > > > You are doing it wrong, the URLs would be like so: > > > > domain.com/controller/action/ > > > domain

Re: the plugins dont work at all

2010-04-16 Thread Miles J
You are doing it wrong, the URLs would be like so: domain.com/controller/action/ domain.com/plugin/controller/action/ You cant go to domain.com/plugin/ and have it work without setting up routes. On Apr 16, 11:18 am, Martin Westin wrote: > Hi, > Plugins do work. I have whole apps build with a l

Re: AppController being cached?

2010-04-16 Thread Miles J
Are you uploading it to the right directory? Correct naming, etc. On Apr 15, 5:47 pm, Lucca Mordente wrote: > That's the point. No change is being reflected. > And the website continues to work even when the app_controller.php file is > deleted, as if it was there. > > Lucca Mordente > > > > On T

Re: HtmlHelper and Routes

2010-04-09 Thread Miles J
@Cricket - Thats how its done in 1.3. @Signified - Everything you said is correct and should happen, I use it all the time. Im actually quite lost as why thats not working, it looks correct. Try this: Router::connect('/login/*', array('controller' => 'users', 'action' => 'login')); On Apr 9, 4:2

Re: Sessions folder is getting huge

2010-04-09 Thread Miles J
Maybe you have a lot of sessions? Try switching it to using a database. On Apr 9, 5:20 am, DeepJaguar wrote: > Hi all, > > I have a problem with the tmp/sessions folder. For one of my sites the > folder is 25GB already! What can be the problem? > > Best Regards, > Jeffrey Check out the new Cake

Re: using Cake data in external script

2010-04-09 Thread Miles J
What exactly are you trying to use? Cakes system is so tightly coupled with it self, that its going to be near impossible to use certain parts of it externally. On Apr 9, 9:18 am, Paolo wrote: > Hi all, I'm trying to use Cakephp data in an external script, I used > to do something like this in 1

Re: Any popular Image Components being used that are better than the rest?

2010-04-08 Thread Miles J
I have also written an upload plugin. Its not super powerful, but it does the most basic of tasks. http://www.milesj.me/resources/script/uploader-plugin On Apr 8, 3:18 am, Vadim Frolov wrote: > MeioUpload could help > > Vadim. Check out the new CakePHP Que

Re: naming convention

2010-04-08 Thread Miles J
However, you don't need a controller per model. The controller can be whatever you want. On Apr 8, 7:39 am, Jeremy Burns wrote: > First convention: one message is probably enough! > > model: filename adb_usre.php, model name AdbUsre > view directory: adb_usres > controller: filename adb_usres_con

Re: displaying login details

2010-04-07 Thread Miles J
All of these examples are wrong. You should be using the Auth component, and in turn doing: $this->set('user', $this->Auth->user()); Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscri

Re: echo JSON

2010-04-05 Thread Miles J
Its because you are calling $this->render(). I am 99% sure that doesn't return the content, it just triggers cakes view rendering process. On Apr 5, 4:05 pm, "Dave" wrote: > I had same issue but solved it with adding exit(); where you have return > null;. > > Dave > > -Original Message-

Re: I can't get the value of session in controller

2010-04-02 Thread Miles J
Ok what is aa.php and bb.php for? On Apr 2, 10:07 am, scottmdahl wrote: > Have you included the Session component at the top of your controller > like: var $components = array('Session'); > > Scott > > On Apr 1, 12:01 am, Rimoe wrote: > > > Thank you, > > > just use > > > $this->Session->write('

Re: Undefined variable: javascript

2010-04-01 Thread Miles J
Ive ran into that problem many times. Its usually not caused by $javascript at all, its caused by Cake doing some weird auto magic functionality. You need to remove components/helpers/etc and then add them 1 by 1 till you figure out whats causing it. On Mar 31, 11:39 pm, Jeremy Burns wrote: > Try

Re: How to pass an array trough URL??

2010-04-01 Thread Miles J
hanks > Tomas > > On 30 bře, 19:00, Miles J wrote: > > > It seems like this should be a POST. But besides that, it should work > > fine. > > > On Mar 29, 11:41 pm, "toka...@gmail.com" wrote: > > > > I am developing a simple public API where I n

Re: I can't get the value of session in controller

2010-03-30 Thread Miles J
Why are you triggering the session in aa.php and bb.php? What are those for anyway? The session component does all the session starting and magic automatically. On Mar 30, 1:40 am, Jeremy Burns wrote: > Have you tried using the session component and helper instead of accessing > the session dir

Re: CakePHP 1.3.0-RC3 unleashed

2010-03-30 Thread Miles J
The changed it from $var to $this->Var simply so that manually set variables don't conflict with helper variables. On Mar 30, 9:28 am, Jeremy Burns wrote: > I believe that whilst both work, the first is the way to go now; i.e. > $this->Html, $this->Form etc. > > Jeremy Burns > jeremybu...@me.com

Re: How to pass an array trough URL??

2010-03-30 Thread Miles J
nt? > > Thanks > Tomas > > On 29 bře, 19:02, Miles J wrote: > > > Is there a reason your passing data like this through URLs? What are > > you trying to achieve? > > > On Mar 29, 9:04 am, "toka...@gmail.com" wrote: > > > > I have solved it.

Re: How to pass an array trough URL??

2010-03-29 Thread Miles J
Is there a reason your passing data like this through URLs? What are you trying to achieve? On Mar 29, 9:04 am, "toka...@gmail.com" wrote: > I have solved it. pretty simple. > > examples.com/:controller/:action/? > names[]=John&names[]=Tomas&names[]=Susan > > then just call > $this->params['url']

Re: try/catch action

2010-03-24 Thread Miles J
tion with a try/catch statement and generic > handling. > > To avoid this redundancy, I would like to wrap the action call in the > dispatcher with generic Exception handling. > > On Mar 24, 1:49 pm, Miles J wrote: > > > I believe you can just do something like this, especially

Re: try/catch action

2010-03-24 Thread Miles J
I believe you can just do something like this, especially if its an AJAX call and you want to simply return a json response. public function action() { try { // Do something here } catch(Exception $e) { echo json_encode(array(

Re: What's __() function?

2010-03-23 Thread Miles J
__() is used for translation. It matches a slug with the correct mo/po file within the correct language/region. Its for localization. On Mar 23, 5:11 pm, saidbakr wrote: > Hello, > This is an example: > [CODE] > $this->Session->setFlash(__('Post is not found.', true)); > [/CODE] > > What is the

Re: Change __() default behavior

2010-03-22 Thread Miles J
Well just edit the core, as thats the only way. :P Just make sure that each time you upgrade the version you revert it back. On Mar 22, 6:44 pm, xtraorange wrote: > Howdy all, > > This should be a quick one: > Is there any way, without editing the cake core (so that upgrades are > easy), to switc

Re: Fata error: non-object ?

2010-03-22 Thread Miles J
@Loboto - Thats wrong. Controller classes would be: UserDetailsController. Only the last word is pluralized, not all of them. On Mar 22, 10:06 am, "Dr. Loboto" wrote: > Proper names by Cake conventions: > > DB table: users_details > Model class: UserDetail > Model name: UserDetail > Model file

Re: Cake rendering a time comment in views

2010-03-18 Thread Miles J
It only shows up if debug is greater than 0. On Mar 18, 2:53 pm, Gideon wrote: > Hi all, > > Every time a view is rendered I get an HTML-style comment with a time > in it (presumably the execution time of the page). How do I get rid of > this? > > Thanks. Check out the new CakePHP Questions site

Re: Model Associations - just feels wrong

2010-03-18 Thread Miles J
ing I would here this confirmation you two are > providing. I was on the fence and worried I'd come to understand it > wrong. Maybe serendipity, but I feel like I'm in good shape now. > Thanks a lot. > > On Mar 18, 7:14 pm, Miles J wrote: > > > The terms "hasOn

Re: Model Associations - just feels wrong

2010-03-18 Thread Miles J
The terms "hasOne", "hasMany", "belongsTo" and "HABTM" and just terms to make it easier to understand. It doesn't actually mean that one table belongs to another table 100% of the time, its just the easy way of saying. But in your example, it seems like ZipLocation belongsTo State and State hasMan

Re: Insert JavaScript with PHP included in $html->link, possible?

2010-03-18 Thread Miles J
This should do it: link($html->image("edit.png", array("alt" => "edit")), 'javascript:;', array('class' => 'edit', "title" => "edit", 'onclick' => 'toggleId('. $zeile .')'), false); ?> On Mar 18, 3:39 pm, sebb86 wrote: > Hello, > i want to isert a mixed Code (javascript and php) into my $html->l

Re: PHP 5.3 open short tag does't working on cakePHP 1.2.6

2010-03-14 Thread Miles J
#x27;re right! > > but somehow open_short_tag affect in making template more clean > > i see it's support on another framework and i don't talk about comparing > something :D > > Just an idea > > On Sun, 2010-03-14 at 03:36 -0700, Miles J wrote: > > Its only 6 m

Re: PHP 5.3 open short tag does't working on cakePHP 1.2.6

2010-03-14 Thread Miles J
Its only 6 more characters to write wrote: > Perhaps someday it's can be fixed without open_short_tags enable. > > IMHO, using open_short_tags giving clear templates code as well . > > On Sat, 2010-03-13 at 14:36 -0800, Miles J wrote: > > That's the only wa

Re: PHP 5.3 open short tag does't working on cakePHP 1.2.6

2010-03-13 Thread Miles J
That's the only way to fix it. Its an ini setting. On Mar 13, 11:07 am, John Andersen wrote: > Please apply the solution you already know about, enable the short > tags in the php.ini file! > There is as far as I know, no other solution ... except for you to go > through all your source code and

Re: Question related to database engine usage in CakePHP

2010-03-12 Thread Miles J
Row locking instead of table locking. On Mar 12, 8:25 am, "Dr. Loboto" wrote: > Transactions, as always. > > On Mar 12, 6:04 pm, Varga Levente wrote: > > > Hello! > > > Is something gained if instead of MyISAM engine the InnoDB is used with > > CakePHP? > > > levi > > > -- > > Lege, lege, releg

Re: Checking RequestHandler::isPost() vs Controller's data

2010-03-10 Thread Miles J
bit more specific regarding the bugs you've seen? > > Thanks, > > On 10 mar, 00:17, Miles J wrote: > > > Yes exactly. RequestHandler would force it only if the HTTP method is > > POST, where as $data would work no matter what source it came from. I > > prefer

Re: Checking RequestHandler::isPost() vs Controller's data

2010-03-09 Thread Miles J
Yes exactly. RequestHandler would force it only if the HTTP method is POST, where as $data would work no matter what source it came from. I prefer RequestHandler, but it has been buggy sometimes. On Mar 9, 6:10 pm, Jimmy Bourassa wrote: > Hello, > > I realized that everyone seems to do an empty()

Re: protect source code & security salt ...

2010-03-08 Thread Miles J
No one can access the files unless they get in through your FTP or cpanel. Make sure everything is protected safely: FTP, SSH, etc. On Mar 8, 11:27 pm, "toka...@gmail.com" wrote: > Hi, > How can I protect my (cake) PHP code  when putting my app on > webhosting? > > I need to be sure: > > 1) that

Re: Flame Post: Performance 1.2.6 vs 1.3.0-RC1 - Bad news.

2010-03-05 Thread Miles J
It honestly doesn't matter in the end once caching, memcached and APC are running. The same applies to any framework, you just go with whatevers comfortable for you. On Mar 5, 1:41 am, nurvzy wrote: > I've been using 1.3 for production site with zero issues thus far. > > On Mar 5, 2:34 am, Webbe

Re: file upload with ajax

2010-03-04 Thread Miles J
zurb.com/playground/ajax_upload > > > On Mar 4, 7:12 am, WebRenovator wrote: > > > > My apologies. I was using SWFUploader to do the multiple file uploads. > > > > On Mar 3, 7:54 pm, Miles J wrote: > > > > > @WebRenovator - Its impossible to upload

Re: CakePHP Auth-component in AppController

2010-03-04 Thread Miles J
What does your beforeFilter look like? Make sure your not allowing the login page. On Mar 4, 7:27 am, LDSign wrote: > Hi > > Ive implemented the login-logic with help of Auth. This works fine. > But I would like to have auth all over my site. So I would like to > include this component to the Ap

Re: file upload with ajax

2010-03-03 Thread Miles J
@WebRenovator - Its impossible to upload files through XMLHttpRequest like Andy said, im not sure what you think you are referring to. On Mar 3, 7:33 am, Andy Dirnberger wrote: > XMLHttpRequest cannot upload files. The two ways to give the > appearance of Ajax are with Flash (e.g., Uploadify, SWF

Re: file upload with ajax

2010-03-02 Thread Miles J
File uploading with AJAX is impossible. You'll have to use a plugin/library to do mimic it: http://valums.com/ajax-upload/ On Mar 2, 12:37 pm, donnerbeil wrote: > Hi all, > > I'm trying to upload images with ajax. But in my controller in this->data > only the values of the text input fields ar

Re: Miles J Uploader

2010-03-01 Thread Miles J
Does $resized_path output an actual path? And does the image exist in the upload directory? On Mar 1, 3:54 pm, "Dave" wrote: > I cant resize an image and just not sure where im going wrong since it seems > pretty clear. I canupload animage but after that when I add the resize I get > nothing. > >

Re: Jquery thick box closing problem

2010-03-01 Thread Miles J
Sorry but this is a CakePHP forum, not a Thickbox forum. It would be best to ask this question in a Javascript forum or on the official Thickbox site. On Mar 1, 6:42 am, DAM wrote: > I integrated cakephp & jquery thickbox It's working properly but after > submitting form data thickbox not close.

Re: cakephp shell not validating before entering into db?

2010-02-26 Thread Miles J
@WebbedIT - It doesnt care what format it is in. I always save the array without prefixing the index with the model name. On Feb 26, 12:48 am, WebbedIT wrote: > The array you're passing to the save command is in the wrong format. > > It should be $this->Issue- > > >save(array('Issue'=>array('titl

Re: cakephp shell not validating before entering into db?

2010-02-25 Thread Miles J
How does the model know that test is used? Is title unique or primary? You should be doing another query above hand checking to see if query is taken, if its not do another query and insert. On Feb 25, 12:39 pm, Jim wrote: > Hello, > > I have a model called Issue, which when its associated contr

Re: Accessing Model.Method from Component using ClassRegistry

2010-02-17 Thread Miles J
The reason findById() works is because its part of the Model/AppModel, not your create model. Just fix the problems with your model and you'll be fine. On Feb 17, 8:31 am, anl hp wrote: > There are two ways: > 1- $model = ClassRegistry::init('TheClassModelYouWant'); > 2- if the model you need is

Re: Accessing Model.Method from Component using ClassRegistry

2010-02-16 Thread Miles J
Your AppModel is being used instead of the actual model. This usually happens when your model is misspelt or its filename is wrong. On Feb 16, 8:00 pm, amiable_indian wrote: > I am trying to access one of the models ( Example ) from my Component > ( TestComponent ). The Example model is similar t

Re: How to include a button which links to a view?

2010-02-16 Thread Miles J
Or you can just do it the normal way: Go to On Feb 16, 8:17 am, sebb86 wrote: > WebbedIT > > It works. Thanks a lot! :) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the

Re: how to disable bottom CakePHP section (query, errors, ...)

2010-02-15 Thread Miles J
You turn debugging off. This is only there in development. Configure::write('debug', 0); On Feb 14, 11:03 pm, sebb86 wrote: > Hello, > how can i disable the CakePHP section (in this section are sql > statements) on the bottom of each view? > > Thanks a lot! Check out the new CakePHP Questions s

Re: Model Relations / Performance

2010-02-12 Thread Miles J
If the model you need can be found as the child of another model, use that one. Its the same as creating a new object of the same name. But using the previous method stops you from instantiating duplicate objects. On Feb 12, 1:07 pm, Dave wrote: > Just wondering if there is a performace loss whe

Re: How to make a form post to named parameters ?

2010-02-12 Thread Miles J
come to think about it, that makes sense... > > Maybe another workaround would be to generate some bit of javascript > that would intercept the submit event, and do a redirect with the > named parameters. > > I'm going to write a component or a helper that does that. > >

Re: How to make a form post to named parameters ?

2010-02-12 Thread Miles J
Its impossible, that functionality is part of HTTP and your browser. The work around is posting to another page, and having that page redirect with the named parameters. I wrote a component that does this automatically, but I haven't really tested it in a while: http://github.com/milesj/data_kit

Re: Access Global Function in CakePHP

2010-02-11 Thread Miles J
Not everything has to be OOP. Im still confused at what your trying to achieve. On Feb 10, 11:39 pm, Martin Westin wrote: > I can not imagine why you would use a localized variable variable. > Anyway... > > $temp_var = __('String',true); > echo "{${$temp_var}}"; > > On Feb 11, 8:14 am, Mukhamad I

Re: Calling Controller Methods from Another Controller

2010-02-08 Thread Miles J
Yes, anything to do with model/database logic should be placed in the model. The controller is used to pass the data from the model into the correct view. On Feb 8, 6:56 pm, dtirer wrote: > Actually, just read something about putting such methods in the Model, > rather than the Controller > > So

Re: Differences

2010-02-08 Thread Miles J
What are major differences between Symfony? They are completely different frameworks, so basically everything. But in the end, all frameworks do the same thing. What is equivalent of slots and partials (are they "elements"?) in Cake? Yes, elements. Is it true there is no activerecord in cake? Act

Re: How to Handle images w/ a Route

2010-02-07 Thread Miles J
Quick question, why are you routing it to a controller, if the path is basically the same? On Feb 7, 7:19 pm, Kyle Decot wrote: > I store all of my full size images at something like /img/photos/ > filename_goes_here.jpg I would like to be able to add a route so that > if I visit /img/photos/75x7

Re: Uploader Component

2010-02-07 Thread Miles J
Yes it can, you can see an example in #5: http://www.milesj.me/resources/script/uploader-plugin#Uploading-Multiple-Files $data and $resized_path will contain paths for the uploaded and resized images, both of them. On Feb 6, 11:27 pm, "Dave" wrote: > Does anyone know Can the uploader component u

Re: Doing CakePHP 1.2.x in PHP 5 way

2010-02-04 Thread Miles J
              } > > etc > > otherwise the error messages in this particular case would not be > translated > > by the way: > i always hated the fact that beforeFilter() ist not invoked on > errors... > > On 4 Feb., 19:06, Miles J wrote: > > > He shouldn't

Re: Doing CakePHP 1.2.x in PHP 5 way

2010-02-04 Thread Miles J
> they have nothing to do with each other > > if you need to override any of the above you should always call the > parent > > parent::__construct() > > and > > parent::beforeFilter(); > > etc > > On 4 Feb., 08:46, Miles J wrote: > > > beforeFi

Re: Doing CakePHP 1.2.x in PHP 5 way

2010-02-03 Thread Miles J
beforeFilter() isn't a constructor. Its just a normal method, which is used as a callback. You should never overwrite the constructor as it has important code. That's what the callbacks are for, to define custom code to not conflict. Also, this has nothing really to do with PHP 4 or 5, its a arch

Re: app function

2010-02-03 Thread Miles J
You must have the model Link defined and loaded before you run your navigation method. On Feb 3, 9:38 pm, "Dave" wrote: > How do i run a function from app controller? > > in app_controller i have  in beforeFilter { > $this->buildNavigations(); > > } > > function buildNavigations() >   { > >    $l

Re: Plugin using different Dynamic Database Connection

2010-02-03 Thread Miles J
;m creating a database table which contains the database connection > >> credentials so i can have thousands hundreds of config... so i can manage > >> other news articles table databases using same plugin... > > >> On Tue, Feb 2, 2010 at 12:51 PM, Miles J wrote: > &g

Re: checking whether a table exists

2010-02-03 Thread Miles J
t; cake console, don't you? > > cheers >         Lorenzo > > > > Miles J wrote: > > I had to do the same thing for my plugin. Simply dont use Models. > > >http://github.com/milesj/forum/blob/master/controllers/install_contro... > > > On Feb 1, 11:39

Re: Identifying the moment of successful login using AuthComponent

2010-02-02 Thread Miles J
gt; > I'm guessing I could modify a few lines in AuthComponent to add a > callback, and get the behavior I want--but I'd rather not go down that > road if there are simpler options. > > On Feb 2, 1:30 pm, Miles J wrote: > > > I added the this functionality to one of my p

Re: Identifying the moment of successful login using AuthComponent

2010-02-02 Thread Miles J
I added the this functionality to one of my plugins: http://github.com/milesj/forum/blob/master/controllers/users_controller.php#L114 On Feb 2, 1:22 pm, Johnny Cupcake wrote: > How can I run code on AuthComponent's successful login _event_?  For > example, to record the login date/time in the da

Re: Uploader Component

2010-02-02 Thread Miles J
The thumbnail() method is no longer supported in the newer versions. http://www.milesj.me/resources/script/uploader-plugin#Generating-Thumbnails On Feb 2, 12:49 pm, "Dave" wrote: > I keep getting: > > Fatal error: Call to undefined method UploaderComponent::thumbnail() > > I want to upload 1 ima

<    1   2   3   4   5   6   7   8   9   10   >