Re: Answering a recurring challenge from clients

2010-02-21 Thread WebbedIT
From my limited experience of Drupal I would say it is a beast of a CMS system which has the most shockingly complex and ugly administration backend. I designed and redesigned an entirely self coded bespoke CMS system for fundraising.co.uk. A few years back he decided he wanted to go open-source

Re: The right way to save updated Database Entry

2010-02-21 Thread WebbedIT
OK, apologies for redirecting you to the cookbook when your initial entry had followed the structure explained on the Saving Your Data page, it's just I have never used the Model-set method to save things so it looked odd to me. You have taken 1. $this-Post-read(null, 1); 2.

Re: Multiple Content Areas

2010-02-21 Thread WebbedIT
@Dr. Loboto Not all pages have two columns, and some may have more in the future so I add columns in my views as needed. Every section of the site has different side content. @Zaky Very deep, and very true. I think RequestAction() deserves to be given a fair crack of the whip, my concern was

Re: Checkbox

2010-02-21 Thread WebbedIT
The form and html helpers d all this for you and neatly pass the data to your controller in a format ready that Model-save() expects. At the bottom of the first section on the following page it gives an overview of creating a multiple select for a HABTM associated table. This includes creating an

Re: Tree Behaviors, Move Functions

2010-02-21 Thread WebbedIT
Are you sure your controller action is executing the $this-Category- moveDown($this-Category-id, abs($delta)); command? 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

(views) Redirect where i came from

