Re: Problems with admin routing in 1.3 stable

2010-05-18 Thread #2Will
Not sure if this helps, but im running 1.3 stable with admin routing and its working ok, so it might be something else going wrong. i have: Configure::write('Routing.prefixes', array('admin')); in config and nothing about admin in routes and no changes to the form action parameters in th

Re: HABTM and 1.3 version

2010-05-18 Thread John Andersen
Please provide more information! What does you data structure look like just before you are saving them? How are you trying to save the data - save or saveAll? Enjoy, John On May 18, 7:35 pm, Ziki wrote: > I have problems with HABTM associations, i did everything like it is > recommended, and

Re: Managing a history of changes

2010-05-18 Thread John Andersen
Don't start a new thread - look in the old one! John On May 18, 9:24 pm, paws_galuten wrote: > Hi, > > Please excuse the long post... I tried to give a concise question, but > also I felt the need to give an example and explain... > > I need to store a history of database changes (i.e. copies

Re: Keeping a history of changes without composite keys

2010-05-18 Thread John Andersen
Please provide more information on the relationships between Areas, Shifts and People. Do you foresee that they are one to many or many to many? That is that Areas has many Shifts or that Areas has and belongs to many Shifts! And the same with the other relationships you foresee in your database.

Re: Javascript form validation in cakephp 1.3.0

2010-05-18 Thread Nandan Jana
Hi, I have successfully implemented the javascript automagic validation using the plugins. It converts the validation rules written in the model class in to the js code. so we can write the validation rules for every table field which is used by a model class. Now the question i

Re: Update problem

2010-05-18 Thread Ed Propsner
Well it seems that you found the root of the problem: Array ( [email] => Please enter a valid email ) To be honest I never gave a single thought to a validation issue. I changed it to 'on' => 'create' and the problem cleared up. I suppose I was thinking along the lines of the info NOT coming

Re: Update problem

2010-05-18 Thread Jeremy Burns
Before you give up, try this: if (!$this->User->save()): debug($this->User->validationErrors); die(debug($this->User)); endif; ...and see what it produces. Jeremy Burns jeremybu...@me.com On 19 May 2010, at 05:25, Ed Propsner wrote: > NOT going to stress I meant 8-) > > On We

Re: Update problem

2010-05-18 Thread Ed Propsner
NOT going to stress I meant 8-) On Wed, May 19, 2010 at 12:24 AM, Ed Propsner wrote: > The manual query works, the other still does not. I'm going to stress over > it right now ... I'm sure I'm overlooking something. > > Good to go. > > Thanks Jeremy > > > On Wed, May 19, 2010 at 12:20 AM, Jerem

Re: Update problem

2010-05-18 Thread Ed Propsner
The manual query works, the other still does not. I'm going to stress over it right now ... I'm sure I'm overlooking something. Good to go. Thanks Jeremy On Wed, May 19, 2010 at 12:20 AM, Jeremy Burns wrote: > So are you good to go now? > > > Jeremy Burns > jeremybu...@me.com > > > On 19 May

Re: Update problem

2010-05-18 Thread Jeremy Burns
So are you good to go now? Jeremy Burns jeremybu...@me.com On 19 May 2010, at 05:16, Ed Propsner wrote: > Thanks Jeremy, I caught that one myself a little while ago in the manual > query, I should have updated this post. > > My original concern was why I couldn't get this script to run the u

Re: Update problem

2010-05-18 Thread Ed Propsner
Thanks Jeremy, I caught that one myself a little while ago in the manual query, I should have updated this post. My original concern was why I couldn't get this script to run the update: [code] $date = date('Y-m-d H:i:s'); $this->User->read(null, $id); $this->User->set(array( 'approved' =>

Re: Save select box value not ID

2010-05-18 Thread Jeremy Burns
You say you are new to Cake - have you done any web or database development at all? A select box is usually populated from a table that is joined or associated with the table you are updating. You only need to store the id of the related row in 'this' table. To find out what value that id relate

Re: How to join 2 tables in the controller

2010-05-18 Thread Jeremy Burns
I would start by reading this part of the online guide. Setting up models is key to just about everything you do in Cake, so simply finding out how to join two tables will only move you on to your next problem. Jeremy Burns jeremybu...@me.com On 18 May 2010, at 12:29, cakephpBbsr wrote: > Hel

Re: Update problem

