Re: Where is the Wiki about Media Plugin of David Persson
Sorry but i think that the Wiki is very very helpful . With only documentation in code it is more difficult use the plugin On 29 Nov, 17:34, David Persson wrote: > Hi Marco, > > Most of the content which previously was available in the wiki is now > being shipped as individual files in the "docs/" directory[1]. Former > wiki content which can be described as API documentation has been > moved into the respective docblocks[2]. > > [1]https://github.com/davidpersson/media/tree/1.3/docs/ > [2]https://github.com/davidpersson/media/blob/1.3/views/helpers/media.ph... > > - David > > On 29 Nov., 16:19, "marco.rizze...@gmail.com" > > wrote: > > Hi > > I can't find more the Wiki about Media Plugin of David Persson. > > Can someone give me the new url to the Wiki? > > I don't remember how use medium helper. > > Many Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Where is the Wiki about Media Plugin of David Persson
Hi I can't find more the Wiki about Media Plugin of David Persson. Can someone give me the new url to the Wiki? I don't remember how use medium helper. Many Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Fatal Error and warnings on cakephp core with PHP 5.3
Hi I have downloaded cakephp 1.3.5.0 and I have PHP 5.3.3 I have unzip cake and I try to see if it works correctly and I get this errors : Warning (2): strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead [CORE\cake\libs \cache.php, line 570] Notice: Trying to get property of non-object in C:\htdocs\cakephp \cake_1.3.5.0\cake\libs\cache\file.php on line 248 Fatal error: Call to a member function cd() on a non-object in C: \htdocs\cakephp\cake_core\cake_1.3.5.0\cake\libs\cache\file.php on line 248 Can someone give me any suggestions about what kind of errors are these? Many Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Question about Cake manage session
Hi , I have a curiosity. If I have a php script inside the Cake webroot and in this script I try to do print_r($_SESSION); I can't see the Cake session Instead if I inlude in this php script the core file of Cake session and I do a CakeSession->start then with print_r($_SESSION) I can see the Cake session. What is the reason of this? Many Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
How to expire the session when the browser window is closed?
Hi I have CakePHP 1.2 I have Security.level = medium because with high I have many problems with Ajax calls because the session is renewed every time. With Security.level = medium I have noted that the session doesn't expire when I close the browser window. My question is how can do to expire session when the browser window is closed but have Security.level = medium? Many Thanks Marco Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Enter directly into the web application via SMS
Hi I have a particular question. I have a web mobile application. This application has his authentication part (with Auth component). Now one features of the web application is that the user in certainly situation receives a sms with a link. If he clicks on link I must open a session that allows only to view the page and then the session must expiry. Have someone some suggestion to do this? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Question about Media Plugin of David Persson
Is here someone that uses this plugin? On 13 Set, 15:43, "marco.rizze...@gmail.com" wrote: > I try to resolve this error with this setting in core.php : > > Media_Info::config(array( > 'document' => array('Document'), > 'image' => array('ImageBasic'), > 'generic' => array('Generic') > )); > > But I get this error: > > Fatal error: Media_Info_Generic::require_once() [function.require]: > Failed opening required 'c:\.\plugins\media\libs\mm\src\Media\Info/ > Adapter/Document.php' in C:\.\plugins\media\libs\mm\src\Media\Info > \Generic.php on line 54 > > Someone can help me about this? > > Thanks > On 30 Ago, 18:25, "marco.rizze...@gmail.com" > > wrote: > > Hi > > I use MediaPlugin of David Persson. > > All works perfectly. > > I have only this question about the use of this plugin > > How can I set the plugin to use .zip file , .7zip file , .rar file > > > For the moment I get always this error : > > > Fatal error: Uncaught exception 'Exception' with message 'No adapters > > configured for media name `generic`.' in .Media\Info.php:57 > > > Can someone give me some suggestions? > > Many Thanks > > Marco > > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Question about Media Plugin of David Persson
I try to resolve this error with this setting in core.php : Media_Info::config(array( 'document' => array('Document'), 'image' => array('ImageBasic'), 'generic' => array('Generic') )); But I get this error: Fatal error: Media_Info_Generic::require_once() [function.require]: Failed opening required 'c:\.\plugins\media\libs\mm\src\Media\Info/ Adapter/Document.php' in C:\.\plugins\media\libs\mm\src\Media\Info \Generic.php on line 54 Someone can help me about this? Thanks On 30 Ago, 18:25, "marco.rizze...@gmail.com" wrote: > Hi > I use MediaPlugin of David Persson. > All works perfectly. > I have only this question about the use of this plugin > How can I set the plugin to use .zip file , .7zip file , .rar file > > For the moment I get always this error : > > Fatal error: Uncaught exception 'Exception' with message 'No adapters > configured for media name `generic`.' in .Media\Info.php:57 > > Can someone give me some suggestions? > Many Thanks > Marco Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Question about Media Plugin of David Persson
Hi I use MediaPlugin of David Persson. All works perfectly. I have only this question about the use of this plugin How can I set the plugin to use .zip file , .7zip file , .rar file For the moment I get always this error : Fatal error: Uncaught exception 'Exception' with message 'No adapters configured for media name `generic`.' in .Media\Info.php:57 Can someone give me some suggestions? Many Thanks Marco Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Configuration in David Persson MediaPlugin in cake 1.3
I'm using David Persson MediaPlugin. With the version relative to cake 1.2 all works fine.Now I'm upgrading my web application to cake 1.3 so I try to use the Media Plugin version relative to cakephp 1.3. I have some problem with the use of callback "transferTo" instead of 'destinationFile' config parameter. I have destinationFile like ':Medium.short::DS:photos:DS::uuid::DS:photo.:Source.extension:', How can I define transferTo to have this path for my photos? Many Thanks Marco Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Model like both ACO and ARO in ACL
Can you tell me how the model has to be configurated? On 29 Lug, 15:04, AD7six wrote: > On Jul 29, 1:16 pm, "marco.rizze...@gmail.com" > > wrote: > > Can someone some suggestion for me? > > Yes. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Model like both ACO and ARO in ACL
Can someone some suggestion for me? Thanks On 29 Lug, 09:41, "marco.rizze...@gmail.com" wrote: > Hi is it possible use a model in Acl both ARO and ACO? > Thanks > Marco Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Model like both ACO and ARO in ACL
Hi is it possible use a model in Acl both ARO and ACO? Thanks Marco Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: ACL and find all
Have anyone some suggestions about this? On 23 Lug, 13:58, "marco.rizze...@gmail.com" wrote: > Hi > I use ACL to control access to model "Post" made by "User". > Now I have to find all or paginate all posts that are accessible by a > specific user. > How can I use ACL inside find operation to do this? > Many Thanks > Marco Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
ACL and find all
Hi I use ACL to control access to model "Post" made by "User". Now I have to find all or paginate all posts that are accessible by a specific user. How can I use ACL inside find operation to do this? Many Thanks Marco Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
ACL with Users that belongs to many Groups
Hi I'm newbie with cakephp. I have this structure : Users HABTM Groups. Now I would use ACL to manage permissions but ACL is right when the Users belongsTo Groups. I have try to search in the forum but I don't understand if with cakephp ACL it is or isn't possible. Can someone that has tried to do this give me a full response with a bit of code to do this= Many Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Media Plugin - Getting Started
Hi I would ask another question about media plugin: In my attachment model I have this configuration for Media.Transfer: 'Media.Transfer' => array( 'trustClient' => false, 'destinationFile' => ':Medium.short::DS:attachments:DS::Model.id::DS:attachment.:Source.extension:', 'baseDirectory' => MEDIA_TRANSFER, 'createDirectory' => true, 'alternativeFile' => 100 ), The problem is the marker Model.id when I add a NEW attachment , because the marker have no vlaue infact I get this error : " TransferBehavior::_replaceMarker - Failed to replace all markers of subject `img\attachments\unknown_marker\attachment.jpg`. Did you setup the behavior correctly? Check the configuration you provided for TransferBehavior in your `Attachment` model. [APP\plugins\media\models\behaviors\transfer.php, line 840 " I would know if is it possible to use field of Model to config destinationFile? Many Thanks Marco On 7 Lug, 07:01, randy wrote: > Quick reply to answer your questions... > > My directory structure is like the first one, with app/webroot/ > transfer instead of app/webroot/media/transfer. > > I'd like to not serve EVERYmediafile from theplugin, so I'm going > to do what I can to not pull my CSS into that directory structure. > So...my styles are still being applied. > > I'll gladly share my code and show what I'm doing, but I first will > need to get stuff working. > > Still working on the UUID filenaming issue, but out-of-the-box it > looks like it will NOT overwrite existing files. > > I'm also trying to figure out how to config the metadata stuff, I had > this working before, but am unable to restore that functionality. I > swear I saw this in the documentation but am not able to track down > this bit. If you can point me in the right direction it would be > appreciated. > > On Jul 6, 10:26 pm, dbme wrote: > > > Awesome! So what is your directory structure (step 3)? > > > Is it > > > app/webroot/media/static/ > > app/webroot/media/filter/ > > app/transfer/ > > > OR > > > app/webroot/media/static/ > > app/webroot/media/filter/ > > app/webroot/media/transfer/ > > > Also, did the styles still get served properly after step 5 > > (protecting the transfer directory)? > > > I would love to see how you made it work! Would you mind posting an > > example or emailing me the relevant code? > > If I can get it working I think it would be great to add this as a > > full-on tutorial in the wiki. > > > Thank you!! > > > On Jul 6, 6:11 pm, randy wrote: > > > > So glad to see someone else is taking a crack at this... > > > > Thanks to your post i was able to make a bit of headway...when i set > > > this up the first time I had troubles with getting things right in my > > > bootstrap.php file. However, i had a fairly easy time with other parts > > > of this, namely the actual file-upload and metadata fields. > > > > I just set this up again using your instructions for bootstrap.php, > > > and with just a few more adjustments I have it uploading files to the > > > transfer directory and spitting out copies of the original, in > > > different sizes. > > > > There are just two more things that I want to get working...I'd like > > > to use theMediaHelper to pull in my uploaded images, and, most > > > importantly, I'd like to get the file-renaming functionality working > > > so that users don't overwrite each others files. This also makes it > > > tough to guess filenames if people go fishing for the uploaded images. > > > > I am running this on a cake 1.3 setup in case anyone was wondering. > > > > On Jul 5, 1:30 pm, dbme wrote: > > > > > I'm just getting started with CakePHP and also David Persson'sMedia > > > >plugin(http://github.com/davidpersson/media). I've got my app working > > > > but I'm having a difficult time getting theMediapluginworking. I > > > > figured I'd start this thread so I could A.) get it working and B.) > > > > create a reference for beginners like me. > > > > > Here's what I've done so far (following the README and Configuration > > > > wiki -http://wiki.github.com/davidpersson/media/configuration). Steps > > > > marked with a * didn't go as documented :( > > > > > 1. Download and extract the files to /path/to/your/app/plugins/media > > > > 2. Include theMediapluginconfig file in the /path/to/your/app/ > > > > config/bootstrap.php > > > > > define ( 'MEDIA_TRANSFER', APP . 'transfer' . DS); > > > > define ( 'MEDIA_TRANSFER_URL', false); > > > > require APP . 'plugins/media/config/core.php'; > > > > > * 3. Create the directory structure using the console > > > > > cd /path/to/your/app/ > > > > ../cake/console/cakemediainit > > > > > The Configuration wiki says that there should be a static, filter, and > > > > transfer directory under the webroot/media/ directory but the command > > > > above will put the transfer directory under the app directory. Not > > > > sure if this is how it should be or if I did something wrong. > > > > > * 4. Copy/move/collect themed
Re: Question about Media Plugin of David Persson
Thank you very much Andrey I have another question. I have protected the Transfer Directory where i have uploaded images If I use the cakephp html helper to show these images in my pages I can't show anything With media helper is it possible to show these image in my pages or I must use another method? Many Thanks On 18 Giu, 21:01, Andrey Mozharovsky wrote: > Hi Marco, > > You may probably use Medium helper and specify the file version there. For > e.g. > in your view you may try to do something like this: > > embed('s/transfer/img/' . $photo['basename']); ?> > > this snippet will render 's' version of image. > > > Hi > > I use MediaPlugin of David Persson. > > All works perfectly. > > I have only this question about the use of this plugin > > I have the model Photo that is configurated like : > > > var $actsAs = array( > > 'Media.Polymorphic' => array( > > 'classField' => 'model', > > 'foreignKey' => 'foreign_key', > > ), > > 'Media.Transfer' => array( > > 'trustClient' => false, > > 'destinationFile' => '..., > > 'baseDirectory' => MEDIA_TRANSFER, > > 'createDirectory' => true, > > 'alternativeFile' => 100 > > ), > > 'Media.Media' => array( > > 'metadataLevel' => 2, > > 'makeVersions' => true, > > 'filterDirectory' => MEDIA_FILTER, > > )); > > > The plugin is configurated to have version "m",'l',"xl" > > > Now this model is in hasOne relation with another model. > > > I have noted that when I do a read operation with this another model I > > can't get the various resized version of Photo but only the single > > record relative to main photo. > > How can I to get all the resized version of photo? > > > Many Thanks > > Marco > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > 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 > > > > signature.asc > < 1KVisualizzaScarica Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Question about Media Plugin of David Persson
Hi I use MediaPlugin of David Persson. All works perfectly. I have only this question about the use of this plugin I have the model Photo that is configurated like : var $actsAs = array( 'Media.Polymorphic' => array( 'classField' => 'model', 'foreignKey' => 'foreign_key', ), 'Media.Transfer' => array( 'trustClient' => false, 'destinationFile' => '..., 'baseDirectory' => MEDIA_TRANSFER, 'createDirectory' => true, 'alternativeFile' => 100 ), 'Media.Media' => array( 'metadataLevel' => 2, 'makeVersions'=> true, 'filterDirectory' => MEDIA_FILTER, )); The plugin is configurated to have version "m",'l',"xl" Now this model is in hasOne relation with another model. I have noted that when I do a read operation with this another model I can't get the various resized version of Photo but only the single record relative to main photo. How can I to get all the resized version of photo? Many Thanks Marco Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Question on encoding on database.php
Hi I have a old DB.Now I must do a CakePHP app on this Db. For the moment I do the scaffolding but I have noted that in edit.php I see all fields empty. If I set encoding in database.php like 'encoding' => 'utf8' all works fine. Can someone explain me why is this and what is the difference? Then I must product an XML with this data what is difference in XML if i use encoding or not? Many Thanks Marco Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Validate only some field
Hi I have this need. I have to do a model's save with a field that normally can't be empty but in this case can be empty. How can I do to save doing the validation only on some fields and not on others fields? Many Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Problem with using XML with CAKEPHP
Hi I would use XML in my application. I define my default layout in xml like : "); ?> Now when I call a page like : /{controller}/{action}.xml I get this error : Error interpretation XML: non well-formed Line number 2, column 3: ---^ Can someone help me about this? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Problem with Media Plugin of David Persson
I find that the problem isthat mime_magic is not goog installed. Now I get mime_magic installed but I get this error: mime_content_type() [http://www.php.net/mime_magic]: mime_magic not initialized [APP\plugins\media\vendors\mime_type.php, line 160] How can I initialized mime_magic? On 21 Mag, 16:15, "marco.rizze...@gmail.com" wrote: > Hi > I have installed the Media Plugin in my system (I work on windows > system). > I try to test if all works using directly the Attachment Model. > I try to upload a jpeg but I get always an mime type error. > I have mime_magic installed. > I try to do a bit of backup on code of Media Plugin and I have find > where is the error. > On Transfer Behaviour in the method checkMimeType if i do a pr() > $this->runtime[$Model->alias] I get : > Array > ( > [temporary] => Array > ( > [scheme] => > [host] => localhost > [port] => > [file] => C:\Windows\Temp\php1D5E.tmp > [mimeType] => application/octet-stream > [size] => 92632 > [pixels] => 337460 > [permisssion] => > [dirname] => C:\Windows\Temp > [basename] => php1D5E.tmp > [filename] => php1D5E > [extension] => tmp > [type] => uploaded-file-local > [permission] => 0666 > [error] => 0 > ) > > > The mime type is application/octet-stream and this causes the error. > Can someone give me some suggestion about this? > Many Thanks > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > 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 > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Problem with Media Plugin of David Persson
Hi I have installed the Media Plugin in my system (I work on windows system). I try to test if all works using directly the Attachment Model. I try to upload a jpeg but I get always an mime type error. I have mime_magic installed. I try to do a bit of backup on code of Media Plugin and I have find where is the error. On Transfer Behaviour in the method checkMimeType if i do a pr() $this->runtime[$Model->alias] I get : Array ( [temporary] => Array ( [scheme] => [host] => localhost [port] => [file] => C:\Windows\Temp\php1D5E.tmp [mimeType] => application/octet-stream [size] => 92632 [pixels] => 337460 [permisssion] => [dirname] => C:\Windows\Temp [basename] => php1D5E.tmp [filename] => php1D5E [extension] => tmp [type] => uploaded-file-local [permission] => 0666 [error] => 0 ) The mime type is application/octet-stream and this causes the error. Can someone give me some suggestion about this? Many Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Problem with Media Plugin of David Persson
Hi I have installed the Media Plugin in my system (I work on windows system). I try to test if all works using directly the Attachment Model. I try to upload a jpeg but I get always an mime type error. I have mime_magic installed. I try to do a bit of backup on code of Media Plugin and I have find where is the error. On Transfer Behaviour in the method checkMimeType if i do a pr() $this->runtime[$Model->alias] I get : Array ( [temporary] => Array ( [scheme] => [host] => localhost [port] => [file] => C:\Windows\Temp\php1D5E.tmp [mimeType] => application/octet-stream [size] => 92632 [pixels] => 337460 [permisssion] => [dirname] => C:\Windows\Temp [basename] => php1D5E.tmp [filename] => php1D5E [extension] => tmp [type] => uploaded-file-local [permission] => 0666 [error] => 0 ) The mime type is application/octet-stream and this causes the error. Can someone give me some suggestion about this? Many Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
HasOne relation between model with DB like datasource a model with notDB like datasource
Hi I have to define a hasOne relation between model (model A) with DB like datasource a model (model B) with datasource that isn't a DB. If I have this controller operation: pr($this->ModelA->find('all')); die(); I have noted that CakePHP products a single sql query to find data. How can I manage this situation? What is the structure to manage this situation? Many Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: saveAll() with $fieldList problem
I try this : $this->ModelA->saveAll($this- >data,array('fieldList'=>array('ModelA.field_name','ModelB.field_name'))); But it doesn't work (I use cakephp 1.2) On 21 Apr, 15:45, Jeremy Burns wrote: > Prefix all of your fields with the model name (it's good practice everywhere > really). So ModelA.field_name, ModelB.field_name etc. > > Jeremy Burns > jeremybu...@me.com > On 21 Apr 2010, at 14:40, marco.rizze...@gmail.com wrote: > > > I want use Model->saveAll() with fieldList to avoid to save some > > field > > My problem is that I have in the related model two fields with the > > same name but one field (of first model (ModelA) ) should be saved and > > the other (of second model(ModelB)) shouldn't be save. > > How do I set the fieldList in saveAll to save the field of ModelA and > > not save the ifield of ModelB > > Many Thanks > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > 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 > > athttp://groups.google.com/group/cake-php?hl=en > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > 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 > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
saveAll() with $fieldList problem
I want use Model->saveAll() with fieldList to avoid to save some field My problem is that I have in the related model two fields with the same name but one field (of first model (ModelA) ) should be saved and the other (of second model(ModelB)) shouldn't be save. How do I set the fieldList in saveAll to save the field of ModelA and not save the ifield of ModelB Many Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Best pattern to control which data save
For example if I am superadmin I would can edit and add data even if I don't respect the valdation rule. So I will have views like superadmin_add,superadmin_edit where I disable validation rule On 9 Mar, 11:18, WebbedIT wrote: > The answer depends on exactly what you're doing at the time. > > Within your validation rules you can specify if the rule applies on > add or edit. > > Or you can alter the models validation array from with the controller > by calling unset($this->ModelName->validate['fieldName']); or > something similar. > > Also, by not including the field in the data array cake will not try > to validate it. > > Which one to use depends on what it is you're trying to do. > > HTH > > Paul Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Best pattern to control which data save
Ok thanks I have another question. Is it possible to enable/disable a validation rule from controller code? Namely for example in some actions I would apply the validation rule before to call the "save" method of a Model , in other action I wouldn't apply the validation rule before to call the "save" method of a Model. Thanks On 9 Mar, 09:16, WebbedIT wrote: > A custom validation rule would do the job nicely > > http://book.cakephp.org/view/150/Custom-Validation-Rules > > Place all your logic in the model and it will be called before a save > and return meaningful errors to the form if the data is not valid > along with any other errors. > > I have a message model which does something very similar, the user > specifies multiple recipients by a comma seperated list of usernames > in a text field (as you would with email addresses in outlook) and my > validation rule is as follows: > > function __validateRecipients($field) { > if(!$field['recipients']) { > return "This field cannot be left blank"; > } else { > $recipients = explode(',', str_replace(' ', '', > $field['recipients'])); > foreach($recipients AS $k => $v) { > if(!$this->User->findByUsername($v)) { > $invalid[] = $v; > } > } > if(!empty($invalid)) { > return "Could not find recipient(s) ".join(', ', $invalid); > } > } > return true; > > } > > HTH > > Paul > > On Mar 8, 6:14 pm, "marco.rizze...@gmail.com" > > wrote: > > Hi > > I have a question about saving data. > > I describe my situation. > > I have a web application where a user can send document to other > > users. > > Now a user can send only to certain users. > > A user send a document through an "add" action where I do a save where > > the data to save is : > > > $this->data['Send']['sender_id'] > > $this->data['Recipient'][0]['recipient_id'] > > $this->data['Recipient'][1]['recipient_id'] > > $this->data['Recipient'][2]['recipient_id'] > > . > > > Now I must control that the $this->data['Send']['recipient_id'] is one > > of a user that can receive and not another. > > My question is what is the best pattern to do the control that the > > $this->data['Send']['recipient_id'] is one of a user that can receive > > and not another. > > Do I it through validation (but I have to do a query for each > > $this->data['Recipient'][0]['recipient_id']) or I use another system? > > > Many Thanks > > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Best pattern to control which data save
Hi I have a question about saving data. I describe my situation. I have a web application where a user can send document to other users. Now a user can send only to certain users. A user send a document through an "add" action where I do a save where the data to save is : $this->data['Send']['sender_id'] $this->data['Recipient'][0]['recipient_id'] $this->data['Recipient'][1]['recipient_id'] $this->data['Recipient'][2]['recipient_id'] . Now I must control that the $this->data['Send']['recipient_id'] is one of a user that can receive and not another. My question is what is the best pattern to do the control that the $this->data['Send']['recipient_id'] is one of a user that can receive and not another. Do I it through validation (but I have to do a query for each $this- >data['Recipient'][0]['recipient_id']) or I use another system? Many Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Display a view in a iframe using Media View
Sorry I have mistake the url in the iframe . All works fine :) . On 5 Mar, 09:50, "marco.rizze...@gmail.com" wrote: > Hi > I'm using Media view to allow my users to download files and to keep > files on top the web server root. > Now I have the need to display these files inside an iframe of the > page. > I try to use Media View and set 'download' parameter "false" but I get > an "Invalid Content" error. > I would ask if exists a pattern to keep files on top the web server > root but to have the possibility to display them on a iframe? > Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Display a view in a iframe using Media View
Hi I'm using Media view to allow my users to download files and to keep files on top the web server root. Now I have the need to display these files inside an iframe of the page. I try to use Media View and set 'download' parameter "false" but I get an "Invalid Content" error. I would ask if exists a pattern to keep files on top the web server root but to have the possibility to display them on a iframe? Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Question about use ACL with paginate
I try to explain better. I have users that belongs to groups (a user can belong to many group and a group can have many users) Then I have documents. I must manage permissions on documents. Permissions are : read a document, edit a document etc... Permission can be defined in raltion to groups or to users So there are documents can be accessed by all user in a group and there are other documents can be accessed by only some users. I ask what is the best pattern to manage this situation To manage this is better have a HABTM relation between User and Document with a "permission" field ( more simple but I have to use more and more space). In this way when I set that a document can be access by a group I must insert in HABTM relation all the users of the group. or I use ACL (very very complex to use in this situation(I have to manage also that a user can belong to many groups) or I ask if exist another method? I hope that now my problem is more understandable. On 10 Feb, 17:46, anl hp wrote: > Forgive me, but I'm making a mess, now you're saying: "I must find all users > that belong to the group and insert a record in > all two tables(LineDoc and DocPermit) for every user." I believe I don't > understand you quite well at first time, but anyway, If you going to do > that, may be is better for you to > merge the LineDoc Model and DocPermit Model into one model, thus eliminating > the need > of insert pretty same data in two different tables > > anl > > On Wed, Feb 10, 2010 at 3:23 PM, marco.rizze...@gmail.com < > > marco.rizze...@gmail.com> wrote: > > Ok many thanks. > > Using the solution that you have suggested I don't need to use ACL. > > In this case for manage permissions expressed by group on a document > > (like "Group A can read Document 1") > > I must find all users that belong to the group and insert a record in > > all two tables(LineDoc and DocPermit) for every user. > > Is it correct? > > > On 10 Feb, 14:20, anler wrote: > > > I think the BEST way is using ACL, and yes, it's complex, but give you > > > reliability for free, even more > > > if you are mixin groups in the coctel (group permits are inherited by > > > users of that group, and things like that), > > > with ACL you could handle better reading and writing documents > > > through AuthComponent::authorize = 'crud' > > > (If you have time and patience I encourage you to do it this way, I > > > will help in anything you need ;) ) > > > > if you just want get something fast and cheap, well, I'll tell you > > > what I'm thinking > > > > - Keep the model Document as flat as possible, ex in db: > > > table documents( > > > name .., created ..., modified ... > > > ) > > > > - Instead of relating Users and Documents through a HABTM relation, in > > > HABTM the join table acts only as a connection between de models, but > > > if you feel the need of add more > > > information to this table, you should give her its own model because > > > it is participating in the application bussiness, ex: > > > table line_docs( > > > user_id, document_id, date_when_read, etc > > > ) > > > > model LineDocs (or whatever name you want give him) > > > hasMany => Users > > > hasMany => Documents > > > > - Let another table manage the user permits on documents > > > table doc_permits( > > > user__id, document_id, create?, read?, write?, delete?, > > > etc > > > ) > > > and check this table when somebody wants to touch or create some > > > document > > > > On Feb 10, 1:41 pm, "marco.rizze...@gmail.com" > > > > wrote: > > > > Can you explain better what is your solution. > > > > I explain better my situation: > > > > > Model : > > > > Group: (HABTM User) > > > > User:(HABTM:Group) > > > > Document > > > > > I have to manage permissions to access to documents. > > > > Some users can modify some documents , some users can only read some > > > > documents(I must also register when a user reads a documents ), some > > > > users can't read some documents. > > > > > To manage this is better have a HABTM relation between User and > > > > Document with a "permission" field (and with a "date_when_read" > > > > field) ( mo
Re: Question about use ACL with paginate
Ok many thanks. Using the solution that you have suggested I don't need to use ACL. In this case for manage permissions expressed by group on a document (like "Group A can read Document 1") I must find all users that belong to the group and insert a record in all two tables(LineDoc and DocPermit) for every user. Is it correct? On 10 Feb, 14:20, anler wrote: > I think the BEST way is using ACL, and yes, it's complex, but give you > reliability for free, even more > if you are mixin groups in the coctel (group permits are inherited by > users of that group, and things like that), > with ACL you could handle better reading and writing documents > through AuthComponent::authorize = 'crud' > (If you have time and patience I encourage you to do it this way, I > will help in anything you need ;) ) > > if you just want get something fast and cheap, well, I'll tell you > what I'm thinking > > - Keep the model Document as flat as possible, ex in db: > table documents( > name .., created ..., modified ... > ) > > - Instead of relating Users and Documents through a HABTM relation, in > HABTM the join table acts only as a connection between de models, but > if you feel the need of add more > information to this table, you should give her its own model because > it is participating in the application bussiness, ex: > table line_docs( > user_id, document_id, date_when_read, etc > ) > > model LineDocs (or whatever name you want give him) > hasMany => Users > hasMany => Documents > > - Let another table manage the user permits on documents > table doc_permits( > user__id, document_id, create?, read?, write?, delete?, > etc > ) > and check this table when somebody wants to touch or create some > document > > On Feb 10, 1:41 pm, "marco.rizze...@gmail.com" > > wrote: > > Can you explain better what is your solution. > > I explain better my situation: > > > Model : > > Group: (HABTM User) > > User:(HABTM:Group) > > Document > > > I have to manage permissions to access to documents. > > Some users can modify some documents , some users can only read some > > documents(I must also register when a user reads a documents ), some > > users can't read some documents. > > > To manage this is better have a HABTM relation between User and > > Document with a "permission" field (and with a "date_when_read" > > field) ( more simple but I have to use more and more space). > > > or use ACL (very very complex to use in this situation(I have to > > manage also that a user can belong to many groups) and but it uses > > less space) > > > or exist another method to use (a best pattern)? > > > Write all your experience about this because I think that is one of > > the big problem when project a web application > > Many Thanks > > On 10 Feb, 12:53, anler wrote: > > > > Are you aking how find the allowed docs or how to paginate this result > > > (or both)? > > > > I did something similar once but with a different approach, since I > > > was working with > > > 'resources' instead of documents, I listed the resources and the > > > option 'access info' > > > to show the permits for that resource (this way used less db queries) > > > > On Feb 10, 12:41 pm, "marco.rizze...@gmail.com" > > > > wrote: > > > > Hi > > > > I have this question: > > > > I use ACL for manage the access to documents by users. > > > > Now I must display a list of all documents that are accessible by the > > > > logged user. > > > > This list must be paginated. > > > > I have no idea about how to do this and I think to abandon the ACL and > > > > manage the permits with a big table with all relations (HABTM) between > > > > users and documents. > > > > I would ask if someone has any idea about this. > > > > Many Thanks > > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Question about use ACL with paginate
Can you explain better what is your solution. I explain better my situation: Model : Group: (HABTM User) User:(HABTM:Group) Document I have to manage permissions to access to documents. Some users can modify some documents , some users can only read some documents(I must also register when a user reads a documents ), some users can't read some documents. To manage this is better have a HABTM relation between User and Document with a "permission" field (and with a "date_when_read" field) ( more simple but I have to use more and more space). or use ACL (very very complex to use in this situation(I have to manage also that a user can belong to many groups) and but it uses less space) or exist another method to use (a best pattern)? Write all your experience about this because I think that is one of the big problem when project a web application Many Thanks On 10 Feb, 12:53, anler wrote: > Are you aking how find the allowed docs or how to paginate this result > (or both)? > > I did something similar once but with a different approach, since I > was working with > 'resources' instead of documents, I listed the resources and the > option 'access info' > to show the permits for that resource (this way used less db queries) > > On Feb 10, 12:41 pm, "marco.rizze...@gmail.com" > > wrote: > > Hi > > I have this question: > > I use ACL for manage the access to documents by users. > > Now I must display a list of all documents that are accessible by the > > logged user. > > This list must be paginated. > > I have no idea about how to do this and I think to abandon the ACL and > > manage the permits with a big table with all relations (HABTM) between > > users and documents. > > I would ask if someone has any idea about this. > > Many Thanks > > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Question about use ACL with paginate
Hi I have this question: I use ACL for manage the access to documents by users. Now I must display a list of all documents that are accessible by the logged user. This list must be paginated. I have no idea about how to do this and I think to abandon the ACL and manage the permits with a big table with all relations (HABTM) between users and documents. I would ask if someone has any idea about this. Many Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Error in define HABTM relation with 'joinTable' and with 'with'
I think that the use of 'with' and 'joinTable' attributes is excatly for tha case where models tables don't respect the cake convention otherwise these attributes aren't useful On 3 Feb, 15:23, Lorenzo Bettini wrote: > I'm not sure, but it looks like the problem is due to the table name > which is in Italian, thus, it does not respect the conventions of > cakephp; have you got a model for GroupsUser as well? I mean a real > class for that model? In that case, you need to make sure that that > class has the right name for the used table. > > I guess. > > cheers > Lorenzo > > > > marco.rizze...@gmail.com wrote: > > Is there someone that can help me about this? > > > On 2 Feb, 19:02, "marco.rizze...@gmail.com" > > wrote: > >> Hi > >> I'm working on a legacy system , i must to defina an HABTM relation > >> between User and Group. In User model I have this: > > >> var $hasAndBelongsToMany=array( > >> 'Group' =>array( > >> 'className' => 'Group', > >> 'joinTable' => 'utenti_gruppi', > >> 'with' => 'GroupsUser', > >> 'foreignKey' => 'username', > >> 'associationForeignKey'=> 'gruppo_id', > >> 'order' => 'gruppo_nome ASC' > >> ) > >> ); > > >> But I get this error: > > >> Error: Database table groups_users for model GroupsUser was not > >> found. > > >> Is it not possible define a HABTM relation with 'with' and with > >> 'joinTable' that I want? > > -- > Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino > HOME:http://www.lorenzobettini.itMUSIC:http://www.purplesucker.com > BLOGS:http://tronprog.blogspot.com http://longlivemusic.blogspot.com Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Error in define HABTM relation with 'joinTable' and with 'with'
Is there someone that can help me about this? On 2 Feb, 19:02, "marco.rizze...@gmail.com" wrote: > Hi > I'm working on a legacy system , i must to defina an HABTM relation > between User and Group. In User model I have this: > > var $hasAndBelongsToMany=array( > 'Group' =>array( > 'className' => 'Group', > 'joinTable' => 'utenti_gruppi', > 'with' => 'GroupsUser', > 'foreignKey' => 'username', > 'associationForeignKey'=> 'gruppo_id', > 'order' => 'gruppo_nome ASC' > ) > ); > > But I get this error: > > Error: Database table groups_users for model GroupsUser was not > found. > > Is it not possible define a HABTM relation with 'with' and with > 'joinTable' that I want? > Many Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Error in define HABTM relation with 'joinTable' and with 'with'
Hi I'm working on a legacy system , i must to defina an HABTM relation between User and Group. In User model I have this: var $hasAndBelongsToMany=array( 'Group' =>array( 'className'=> 'Group', 'joinTable'=> 'utenti_gruppi', 'with' => 'GroupsUser', 'foreignKey' => 'username', 'associationForeignKey'=> 'gruppo_id', 'order'=> 'gruppo_nome ASC' ) ); But I get this error: Error: Database table groups_users for model GroupsUser was not found. Is it not possible define a HABTM relation with 'with' and with 'joinTable' that I want? Many Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
When use ACL and when use HABTM for control access
Hi I'm newbie on cakephp I have a big doubt about if use ACL or HABTM in my web application. I would ask you some suggestion. My system is: Model: User , Organization , Document Organization HABTM Recipient (User) Organization HABTM Administrator (User) Document belongsTo Organization Document HABTM Recipient (User) (a subset of Recipients of the organization which belongs the document) I must control that a user can read only to documents which it is a recipient. I must control that a user can read only to organizations which it is a recipient. I must control that a user can edit only to documents which belongs to organization which it is a administrator. I must control that a user can edit only to organizations which it is a administrator. In this situation what is the best pattern to use? Is it sufficient to do a method "isAccessible" in model Document and a method "isAccessible" in model Organization ? Many Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Best practise to manage user's selections and user's views
Hi In my application I have the model "Item" and the model "User". Every item is visible by some users and it isn't visible by other users. So I have a HABTM between "User" and "Item". Now I must register when a user views an item and when a user selects a item (a user can select some visible items if he wants). To do this I have found 2 solutions: 1) Created two models "ItemSelection" and "ItemView" but if I must use INNER JOIN (for example If I would the list(with paginate) of users that have viewed and selected and certainly item) I have very very bad performance. 2) Add to the users_items table fields "viewed" and "selected" but I have a big table with many and many record with null value I would ask if someone has this problom in the past and how he has resolved it. Many Thanks Bye Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
How define HABTM with models without jointable
Hi I have 2 models that haven't DB like datasource. Now I would set a HABTM relation between these models ( I manage the data to save with my create method in my datasource). Now If I don't set a jointable when define HABTM relation I get an error. How can I define a HABTM relation without jointable? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Containable behaviour doesn't return all data
I don't know the team_id I kow user_id. I would find all users of all teams which user_id belongs. I ask me if it is possible with only one find operation using contanaible behaviour. On 31 Ott, 11:27, John Andersen wrote: > That is not what you are showing with your code. > This part sets the condition of a user with an id, not a team with an > id. > Try to find from the team side, not the user side, if you know the > team id! > Example: > $this->Team->find(...) > > or if you don't have the Team model in the controller: > $this->User->Team->find(...) > > Enjoy, > John > > On Oct 31, 12:13 pm, "marco.rizze...@gmail.com" > > wrote: > > Yes I try to get all the users of the team with id=4 but I don't get > > anything. > > Where do i mistake? > > > On 30 Ott, 20:42, John Andersen wrote: > > > > You are using find('first', $options), so you only get one record! > > > And the one record will be the one which has a team with a user! > > > You don't get the team! > > > > I am guessing - are you trying to get all the users in the first team > > > for the specified user? > > > Enjoy, > > > John > > > > On Oct 30, 6:30 pm, "marco.rizze...@gmail.com" > > > > wrote: > > > > Hi > > > > I use containable behaviour, but I don't get all data that I have > > > > requested > > > > My code is : > > > > > $options['fields'] = array('User.*'); > > > > $options['conditions'] = array('User.username' => > > > > $user_id); > > > > $options['contain'] = array( > > > > 'Organization' => array( > > > > 'fields'=>array('Team.*'), > > > > 'User' => array( > > > > 'fields' => array('User.*') > > > > ) > > > > ) > > > > ); > > > > pr($this->User->find('first',$options)); > > > > > But I get only : > > > > > Array > > > > ( > > > > [User] => Array > > > > ( > > > > [id] => 1 > > > > ... > > > > ... > > > > ) > > > > > [Team] => Array > > > > ( > > > > [0] => Array > > > > ( > > > > [id] => 4 > > > > ... > > > > ... > > > > [UsersTeams] => Array > > > > ( > > > > [id] => 1 > > > > [user_id] => 1 > > > > [team_id] => 4 > > > > ) > > > > ) > > > > ) > > > > ) > > > > > I don't get all users that are inside team > > > > > Between User and Team there is a hasAndBelongsToMany relation. > > > > > How can I do to get also all users that are in team? > > > > > 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Containable behaviour doesn't return all data
Yes I try to get all the users of the team with id=4 but I don't get anything. Where do i mistake? On 30 Ott, 20:42, John Andersen wrote: > You are using find('first', $options), so you only get one record! > And the one record will be the one which has a team with a user! > You don't get the team! > > I am guessing - are you trying to get all the users in the first team > for the specified user? > Enjoy, > John > > On Oct 30, 6:30 pm, "marco.rizze...@gmail.com" > > wrote: > > Hi > > I use containable behaviour, but I don't get all data that I have > > requested > > My code is : > > > $options['fields'] = array('User.*'); > > $options['conditions'] = array('User.username' => $user_id); > > $options['contain'] = array( > > 'Organization' => array( > > 'fields'=>array('Team.*'), > > 'User' => array( > > 'fields' => array('User.*') > > ) > > ) > > ); > > pr($this->User->find('first',$options)); > > > But I get only : > > > Array > > ( > > [User] => Array > > ( > > [id] => 1 > > ... > > ... > > ) > > > [Team] => Array > > ( > > [0] => Array > > ( > > [id] => 4 > > ... > > ... > > [UsersTeams] => Array > > ( > > [id] => 1 > > [user_id] => 1 > > [team_id] => 4 > > ) > > ) > > ) > > ) > > > I don't get all users that are inside team > > > Between User and Team there is a hasAndBelongsToMany relation. > > > How can I do to get also all users that are in team? > > > 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Containable behaviour doesn't return all data
Hi I use containable behaviour, but I don't get all data that I have requested My code is : $options['fields'] = array('User.*'); $options['conditions'] = array('User.username' => $user_id); $options['contain'] = array( 'Organization' => array( 'fields'=>array('Team.*'), 'User' => array( 'fields' => array('User.*') ) ) ); pr($this->User->find('first',$options)); But I get only : Array ( [User] => Array ( [id] => 1 ... ... ) [Team] => Array ( [0] => Array ( [id] => 4 ... ... [UsersTeams] => Array ( [id] => 1 [user_id] => 1 [team_id] => 4 ) ) ) ) I don't get all users that are inside team Between User and Team there is a hasAndBelongsToMany relation. How can I do to get also all users that are in team? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Auth component and which fields must be saved in session
Hi I use the Auth component to login in my application. I have noted that when the login is correct all fields of User model are saved in the session. How can I do so only some fields are saved in session and the other not? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Possible bug relative to use of memcache
I have read that a method to share the session is exactly using memcache like session_handler. And I have to share Cake session with other web application. On 7 Ott, 16:44, jperras wrote: > Memcache being used as a cache configuration and Sessions have pretty > much nothing in common, unless you've set your session save handler > (in app/core.php) to be cache-based, which is usually not a good idea > unless you know what you're doing. > > -j. In app/core.php I have set the session handler like php and in php.ini I have set session_handler like memcache and in this situation I get all problems that I have described. Marco > > On Oct 6, 5:19 pm, "marco.rizze...@gmail.com" > > wrote: > > Hi > > I have installed memcache on my system. > > I have setted CakePHP to use memcache. > > I have setted the Configure::write('Security.level', 'medium'); > > All seems to work but sometimes I lost the session. In particular I > > note this when I do a sequence of ajax call. > > A simple example to show this error is: > > > /*My Controller*/ > > > .. > > function test($show=0){ > > if ($show==1){ > > $this->layout='ajax'; > > echo ""; > > > > print_r($this->Session->read($this->Auth->sessionKey)); > > echo ""; > > die(); > > } > > } > > ... > > > /*My Test View*/ > > > echo $ajax->link( > > 'test', > > array( 'controller' => 'my_controller', 'action' => 'test','1'), > > array( > > 'update' => 'test_1', > > 'after' => $ajax->remoteFunction( > > array( > > 'url' => array( > > 'controller' => 'my_controller', 'action' => > > 'test','1'), > > 'update' => 'test_2', > > ) > > ), > > ), > > null,false > > ); > > ?> > > > > > > > I hope someone can help me about this. > > 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Ajax call with external redirect doesn't work
Hi I must do a ajax call to an external site. I use a proxy to circumvent the Same Origin Policy. My action-controller proxy is: function proxy($url) { $this->redirect($url,301,true); } In my view when I do the ajax call I get the error : Error: Http:Controller could not be found. If I call directly the action "proxy" it works correctly. It seems that CakePHP can't do ajax call external. Is it correct or I do some mistake? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Possible bug relative to use of memcache
Hi I have installed memcache on my system. I have setted CakePHP to use memcache. I have setted the Configure::write('Security.level', 'medium'); All seems to work but sometimes I lost the session. In particular I note this when I do a sequence of ajax call. A simple example to show this error is: /*My Controller*/ .. function test($show=0){ if ($show==1){ $this->layout='ajax'; echo ""; print_r($this->Session->read($this->Auth->sessionKey)); echo ""; die(); } } ... /*My Test View*/ link( 'test', array( 'controller' => 'my_controller', 'action' => 'test','1'), array( 'update' => 'test_1', 'after' => $ajax->remoteFunction( array( 'url' => array( 'controller' => 'my_controller', 'action' => 'test','1'), 'update' => 'test_2', ) ), ), null,false ); ?> I hope someone can help me about this. 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How use ACL in a particular situation
Hi I have a design question on ACL that I would use in my system. The problem is my system is a bit different from standard. I have users that can be belong to many teams. So a user can belong to two,three,four etc... teams. Moreover I have to manage the access of users to a document's list. To do this i would do this with ACL because I have to manage permissions for access to documents. M question is how define the ARO tree since I have user that belong to many teams (sometimes the permissions for access to documents are defined by teams, exactly If a user belongs to a team that can't read a document and belongs to a team that can read a document the user can read the document)? How is parentNode() function in user model? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Javascript inside a ajax content not work
Hi I use ajax helper to load the content of a div inside my page. In this ajax content I have this: codeBlock('var value='.$value.';'); ?> But when I try to use the javascript variable value I get the error that the value doesn't exist. In my ajax call I have set eval to true. Can someone tell me what is the best practise to use javascript inside ajax content? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CakePHP and scalability
Hi I have developed my web application with CakePHP. For the moment I use one Apache server and one MySql server. Now I have noted that my application is getting slow because the numbers of users is increasing. So I have decided that is the time to scale my architecture. I have tried to find some suggestions on this forum about how scale CakePHP but I haven't found anything. Can someone help me about this with some example, link, tutorial etc.? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Question on the method input of Form helper relative to type 'date'
Hi I use Form helper like this: e($form->input( 'startDate' , array( 'id' => 'starDate', 'name' => 'data[starDate]', 'label' => 'Start date:' , 'type' => 'date', 'dateFormat' => 'DMY', 'empty' => false, 'monthNames' => false, 'minYear' => date('Y')-1, 'maxYear' => date('Y')+1 ) )); The HTML result is: .. .. .. Instead how can I have : . . 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Problem with Security component and form submit
Hi I use Security component and I have a view like this: create(NULL, array( 'url' => '/test/'))); ?> input('testValue',array('name'=>'data[testValue]', 'id'=>'testValue','label' => 'Test Value:','options' => $testValues)); ?> /div> end(__d('buttons',"Try",true))); ?> When I try to submit the form I get a white page. Can someone explain me what happens? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Question about on merge two different Model paginate
Hi I have this situation: I have a model Event and a model News , Both models have the field 'created' . Now in my view I would create a single list where there is there are both each others order by created. Example Event 107/09/09 News 107/09/09 News 206/07/09 .. .. .. I would manage this list with paginate. Is someone can suggest me a pattern that I can use to do a thing like this? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How use Ajax helper and Javascript helper to do js file?
Hi I have noted that in my page I use heavily the ajax helper and javascritpt helper. Now I would move all this code generating by these helpers in a single js file (inside webroot). My question is what is the way (the best way) for to this? More precisely I would continue to use Ajax helper and Javascript helper but to product javascript file I hope that I explained . I aspect advice --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Error on syntax of localization file default.po
Hi I try to use the localization of Cake. I have se in my errors.po: msgid "The submitted file extension is not permitted, only %s permitted." msgstr "L'estensione del file caricato non è permessa, solo %s sono permesse." But in my code when I have this __d('errors',''The submitted file extension is not permitted, only jpeg,png,gif permitted.); I don't get the translation Instead If I use : msgid "The submitted file extension is not permitted, only jpeg,png,gif permitted." msgstr "L'estensione del file caricato non è permessa, solo jpeg,png,gif sono permesse." All works fine. I don't understand where is the error. I hope someone can help me 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Ajax link with type GET
Hi I use $ajax->link function. I have noted that always a post request is done. I would ask if it is possible to do a GET request. What params must be changed? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Speed up load time page problem with Ajax Helper
Hi I would speed up loading time page so I would create only one javascript and load it at the bottom of page. Now I have this problem in this only one javascript I have also prototype and scriptaculous and in my page I use for example Ajax helper but obiusvly I get a javascript error if I load the javascript at bottom of the page. I ask if it is possible to continue to use Ajax helper and load the javascript at bottom of the page. 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Ajax Pagination Helper
Hi I try to use ajax pagination but I get always an error if I try without ajax the pagination works. My code is: view.thtml: link('test', array( 'controller' => 'documents', 'action' => 'test'), array( 'update' => 'dataRecipientsList' ) ); ?> test.thtml options(array('update' => 'dataRecipientsList')); ?> I get always this error : element is null if (element._prototypeEventID) return element._prototypeEventID[0]; \n prototype.js (row 3936) I don't understand where is error . Can someone help me ? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Pagination add parameter to type of find to the url
Hi I use pagination in a my view , in the relative action of controller I use the find('matches') that Nate has shared in bakery. Now in the view in helper paginator is added a "matches" parameter to the url. Is It possible to eliminate this from the url that is created by pagination helper? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Containable and Pagination
Hi I have a containable model. I would apply the pagination on the results inside contain. Example: Models : Document hasMany User In documents_controller.php I have this: $document=$this->Document->find('first', array( 'fields' => array('Document.*'), 'conditions' => array('Document.id'=>$id), 'contain'=>array( 'User'=>array( 'fields' => array('User.id','User.surname','User.name'), 'conditions' => array('User.active'=>1) ) ) ) ); In the view I would get the pagination on the users. Is it possible to do this? How I set "paginate" to do this? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
BelongsTo Fields Error
Hi I have this model: class Document extends AppModel{ var $belongsTo = array( 'Author'=>array( 'className' => 'User', 'conditions' => '', 'fields' => 'Author.id,Author.surname,Author.name', 'dependent' => false, 'order' => '', 'foreignKey' => 'author' ) ); } Now in my controller if i do a ... $options=array( 'fields'=> array ('Document.id','Author.id','Author.username','Author.password') ); $this->Document->find('all',$options); I get USERNAME and PASSWORD of the user that is the author of document. Sorry but this is an error or I mistake? I would that only setted fields (in this case 'Author.id,Author.surname,Author.name') must be present in belongsTo association? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Using external server like static server (for image,css,js and file uploaded by user )
Hi For improve performance I think to use an external server like static server (with lighttpd) to provide static content like image,css, js and so the file uploaded by user. I would ask if someone has experience about this and how he has configured CAKE to do 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
EAV (Entity-Attribute-Value) Data Model with CakePHP
Hi I must use a EAV schema for my web app but I have no idea about how realizate this in cake? I have a table with entities , a table with atrributes and many table with value (one for datetime value,one for varchar value ,one for text value etc. ). Can someone give me some suggestion about this? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Problem with Media Plugin of David Persson
Hi I try to use MediaPlugin of David Persson. I have installed it I config it but when I tr8y test it using documentation (http://wiki.github.com/davidpersson/media/attachment- model ) but It doesn't work (the plugin doesn't save the attachment). My situation is: I have User model with : var $hasOne = array( 'Photo' => array( 'className' => 'Media.Attachment', 'foreignKey' => 'foreign_key', 'conditions' => array('model' => 'User'), 'dependent' => true, ) ); In my controller I have: $this->data = array( 'User' => array( 'id' => 1 ), 'Photo' => array( 0 => array('file' => 'http://cakephp.org/img/cake-logo.png', 'model' => 'User') ) ); $this->User->saveAll($this->data, array('validate' => 'first')); $this->data seems strange if I read from cake documentation ( http://book.cakephp.org/view/75/Saving-Your-Data ) But if I set : $this->data = array( 'User' => array( 'id' => 1 ), 'Photo' => array( 'file' => 'http://cakephp.org/img/cake-logo.png', 'model' => 'User' ) ); I get an validation error from plugin I hope someone can help me 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How using shells inside plugin directory
Hi I have installed a plugin in my cakephp app. Now inside this plugin there is a shell that helps to configure the plugin. My problem is that i don't know how tell to cake console to use this shell My shell is in app/plugins/media/vendors/shells Sorry for the banal question --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Scalability of a CakePHP application
Hi I develop a web application in cake and now I must to scale my system. I think to replicate all my code in all my webservers but I have a doubt : The static images I must replicate in all them? And the javascripts and the css in webroot? If not how can I modify the helpers (html , javascript ... ) in the way to use the right url where there are image,js,css or can I do it with config of cake? Another question : the files that are uploaded by users how can manage this in an enviroment with many web server? I'm very interested about other experiences relative on how manage the code's problem in scalable enviroment --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
OnError on AppModel
Hi I have this strange behaviour that I can't to understand. I would try to use the onError callback function. Now If i set the onError function inside a model it works fine. If I set the onError function inside AppModel It doesn't work. Is it someone can help me about 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Problem about data modelling in CAKEPHP
Hi I have a problem about modelling data of my application and I don't know how resolve it. I present my situation: My E-R is __ _ | | N/\M || | Document | \>| DocumentField | |___ __| \ / |__| \/ Now in the relation HABTM with Document and DocumentField I have the attribute "value". The relational mode is: Document: id , title , created DocumentField: id,name , type( it is the type of the field , It can be a string , a text , a datetime,a url, a number) , created The HABTM relation is: id, document_id , document_field_id , value (the value of the field in the document) Now my problem is how manage the attribute "value" in Mysql because it can be a datetime , a varchar , a longtext.lo If I have more attribute , every which its type (like value_datetime, value_text, value_varchar) I have many and many attribute that are null (every record has a single attribute with value the other are null). If I have a single attribute with for example type longtext I have a very confused and unmanageable situation Has anyone any suggestions? I hope someone can help me about this. 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How manage XSLT with cakePHP
Hi I have to manage some xml that have an xsl associated. What is the best way to manage xsl in cakephp? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Model with Dynamic Data Fields
Hi My problem is about the project of the models of my web application I have a model Document . The problem is that this model must have dinamic data fields. A document can have like fields : title .text , data Another can have : title, number , attachment ect... This fields can have different type: some can be simple string, other can be file , other can be text . Substantially for the moment I have create only the model Document but I've no idea how to handle everything else I really hope that someone can help me 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CakePHP and web deployment with CAPISTANO
Hi I would use CAPISTRANO for web deployment of my cakephp application. I have a big doubt about this. The doubt is about how manage js and css minify and compress between development enviroment and production enviroment? Pratically I have that each view has his js scripts and his css scripts (for example if I use a particular JsQuery in the view I must load in the view the relative script and the associated css ). I shold automatically edit the code of the view in the passagefrom development to production and I think that it's very impossible. I would ask to someone with more experience how he manages the passage of js and css with minify and compression from development to production? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Question about Error handling
Hi I would to do a centralized system to manage error in production in my application. For the moment I manage cake error with app_error.php I manage php error inside boostrap.php I manage database error inside onError in model I would make a single script from which manage all errors so if I would log and mail errors I must change only a php scripts. My question is where I must place this script and how can I include this script automatically? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How manage triple relation between Model in CAKEPHP?
Hi I have three model that have a triple relation between them. How can I manage this triple relation between Model in CAKEPHP? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Question about how manage particular data in session
Hi I have a web application with has many services. Now user has a main page from that he can access to every services. Now I keep the value of service_id inside the session. My problem is that the user can have many services opened simultaneously (every service in a different tab ) so when the user opens a new service I lost the service_id in session relative to the last opened tab if I set the Security.level to high I resolve the problem but I lost the possibility to make some ajax call simultaneously. How can I resolve 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Add "created" field to HABTM join tables
Hi I have added "created" field to HABTM join tables, but when I try to do a save I noted that this field aren't updated automatically. Is it normal or that is some problem? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
problem with use of unique attribute in HABTM
Hi I use the unique attribute in a HABTM relation. Now If it's true (default value) cake should first delete existing relationship records in the foreign keys table before inserting new ones, when updating a record. Instead I noted that it happens only if in updating operation I have the data relative to HABTM there is empty instead if I pass a data relative to HABTM relation to save I can noted that no delete operations are executed. Also I have noted that when the data relative to HABTM there is empty CAKE do a fictitious INSERT operation with the associationForeignKey set to 0 but it isn't correct. Can someone help me about this? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Web statistics with CAKEPHP
Hi I have a web application with CakePHP I would have some statistics about the use of web application. It is not enough use the log file of the web server because I would store the id of the logged user. I would ask if exist an existing system in CakePHP to do it? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Architectural question on integration of external application in CakePHP
Hi I have my application in CakePHP. My application only manages users and services. More precisely I have some registered users and I have some services. With CakePHP I manage which users can access certain services and which can not. For the moment all services are made in cakephp so the management is simple Now my client would add a Wiki between services. The client would use Mediawiki. Now I have 2 problem 1) I must manage the access to mediawiki automatically from my application without login operation. 2) How to join or integrate databases of Mediawiki and CakePHP application so that the management of users could be simultaneously and automatically on both databases of the two applications I think that it is a thing that can happen often and have a best practice could be useful. 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Exists a Ticket System made in CakePHP
I have my web application in Cakephp. It has his registered users . Now I would add a ticket system on my application only for registered users. I have searched a ticket system made in Cakephp but I haven't found anything. Is there someone that has found something made in Cakephp? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Using error message like ALT of an image
I would use the error message form a data validation like ALT of an image but I can't to understand ho can I do it? Has somebody a idea to o it? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CakeSession error with memcache
Hi I try to use memcache for save sessions in a CakePHP application. I install memcache,all works fine also the php sessions. Now in my CakePHP application I set in core.php this: Configure::write('Session.save', 'php'); Now I try to use the Session component in my application but I get these errors in SessionComponent Object ( [__active] => 1 [__started] => 1 [__bare] => 0 [valid] => 1 [error] => Array ( [2] => Config doesn't exist [1] => Session is valid ) ... ) And the session doesn't work Can someone help me? Is it something wrong in configuration? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Prohibit saving of some fields
Hi I would prohibit saving of some fields that in my edit action in a controller . I try with $this->Security->disabledFields = array('.); but it doesn't work. I have seen that I can set in save method which fields save but I have many fields so if i can set which field not save it's better for me. Is it possible? Another question What is the use of "$this->Security->disabledFields"? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Exists a solution for use session.security high and ajax?
Hi I have a web application where I would use session.security at higt level but it uses ajax call. Is it possible to have both things working togheter? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Memcache and CakePHP Session
Hi I would use Memcache to save the php session. I have installed memcached on my system and I have configured it. I have set in php.ini the session's handler to memcache . I try to use a session in a simple php script and all works fine. But when I try to use the session in CakePHP the session doesn't work. If I set the php session's handler on file the CakePHP session works if it is set on memcache the CakePHP session doesn't work In core.php I have: Configure::write('Session.save', 'php'); Am I wrong something? Can someone with a bit of experience help me? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Sharing CAKEPHP Session with external app on a different virtual host
My question is this? How can I sharing CAKEPHP Session with external app on a different virtual host? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CAkePHP and an external application
Hi I have this partocoular situation. I have a CAKEPHP application in a certainly virtual host of my server In another virtual host I have a normal php application. Now in this application I have the need to access to the CAKEPHP session of first application. Is it possible to do a thing like this? if it is how can I do it? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
simpleSAML and CAKEPHP
Is it someone that use simpleSAML with CAKEPHP? I have some questions about 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Ajax reload of an element.
Hi I have a page where I have an element (with params) that is a list of items. Now I would that when user click on a certain button the element is reload . I would make this with ajax. How can I do the ajax reload of an element? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Localization with multiple file
Hi Perhaps thi is a banal question I would have more than one for the localization (one for validation message,one for name of fields etc...). I try to use in locale multiple files over default.po but I get no good results. How I can do this? Must I configure cake in some way? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
MI-BASE documentation
Hi I very interesting to use the MI-BASE like the base for my projects. Is it some documentation for speed up the use of mi-base behaviours,helpers, components etc.? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Multiple upload field in a model with AD7six Upload Behaviour
My question is: If in a model I have many image fields and many upload field how can I set the model to permit the use of AD7six Upload Behaviour with all these fields? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Error with use Upload Behaviour of MI-BASE
Hi I try to use the upload and image_upload behaviour of MI-BASE project for add field photo to user model My code is: In model var $actsAs= array( 'ImageUpload' => array( 'fileField' => 'photo', 'allowedMime' => array('image/jpeg', 'image/gif', 'image/ png','image/bmp'), 'allowedExt' => array('jpeg', 'jpg', 'gif', 'png', 'bmp'), 'baseDir' => '{APP}uploads', 'mustUploadFile' => false, 'overwriteExisting' => true, 'version' =>array() ) ); In controller: $this->data['User']['foreign_id']=$id; $this->data['User']['dir']='users'; $this->data['User']['class']='users'; if ($this->User->save($this->data)) { . } By I get these errors: Notice (8): Undefined variable: field [APP\models\behaviors \upload.php, line 524] Notice (8): Undefined index: [APP\models\behaviors\upload.php, line 524] Warning (2):mkdir() [function.mkdir]: No such file or directory [CORE \cake\libs\folder.php, line 465] Is configuration wrong? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Question on MI-Base project
Hi I would use MI-Base for my application. I have a question about it 1)I have different databases (one for my application (for example a blog ) and one where there is saved the user's data (legacy application) ). How can I manage a situation like 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Best way to organize CSS and JS
Hi I must to make a big application in CAKEPHP.(Like a multiservice platform). Before to start the develop I would ask what is the best way to organize the CSS and the javascript for a big application? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Pagination with POST data
I have seen from manual that I can pass arguments to paginator functions with $paginator->options(array('url' => .)); Now with this I arguments pass via GET. How can I do If I would pass arguments via POST. 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CakePHP Session and external application
Hi I have a mediawiki and a cakephp application. Now I would make that a user that is logged on my application can automatically access on wiki. So I use the API of the wiki to make login and then I set the cookie for the wiki. But then in this way I lost the cookie relative for my cakephp application. I read that if your CakePHP app and my regular PHP app are not using the same session ID, of course I am going to lose my session. How can I do to have the same session ID for both applications (cakephp application and wiki)? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
How avoid some filter conditions
Hi I have this situation. I have create an action in my controller where I can do search on a model (search on every field of my model). Now I have that I would that some field must be except from conditions. Is better if I do the filtering on the conditions on a method of the model or with a component where I pass the avoid fields to control in conditions? 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---