2010-02-21 Thread sebb86
Hello, How can i redirect to a view, where i came from? Example: In view A, i click a button which opens the edit view B When the user completes the edit action and clicks on save, i want to redirect to view A. (with refer, the redirect goes to view B :( ) Thanks a lot, if someone can help!

How to set paginate - limit on the fly in my views?

2010-02-21 Thread sebb86
Hello, i'd like to manually set the limit-option on the fly in my views. So, for example, there could be 3 fields with 10, 25 and 50 or a input field to write the number. Thanks a lot if someone can help!!! Check out the new CakePHP Questions site http://cakeqs.org and help others with their

Re: (views) Redirect where i came from

2010-02-21 Thread WebbedIT
$this-redirect(array('action'='view', $this-ModelName-id)); 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

Re: How to set paginate - limit on the fly in my views?

2010-02-21 Thread WebbedIT
paginate expects options to be passed as named parameters, so whichever option you decide to go with you need to be passing somehting like the following back to the controller www.website.com/controller/action/limit:10 other options can be

Re: (views) Redirect where i came from

2010-02-21 Thread sebb86
Hello, thanks, but i know this code. The problem is, that i have to redirect dynamical to the view, where i came from, because you can access some views from many other views. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You

Re: (views) Redirect where i came from

2010-02-21 Thread WebbedIT
Not sure I understand what you want then? It seems perfectly logical that after editing record A to redirect to record A's view. In what situation would you be viewing record A and be able to directly go to edit record B then be taken back to viewing record A. $this-redirect($this-referer())

Re: Extending Component. Error

2010-02-21 Thread John Andersen
Question! What is your component called/named? In the code below, you are using both BorrowEmail and NeighborrowEmail! Enjoy, John On Feb 21, 3:02 am, dtirer dti...@gmail.com wrote: oh sorry, here it is: /**                  * Confirmation email for new basic registration users            

help with some deep relatios

2010-02-21 Thread stefano
Hi i looking for the correct cakephp's way to this This are my models Area hasMany Poll Poll hasMany Answer Institution hasMany Answer Now i need show the Answer group by Poll and Area by a year and and for institutions the output is some like this Result for Instutition.name for the year

Re: CakeFest IV - America - Help us pick a location!

2010-02-21 Thread marcusgoede
New York, Miami or San Francisco! 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

Model not found?

2010-02-21 Thread Thau
Hi, I created a Controller called battles_controller.php and a model called battle.php. There is a function in the model called GetStats. I tried to call this function with: $this-Battle-GetStats(); I got error: Notice (8): Undefined property: BattlesController::$Battle [APP/

HABTM association not being picked up

2010-02-21 Thread belsimon
Hi, I'm working on my first CakePHP site and I've got a problem with caching - I think. My local version of the site works great. Uploaded latest changes to my server and it's not working so great. I've added a HABTM association and the live site isn't picking it up so data isn't being saved /

Re: The right way to save updated Database Entry

2010-02-21 Thread amarradi
Thanks, This way also doesn't work. But why? I tested it in some ways. I dont't know why the reject Action works only with the status field. i should post my sourcecode here of this action. The commented area is the code which allows to set the status free. The problem is, that this code only

Re: (views) Redirect where i came from

2010-02-21 Thread sebb86
Oh sorry, i don't want to edit, i want to add. I create an inventory management. When i'm in view hardware units, it's handy to add (via global drop down menu) a hardware group. This helps me to save time because without that global drop-down, i have to go to view hardware groups, then add once,

Re: HABTM association not being picked up

2010-02-21 Thread John Andersen
Check that your models filenames are all lower-case. Enjoy, John On Feb 21, 5:57 pm, belsimon simonlove...@gmail.com wrote: Hi, I'm working on my first CakePHP site and I've got a problem with caching - I think. My local version of the site works great. Uploaded latest changes to my

Re: The right way to save updated Database Entry

2010-02-21 Thread John Andersen
WebbedIT got the right answer, just with some missing detail :) The solution missed that the values to be assigned in an array must use = ! So here the corrected solution: [code] $this-WishlistEntry-read(null, $entryId); $this-WishlistEntry-set(array( 'reservation_status' = 'FREE',

Re: HABTM association not being picked up

2010-02-21 Thread belsimon
Thank you John! That done the trick. You've saved me even more hours wondering what the problem is. On Feb 21, 5:14 pm, John Andersen j.andersen...@gmail.com wrote: Check that your models filenames are all lower-case. Enjoy,    John On Feb 21, 5:57 pm, belsimon simonlove...@gmail.com wrote:

Re: Model not found?

2010-02-21 Thread John Andersen
Are your controller missing the $uses definition, with which you tell the controller, that it should use a model? See the CakePHP book at: http://book.cakephp.org/view/53/components-helpers-and-uses [code] var $uses = array('Battle'); [/code] Enjoy, John On Feb 21, 5:40 pm, Thau

Re: The right way to save updated Database Entry

2010-02-21 Thread amarradi
Hello, thanks for your code. This way doesn't work. Is my first way not the same like your, but only with an array in the save () - Action. I don't know what is wrong. My Problem is that my way only sets the status in the dataset but no other value Do you have any ideas? The reject-action

allowing people to post profiles on my website, help with, please

2010-02-21 Thread drdave
I would like to allow certain people to post profiles on my website (subject to my approval) and edit them (without needing my approval) and everyone who visits the site would be able to view them. No capacity to search, friend, network, etc., just stand alone profiles. Also I would like to allow

Re: The right way to save updated Database Entry

2010-02-21 Thread amarradi
is it posible that the values will not be save because the model validates this fields so that the field couldn't be reset var $validate = array( 'wishlist_id' = 'numeric', 'title' = 'notempty', 'reservation_email' = 'email' ); Check out the

Re: The right way to save updated Database Entry

2010-02-21 Thread amarradi
The solution is the validation :-) save(array $data = null, array $params = array()) $params = array ('validate' = false, 'fieldList' = array (), 'callback' = true); so is it runable ;) Thanks a lot Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP

Re: Tree Behaviors, Move Functions

2010-02-21 Thread ross.hagg...@googlemail.com
I've tried commenting out the code and running prd($this-Category- movedown(2, abs(1))); only, but no joy. The primary id, 2 does exist. If i change the id to a random number that's not an id, i get the following: array_values() [function.array-values]: The argument should be an array

Re: isPost isGet Security questions

2010-02-21 Thread harake
Just make sure that you are using the security component and that your forms uses the POST method. everything will be handled automatically. as for using the $this-RequestHandler-isGet(), $this-RequestHandler- isPost(), or $this-RequestHandler-isAjax()... I do not use them because I do not rely on

Possible to blank (hide) columns and show those again in a complete rendered view?

2010-02-21 Thread sebb86
Hello, in a complete rendered view, is it possible to blank (hide) columns and show those again (for example by clicking on column-caption like paginating)? Hope my question is understandable. Thanks very much if someone can help. Check out the new CakePHP Questions site http://cakeqs.org and

Re: Extending Component. Error

2010-02-21 Thread dtirer
sorry, i was just changing the names of thigns for posting purposes. They all use the same name 'BorrowEmail' in the code On Feb 21, 10:14 am, John Andersen j.andersen...@gmail.com wrote: Question! What is yourcomponentcalled/named? In the code below, you are using both BorrowEmail and

Paginate Help

2010-02-21 Thread Dave
I am building my products controller and using tree behaviour. So I added a few dummy categories and few products to each so now how do i paginate the individual sections? Index shows all my main categories Summer, Winter Fall, Spring so when i click on spring (/view/spring) for example how

RSS without extension

2010-02-21 Thread cricket
I'm trying to set up RSS for my PostsController and I'd like to have extensionless URLs.Instead of using /blog/index.rss (which works, btw) I'd like to use /blog/feed for the RSS URL. I can't figure out why this isn't working: Router::parseExtensions('rss'); Router::connect( '/blog/feed',

Re: Extending Component. Error

2010-02-21 Thread Dr. Loboto
Review your code, it can have same errors like in this your example or other misspellings. Be sure that your component name differs from models names. On Feb 22, 5:54 am, dtirer dti...@gmail.com wrote: sorry, i was just changing the names of thigns for posting purposes. They all use the same

After the Cake is baked...

2010-02-21 Thread Johnny Cupcake
OK, so after we have successfully built our modern, interactive CakePHP website...where can we learn how to actually /run/ the website? Can you recommend any books or forums that provide a good introduction to all the legal, administrative and technical issues? For instance, best practices for

Re: The right way to save updated Database Entry

2010-02-21 Thread WebbedIT
DOH!, spotted one mistake in his code, but missed that glaring one, lol. Setting validation to false may allow the data to save, but if you have set validation rules and the data is failing then you do not want it to save. You should be submitting valid data otherwise what's the point in having

Re: Tree Behaviors, Move Functions

2010-02-21 Thread WebbedIT
Odd. From the error below we can see that the command is running but for ID 2 decides not to run an update, could it think this record is already at the bottom of the tree? How many entries are there in the table, can you test if it works on another valid record or try moving ID2 up rather than

Re: Possible to blank (hide) columns and show those again in a complete rendered view?

2010-02-21 Thread WebbedIT
There are no Cake functions that would help you do this automagically. If you added a common class to the th and tds in the column you could then use JavaScript to toggle the columns display value. Otherwise you would have to reload the page and include some logic that omitted that column.

Re: Paginate Help

2010-02-21 Thread WebbedIT
You should have two models, Category and Product. Category hasMany Product which belongsTo Category. Only Category behaves as tree. Your index lists the categories, and when you click on a category you are displaying a list of products with a common category_id, all you need do is provide that