2010-05-18 Thread Jeremy Burns
Ed - I think you need some apostrophes or speech marks around your date field. If you look at the first update statement: UPDATE users SET approved = 1, last_login = 2010-05-18 16:54, activation_code = '' WHERE id = 1937 ...this would *probably work if it were changed to: UPDATE users SET appr

Re: found - old Graham Bird's AJAX tutorial copy

2010-05-18 Thread Delirium tremens
On 18 maio, 22:20, Delirium tremens wrote: > http://web.archive.org/web/20080221171422/http://www.grahambird.co.uk... > > Hi, > > A long time ago, I was here and asked for help so much that you > stopped helping me. > I was a help vampire, but I'm not any longer and I'm not going to do > that ag

found - old Graham Bird's AJAX tutorial copy

2010-05-18 Thread Delirium tremens
http://web.archive.org/web/20080221171422/http://www.grahambird.co.uk/cake/tutorials/ajax.php Hi, A long time ago, I was here and asked for help so much that you stopped helping me. I was a help vampire, but I'm not any longer and I'm not going to do that again. Bye, Delirium tremens Check out

Re: Miles J Uploader help

2010-05-18 Thread Miles J
If you are using the latest uploader version, I believe its: if ($data = $this->Uploader->upload('UserPreference.fileName')) { On May 18, 11:14 am, Sam Sherlock wrote: > Hi Brad > > It is not a compatiblity issue with 1.3 - not able to speify the issue right > now but will try to compare your co

Re: Update problem

2010-05-18 Thread Ed Propsner
I'm really not sure what the deal is here. This works for an update: [code] $id = $find['User']['id']; $this->User->query("UPDATE users SET `approved` = 1, `activation_code` = '' WHERE id = $id"); $this->User->id = $id; $this->User->saveField('last_login', date('Y-m-d H:i:

Help with User - Friend HABTM relationship

2010-05-18 Thread bradmaxs
Hello All, In response to the following post: http://groups.google.com/group/cake-php/browse_thread/thread/c8ebc2097f8aad11/fae9ec58501534e6?lnk=gst&q=friend#fae9ec58501534e6 I have come up with my users having friends and admirers, thank you gentlemen for that. I am getting the array for both

my link looks like this app/webroot/index.php/

2010-05-18 Thread Davor Ilic
Hi All, i have the problem if i use from helpers the "$html->link" i get this link app/webroot/index.php/ and i do not know why because i didn´t change anything. i changed only the routers.php to this "Router::connect('/', array('controller' => 'clients', 'action' => 'index'));" Check out the new

Re: Save select box value not ID

2010-05-18 Thread euromark
usually you would retrieve the name of the fruit later on by just de- referencing (table joins) its id this way you prevent data redundancy if redundancy is wanted you might want to retrieve the value before actually saving this->data or you can remove the integers prior to displaying the dropdown

Update problem

2010-05-18 Thread Ed Propsner
I'm trying to update a record (last login field) and having problems with it. I can't see where the error is. Table col -> `last_login` datetime NOT NULL [code] $date = date('Y-m-d H:i:s'); $this->User->read(null, $id); <--- debug here returns a complete array as I would expect $this->U

Re: Best practice for referencing a model in app controller

2010-05-18 Thread nMac
Hi, what I did is exactly what euromark did; except that I wrapped it into a method in app_controller: function loadInexistentModel($Model){ if(!isset($this->$Model)){ $this->loadModel($Model); } } I think it's the best option Best, Nicolás Andrade www.nmac.

Re: Containable Aggregate Fields Problem

2010-05-18 Thread Peter Krutz
Thanks for the info! I'm glad you mentioned the afterSave technique, I was using that for the overall rating average. What I was trying to do was grab the ratings posted in the past month and average from there. That seems a bit intensive, just going with the afterSave for now. On Thu, May 13, 201

How to join 2 tables in the controller

2010-05-18 Thread cakephpBbsr
Hello Team, I want to join two tables in controller using find().Can u provide me some sample code. Thanks Rasmi 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 Google G

Save select box value not ID

2010-05-18 Thread csj16
I have 2 tables and models 'Friend' and 'Message'. I have a belongsTo association between them, and this is all working fine. The select box in my form is being populated with the correct field, that's perfect, BUT when the form is submitted it saves the ID of that field not the name. Which is ob

Re: CakePHP CORE as Git submodule

2010-05-18 Thread stefano
Good resource On Tue, May 18, 2010 at 4:08 PM, Matthew Powell wrote: > This doesn't answer your question, but perhaps it solves your problem. > > Updating it in each app is one way to do it.  I Prefer to just have > one copy of cake. > > http://book.cakephp.org/view/35/Advanced-Installation > > >

Re: CakePHP CORE as Git submodule

2010-05-18 Thread Matthew Powell
This doesn't answer your question, but perhaps it solves your problem. Updating it in each app is one way to do it. I Prefer to just have one copy of cake. http://book.cakephp.org/view/35/Advanced-Installation Matt On Tue, May 18, 2010 at 15:00, DanielMedia wrote: > I've been looking for a

CakePHP CORE as Git submodule

2010-05-18 Thread DanielMedia
I've been looking for a way to easily update the CakePHP core in all of my apps. A Git submodule seems to be the answer. I am following the instructions here: http://www.bravo-kernel.com/2010/03/cakephp-as-a-git-submodule/ The problem is that checking out CakePHP from GitHub gives you ALL of the

Re: Front-end for end-users and admins design

2010-05-18 Thread Andy Dirnberger
You may want to take a look at prefix routing (admin routing prior to 1.3) http://book.cakephp.org/view/950/Prefix-Routing. On May 18, 9:58 am, Andrei Mita wrote: > Thank Renato. Actually I was thinking to develop two separate cake apps: one > to run the website for the end-users and one, nested

Re: array_rand not working!

2010-05-18 Thread Jamie
Talk about going off on a tangent! :) Let's get to the core of the issue, which is just array_rand()... HK, what version of Cake are you using? If you're using 1.2, check out this ticket: http://cakephp.lighthouseapp.com/projects/42648/tickets/73-securitycipher-should-only-call-srand-in-php4 Bas

