Finding the page that a specific record appears

2008-11-12 Thread Walther
bility for a user to jump to a page that contains a specific record, the id (or some other unique identifier) for the record is known, how would I go about finding which page the particular record appears on? I assume that I'd need to write my own paginate

Re: Finding the page that a specific record appears

2008-11-12 Thread Walther
roblem is, depending on your dataset and how often it changes,   > that that position will change between pageloads, or at least that the   > URL won't work for very long (hence not bookmarkable etc). > > On 13 Nov 2008, at 00:25, Walther wrote: > > > > > I don't k

Re: Finding the page that a specific record appears

2008-11-13 Thread Walther
']['page'] = $page; Works wonderfully! On Nov 13, 9:00 am, Walther <[EMAIL PROTECTED]> wrote: > The idea is for a forum, so the page of a particular post will not > change (New posts are added to the end of the set). > > Can I force the paginate method in the control

Multiple views

2008-11-23 Thread Walther
I'm using version 1.2RC3 On the front-page of my application I want to be able to display numerous other views. For example I may want to display a view of my pages controller (for example a welcome message), and a view from my calendar controller. How would I do this? --~--~-~--~~--

Issue using external vendor script

2009-02-25 Thread Walther
that the library uses. The library works perfectly in a stand alone PHP script on the same server, however as soon as I try to use it inside a CakePHP application it falls over. Has anybody successfully implemented this script in CakePHP and how did you go about doing so? Thanks Walther

Re: Model without table

2009-03-10 Thread Walther
Just add in your model: var $table = false; That will tell cake that there is no table associated with that model. On Mar 10, 10:10 am, kaushik wrote: > I am going to develop a section in a site, where there is no database > operation. Only there will a form and a mail will fire on submit of >

Re: Model without table

2009-03-11 Thread Walther
Bugger, I always get that one wrong, I obviously don't use it enough... On Mar 11, 8:05 pm, mscdex wrote: > On Mar 10, 7:32 am, Walther wrote: > > > Just add in your model: > > > var $table = false; > > Close, it's actually $useTable. --~--~-~--~-

Custom admin routing and pagination

2009-03-17 Thread Walther
ppose I could fix it with a route, but I'm not sure how, any suggestions. Walther --~--~-~--~~~---~--~~ 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

Re: Custom admin routing and pagination

2009-03-18 Thread Walther
'courseadmin' route the generated urls are wrong (/students/courseadmin_index). URLs that are generated with the html helper works fine in both routes. On Mar 17, 6:10 pm, brian wrote: > On Tue, Mar 17, 2009 at 8:37 AM, Walther wrote: > > > I am struggling to get custom admin routi

Re: Custom admin routing and pagination

