Re: 301 Redirect with Server Webroot Setup
Any help please? I'm trying to give my CMS users the ability to declare a custom URL 301 redirects to a new page in their new websites. Basically, I want to have a Table in my MySQL table that contains OldURL and NewURL ... I would like to be able to compare a URL inside of CakePHP before it actually tries to process it. In other words if somebody types in http://www.mydomain.com/test/gravy.html ... that it can look at the URL and compare it to the OldURL fields in my new table... If I find a match, then send it to a controller that takes that URL and creates a 301 redirect header to the NewURL field of the table. I thought about maybe beforeFilter but that's too far in at that point after it errors out... are there any "beforeSomething" that I'm not aware of? Any thoughts? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: 301 Redirect with Server Webroot Setup
Well, I found one solution to put something like this: RewriteEngine On RewriteRule ^test/test.htm$ /pages/oilgas [R=301,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] HOWEVER... still one more question if anybody can help. As in my first example, is there a way to interpret the passed in variable from the original setup? In other words, put something in code to take the url=blahblah and create a custom redirect based on that blahblah for custom redirects in a CMS style setup, so the CMS users can customize what their redirects are on the fly? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
301 Redirect with Server Webroot Setup
I have a quick question... My server is setup with the Core and App directories setup NOT in the root httpdocs directory of the domain. The only thing in my httpdocs directory is my webroot. So the .htaccess of my root domain is: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] I'm having trouble trying to put 301 Redirects in at this level. I tried putting Redirect 301 /old.html http://www.mysite.com/products/oilgas But I get the following: http://www.mysite.com/products/oilgas?url=old.html And it blows up with old.html not working. If I need to redirect specific pages... how does this work in Cake? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Creating an uploader component
Are you keeping track of files uploaded in a DB? How bout using a Upload Progress Bar for the front end? Or is this just the backend only part? Jason --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Unlimited Slugs for an Action
Ok, I kept digging, and found my own answer again across a couple different posts so in case it can help anybody else in the future: I added this to the very end of my routes.php: Router::connect('/*', array('controller' => 'slug_pages', 'action' => 'view')); to catch all wild card created sections to go to the view action of my SlugPagesController Then in my view action my first line of code is: $getParms = func_get_args(); so as in my example of http://www.mysite.com/about/sub1/sub2/sub3/page1 I would get an array like this: Array ( [0] => about [1] => sub1 [2] => sub2 [3] => sub3 [4] => page1 ) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Unlimited Slugs for an Action
Looking for a way to have a unlimited number of slugs for sub- sections. For Example: http://www.mysite.com/about/page1 http://www.mysite.com/about/sub1/page1 http://www.mysite.com/about/sub1/sub2/page1 http://www.mysite.com/about/sub1/sub2/sub3/page1 Would this be in the Routing or Bootstrap? Thanks for help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: $viewPaths in BootStrap not seeming to work
ARRGH... Can we delete this ? :) one hour of FAIL could have been solved if I had read the full article on this at http://book.cakephp.org/view/36/Additional-Class-Paths But I missed the last sentance... "Make sure that each path specified includes a trailing slash. " so I changed my bootstrap code to include a '/' at the end of each path and worked: $xch_core_path = '/Users/hardy/Sites/xch_core/app/'; $modelPaths = array($xch_core_path.'models/'); $viewPaths = array($xch_core_path.'views/'); $controllerPaths = array($xch_core_path.'controllers/'); Interesting tho that the controllers and models worked... which was throwing me off... I guess since the views have subdirectories, it wasn't recursing down into the subdirs... but it must have seen the base folder of controllers and models. DOH!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: $viewPaths in BootStrap not seeming to work
whoops...copy and paste ... The controller "not found error" was: app/controllers/xpage_types_controller.php --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: $viewPaths in BootStrap not seeming to work
More details When the view can't be found the error shows it's looking in the fully qualified path for the app like: /Users/hardy/Sites/xch_master/app/views/xpage_types/xchange_index.ctp But when a Controller or Model can't be found it just looks starting in the app folder like: app/views/xpage_types/xchange_index.ctp Is there something that might be forcing it fully qualify to the path of my current app? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: $viewPaths in BootStrap not seeming to work
Further testing ... My $modelPaths also works... I moved the model out to the "core" app directories and my app was able to use the model in the core. So still wondering about $viewPaths --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
$viewPaths in BootStrap not seeming to work
I have placed the following code in my Cake 1.2 RC2 bootstrap file: $xch_core_path = '/Users/hardy/Sites/xch_core/app/'; $modelPaths = array($xch_core_path.'models'); $viewPaths = array($xch_core_path.'views'); $controllerPaths = array($xch_core_path.'controllers'); Controllers are working fine... I have moved a controller over the xch_core app/controllers folder and my second app can use it... However when I move my app/views/xpage_types folder over to the app/ views/ I get the following: Error: The view for XpageTypesController::xchange_index() was not found. Error: Confirm you have created the file: /Users/hardy/Sites/ xch_master/app/views/xpage_types/xchange_index.ctp Seems like it can find the $controllerPaths but not the $viewPaths ?? Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
3rd Party Membership / User / Member Management
Has anybody used any sort of 3rd party User/Membership Management tools? I am not talking about just a basic ACL... I have that and use it pretty effectively. I'm looking for the ability to have payment accounts with recurring billing and membership services for a website. I have found a couple out there like: http://www.opencrypt.com/ http://www.phppaysite.com/ I assume it will run along side of my Cake application and I can write against the API. Any suggestions? Thanks so much! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: New Cake site
Is the SecurityComponent used with the $form->token() and specifying the field names? Do you have to do anything in the controller when using this in a view? On Jan 24, 4:49 am, "jitka (poLK)" wrote: > With SecurityComponent, forms contains hidden fields with security > tokens. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Which editor for Mac OS X?
I just found something this morning... and plan on playing with it this weekend... but MacRabbit, who made CSSEdit, is working on a HTML editor called Espresso that has 'Sugars' or plugins and there is a PHP sugar. Might be worth trying out. It's in a Beta mode right now, but you can download and play around with it. http://www.macrabbit.com/espresso/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
TinyMCE - I keep getting SCRIPT tags added and converting wrong characters
Hello, I've been using TinyMCE for a while now in a custom Content Management System written in CakePHP. I'm having a weird instance lately where I'm getting some converting of HTML tags to script... For Example: Some span and img tags are putting the following code: into strange places like inside of an alt tag, or completely replaces the tag. Then TinyMCE is converting it's own greater than and less than symbols to the & version like < and becomes any ideas? Just for information... I did notice this recently after downloading and installing the lastest version of Spellchecker, and also buying and install the latest version of FileManager. I do have TinyMCE 3.2.1.1 installed as well. Thanks for any help! Jason --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Ajax Form Multiple Calls
I am using 1.2RC2 and the FIRST TIME IT WORKS...when I save the data to the table using Ajax... 2nd time it fails unless I refresh the page. So I get one update before I get the following error replaced into my div: Not Found Error: The requested address '/golearns/saveprof' was not found on this server. I have a simple form with one textarea: create('Golearn')?> input('body',array('label'=>false,'div'=>false,'error'=>false,'type'=>'textarea','id'=>'notes_text'))? > submit("Save Profile",array('url'=>'/golearns/ saveprof','update'=>'golearn_textarea','class'=>'golearn_save_btn'))?> end()?> My controller has: function saveprof() { if (!empty($this->data)) { $this->Profile->create(); $this->data['Profile']['user_id'] = $this->Auth->user('id'); $this->data['Profile']['type'] = 'notes'; $this->data['Profile']['notes'] = $this->data['Golearn']['body']; if ($this->Profile->save($this->data)) { $this->render('add_success','ajax'); //exit(); } } } the add_success.ctp is setup to replace the Textarea with a new Textarea swapping out the text: input('body',array('label'=>false,'div'=>false,'error'=>false,'type'=>'textarea','id'=>'notes_text','value'=>'Notes saved to profile.'))?> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
$javascript not available in Admin Routing
I am getting a weird issue with my $javascript in my default.ctp: I have this in the header of the default.ctp: link('swfobject')); } ?> I have Javascript in my helper of the HomePages controller. In fact when I go to: http://localhost/xchange/admin/home_pages/index My javascript works just fine... however, when I go to any other admin page like: http://localhost/xchange/admin/home_pages/add or http://localhost/xchange/admin/home_pages/view/2 The $javascript does not exist. Any suggestions? And thanks for your help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Not getting a 404 error
I am using 1.2 RC2 and creating the first section of the site. I have 1 model, controller, and view. I am using Admin Routing, and I changed the routes.php file default to the following: Router::connect('/', array('controller' => 'home_pages', 'action' => 'index')); My question is when I go to any page outside of an actual page (ie. localhost/anythingelse ) It just gives me a blank page and actually tries to display the javascript not found error from the default.ctp file. Which I assume has something to do since it can't find a controller with the Javascript helper. However, I would think it should be going to a 404 not found error, or something like that instead of what it is doing. Any ideas on how to make the site go to a 404 error when a controller or action inside of a controller is not found? Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Putting new Helper into Core for Sharing
I'm new to cake and still learning the boundaries. However, I am writing a CMS type system that will have the same components across several CakePHP websites at different domains on our server. I have the core cake lib on the server so all sites share the same core. And I'm using RC2. The end goal of this system is to stay in house and not go out, so I'm not worried about porting it per say... but I just want to be able to update the helper code and it work across all sites. Are there issues or just standards in regards to me adding a cms.php helper in the core app/views/helpers directory that is shared by several apps? Thanks again for all your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Apress Beginning CakePHP Model Function Error
I am going through the Apress book, and I ran across an issue that I had to use the Cake API to resolve. (For Reference in book.. this is on page 106) The function it gave me to put into the Post model for the blog application is as follows: function findByYear($year=null) { $date = $year.'-01-01 00:00:00'; $end_date = $year.'-12-31 23:59:59'; return $this- >find('all',array('conditions'=>array('DATE(Post.date)'=>'>'. $date,'DATE(Post.date)'=>'<'.$end_date))); } Basically I was getting nothing returned... So I turned to the API and found the findAll and find model functions and I changed my code for the return to: return $this->findAll("Post.date > '".$date."' AND Post.date < '". $end_date."'"); Now it works... Did I just stumble on some bad code in the book? Or should the syntax given in the book supposed to have worked? Thanks, Jason Hardy www.loudcreative.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---