Re: Can't use internationalization on input label
echo $form->input('names', array( 'label' => __('Names', true))); On 16 Nov 2008, at 13:15, Mateo San Román wrote: > > Hello > > When I try to use the __() function on > > echo $form->input('names', array( 'label' => __('Names'))); > > on a view, the output shows both default table field name AND its > internationalization. > > > 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 -~--~~~~--~~--~--~---
Re: Another HABTM issue : row with same Id getting over-written
Did you fin any solution to this issue? I have the same problem. thank you! On 8 oct, 19:00, Brenton B <[EMAIL PROTECTED]> wrote: > Yes. That was one of the first things I tried because I had extra > field info on the join table. > As the dbo_source.php code shows, it's just not allowing other ids > based on the foreign/join keys. > > That's the part I'm confused about ... why not?? If the row is > duplicated it shows it, and thus also reveals an issue somewhere else > that the association was duplicated, so if anything it helps reveal > other issues (ironing out bugs). > > On Oct 8, 2:51 pm, abba bryant <[EMAIL PROTECTED]> wrote: > > > Have you tried creating an id field in the join table and setting that field > > and only that field to be the primary key? > > > Brenton B wrote: > > > > Ok, so I can kind of understand the use of `$foreignKey` as something > > > to compare on, but that still doesn't explain why we're limiting to > > > unique Ids. > > > > Quite frustrating without an explanation. > > > > On Oct 7, 2:28 am, Brenton B <[EMAIL PROTECTED]> wrote: > > >> Ok, so the "root" where all this non-unique stuff occurs seems to be > > >> in dbo_source.php, line 841: > > > >> if ($type == > > >> 'hasAndBelongsToMany') { > > >> $uniqueIds = $merge = > > >> array(); > > > >> foreach($fetch as $j => > > >> $data) { > > >> if ( > > > >> (isset($data[$with]) && $data[$with][$foreignKey] === > > >> $row[$model->alias][$model->primaryKey]) && > > > >> (!in_array($data[$with][$joinKeys[1]], $uniqueIds)) > > >> ) { > > > >> $uniqueIds[] = $data[$with][$joinKeys[1]]; > > > >> if > > >> ($habtmFieldsCount <= 2) { > > > >> unset($data[$with]); > > >> } > > >> $merge[] > > >> = $data; > > >> } > > >> } > > >> if (empty($merge) && > > >> !isset($row[$association])) { > > > >> $row[$association] = $merge; > > >> } else { > > > >> $this->__mergeAssociation($resultSet[$i], $merge, $association, > > >> $type); > > >> } > > >> } > > > >> Fair enough ... but why?? So this kills any possibility of showing > > >> duplicates, that might be good, but shouldn't it bring back > > >> everything, thus revealing any possibility of screwiness in app code? > > > >> Since it's a HABTM relationship, shouldn't the whole "has and belongs > > >> to many" retrieve all that it has and belongs to? > > > >> There's obviously something I'm missing and confused about ... > > >> unfortunately no comments in code to shed light. > > > >> (Note: to recap, I've got a user HABTM webpage_types in users- > > >> webpage_types with extra fields where a user could multiple of the > > >> same webpage_type) > > > >> On Oct 6, 1:41 pm, Brenton B <[EMAIL PROTECTED]> wrote: > > > >> > So, moving to the solution nachopitt suggested "works" ... however, > > >> > because of this, for saving, I have to use `saveAll()` instead of > > >> > `save()` ... which "works"; however, for the User model, there's also > > >> > another HABTM which doesn't work for `saveAll()` ... doh!! > > > >> > Best solution? > > > >> > On Oct 6, 11:03 am, Brenton B <[EMAIL PROTECTED]> wrote: > > > >> > > Well, the table looks more like this: > > > >> > > user_id | web_page_type_id | url > > > >> --- > > >> > > 7 | 6 | firstdomain.com > > >> > > 7 | 6 | second.com > > > >> > > So the two are unique, but I see what you're saying. > > > >> > > I did originally have it setup in such a way that it wasn't a typical > > >> > > join table (as nachopitt suggested); however, was running into > > >> > > problems with saving in one fell swoop and wanted to give the "HABTM > > >> > > save setup" a try (as described everywhere). > > > >> > > Might have to go back to the previous method. > > > >> > > On Oct 4, 7:33 am, nachopitt <[EMAIL PROTECTED]> wrote: > > > >> > > > Yeah, teknoid has a point. Your relation/association is not > > >> supposed > > >> > > > to work in that way. Normally, in a non CakePHP enviroment, a > > >> > > > joinTable has the 2 foreign keys and they set as the "primary key" > > >> > > > column. You don´t have the "id" column that CakePHP expects to have > > >> > > > and then the foreign keys... thats why the "uniqueness" of the > >
Re: Confusion with $uniqueIds in dbo_source.php
I'm with you Brenton! Can you share the modification you made to dbo_source.php? Did you consider open a ticket with this issue? Thank you On 4 nov, 06:43, Brenton B <[EMAIL PROTECTED]> wrote: > Still no love, hey? > I'm not sure how else to explain this other than to ask why > dbo_source.php is over-writing. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Dynamic Logic
Has anyone ever put logic into a db table? I want to allow a user to make a variety of selections for how to handle something and store them in the DB, however I want the controller to use this logic when the user is logged in. Anyone ever do this? How would you recommend accomplishing this? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Performance
Today I made a page that uses 20 querys to show all informations... I want to know if it can't be really bad to my mysql server... I mean, this page will receive around 40.000 visits a day, that's a lot... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Easily Validate Cake Models
Hello, I've been working on something for the last week or so that I think will make everyone's Cake development easier. To me, the most frustrating part of starting a new Cake application is going through each model and writing out the $validate array. Therefore, I created php script that helps you actually write the $validate array so that it's minimal work on your part. It's fairly self-explanatory how it works. Just type out your field names and select the validation rules you want. When you click submit, PHP will output a text page that contains the $validate array. You can then simply copy this array to your Cake model and move on with life I spent absolutely zero time on look and feel, so don't be disappointed that I haven't used pretty colors and rounded corners. It does its job, and (if I do say so myself) it does it quite well. The script is here: http://javavideotutes.com/oldsite/temp/cakemvalidate/ Please note that I have only tested this with Google Chrome. Please post replies if you find any bugs (I'm sure there are a few). The source PHP (approx 650 lines) can be viewed here: http://javavideotutes.com/oldsite/te.../index.php.txt Let me know what you think! Cheers, Trevor --~--~-~--~~~---~--~~ 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: RC3 file cache trouble
I ran into the same problem last night. A temporary solution that worked for me was to hand-code the form, rather than using the form helper. - Tyler On Nov 6, 12:32 pm, "Brett Wilton" <[EMAIL PROTECTED]> wrote: > Have been trying to figure out this for a while now, anyone used > thefileengine caching under 1.2 with around a form ? > > In the controller I'm using var $cacheAction = array('index' => '1 > day', 'view' => '1 day'); the view page has a few elements which are > cached as well but I only get the errors in the nocache section. If I > remove this form and nocache section it all works correctly. > > Any idea would be much appreciated. > > Brett. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Can't use internationalization on input label
Hello When I try to use the __() function on echo $form->input('names', array( 'label' => __('Names'))); on a view, the output shows both default table field name AND its internationalization. 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 -~--~~~~--~~--~--~---
Re: Variating right menu based on content
Um, this might be kinda hacky, but I'm using the following currently and it functions fine for me. In my default layout: echo @$this->element('sidebars/' . $this->params['controller'] . '/' . $this->params['action']); So I have, for example, \elements\sidebars\requests and \elements \sidebars\announcements etc. with search.ctp and view.ctp. So if I am at site/requests/search the \elements\sidebars\requests\search.ctp sidebar is rendered. If at site/requests/index, then the render fails silently and no one knows but me. Probably could be more elegant and correct with an if (file exists), I should probably do that someday. HTH, Milton On Nov 14, 8:24 am, i_Am_ToO_SeXy <[EMAIL PROTECTED]> wrote: > Uhm... if i check for empty chunks before the layout render (for > example in App_Controller)? > > the only code in layout will be something like > > > > it will be easier to change layout in future. > > am i right? > > On 14 Nov, 09:51, grigri <[EMAIL PROTECTED]> wrote: > > > If it's the same header on every view, just call it in the layout. > > > If, on the other hand, it's the same header in MOST views, use the > > chunks helper as above: > > > some_view.ctp: > > > begin('header'); ?> > > This will end up in the header > > end(); ?> > > > your_layout.ctp: > > > > if (!empty($header_for_layout)) { > > // A header has been defined in the view, so show it > > echo $header_for_layout;} > > > else { > > // No header has been defined; use the default one > > echo $this->element('default_header');} > > > ?> > > > elements/default_header.ctp: > > > This is the default header > > > Easy, huh? > > > hth > > grigri > > > On Nov 13, 5:14 pm, i_Am_ToO_SeXy <[EMAIL PROTECTED]> wrote: > > > > Uhm... another little problem... > > > > What about a default Header? (Same header on every view) > > > > How can i do? using AppController? > > > > On 13 Nov, 12:30, grigri <[EMAIL PROTECTED]> wrote: > > > > > Indeed, the beforeLayout() callback doesn't seem to work. > > > > > If works if you put it in afterRender() > > > > though:http://bin.cakephp.org/view/815089959 > > > > (tested this time) > > > > > (same usage) > > > > > hth > > > > grigri > > > > > On Nov 13, 10:13 am, i_Am_ToO_SeXy <[EMAIL PROTECTED]> wrote: > > > > > > Hi grigri > > > > > Thanks for the reply. > > > > > > I followed your suggestions but i can't get the code work. > > > > > > No errors but also no outputs :\ > > > > > > BTW i modified a little bit the layout code > > > > > > > > > > > > > > > > > > > > (isset($header_for_layout)) { echo > > > > > $header_for_layout; } ?> > > > > > > > > > (isset($leftbar_for_layout)) { echo > > > > > $leftbar_for_layout; } ?> > > > > > > > > > (isset($rightbar_for_layout)) { echo > > > > > $rightbar_for_layout; } ?> > > > > > > > > > (isset($content_for_layout)) { echo > > > > > $content_for_layout; } ?> > > > > > > > > > (isset($footer_for_layout)) { echo > > > > > $footer_for_layout; } ?> > > > > > > > > > > > > > > > > Sorry for my n00bness :( > > > > > > On 12 Nov, 17:55, grigri <[EMAIL PROTECTED]> wrote: > > > > > > > Off the top of my head, I'd suggest using a helper combined with > > > > > > output buffering, like this: > > > > > > > class ChunksHelper extends AppHelper { > > > > > > var $chunkId = null; > > > > > > var $append = false; > > > > > > var $buffer = array(); > > > > > > > function begin($chunkId, $append = false) { > > > > > > if (empty($this->chunkId)) { > > > > > > $this->chunkId = $chunkId; > > > > > > $this->append = $append; > > > > > > ob_start(); > > > > > > } > > > > > > } > > > > > > > function end() { > > > > > > if (!empty($this->chunkId)) { > > > > > > $contents = ob_get_clean(); > > > > > > if ($this->append) { > > > > > > if (isset($this->buffer[$this->chunkId])) { > > > > > > $this->buffer[$this->chunkId] .= $contents; > > > > > > } > > > > > > else { > > > > > > $this->buffer[$this->chunkId] = $contents; > > > > > > } > > > > > > } > > > > > > else { > > > > > > $this->buffer[$this->chunkId] = $contents; > > > > > > } > > > > > > $this->chunkId = false; > > > > > > } > > > > > > } > > > > > > > function beforeLayout() { > > > > > > $View =& ClassRegistry::getObject('View'); > > > > > > foreach($this->buffer as $key => $value) { > > > > > > $View->set($key . '_for_layout', $value); > > > > > > } > > > > > > } > > > > > > > } > > > > > > > Then in your view: > > > > > > > begin('rightbar'); ?> > > > > > > This will end up in the right bar > > > > > > end(); ?> > > > > > > > (The code might need a bit of modifying; I just wrote it quickly, > > > > > > but > > > > > > the idea is sound. You'll definitely want to add error-checki
Re: Tree behavior problem
Hello, I come a little bit forward: If I activate admin routing in core.php, I got this double entries as described. If I deactivate it, everything works fine. It seams like an error in cake. Any idea? Regards Thomas On 12 Nov., 13:52, havanna <[EMAIL PROTECTED]> wrote: > Hello together, > I have a problem withtreebehavior. To build a menu I tried thetreebehavior. > For a first test I use the example from cakephp > documentation. > > But if I do the example, I got allway more than one entry into the > database. My code for the test: > > function insert() { > // pseudo controller code > $data = array(); > $data['Menue']['name'] = 'Home'; > $this->Menue->save($data); > } > > The result in the table menu: > > id parent_id lft rght name > 1 NULL 1 2 Home > 2 NULL NULL NULL Home > > If add a child to id 1 > > function insert() { > // pseudo controller code > $data['Menue']['parent_id'] = 1; > $data['Menue']['name'] = 'test'; > $this->Menue->save($data); > > } > > The result in the table will be this: > > 1 NULL 1 6 Home > 2 NULL NULL NULL Home > 3 1 2 3 test > 4 1 NULL NULL test > 5 1 4 5 test > > My model is very small: > > class Menue extends AppModel { > > var $name = 'Menue'; > var $actsAs = array('Tree'); > > } > > I'm using cakePHP 1.2.0.7692 RC3 > > Have anybody a idea? > > Regards Thomas --~--~-~--~~~---~--~~ 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: problem using find method in cakephp with conditions contains 'LIKE'
Thank you ! --~--~-~--~~~---~--~~ 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: view variables
Either use forms that are POST, or use GET, which Post you don't see and would be access by $this->data in your controller, or Get variables are passed in the url such www.example.com/tests/index/var1/var2 On Nov 14, 10:41 pm, nikunj <[EMAIL PROTECTED]> wrote: > hi, > I want to use view variables in controller can i use? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Saving a model inserts 2 records - help!
Hi all, I've done several projects with Cake now so I'm not a newbie as such but I've come across a weird problem where my model save function is inserting two records whenever I call a model's save function. The code isn't executing in a loop and calling the model create() function beforehand makes no difference. With debugging turned on I can see that only 1 insert query is being executed and it is showing 1 affected row. But 2 are appearing! I have removed all model assocications from the model in question but no difference. Has anyone come across this before? I am using 1.2.0.7692 RC3 Thanks, Alex --~--~-~--~~~---~--~~ 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: possible bug in router.php
In your post, it just says that it redirects to a login form. Did you setup your auth redirect variable manually or are you using the default users/login? Sorry, just trying to help. On Nov 15, 3:04 am, Petr 'PePa' Pavel <[EMAIL PROTECTED]> wrote: > I'm not sure what you're asking about. I already gave you the value of > $authRedirect... > > Petr > > Dne 15.11.2008 0:13, validkeys napsal(a): > > > what is the value of your authRedirect? > > > On Nov 14, 12:35 pm, "Petr 'PePa' Pavel" <[EMAIL PROTECTED]> wrote: > >> Hello everyone, > >> I'd like to share with you what I have discovered. > > >> Here's a procedure that triggers a notice level error: > >> 1) When accessing url > >> http://teachtheworldguitar.pp/orderItems/delete/30 > >> OrderItemsController->isAuthorized() returns false so I'm logged off > >> and redirected to a login form. That was planned, so far so good. > > >> 2) The url I came from is saved and used after successful login for > >> redirection. This is in my MembersController->login(): > >> $authRedirect = $this->Auth->redirect(); > >> if (!is_array($authRedirect)) { > >> $authRedirect = Router::parse($authRedirect); > >> } > >> ... some code here ... > >> $this->redirect($authRedirect); > > >> 3) Now I'm getting to the point. Just before the redirect call > >> $authRedirect looks like this: > >> array( > >> 'controller' => 'order_items', > >> 'plugin' => null, > >> 'pass' => array(0 => 30), > >> 'action' => 'delete') > >> ) > > >> Looks ok but then I get > >> Notice (8): Array to string conversion [CORE\cake\libs\router.php, > >> line 949] > > >> So either Router::parse() returns malformed result or Router::url() > >> doesn't understand something that is correctly formed. The notice > >> itself is in Router::mapRouteElements(). > > >> Before sending this I checked that I have the same version of > >> router.php as the latest svn > >> source:https://trac.cakephp.org/browser/trunk/cake/1.2.x.x/cake/libs/router.php > > >> So what do you think? Is it me or is there really a bug. If it is a > >> bug, what should I do? > > >> Petr --~--~-~--~~~---~--~~ 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: Determinate layout controller inside app_error.php
I'm not clear on what you are trying to do but...I'm assuming you already have CakePHP's ErrorHandler class, which captures and handles all cakeError() calls, so why not use it? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Determinate layout controller inside app_error.php
Hi I have this question: I would make My Error Handling. I would determinate the layout of the controller that calls my error function inside the error function. How can I do it? Many Thanks Marco --~--~-~--~~~---~--~~ 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: Help needed for inline WISIWYG editor...
Hi, I'm using yahoo editor in my project, but i am now kind of stuck in the middle. Everything but the add link and add image is working. Both are not coming but not in a separate layer as it is supposed to be. I'm attaching a screenshot... How can i fix this problem...? Please help me out here On 11/14/08, Flipflops <[EMAIL PROTECTED]> wrote: > > Good choice... and if you want a bit more go for WYMeditor > http://www.wymeditor.org/ which is also jQuery based. > > Personally I really don't enjoy working with TinyMCE (although haven't > tried the latest release) or FCKeditor > > On Nov 14, 7:54 am, Ketan Shah <[EMAIL PROTECTED]> wrote: >> http://code.google.com/p/jwysiwyg/ >> >> You would need include jquery. Minimalistic editor. >> >> -Ketan >> >> Aneesh S wrote: >> > Thanks donkeybob, but i still cant get the entered data. >> >> > This is my code ... >> >> > > > $form->textarea('Content.content_text',array('cols'=>"75",'rows'=>"20",'id'=>"text234"));?> >> > >> >> >(function() { >> >var Dom = YAHOO.util.Dom, >> >Event = YAHOO.util.Event; >> >> >var myconfig = { >> >height: '200px', >> >width: '550px', >> >dompath: false, >> >handleSubmit: false, >> >autoHeight: true >> >}; >> >> >var conEditor = new YAHOO.widget.Editor('text234', >> > myconfig); >> >conEditor._defaultToolbar.buttonType = 'basic'; >> >conEditor.render(); >> >> >})(); >> > >> >> > On 11/14/08, Aneesh S <[EMAIL PROTECTED]> wrote: >> > > thanks for the help.. let me see if it works >> >> > > On 11/13/08, Donkeybob <[EMAIL PROTECTED]> wrote: >> >> > >> I use Yahoo Rich Text Editor. I did make sure my script was below the >> > >> form tags, so the control would render before the yahoo code. Other >> > >> then that . . .no problems >> >> > >> input('content'); ?> >> > >> >> >> > >> (function() { >> > >> var Dom = YAHOO.util.Dom, >> > >> Event = YAHOO.util.Event; >> >> > >> var myconfig = { >> > >> height: '200px', >> > >> width: '550px', >> > >> dompath: false, >> > >> handleSubmit: true, >> > >> autoHeight: true >> > >> }; >> >> > >> var conEditor = new YAHOO.widget.Editor('Content', >> > >> myconfig); >> > >> conEditor._defaultToolbar.buttonType = 'basic'; >> > >> conEditor.render(); >> >> > >> })(); >> > >> >> >> > >> On Nov 13, 8:28 am, Smelly_Eddie <[EMAIL PROTECTED]> wrote: >> > >>> TinyMCE is what you need. >> >> > >>> Minimal code to turn any text area into rich editors. >> >> > >>> PAsses data normally as post (or whatever method your existing form >> > >>> uses) >> >> > >>> On Nov 13, 8:04 am, "Aneesh S" <[EMAIL PROTECTED]> wrote: >> >> > >>> > I had tried Yahoo's rich text editor, but i could not get the data >> > >>> > via >> > >>> > post... Any help in that matter would be great... >> >> > >>> > Thanks for the hint kyle.davis >> >> > >>> > On 11/13/08, validkeys <[EMAIL PROTECTED]> wrote: >> >> > >>> > > in some WYSIWYG editors, there is a setting for handling post. >> > >>> > > If you >> > >>> > > don';t set that variable, you can submit the form but you won't >> > >>> > > see >> > >>> > > the values in _POST >> >> > >>> > > On Nov 13, 7:01 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> >> > >>> > > wrote: >> > >>> > >> Hi, >> >> > >>> > >>I need to build an inline wysiswig editor for the project >> > >>> > >> i'm >> > >>> > >> working on. I have tried some editors, but im not being able to >> > >>> > >> extract the typed text using post. Is such a facility built-in >> > >>> > >> in >> > >>> > >> cake ? Can any one help me out in this Thanks in >> > >>> > >> advance >> >> > >>> > -- >> > >>> > Aneesh S >> >> > > -- >> > > Aneesh S >> >> > -- >> > Aneesh S > > > -- Aneesh S --~--~-~--~~~---~--~~ 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: best practices: disable/hide links which are denied by ACL?
dr. Hannibal Lecter wrote: > I'm halfway through the ACL implementation (well, almost...), and I > was wondering: is it better to hide the links which are denied by ACL > (we're talking about the already logged-in user), or show them and > give the user the Auth message "not enough privileges"? > > Obviously, hiding all the denied links will make views a bit messier > and slower to run overall, but user interface will be cleaner. Do you > think it's worth it? > > Please note that I'm not talking just about the admin/regular user > views, I'm talking about custom user groups *and* dynamic permissions. I'm working on something similiar and decided to hide the links which are denied by ACL. Three main reasons: 1. As you said, the userinterface will be cleaner 2. Showing the links and giving the user a message "not privileged" would result in a support nightmare. ("When I click on 'delete database' the system tells me I can't do it. Why is that?") 3. Sometimes there are links of which I don't want some users to be aware of. The application I'm developing right now generates several reports about the data the users enter. Some of these reports are available for all users, some only for a privileged user group. If the unprivileged users would see the links for these reports someone would have to explain to them why they can't access them... Anyway, I'm still working on a proper, cake-like solution to generate the menue according to the user's privileges. At the moment I'm fumbling around with a component which receives an array with all available links an returns an array with the allowed ones. To make things a bit more complicated I have submenues. So if a user is not allowed to access any of the submenu links he doesn't even see the main menue point. I'd like to hear other solutions, though... Regards Guenther --~--~-~--~~~---~--~~ 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 queries being executed in wrong order on db?
Anyone, please? I tried both execute and save for the insert, but it always gets executed last, after my selects the code resides in a component // update request $rqs =& new RequestStatus(); $rqs->addStatus($requestid,'request_submitted'); // get the request data $req =& new Request(); $r = $req->search(null, 'simple', null,$requestid,null,3); $r = $r[0]; it's very annoying, i dont see what i might be doing wrong. Google only revealed an un-answered message (on the same problem) to this group from 2007. thanks a lot, andrew On Nov 14, 7:58 pm, pigeon <[EMAIL PROTECTED]> wrote: > Hello all, > > i have a cakePHP 1.1 app that, at a point, creates a record on a model > (B) that is associated with another model (A) through "A has many B" > then does a find on A. I've noticed that the new record in B does not > show up on the find's result array from A, and checking debug revealed > that the INSERT query that is earlier in the code then the find > (SELECT), it gets executed LAST. > > How can i change this behaviour..? > > many thanks, > andrew --~--~-~--~~~---~--~~ 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: possible bug in router.php
I'm not sure what you're asking about. I already gave you the value of $authRedirect... Petr Dne 15.11.2008 0:13, validkeys napsal(a): > what is the value of your authRedirect? > > > On Nov 14, 12:35 pm, "Petr 'PePa' Pavel" <[EMAIL PROTECTED]> wrote: >> Hello everyone, >> I'd like to share with you what I have discovered. >> >> Here's a procedure that triggers a notice level error: >> 1) When accessing url >> http://teachtheworldguitar.pp/orderItems/delete/30 >> OrderItemsController->isAuthorized() returns false so I'm logged off >> and redirected to a login form. That was planned, so far so good. >> >> 2) The url I came from is saved and used after successful login for >> redirection. This is in my MembersController->login(): >> $authRedirect = $this->Auth->redirect(); >> if (!is_array($authRedirect)) { >> $authRedirect = Router::parse($authRedirect); >> } >> ... some code here ... >> $this->redirect($authRedirect); >> >> 3) Now I'm getting to the point. Just before the redirect call >> $authRedirect looks like this: >> array( >> 'controller' => 'order_items', >> 'plugin' => null, >> 'pass' => array(0 => 30), >> 'action' => 'delete') >> ) >> >> Looks ok but then I get >> Notice (8): Array to string conversion [CORE\cake\libs\router.php, >> line 949] >> >> So either Router::parse() returns malformed result or Router::url() >> doesn't understand something that is correctly formed. The notice >> itself is in Router::mapRouteElements(). >> >> Before sending this I checked that I have the same version of >> router.php as the latest svn >> source:https://trac.cakephp.org/browser/trunk/cake/1.2.x.x/cake/libs/router.php >> >> So what do you think? Is it me or is there really a bug. If it is a >> bug, what should I do? >> >> Petr > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---