2009-03-18 Thread Walther
I managed to get a work around routing that works. Added: Router::connect('/students/courseadmin_loadDate/*', array('controller' => 'students', 'action' => 'loadDate', 'prefix' => 'courseadmin', 'courseadmin

Re: Why is validation called twice?

2009-04-01 Thread Walther
How are you actually saving the data? Is it possible that you are calling validate and then save? On Apr 1, 12:32 am, Miles J wrote: > For now I had to manipulate the sessions to make sure the first value > is used and not over written. > > /** >  * Validate recaptcha >  * @param array $data >  

Re: Get value no ID from query

2009-04-05 Thread Walther
If you have a hard coded set of ranks which will not change and you don't want to use a another table/model then just make an array with the various rank words and use the rank value as the key for each rank. On Apr 5, 4:59 am, "Dave Maharaj :: WidePixels.com" wrote: > How can I get the value of

Re: Tagging system in Cake - hasAndBelongsToMany problems

2009-04-05 Thread Walther
Use the containable behaviour. $this->Game->Tag->find('all', array('conditions' => array('Tag.name' => 'foo'), 'contain' => array('Game' => array('Genre', 'System')); As long as your associations are correctly configured it should work. Read up about it at http://book.cakephp.org/view/474/Contai

Re: Get value no ID from query

2009-04-05 Thread Walther
If you have a hard coded set of ranks which will not change and you don't want to use a another table/model then just make an array with the various rank words and use the rank value as the key for each rank. On Apr 5, 4:59 am, "Dave Maharaj :: WidePixels.com" wrote: > How can I get the value of

Looking for something better then requestAction?

2009-04-06 Thread Walther
Hi all In an app that I am currently developing I wish to give the administrator the ability to customise the home page of the app by being able to include various other things into the home page (For example, the admin may wish to show a welcome message which uses the pages controller, and they

Re: Looking for something better then requestAction?

2009-04-06 Thread Walther
f the requestActions. Seems to be working quite well. >From those who are more experienced at Cake, is this a better way of doing it? On Apr 6, 10:51 am, Walther wrote: > Hi all > > In an app that I am currently developing I wish to give the > administrator the ability to custom

Re: Looking for something better then requestAction?

2009-04-06 Thread Walther
ng-reusable-elements-wi... > > On Apr 6, 12:06 pm, Walther wrote: > > > I believe I've found a solution. > > > For each possible item that can be added to the homepage I store the > > name of the controller that is called. By simply changing this to the > &

Re: Join query

2009-04-06 Thread Walther
This looks like a job for model associations. http://book.cakephp.org/view/78/Associations-Linking-Models-Together Basically set Parent to have many Entity (Or what every relationship is the correct one for your case) On Apr 6, 4:07 pm, Manisha wrote: > Hello All, > > Here is the Controller >

Re: Looking for something better then requestAction?

2009-04-10 Thread Walther
Ah, great! Thanks. On Apr 7, 6:15 pm, majna wrote: > Use  cache key for each element(): > echo $this->element('news/featured', array('cache'=>array('time'=>'+1 > hour', 'key'=>'featured_news_2'))); > > O

Re: DRY function

2009-04-10 Thread Walther
could do $this->view ($slug, $modelName), otherwise perhaps move them into the model and call $this->User->$modelName->view($slug); Walther. On Apr 10, 5:34 pm, "Dave Maharaj :: WidePixels.com" wrote: > I was hoping for some info on how to take 4 functions and make the into

Re: DRY function SOLVED

2009-04-11 Thread Walther
lassify($modelName); >               $options = $this->User->$model_name->find('list', > array('fields' => 'name', 'order' => 'name ASC')); >               $this->set(compact('options')); >                  

Re: App::import('Model', 'MyModel');

2009-04-13 Thread Walther
Miles has the better way of doing things. But just to directly answer your question, App::import basically does the same as the old-school php include function. So you'll do something like: App::import('Model', 'MyModel'); $mymodel = new MyModel(); Hope that helps. On Apr 11, 7:18 am, Miles J

Re: How to install cakephp

2009-04-24 Thread Walther
The installation is the same regardless of windows or Linux. Put it into the document root for your server software and change the required files. On Apr 24, 12:10 pm, "Faza" wrote: > Hello there! > > I did my first install following the below tutorials: > > http://book.cakephp.org/view/29/Insta

Re: Model Association Not Creating Query Joins

2009-04-24 Thread Walther
In cases like what you are looking at it tends to work a bit better if you rather do the find on the model you want to filter. Something like: $alert_ids = $this->Alert->AccountAlert->find ( 'all', array ( 'conditions'=> array ( 'Acco

Re: Migrating from CakePHP 1.1 - Yikes?!

2010-12-01 Thread Walther
Going from 1.1 to 1.2 is a bit tricky, but 1.2 to 1.3 is trivial. For 1.1 to 1.2, just follow this guide: http://book.cakephp.org/view/411/Migrating-from-CakePHP-1-1-to-1-2 Then once it is running stable under 1.2, follow: http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3 It is

Re: date time calendar picker

2011-02-21 Thread Walther
This is the one I use: http://tinyurl.com/6g2xokx It is incredibly powerful! On Feb 21, 5:58 pm, Tapan Kumar Thapa wrote: > Hello Community, > > Can anyone suggest good light weight (with minimum configuration) calendar > picker which should have hour, min and seconds feature? > > Regards > Tapa

Re: Possible Memory Leak

2011-02-21 Thread Walther
This sounds like exactly the sort of task that PHP isn't made for. Right tool for the job and all that. On Feb 22, 5:30 am, "Dr. Tarique Sani" wrote: > Web servers are simply not designed to have such long single requests > > The best would be to use shell with short php scripts and some sort of

Re: extracting data within tags

2011-02-21 Thread Walther
Cakephp has quite a nice xml class for reading xml files. Read the book a little bit. On Feb 22, 5:02 am, johnlaw wrote: > Hi,, > > I'm a newbie in php.. > I have xml files from which i want to extract it into information > in .txt file... > can anyone show me how to convert this, > > north > sou

Re: Friendly image/files URL routing

2009-08-27 Thread Walther
Actually, using a media view would be the better bet. Already deals with everything for you. On Aug 26, 3:30 pm, Jon Bennett wrote: > Hi, > > > I am uploading files(images, mp3s etc) to my webroot /files/ folder. > > The files are named ".". Without any > > custom routing I can access these file

Re: displayField is not in the database (mixed models?)

2009-09-16 Thread Walther
I have no experience in this, but a custom data source might be the way to go. On Sep 15, 4:53 pm, iFeghali wrote: > Hello Brian, > > Thank you for your reply. Yes, that could be an alternative but it > would require lots and lots of changes. I am not talking about only > one single "select", bu

Re: how to create a simple website with cakephp?

2009-09-18 Thread Walther
If all you want to do is to create a simple website then you shouldn't be using CakePHP (Right tool for the job and all that) Anyway, the best tutorial you'll ever find for anything cake is the book (book.cakephp.org) and for good articles the Bakery (bakery.cakephp.org) On Sep 17, 1:56 pm, Barn

Re: problem with facebook-like ajax windows submitting forms

2009-09-18 Thread Walther
Take a look at the AjaxForm plugin for jQuery. You need to submit the form using AJAX as well. On Sep 18, 10:15 am, 浪漫様 wrote: > i don't think that is the problem... facebook can do it without > iFrames and works perfectly no matter what browser. > moreover... i'm talking about same domain's for

Re: Can't email using the Email Component

2009-09-18 Thread Walther
If you look at the code, you'll notice that it returns exactly the same thing as php mail() will return. On Sep 18, 7:48 am, Bert Van den Brande wrote: > Have you tested the PHP mail() function directly ? > > The problem with the EmailComponent is that it hides any indicative mail > errors that

Re: Doubt in cake php

2009-09-29 Thread Walther
Just be careful with requestAction. If you don't cache properly you can dramatically slow down your application. Mark Story has some good tips on requestAction use at his blog (http://mark-story.com/) On Sep 28, 12:15 pm, John Andersen wrote: > It will not be much more fat, as the only thing eac

Re: Install / Update huge application.

2009-11-09 Thread Walther
Database Schemas would be a good start to read up on (In the book somewhere). Online updating of files is dangerous and requires your users to lower their security settings (Never a good idea). It would be better giving them a link to download a zip file and detailed instructions on how to upload

Re: Mod rewrite skip

2009-11-10 Thread Walther
Not sure exactly what you are wanting to do, but CakePHP automatically allows you to access files in webroot. So if you have a app/webroot/manager and you visit domain.com/manager you will automatically access whatever files are in app/webroot/ manager. This allows you to have 3rd party scripts (l

Re: Play Audio in PHP

2009-11-10 Thread Walther
PLEASE don't do this! It is the most irritating thing for a user if a website starts playing random music when they visit it. On Nov 10, 4:10 pm, Ramya Arumugam wrote: > Hi All, > > Is it possible to play audio file in php? > > If yes, then how will we embeded it in the php file. > > Thanks, > R

Re: very basic: getting "index of" before index.php loads

2009-11-12 Thread Walther
Well, you are missing the .htaccess files (there should be 3. In myapp, myapp/app and myapp/app/webroot). You also need to check that you actually have php installed, and that index.php is set as a default page in apache. And you need to make sure that .htaccess files are allowed (All override all

Re: render shared view file

2009-11-22 Thread Walther
This: http://bakery.cakephp.org/articles/view/generating-automatized-json-as-output is exactly what you are looking for. On Nov 18, 2:13 pm, ddaffy wrote: > hi! > > i'm using Router::parseExtensions('json') to be able to request data > delivered in json format, and i've been wondering if there'

Re: To Sanitize or not? :: Public Opinion

2009-11-22 Thread Walther
CakePHP already makes any user input save in save functions (with the exception of updateAll). My general rule of thumb, is not to filter user input on save, but on display. This way you can see which users are trying malicious code and take action accordingly. On Nov 23, 1:12 am, robustsolution

cake-php@googlegroups.com

2009-11-23 Thread Walther
What is wrong with using Accounts/Manage/var:b73cr6xzr6z/ var2:somethingelse ? It looks neater, and is just as easy to use from an application perspective. On Nov 22, 8:54 pm, Ragnis wrote: > So how can i do that? > And i don't want to use /Accounts/Manage/var:b73cr6xzr6z/ > var2:somethingelse

Re: Issue with Configure::write('debug', '0');

2009-11-29 Thread Walther
You need to clear the CakePHP cache. Delete all the files (not directories) in app/tmp On Nov 28, 8:52 am, SugarCRM Geek wrote: > Hello Cakephp Group, >        Am facing a problem with this function >          Configure::write('debug', 0); > Whenever i install my cakephp in my Production server,

Re: Multiple checkbox in Cakephp 1.1 ??

2009-11-29 Thread Walther
No version of CakePHP has proper support for enum fields. And, AFAIK, multiple checkboxes are only possible in 1.2. If I were you, I'd spent the time to upgrade to 1.2. 1.2 is far better than 1.1, and 1.2 offers a easy upgrade path to the soon to be released 1.3, which is even better. On Nov 29,

Re: what does it mean to bake something

2009-12-03 Thread Walther
CakePHP has a very nice console/shell scripting system. Cake Bake is one of the core scripts. Bake allows you to very quickly generate basic Models, Controllers and Views for your app based on your database structure. It even setups relationships for you (Assuming you are following the conventions

Re: Here is my database schema,please peovide me model for his.

2009-12-04 Thread Walther
What you want is http://book.cakephp.org/view/113/Code-Generation-with-Bake The Bake script will look at your database and automatically generate the required model files. Use it! On Dec 4, 11:59 pm, Marcelo Andrade wrote: > On Thu, Dec 3, 2009 at 3:22 AM, John Andersen wrote: > > Sorry to say

Re: Accessing models

2009-12-05 Thread Walther
That is the wrong way. You should use $Model = ClassRegistry::init('ModelName); On Nov 30, 11:07 pm, brassman79 wrote: > so I figured out that I can access a model to save and retrieve data > from components by saying $myvar = new ModelName(); > > etc. > > I have another model that keeps giving

Re: cakephp case insensitive controller name

2009-12-12 Thread Walther
I don't use ?> in pure php files. As for your problem, check routing, and make sure you have cleared you cache. And, please define what you mean by 'Does not work' On Dec 13, 6:05 am, will wrote: > Thanks for replying. It's so nice to come back and get an opinion or > inspire and idea from some

Re: Question on 1.3 alpha

2009-12-15 Thread Walther
1.3 Alpha isn't very stable. But the current Git repository is. On Dec 16, 3:52 am, Dave Porter wrote: > Hi Everyone, > > I just wondered how stable 1.3 alpha is ? > > I noticed that this site:  http://mark-story.com/  has a blog entry > about upgrading, so I guess it must be a fair bit further o

Re: Question on 1.3 alpha

2009-12-16 Thread Walther
gt; in the ticket tracker.  That way the issues can get fixed.  I can't > > fix things I don't know about. > > > -Mark > > > On Dec 16, 12:53 am, Walther wrote: > > > > 1.3 Alpha isn't very stable. But the current Git repository is. > > &g

Re: How to: Implement Dynamic Route in CakePHP

2009-12-16 Thread Walther
Why are you deleting your cache and then reading it? Kind of removes the advantage of using cache in the first place. Also, the Cache object is a static object and you don't need to use CR::init on it. You can just do Cache::read('routermenus') directly in your routes file. That said, it is a pr

Re: Migration Guide 1.2 to 1.3

2009-12-16 Thread Walther
I've never experienced that before. Are you using the alpha release, or the git repository? On Dec 17, 3:58 am, euromark wrote: > i experienced something else now though > something quite weird > > my models (corresponding to the current controller) are not loaded and > inst. > i wondered what wa

Re: A problem in cook book 1.2

2009-12-16 Thread Walther
You are probably making a mistake somewhere. Can you post your code over at bin.cakephp.org and paste the link here. On Dec 16, 4:08 am, retzzz wrote: > I tried the Blog example in cookbook 1.2.  There is a problem in > Chapter 10.1.12 (http://book.cakephp.org/view/340/Editing-Posts) . > You can

Re: Plugin callbacks and controller hooks

2009-12-18 Thread Walther
I have done something similar for a CMS that I am busy writing. First look here: http://cakealot.com/2009/04/eventful-a-cakephp-event-system/ That was my inspiration. Then look here: http://github.com/dakota/CMScout/tree/master/controllers/ That is my event component. Basically, each plugin has a

Re: Plugin callbacks and controller hooks

2009-12-20 Thread Walther
as I understand). This is why I was > searching for something more "real life ready" implementation, already > tested by others. > > 10x a lot for sharing this. I also seen that you're using debug kit. > Everytime I look around here in the community I learn something

Re: play audio and video with php

2009-12-20 Thread Walther
The short answer is that you can't. The long answer is that PHP runs on the server, so unless you want audio to play on your server (Which probably doesn't have speakers), you can't use PHP. On Dec 19, 7:51 pm, Anjum wrote: > hi all, >  i want to play audio and video files using php > anyone can

Re: 1.3 JsHelper getting started - basic question

2009-12-23 Thread Walther
The correct way in 1.3 is $this->Js On Dec 23, 9:19 pm, stefano wrote: > try with $Js > > On Tue, Dec 22, 2009 at 11:41 AM, camillemoussette > > > > wrote: > > Hello, > > > I'm trying to use the new JsHelper in 1.3 but I'm hitting a (stupid) > > wall. Whenever I follow the code from the document

Re: i have three queries

2009-12-27 Thread Walther
Hi 1. $form->end(array('label' => 'Submit', 'div' => false)) <- It helps to look at the documentation sometimes. 2. Not really, but you can do Router::url(array('controller' => '...')) anywhere in your application to get the correct url. 3. Router::url('/', true); On Dec 26, 7:14 am, engine wr

Re: Localization for Model validation messages

2009-12-27 Thread Walther
Check here: http://book.cakephp.org/view/133/Multiple-Rules-per-Field (at the bottom) for the recommended method of doing it. On Dec 26, 10:55 am, si-mon wrote: > Thanks John. Thanks Euromark. Really helpful... > > On Dec 25, 9:55 pm, John Andersen wrote: > > > I can't agree, as I prefer to have

Re: Javascript form validation in cakephp 1.3.0

2010-05-16 Thread Walther
You know, there is this wonderful little tool available called 'Google Search' use it. http://tinyurl.com/33mcrqb http://github.com/mcurry/js_validate http://sandbox2.pseudocoder.com/demo/validation On May 15, 9:24 am, Nandan Jana wrote: > Please can any one reply. > > is it possible to validat

Re: Javascript form validation in cakephp 1.3.0

2010-05-16 Thread Walther
Who are you, and why are you talking about facets? On May 16, 2:51 pm, floridapastor wrote: > I am aware and talking about the FACETS. You should check it out on google > and please reply. pastor > > On Sun, May 16, 2010 at 3:05 AM, Walther wrote: > > You know, there is thi

Re: General development with MVC and Cake in particular

2010-06-11 Thread Walther
There are a couple of ways you could to that. One way is to start the user at acton A, rhee form on action A submits to action B and action B submits to action C. Or you could use a bit of ajax magic, or do a google search for the wizard component. The wizard component is quite nice. On Jun 8, 11

Re: Updating is creating new record

2010-06-17 Thread Walther
Just remember that updateAll does not sanitize inputs like save and saveField does and so may open your app to SQL injection attacks unless you manually sanitize the user inputs. On Jun 16, 12:28 pm, WhyNotSmile wrote: > Thanks for all the replies. > > I got it working by using updateAll, as Serg

Re: User registeration and at the same time create a record in Account

2010-07-12 Thread Walther
Cricket's way isn't the best way to do it in cake. What you should do is make use is the afterSave callback in the user model. function afterSave($created) { if($created ==true) { $data = array('Account' => arrray('user_id' => $this->id)); $this->Account->save($data);

Re: Cakephp and XAMPP installation nightmare, Can't get cake to understand root

2010-07-12 Thread Walther
The ibm tutorial is quite an advanced tutorial for a first time. Plus I don't think it is compatible with 1.3. Maybe do the blog tutorial in the cake book first and if that works then you can tackle they more advanced stuff. Also when you went to that initial page, was the css loaded? On Jul 12

Re: cake 1.3.2 wants to be too smart

2010-07-12 Thread Walther
I've never seen that problem before... Cake offers the same functionality, it is well documented in every book. Basically you crater a field called created or updated as a datetime, default null and cake will populate it automatically. On Jul 12, 5:02 pm, Grzegorz Pawlik wrote: > just switching

Re: Running sql queries in cake

2010-08-28 Thread Walther
You should not use the query function except for incredibly complex queries. CakePHP 1.3 introduced the virtualFields parameter to help with this exact problem. Do: $this->Question->virtualFields = array( 'maxQSet' => 'max(qset'), ); $max = $this->Question->find('first', array('fields' => arr

Re: find 'all' using containable issue

2009-04-29 Thread Walther
Yes, Behaviours go with models Components go with controllers Helpers go with views Got me in the beginning too. On Apr 29, 1:21 pm, Zeugme wrote: > An IRC conversation gave me the solution : containable behavior had to   > be attached in the model and not in the controller. > > On Apr 29, 200

Re: Get autoincrement ID after save (insert)

2009-05-07 Thread Walther
$this->ModelName->id also works. On May 7, 9:33 am, Günther Theilen wrote: > Sorry, typo. > > It should be getInsertID(). > > > Hi, > > > $last_id = $this->ModelName->getInsertId() should do the trick. > >http://api.cakephp.org/class/model#method-ModelgetInsertID > > > Regards > > Guenther > > >

TreeBehaviour questions

2009-05-18 Thread Walther
I am using the tree behaviour in conjunction with the jQuery tree at www.jstree.com to create a admin interface for a forum that allows multiple and unlimited subforums. It is working quite well. The only problem is that jstree doesn't tell you how far a node has been moved, but rather gives a r

Re: TreeBehaviour questions

2009-05-18 Thread Walther
I think I might have just found a bug, or the condition is not formated correctly. CakePHP doesn't handle the between operator correctly (Converts it to `lft BETWEEN` IN ('19', '1') instead of `lft` BETWEEN` '19' AND '1'). On May 18, 4:37 pm, AD7six

Re: TreeBehaviour questions

2009-05-18 Thread Walther
Nope, no bug. To use between you type " BETWEEN ? AND ?" and not just "BETWEEN". Thanks for the help AD7six! On May 18, 5:44 pm, Walther wrote: > I think I might have just found a bug, or the condition is not > formated correctly. > > CakePHP doesn't

TreeBehaviour Scope

2009-05-18 Thread Walther
Hi there How does the TreeBehaviour scope work? I imagine that it is meant to allow seperating of trees according to a certain external entity, and thereby allow you to have more then one tree inside a single table. But, it does not look like that is in fact what it is doing. How do you go abou

Re: trouble with TreeBehavior::movedown()

2009-05-20 Thread Walther
Hi. It would be nice if lft was set as the default order by the tree behaviour, and if the documentation on it was a little bit more complete. On May 17, 10:28 pm, brian wrote: > Me again. I added 'order' => array('Section.lft' => 'ASC') to my > $filters, which did the trick. Shouldn't this be

Re: Help me with forum based on CakePHP

2009-06-02 Thread Walther
I've written a forum plugin for my cakePHP based CMS, it is not designed to be used in any cake app, but maybe you can use it. You can get the forum from http://github.com/dakota/CMScout-Forums/tree/master and the whole CMS from http://github.com/dakota/CMScout/tree/master I am looking for people

Re: bug in recursive?

2009-06-05 Thread Walther
What is your SQL debug output? You'll be able to see exactly how Cake is building the queries and I'm sure it will answer your question. On Jun 5, 10:10 am, fain182 wrote: > hello, i have a simple code like this: > >                 $param = array('order'=>array('Stato.stato', 'Sito.sito')); > >

Re: Confirmable Behavior: is there something similar?

2009-06-06 Thread Walther
I don't think you should have delete links available in areas where search spiders, or rogue users can easily get to them. You should at the very least ensure that the user is logged into the site before running any sort of delete behaviour (IMO) And, having any sort of confirmation message is co

Re: ajax controller

2009-06-08 Thread Walther
Don't. Trying to smash various actions from various controllers/models into the same controller is just asking for trouble. It will be hard to maintain, it will be inefficient and hard to debug. On Jun 9, 8:41 am, "Dave Maharaj :: WidePixels.com" wrote: > Just thinking about putting all my ajax

Re: PHP Fatal error: Class 'Router' not found in cake\libs\view\helper.php on line 178

2009-06-13 Thread Walther
Well, if you use xxx then it's not using the router is it? Why would you want to be outputting links in a shell script anyway? On Jun 13, 10:57 am, joshua wrote: > Why if I change to $html->link to xxx, there will be no this > error? > Did that mean we couldn't use html helper in shell script?

Re: Big difference between CakePHP and Joomla

2009-06-13 Thread Walther
You need to know and understand PHP quite well to get the most from Cake. The Cake shells only help with creating a basic system for manipulating the database, it can not make any sort of serious functionality that you would normally need . On Jun 12, 12:06 pm, bbparis wrote: > Hello, > > I appr

Re: slug of choice

2009-06-23 Thread Walther
Sorry, I don't think anybody is really understanding what you want. It is a very bad idea to change the slug of a existing item, doing so will likely break links to the page from other sites and will probably hurt your search ratings. On Jun 22, 9:37 am, aman batra wrote: > No, Actually what i

Re: Using cake bake,finding .profile file

2009-06-23 Thread Walther
Why don't you just use the .bat (windows) version of cake bake instead of trying to get the bash version working? With that you can simply add the path to php and cake.bat into your path variable via computer properties. On Jun 23, 3:35 am, keanoppy wrote: > " On the PC, it will depend on what

Re: Cake causes CPU Spike

2009-06-23 Thread Walther
First, what do you mean by CPU spikes? What action causes it, and have you run a profiler on it? Second, why are you using raw SQL queries? On Jun 23, 4:33 am, PD wrote: > Hello Everyone, > > I am developing a  simple cake application which is causing CPU > spikes. I dont know what I am doing wr

Re: Simple SQL UPDATE question

2009-06-24 Thread Walther
Miles J: Would it not make sense then to write a AppModel method called incrementField($fieldName)? On Jun 24, 11:50 am, Miles J wrote: > 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

Re: Acl question: Can I change the name of aros and acos tables?

2009-06-25 Thread Walther
You could make more then one database config item and use them on the required tables? On Jun 25, 2:39 am, brian wrote: > On Wed, Jun 24, 2009 at 3:09 PM, zonium wrote: > > > I do use prefix param for some other projects where ACL is NOT > > utilized. > > However, my particular concern is about

Re: Sorting

2009-06-25 Thread Walther
You'll need a order field. And then the UISortable plugin does not give you the order of the dragged item, it only gives you a jquery object of the dragged item. What I do is to check the previous item in the list (In the update callback), and send the server the dragged items id, and the previous

Re: How to structure URL with Routing

2009-07-19 Thread Walther
This might help a bit better to begin with: http://book.cakephp.org/view/544/Prefix-Routing Basically prefix routing allows you to take a url in the form of :prefix/:controller:/:action (In your case superadmin/products/ view) and map it to a action in the :controller called :prefix_:action (In y

Re: Containable issue

2009-07-23 Thread Walther
Is Profile associated with ProfilesUser or with User? For containable to return ProfilesUser you'll need to make sure that Profile hasMany ProfilesUser (You bind them at runtime). Why would you want ProfilesUser and not User? On Jul 22, 9:16 am, Amit wrote: > profiles has many users. > users ha

Re: keep hitting mysql memory limit, even in Cake Shell when exporting large xml file

2009-07-27 Thread Walther
That is not a MySQL error but a PHP memory error probably related to the opening and processing of the 50mb file. You can use ini_set('memory_limit', '128M'); to change the memory limit for the request (Change the 128M as required) On Jul 27, 4:27 am, "Dr. Loboto" wrote: > You should make sure,

Re: Send Simple Mail With CakePHP !

2009-07-31 Thread Walther
http://book.cakephp.org/view/176/Email And if that still doesn't help you then you should go to the basics and re-read the ENTIRE cakeBook. On Jul 30, 7:27 pm, Abraham Boray wrote: > Well that doesn't help me out , i'm new in CakePHP . > And I'd like to see a very very simple example to start w

Re: using jquery with cakephp

2009-07-31 Thread Walther
You use it like you would use jquery normally. Very easy. On Jul 30, 10:38 am, jeremy wrote: > hai guys, > > am looking for using jquery with cakephp... > > i googled a lot but didnt get appropriate tutorials for this > > can anyone send me links or tutorials of perfroming both the client > side

Re: What is wrong with this code?

2009-08-08 Thread Walther
When in doubt, read the documentation :) (api.cakephp.org is an amazing resource). One general observation, when creating links using cake functions (Such as $html->link) it is best to use the array method as Cake the checks your routes and returns the correct url for a particular controller/acti

Re: How to obtain a number from a query that provides a COUNT

2009-08-08 Thread Walther
You shouldn't be using the Query method unless you are doing very very custom queries. Which your not. At the moment you have the overhead of CakePHP, but your not actually using the framework. I think you should read through the entire CakeBook (Again if you've already done so) and concentrate

Re: MISSING TABLE

2009-08-11 Thread Walther
Firstly, the $name must be == to the name of the Model. $name is used to compatibility in php4 Secondly, The WorksCollections controller is looking for the WorksCollection model. Cakephp only singularises the last word in a multi word name. So you should rename your WorkCollection model to WorksC

Re: Allowed memory size exhausted - on clean cakephp install

2009-08-15 Thread Walther
If you had no configuration file your server wouldn't work. It will be called php.ini and could be located in any number of places depending on exactly what operating system the server is running. On Aug 14, 10:17 am, Anna P wrote: > OK, thanks for help, it seems that I have NO configuration fi

Re: Nested Models

2009-12-29 Thread Walther
You could do http://www.application.com/message/add/contract:1 using named parameters. Or setup a route for www.application.com/contract/1/message/add On Dec 28, 11:09 pm, otisjs01 wrote: > OK, so I'm asking lots of questions today...but I really want to > learn! :) > > Anyway, I'm trying to cre

Re: Secret URLs

2010-01-02 Thread Walther
Not really possible afaik. But, security through obscurity is not the solution. You should rather spend the time writing code that will make sure that the user/referer has permissions to perform that action. On Jan 1, 9:54 pm, anka wrote: > Hi @all, > > I have a (almost) simple question! Is it p

Re: cakephp und google base / merchants

2010-01-07 Thread Walther
Hi. Take a look here: http://github.com/dogmatic/cakephp_google_plugin Dogmatic69 (From the IRC channel) has created that plugin with the goal of having all google apis available. Perhaps you can help him. You can catch him on the IRC channel most of the time. On Jan 7, 4:04 pm, euromark wrote

Re: Routing techniques

2010-01-07 Thread Walther
You can do exactly what you want using custom routing (Check the cookbook). But, as euromark pointed out, you'll need to ensure that users can't register with your existing controller names, and that you have some filtering in your route to make sure that your other controllers still work. On Jan

Re: cake book offline pdf version!!

2010-01-07 Thread Walther
It is not possible for CakePHP to generate a print version of the manual for each version because the CookBook is very much like wikipedia. There is no 'versions' of it, anybody can make edits and suggestions. Check out the new CakePHP Questions site http://cakeqs.org and help others with their Ca

Re: DATE_FORMAT in fields does not return formatted date under proper Key (Model Name)

2010-01-14 Thread Walther
What you want is Virtual Fields! Virtual fields is one of the new features in CakePHP 1.3 and is there to solve your EXACT problem. http://cakephp.lighthouseapp.com/projects/42648/13-new-features-virtual-fields On Jan 14, 3:04 pm, John Andersen wrote: > As far as I know, there is no solution! >

  1   2   >