Re: How can i export report in pdf format?

2012-09-21 Thread Walther
Use Ceeram's CakePDF plugin as already suggested. Fpdf is really old and kinda horrible. Explain exactly what issues you are having with CakePDF and I'll try to assist. It is simple to use, and the readme is quite well written. -- Like Us on FacekBook https://www.facebook.com/CakePHP Find us o

Cakephp + TCPDF

2012-07-26 Thread Walther
Tcpdf has plenty of known issues. Rather use wkhtmltopdf. Also, use the CakePDF plugin, it handles all PDF creation stuff for you, including ensuring correct headers. https://github.com/ceeram/CakePdf -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check ou

Re: Problem masking errors in cakePhP

2011-11-22 Thread Walther
You don't need to post the same message twice under different users. On Nov 22, 8:23 am, rach wrote: > Hi, > > We are using PHP 5.3.5, and cakePHP 1.3.7. We are not able to mask the > error messages we are getting - 'Strict Standards", "Fatal errors". > The problem we are running into is - > > We

Re: Mask Fatal and Strict-standard errors

2011-11-22 Thread Walther
Hi, Firstly, you do not mask fatal or strict errors. You fix them. Fatal erros mean that there is something wrong in your code and php cannot continue parsing your code. If you "mask" a fatal error, your user will simply get a white screen. Strict errors mean that you are doing something that will

Re: CakeFest 2011

2011-09-16 Thread Walther
Octavian, I spoke with Larry the other day. He has something like 44 videos to transcode, edit and upload. It is going to take a while, but it will be done. On Sep 15, 10:47 pm, Octavian wrote: > Any news? Are you still planning to put vids on Cake TV? > > Thanks > > On 8 sep, 04:55, Brett Wilton

Re: Haml and sass in CakePHP

2011-09-15 Thread Walther
CakePHP isn't modeled after Ruby (Or Ruby on Rails). It is simply a PHP framework that follows the MVC architecture, and Ruby on Rails is a Ruby framework that also follows the MVC architecture. That is pretty much their only simularity. Perhaps you could be better helped if you actually added wha

Re: Where should i contact right people in CakePHP.org because this security critical problem

2011-06-23 Thread Walther
On Jun 23, 9:22 pm, majna wrote: > - enable "code and context" only for dev host (127.0.0.1) Great idea, until you realise that most large development houses have separate dev hosts. Even for my personal projects at home I have a separate dev host. It is simple, production sites should not be ru

Re: Pagination with POST parameters

