orderedBehavior 2.1.2 - Bug in afterdelete function?

2009-06-06 Thread mig_akira
Hello everyone. I'm using this behavior: http://bakery.cakephp.org/articles/view/orderedbehavior-2-1 to ordenate pages in my site. But the thing is, when I delete a page, the order_display of all other pages does not change automatically. For example, if I have 5 pages, and delete the page wi

RE: find->neighbours help - SOLVED

2009-06-06 Thread Dave Maharaj :: WidePixels.com
I added 'value' => date($post_created, strtotime("1 second")) , so it gets the next post created 1 second or greater and previous post 1 second less or more as neighbours. _ From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] Sent: June-06-09 9:31 PM To: cake-php@go

find->neighbours help

2009-06-06 Thread Dave Maharaj :: WidePixels.com
I have a pagination set up where the page loads posts based on the User.rank of the logged in user , the status of the Post and the Post.rank and ordered from newest to oldest so a user gets a list of Posts that are currently active and within his permission to view. I checked the pagination resu

Retrieving data through associations

2009-06-06 Thread Pedro Ares
Having read the manual multiple times I still can't figure out the ORM. Imagine I have a user that hasMany friends and each user hasMany Posts. The problem I'm trying to solve is how to retrieve every Post from all my friends. here are the options that I'm considering, 1 - Manual query. 2 - Q

bug in ordenable behavior: moveDown exceeds number of order_display

2009-06-06 Thread mig_akira
Hello everyone! I use an ordenable behavior to sort pages in my site. I created a field called 'index' in my pages table, and it's working fine, except that when I use the action MoveDown, it keeps moving the index down even limitlessly. For example, if there are 5 pages, and I press moveDown

Re: Help me with forum based on CakePHP

2009-06-06 Thread Miles J
Im currently in the process of building a forum plugin, no idea when it would be finished though :/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@google

Re: Persistent model to true -> Fatal error

2009-06-06 Thread Miles J
Like I said before, $persistModel is extremely buggy. --~--~-~--~~~---~--~~ 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, sen

Re: saving a view to .htm file