Managing a history of changes

2010-05-18 Thread paws_galuten
Hi, Please excuse the long post... I tried to give a concise question, but also I felt the need to give an example and explain... I need to store a history of database changes (i.e. copies of all of the fields [with their same ids] grouped by a publish date), and I'm having trouble designing the

Keeping a history of changes without composite keys

2010-05-18 Thread shantamg
Hi, Please excuse the long post... I tried to give a concise question, but also I felt the need to give an example and explain... I need to store a history of database changes (i.e. copies of all of the fields [with their same ids] grouped by a publish date), and I'm having trouble designing the

Re: Miles J Uploader help

2010-05-18 Thread Sam Sherlock
Hi Brad It is not a compatiblity issue with 1.3 - not able to speify the issue right now but will try to compare your code with mine later today but you may solve it by then :) - S On 18 May 2010 18:41, bradmaxs wrote: > I tried to just add it as an action in my controller and can't get a >

Re: array_rand not working!

2010-05-18 Thread HK
I don't want rand to be employed on the sql. The concept is to cache some records (so as not to hit to database all the time) and then get a random record. Just for the record : in the above code I had srand(floor(time() / (60*60*24))); debug(rand()); which always returned the same value. When I c

Keeping a history of changes without composite keys

2010-05-18 Thread shantamg
Hi, Please excuse the long post... I tried to give a concise question, but also I felt the need to give an example and explain... I need to store a history of database changes (i.e. copies of all of the fields [with their same ids] grouped by a publish date), and I'm having trouble designing the

Re: Miles J Uploader help

2010-05-18 Thread bradmaxs
I tried to just add it as an action in my controller and can't get a photo uploaded at all?? permissions are set to 777 on both my files folder and img_usericon as well. Here is the user_preferences_controller.php var $components = array('Uploader.Uploader'); in my beforeFilter $this->Uploader

Re: ACL vs Auth when multiple user tables

2010-05-18 Thread Andrei Mita
You could use two tables for login: users and groups In groups you define ... well... the groups: Staff Members, Caregiver etc Then you link your users to groups via group_id. Based on the group they belong to, you can decide which layout to load. On Tue, May 18, 2010 at 8:28 PM, pomares wrote

ACL vs Auth when multiple user tables

2010-05-18 Thread pomares
Hi, everyone! I have families that have many caregivers and many clients. Each client and each caregiver belong to one family. I also have staff_members. In the simplest form of the authentication system I want to create, staff would login against the StaffMember model and get routed to one place

Re: Best practice for referencing a model in app controller