2011-06-07 Thread Walther
What you want is a PRG (Post/Redirect/Get) pattern. Basically the user POSTs the search form, your script redirects the user back to the referrer page, but with a new GET parameter set to their search parameter. Take a look at the CakeDC Search plugin (https://github.com/cakedc/ search) it include

Re: Setting up the default value for a Form->input : I want to have a line break, but how?

2011-06-07 Thread Walther
"Thanks for visiting my campaign page.\r\nBe sure to check out the links below" Would put them on different lines. Then when you display the output to the user you use nl2br() On Jun 8, 1:30 am, barricades wrote: > I have a form input whose default value I want to have as a couple of > short par

Re: Form Validation

2011-04-28 Thread Walther
Before accusing the manual of being crap, perhaps you should take some time to actually read it? How to implement validation in the model: http://book.cakephp.org/view/1143/Data-Validation How to do validation from your controller: http://book.cakephp.org/view/1182/Validating-Data-from-the-Contro

Re: Router:mapResources

2011-04-21 Thread Walther
You don't link to restful urls. REST is used by webservices to communicate to your application, not for a user to access resources... On Apr 20, 11:54 pm, James Gibson wrote: > Hi all, > > First post and I'm a noob, so please excuse my noobness. > > I would like to use restful urls for my applica

Re: return Json values cakephp 1.3.8

2011-04-21 Thread Walther
What you want is: https://github.com/josegonzalez/webservice_plugin That plugin handles everything for you. All you need to do is configure cake to parse the json extension and call your url with that extension (example.com/controller/action.json) On Apr 22, 8:17 am, pedro sastre wrote: > I have

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: Cakephp workflow - where to start

2010-04-24 Thread Walther
I first start by defining my database structure using something like MySQL workbench (Visual db design software). Once my db design is complete I export it into the db engine. I then bake a scaffold application and use that to revise my db (No need to delete your baked app between revisions if you

Re: How do I refer to the controller's model from appcontroller?

2010-04-24 Thread Walther
Why do you want to do a describe on the model on each query? Descibes are slow. If you want the models schema for whatever reason then just use the Model::schema() method http://api13.cakephp.org/class/model#method-Modelschema On Apr 25, 4:26 am, Sergei wrote: > ... > $this->{$this->modelClass}-

Re: I need full ORM example

2010-04-24 Thread Walther
In other words you want somebody to write your application for you? Just google around for the various CakePHP CMS projects. On Apr 25, 2:30 am, thatsgreat2345 wrote: > Then do a little reading, don't be so lazy it is very easy and fully > explained in the book about relationship stuff. > > On A

Re: where do i put the external library in cakephp

2010-04-20 Thread Walther
Either one. CakePHP is designed so that you only need one copy of the CakePHP files even if you have lots of CakePHP applications. vendors is for files that should be accessible to all apps, and app/vendors is for only that one application. On Apr 20, 5:08 am, Bryan Lim wrote: > do i put it at v

Re: Multi-level Models in CakePHP

2010-04-15 Thread Walther
Alan gave the wrong syntax for containable. It is: $this->ATable->find('all', array('contain'=>array('BTable' => array('CTable'; And Andy, in the future please use real model names, makes it much easier to see what is happening and sometimes people make mistakes when converting to the alphabe

Re: Blog to discuss cakePHP issues

2010-04-06 Thread Walther
Pointless imo. Rather use cakeqs.org, this mailing list or even better the IRC channel. On Apr 6, 9:04 am, mike karthauser wrote: > Not sure why you've set up something new whenhttp://cakeqs.org/ > Has been created just for this purpose. Why not contribute? > > Mike Karthauser > Brightstorm limit

Re: How do I post to IRC?

2010-04-06 Thread Walther
You nick needs to be registered. Believe it or not, but there is actually a message on the channel when you join that tells you this. "If you are having problems sending messages in this channel please register and identify, directions are here: http://freenode.net/faq.shtml#nicksetup"; On Apr

Re: Should I migrate from RC 1.1 to RC 1.2 or 1.3 ????

2010-04-06 Thread Walther
Go with 1.3. I have been using it since the beta in production systems, have not had a issue. On Apr 7, 8:12 am, Jeremy Burns wrote: > I have moved up to the latest version of 1.3 across the board. I was never on > 1.1, so don't know the curve from there to here, but the curve from 1.2 to > 1.

Re: Retrieving objects from the DB instead of arrays

2010-03-30 Thread Walther
If you are manipulating data in your controller then your 'doing it wrong'. 'GoodCake' is to have the bulk of your code in your models (Fat model, thin controller), the controller should almost only call the correct model methods (And perform things like authorisation, authentication, session mana

Re: Trouble with CakeDC Tags plug-in

2010-03-18 Thread Walther
There is no Cake with a version.txt file that says 1.3.0.0. The latest one is 1.3-rc2. Try just running 'cake' at the command prompt. It will tell you the version of CakePHP that it is running. On Mar 18, 10:54 pm, Ian R wrote: > > If App::pluginPath() doesn't exist - you don't have 1.3 > > ins

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

2010-03-14 Thread Walther
Php short tags are being phased out. Better not to use them. On Mar 14, 6:36 am, anak newbie wrote: > Hello all, > > Today i am upgrading my server to PHP 5.3 and see something trouble. > > My cakePHP get ugly and i see that open short tags doesn't work. > > like > > I have many open short tags

Re: $escapeTitle param missing in $ajax->link in current 1.3 release

2010-03-14 Thread Walther
It is clearly documented in the migration guide. It is also clearly documented that the Ajax helper has been deprecated and replaced with the new Js Helper. On Mar 14, 3:33 am, Jon wrote: > Ah, so I looked a little more closely at the core function and then > tried putting: > > 'escape' => false

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

2010-03-08 Thread Walther
> Toyota Prius.  It's just wrong! > > > To put a framework through it's paces you have to test the framework > > itself, all your testing is the frameworks ability to extract it's > > config options and read a few .htaccess rules ... how does that > > provid

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

2010-03-05 Thread Walther
@Dérico: I believe that your server is configured incorrectly. I can't seem to replicate the same results, in my case CakePHP 1.3 outperforms 1.2.6 (I am using Apache 2.2 which may be the difference). Also make sure that you have debugging off before you benchmark anything. These are the best resu

Re: Get table missing error yet table exists - after porting from dev to production

2010-03-04 Thread Walther
t on an > internal one? i cant think why it would freak out like this... > > Chris > > On Mar 4, 6:33 am, Walther wrote: > > > CakePHP caches your table information. If you change hosts then some > > of the information changes and CakePHP assumes that the table isn&#

Re: useTable problem?

2010-03-03 Thread Walther
What are your filenames? Incorrectly loaded models are 99% of the time due to incorrect filenames. On Mar 3, 1:42 pm, DragonFlyEye wrote: > Thanks Dr. Loboto. I'll try reordering the tables and see if that > works. > > I see this is a common problem: someone just posted a very similar > problem t

Re: $useTable ignoring the alternate table name

2010-03-03 Thread Walther
Don't use 'require' ever! Make use of the tools that CakePHP gives you. In this case App::import('Model', 'Order'); As for your problem, it has a very easy solution. Your filename is wrong. CakePHP uses CamelCase model/class names, and underscored file names. So when you say 'I want to use model

Re: Proxy and link helper

2010-03-03 Thread Walther
Bad bad bad idea. You will destroy your search engine rankings because the search engines will see identical sites/content at two different locations. Rather set your partners website to do a permanent redirect (301 I think?) to your actually address. On Mar 3, 1:48 pm, voocake wrote: > some add

Re: Fly Model

2010-03-03 Thread Walther
Not sure what you mean. But, CakePHP will automatically 'emulate' a model if it does not exist. On Mar 3, 12:47 pm, Jets wrote: > Hi, i want to know that how create fly model in cakephp. actually i > want to bake model through coding. so do you have any idea for this. Check out the new CakePHP Q

Re: Help w/ Pagination

2010-03-03 Thread Walther
Why do you want to use those dog ugly query parameters? They are bad for users and bad for SEO. Rather use the CakePHP named parameters (Which the build in pagination does automatically). If you need some help in getting the 'search' term to stay persistent in your pagination come ask on the irc c

Re: Get table missing error yet table exists - after porting from dev to production

2010-03-03 Thread Walther
CakePHP caches your table information. If you change hosts then some of the information changes and CakePHP assumes that the table isn't their because it is not cached (Or something like that). Of course you never see this issue if you are running with debug > 0 because CakePHP doesn't cache anythi

Re: How to save data in an different table than the controller table when no relations?

2010-03-03 Thread Walther
You don't need to create a model. If the model does not exist CakePHP will automatically create the model for you based on your AppModel. @Chrriss: Since you don't tell us what is not working I'm going to assume that it is your car that isn't work I would recommend you give your local mechanic a c

Re: Dojo toolkit integration with CakePHP now supported!!

2010-01-26 Thread Walther
This looks very promising (I don't use dojo, but still). However, the javascript helper has been deprecated in CakePHP 1.3. 1.3 offers the new Js helper along with library engines (jQuery, MooTools and Prototype engines are included by default). Instead of using your time writing helpers that wil

Re: Loop Issue Cakephp

2010-01-26 Thread Walther
Why are you using raw SQL? I take a very hard stand on this. If you are using raw SQL then you should stop using CakePHP, simple as that (There are exceptions to the rule, but they are very few). By using raw SQL you are entirely negating all the benefits using a framework like CakePHP gives you.

Re: how to call Model1->find("all") from Model2 Controller

2010-01-21 Thread Walther
use it", and > not explains why, or when it's adviseable to. > > I presume,by the post title, that that's because it's slow. How slow? > > dfcp > > On 19 jan, 04:47, Walther wrote: > > > Never use $uses unless you really really really have too.

Re: how to call Model1->find("all") from Model2 Controller

2010-01-18 Thread Walther
Never use $uses unless you really really really have too. See here: http://www.pseudocoder.com/archives/2009/04/16/one-more-tip-for-speeding-up-cakephp-apps/ Rather use $this->loadModel or ClassRegistry::init On Jan 18, 12:34 pm, djogo wrote: > Class usercontroller extends appcontroller > { >  

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! >

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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,

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: 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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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

  1   2   >