Re: How to get images in RSS feed using RSShelper
Hi majna, I think, jorgtron wants a result like this: http://www.w3schools.com/rss/rss_tag_image.asp RoVo --~--~-~--~~~---~--~~ 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: XAMPP for linux
Hi Sergi, I agree with Smelly_Eddie. My LAMP-installation on ubuntu works stable and fast over month. There are some nice HowTo's - search for "ubuntu apache" (GIYF:) Some people prefer a VirtualHost config. But you can also use sudo a2enmod rewrite and "AllowOverride All" in http.conf - and have fun with cake... Hope that helps RoVo --~--~-~--~~~---~--~~ 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: Method for access combined field in view file
Hi Chris, may be, this is one possible solution... my projects-table kooks like this: CREATE TABLE IF NOT EXISTS `projects` ( `id` int(10) unsigned NOT NULL auto_increment, `year` int(10) unsigned NOT NULL default '0', `code` int(10) unsigned NOT NULL default '0', `fullcode` varchar(8) default NULL, `created` datetime default NULL, `modified` datetime default NULL, PRIMARY KEY (`id`), KEY `fullcode` (`fullcode`) ) I bake m, v and c and then put this beforeSave-function into the project-model: function beforeSave() { foreach ($this->_schema as $name=>$field) { if ($name=='year') { //set year, if empty if (empty($this->data[$this->name]['year'])) { $this->data[$this->name]['year'] = (int)date('Y'); } } if ($name=='code') { //set new "code of the year", if empty if (empty($this->data[$this->name]['code'])) { $tmp = $this->find('first', array( 'conditions'=>array('year'=>$this->data[$this- >name]['year']), 'order'=>'code DESC' ) ); if (isset($tmp['Project']['code'])) { $new_code = $tmp['Project']['code'] +1; } else { $new_code = 1; } $this->data[$this->name]['code'] = $new_code; } } if ($name=='fullcode') { //generate fullcode $this->data[$this->name]['fullcode'] = sprintf("%s-%03u", substr((string)$this->data[$this->name]['year'], -2), $this->data [$this->name]['code']); } } return true; } (tested on 1.2.1.8004) If the year-field is empty, it uses the current year. If the code- field is empty, it gets the next free "number of the year". Then it generates your fullcode. Now the search is simple. I would add some validations, but I think, it's a good base. Hope that helps RoVo --~--~-~--~~~---~--~~ 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: Help w/ DebugKit - no toolbar
Hi BenL, please check the debug-level in your /app/config/core.php: Configure::write('debug', 1); It should be 1 or higher to see the toolbar Hope that helps RoVo --~--~-~--~~~---~--~~ 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: how to generate views for "recursive 2" associations?
Hi Dieter, an example. We have 3 models (HABTM): Posts <-> PostsTag <-> Tag If I bake only Posts and Tag (model, controller and views), I get a results like yours . NO related Tags NOW I bake the PostsTag-model with belongsTo Post and belongsTo Tag. If I bake the Post-controller and views again... UUPS!?! Related Tags are in the view.ctp :) Tested with 1.2.1.8004 Hope that helps RoVo --~--~-~--~~~---~--~~ 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: Plugin's model methods is missing
Hi jaro, > ..an application created last year using the rc2 release. I have several plugins in use - no changes needed over the versions. Please look, if you use things like this: $this->execute(...); better: $this->query(...); Hope that helps RoVo --~--~-~--~~~---~--~~ 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: CakePHP In A Subdirectory?
Hi inVINCable, I have tested my suggestion - see above. This is the htaccess of the top-level. The others are untouched. Hope that helps RoVo --~--~-~--~~~---~--~~ 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: CakePHP In A Subdirectory?
Hi, > ..I am getting a 500 Internal Server Error. Is it me? I think it should look like this?!? RewriteEngine on RewriteBase /myapp RewriteRule ^$ app/webroot/[L] RewriteRule (.*) app/webroot/$1 [L] Hope that helps RoVo --~--~-~--~~~---~--~~ 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: Performing a Query using a curdate as condition, help asap?
Hi Parris, > The results should be all 'events' that will be > today or greater (in other words, any date > in the future). Try it like this: 'conditions'=>array( 'Event.event_date >= ' => date('Y-m-d') ) Hope that helps RoVo --~--~-~--~~~---~--~~ 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: Sessions not writing whole string
Hi gkc, > I am writing the user role to the the session with > $this->Session->write('User.role',$this->$dbuser['User'] > ['role']). Are you sure, that ",$this->$dbuser['User']['role']" is a string? Try like this: $this->Session->write('User.role', (string)$this->$dbuser['User'] ['role']); Hope that helps RoVo --~--~-~--~~~---~--~~ 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: weird baking situation
Hi liaogz82 > .."Payment belongsTo Pay? (y/n)".. I think, there is a field "pay_id" in your "Payment"-table. Then Cake-Bake ask you, if you need an association... look: http://book.cakephp.org/view/81/belongsTo Hope that helps. RoVo --~--~-~--~~~---~--~~ 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: Simple auth problem
Hi Jason, if the password-hash is not the solution, additionally you can go this way. There is a good tutorial with a demo-download on: http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/ Try this and compare the steps with your application and your config. I think, so you can get the right solution. Hope that helps RoVo --~--~-~--~~~---~--~~ 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: Restrict Controllers by Group
Hi Pyrite, I found a nice tutorial from francky06l on: http://www.cakephpforum.net/ "Set authorization according to role" Hope that helps RoVo --~--~-~--~~~---~--~~ 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: How can I get the xml encoding using Xml class?
Hi Martin, you are right! Better to search for the '>', not for "\n" My imaginable solution may be like this way - put the attributes to an array... $this->__header = trim( str_replace( a( '<'.'?', '?'.'>' ), a('', ''), substr(trim($this->__rawData), 0, strpos(trim($this->__rawData), '?'.'>') ))); /** * find the attributes and attributes2array */ preg_match_all("/\ (.*)\=\"(.*)\"/iU", $this->__header, $attrib_arr, PREG_SET_ORDER); $this->__header_attributes = array(); foreach ($attrib_arr as $found) { if ( (isset($found[1])) AND (isset($found[2])) ) { $this->__header_attributes[($found[1])] = $found[2]; } } ... debug( $this->__header_attributes ); ... result of "$this->__header" after your modified "str_replace": xml version="1.0" encoding="UTF-8" result: preg_match_all Array ( [0] => Array ( [0] => version="1.0" [1] => version [2] => 1.0 ) [1] => Array ( [0] => encoding="UTF-8" [1] => encoding [2] => UTF-8 ) ) result: $this->__header_attributes Array ( [version] => 1.0 [encoding] => UTF-8 ) RoVo (c: --~--~-~--~~~---~--~~ 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: How can I get the xml encoding using Xml class?
Hi Martin, the header is stored in: var $__header = null; may be, it's only used in the header-function of xml.php?!? but alternatively you can use the option-param e.g.: $rss = new XML($url_to_an_rss_feed, array('encoding'=>'ISO-8859-1') ); If you have PHP5, as well you can use SimpleXML - like Tim: http://debuggable.com/posts/parsing-xml-using-simplexml:480f4dfe-6a58-4a17-a133-455acbdd56cb Hope that helps RoVo --~--~-~--~~~---~--~~ 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: complex problem
Hi medo, Please read this article in the bakery: http://bakery.cakephp.org/articles/view/using-cake_admin-for-multiple-user-types May be, that helps you... Like websta said, the right way is, to use of 'prefix': 'prefix'=>'admin' But use it in both routings, like this: Router::connect( '/admin/:controller/:action/*', array ('prefix'=>'admin')); Router::connect('/superadmin/:controller/:action/*', array ('prefix'=>'admin')); The 'prefix'=>'admin' tells cake to use the defined admin-routing: Configure::write('Routing.admin', 'yourprefix') I solved this long time ago. Please tell, if it works. If not, I will look for more details in my projects to help you... RoVo --~--~-~--~~~---~--~~ 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: Route a /pages url to a controller
Hi Brian, > www.url.com/pages/tech_tips > ... > $Route->connect('/pages/tech_tips', array('controller' => 'techtips', > 'action' => 'display', 'index')); look at the underline in tech_tips... may be, it must look like this??? > 'controller' => 'tech_tips' Hope that helps RoVo --~--~-~--~~~---~--~~ 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: router problem with passing variable
Hi Sergei, > And a corresponding function js($site) > But $site variable never passed to the function. Please try this... Router::connect( '/script/:site', array( 'controller' => 'projects', 'action' => 'js'), array( 'pass'=>array('site'), 'site'=>'[a-z0-9]+' ) ); and look at function js($site) { debug( $this->params ); ... Hope that helps RoVo --~--~-~--~~~---~--~~ 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: How can "TMP" be set to some other directory?
Hi Martin, > Unfortunately defining "TMP" in bootstrap.php is too late. > It is already set in paths.php before I get > a chance to "take over" so to speak. I have a solution - works fine for my needs... in the webroot index.php I use a line like this: include_once('config.php'); in that config.php I use: if (!defined('TMP')) { define('TMP', CMS_HTDOCS . DS . 'tmp'. DS . CMS_PROJECT . DS); } the result looks like this: - htdocs - project1 - project2 - project3 - tmp - project1 - project2 - project3 Hope that helps... RoVo --~--~-~--~~~---~--~~ 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: how to make this pouting
Hi medo, > my question is how to route the admincp I didn't test it, but I think that it works like this... use Configure::write('Routing.admin', 'admincp'); in the controller change the function names like this: function admincp_add() { and rename your templates like this: admincp_add.ctp Hope that helps RoVo --~--~-~--~~~---~--~~ 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: Release: Some RC2 Sweetness
Great work! Kudos to the hole team! ...and many, many thanks...!!! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: SQL Error: 1066: Not unique table/alias when deleting data
On Feb 12, 4:36 am, nate <[EMAIL PROTECTED]> wrote: > Could you post the full SQL query that generated the error? How about > the method call you made to generate the error? Maybe your model code/ > associations? As it is, we can't really help you much with that > description. > > On Feb 11, 10:00 pm, Action <[EMAIL PROTECTED]> wrote: > > > Warning (512): SQL Error: 1066: Not unique table/alias: 'PostsTag' > > > Warning (512): SQL Error: 1066: Not unique table/alias: 'Post' > > > This only happens on my shared host (mysql 4.0), not my local host > > (mysql 5.0.45). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---
Re: SQL Error: 1066: Not unique table/alias when deleting data
Hi nate, i had the same error > Warning (512): SQL Error: 1066: Not unique table/alias: it's simple to reproduce... - a model with TreeBehavior - try to delete a node-with-subnodes That works fine on MySQL5 - but not on MySQL4 hope that helps Roland (c: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~--~~~~--~~--~--~---