Re: does cake have anything to help create a sortable grid?
Hello, > > Something like prado's TDataGrid, or qcodo's grid, or codeignitor's > > rapyd? If you are using 1.1, try this: http://cakeforge.org/projects/decorate/ This is a extended bake.php. And you can modify as you like. Shun 2007/8/19, Feris Thia <[EMAIL PROTECTED]>: > > On 8/18/07, walterbyrd <[EMAIL PROTECTED]> wrote: > > > > Something like prado's TDataGrid, or qcodo's grid, or codeignitor's > > rapyd? > > > > I'm not even all that concerned about the ajax stuff. Just data > > arranged in a table, the is sortable by column by clicking the header. > > Edit, add, delete, and filthering would be nice. > > > > Something sort of like scaffolding, but more functional. > > > > > > I think you can use a Cake 1.2 pagination which I now use extensively. > But it had to tied to a model. You can try to bake a controller & view > from a model and learn the pagination from there. > > Regards, > > Feris > > > > -- Shunro Dozono [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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: does cake have anything to help create a sortable grid?
On 8/18/07, walterbyrd <[EMAIL PROTECTED]> wrote: > > Something like prado's TDataGrid, or qcodo's grid, or codeignitor's > rapyd? > > I'm not even all that concerned about the ajax stuff. Just data > arranged in a table, the is sortable by column by clicking the header. > Edit, add, delete, and filthering would be nice. > > Something sort of like scaffolding, but more functional. > > I think you can use a Cake 1.2 pagination which I now use extensively. But it had to tied to a model. You can try to bake a controller & view from a model and learn the pagination from there. Regards, Feris --~--~-~--~~~---~--~~ 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: does cake have anything to help create a sortable grid?
If you want to stick with Prototype, I've used this in the past: http://www.tetlaw.id.au/view/blog/table-sorting-with-prototype/ It's really straightforward to use, just include the JS and add the relevant class to your table headers. Demo here: http://www.tetlaw.id.au/upload/dev/sortabletable/ Regards, Andrew On 18 Aug, 16:35, Geoff Ford <[EMAIL PROTECTED]> wrote: > Nope and it probably never will have it in the core. It may end up in > the AjaxHelper one day if proto/scriptactulous supports it. I suggest > using jQuery. There is the tablesorter plugin and also one for > filtering that I can't remember the name of. > > Geoff > --http://lemoncake.wordpress.com > > On Aug 19, 1:25 am, walterbyrd <[EMAIL PROTECTED]> wrote: > > > Something like prado's TDataGrid, or qcodo's grid, or codeignitor's > > rapyd? > > > I'm not even all that concerned about the ajax stuff. Just data > > arranged in a table, the is sortable by column by clicking the header. > > Edit, add, delete, and filthering would be nice. > > > Something sort of like scaffolding, but more functional. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
getFormattedList
I thought people could use this: It basically is a recursive function that can grab and get a formatted list of data from an array based on a key. For example array( [0] => array('item_id' => 323) 'item_id' => 232 ) You can grab both item_id's using getFormattedList($array, 'item_id'); Regardless of how deep it is, it will find it. Hope you find this useful. It helps for emulated generateList() calls. You can do findCount() then do getFormattedList(). http://pastebin.com/f52e5bf8 /* * This function will output back out a nicely formatted array for a certain key in an array. * Example: getFormattedList($array, 'name'); * */ public function getFormattedList($tags, $key) { $tagList = array(); if (! $key) return $tagList; if (is_array($tags)) { while (list($k, $v) = each($tags)) { if (is_array($tags[$k])) { if (is_array($tagList)) { $formattedList = $this->getFormattedList($tags[$k], $key); if (is_array($formattedList)) $tagList = array_merge($tagList, $formattedList); } } else { if (is_array($tagList) && isset($tags[$key])) array_push($tagList, $tags[$key]); } } if ($tagList) return array_unique($tagList); } else { return $tagList; // Blank array. } } --~--~-~--~~~---~--~~ 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: HABTM Does not select extra table :(
Do you mean i have to query the other model inside the article controller.. I tried it like this (using the category model now): function category($category_name) { $this->set('articles', $this->paginate('Category', array('name' => $category_name))); } But then it uses the fields i have set in the article_controller, which are not available in the category :( // Pagination settings var $paginate = array('limit' => 15, 'page' => 1, 'order'=>array('id' => 'desc'), 'fields' => array('id', 'title', 'published', 'frontpage', 'created', 'modified', 'slug', 'menu_id')); On Aug 16, 1:39 am, Grant Cox <[EMAIL PROTECTED]> wrote: > You cannot query across a HABTM like that - the relationships are > generated through multiple SQL queries so your WHERE does not get put > in the right part (and the WHERE is just whatever conditions you > provide - Cake does not understand what you want). > > Instead, query the Menu model, with appropriate recursive set (and > bindModel / unbindModel if needed) to get the associated Articles that > you want. > > On Aug 16, 3:17 am, Mech7 <[EMAIL PROTECTED]> wrote: > > > Nobody :( > > > On Aug 12, 4:51 pm, Mech7 <[EMAIL PROTECTED]> wrote: > > > > Anybody has an idea ? :( --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
othAuth component v0.5.4.5
Hi Friends, I'm a newbie about php and Cakephp. and I need some help. I want to do a web site using Cake and first of all I want to need an authorization system and I decided to use othAuth component v0.5.4.5. But I could not succeed to install it. Is there any step by step manual or could you please send me a sample project or any other suggessions? Thanks in advance. --~--~-~--~~~---~--~~ 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: Trouble with the translate function "__()"
Would that mean I'd have to use the .po language files in an unusual way... putting ALL of my language data into one file? That'd be a drag! On Aug 18, 2:08 am, "jitka (poLK)" <[EMAIL PROTECTED]> wrote: > It is not cake issue, it is Zend problem with debug_backtrace() used > so deep. > > Try > echo $form->input('username',array('label' => > __d('users', 'Username',true))); > > 'users' means that this translation should be searched in users.mo/po, > so if you have one file with all translations named default.po/mo, > replace 'users' with 'default' and you should be fine. --~--~-~--~~~---~--~~ 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: How to make a good use of Elements and DRY principe ?
Ok thanks to both of you i'll try to setup something and post the results here. --~--~-~--~~~---~--~~ 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: does cake have anything to help create a sortable grid?
Nope and it probably never will have it in the core. It may end up in the AjaxHelper one day if proto/scriptactulous supports it. I suggest using jQuery. There is the tablesorter plugin and also one for filtering that I can't remember the name of. Geoff -- http://lemoncake.wordpress.com On Aug 19, 1:25 am, walterbyrd <[EMAIL PROTECTED]> wrote: > Something like prado's TDataGrid, or qcodo's grid, or codeignitor's > rapyd? > > I'm not even all that concerned about the ajax stuff. Just data > arranged in a table, the is sortable by column by clicking the header. > Edit, add, delete, and filthering would be nice. > > Something sort of like scaffolding, but more functional. --~--~-~--~~~---~--~~ 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: A problem with paths
This page works - http://www.escaparatetactil.es/demoav/index.php/regions/ So it seems that it is still trying to use mod_rewrite - make sure you did not upload the .htaccess files. Then double check your path settings in index.php - the css files etc. are not making it through the routing process. Geoff -- http://lemoncake.wordpress.com On Aug 18, 6:09 pm, ifcanduela <[EMAIL PROTECTED]> wrote: > C'mon guys, anyone knows what could be happening here? > > -Igor --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Deployment
Hey guys, right now I've got the following setup on my development machine: I've got xampp installed. I've put the latest nightly of 1.2 into my htdocs directory and set my path so I can use the command line. Using the command line, I created an application that now lives in my htdocs directory, so I've got the following layout: htdocs cake1.2.x.x my_app I've got a shared hosting account that supports PHP, MySQL etc. How would I go about deploying my_app to that account? Thanks in advance, chell --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
does cake have anything to help create a sortable grid?
Something like prado's TDataGrid, or qcodo's grid, or codeignitor's rapyd? I'm not even all that concerned about the ajax stuff. Just data arranged in a table, the is sortable by column by clicking the header. Edit, add, delete, and filthering would be nice. Something sort of like scaffolding, but more functional. --~--~-~--~~~---~--~~ 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: How can I updated table using checkboxes and button
I'd really recommend listening to the first response you got, from Ketan Patel. Once you've submitted, in your Controller, have a look at what form the data you've been sent is in, and then prepare it as you require to send to the model to be saved. You will find people here are very happy to help, but helping someone does not mean doing it for them. You have to be seen to be making the effort yourself and following the good advice people generously offer. If you try it and have difficulties you can't overcome, come back and explain that you what you did and what happened, and 9 times out of 10 the originial person who helped you with the first step will help you with the second... soon you'll be walking on your own! But don't just sit there and expect people to carry you... you'll be sitting there a long time. -- On Aug 17, 10:45 am, nirmal <[EMAIL PROTECTED]> wrote: > please tell me how can i send checkbox values from template to > controller. > template: (its related to site model) > hidden('Site/id', array('value' => $site['Site'] > ['id']));?> > (from this line i am geeting site id) > > hidden('Campaign/id', array('value' =>$campaign[] > []));?> > (from this line i want to get campaign id, but i am not able to get it > because it is related to campaign model) > > submit('Deny All') ?> > > thank you, > > -- > Nirmal > > On Aug 16, 9:27 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > > > On 8/16/07, bbuchs <[EMAIL PROTECTED]> wrote: > > > > Jerk. > > > Well, there are three potential "jerks" > > > 1) the original poster for expecting people to simply provide them with code > > 2) the responder who told them to go read the manual > > 3) the person who called the responder in #2 a "jerk" > > > Personally, I would've responded: > > > "Sounds like you need to use some Ajax functionality toupdateall > > checkboxes." > > > However, when the request sounds like "please write some code for me > > because I need it for work / school and don't want to do it myself" I > > understand why people get annoyed. > > > -- > > Chris Hartjes > > Senior Developer > > Cake Development Corporation > > > My motto for 2007: "Just build it, damnit!" > > > @TheBallpark -http://www.littlehart.net/attheballpark > > @TheKeyboard -http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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: php technologies
i suggest you do some reading in these sites to get up to speed on 'php technologies': www.php.net manual.cakephp.org http://en.wikipedia.org/wiki/PHP http://en.wikipedia.org/wiki/Web_application_framework hth --~--~-~--~~~---~--~~ 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: Lots of disk activity, caching gone mad?
Just monitor your tmp/cache directory and see which timestamps/files are changing frequently - unless you have tonnes of cache files this should be pretty straightforward (I would think). Adam On Aug 18, 1:45 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Sorry Luke I did read your message. My posts seem to take a while to > appear so there is a bit of a time delay. > > > define("DISABLE_CACHE", true); > > I tried this. As soon as I added it to core.php my disk writing > rocketed up to 140MBps and the top half a dozen httpd processes were > using around 30% processor and 300MB of RAM each. I quickly switched > the cache back on. > > My latest thinking is that I have a page or section that is coded so > that it is cached but shouldn't be and every visitor that comes to the > site is writing their version of the page over the cached one. > > 'All' I need to do is find it :-( > > Paul --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
changing view to display name field instead of id
how should i change a model's view in order to display a link to another model's record name instead of the record id? given that the view's current model only stores the id of the other model and not the name, and the two models are not directly associated thanks --~--~-~--~~~---~--~~ 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: How to make a good use of Elements and DRY principe ?
Hi Gremlin, What you said is all correct, etc, however there is still the issue of creating a view and element for every ajax method, which is kinda what Christophe was getting at by wanting to call $this->renderElement() from the controller. This is also something that kinda annoyed me, however you could solve this problem by adding a clever beforeFilter method to your controller, which would set the view to an "element view", and set layout to ajax, etc, automatically taking the action name and passing it to the view which would load an element by that name. Something to think about - I might try this in the future. Adam On Aug 18, 6:48 am, gremlin <[EMAIL PROTECTED]> wrote: > Somehow lost some of the post. > > Also in views that dont have a $users variable set you can use the > element $this->renderElement( 'users_list' ); > Using ajax to return html snippets would work as well. - jquery style > - $( '#element' ).load( Url/users/index ); would load the cached > element into the #element. > > Remember you need to play with the RequestHandler component and either > extension parsing or request handling code to serve the ajax view in a > blank layout. > > Again have fun with this stuff. Let us know what you come up with. > > On Aug 17, 1:41 pm, gremlin <[EMAIL PROTECTED]> wrote: > > > What you need to do is write an index action for your users_controller > > like you would if you were NOT using ajax or reusing that action at > > all. > > Once you have that done, modify that function to check isset( > > $this->params['requested'] ) to see if the view action if being called via > > > the requestAction function. > > > *** > > > function index( ) > > $users = $this->User->findAll( ); > > if( isset( $this->params['requested'] ) ){ > > return $users; > > } > > $this->set( 'users', $users ); > > > } > > > Then you create an element - users_list.ctp > > > if( !isset( $_data ) ) { > >$_data = $this->requestAction( array( 'controller' => 'users', > > 'action' => 'index' ) );} > > > > > foreach( $_data as $row _) { > > echo use data} > > > > > > You can then use the element in your users_controller index view file. > > $this->renderElement( 'users_list', array( '_data' => $users ); > > > For a good write up check out the bakery > > articles..http://bakery.cakephp.org/articles/view/creating-reusable-elements-wi.. > > > This will show you how to create these reusable elements as well as > > how to cache them based on the freshness of the model data, timestamps > > and on a per user / instance basis > > > Enjoy. > > > and in other view without the $users data $this->renderElement( > > 'users_list' ); > > > On Aug 16, 2:42 pm, "Christophe C." <[EMAIL PROTECTED]> wrote: > > > > up :( > > > Any suggestions ? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
php technologies
i am just new in a php technologies tell me what is new in this technologies and what exactly done in this technologies --~--~-~--~~~---~--~~ 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: setting the base url for url language support
Thnx all. I will check the testcase. --~--~-~--~~~---~--~~ 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: A problem with paths
C'mon guys, anyone knows what could be happening here? -Igor --~--~-~--~~~---~--~~ 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: setting the base url for url language support
Chowsapal is right. Just little advice for you: read test case for router, it is an excellent source for learning. --~--~-~--~~~---~--~~ 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: Trouble with the translate function "__()"
It is not cake issue, it is Zend problem with debug_backtrace() used so deep. Try echo $form->input('username',array('label' => __d('users', 'Username',true))); 'users' means that this translation should be searched in users.mo/po, so if you have one file with all translations named default.po/mo, replace 'users' with 'default' and you should be fine. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---