avatar upload component?

2008-09-19 Thread rocket
i was looking around and didn't stumble upon much. i was just wondering if anyone knew of a good avatar upload script for my users. I'd like it to have the basic pick a file, resize and upload, then allow me to print thumbnails. anyone know of anything like this? danke, rocket --~--~-~--

Re: legacy database and conventions

2008-09-19 Thread teknoid
All you need to do is to specify $useTable and $primaryKey. You'll also have to be explicit in your model associations... i.e. 'foreignKey'=>'UserID' There really isn't much more to it than that. (Always remember to specify the primaryKey if it's non-standard 'id') On Sep 19, 6:22 pm, Miguel <[E

Re: Moved my CakePHP directory - How to Redirect?

2008-09-19 Thread MikeK
Thanks for the ref to the video - it'a another nifty way of reorganizing things but I have the thing working properly without 'myappdir' in the picture. I'm just trying to set it up so that folks who come into the site using the old link structure get properly and transparently mapped to the new s

Re: Problem: Cake cannot "see" new database fields or tables

2008-09-19 Thread Dave
Pablo76 wrote: > Thanks for the response folks. I didnt realise that the models were > cached (i shall have a look in the docs at this subject). I think > this will be the root of the problem, have to wait until work on > Monday to test it. Almost certainly the Model Cache as previously sugges

Vendors

2008-09-19 Thread cem
Hi I am trying to use an external function in cakePHP which generates Ajax trees . I have a tree.php in my /app/vendors and I included App::import('Vendor', 'tree'); in my app_controller.php Everything seems fine now my problem is . How will I use a function in tree.php file in a view or in a

Re: legacy database and conventions

2008-09-19 Thread Wayne Fay
While Cake has conventions, there is absolutely nothing which requires that you take advantage of them. Given that Cake is a MVC implementation, you will primarily be dealing with customized models to support your legacy database. Models provide $useTable so you can have a model named User that p

Re: Moved my CakePHP directory - How to Redirect?

2008-09-19 Thread Brian Fidler
David Golding has a really good screencast that covers Cake and directories. http://www.davidgolding.net/screencasts Watch the Cake running outside root screencast which really clarified things for me. On Fri, Sep 19, 2008 at 3:47 PM, MikeK <[EMAIL PROTECTED]> wrote: > > My Cake app used to

legacy database and conventions

2008-09-19 Thread Miguel
Hi, cakephp has a lot of tutorials, but for the life of me i cant find a tutorial regarding how to use an existing database, this is a propietary vendor 's appliance, so changing the schema is not an option. they use mssql with fancy table names and custom types, all uppercase. because of that , i

Re: Moved my CakePHP directory - How to Redirect?

2008-09-19 Thread Brian Fidler
David Golding has a really good screencast that covers Cake and directories. http://www.davidgolding.net/screencasts Watch the Cake running outside root screencast which really clarified things for me. On Fri, Sep 19, 2008 at 3:47 PM, MikeK <[EMAIL PROTECTED]> wrote: > > My Cake app used to

Moved my CakePHP directory - How to Redirect?

2008-09-19 Thread MikeK
My Cake app used to be at www.mydomain.com/ams. The app and cake subdirs lived there and the default .htaccess files were funneling things to webroot. Most web requests looked like: www.mydomain.com/mycakedir/controller/action/parms Now I have moved things to remove mycakedir completely. the app

Problem with reading cookie

2008-09-19 Thread Kenchu
I've managed to get cookies working for the session, but if I restart my browser, the cookies seem to be gone, and $cookieTime doesn't seem to do anything about it. This is the code I've got: ___ [...] var $cookieName = 'my.cookie'; va

Re: Problem: Cake cannot "see" new database fields or tables

2008-09-19 Thread Pablo76
Thanks for the response folks. I didnt realise that the models were cached (i shall have a look in the docs at this subject). I think this will be the root of the problem, have to wait until work on Monday to test it. --~--~-~--~~~---~--~~ You received this message

another setFlash issue...

2008-09-19 Thread fragoon
I wasted whole day to find why after one of my actions default layout flash message won't appear. Here flash message appears correctly: function edit($id = null) { if (!empty($this->data)) { $this->Topic->set($this->data); if ($this->Topic->validates()) { if ($this->T

getting the saved model data

2008-09-19 Thread Novice Programmer
Hello guys, In some of my cases, i format the data in beforeSave Callback of the Model. In the controller, after the call to function Model::save, how do i get access to the model data that was saved. I dont want to shoot a select query.. :( -- Thanks & Regards, Novice. --~--~-~--~~

geocode find distance query mysql having

2008-09-19 Thread Andras Kende
Hello, Im using the geocode behaviour from http://bakery.cakephp.org/articles/view/geocoding-in-cakephp findAllByDistance( ... $model->find('all',array('conditions'=>"(3958 * 3.1415926 * SQRT(({$y2} - {$y}) * ({$y2} - {$y}) + COS({$y2} / 57.29578) * COS({$y} / 57.29578) * ({$x2} - {

Re: Completely Dynamic Reporting

2008-09-19 Thread BrendonKoz
Martin, I would be interested in reading over the articles you read while researching this topic. Do you happen to still have any of them bookmarked? On Sep 19, 7:20 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have been scratching my head a bit recently with similar requests. > I quic

Re: Problem: Cake cannot "see" new database fields or tables

2008-09-19 Thread dr. Hannibal Lecter
I hope you've eliminated all the obscure stuff: * are you using the correct server? * are you using the correct database? * did you clear the app cache? * are you selecting all fields or just those you have in the query you've posted? I know these are pretty stupid questions, but it happens... :

Re: Auth component not working for me

2008-09-19 Thread gabriel
$this->Auth->allow('display','index','register'); you don't have a 'display' funtion in your controller..don't know much maybe this is it. On 15 Sep, 06:51, "Golam Kibria" <[EMAIL PROTECTED]> wrote: > hello i have triedauthcomponent and is not working for me. > > here is my code > > class Use

Re: Problem: Cake cannot "see" new database fields or tables

2008-09-19 Thread schneimi
Hi, not sure but this sounds like a problem with cached models, just delete all in app/tmp/cache/models so they get regenerated. Hope this helps, Michael On 19 Sep., 17:27, Pablo76 <[EMAIL PROTECTED]> wrote: > This is an unusual problem, hopefully someone can shed some light on > it as current

Re: simple session question - for Authentication

2008-09-19 Thread Gabriel Kolbe
NOPE !!! sorry made a mistake, can't stick the $this->Auth->allow in the app_controller... On Fri, Sep 19, 2008 at 4:51 PM, gabriel <[EMAIL PROTECTED]> wrote: > > Hi, sorry..found the solution to allow pages without a controller - > stick it in the app_controller.. which only leaves me know with

Re: simple session question - for Authentication

2008-09-19 Thread gabriel
Hi, sorry..found the solution to allow pages without a controller - stick it in the app_controller.. which only leaves me know with the question.. SECONDLY: I am trying to do a on sessions, if I do pr($_SESSION); I get all the sessions - see below..I want the user_id, I have tried print_r($_SESSI

Re: simple session question - for Authentication

2008-09-19 Thread gabriel
Hi, Yes!! just figured it out as well function beforeFilter(){ $this->Auth->allow('add', ''); } How do you 'allow' page which is not in a controler?? ~AND Any ideas on ... SECONDLY: I am trying to do a on sessions, if I do pr($_SESSION); I get all the sessions - see below..I want the us

Problem: Cake cannot "see" new database fields or tables

2008-09-19 Thread Pablo76
This is an unusual problem, hopefully someone can shed some light on it as currently it is stopping an important development project. Cake version: 1.2.0.7296 rc2 Running on Wamp Server 2 (MySQL 5.0.51b) Everything was going fine but after starting coding today, I have added a new field into one

Cake replace my special chars

2008-09-19 Thread kicaj
Hi I use Tree behavior: $this->set('categoriesList', $this->Category->generateTreeList(null, "{n}.Category.id", "{n}.Category.name", " ")); ...in view: $form->input('category_id', array('options'=>$categoriesList)); ...and i get this in my browser: My Categories  Fun   Sport &nb

Re: Action runs twice, for no good reason.

2008-09-19 Thread tehstu
Can someone (a dev?) please have a look at this? It's really quite strange and as far as I can tell not an error on my side. I have wasted hours on this... Thanks! Stu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Problem: Cake cannot "see" new database fields or tables

2008-09-19 Thread Pablo76
This is an unusual problem, hopefully someone can shed some light on it as currently it is stopping an important development project. Cake version: 1.2.0.7296 rc2 Running on Wamp Server 2 (MySQL 5.0.51b) Everything was going fine but after starting coding today, I have added a new field into one

Re: simple session question - for Authentication

2008-09-19 Thread avairet
Hi, Just an idea for the first issue: put " $this->Auth->allow('add') " in your "beforeFilter()" function! On 19 sep, 16:31, gabriel <[EMAIL PROTECTED]> wrote: > Hi, I have followed the Authentication in the Cookbook. I have a few > problems, maybe someone can help me. Firstly to 'allow' cert

Re: Pagination of search results

2008-09-19 Thread [EMAIL PROTECTED]
Like you say this has been discussed quite a bit before. The way I was advised to do this (which works really well) is to "POST" (or GET) the search to a proxy-action that creates a nice url that paginator will play nice with and redirects you to our results. Example: function lookup() { if (

simple session question - for Authentication

2008-09-19 Thread gabriel
Hi, I have followed the Authentication in the Cookbook. I have a few problems, maybe someone can help me. Firstly to 'allow' certain pages, I place the $this->Auth->allow('add'); in the Users controller and get and error, I have also tried to include it in the add and login functions, but it does

Cookie and Subdomain / Multiapp

2008-09-19 Thread avairet
Hi, I've 2 "domains" in my localhost: 1) www.mydomain.com 2) club.mydomain.com In UsersController of domain number 2), in login() action, I do that: if ($this->Auth->user()) { if (!empty($this->data)) { $this->Cookie->write('Auth.User', $this->Auth- >user('pseudo'),false); } } in AppContr

Re: HtmlHelper::selectTag does not exist in CakePHP 1.2

2008-09-19 Thread dr. Hannibal Lecter
In 1.2, all form/input related stuff has been moved to FormHelper: http://api.cakephp.org/class_form_helper.html I assume you need the select: http://api.cakephp.org/class_form_helper.html#5171e675468c9665db0653c165b6c89c Hope that helps ;) On Sep 19, 10:43 am, Yuris <[EMAIL PROTECTED]> wrote

HtmlHelper::selectTag does not exist in CakePHP 1.2

2008-09-19 Thread Yuris
I have those code below in CakePHP 1.1, but selectTag does not exist in CakePHP 1.2, how could I modify for the new version? Thanks a lot! echo $html->selectTag( 'magasin', $tabMagasin, 0, array( 'id'=>"magasin", 'class'=>"liste",

integrate paypal

2008-09-19 Thread json
Hi, I am new to here I want to help how to integrate a paypal in cake php i dont know how to integrate it normally i will integrate paypal using html code then i will get value from notify file using $_REQUEST['payment_status']="completed" if completed received i will update my database bu

Re: Best practice for plugin configuration

2008-09-19 Thread Abhimanyu Grover
I also prefer having a seperate bootstrap.php files for plugins which are also used as config files for them. Here's what you can do: $Folder =& new Folder(APP.'plugins'); $plugins = $Folder->ls(); // for better performance - make sure you cache it somewhere foreach($plugins as $plugin) {

Validation

2008-09-19 Thread nayan
When i user Save then cakePHP validation error but whne i use saveAll .it does not give error --~--~-~--~~~---~--~~ 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

Why does this not pass?

2008-09-19 Thread alkemann
Why does this not pass? Home'; $expected = array( 'assertTags($result, $expected); } ?> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email

Re: Completely Dynamic Reporting

2008-09-19 Thread [EMAIL PROTECTED]
I have been scratching my head a bit recently with similar requests. I quickly found articles about "Star Schemas", dimensions and facts... and realised that really advanced reporting for any application could easily become a whole application of its own. Solving this quickly, I would recommend y

Re: Generate Excel from database problem (rendering layout)

2008-09-19 Thread mario
Thanks Sam. Actually, I already found the solution. Instead of using $this->render('action','excel'); in my controller, I used this following code: $this->layout = 'excel'; $this->render(); I wonder why $this->render('action','excel'); won't work. But I also don't think that this is a depre

Re: checkbox value becomes default (1) after submit

2008-09-19 Thread rob30
I have exactly the same problem and cant find solution :( --~--~-~--~~~---~--~~ 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: Right way to handle 'errant' attempts to browse my content when it changes?

2008-09-19 Thread Predominant
Content is king. If the content is relevant, then keep it. Rather than deleting content form your site, deprecate it, and post a nice little message at the top to indicate to real people that the content may be out of date or no longer relevant. This will allow Google to index and list your site,

Re: Association question

2008-09-19 Thread RichardAtHome
In exactly the same way :-) You join table (products_sizes) would hold the stock field id (PK) product_id (FK) size_id (FK) stock (INT) On Sep 17, 9:27 pm, VitillO <[EMAIL PROTECTED]> wrote: > Hi, i have the following structure for a tshirt online store: > > Product HABTM Size > Size HABTM Prod

Re: Using Views in database over a legacy database

2008-09-19 Thread RichardAtHome
You can set up your models to use any "non-cake" table structures and naming styles. See http://book.cakephp.org/view/71/Model-Attributes for more details. On Sep 18, 9:31 am, Laurent Bois <[EMAIL PROTECTED]> wrote: > Hi > > We currently have a data model with table names that don't follow > Cak

Re: Apress Beginning CakePHP Model Function Error

2008-09-19 Thread gmwebs
If you are using the new v1.2 RC2 of Cake then quite a few of the older functions have been deprecated (like the findAll() one) and the syntax for some of them has also changed - i.e. find('all') - it seems that the book is written for this new syntax. If you uprade your Cake version to the latest

Re: Html Helper

2008-09-19 Thread nayan
But When i have two model like User and UserType and in Users controller right now i am using only UserType model so in the add.ctp i metion create('UserType', > > array('action' => 'admin_add')); ?> it give me error "Controller missing" On Sep 12, 6:43 pm, "David C. Zentgraf" <[EMAIL PROTECTED

Re: trying to make othAuth login process work

2008-09-19 Thread gmwebs
I assume you are using v1.2? You need to replace $html->input and $html->checkbox with the their $form equivalents. i.e. $form->input, $form->text, $form->checkbox, etc. More info at the API docs - http://api.cakephp.org/1.2/class_form_helper.html --~--~-~--~~~---~--~

Re: a complex data model- a cakephp breakthrough?

2008-09-19 Thread Delian
Hi, I think that can be achieved by adding this attribute to the parent model instead. Then all your models will inherit this property. 2008/9/18 Joe <[EMAIL PROTECTED]> > > Sounds like something that could be easily handled with EAV modeling. > I wrote about it awhile ago. http://blog.joebeeson