2010-05-18 Thread euromark
sometimes it might already be available, sometimes not if (!isset($this->ModelName)) { $this->ModelName = ClassRegistry::init('ModelName'); } $this->ModelName->getNav(); ... On 18 Mai, 15:37, "Dr. Loboto" wrote: > $this->loadModel('Section'); > $this->Section->getNav(); > > On May 18, 4:45 pm,

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: Problems with URLs causing flash too break

2010-05-18 Thread Andy Dirnberger
Do you have a crossdomain.xml file? On May 17, 8:21 pm, Cycling_Joe wrote: > Can anyone guide me to what I am doing wrong. > If the www is omitted in my url's it causes my flash  files to break. > If I go tohttp://www.mysite.comeverything is fine. > If I go tohttp://mysite.comall my flash files s

HABTM and 1.3 version

2010-05-18 Thread Ziki
I have problems with HABTM associations, i did everything like it is recommended, and try other behaviors for inserting HABTM, but nothing of that not working. I am using that in my plugin, if I use this http://bakery.cakephp.org/leafs/view/23 or this http://bakery.cakephp.org/articles/view/add-del

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, thomaus wrote: > > > > Hi, > > > > I already made some multilingual w

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 time, > > it doesn't work and I don't get it. > > > What I did

Re: belongsTo and hasMany relation split in two queries

