PagesController does not call the afterFilter() method of the AppController

2008-03-24 Thread netors
For some reason the PagesController does not call the afterFilter() method of the AppController (FYI: it does call the beforeFilter() method)... adding the parent::afterFilter() before the $this- >render(join('/', $path)) of the display() method of the PagesController will fix this. --~--~---

Re: bug (maybe) report

2008-03-24 Thread Raistlin Majere
nevermind On 24 mar, 23:54, Raistlin Majere <[EMAIL PROTECTED]> wrote: > echo $mode; > > if ($session->check('Account') && $mode != "rate" && ! > empty($all[$temporary_account_id]['articles']['mark']) && > $all[$temporary_account_id]['articles']['mark']) > { > echo $mode; > > echo ''. > $subject.

Re: Modal / Lightbox?

2008-03-24 Thread John R
Yeah, I realized I was thinking about this illogically and can't do what I was thinking. Thanks anywho! :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-ph

change session at runtime

2008-03-24 Thread hanibaal
I have a client who wanted to change the session time from an admin area (we designing). so does anyone know how to change the session timeout at runtime ( let say we store it in the the requested value in the database). thanks. --~--~-~--~~~---~--~~ You received

bug (maybe) report

2008-03-24 Thread Raistlin Majere
echo $mode; if ($session->check('Account') && $mode != "rate" && ! empty($all[$temporary_account_id]['articles']['mark']) && $all[$temporary_account_id]['articles']['mark']) { echo $mode; echo ''. $subject.' [Modify] [Delete] '. $points.''; This code is echoing: rate no letter, no number, noth

bug (maybe) report

2008-03-24 Thread Raistlin Majere
echo $mode; if ($session->check('Account') && $mode != "rate" && ! empty($all[$temporary_account_id]['articles']['mark']) && $all[$temporary_account_id]['articles']['mark']) { echo $mode; echo ''. $subject.' [Modify] [Delete] '. $points.''; This code is echoing: rate no text, no number, nothi

Moving data from a controller to a view after doing some queries

2008-03-24 Thread George C
Hello! It seems like my lack of knowledge of MVC is once again holding me back. I'm attempting to develop some code that searches for users in the database and shows ones who's first or last names match. So, I have a function in my controller: function findsomeone() { i

Re: jsn imageshow for cake

2008-03-24 Thread jonknee
It's just a Flash slideshow, feed it some images and it will show them. If anything it would be a Helper, not a component. You can feed it images with a view that outputs in XML in this format: http://www.joomlashine.com/modules/jsn_imageshow/xmldata105.xml?xml=xml11362390 There are plenty of Fl

Re: Modal / Lightbox?

2008-03-24 Thread jonknee
> That seems like an option to re-create flash(). So you would set a > variable, the page reloads, and it shows the message. What I am trying > to do is trigger a popup window without the page reloading. If you want to do it without reloading the page then you must be sending out an AJAX call of

jsn imageshow for cake

2008-03-24 Thread bob
does anybody know any cakephp components similar to JSN ImageShow? http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,3585/Itemid,35/ thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: Modal / Lightbox?

2008-03-24 Thread John R
I couldn't be more confused by the last two posts ... =[ jonknee: That seems like an option to re-create flash(). So you would set a variable, the page reloads, and it shows the message. What I am trying to do is trigger a popup window without the page reloading. Siegfried: With your script,

Re: How do you handle Guest Users?

2008-03-24 Thread mbavio
Tks jonknee, I will take a look to the link. Unfortunately, I also have actions in the frontpage that I need to restrict from not registered users. See ya, mbavio On Mar 24, 8:45 pm, jonknee <[EMAIL PROTECTED]> wrote: > > I believe that's the default behavior in AclComponent for protected > > pa

Re: How do you handle Guest Users?

2008-03-24 Thread jonknee
> I believe that's the default behavior in AclComponent for protected > pages. I meant AuthComponent :). > Another question: where do you set if a page requires a user or admin? That belongs under the ACL component, Auth just shows they are indeed logged in. ACL says what they can do. In my set

Re: How do you handle Guest Users?

2008-03-24 Thread jonknee
> Cool. That´s what I wanna know. But now I have a new question, > regarding to Auth: I believe that's the default behavior in AclComponent for protected pages. So if the user doesn't have access to a page and are not logged in they will automatically be shown a login form. Along with a flash con

Re: How do you handle Guest Users?

2008-03-24 Thread mbavio
> > I don't have anything set up for guests and it works well. If a page > > requires a user or admin and there is no valid user session, it gets > > denied. No database hit required. Another question: where do you set if a page requires a user or admin? Cheers, mbavio --~--~-~--~~--

Re: Edit a form that contains an image

2008-03-24 Thread jonknee
> is there a way to not overwrite the field > unless a new image is uploaded.  essentially only activate the file > upload if somebody adds a file otherwise it remains as it was? It looks like all your controller does is manage the upload, so you could simply check to see if that field is populat

Re: counterfile dataspource

2008-03-24 Thread Sam Sherlock
> > it seems like overkill... What do you need a counter for? I don't but I wanted a simple excercise in creating datasources, a client also asked about this so today I thought about trying this. Clients tend to be interested in odd things sometimes On 24/03/2008, jonknee <[EMAIL PROTECTED

Re: Modal / Lightbox?

2008-03-24 Thread Siegfried Hirsch
you can just use the regular setFlash() with the way I have shown to you 2008/3/24, John R <[EMAIL PROTECTED]>: > > Ok .. I understand you can call it from the view .. but if you look 4 > posts above, my goal is to call it inside a controller, like you would > a flash(): > > > function checkVa

Re: How do you handle Guest Users?

2008-03-24 Thread mbavio
On Mar 24, 4:38 pm, jonknee <[EMAIL PROTECTED]> wrote: > > There has to be better ways. Any idea? > > I don't have anything set up for guests and it works well. If a page > requires a user or admin and there is no valid user session, it gets > denied. No database hit required. Cool. That´s what I

Re: counterfile dataspource

2008-03-24 Thread jonknee
> I am interested to know what other (more experienced) bakers think of it. > Is it usable? Any suggestions? It seems like overkill... What do you need a counter for? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "C

Re: Modal / Lightbox?

2008-03-24 Thread jonknee
> Ok .. I understand you can call it from the view .. but if you look 4 > posts above, my goal is to call it inside a controller, like you would > a flash(): Just set() a variable and have the layout look for said variable and create the div for it. In controller: $this->set('modal', array('Suc

Re: Order HABTM by a field in an associated table

2008-03-24 Thread [EMAIL PROTECTED]
Very odd, it looks like your belongsTo variable is setup correctly. It's clear that the SQL call that is generated is wrong though, It includes Profile.level in the order by statement but doesn't join the Profile table anywhere. I've created many belongsTo relationships just how you have described

Re: Modal / Lightbox?

2008-03-24 Thread John R
Ok .. I understand you can call it from the view .. but if you look 4 posts above, my goal is to call it inside a controller, like you would a flash(): function checkValid($whatever) { if (validation logic) $this->modal('Success!', 'This is valid!', '/valid'); else

Re: Modal / Lightbox?

2008-03-24 Thread Siegfried Hirsch
stuff it into a whatever.js and load it from you default.ctp layout 2008/3/24, John R <[EMAIL PROTECTED]>: > > Excuse me if this is a simple question .. but assuming that is a > Javascript function .. how would I call it from the Controller? > > > > -- Siegfried Hirsch hhS - Welserstr. 1 - 81

counterfile dataspource

2008-03-24 Thread Sam Sherlock
I have written a (very) simple datasource that uses a text file as a counter I am interested to know what other (more experienced) bakers think of it. Is it usable? Any suggestions? http://bin.cakephp.org/view/1168552551 - S --~--~-~--~~~---~--~~ You received thi

Re: Modal / Lightbox?

2008-03-24 Thread John R
Excuse me if this is a simple question .. but assuming that is a Javascript function .. how would I call it from the Controller? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group,

Re: Edit a form that contains an image

2008-03-24 Thread abocanegra
thank you jonknee, that makes sense. I implemented the changes you suggested. One follow up question though. Since it would be absurd to populate a file field is there a way to not overwrite the field unless a new image is uploaded. essentially only activate the file upload if somebody adds a

Re: What free host supports CakePHP?

2008-03-24 Thread Raistlin Majere
I found one! http://stonerocket.net/freehost.php On 24 mar, 16:23, Raistlin Majere <[EMAIL PROTECTED]> wrote: > If a free host supports PHP, it may not support .htaccess. What else > than .htaccess will be in the list of features of a free host that > supports CakePHP? --~--~-~--~~--

Re: Suppressing UTF-8 BOM output

2008-03-24 Thread Samuel DeVore
Oh dear you are going to ruin our reputations as grumpy unhelpful old curmudgeons :) On Mon, Mar 24, 2008 at 1:05 PM, MonkeyGirl <[EMAIL PROTECTED]> wrote: > > > I had a similar problem with a symbol (I forget which, perhaps a ?) > > showing up on every page. Turns out it was present in a fil

Re: Suppressing UTF-8 BOM output

2008-03-24 Thread MonkeyGirl
> I had a similar problem with a symbol (I forget which, perhaps a ?) > showing up on every page. Turns out it was present in a file, I think > appController after the PHP. So I would make sure there is nothing, > whitespace included, in outside of in your included files > (app_controller.php, ap

Re: Static/Dynamic CMS

2008-03-24 Thread Fahad
since its gonna be a CMS, i think its better if you look at other open source CMS database structure (for e.g. joomla) before u start. this wil help u set up the models first. then you can continue coding it up according to your needs. On Mar 25, 12:43 am, eThikas <[EMAIL PROTECTED]> wrote: > Im

Re: Suppressing UTF-8 BOM output

2008-03-24 Thread jonknee
> Ah, but I downloaded the homepage for the site using curl and it has > the same prefix, so it's not just for XLS generation - that's just the > one that seems to break as a result. The HTML files have the same > problem, but browsers ignore it. So whichever file it is, it appears > to be one tha

Re: How do you handle Guest Users?

2008-03-24 Thread jonknee
> There has to be better ways. Any idea? I don't have anything set up for guests and it works well. If a page requires a user or admin and there is no valid user session, it gets denied. No database hit required. --~--~-~--~~~---~--~~ You received this message beca

Re: What free host supports CakePHP?

2008-03-24 Thread Chris Hartjes
On Mon, Mar 24, 2008 at 3:23 PM, Raistlin Majere <[EMAIL PROTECTED]> wrote: > > If a free host supports PHP, it may not support .htaccess. What else > than .htaccess will be in the list of features of a free host that > supports CakePHP? http://book.cakephp.org/view/28/requirements -- Chris

What free host supports CakePHP?

2008-03-24 Thread Raistlin Majere
If a free host supports PHP, it may not support .htaccess. What else than .htaccess will be in the list of features of a free host that supports CakePHP? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" grou

Re: belongsTo multiple times

2008-03-24 Thread Jérôme
My hero, it works great. Thanx. On Mar 24, 7:14 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote: > Hi Jérôme > > >  I'm just a new cake user, and I'm facing my first problem... > >  For a simple app, I'd like to add Todo's for Projects. These todo's > >  are created by a User and assigned to a User.

Re: how could I join into IRC?

2008-03-24 Thread eThikas
On Mar 24, 6:17 pm, cc96ai <[EMAIL PROTECTED]> wrote: > I download mIRC, how could I join into cakephp IRC ? > irc://irc.freenode.net/cakephp irc.freenode.net is the server you need to connect to, and "cakephp" is the channel to join. --~--~-~--~~~---~--~~ You rec

Static/Dynamic CMS

2008-03-24 Thread eThikas
Im building a CMS for an organization helping children in Ghana. The webpage will contain two types of pages: Dynamic and static. The static pages will be "light html" database based, and edited in a wysiwyg editor by people who dosent have any html knowledge (FCKEditor will probably be used for t

How do you handle Guest Users?

2008-03-24 Thread mbavio
Hi, this is a general question for all of you that are using Auth/ACL. In the different tutorials of the use of these components, you have always Registered User, and maybe Administrator User. But very few articles show how to manage Guest Users (those who arent registered). I´ve handled this cre

Re: belongsTo multiple times

2008-03-24 Thread Jon Bennett
Hi Jérôme > I'm just a new cake user, and I'm facing my first problem... > For a simple app, I'd like to add Todo's for Projects. These todo's > are created by a User and assigned to a User. > I've tried to do my association like this for the Todo model, but it > doesn't work, it seems that n

belongsTo multiple times

2008-03-24 Thread Jérôme
I'm just a new cake user, and I'm facing my first problem... For a simple app, I'd like to add Todo's for Projects. These todo's are created by a User and assigned to a User. I've tried to do my association like this for the Todo model, but it doesn't work, it seems that not possible to have two t

how could I join into IRC?

2008-03-24 Thread cc96ai
I download mIRC, how could I join into cakephp IRC ? irc://irc.freenode.net/cakephp --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To u

Re: Suppressing UTF-8 BOM output

2008-03-24 Thread MonkeyGirl
> Cake isn't adding the bytes, your editor probably is. That makes sense, but if Cake's always outputting them, and other PHP scripts in /app/webroot aren't, then which file's likely to have the three bytes? I'm not up on Cake enough to know which files are always being output. I've checked the l

Re: Suppressing UTF-8 BOM output

2008-03-24 Thread MonkeyGirl
> my guess is that it is a helper or a view that is used by that page(s) > something that someone edited using a different texteditor like > homeSite Ah, but I downloaded the homepage for the site using curl and it has the same prefix, so it's not just for XLS generation - that's just the one tha

Re: Suppressing UTF-8 BOM output

2008-03-24 Thread Samuel DeVore
my guess is that it is a helper or a view that is used by that page(s) something that someone edited using a different texteditor like homeSite On Mon, Mar 24, 2008 at 10:04 AM, MonkeyGirl <[EMAIL PROTECTED]> wrote: > > > Cake isn't adding the bytes, your editor probably is. > > That makes sens

Re: Problem with carriage returns

2008-03-24 Thread b logica
It's not clear what it is you're looking for. If this is a display issue, you should probably just pass the data through nl2br() in the view. Browsers ignore regular newlines / carriage returns. On Sat, Mar 22, 2008 at 9:21 AM, Neveldo <[EMAIL PROTECTED]> wrote: > > Hi all, > > I have some trou

Re: /articles/ is disappering from url

2008-03-24 Thread b logica
Why not just add the string, "/articles/' to the href instead of creating a variable? Or, if you want to keep using $html->url() just create the entire link at once with $html->link($subject, '/articles/result/rate/' . $result + 1) On Sun, Mar 23, 2008 at 10:45 PM, Raistlin Majere <[EMAIL PROTECT

Re: Suppressing UTF-8 BOM output

2008-03-24 Thread b logica
Cake isn't adding the bytes, your editor probably is. I first ran into this issue a couple of years ago when a client made some changes to some scripts I'd written. He was using HomeSite on Windows. I found some info online explaining (though I forget the details) that HomeSite does this to UTF-8

Re: Edit a form that contains an image

2008-03-24 Thread jonknee
> However, when i click edit it will only populate the input > fields not the file field, and if i update it like that it creates a > new entry and leaves the file field null.  Is there something I am > missing? File fields cannot be pre-populated as a security measure so files don't get accident

Re: Suppressing UTF-8 BOM output

2008-03-24 Thread MonkeyGirl
> I have seen this happen when one file (in my case a jpGraph file) had > a been saved with the file encoding BOM in it, when If found the file > and resaved it without it, all was good.  It actually made the jpegs > that were generated to be corrupt. Yes, I saw something along those lines mentio

Re: The Form helper's year() method

2008-03-24 Thread Axl
> > Depending on your Cake version, you can use this, or you might have to > > use its replacement, which is deconstruct() in the Model. > > Nope, you don't have to call deconstruct(), it gets called > automatically. Just pass your form data to set()/save()/create() like > normal. This is the er

API docs for the branch

2008-03-24 Thread Ariel Arjona
Hello, I'm wondering if there's a section somewhere in api.cakephp.org or in some other site with the up to date 1.2 branch docs. From what I've seen http://api.cakephp.org/1.2/ contains the docs for the new year's beta release. If I do have to generate the docs myself, could anyone provide some

Re: Suppressing UTF-8 BOM output

2008-03-24 Thread Samuel DeVore
I have seen this happen when one file (in my case a jpGraph file) had a been saved with the file encoding BOM in it, when If found the file and resaved it without it, all was good. It actually made the jpegs that were generated to be corrupt. That would be my guess, Sam D On Mon, Mar 24, 2008

Suppressing UTF-8 BOM output

2008-03-24 Thread MonkeyGirl
Hi. I'm probably missing something simple here, but a few weeks ago, my Cake app seemed to spontaneously start outputting the hex values "EF BB BF" at the beginning of all its pages. Static files such as CSS files, and non-Cake PHP files in /app/webroot, don't do this. It's just files generated w

Different types of users

2008-03-24 Thread dandreta
I am searching and reading enough things on the users' access and permissions (OthAuth, ACL ...) and finally I have applied the othauth component. The question is that I want to do the access to my application depending on the type of user. I have 3 types of users:manager, client, supplier and in

Re: Different flash layout for public and admin ?

2008-03-24 Thread Siegfried Hirsch
the function flash in SessionComponent in 1.2 has all the parameters you need. There is a key for different message types like flash, error, warning, whatever you like. flash is just the default. This constructs a different id for the div with the flash - like this: this is a error if you have use

Re: Modal / Lightbox?

2008-03-24 Thread Siegfried Hirsch
You mean something like this, if you have proto and script loaded function animateFlashMessage(){ // do the flash disapear (duration 5.0 sec) var f = $('flashMessage'); if (f && f.style.display != 'hidden') { new Effect.Parallel([ new Effect.Fade(f, {

Re: Problem with sanitize::escape

2008-03-24 Thread Neveldo
Hi, ok, thank for your response. But what is the interest of sanitize::escape in this case ? Cordially, Neveldo : http://www.neveldo.fr --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to th

Re: Problem with sanitize::escape

2008-03-24 Thread AD7six
On Mar 24, 12:52 pm, Neveldo <[EMAIL PROTECTED]> wrote: > Hi all, > > I've a little problem with the function sanitize::escape. > > I've data from a post form and I want to save it in my database. > > I secure my data like that: > > uses('sanitize'); > $cleaner = new Sanitize(); > $cleanedData['

Re: Edit a form that contains an image

2008-03-24 Thread Dr. Tarique Sani
On Mon, Mar 24, 2008 at 4:18 PM, abocanegra <[EMAIL PROTECTED]> wrote: > > I am new to cakePHP and have been able to get an imageuploader to > work. Hmmm. Something makes me feel that you are very new to PHP and not just CakePHP Nothing you do will every populate the file field - time

Edit a form that contains an image

2008-03-24 Thread abocanegra
I am new to cakePHP and have been able to get an imageuploader to work. However, when i click edit it will only populate the input fields not the file field, and if i update it like that it creates a new entry and leaves the file field null. Is there something I am missing? My table is named pi

Problem with sanitize::escape

2008-03-24 Thread Neveldo
Hi all, I've a little problem with the function sanitize::escape. I've data from a post form and I want to save it in my database. I secure my data like that: uses('sanitize'); $cleaner = new Sanitize(); $cleanedData['Post']['body'] = $cleaner->escape($this->data['Post'] ['body']); My problem

Re: Order HABTM by a field in an associated table

2008-03-24 Thread dandreta
any idea? On 19 mar, 13:39, dandreta <[EMAIL PROTECTED]> wrote: > If I add the relation in the model Person : > > var $belongsTo = array('Profile' => array('className' => 'Profile', > 'foreignKey' > => 'profile_id', >

Re: Login box in layout

2008-03-24 Thread Nick Timchenko
Thank you very much for advices, Dave! I think I'll try AJAX - it will be good practice for me ;) Cheers, Nick Dave J wrote: > Hey Nick, > > You're right about that. I guess you can tackle it either two ways. > > 1) Submit the form using AJAX, so if there's any errors, you get them > back withou

Re: Can separate controller from view in this code?

2008-03-24 Thread AD7six
On Mar 23, 5:10 pm, Raistlin Majere <[EMAIL PROTECTED]> wrote: > Add your message to there... > > (http://groups.google.com/group/cake-php/browse_thread/thread/da68ecc6... > ) > > ...then remove your message from here. Interesting. I read that as "Thanks for the help, I didn't read it, don't he

Re: 3 errors happening to files out of the app folder

2008-03-24 Thread AD7six
On Mar 24, 5:31 am, Raistlin Majere <[EMAIL PROTECTED]> wrote: > The 3 errors are happening to files out of the app Folder. > > 1 > > Query: INSERT INTO rated (account_id) VALUES ('3') > Warning: SQL Error: 1062: Duplicate entry '0' for key 1 in C:\AppServ > \www\CakePHP\cake\libs\model\datasour

Re: Different flash layout for public and admin ?

2008-03-24 Thread Neveldo
Hi, Thank for your responses. I think the simpliest way to do this is by using CSS styles :) thank a lot ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake