Re: WEBHOST limitation installation problems

2009-10-05 Thread Smelly Eddie
I suggets you change your webhost. Mod_rewrite is used by many modern php applications, and any provider worth their salt will allow for it. If you do decide to switch I highly recommend DreamHost. They have great support, shell access, and all the standard apache modules. Use the promo code ED

Re: login user only if email confirmed

2009-09-18 Thread Smelly Eddie
To confirm emails you'll want to use 'tickets' once a user registers you send them an email with a secret ticket. They can use that ticket to validate their email, and set the account to active. This article explains the basic use of tickets in terms of resetting passwords, but I use the ident

Re: How can I specify "at least one is required" between HABTM models

2009-09-16 Thread Smelly Eddie
I'm a fan of custom validation for these scenarios, and it is easier than you may think. Validating Optional Fields in CakePHP – The dreaded OR scenario; http://edwardawebb.com/programming/php-programming/cakephp/validating-optional-fields-cakephp-dreaded-scenario Regards, Eddie On Sep 15,

Re: Smarty

2009-09-11 Thread Smelly Eddie
Drop Smarty. Cake makes form generation a snap. Please read the book. (@CAKEPHP.ORG) On Sep 11, 1:56 am, Dave wrote: > Hi, > Trying to use the smartyform helper to create forms. > Anyone point me to an example? > Completely lost at the moment > > Thanks --~--~-~--~~~-

Re: PHP IDEs

2009-09-10 Thread Smelly Eddie
AHHH This is like the 1,000,000th post about an IDE. Please search existing posts before creating duplicate threads! On Sep 10, 8:22 am, Travis L wrote: > I have to put my vote in for Coda.  Simplicity. > > On Sep 10, 4:05 am, jason m wrote: > > > I have used textmate, coda, eclipse, netb

Re: Virtual Hosting for CakePHP sites

2009-09-10 Thread Smelly Eddie
$50 off DreamHost hosting! They have rock solid support with quick turn around, full shell access, reboot, sudo and much more. You can completely customize your server and if you ever blow it up, a quick 10 minute reset is available. Only pay for the resources you use. I run ~ 15 domains(about 5

Re: 500 Internal Server Error

2009-09-08 Thread Smelly Eddie
Just change the .htaccess file in your webroot folder (cake/app/ webroot.htaccess) Add RewriteBase / So you have RewriteEngine on RewriteBase / RewriteRule^$ app/webroot/[L] RewriteRule(.*) app/webroot/$1 [L] Works on GoDaddy and others. Or you can switch to DreamHost

Re: Quick Question

2009-08-29 Thread Smelly Eddie
Well I would like to say first of all that the move to OO design patterns will be a great step even if you choose not to use CakePHP. It will make the extendibility, maintenance and debugging a world easier. If you decide to add a new feature down the road having good code will save your sanity.

Re: Search function

2009-08-12 Thread Smelly Eddie
better yet avvoid storing multiplee values in one field. Create a reference table (tags) and add those values one per record. It. Will save the code maintainers sanity down the road On Aug 11, 11:32 pm, JamesF wrote: > some fancy combos 'LIKE' and 'OR' in your find conditions array should > get

Re: CakePHP (and other leading php frameworks) vs. Drupal custom modules

2009-08-10 Thread Smelly Eddie
I think robert and paris have done a good job answering this. Cake <> Drupal A change from a cms to a framework would be a big step. But IMO a good one to get away from Drupal. On Aug 10, 4:39 am, Martin Westin wrote: > A bit OT, but for general interest check outhttp://openatrium.com/ > It i

Re: Web hosting company advice

2009-08-06 Thread Smelly Eddie
I would have to seconds Vijay - Go with dreamhost' *** Use the promo code EDDIESAVES for $50 off the yearly fee *** You can also click here to see all their features and signup using the code. http://www.dreamhost.com/r.cgi?488244/hosting.html|EDDIESAVES On Aug 5, 6:44 am, Vijay Kumbhar

Re: Auth Component - Password empty - Try to make a "change password" page

2009-07-21 Thread Smelly Eddie
Reset Passwords in CakePHP http://edwardawebb.com/programming/php-programming/cakephp/reset-lost-passwords-cakephp On Jul 20, 1:24 pm, brian wrote: > I've never had problems with this but there's lots of info online: > > http://www.google.com/search?source=ig&hl=en&rlz=1G1GGLQ_ENUS271&=&q=... >

Re: Session/Cookie problem with Facebook JS + PHP

2009-07-21 Thread Smelly Eddie
Something is wrong removing localhost from your hosts file may have a negative impact on any applications that expect localhost, a de facto standard, to be the local loopback address. Besides that it should not affect cookies from another domain. Although the two may be related, I don't thi

Re: var $useDbConfig not working - caching?

2009-07-14 Thread Smelly Eddie
How to switch DB connections based on environment automatically. http://edwardawebb.com/programming/php-programming/cakephp/automatically-choose-database-connections-cakephp On Jul 14, 6:55 am, Alastair wrote: > Ahh lovely! That works perfect. Still not sure what was causing the > problem I've

Re: What debug/IDE do you use?

2009-06-20 Thread Smelly Eddie
Not again! Search the group for the other 3 iterations of this thread. Ill give you a preview; Eclipse, netbeans, jedit, npp, textmade, emacs, gedit On Jun 20, 9:37 am, Rick wrote: > Netbeans with PHP extension.  I used Eclipse/PHP for a while but after > several problems changed to Netbeans.

Re: XML rendering

2009-05-10 Thread Smelly Eddie
AAron: I am not sure what your adding to app/xml/data.ctp for. This should be handled like any other view. You need; The parse xml extensions config (which you have) A controller action (your's looks good) An XML view (app/views/CONTROLLERNAME/xml/CONTROLLERACTION.xml Here's an article I wrot

Re: Poll: what do you hate about CakePHP?

2009-05-08 Thread Smelly Eddie
I hate that it is a powerful framework that can make the tedious work of developing sites a breeze. Its strict adherence to the tried and true MVC model is a pain point as well. Why so logical? I hate the active community involvement and powerful documentation and API sites. I hate that people

Re: who can help me about ACL?

2009-05-01 Thread Smelly Eddie
xing Try providing some context around your error. You won't get much help with such generic statements. What does the code in the calling action's controller look like? Have you verified the nodes you are allowing to access each other exists in the ARO and ACO tables? Have you used ACL before

Re: Need little help with a validation rule

2009-04-30 Thread Smelly Eddie
Ernesto: I like to make custom validation methods when dealing with complex relationships between fields. http://edwardawebb.com/programming/php-programming/cakephp/validating-optional-fields-cakephp-dreaded-scenario On Apr 30, 4:31 am, Ernesto wrote: > Hi guys thx for the responses > > @Brian

Re: cant use saveAll() to edit $this->data

2009-04-21 Thread Smelly Eddie
On Apr 20, 10:02 am, fain182 wrote: > did you put a hidden field with the id in the view of edit? > something like: > echo $form->input('id', array('type'=>'hidden')); > Don't do this!!! When you depend on client side values to update records they can be changed by malicious users! I could

Re: New to CakepHp.. question

2009-04-02 Thread Smelly Eddie
What is the difference between serial and user id?? Aren't they both just numbers that increment with each addition? I don't think you have planned this out very well. You can either set the starting point of the primary id to a very high value, or grab the last serial and increment before creat

Re: turning on/off query that shows at the end of each page?

2009-04-01 Thread Smelly Eddie
RTFM!! On Mar 31, 10:56 am, mscdex wrote: > On Mar 31, 8:11 am, "Sajid.bd" wrote: > > > Hello I am learning cake.Can anyone help me how to turn on/off the > > query that shows at the end of each page? > > In your app\config\core.php, set the 'debug' configuration setting to > 0 or 1. --~--~

Re: looking for a method to record 'page views'

2009-03-31 Thread Smelly Eddie
Have you considered using an existing solution with metrics and reporting surrounding it? You can give read only access to clients as well. http://edwardawebb.com/programming/php-programming/cakephp/piwik-analyze-visits-cakephp-site On Mar 30, 1:39 pm, JamesF wrote: > i did see that article b

Re: Titles for drop-down lists

2009-03-28 Thread Smelly Eddie
An easier option might be to create the superlist method for the form helper. You can call it with much less code and it will show as many concatenated fields as you want, and even use cascading lists. It overrides the default list method in form helper. the result is like Select Name | - Last

Re: ACL for groups

2009-03-28 Thread Smelly Eddie
Yes if you read the ACL section of the manual it clearly states to use null for the top level group. It is advisable in my opinion to make one group 'entire_site' and give yourself unfettered access without having to declare things individually. THis group would have a parent id of nul. On Mar

Re: What do you develop in (ide, text editor, etc.)?

2009-03-26 Thread Smelly Eddie
I use Eclipse Ganymede with PHPEclipse. Great integration with Apache, a standard in CVS, allows in line debugging etc, etc. In terms of code completion (context awareness) I added some custom code completion for a only a few CakePHP functions (dynamic models fro controllers) . THe rest is hand

Re: ACL Design

2009-03-25 Thread Smelly Eddie
Well it sounds like you want global roles, and org specific roles. Although using only roles will keep your table smaller, I disagree with James about 'far less queries being run' though since the structure of Aro trees only requires 1 query whether based on a user or role. The benefit of perfor

Re: ACL Design

2009-03-24 Thread Smelly Eddie
ACL can give you all the flexibility you need really. This seems like a straight forward solution. If I, eddie, am an Admin for Loco's Tacos, but only a user for Mary's Margaritas, then you can give me permissions as such. allow eddie CRUD rights on Employee records for locos tacos allow eddie

Re: limit access to a site?

2009-03-24 Thread Smelly Eddie
yes, read a book On Mar 24, 8:41 am, Aurelius wrote: > Thanks! > One more problem, when it is going live, the Allow from would be a > domain like "service.mydomain.de" and not a IP address, any solutions > for that? > > thx > Aurelius > > On 24 Mrz., 01:22, Graham Weldon wrote: > > > class AppC

Re: Accessing other table/model from main controller

2009-03-23 Thread Smelly Eddie
Constantin My understanding is this; Using $uses will load every listed model when that model is loaded, even if they are not used in particular action. Using Controller::loadModel('ModelNameYouWantToLoad'); will only load that model when that particular line is read. It is useful if you have

Re: ACL - How to list all grants by ACO and action

2009-03-22 Thread Smelly Eddie
Thanks, that is the path I just started stumbling down. Since I am being restrictive to one Model though it looks more like this; $this->ArosAco->find('all', array( 'recursive'=>1, 'conditions'=>array('Aco.alias'=>'ModelName','Aro.foreign_key'=> $this->som

Re: changing $useDbConfig 'on-the-fly' ?

2009-03-17 Thread Smelly Eddie
Gwoo's response is just what you need to set the dbconfig from a controller based on params. If you just mean based on the URL (dev vs prod) then I would like to add the following resource. http://edwardawebb.com/programming/php-programming/cakephp/automatically-choose-database-connections-cakep

Re: Jake question: rewrite problem?

2009-03-14 Thread Smelly Eddie
I have to disagree with Brennen about one thing. For security reasons, it is recommended to have most of CakePHPs file (the core) *above* the webroot. Your servers (site's) document root should point to cake/app/webroot. That is where you should drop Joomla. visiting localhost/ would then show

Re: copying data to hidden fields

2009-03-14 Thread Smelly Eddie
jsunquist As a rule of them you should not need to capture or store any value more than once. Redundant data leads to problems in data integrity. (eg when something changes, how may places must it be changed?) If it is a separate model/table/form, I suggest using relationship to reference one f

Re: how to make XML of this format in Cake

2009-03-14 Thread Smelly Eddie
aman: How about generating dynamic sitemaps with CakePHP http://edwardawebb.com/programming/php-programming/cakephp/generating-dynamic-sitemaps-cakephp everything from getting the detailas to publishing as xml (in google sitemap format) good luck On Mar 13, 3:49 am, aman batra wrote: > hello,

Re: Captcha reload problem, works in ff not in IE

2009-03-05 Thread Smelly Eddie
iraj23\ That seems pretty silly. There is not much benefit of using the same captcha image on every load. The point of captcha images is to be dynamic, ensuring a warm body is on the other end of the request. If you just want to use the same image, for the same action, and the same user (like

Re: how to change image on onover event

2009-02-26 Thread Smelly Eddie
Same way you add anyother attribute to an image $html->image('cheese.png',array('onmouseover'=>'action to take','alt'=>'this is all in the manual')); On Feb 25, 1:52 pm, Aivaras wrote: > Well, old fashioned way is still working, so it can be simple as this: > > onmouseout="recoverImage();" />

Re: after migrating to another host one controller fails to load

2009-02-26 Thread Smelly Eddie
Who is your host? What is the structure of your folders/files? On Feb 25, 11:30 am, banesto wrote: > maybe there is some script to test host requirements? > > because i tried many times, even downloaded a fresh cake version and > put into it controllers and other stuff - no reaction. > > On Fe

Re: How to set up site structure with Admin folder and controllers?

2009-02-26 Thread Smelly Eddie
The bakery and manual already talk extensively to admin routing, and they really could not make it simpler. I suggest you dig into the manual, and come back with a more focused question about this. On Feb 25, 1:48 pm, brian wrote: > On Wed, Feb 25, 2009 at 10:20 AM, Adam Royle wrote: > > > Hav