2010-05-18 Thread piousbox
make sure that in the database you have column comments.picture_id which makes the relationship Picture has_many Comment. You don't have to use belongs_to as that's just the inverse of has_many. You can really make do with only one. If you want, you can add another column, pictures.is_commented (

Re: array_rand not working!

2010-05-18 Thread piousbox
First, if you're developing this application, I strongly advice not messing with caching until you're ready to deploy. In particular, you do $banners_tmp = Cache::read('banners'); even if it returns empty? Maybe you're looking at only your cached version all the time, not what's in your database?

Re: Layout

2010-05-18 Thread piousbox
Yes, definitely. It so happened that of a dozen or so webapps I've written, ALL of them are CRUD-like. That's because once you begin to manage data of any degree of complexity, you can't do without CRUD. If you don't need CRUD, perhaps you don't need cakePHP. If your site is so simple as not to req

Re: A little complexed find()

2010-05-18 Thread piousbox
Some people may throw rocks at me, but I find writing custom SQL queries not a bad solution for some tasks. Mind you! I <3 cakePHP and I tried doing the most complex finds using cakePHP conventions, with php arrays containing all my conditions... and I consistently run over my memory limit (128Mb a

Re: Problems with URLs causing flash too break

2010-05-18 Thread Jeremy Burns
Seven... Jeremy Burns jeremybu...@me.com On 18 May 2010, at 01:21, Cycling_Joe wrote: > Can anyone guide me to what I am doing wrong. > If the www is omitted in my url's it causes my flash files to break. > If I go to http://www.mysite.com everything is fine. > If I go to http://mysite.com all

Re: Problems with URLs causing flash too break

2010-05-18 Thread Jeremy Burns
Six posts in an hour? Jeremy Burns jeremybu...@me.com On 18 May 2010, at 01:21, Cycling_Joe wrote: > Can anyone guide me to what I am doing wrong. > If the www is omitted in my url's it causes my flash files to break. > If I go to http://www.mysite.com everything is fine. > If I go to http://m

Re: Front-end for end-users and admins design

2010-05-18 Thread Andrei Mita
Thank Renato. Actually I was thinking to develop two separate cake apps: one to run the website for the end-users and one, nested inside the main cake app, to run the administration panel. for instance: mywebsite.com for end-users and mywebsite.com/oven for admins Any other suggestions? On Tue,

Re: Best practice for referencing a model in app controller

2010-05-18 Thread Dr. Loboto
$this->loadModel('Section'); $this->Section->getNav(); On May 18, 4:45 pm, "christh...@gmail.com" wrote: > In most projects I find I need to reference one model in every context > say for example 'sections' which holds the top level navigation, > usually I place a function in the app_controller t

Re: How do I write $this->render() to a variable?

2010-05-18 Thread Dr. Loboto
Check EmailComponent::__renderTemplate() On May 18, 4:48 pm, wrdevos wrote: > Hi, > > I have a mail layout, and two mail views (text and html). From my > controller I can render emails just fine with these three, BUT I want > to store the rendered emails in my mail queue in the database. > Theref

Re: Problem with internationalization

2010-05-18 Thread Dr. Loboto
Not "fr", but "fre". On May 18, 7:29 pm, thomaus wrote: > 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() > { >                

Re: Front-end for end-users and admins design

2010-05-18 Thread Renato de Freitas Freire
I like to do all the client system first, then I do another system, completly diferent to admin stuff. Even cake having the admin route, I dont like to use it. That way, I can put it in another url, so, guessing my admins urls is not a trivial thing... so, if one day, someone find a bug in cake adm

Re: php limits?

2010-05-18 Thread Matthew Powell
php.ini On Tue, May 18, 2010 at 02:24, Dilip Godhani wrote: > i want to create pdf but that give me that error > > Allowed memory size of 16777216 bytes exhausted (tried to allocate 4980736 > bytes) > > Help me > Thanks > -- > Dilip Godhani > Jr Software Developer, Entourage Solutions > e-mail:

Re: Cakephp Feasibility for a project

2010-05-18 Thread designv...@gmail.com
I would say Cake is perfectly adequate for a job like this, there is nothing there that I could forsee being a problem. Similar applications? I think you have a fairly bespoke job there. Payment gateways shouldn't be too tricky, there are a couple of good PayPal examples around for Cake. Paypal h

Re: thtml -> ctp conversion

2010-05-18 Thread greg2000
example should have been: find /path/to/folder -type f -print0 | xargs -0 rename -v -n 's/ \.ext1$/\.ext2/' *.ext1 and watch out for that line break that should not be there.. the above command is one line On May 18, 9:12 am, greg2000 wrote: > Here's a handy way of quickly renaming a bunch of .t

Re: render a different element for different user groups

2010-05-18 Thread Brenda
You can read the info you set during Auth in the view. In my case, I have a variable Auth.User.is_admin, which I then read like this at the top of the default layout, default.ctp $isAdmin = $session->read('Auth.User.is_admin'); Then later in the view, I determine whether or not to show the admin

thtml -> ctp conversion

2010-05-18 Thread greg2000
Here's a handy way of quickly renaming a bunch of .thtml files to .ctp files if you are converting a 1.1 application: To change the extension for a group of file names in nested folders (via the shell on a Linux/Unix box with Perl / Rename already installed ...and proper permissions of course)

Re: different buttons in one form

2010-05-18 Thread Jeremy Burns
It was you who originally taught me that trick ;-) Jeremy Burns jeremybu...@me.com On 18 May 2010, at 13:55, John Andersen wrote: > Good for you Jeremy, you just answered before I did :) > Enjoy, > John > > On May 18, 3:52 pm, Jeremy Burns wrote: >> Give each button a 'name' (e.g. 'add', 'd

Re: different buttons in one form

2010-05-18 Thread John Andersen
Good for you Jeremy, you just answered before I did :) Enjoy, John On May 18, 3:52 pm, Jeremy Burns wrote: > Give each button a 'name' (e.g. 'add', 'delete' and 'update'). Then in your > controller function: > > if (isset($this->params['form'])): >         if (isset($this->params['form']['add

Re: different buttons in one form

2010-05-18 Thread John Andersen
Assuming all the buttons are submit buttons, then just take a look in the parameters that are available in the action. See what is inside the variable $this->params, that should give you a clue on how to solve your issue. Enjoy, John On May 18, 3:43 pm, Master Ram wrote: > hi..  am an new to c

Re: different buttons in one form

2010-05-18 Thread Jeremy Burns
Give each button a 'name' (e.g. 'add', 'delete' and 'update'). Then in your controller function: if (isset($this->params['form'])): if (isset($this->params['form']['add'])): ...do something... elseif (isset($this->params['form']['delete'])): ...do s

Virtual fields in related data

2010-05-18 Thread ianmcn
The new 1.3 virtual fields feature seems fantastic, but I can't get it to work with related data. For example, I have one model ExtensionRequest with a couple of virtual fields. They are retrieved perfectly if I use ExtensionRequest::find(), but if I use a related model Extension::find() (belongsTo

different buttons in one form

2010-05-18 Thread Master Ram
hi.. am an new to cakePHP, i have 3 buttons in one form. with different funtion. 1. add 2. delete 3. upadt how to use these buttons in one form. i used "isset" but not working please give any sample code. thank u Check out the new CakePHP Questions site http://cakeqs.org and help others with

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: render a different element for different user groups

2010-05-18 Thread Jeremy Burns
There might be a smart way, but if not, you could get the name of the group the person belongs to and create a variable such as $groupName + '_leftbar', then echo $this->element($elementName); Jeremy Burns jeremybu...@me.com On 18 May 2010, at 13:10, Ernesto wrote: > Hello. > > i have 3 elem

render a different element for different user groups

2010-05-18 Thread Ernesto
Hello. i have 3 elements "standard_leftbar", "admin_leftbar" and "customer_leftbar". is there any smart way to render one of those elements in my view, based on User's group_id, provided by the Auth component? sry for my bad english bye Check out the new CakePHP Questions site http://cakeqs.or

cakephp and typo3

2010-05-18 Thread manolo
Hi, i've seen differents solutions for integrating Cakephp with Joomla or Drupal. Does anybody did try to use it with typo3 ? Manolo 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 subscr

$this->params['pass'] array is empty or off by one. Is this an admin routing thing?

2010-05-18 Thread Daniel Talsky
$this->params['pass'] At this URL, this is what I'm seeing: http://domain.com/admin/images_for_items_antiques/upload/23 Array ( [pass] => Array ( ) [named] => Array ( ) [controller] => images_for_items_antiques [action] => admin_upload [plugin] => [prefix] => admin [admin] => 1 [form] => Array (

Re: Cakephp Feasibility for a project

2010-05-18 Thread mike karthauser
On 18 May 2010, at 06:28, barbi wrote: > SEEKING ADVICE - IS CAKEPHP A GOOD FIT FOR THIS APPLICATION? yes. -- Mike Karthäuser Managing Director - Brightstorm Ltd Email: mi...@brightstorm.co.uk Web: http://www.brightstorm.co.uk Tel: 07939 252144 Address: 1 Brewery Court, North Street, Bristo

Cakephp Feasibility for a project

2010-05-18 Thread barbi
Hi, I am a web developer and very new to cakephp [and PHP frameworks as such]. I went through [and implemented] the blog tutorial at http://book.cakephp.org/view/219/Blog and also went through the resource at IBM developer works [http://www.ibm.com/developerworks/ opensource/tutorials/os-php-cake1

Problems with admin routing in 1.3 stable

2010-05-18 Thread Mike
I've been developing a web app with 1.3RC2, which I've just migrated to 1.3 stable. I've completed the migration guide but am having a few problems with admin routing: I have the following line in my core.php config file: Configure::write('Routing.prefixes', array('admin')); 1. I've had

Problems with URLs causing flash too break

2010-05-18 Thread Cycling_Joe
Can anyone guide me to what I am doing wrong. If the www is omitted in my url's it causes my flash files to break. If I go to http://www.mysite.com everything is fine. If I go to http://mysite.com all my flash files show "undefined" Or is there an easy way to redirect any request missing the www

Re: How write joins in cakephp please help me out

2010-05-18 Thread Fran Iglesias
HI El 18/05/2010, a las 12:20, Narendra Padala escribió: I am new to cakephp, If any one can help me how to write left joins in cake php. please conver below query in cakephp try http://book.cakephp.org/view/872/Joining-tables Check out the new CakePHP Questions site http://cakeqs.org and h

How write joins in cakephp please help me out

2010-05-18 Thread Narendra Padala
I am new to cakephp, If any one can help me how to write left joins in cake php. please conver below query in cakephp $sql = "SELECT `c`.`campaign_id`, `c`.`supplier_id`, `c`.`brand`, `c`.`start_date`, `c`.`end_date` FROM `campaigns` as `c` LEFT JOIN `campaign_s

How write joins in cakephp please help me out

2010-05-18 Thread Narendra Padala
Hi..All, I am new to cakephp, If any one can help me how to write left joins in cake php. please conver below query in cakephp $sql = "SELECT `c`.`campaign_id`, `c`.`supplier_id`, `c`.`brand`, `c`.`start_date`, `c`.`end_date` FROM `campaigns` as `c` LEFT JOIN `

Re: Notice (8): Undefined variable: session [APP\views\layouts\login.ctp, line **] and Notice (8): Undefined variable: javascript [APP\views\layouts\default.ctp, line **] :: CakePHP 1.3

2010-05-18 Thread Kurt Polinar
I see. I haven't read it. Now I know. Thank you so much John. Your a big help. Solved! On Tue, May 18, 2010 at 3:58 PM, John Andersen wrote: > The javascript helper in 1.3 is deprecated, take a look at: > > http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3#View-and-Helpers-15

How do I write $this->render() to a variable?

2010-05-18 Thread wrdevos
Hi, I have a mail layout, and two mail views (text and html). From my controller I can render emails just fine with these three, BUT I want to store the rendered emails in my mail queue in the database. Therefore I would like to *grab* the rendered result and put it into a variable before I write

Best practice for referencing a model in app controller

2010-05-18 Thread christh...@gmail.com
In most projects I find I need to reference one model in every context say for example 'sections' which holds the top level navigation, usually I place a function in the app_controller that gets the navigation details and adds them to the view, whats the best way to access the model ? Currently I'

Re: Bind more views together

2010-05-18 Thread Davor Ilic
Yeah thats it i wanna Display it as One Template. I will take a Look at this Doc. Thanks Von meinem iPhone gesendet Am 18.05.2010 um 11:30 schrieb Jeremy Burns : What do you mean by 'bind'? Do you mean that you want to display more than one view at the same time? If so, you should look at

Re: Bind more views together

2010-05-18 Thread Jeremy Burns
What do you mean by 'bind'? Do you mean that you want to display more than one view at the same time? If so, you should look at elements: http://book.cakephp.org/view/1081/Elements Jeremy Burns jeremybu...@me.com On 18 May 2010, at 10:28, Davor Ilic wrote: > Hi, > > I want to bind more views

Bind more views together

2010-05-18 Thread Davor Ilic
Hi, I want to bind more views together because i have a navigation and an Body view like this "navigation.ctp & content.ctp" and i want to bind it together how i need it. How would be this createt? thanks. Check out the new CakePHP Questions site http://cakeqs.org and help others with their Ca

Front-end for end-users and admins design

2010-05-18 Thread Andrei Mita
Hello, I'm getting ready to start a real project using Cake and the first question is: how to separate controllers, actions and views for end-users and admins. I mean, is there a recommended way of doing the splitting or is it enough to create separate actions for end-users and for admins? For i

datasources and function query

2010-05-18 Thread emanuele
Hello cake's fellows, looking at datasource documentation I can't figure out what I can do if I want to call actions different by read/create/update/delete. Previously I had realized that declaring a function query($action, $args) actions different by which before mentioned are processed by this m

Re: A little complexed find()

2010-05-18 Thread still
Ok Im not very familiar with google group tooI thought reply to author means reply to this article.. below are the contents i wanted to post after you guys. > Thank you guys ~~ that's woking fine! and made me having deeper > understanding with cake's model relationship conventions.. > in fact

Re: Notice (8): Undefined variable: session [APP\views\layouts\login.ctp, line **] and Notice (8): Undefined variable: javascript [APP\views\layouts\default.ctp, line **] :: CakePHP 1.3

2010-05-18 Thread John Andersen
The javascript helper in 1.3 is deprecated, take a look at: http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3#View-and-Helpers-1566 See the bottom of the page. Enjoy, John On May 18, 10:17 am, kirara wrote: > Hi guys, > > My first problem with Undefined variable: session is

php limits?

2010-05-18 Thread Dilip Godhani
i want to create pdf but that give me that error Allowed memory size of 16777216 bytes exhausted (tried to allocate 4980736 bytes) Help me Thanks -- Dilip Godhani Jr Software Developer, Entourage Solutions e-mail: di...@entouragesolutions.com dilip.godh...@gmail.com Web.: www.entourage

Re: array_rand not working!

2010-05-18 Thread HK
Well it is like: $a => [0] => ['Action'] => ['text'] => ['banner'] =>['Category'] => ['description'] [1] => ['Action'] => ['text'] => ['banner'] =>['Category'] => ['description'] . Even if

Re: array_rand not working!

2010-05-18 Thread WebbedIT
srand() and rand() are not functions from the Cake core, they are PHP functions and as such operate as the PHP manual says they do. There must be some other factor that is causing your issue, maybe something to do with the way the array your trying to randomise is structured? HTH Paul. Check ou

Notice (8): Undefined variable: session [APP\views\layouts\login.ctp, line **] and Notice (8): Undefined variable: javascript [APP\views\layouts\default.ctp, line **] :: CakePHP 1.3

2010-05-18 Thread kirara
Hi guys, My first problem with Undefined variable: session is fixed (thanks for Zaky Katalan-Ezra). It made out that commenting $var helpers = array('Html','Form','Javascript'); corrected the problem. But another problem occurs. 'Undefined variable: javascript'. So I've declared my helper to my us