Re: jquery cakephp post data problem

2009-07-05 Thread Miles J
Are you getting a response back in the ajax request? And are the correct HTTP post headers being sent? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: Problems w/ Commentia Behavior

2009-07-05 Thread Miles J
'); } ? My table structure looks almost identical to the one on your blog but I did add some extra fields (IP address, model). On Jul 5, 5:34 am, Miles J mileswjohn...@gmail.com wrote: May I see your $actsAs? And what are the names of your comments table and the model you

Re: App::import and Classregistry

2009-07-05 Thread Miles J
Well the correct and only way is calling the type: App::import('Model', 'ModelName'); But its best to just use loadModel() in the controller. $this-loadModel('ModelName'); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: App::import and Classregistry

2009-07-05 Thread Miles J
Well firstly id like to know why you are importing and initiating controllers? --~--~-~--~~~---~--~~ 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

Re: Problems w/ Commentia Behavior

2009-07-05 Thread Miles J
Well you need to set the parent model that comments are a part of, like so: var $actsAs = array('Commentia', array( 'parent_model' = 'Blog', 'column_foreign_id' = 'blog_id' // foreign key found in the comments table )); var $actsAs = array('Commentia', array(

Re: jquery cakephp post data problem

2009-07-05 Thread Miles J
Are you using Auth at all? Also try setting your session security to medium or low if its not. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: jquery cakephp post data problem

2009-07-04 Thread Miles J
Try changing this: data: ajax=trueid=+selected, To: data: data[ajax]=truedata[id]=+selected, And then you can grab the data with $this-data['ajax']; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group.

Re: Which branch should I work on?

2009-07-03 Thread Miles J
Well of course 1.3 is broken, its heavily in development. --~--~-~--~~~---~--~~ 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,

Re: Write to log table for every successful update/delete

2009-07-03 Thread Miles J
Why? If anything log to text files. --~--~-~--~~~---~--~~ 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

Re: Preferred location for app_model.php and app_controller.php

2009-07-02 Thread Miles J
It goes in the /app/ root. --~--~-~--~~~---~--~~ 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

Re: Models cache

2009-07-02 Thread Miles J
Delete the items in /persistent/ --~--~-~--~~~---~--~~ 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

Re: fixed: space after ? tag (Was also: output_buffering FTW (Was: Auth session getting destroyed?))

2009-07-02 Thread Miles J
Just a note, you dont need ? at the end of your php files. The file will work the same regardless, and you wont run into these problems. On Jul 2, 1:41 pm, GravyFace gravyf...@gmail.com wrote: For the love of --- Anyways, it's working now. /me downs beer in triumph, shakes fist at sky. On

Re: selected not working

2009-07-02 Thread Miles J
Use $form-input('Suburb.id', array('type' = 'select')). And to populate the form just set the data in the controller: $this-data = $data; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to

Re: Save method not working,working only on inserts

2009-07-02 Thread Miles J
$this-Resource-id = 1000; $this-Resource-save() --~--~-~--~~~---~--~~ 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

Re: Containable Behaviour Join Table

2009-07-02 Thread Miles J
No you cannot get rid of it, it also doesnt cause any more queries or stress on the database. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: Validate

2009-06-30 Thread Miles J
Um just put the var $validate in AppModel, thats it. On Jun 29, 10:28 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote:  Just not sure how to go about it... How do I define them in app_model then relate them to each  model when needed. -Original Message- From: Miles J

Re: Time redirection in cakePHP ?

2009-06-30 Thread Miles J
But header() is instant, not timed. On Jun 30, 1:58 am, rich...@home richardath...@gmail.com wrote: CakePHP is still PHP, header() works just fine :-) On Jun 29, 8:49 pm, Techinfocomp.com xpha...@gmail.com wrote: header(refresh:5; url='pagetoredirect.php'); we can use this if we want to

Re: recursive = -1

2009-06-30 Thread Miles J
I would recommend setting it to -1 in your AppModel, and then use Containable everywhere else. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: File Upload validation in cakephp 1.2

2009-06-30 Thread Miles J
You can use my file upload plugin, it comes bundled with validation rules. http://www.milesj.me/resources/script/uploader-plugin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group,

Re: Delete current login user sessions

2009-06-30 Thread Miles J
Your session is local and only applies to you, so the way you are suggesting would not work. You would have to save the session id to the database, and do a check to see if it changed. If it changes then destroy the session. --~--~-~--~~~---~--~~ You received this

Re: Auth session getting destroyed?

2009-06-30 Thread Miles J
What are your session/core/auth settings? May we also see your login action. --~--~-~--~~~---~--~~ 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

Re: Auth session getting destroyed?

2009-06-30 Thread Miles J
Try setting your security level to medium and see what happens. --~--~-~--~~~---~--~~ 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

Re: Using FCKEditor in a Plugin

2009-06-29 Thread Miles J
If you are using jQuery, I highly suggest you use MarkItUp. Its about 90% lighter and easier then Tiny MCE and FCK Edit. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Re: Time redirection in cakePHP ?

2009-06-29 Thread Miles J
You would have to use javascript or meta refresh. --~--~-~--~~~---~--~~ 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

Re: Validate

2009-06-29 Thread Miles J
Well yes you could apply them in app model. Is that your main question? --~--~-~--~~~---~--~~ 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

Re: Containable grabbing too much data

2009-06-28 Thread Miles J
I was planning to, but I really dont know how to explain it or what the real problem is. For all I know, the afterFind() really isnt the problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post

Re: Caching data

2009-06-28 Thread Miles J
You can use Cakes built in Cache utility class. Heres an example of how I used it for queries: http://www.milesj.me/blog/read/34/Cacheing-Each-Query-Individually --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Using FCKEditor in a Plugin

2009-06-28 Thread Miles J
So weird, I was doing the same thing with MarkItUp 2 days ago. The answer I found out is no, you cant link to vendor js/css files. Only vendor css/js in the external vendors folder can be linked, not the app vendor. --~--~-~--~~~---~--~~ You received this message

Re: Containable grabbing too much data

2009-06-27 Thread Miles J
I found the problem, but cannot fix it. Its my afterFind() method for my Article model. /** * Executed after a find() call */ function afterFind($results) { if (!empty($results)) { foreach ($results as $result) {

Re: Containable grabbing too much data

2009-06-27 Thread Miles J
Yeah I guess we have the same problem, and I have spent a good few hour trying to fix this with no avail. Lets hope its a bug and an official comes and sees this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Containable grabbing too much data

2009-06-26 Thread Miles J
Like I said, I already am using containable. Just this once piece of code is grabbing too much data, when the contain should be filtering it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to

Re: Any chance for complete php5 rewrite?

2009-06-26 Thread Miles J
I lold. On Jun 25, 11:09 pm, AD7six andydawso...@gmail.com wrote: On Jun 26, 7:18 am, XuMiX v.tambovt...@gmail.com wrote: PHP4 is not supported for 1 year, maybe Its time to drop php4 support? Or to use that search form.. --~--~-~--~~~---~--~~ You received

Including js/css files from vendors

2009-06-26 Thread Miles J
So I have a vendor folder (within the app vendors) that has js and css files in them. I need to include them in the website but cannot figure out how to do it with $html-css() and $javascript-link(). Any ideas? --~--~-~--~~~---~--~~ You received this message

Re: Big Websites In cakePHP ?

2009-06-26 Thread Miles J
Mozilla Addons use CakePHP and they get millions of hits and records a day, youll be fine. https://addons.mozilla.org/en-US/firefox/ On Jun 26, 6:15 am, mike karthauser mi...@brightstorm.co.uk wrote: We've got a site running in cakephp that is run of 100 tables some of   which are over 100k

Re: Including js/css files from vendors

2009-06-26 Thread Miles J
I have tried these 2 ways, and neither have worked: echo $javascript-link('/vendors/markitup/jquery.markitup.pack.js', true); echo $javascript-link('vendors.php?file=/markitup/ jquery.markitup.pack.js', true); On Jun 26, 1:23 am, Miles J mileswjohn...@gmail.com wrote: So I have a vendor folder

Re: Containable grabbing too much data

2009-06-26 Thread Miles J
Perhaps you should figure out what dependent does, because I believe your assumptions are wrong. On Jun 26, 3:40 am, Alexandru Ciobanu ics.cake...@gmail.com wrote: On 06/26/2009 12:59 AM, Miles J wrote: 'dependent' =  true, Try setting dependent to false

Containable grabbing too much data

2009-06-25 Thread Miles J
So I know how to use containable really well, but this is being weird. Its pulling ALL relations, even when I limit it with containable. Heres my models. class ArticleFavorite extends AppModel { var $belongsTo = array('User', 'Article'); } class Article extends AppModel { var

Re: I don't understand this at all

2009-06-25 Thread Miles J
They x and y are the coordinates where you clicked your mouse on the image. On Jun 25, 3:04 pm, Kyle Decot kdec...@gmail.com wrote: Alright. I have a form and when I submit the form using an image based submit button like ?php echo $form-submit(submit.png); ? two values (x and y) get added to

Re: I don't understand this at all

2009-06-25 Thread Miles J
I dont think you can, thats part of HTML not Cake. On Jun 25, 3:20 pm, Kyle Decot kdec...@gmail.com wrote: Oh okay. Well I don't really want or need those so how do I make it so those values aren't included? On Jun 25, 6:17 pm, Miles J mileswjohn...@gmail.com wrote: They x and y

Re: Simple SQL UPDATE question

2009-06-24 Thread Miles J
Yes use a custom query. I always write custom queries when you need to increase a columns value. $this-query(UPDATE table SET views = views + 1 WHERE id 1); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP

Re: The shell class does not work as I want it to...

2009-06-24 Thread Miles J
First off you should use App::import() instead of require. Secondly, you use $this-out('test') to display data. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: Simple SQL UPDATE question

2009-06-24 Thread Miles J
You could write it like that, but a custom is just simpler and faster :p On Jun 24, 12:15 pm, Rangi rangi...@gmail.com wrote: Thanks for all the replies everyone. I think I'm going to go with the updateAll method: $this-Product-updateAll(array('Product.vote'='Product.vote+1'),

Re: Using HtmlHelper in Controller

2009-06-24 Thread Miles J
Put it in the view. if ($this-params['controller'] == 'controller') { // css functions } On Jun 24, 12:01 pm, Shmuel shmue...@gmail.com wrote: HI, I have a controller similar to Pages where I want to load CSS that would be loaded for all the pages. This is the code how I'm doing it:

Re: Allowing RSS Feed without the restirctions of Authentication?

2009-06-24 Thread Miles J
Just remove .rss, it would be index in the allow(). --~--~-~--~~~---~--~~ 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

Re: The shell class does not work as I want it to...

2009-06-24 Thread Miles J
Your not using App::import right, nor are you placing your files in the correct vendor location. http://book.cakephp.org/view/538/Loading-Vendor-Files Perhaps fix your problems first, before deugging why it wont output. --~--~-~--~~~---~--~~ You received this

Re: Two database, different servers.. How to use and connect my model and controller?

2009-06-23 Thread Miles J
http://book.cakephp.org/view/71/Model-Attributes var $useDbConfig = 'pdfproofing'; --~--~-~--~~~---~--~~ 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

Re: A few questions from a CakePHP newbie

2009-06-23 Thread Miles J
Thanks for following my tutorial. I use this code to redirect to the referring page once logged in. Place it in your app controller. // Referer $referer = $refererLogin = $refererLogout = $this-referer(); if (empty($referer) || $referer == '/users/login' || $referer == '/') {

Re: Order of models in $uses

2009-06-23 Thread Miles J
Why not just called the right Model in pagination? $this-paginate('Dashboard') --~--~-~--~~~---~--~~ 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

Re: notEmpty doesn't work when going through the tutorial

2009-06-23 Thread Miles J
var $validate = array('title' = 'notEmpty', 'body' = 'notEmpty'); On Jun 23, 3:25 pm, eliot1785 stepheneliotde...@gmail.com wrote: I am going through the blog setup tutorial and although I've just used the code that was provided, I can still post empty fields. The notEmpty validation doesn't

Re: Best way to setup my comments system

2009-06-21 Thread Miles J
I thought of an idea if I use multiple tables. I can create my base model class of Comment. And then I can have the other tables extend that class to inherit their functions and that should work. class CommentsArticle extends Comment {} --~--~-~--~~~---~--~~ You

Re: view not echoing

2009-06-21 Thread Miles J
Because Product does not exist. Its $products[0]['Product']; Its a multi array. --~--~-~--~~~---~--~~ 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

Re: Association problems

2009-06-21 Thread Miles J
As marcelo said, it would be a belongsTo, not a hasOne. If the genre_id is in the games table, then its belongsTo. If the game_id is in the genre table, its a has One. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: grr help with cron/shell tabs

2009-06-21 Thread Miles J
I found out that my CLI was PHP 4, so I changed it to PHP 5. I can run the cron through SSH manually, but when I run through cron I now get this error: TERM environment variable not set. /home/mileswj/cake/console/cake: line 30: exec: php: not found

Re: Association problems

2009-06-21 Thread Miles J
What appears when you put debug($products) in your view? --~--~-~--~~~---~--~~ 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,

Re: Association problems

2009-06-21 Thread Miles J
Are you using recursive or contain? Whats your find query. --~--~-~--~~~---~--~~ 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

Re: Association problems

2009-06-21 Thread Miles J
Yeah simple stuff like that is annoying. Also be sure to remove your tmp/cache/models --~--~-~--~~~---~--~~ 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

Re: foreach question

2009-06-21 Thread Miles J
foreach ($final as $no = $data) --~--~-~--~~~---~--~~ 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

Re: who is 'Cake' : some basic oop cake nonunderstanding

2009-06-20 Thread Miles J
Objects are used everywhere. What do you think your doing in a controller when you access models or components? $this-Component-method(); Take a look at Auth, it references the Controller object as well as modifies it. On Jun 20, 8:34 am, brian bally.z...@gmail.com wrote: On Sat, Jun 20, 2009

Best way to setup my comments system

2009-06-20 Thread Miles J
Currently on GameSync, I have a comment system that is implemented on users profiles, you can see it in action here. http://www.gamesync.com/user/gearvOsh/comments But right now, there are only comments for profiles, but I want to implement comments for photos and articles. The predicament is

Re: Best way to setup my comments system

2009-06-20 Thread Miles J
The only thing thats making me go against multiple tables, is I have to duplicate the comments model each time I add more. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Re: Slug instead of ID

2009-06-18 Thread Miles J
The id shouldnt even be in the url of the edit profile page, you should just grab it from Auth. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: Slug instead of ID

2009-06-17 Thread Miles J
In a typical structure, you would still use id for everything. The only time a slug is really used is when creating a URL to link to their profile. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To

Re: Territory routing question

2009-06-16 Thread Miles J
Use prefixes: http://book.cakephp.org/view/46/Routes-Configuration#Prefix-Routing-544 --~--~-~--~~~---~--~~ 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

Re: caching in cakephp

2009-06-16 Thread Miles J
Well how long did you set the cache to last for? --~--~-~--~~~---~--~~ 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

grr help with cron/shell tabs

2009-06-15 Thread Miles J
Heres my current folder setup. /home/mileswj/cake/ (below root and shared between many apps) /home/mileswj/sc2armory.com/app/ /home/mileswj/milesj.me/app/ ... etc ... All the sites work correctly, im just trying to get a cron running on sc2armory. Ive tried all the following and none of them

Re: CakePHP resources

2009-06-15 Thread Miles J
Agreed. The only one that looked remotely correct was the model validation. On Jun 15, 1:25 am, burzum bur...@doomzone.de wrote: It looks more like you're trying to show examples how to do it horrible wrong. On Jun 14, 2:29 pm, Sumit Surai surai.su...@gmail.com wrote:

Re: Change the content-type

2009-06-15 Thread Miles J
/request-handler-component -j. On Jun 14, 5:56 pm, Peter peterdun...@gmail.com wrote: thanks, that's what i neededalthough i moved it to the top of the default xml-layoutfile i use. On 14 jun, 23:44, Miles J mileswjohn...@gmail.com wrote: I usually put this at the end of my controller

Re: caching in cakephp

2009-06-15 Thread Miles J
Well what type of cache are you using exactly? There are many types. cacheAction, persistModel, cacheQueries, etc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: grr help with cron/shell tabs

2009-06-15 Thread Miles J
Nope, still getting this: clear LIB=${0/%cake/} APP=`pwd` exec php -q ${LIB}cake.php -working ${APP} $@ exit; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: Change the content-type

2009-06-14 Thread Miles J
I usually put this at the end of my controller actions: $this-header('Content-Type: text/xml'); On Jun 14, 10:26 am, Peter peterdun...@gmail.com wrote: how can i change the content-type of a view? i have an xml-view which renders just fine, but my browser sees it as text/html.

Re: Auth Component Problem

2009-06-13 Thread Miles J
These should be the urls for the DESTINATION after you login or logout, not the pages themself: $this-Auth-loginRedirect = array('controller' = 'personas', 'action' = 'display', 'login'); $this-Auth-logoutRedirect = array('controller' = 'personas', 'action' = 'logout'); Remove these two lines

Re: Auth Component Problem

2009-06-13 Thread Miles J
$this-Auth-loginRedirect is the page you are redirected to after you have successfully logged in. If the login page IS NOT the one you put in $this-Auth-loginRedirect, then disregard this. --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Auth Component, white page when cookies disabled

2009-06-12 Thread Miles J
Auth does not use Cookies, so please make sure this is even an Auth problem. --~--~-~--~~~---~--~~ 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

Re: Help debugging pseudocoder.com Asset Packer CakePHP Plugin

2009-06-11 Thread Miles J
Try logging the error with log(), or checking your error/debug logs. On Jun 10, 11:22 pm, RyOnLife ryan.mckil...@gmail.com wrote: http://github.com/mcurry/asset/tree/masterhttp://github.com/mcurry/asset/tree/master I am having problems with this plugin. No errors, but when viewing the

Re: Poll: what do you hate about CakePHP?

2009-06-10 Thread Miles J
WRONG. Certain bugs require certain circumstances specific to the users problem. If a user simply says this doesn't work, how is the team supposed to fix if they dont know what YOU ARE DOING to cause the problem. Thats what test cases are for On Jun 10, 8:59 pm, Mr-Yellow

Re: Keep getting new CAKEPHP cookie

2009-06-09 Thread Miles J
Yes its you session id. --~--~-~--~~~---~--~~ 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

Re: Formatting $form-Select

2009-06-09 Thread Miles J
You dont use $form-select(), you use $form-input() and pass 'type' = 'select' --~--~-~--~~~---~--~~ 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

Re: getInsertID();

2009-06-09 Thread Miles J
$this-Model-save($data); After a save, you can get the id at: $this-Model-id; --~--~-~--~~~---~--~~ 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

Re: Sessions in Components?

2009-06-08 Thread Miles J
Would it be possible if I took a look at your uploader? I recently just wrote one and am curious how others do it :p --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: Accessing auth information from within model class

2009-06-08 Thread Miles J
Its because you cant use components in models. If you want to access the session, you would have to import it. App::import('Component', 'Session'); $Session = new SessionComponent(); $auth = $Session-read('Auth.User'); --~--~-~--~~~---~--~~ You received this

Re: if ($loggedIn == 0){

2009-06-08 Thread Miles J
return value in write context in C: \xampp\htdocs\mycake\app\views\post\view.ctp on line 37 On Jun 5, 1:24 pm, Miles J mileswjohn...@gmail.com wrote: if (empty($session-read('Auth.User'))) { } On Jun 5, 9:03 am, cakephp_rocks rockie_rah...@hotmail.com wrote: how can you use

Re: if ($loggedIn == 0){

2009-06-08 Thread Miles J
To be more precise, this should work better. $session-check('Auth.User.id'); --~--~-~--~~~---~--~~ 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

Re: Limit characters?

2009-06-07 Thread Miles J
It has to be capitalized. On Jun 7, 11:03 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Nopeno go I have 'Post' = array('fields' =array('Post.title' , 'substr(description , 0 , 50)' ) Tried: 'Post' = array('fields' =array('Post.title' , 'substr(Post.description , 0 ,

Re: Limit characters?

2009-06-07 Thread Miles J
                                (                                     [substr(Post.Description, 0, 50)] =                                 ) -Original Message- From: Miles J [mailto:mileswjohn...@gmail.com] Sent: June-07-09 5:34 PM To: CakePHP Subject: Re: Limit characters? It has to be capitalized

Re: Problem with saveField()

2009-06-07 Thread Miles J
Whats the column type for confirmed? If its tinyint, try changing it to small int. Also try doing 1 as an integer and not a string. $this-User-saveField('confirmed', 1); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Extending component - initialization method problem

2009-06-07 Thread Miles J
initialize() is called BEFORE the apps beforeFilter(), so all your settings are not set yet. You must use startup() since thats called AFTER beforeFilter(). On Jun 7, 1:45 pm, Raph ra...@epoczta.pl wrote: I'm trying to extend the email component. The code looks kind like this: class

Re: Problem with saveField()

2009-06-07 Thread Miles J
Is a query ran in the output at the bottom? --~--~-~--~~~---~--~~ 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

Re: Specifying save fields

2009-06-07 Thread Miles J
If you are saving relations, you use saveAll(). http://book.cakephp.org/view/75/Saving-Your-Data If not, change RelationModel.id to relation_model_id. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group.

Re: Persistent model to true - Fatal error

2009-06-06 Thread Miles J
Like I said before, $persistModel is extremely buggy. --~--~-~--~~~---~--~~ 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

Re: Help me with forum based on CakePHP

2009-06-06 Thread Miles J
Im currently in the process of building a forum plugin, no idea when it would be finished though :/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: What's best way to create the Admin area?

2009-06-06 Thread Miles J
I prefer creating another standalone app, and just bootstrapping it to use the same models, components, etc between apps. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Re: Auth component question

2009-06-05 Thread Miles J
Auth DOES automatically validate, but it should only do it when you post the form. Whats your settings. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: if ($loggedIn == 0){

2009-06-05 Thread Miles J
if (empty($session-read('Auth.User'))) { } On Jun 5, 9:03 am, cakephp_rocks rockie_rah...@hotmail.com wrote: how can you use this if ($loggedIn == 0){ to set message like lets say i have comment box if users not logged in show them this message (login to comment )

Re: Warning (2): unlink() !? What is this error?

2009-06-05 Thread Miles J
It means your cached file is no longer there to delete. On Jun 5, 6:00 am, foldiman vi...@vinceallen.com wrote: I get this error intermittently and do not understand why. Warning (2): unlink(/app/tmp/cache/models/ cake_model_default_restaurants_states) [function.unlink]: No such file or

Re: SQL query correct for HABTM, but no results in scaffold? [RESOLVED]

2009-06-05 Thread Miles J
I thought the $name was only required for controllers. --~--~-~--~~~---~--~~ 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,

Re: what if I want to change the ($this-Auth-User())'s info.

2009-06-04 Thread Miles J
You can use this method I wrote, just place it in your app controller. /** * Refreshes the Auth to get new data * @param string $field * @param string $value * @return void */ function _refreshAuth($field = '', $value = '') { if (!empty($field) !empty($value)) {

Re: Creating an uploader component

2009-06-04 Thread Miles J
Its an Uploader, all it does is upload. If you want to save to the db, you could use some of the already existant scripts, or just do it yourself when the upload is a a success. On Jun 4, 6:05 am, jabocs ja...@jnjhardy.com wrote: Are you keeping track of files uploaded in a DB?  How bout using

Re: Redirect Question

2009-06-04 Thread Miles J
$this-redirect(array('controller' = 'posts', 'action' = 'comment', $post['Post']['id'])); On Jun 4, 2:29 pm, Andreas Derksen andreasderk...@arcor.de wrote: $this-redirect($this-referer()); greets Andreas cakephp_rocks schrieb: $this-redirect(array('controller' = 'posts', 'action'  =

Re: Creating an uploader component

2009-06-04 Thread Miles J
Looking for some people who are good at php and can test and give my feedback on my uploader. Email is cont...@milesj.me. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

Re: Accessing variable in pass array, routing

2009-06-03 Thread Miles J
To pass the variables as an action argument, do it like so: Router::connect('/risks/add/:project_id', array('controller' = 'risks', 'action' = 'add'), array('project_id' = '[0-9]+', 'pass' = array('project_id'))); ?php echo $html-link('Project', array('controller' = 'risks', 'action' = 'add',

<    5   6   7   8   9   10   11   12   13   14   >