Re: newb database settings save
If u wan to save the configure settings, simply added it as a array with proper index for eg. $data['Settings']['val'] and pass that $data var to the save function. no need to save the field seperately. On Wednesday, August 22, 2012 1:16:28 AM UTC+5:30, cyboman wrote: I'm trying to add a settings panel in the admin section of a cakephp build. I've been following this: http://bakery.cakephp.org/articles/iamcam/2008/10/26/simply-storing-config-values-in-the-db . -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: Barcode
There was a image class which did barcodes... I'm sure there are a few out there :) Then you just insert that image into the HTML and use wktohtmltopdf. There is a ExcellCSV class as well, and an existing helper which needs to be modified but it's all there :) Sorry I can't remember names but I have done it on previous projects and it was just a matter of writing or extending existing components and helpers! On 21 August 2012 16:15, Mr. Manager lyda...@gmail.com wrote: Dear All, I am developing application, billing system, with this application I need to function with barcode on invoice, print pdf / print preview and export query data to *.xls format. Anyone has an idea please help me. This is urgent. Sincerely Your, Mr. Manager, -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US. -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: HABTM pagination
Hi, I've tried it myself and it seems to work. But again I am not exactly sure what you are trying to archive. Can you be more precise in stating what doesn't work? I might actually just run into this issue sooner or later if it doesn't work :) /albums/index/page:2/limit:3 and album.id = 08b54ca4-eb87-11e1-ba1c-080027796c4c returns good results: array( (int) 0 = array( 'Gallery' = array( 'id' = '1eb4f5d6-eb87-11e1-ba1c-080027796c4c', 'name' = 'gallery 4' ), 'Album' = array( (int) 0 = array( 'id' = '08b54ca4-eb87-11e1-ba1c-080027796c4c', 'name' = 'album 1' ) ) ) ) Here is the sample data I am using 08b54ca4-eb87-11e1-ba1c-080027796c4c album 1 08b54ee8-eb87-11e1-ba1c-080027796c4c album 2 0fba2b5a-eb87-11e1-ba1c-080027796c4c album 3 0fba2cb8-eb87-11e1-ba1c-080027796c4c album 4 1b100d80-eb87-11e1-ba1c-080027796c4c gallery 1 1b100f7e-eb87-11e1-ba1c-080027796c4c gallery 2 1eb4f46e-eb87-11e1-ba1c-080027796c4c gallery 3 1eb4f5d6-eb87-11e1-ba1c-080027796c4c gallery 4 album / gallery 08b54ca4-eb87-11e1-ba1c-080027796c4c 1b100d80-eb87-11e1-ba1c-080027796c4c 08b54ca4-eb87-11e1-ba1c-080027796c4c 1b100f7e-eb87-11e1-ba1c-080027796c4c 08b54ca4-eb87-11e1-ba1c-080027796c4c 1eb4f46e-eb87-11e1-ba1c-080027796c4c 08b54ca4-eb87-11e1-ba1c-080027796c4c 1eb4f5d6-eb87-11e1-ba1c-080027796c4c Cheers, Remy On Tue, Aug 21, 2012 at 6:02 PM, André Luis cavall...@live.com wrote: Thanks Remy, but it worked in previous version of CakePHP, but now doesnt work anymore... Em terça-feira, 21 de agosto de 2012 09h15min50s UTC-3, remy escreveu: Hi there, Have you looked at this post: http://cakebaker.42dh.com/**2007/10/17/pagination-of-data-** from-a-habtm-relationship/http://cakebaker.42dh.com/2007/10/17/pagination-of-data-from-a-habtm-relationship/ That would translate into this for you, if I'm guessing it right: ? // app/controllers/albums_**controller.php class AlbumsController extends AppController { public $paginate = array( 'Gallery' = array('limit' = 4, 'joins' = array( array( 'table' = 'albums_galleries', 'alias' = 'GalleriesAlbum', 'type' = 'inner', 'conditions'= array('GalleriesAlbum.gallery_**id = Gallery.id') ), array( 'table' = 'albums', 'alias' = 'Albums', 'type' = 'inner', 'conditions'= array( 'Albums.id = GalleriesAlbum.album_id', 'Albums.id' = '1' ) ; public function index() { $data = $this-paginate('Gallery'); debug($data); exit; } } Cheers, On Mon, Aug 20, 2012 at 6:53 PM, André Luis cava...@live.com wrote: Hi people, i´ve searched for it but I didnt find anything wich really works. I have some Albums, wich the model is Album, and Album HABTM Gallery, so a gallery can be visible in more than one album. It works fine, BUT i need to create a pagination for galleries, and all that i´ve found here didnt work for me. What i need is to use a specific Album to paginate a gallery. Is that possible? and how can be done? Thanks! -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake...@googlegroups.com. To unsubscribe from this group, send email to cake-php+u...@** googlegroups.com. Visit this group at http://groups.google.com/**group/cake-php?hl=en-UShttp://groups.google.com/group/cake-php?hl=en-US . -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US. -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
HABTM merge with current values
I Have a HABTM relationship. Listing HABTM User Listing belongsto User - User can create listings, so the lists are owned by them, but also can assign those lists to another users. - Users have access to lists created by them, or assigned by their parents. - The system is recursive. A user can assign a list to its children users. So the children users can assign the same list assined to them to its chieldren and so on. - 'unique' index in habtm is currently set to 'keepExisting' The problem is, the listing edit form displays only available listings for current user, so as i'm using habtm and habtm erases the content of related table that is not submited by the form and the form does not display the lists assigned to another users, everytime a users submit and update to the listing, all other users lose access to this listing, even if this listing was assigned by another user or the user is not in the same user tree. *The behaviour I was expecting was: The habtm delete the fields not checked in the form, but keep the fields not present in the form.* * * I probably need to set it to true, so the values will be erased and merge the selected values in the form with the ones already present in the habtm association table (listings_usershttp://localhost/phpmyadmin/sql.php?db=smstoken=f861bf51ec623afd93ee893192a20fb5table=listings_userspos=0) that i could retrieve with a find, but i couldnt figure out how to write that in a cake way. *2.x Manual:* unique: boolean or string keepExisting. If true (default value) cake will first delete existing relationship records in the foreign keys table before inserting new ones. Existing associations need to be passed again when updating. When false, cake will insert the relationship record, and that no join records are deleted during a save operation. *When set to keepExisting, the behavior is similar to true, but existing associations are not deleted.* * * PS: I created the model named listing, because list is a php reserved word. -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
configure subdomains with cakephp
I am creating a subdomain chat.sitio.com but I do not understand why the error occurs internarl I've been checking the htaccess and it seems I have to put in the. htaccess directory the sigueinte chat lines to choose not by rewrite IfModule mod_rewrite.c RewriteEngine off / IfModule but still not working .. someone could guide me if I have to put a line in the htaccess in the site root cake IfModule mod_rewrite.c RewriteEngine on RewriteRule ^ $ app / webroot / [L] RewriteRule (. *) App / webroot / $ 1 [L] / IfModule I hope I can help thanks regards -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Bcrypt Authenticate plugin
I'm working on a bcrypt based authentication plugin: https://github.com/TiuTalk/BcryptAuthenticate So far, i've created an Utility class that will be used to hash check the user password. I just wanted to hear from you guys if i'm on the right track or maybe should I change something before starting to work on the components? My intention is to create a BcryptAuth component where you can configure the hashing cost. I would love to hear from you all before goin any deep into this. Regards, -- ***Thiago Belem* Desenvolvedor Rio de Janeiro - RJ - Brasil *Assando Sites* - Curso online de *CakePHP* assando-sites.com.br http://goo.gl/b1EEd thiagobelem.net cont...@thiagobelem.net *Skype / gTalk **»* thiago.belem.web *LinkedIn* *»* br.linkedin.com/in/thiagobelem/pt -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: Bcrypt Authenticate plugin
Before you do to much, CakePHP 2.3 will support Bcrypt! http://book.cakephp.org/2.0/en/appendices/2-3-migration-guide.html#security Might be worth checking out the 2.3 source. On Thu, Aug 23, 2012 at 7:17 AM, Thiago Belem cont...@thiagobelem.net wrote: I'm working on a bcrypt based authentication plugin: https://github.com/TiuTalk/BcryptAuthenticate So far, i've created an Utility class that will be used to hash check the user password. I just wanted to hear from you guys if i'm on the right track or maybe should I change something before starting to work on the components? My intention is to create a BcryptAuth component where you can configure the hashing cost. I would love to hear from you all before goin any deep into this. Regards, -- Thiago Belem Desenvolvedor Rio de Janeiro - RJ - Brasil Assando Sites - Curso online de CakePHP assando-sites.com.br thiagobelem.net cont...@thiagobelem.net Skype / gTalk » thiago.belem.web LinkedIn » br.linkedin.com/in/thiagobelem/pt -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US. -- Simon Males -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: configure subdomains with cakephp
Thank u so much. I will try now. Thanks for your help again. Best Regards 2012/8/23 Ogalav omar...@gmail.com I am creating a subdomain chat.sitio.com but I do not understand why the error occurs internarl I've been checking the htaccess and it seems I have to put in the. htaccess directory the sigueinte chat lines to choose not by rewrite IfModule mod_rewrite.c RewriteEngine off / IfModule but still not working .. someone could guide me if I have to put a line in the htaccess in the site root cake IfModule mod_rewrite.c RewriteEngine on RewriteRule ^ $ app / webroot / [L] RewriteRule (. *) App / webroot / $ 1 [L] / IfModule I hope I can help thanks regards -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US. -- Dám nghĩ, dám làm +84 93 26 26 007 -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: CakePdf - How To Start?
I think the issue is I have been trying parts from both of the CakePdf functions out there. I am going to try this from scratch on a new project and see what happens. 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: CakePdf - How To Start?
On a brand new app I have uploaded the plugin and I set the bootstrap config line to: CakePlugin::load('CakePdf', array('bootstrap' = true, 'routes' = true)); Reloading the page and I get this error: *Fatal error*: Call to undefined method Router::setExtensions() in * /home/village/public_html/app/Plugin/CakePdf/Config/routes.php* on line *7 * -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: CakePdf - How To Start?
I changed CakePlugin::load('CakePdf', array('bootstrap' = true, 'routes' = true)); to CakePlugin::load('CakePdf', array('bootstrap' = true)); and the error is gone however I still am not getting a PDF. I forgot to mention I have created the layout in /app/View/Layout/pdf/default.ctp and am trying to go to /reports/snapshots.pdf where I get this error now: *Error: * The action *snapshots.pdf* is not defined in controller * ReportsController* I think I am still missing the configuration, what is a sample of this so I can get it setup properly. ** *Thankyou * -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: Bcrypt Authenticate plugin
Oh gosh.. I've almost reinvented the wheel :P I've already updated my project to use the native blowfish algo, thank you! :) -- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: CakePdf - How To Start?
I since have setup the routes.php line of Router::parseExtensions( 'pdf'); The error I am getting now is: *Notice* (8): Undefined variable: res [*APP/Plugin/CakePdf/Vendor/dompdf/lib/class.pdf.php*, line *1413*] I assume this is a config setting? -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
Re: Barcode
Hi. Use the CakePdf Plugin https://github.com/ceeram/CakePdf. It is a front-end for: - DomPdf - Mpdf - Tcpdf - Wkhtmltopdf This way you will be able to generate the pdf files and also the barcodes. Most pdf engines generate barcodes as core functionality. I have personally used Tcpdf for barcode generation. It is easy, just check the engine documentation. This plugin is for Cake (= 2). I suggest using Wkhtmltopdf as an engine, but you should check if it generates barcodes (it should). Ask again if any problems. Regards, Borislav. On Tuesday, 21 August 2012 11:15:07 UTC+3, Mr. Manager wrote: Dear All, I am developing application, billing system, with this application I need to function with barcode on invoice, print pdf / print preview and export query data to *.xls format. Anyone has an idea please help me. This is urgent. Sincerely Your, Mr. Manager, -- 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. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.