2009-06-06 Thread majna
Example of rendered view cache as html class HtmlCacheHelper extends AppHelper { function afterLayout() { $view =& ClassRegistry::getObject('view'); //handle 404s if ($view->name == 'CakeError') { $path = $this->params['url']['url']; } else { $path = $this->here;

Re: Help me with forum based on CakePHP

2009-06-06 Thread moderndegree
Hey Miles, I'd very much like to see your forum app as a plugin. The Star Craft forum looks pretty slick. - Brian On Jun 1, 2:57 pm, Miles J wrote: > Yeah ive done the same, I built 2 forums > atwww.sc2armory.comandwww.gamesync.com. Will be building a plugin to release > for it. > > Also I w

Re: CakePHP + CouchDB

2009-06-06 Thread Gwoo
@Chris I started this code this morning after seeing your article. Two things bothered me...one was the use of "send" and the second was the disregard for the HttpSocket class. Also, the real benefit of a datasource is its integration with the model, which means we need to implement several metho

Re: Persistent model to true -> Fatal error

2009-06-06 Thread pauloamgomes
in error i got ... Albuns"_, my model is named albuns On Jun 4, 10:27 pm, Andreas Derksen wrote: > [...]Please ensure that the class definition *_"Albuns"_* of the > object you are trying to operate on was loaded _before_ unserialize()[...] > > hmm maybe Album, not Albun? :-) > > pauloamgome

Re: Model + 2x behaviors = headache :(

2009-06-06 Thread brian
You must return true or false from beforeSave(). On Fri, Jun 5, 2009 at 11:07 AM, Ernesto wrote: > > Hello. > > i have a model that acts as "AutoCode" and "AutoDate" > > both behaviors are adding fields to $model->data but only one is > working. here's my code (see comments for further explanatio

Re: saving a view to .htm file

2009-06-06 Thread brian
Do you just want the raw mark-up? I figured you needed the *processed* view. I don't see hw file_get_contents() would help with that. On Fri, Jun 5, 2009 at 11:30 AM, qwanta wrote: > > Experimenting a bit more, it seems that another straightforward way to > do this is use the php function "file_g

Re: htaccess trouble

2009-06-06 Thread brian
Try this: RewriteEngine on RewriteCond %{REQUEST_URI} !/ideas/ RewriteRule^$webroot/[L] RewriteRule(.*) webroot/$1[L] On Fri, Jun 5, 2009 at 11:11 AM, graemest...@googlemail.com wrote: > > Hi, > So I'm having a little difficulty with my htaccess rules. > Basically at the

Re: admin routing/auth logout!

2009-06-06 Thread kicaj
Yes! Thanks! On 4 Cze, 18:38, brian wrote: > I believe this happens sometimes if you have Security.level set to > 'high' in core.php. Set it to 'medium'. > > On Thu, Jun 4, 2009 at 12:36 PM, kicaj wrote: > > > Anyone know Why when I use admin routing and some form (eg. to edit > > article) and

Re: Auth component cache problem in Internet Explorer

2009-06-06 Thread Dr. Loboto
Try Configure::write('Session.checkAgent', false); in app/config/ core.php - Flash send different User-Agent string and it resets session. On May 8, 3:03 pm, remy wrote: > Still haven't solved the problem, but I did found what the problem > is.. > > It seems that something went wrong with Flash.

Limit characters?

2009-06-06 Thread Dave Maharaj :: WidePixels.com
Can cake limit the return on characters in a query? I have in view to display the first 50 characters in the post descriptions to give a brief description to a user...but rather than pulling the whole description in the find then displaying limited characters, can i limit the description to

Re: Warning (2): unlink() !? What is this error?

2009-06-06 Thread Dr. Loboto
Check here: http://groups.google.com/group/cake-php/browse_thread/thread/a5b4fae50681b633/cc9d5ed022509685 There listed 2 solutions, what will suit you depends on your PHP version. On Jun 5, 8:00 pm, foldiman wrote: > I get this error intermittently and do not understand why. > > Warning (2):

Re: What's best way to create the Admin area?

2009-06-06 Thread BlueC
On Jun 6, 11:42 am, AmityWeb wrote: > Can you use the admin route but keep one view and just have some functions > to display the admin part of the user is admin? You can set a specific view file using render() in the controller: $this->render(’view_file_name’); You could also use logic in the

CakePHP + CouchDB

2009-06-06 Thread GrumpyCanuck
Hey guys and gals, I just did a blog post about a very simple CakePHP datasource for CouchDB. http://www.littlehart.net/atthekeyboard/2009/06/05/a-simple-couchdb-datasource/ I'm hoping to get it cleaned up a little bit and put it up on the Chaw as a plugin in order to make writing tests for it e

Re: What's best way to create the Admin area?

2009-06-06 Thread Miles J
I prefer creating another standalone app, and just bootstrapping it to use the same models, components, etc between apps. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send em

set combine little doubt

2009-06-06 Thread Alexandre Brasil
Hi everybody, I new in cake, could you help me to format a data array? I have this $data array { [0]=> array { ["Timetable"]=> array { ["slot_id"]=> "2" } ["Subject"]=> array { ["name"]=> "CAD" } ["Typeclass"]=> array { ["name"]=> "T1" } ["Room"]=> array {

Re: bug in recursive?

2009-06-06 Thread fain182
no one knows? is it not important? -- pietro --~--~-~--~~~---~--~~ 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 emai

Re: What's best way to create the Admin area?

2009-06-06 Thread AmityWeb
Yes, but if I use the admin router dont I have to create separate views for the admin too?? So I will have two views for everything, with the admin view just having the extra functions required for admin. So if I have to edit/add/delete something to the view I have to do it twice. So this is what

Re: What's best way to create the Admin area?

2009-06-06 Thread BlueC
Ummm, 3. That is what it's there for. On Jun 6, 9:27 am, AmityWeb wrote: > Hi all > > I wondered if anyone can advise I understand a few different ways to > create an Admin area and wanted to find out what is the best way. > > 1) Separate system in a sub-folder /admin/ > > 2) Exact same sys

Re: Confirmable Behavior: is there something similar?

2009-06-06 Thread Walther
I don't think you should have delete links available in areas where search spiders, or rogue users can easily get to them. You should at the very least ensure that the user is logged into the site before running any sort of delete behaviour (IMO) And, having any sort of confirmation message is co

What's best way to create the Admin area?

2009-06-06 Thread AmityWeb
Hi all I wondered if anyone can advise I understand a few different ways to create an Admin area and wanted to find out what is the best way. 1) Separate system in a sub-folder /admin/ 2) Exact same system but just showing Admin functions if the logged in user is admin 3) Using the built