Re: Console/cake schema pitfalls ?
Have you considered using the Migrations plugin from CakeDC? https://github.com/CakeDC/migrations It handles the actual changes, rather than having a 'full' copy as schemas do. I think the issue you are seeing is more about the datasource definition, as that is where it gives the datatype to general type definitions ... for example: public $columns = array( 'primary_key' = array('name' = 'IDENTITY (1, 1) NOT NULL'), 'string' = array('name' = 'varchar', 'limit' = '255'), 'text' = array('name' = 'text'), 'integer' = array('name' = 'int', 'formatter' = 'intval'), 'float' = array('name' = 'numeric', 'formatter' = 'floatval'), 'datetime' = array('name' = 'datetime', 'format' = 'Y-m-d H:i:s', 'formatter' = 'date'), 'timestamp' = array('name' = 'timestamp', 'format' = 'Y-m-d H:i:s', 'formatter' = 'date'), 'time' = array('name' = 'datetime', 'format' = 'H:i:s', 'formatter' = 'date'), 'date' = array('name' = 'datetime', 'format' = 'Y-m-d', 'formatter' = 'date'), 'binary' = array('name' = 'image'), 'boolean' = array('name' = 'bit') ); That is from the sqlsrv.php datasource, so it really only uses those and then converts back and forth. This allows you to write your migration / schema in mysql, but I can instantiate it in mssql. If you start messing with this, it could be more problematic! Thanks, Vincent On Monday, March 24, 2014 8:28:30 AM UTC-4, Thomas von Hassel wrote: Last time i tried to use Console/cake schema (early days 2.x) to mange my databases and their changes, there were some issues with field types. (i'm sorry but i forgot what exactly was the problem) Are there any pitfalls today ? ... and is this functionality going to make it into 3.0 ? /thomas -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Where are the sites?
Jose, Awesome list of sites - most of these I would have never known were CakePHP. There are only a few that have the tagline telling you it was built in Cake. Definitely nice to see some sites that are using it. Dave (Advantage+), I can't speak for everyone, but most of the sites that are developed by my team in CakePHP are not publicly available. The main www.cakephp.org has a listing of some sites that are built with CakePHP, and I have seen some from time to time advertised here. Unfortunately, most people here are here to get information around problems they are having, or to help others with problems that they are having. Most of us don't necessarily come here for validation of our sites. Vinnie On Sunday, August 18, 2013 5:00:08 PM UTC-4, José Lorenzo wrote: I know I'm feeding the trolls, but here you have a short list of good looking pages, have fun looking at the CSS and HTML http://www.zumba.com http://theoatmeal.com http://billabonggirls-usa.com http://www.blendtec.com http://www.missuniverse.com http://getcrowdit.com/ http://www.mountago.com/ http://www.traffick911.com/ http://www.festiwalmtv.pl/ http://expresshyundai.com/ http://www.calzedonia.it/ http://www.cipherprime.com/games/auditorium On Saturday, August 17, 2013 11:16:06 PM UTC+2, advantage+ wrote: Just a curiosity question. So many people are part of the Cake group yet we never see any actual work. No hey check out my site I did this, very little showcase. Sure on the Cake home page there are 5 sites which have been there for a year. Really? And they suck ass! Ni real design just half assed crap! I took a look at cakeDc site and what a joke! Ugliest site ever who did that? Sure code all you li9ke but you still need to appeal to the end user. Hello 1997 html my first web page look. Only thing missing is a animated gif!. For such a great framework why is there a lack luster amount of sites? *Dave Maharaj* *Freelance Designer | Developer* [image: Description: header_logo] www.movepixels.com | d...@movepixels.com | 709.800.0852 -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
Re: Broken Sessions When Using Firebug in CakePHP 2.3
You may want to set checkAgent = false, as Firefox will present as one User Agent but then FireBug could show up as a different User Agent. The default is true, and if the user agent changes with the same session key will break the session - I believe. Thanks, Vinnie -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: CakePHP and Twitter Bootstrap
We use SlyWalker's implementation and it is spot on - and adds the ability to use their templates for baking. 100% better than the other solutions I have tried. On Thursday, January 17, 2013 12:07:35 AM UTC-5, Salar Rahmanian wrote: I am using this and it works perfectly : https://github.com/slywalker/TwitterBootstrap I highly recommend it. On Monday, January 14, 2013 11:46:22 PM UTC-5, Chad wrote: I am fairly new with cakePHP too so I thought I would use a plugin like BootstrapCake for setting up Bootstrap. It was a mistake. BootstrapCake is not a very good implementation and there are a lot of issues with it. I spent a lot of time fixing the templates and troubleshooting what it did not include (it didn't include the correct css files, js files, or jquery). My best advice is to set it up yourself. I've learned now that it is really quite simple to set up Bootstrap on CakePHP and you will learn a lot about CakePHP in doing it. Follow a tutorial like this to help: http://thehappydeveloper.wordpress.com/2012/02/24/setting-up-twitter-bootstrap-with-cakephp/ Chad On Monday, January 14, 2013 11:45:33 AM UTC-8, Maximilian Schafzahl wrote: Hallo I only want to use the bootstrap framework to style my cakephp app. What's the easiest way to do this? I tried https://github.com/visionred/BootstrapCake but I cannot install it (console tells me that it cant find the plugin, bake works and paths seem right) and https://github.com/nodesagency/Platform-Twitter-Bootstrap . What would you prefer? I'm new to cake so please tell me your experiences with cakephp and theming (especially bootstrap). Thanks. Max. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/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. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: CAKEPHP 2.1.x on Pagodabox | foreach multiple items for each slide (bootstrap carousel)
Sven - It's not super elegant but you could use a straight for loop and just do some simple calculations to determine when you have done the third loop. Since I am not doing anything like yours, and don't have the full code there is no way for me to test. However, I believe I have walked the logic in my head a couple of times. Please let me know if this works... ?php // Get the total number of ads available in the incoming query $adsAvailable = count($ads); $adCount = 0; for ( $i = 0; $i = ($adsAvailable - 1); $i++ ) { // Get the number of ads available - we substract the loop counter from the total // ads available. Remembering that arrays are 0 indexed so we subtract 1 from // the overall count if ($i === 0) { ? div class=item active ?php } $adsLeft = ($adsAvailable - 1) - $i; ? a class=adshref href=//?php echo $ads[$i]['Ad']['link']??php echo $$ads[$i]['Ad']['title']?/abr span class=adslink?php echo $ads[$i]['Ad']['link']?/spanbr span class=adsbody?php echo $ads[$i]['Ad']['body']?/spanbr ?php if (($adCount % 2) == 0) { // This is a final in a triple ad so we need to close out the current div ? /div ?php if ($adsLeft 0) { // Reset the ad counter $adCount = 0; // Open the next item ? div class=item ?php } } } ? Thanks, Vinnie On Tuesday, January 1, 2013 3:32:41 PM UTC-5, SvenP wrote: Everything from the source is there, like I said, everything works as expected. If I remove the if($indexValue == 0) exception then I first get a blank slide and then the other Ads in slides. Now I want to change the code to display 3 Ads in each slide. Op 1-jan.-2013, om 21:05 heeft lowpass zijn.d...@gmail.com javascript: het volgende geschreven: But are you only trusting what the browser displays? Are the other elements there in the source? What do you see when you disable javascript? What about when you remove the active class? On Tue, Jan 1, 2013 at 2:10 PM, Sven Pype sv...@dskbvba.be javascript: wrote: Hi, The whole thing works perfectly and shows 1 ad for each slide. My goal is to have 3 ads from the db in 1 slide... I can't find a solution for it whit a foreach loop... Thanks anyway. Sven On Tue, Jan 1, 2013 at 8:05 PM, lowpass zijn.d...@gmail.com javascript: wrote: Is it possible that the other divs are being generated, but are hidden? What do the item active class rules look like? Or maybe some JS is keeping the others from displaying? Try disabling the carousel activation code. On Sun, Dec 30, 2012 at 1:55 PM, SvenP sv...@dskbvba.be javascript: wrote: Yes, Each ad relates to a sponsor... works perfect. array( (int) 0 = array( 'Ad' = array( 'id' = '2', 'sponsor_id' = '0', 'title' = '...', 'body' = '...', 'link' = 'wwwcom' ), 'Sponsor' = array( 'id' = '8', 'name' = ..., 'contact_first_name' = ..., 'contact_name' = ..., 'contact_tel' = ..., 'contact_email' = ... ) ), On Sunday, December 30, 2012 7:20:54 PM UTC+1, cricket wrote: die(debug($ads)); Are you certain of the array structure? On Sat, Dec 29, 2012 at 5:39 PM, SvenP sv...@dskbvba.be wrote: Hi, I'm looking for a way to show multiple 'Ads' / slide with a foreach loop from the db. ( each client has ads tied to them.) My code now works great but only shows one ad / slide. Thanks for your time! Sven Code: ___ div class=carousel-inner ?php foreach ($ads as $indexValue = $ad): if($indexValue == 0){? div class=item active a class=adshref href=//?php echo $ad['Ad']['link']??php echo $ad['Ad']['title']?/abr span class=adslink?php echo $ad['Ad']['link']?/spanbr span class=adsbody?php echo $ad['Ad']['body']?/spanbr/div?php } else { ? div class=item a class=adshref href=//?php echo $ad['Ad']['link']??php echo $ad['Ad']['title']?/abr span class=adslink?php echo $ad['Ad']['link']?/spanbr span class=adsbody?php echo $ad['Ad']['body']?/spanbr/div ?php } endforeach; ? /div -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake...@googlegroups.comjavascript: . To unsubscribe from this group, send email to
Re: What's the best way to get Twitter Bootstrap into Cake?
I would say the best plugin I have used by far is http://plugins.cakephp.org/package/slywalker/TwitterBootstrap. We are actually using it at our development shop, and have that it handles overriding the bake skeletons, and extending all of the core html, form, and pagination classes. You still need to download the latest bootstrap, and then replace the default.ctp with the bootstrap.ctp from the plugin. If you do replace the default with bootstrap, you will need to remember to remove the $layout = 'bootstrap' from the baked controllers. Vinnie On Sunday, December 16, 2012 10:22:01 PM UTC-5, Greg wrote: 1) throw out the default cake css file...you wont need it 2) load up the twitter bootstrap CSS files 3) modify the layout and the views to comply with twitter bootstrap's way of doing things. There are a number of things which help you out with respect to this. Here are a couple which spring to mind * Pagination helper - currentClass (2.1) and currentTag (2.3) options * FormHelper::inputDefaults (2.2) to globablly set form helper defaults You can also go away and hack the skeleton files so that baked code works properly with bs out of the box. On Wed, Dec 12, 2012 at 2:36 AM, Devario Johnson devar...@gmail.comjavascript: wrote: Ive used this in the past and it worked well http://blog.loadsys.com/2012/02/14/cakephp-20-and-twitter-bootstrap/ https://github.com/loadsys/twitter-bootstrap-helper On Thursday, December 6, 2012 3:17:53 AM UTC-5, Lourenzo Ferreira wrote: I've seen several Plugins and even forks to use Twitter's Bootstrap CSS Framework with Cake. Which you would say it's the best? Thank you -- Lourenzo Ferreira -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake...@googlegroups.comjavascript: . To unsubscribe from this group, send email to cake-php+u...@googlegroups.com javascript:. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/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. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: PHPUnit ACL - Pulling hair out...
Here is my UsersControllerTest (UsersControllerTest.phphttp://pastebin.com/download.php?i=z7u2cKUX ) Thanks, Vinnie On Wednesday, June 27, 2012 9:48:59 PM UTC-4, José Lorenzo wrote: How are you loading your fixtures? can you past your test case? On Wednesday, June 27, 2012 7:50:37 PM UTC-4:30, SpazzyV wrote: So, I have recently forayed into using CakePHP after a long departure due to the problems I encountered with 1.3. I have gotten into 2.1.3, and am really enjoying developing with it. However, I am pulling my hair out trying to be a good developer and write good unit tests for my controllers and models. I have worked through a lot of the issues, one at a time but can't seem to get past this ACL issue. I have a fully developed suite of tests, but the edit tests seem to be failing with this error: AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = User [Aro0.foreign_key] = 1 ) I have included a link to a pastebin of the fixtures I created for Nodes. I know that ACL is being testing by the core components, so I am wondering how to either disable ACL (probably not the best idea) for my tests or set my tests so they work correctly. Any help that you all may provide would be greatly appreciated! Thanks, Vinnie ARO, ACO, and ACO_ARO Fixtureshttp://pastebin.com/download.php?i=8rQUt8A1 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
PHPUnit ACL - Pulling hair out...
So, I have recently forayed into using CakePHP after a long departure due to the problems I encountered with 1.3. I have gotten into 2.1.3, and am really enjoying developing with it. However, I am pulling my hair out trying to be a good developer and write good unit tests for my controllers and models. I have worked through a lot of the issues, one at a time but can't seem to get past this ACL issue. I have a fully developed suite of tests, but the edit tests seem to be failing with this error: AclNode::node() - Couldn't find Aro node identified by Array ( [Aro0.model] = User [Aro0.foreign_key] = 1 ) I have included a link to a pastebin of the fixtures I created for Nodes. I know that ACL is being testing by the core components, so I am wondering how to either disable ACL (probably not the best idea) for my tests or set my tests so they work correctly. Any help that you all may provide would be greatly appreciated! Thanks, Vinnie ARO, ACO, and ACO_ARO Fixtures http://pastebin.com/download.php?i=8rQUt8A1 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Modules
Also, if we are adding functionality to a plug-in, or fixing something that doesn't quite work. We should probably committing that code back with the owner of the plug-in. Considering most plug-in developers are scratching their own itch, and not necessarily doing a market needs assessment to determine how they could make the plug-in more robust, it would be a nice way for us to 'pay' for the use of the code that does fit our needs by committing additional things back to the original. This would also mitigate the need to try and manually incorporate changes from the main line of code when they do release thing. Vinnie On Friday, June 22, 2012 6:39:50 AM UTC-4, Ratty wrote: On 22/06/12 04:03, Jamie wrote: On Thursday, June 21, 2012 9:23:44 AM UTC-7, Ratty wrote: You should not be changing any plugin code anyway. That's why they are plugins... You update them straight from github when you need to. If you want to modify the behaviour of a plugin model for example then you can extend it in your own model and override the functions you need to change. You should not be copying the plugin into your application and modifying it which is, I think, what you are suggesting ? I think that's poor advice. If I download a third party plugin that's not part of the Cake core, of course I'm going to modify it to suit my needs. There's absolutely nothing wrong with that. If you need to change a plugin, then change it. The only code that most people shouldn't be messing with is the core, though if you know what you're doing and you're careful, that's not a sin either. Remember, at the end of the day, the code works for you - not the other way around. - Jamie -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. Well as long as you are happy to change it again and again every time they fix bugs and re-release the plugin then that's fine. Personally, I would rather install it and have it working in a couple of minutes rather than remembering how I modified it last time. Steve. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: Auth on global actions in the app_controller
I believe this is the case because Authentication works on the controllers that we develop, and not on the included app_controller. Since you placed the items in app_controller, then they do not have to be specifically allowed but are part of 'superior' class if you will. If not, then Authentication would be a mess and you would have to add all the functions built into the provided app_controller into your authentication scheme. Which would make the task overly cumbersome. -Vinnie On Aug 3, 6:56 am, StevieL ste.lat...@gmail.com wrote: Hi, I had a couple of simple actions that I needed to use in each of the controllers in my application. I decided to plonk them into app_controller and it all works fine (just how it describes in the book). Now, within my actions (in my controllers) i can simply access these new global functions with $this-NewGlobalFunctionName(VariableName). All was well until I got thinking, as my app is using Auth - how are these global actions even working when i have put no rules in to allow them. i have for example: - $group-id = 3; // deny all controllers $this-Acl-deny($group, 'controllers') // allow certain actions $this-Acl-allow($group, 'controllers/users/myprofile'); .. etc ... Auth is definitely tested working fine for the rest of the app. Why is it that these functions in /app/app_controller.php can be run without Auth preventing it and without me needing to add a $this-Acl-allow rule for them? my AppController looks like this: - class AppController extends Controller { var $components = array('Acl', 'Auth', 'Session'); var $helpers = array('Html', 'Form', 'Session', 'Javascript', 'Time'); function beforeFilter() { //Configure AuthComponent $this-Auth-actionPath = 'controllers/'; $this-Auth-allowedActions = array('display'); $this-Auth-authorize = 'actions'; $this-Auth-loginAction = array('controller' = 'users', 'action' = 'login'); $this-Auth-logoutRedirect = array('controller' = 'users', 'action' = 'login'); $this-Auth-loginRedirect = array('controller' = 'users', 'action' = 'myprofile'); } function NewGlobalFunctionName($id) { // Include a model $this-loadModel('ModelName'); .. function code here ... return something; } } Thanks, Steve -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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
Re: ACL login - forward to some kind of main-menue site?
I believe that you would place the $this-Auth- loginRedirect(array('controller' = 'controller_name', 'action' = 'action_name', $options)); in your the controller that is responsible for your Authentication. This would force a login redirect after a successful login. The only time this does not effectively work is if the visitor is coming to a link to somewhere in your site as CakePHP keeps that information for sending the user to their requested location. If you wanted to force a user to go to this main-menue-site no matter what, you could add $this-Auth-autoRedirect = false; to the beforeFilter of the controller responsible for your Authentication. I am fairly new myself, but I believe this should work to accomplish what you asked about. -spazzyv On Jul 27, 1:45 pm, mivogtGermanyLU miv...@mivogt.net wrote: .. it's me again seeking some help and advice @ the group I added a very basic ACL to my cake app using the login() inside my users-controller after logging in I would like to get some redirection to a main-menue- site (i.e. ./rootdir/mainmenue.php) how and where to set the code for redirection? Thanks in advance CU Michael -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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