Re: News Archive/Events Archive

2006-08-27 Thread John Zimmerman [gmail]
I am replying basically so this does not go unanswered. Your question really covers too much to give a reply in a news group.Your desired functionality is not too hard to conceptualize once you get familiar with the Cake basics.
You should be able to start with the blog tutorial in the manual (http://manual.cakephp.org).The structure of your code for events and news should be very similar.
For additional functionality like pagination (groups of 10 items) someone has developed a pagination component to be used as an add on to applications that will work well.Searching will also not be difficult, but will be dependent on your data. There are many ways to do it, but using a fulltext index in your database and a custom SQL query is a simple way to do it.
The cake conventions / MVC may take a little time to figure out, but once you do all of these things will become very clear.After you get the conventions checkout some of the projects at 
http://cakeforge.org. You can download some of the source code there and possibly adapt that code for your purposes. If you come up with something unique you can even give back to the community by starting your own project on CakeForge.
On 8/26/06, codigo [EMAIL PROTECTED] wrote:
Hello,I am new to cake, but I am very interested in these two topics. How doI maintain an events and news list so both can be archived? Forexample, I would like to show ten news items at a time. In order of
newest to oldest. I know I can just limit 10 ordered by id, but I wouldlike for the user to b able o click into all news items or even do asearch.Events would be the same, but divided into groups. Like:
Adult EventsJunior EventsKids EventsAll related to surfing. Please let me know if anyone has samolese theywould like to share.Thanks,Din
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: search form.

2006-08-26 Thread John Zimmerman [gmail]
It is hard to give a specific example without your db schema and what type of search query you want to perform.But from the information you gave it seems that a fulltext search would be the easiest to implement.
Here is an article on how to setup fulltext on your database with how to query it.http://www.onlamp.com/pub/a/onlamp/2003/06/26/fulltext.html
To perform the query you will most likely need to use a custom sql statement within your model.http://manual.cakephp.org/chapter/modelsIf you scroll about 1/3 of the way down you will see the section on custom sql calls.
For your needs this solution should be quick and painless.Maybe someone has a better solution?On 8/26/06, 
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hi.I would like to create a simple search form for my page.. it shouldsearch 1 table and show the result? Could not find any informationabout this (manual, wiki, forum etc.)This is what I have tried so
far:controller:function search(){$conditions = $this-postConditions($this-data);$this-Recipe-findAll($conditions);}index:?php echo $html-input('Recipe/name'); ?
div class=submit?php echo $html-submit('search');?/divSomething is missing because nothing happens when I click search!Best regards.Asbjørn Morell.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: setup problem

2006-08-26 Thread John Zimmerman [gmail]
It sounds like mod_rewrite is not enabled.Please post back with the following and someone can walk you through enabling it on your system.Operating System:WebServer (i.e. Apache2):Bundle If Applicable (
i.e. WAMP, XAMPP, etc..):On 8/26/06, bingo [EMAIL PROTECTED] wrote:
hi,I have two questions regarding the setup1. I have downloaded CakePHP and placed the cake folder within thehtdocs folder i.e. my setup is as follows/htdocs/cake/cake /htdocs/cake/app
But when I go to http://localhost/cakeI am able to see the cakePHP page but not its style. Even the CakePHPicon is missing.where I am making a mistake ?
2. I created a new application 'elearning' using the bake.php script.It create a new folder for my application and it contains model,controller, view folder in it. But when I created my models andcontroller using the bake script, it placed them inside the 'app'
folder. I am not sure whether that's the right place or not. If it is,then what's the use of 'elearning' folder that was created by the bakescript.Looking forward for commentsRegards
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: setup problem

2006-08-26 Thread John Zimmerman [gmail]
AFAIK bake.php will only operate on the /app folder structure.i.e. /app/controllers, /app/models, /app/views/controller_nameSo if my controller is called 'posts' and my model is called 'post' and I have the default actions 'add', 'view', 'edit', and 'delete' the 
bake.php script would generate the following files and nothing more.../app/controllers/posts_controller.php/app/models/post.php/app/views/posts/add.thtml/app/views/posts/edit.thtml/app/views/posts/view.thtml
/app/views/posts/delete.thtmlIf you are developing a plugin you will have to generate these with bake.php in the app directory and then move the files generated into the plugin structure.
On 8/26/06, bingo [EMAIL PROTECTED] wrote:
Hi John,Thanks for the hint. After google search on cakephp xamppmod_rewrite, I got referred tohttp://wiki.cakephp.org/docs:mod_rewrite
.Now I able to get stylesheet working.But the other question still persist. I baked an application'elearning' using bake.php script. It created a folder 'elearning' andmodules, controller, and view folder within the 'elearning' folder. But
when I create modules and controller using bake.php, they are createdwithin app folder. Do I need to copy modules and controller from thereto my elearning folder ?thanks for the helpRegards

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: setup problem

2006-08-26 Thread John Zimmerman [gmail]
Please post back with the paths relative to your cake installation. It sounds like you are either confusing the way plugins are structured with the way a full application is structured or are trying to do things 'non-standard'.
Normally you would develop your whole application in /app and develop your plugins in /app/plugins.A plugin has the structure of a mini-application.So you should not really have a folder called 'elearning' where you are building your application unless you are developing a plugin.
If you want to rename the /app folder to elearning you can, but then you have to modify values in /.htaccess and /index.php to read from the new folder. I wouldn't recommend doing this because any changes you make outside of the /app directory will be overwritten when you upgrade to the next release of cake.
bake.php will put the files in the right places.So questions from hereAre you developing a plugin?Do you have a reason not to develop your application in the location where 
bake.php puts the files?On 8/26/06, bingo [EMAIL PROTECTED] wrote:
Hi John,Can you tell me then what is the use of creating a 'elearning' andsubsequent 'elearning/models', 'elearning/view' etc folder. Also, thusit mean that when I am creating any view or stylesheet, all of this
will go in app folder and nothing in 'elearing' folderRegard

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: setup problem

2006-08-26 Thread John Zimmerman [gmail]
That is odd. Everything in the elearning folder should have been created in the app folder.If you merge your app folder and your elearning folder you should be good to go.I would try running the bake.php script one more time as well to see where it is creating the files for sure. Maybe the mod_rewrite setting was interfering?
I have only used bake.php on unix/linux systems and the generated files end up in the /app folder.Anyway, see if that helps.On 8/26/06, bingo
 [EMAIL PROTECTED] wrote:Hi John
1. I am not developing a plugin2. No. I was just trying to use bake.php script from command line andit created a elearning folder.I used XAMPP to install Apache, PHP, and MySQL. Here is the current
folder structure of CakePHP1. D:\xampp\xampp\htdocs\cake |-app|--- models|--user.php
|--lession.php|--- controller|--users_controller.php|--lession_controller.php|--- view
 |-cake |---\ |---\ |- elearning
 |--- model |--- controller |--- view Thanks

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: setup problem

2006-08-26 Thread John Zimmerman [gmail]
Yeah, that is why I wasn't getting it.The elearning folder should not have been created.On 8/26/06, bingo 
[EMAIL PROTECTED] wrote:Hi John,I think there is some miscommunication. Sorry If I am confusing you.
Actually, everything is created within the application (app) folder.What I am not understanding is then why the bake script created theelearning folder. If all the models, controllers and view are to be
stored in app folder, then there is no need for elearning folder.Regards

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Alternating Row Colors

2006-08-21 Thread John Zimmerman [gmail]
dangit, dangit, dangit..I need to research the helpers more.Thanks for the snippet, I will go back and recode the appropriate sections of my code.On 8/20/06, 
sicapitan [EMAIL PROTECTED] wrote:
AD7 is right, tablecells does this automatically, and you can set theclaternating colours$html-tableCells($tr, array('style'='background:#E4E4E4'),array('style'='background:transparent'));

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: User Bar Logic

2006-08-20 Thread John Zimmerman [gmail]
I am pretty sure I have something in one of my apps setting variables in app_controller and readin the info in the default template. I will double check.What I am doing for login info though is setting it in the session and then checking for it in the default template.
So you can always set a variable in the session and then check for it in your layouts. This would bypass the need to use the set() method.On 8/19/06, 
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I understand why you would want to write it in the app_controler (sothat all controllers might inherit from this).The problem is, theredoesn't seem to be a way to declare variables outside of functions.And, as you probably are finding out, when a application controller
inherits from the app_controller, the function declared inapp_controller (with the variable foo, let's say) would beoverwritten.Good question, but not sure how to make it work orachieve visibility.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Alternating Row Colors

2006-08-19 Thread John Zimmerman [gmail]
I have been doing something something similar in my views.?php foreach ($items as $key = $row): ?tr?php if ( $key%2 ) { echo ' class=altRow'; }?
 td nowrap?php echo $row['Model']['field'] ?/td/tr?php endforeach?I have the altRow class defined in my style sheet.
On 8/19/06, c_doug [EMAIL PROTECTED] wrote:
Can anyone tell me how to alternate row colors in CakePHP? Is itsimilar to doing it in regular PHP?Ex:$row_color = ($row_count % 2) ? $color1 : $color2;$row_count++;
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Trying CakePHP for the first time and get error

2006-08-18 Thread John Zimmerman [gmail]

Out of curiousity what zip program did you use to extract the
downloaded archive.

The empty directories are included in the archive, but some extraction
utilities do not create the empty directories upon extraction to the
filesystem.

On 8/18/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Figured it out. In case others get this. I found that if I created an
 empty models directory in the app folder, the warnings go away.


 


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Cross Application Sesssion

2006-08-18 Thread John Zimmerman [gmail]

You might hop on IRC for this one.  I am not sure many of us have
tried this before, but you should be able to find someone in the IRC
channel to give you a definitive answer.

On 8/18/06, Mandy Singh [EMAIL PROTECTED] wrote:
 I would be really helpful to get an answer on this one.

 I even tried using the database option but somehow it just doesn't work.

 Basically, I am trying to log the user in in /app1/ and then connecting to
 /app2/ which is /rdBloggery/ and want him autologged in there.

 Both apps are on the same domain but in diff folders under /cake/

 :(

 Mandy.

  


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Change Template

2006-08-17 Thread John Zimmerman [gmail]
copy the file from /cake/libs/view/templates/layouts/default.thtmlto/app/views/layouts/default.thtmlAnd start editing the new file in your application directory. It will override the default.
On 8/17/06, Simplerules [EMAIL PROTECTED] wrote:
I just setup CakePHP, how can I change the default main HTML wrapper?The one that titles pages CakePHP and has a powered by CakePHP icon inthe footer.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Remove Powered By

2006-08-17 Thread John Zimmerman [gmail]
No. Cake is distributed under the MIT license.http://en.wikipedia.org/wiki/MIT_Licensehttp://www.opensource.org/licenses/mit-license.php
On 8/17/06, Simplerules [EMAIL PROTECTED] wrote:
I couldn't find the exact license on the site, do I have to leave inthe 'Powered by CakePHP' icon and reference?.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: How to upload image? Please give me a example,thanks!

2006-08-16 Thread John Zimmerman [gmail]
After you make the changes you can post back with code and/or errors if you are still having problems.If you paste your code into a bin at   http://cakephp.org/pastes/add
 we can look at your code easier and apply changes.Just post back with your problem and a link to your bin.On 8/15/06, georgeL 
[EMAIL PROTECTED] wrote:you need to use the filehandler as a model and not inside your
controller. just copy the snippet into your model folder.when setup as a model you can use it like mentioned in the snippet andaccess it from your product model.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: API documentation needs stylesheet change

2006-08-16 Thread John Zimmerman [gmail]
All I did was file the ticket.I don't do any actual work :-)Thanks gwoo/nate.On 8/16/06, 
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Wow! Fast work, gwoo and John. That is most helpful. You guys rock.Thank you.Best regards,Ralph

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: How to associate models without tables?

2006-08-16 Thread John Zimmerman [gmail]
You can setup a database table that is basically an index into your file system.This might be helpful if you want to store metadata about the files as well. Gallery does this for images too.So your table would have and id, name, description, location, etc, and a path field.
The path field is where the file/picture is on the filesystem.Then cake can make associations using the standard id/inflection system.When deleting a picture in the model it will delete the database entry, you just add a piece of code to your model that also unlinks the file.
Scalability wise this will also be a more robust solution.On 8/16/06, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:Models without tables should still be able to be associated.
If I have aProduct hasMany ProductImage hasOne FileHandlerProductImage stores information about the file in the database.Filehandler handles uploading, deleting the file physically from the
disk.I could setup a really cool way to delete all product files when theProduct is deleted.But , I need FileHandler to be associated toProductImage.Then I override function the delete function in ProductImage
del($id, $cascade = true){ parent::del($id,$cascade); $this-FileHander-delete($whatever);}Perfect!!!However, Cake tries to do database stuff on FileHandler and it throws a
bunch of errors.Cake should know that $useTable = false; means that, even withassociations.Yah, I know, file a ticket, I will.Anyone tried to do anything likethis successfully?
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Outputting Code on a Website

2006-08-16 Thread John Zimmerman [gmail]
It looks like CakeBin is using GeSHli (which looks like what I was looking for).Thanks for the replies.On 8/16/06, Chris Lamb 
[EMAIL PROTECTED] wrote:HiOn Wed, 16 Aug 2006 15:19:59 -0700
John Zimmerman [gmail] [EMAIL PROTECTED] wrote: Basically I just want to display php code within a web page.GeSHIi[0] seems to be the de-facto library for doing this.
Chris[0] http://qbnz.com/highlighter/-- Chris Lamb, Cambs, UKWWW: http://chris-lamb.co.uk
Q. Why is top posting bad? GPG: 0x634F9A20A. Because it breaks the logical sequence of discussion

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: How to associate models without tables?

2006-08-16 Thread John Zimmerman [gmail]
The flexibility of not having a table would only be short term however.When it comes time to add features or expand your application you might be finding yourself needing to add the table anyway.It is a little more work upfront, but in the long run it can save you some headache.
On 8/16/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Good Idea.The flexiblity of not having to have a database table for every model
would nice though.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: API documentation needs stylesheet change

2006-08-15 Thread John Zimmerman [gmail]
Donehttps://trac.cakephp.org/ticket/1321On 8/15/06, nate 
[EMAIL PROTECTED] wrote:We don't respond to requests or bugs posted here.You can open a
ticket at https://trac.cakephp.org/Thanks.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Inflector bug or newbie mistake?

2006-08-15 Thread John Zimmerman [gmail]
Your controller needs to be plural.addresses_controller.phpclass AddressesController extends AppController{ var $name = Addresses;}On 8/15/06, 
jbernat [EMAIL PROTECTED] wrote:
I am baking my first Cake app, and I created a controller namedaddress_controller.php for a table named addresses:?phpclass AddressController extends AppController{
var $name = 'Address';//var $scaffold;}?I created a model called address.php:?phpclass Address extends AppModel{var $name = 'Address';var $belongsTo = array('User' =
 array('className'= 'User', 'conditions' = '', 'order'= '', 'foreignKey' = 'user_id'
 ) );}?I attempt to access the URL .../address/add and get the following ModelNot Found error:Fatal: Unable to load model AddresFatal: Create Class:
?phpclass Addres extends AppModel{var $name = 'Addres';}?in file : app\models\addres.phpWhy is it looking for addres.php with a class named 'Addres' instead of
address.php and 'Address'?Thanks in advance for your help!Jimhttp://www.photips.com

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: API documentation needs stylesheet change

2006-08-15 Thread John Zimmerman [gmail]
Gwoo updated the stylesheet already.http://api.cakephp.org/class_controller.htmlRefresh your the page if it doesn't show up.I marked it as trivial because it did not present a security concern or logical error in a code example that could lead to unworkable code (which can be very frustrating and/or lead to security problems/bugs later).
But I do think the suggestion is a good improvement to readability which is also important to reduce frustration. Documentation is very important as well. Priority just needs to be looked at in the scheme of all the work that needs to be done and what should be completed first. Trivial items can often be taken care of faster than items marked as a higher priority. So they might look for little things to do quickly (which may have been the case since gwoo already updated it).
It is always nice when a community can pitch in to help with bugs/improvements/suggestions etc. I really like being able to tap into the community and the developers.I think one thing that is always good to remember that the developers/admins/documentation managers for the project do get quite a bit of flac for making CakePHP, its related documentation, and tools for the community available for all of us. Phrasing suggestions and improvements in the most neutral and 
P.C. way possible will help everyone involved (even if you are frustrated and feel it is the developers' fault something isn't working).I do think it is more readable and that does make it more useful.Thanks!
On 8/15/06, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:Thank you for entering that ticket, John.I meant to write that you can see a sample of the improved appearance
athttp://jengels.maxsoft.com/test/versus the existing page athttp://api.cakephp.org/class_controller.html
(The top of my sample page is not rendered correctly. I didn't botherto fix those parts of the layout, because they are not relevant to thecomparison. The changes are further down the page.)This is a trivial problem only to those who believe clear documentation
is not very important. I think experience suggests otherwise. Even anincomplete project can be quite useful if it includes good, readabledocumentation.But I'm guessing you might agree, since you took the trouble to
ticket-ize it.Regards,Ralph

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Pages Controller Subpages

2006-08-04 Thread John Zimmerman [gmail]
Gwoo answered my question on IRC.Here it is for anyone interested (was sort of obvious after he stated it).For static sub pages just create a subdirectory in your /app/views/pages directory.So if I wanted a page with url 
http://example.com/pages/about/companyThe path for that would be /app/views/pages/about/company.thtmlKind of a basic question but hope it helps someone else.
On 8/3/06, John Zimmerman [gmail] [EMAIL PROTECTED] wrote:
In the code for the pages controller there are variables there for subpages.Is anyone using static subpages with the pages controller?I browsed around for documentation about it, but came up empty.




--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Comment in Simple User Authentication example is wrong

2006-08-04 Thread John Zimmerman [gmail]
Do you mind submitting a ticket on http://trac.cakephp.org?That way it gets on their todo lists.On 8/3/06, ebourqui
 [EMAIL PROTECTED] wrote:
Not really a question, but a statement, since I couldn't submit a bugat trac.cakephp.org;The comment in the Simple User Authentication section of the CakePHPmanual (as of 8/3/2006) is wrong. It says:
// Note: hopefully your password in the DB is hashed,// so your comparison might look more like:// md5($somone['User']['password']) == ...it should read:// Note: hopefully your password in the DB is hashed,
// so your comparison might look more like:// ... == md5($this-data['User']['password']))because $someone is the data pulled from the database, which wouldalready be hashed, whereas $this-data['User']['password'] is the data
from the form, which has not been hashed yet.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Comment in Simple User Authentication example is wrong

2006-08-04 Thread John Zimmerman [gmail]
Sorry. Didn't catch the first part of the post. I will submit the bug right now.What was the hangup with submitting a ticket on trac?On 8/4/06, John Zimmerman [gmail]
 [EMAIL PROTECTED] wrote:
Do you mind submitting a ticket on http://trac.cakephp.org?That way it gets on their todo lists.
On 8/3/06, ebourqui
 [EMAIL PROTECTED] wrote:

Not really a question, but a statement, since I couldn't submit a bugat trac.cakephp.org
;The comment in the Simple User Authentication section of the CakePHPmanual (as of 8/3/2006) is wrong. It says:
// Note: hopefully your password in the DB is hashed,// so your comparison might look more like:// md5($somone['User']['password']) == ...it should read:// Note: hopefully your password in the DB is hashed,
// so your comparison might look more like:// ... == md5($this-data['User']['password']))because $someone is the data pulled from the database, which wouldalready be hashed, whereas $this-data['User']['password'] is the data
from the form, which has not been hashed yet.



--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Pages Controller Subpages

2006-08-03 Thread John Zimmerman [gmail]
In the code for the pages controller there are variables there for subpages.Is anyone using static subpages with the pages controller?I browsed around for documentation about it, but came up empty.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: FCK eventually sorted out - For AD7Six (and those interested)

2006-08-01 Thread John Zimmerman [gmail]
@Jon BennettCan you post a snippet of what you did to get widgEditor working? I am trying to get it up and running but can't get it to load within cake.ThanksOn 7/24/06, 
Jon Bennett [EMAIL PROTECTED] wrote:
  (and this is just my personal preference), I've much preferred TinyMCE  to FCK.It's much lighter-weight, has a more new-school API, and works  well with Cake's field-naming conventions.
 Thanks for that, I will definitely be checking out TinyMCE.I've just implementedTheManInBlue's widgEditor, very lightweight,though it also doesn't work with Cake's naming conventions (nothing in
_POST even, just 'true'), so I have to do:textarea name=NewsBody id=NewsBody class=TextareaBigwidgEditor?php echohtml_entity_decode($html-tagValue('News/body'); ?/textarea
check out: http://www.themaninblue.com/experiment/widgEditor/I need to extend it though to handle images better, what I'm, thinkingof doing is having a fixed height, scrollable div with all the
uploaded images as thumbnails in it, which if you click inserts thatimage into the textfield, hopefully at the last cursor insertationpoint, but at the beginning would be fine also.I'll try to knock up a snippet at some point if it all works according to plan.
jb--jon bennettt: +44 (0) 1225 341 039 w: http://www.jben.net/iChat (AIM): jbendotnet Skype: jon-bennett
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: FCK eventually sorted out - For AD7Six (and those interested)

2006-08-01 Thread John Zimmerman [gmail]
Nevermind. WidgEditor does not load if you have an onload function defined in your body tag.I had body  . Removed the onload and it worked fine.Kind of annoying. I was preloading images with my startup function.
On 8/1/06, John Zimmerman [gmail] [EMAIL PROTECTED] wrote:
@Jon BennettCan you post a snippet of what you did to get widgEditor working? I am trying to get it up and running but can't get it to load within cake.Thanks
On 7/24/06, 
Jon Bennett [EMAIL PROTECTED] wrote:

  (and this is just my personal preference), I've much preferred TinyMCE  to FCK.It's much lighter-weight, has a more new-school API, and works  well with Cake's field-naming conventions.
 Thanks for that, I will definitely be checking out TinyMCE.I've just implementedTheManInBlue's widgEditor, very lightweight,though it also doesn't work with Cake's naming conventions (nothing in
_POST even, just 'true'), so I have to do:textarea name=NewsBody id=NewsBody class=TextareaBigwidgEditor?php echohtml_entity_decode($html-tagValue('News/body'); ?/textarea
check out: http://www.themaninblue.com/experiment/widgEditor/
I need to extend it though to handle images better, what I'm, thinkingof doing is having a fixed height, scrollable div with all the
uploaded images as thumbnails in it, which if you click inserts thatimage into the textfield, hopefully at the last cursor insertationpoint, but at the beginning would be fine also.I'll try to knock up a snippet at some point if it all works according to plan.
jb--jon bennettt: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: PagesController and titles

2006-07-29 Thread John Zimmerman [gmail]
I didn't find it in the manual either. I just stumbled upon the variable playing around with pr() in various places and figured out I could set the variable in the view too.the pr() function is very useful for just exploring variables in Cake.
Just do a pr($this) in your controller, view, or model and you can get quite a bit of information.On 7/28/06, Sergei 
[EMAIL PROTECTED] wrote:John Zimmerman [gmail] писал(а): ?php $this-pageTitle = 'New Title For Static Page'; ?
damnit. I knew there is a better method!Though I don't recall this in manual..S.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---



Re: Advanced Routing question/ 疑问

2006-07-29 Thread John Zimmerman [gmail]
I believe this would mean that either one or more of your .htaccess files are missing or mod_rewrite is not working.There are 3 .htaccess files/.htacess/app/.htaccess/app/webroot/.htaccess
Check to make sure they are all present and are readable by the webserver.If all are present and readable check to make sure mod_rewrite is enabled and configured properly.You can get your settings for PHP with the phpinfo() function.
On 7/29/06, JitZhang [EMAIL PROTECTED] wrote:
我配了/setingCAKE_ADMIN = 'edit'http://192.168.0.1/index.php/edit/accounts这个行/this isOKhttp://192.168.0.1/edit/accounts
这个行不行/no ok不知怎么能去掉index.php?/how to move of index.phpin URL望给我回信帮助!/help?thanks!
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---



Pages / CMS / Routing Idea (looking for some feedback)

2006-07-26 Thread John Zimmerman [gmail]
Here is what I am currently thinking about doing (maybe someone has
already done it or tried). I am just looking for some feedback on this.So the ultimate goal is to get rid of the pages or posts part of the url 
http://example.com/pages/home, without having to specify a new route definition for every page.
So instead of http://example.com/pages/home
 it would be http://example.com/home.So my idea is to have the following happen when a page is loaded (ignoring plugins and route definitions in this example)
Cake checks for a controller named 'home'If controller
does not exists it tries to use the default action in a specified
controller (like the pages controller) instead of displaying the
controller does not exist error.
This way I can have the following/products --which is a controller/home -- which is not a controllerand
/home will be passed as a parameter to a controller I have called
'cms_controller' for display instead of using something like /cms/home.
Anyone done this already?Anyone have any ideas on whether this is possible to implement in routes.php, bootstrap.php, or app_controller.php?Any input is appreciated.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: How to use value used in input tag in view

2006-07-22 Thread John Zimmerman [gmail]
Is your field name actually 'First_name' or is it 'first_name'?This might be part of the problem.When you sumit the form via 'post' your value should come in an array called $data in the controller.
In the controller action you are submitting to insert the following code near the top and you can see how the data looks when it is submitted...if ( !empty($this-$data) ) { pr($this-data);} else {
 echo NO DATA SUBMITTED;}I did not actually run the above code but it should work to give you an idea of what is happening.If you still have problems post back with pastes ( 
http://cakephp.org/pastes/add ) for your database, controller, view, and model and someone will be able to help you sort it out.You can also build your MVC structure by using 'bake' from the command line. Change directory to /cake. then run 'php scripts/bake.php' and follow the directions from there to get started.
Baking the MVC structures (after you ahve created the database) will give you an idea for how it is to be setup.On 7/22/06, 
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
In my application, I am usingaadd form to add user records and forthis i am using the input tag in the view file but i am unable to getthis value in the controller so that i can save this value in thedatabase.
I am using the following input function :-$html-input('Employee/First_name', array('size' = 20))so the value stored in this input feild can be used in controllerthanks in advance
Neeraj
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Why my fav.ico does not work properly?

2006-07-22 Thread John Zimmerman [gmail]
In Internet Explorer 6 save the page to your favorites.Then navigate to another page (i.e. Google.com).Then click on the page you saved in your favorites.That brings it up 100% in Internet Explorer for me.
Also, how did you create your favicon? Did you embed sizes other than 16x16?On 7/22/06, RosSoft [EMAIL PROTECTED]
 wrote:the correct way to use favicon is:link rel=shortcut icon href="" echo $this-webroot?
favicon.icotype=image/x-icon /

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: How to use value used in input tag in view

2006-07-22 Thread John Zimmerman [gmail]
Also, I don't know if this is causing you a problem or not, but it would be a best practice to follow the Cake conventions (http://manual.cakephp.org/chapter/22) whenever it is practical to do so.
The piece of code I am refering to most is the capitalization of First_name, both in the database and in the code.Cake does a lot of magic behind the scene and following the conventions helps make it happen smoothly.
If you want the field to be capitalized on out put somewhere cake has some pretty cool functions in the Inflector class.You could do ...
echo Inflector::humanize('first_name');And the output would be First Name.
But Ryan's suggestions sound like good ones.Let us know how it goes.On 7/22/06, ryanb006 [EMAIL PROTECTED]
 wrote:Just noticed this:1) Your view file should be the same name as the function that renders
it.(i.e. add.thtml)2) You may have just mistyped it, but your controller should beemployees_controller.phpYour paths/folders were fine though.Ryan
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: website prototyping

2006-07-22 Thread John Zimmerman [gmail]
If you are looking to generate some UI mockups you could use http://www.nvu.com/index.phpIf you are looking to do sort of a screencast type demo, Wink is not open source, but it is a very good free program. 
http://www.debugmode.com/wink/On 7/22/06, codecowboy [EMAIL PROTECTED]
 wrote:Does anyone know of any open source software for building prototypes
(screen shots) of your website.Something that would be useful fordescribing various UI possibilities.thank you

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Point of Sanitize-sql?

2006-07-21 Thread John Zimmerman [gmail]
Only if magic quotes is enabled in php.iniOn 7/20/06, yeastinflexion [EMAIL PROTECTED] wrote:
i thought php automatically addslashes to posted data?

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Why my fav.ico does not work properly?

2006-07-21 Thread John Zimmerman [gmail]
Should belink rel=shortcut icon href="" type=image/x-icon /
And make sure your favicon is in /app/webroot/favicon.icoOn 7/21/06, saavedrajj [EMAIL PROTECTED]
 wrote:I just add the linelink rel=shortcut icon href=""
favicon.ico type=image/x-iconin app/views/layouts/default.thtmland nothing happensif I copy the favicon.ico at app/webroot/imgand then add the line:link rel=shortcut icon href=""
type=image/x-icononly works on Firefox...What I'm doing wrong?

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Why my fav.ico does not work properly?

2006-07-21 Thread John Zimmerman [gmail]
Also make sure to clear the cache, close, and then re-open the browser (especially IE) to get the favicon to display. Some versions of IE only display the favicon if you save the site in your Favorites.
On 7/21/06, John Zimmerman [gmail] [EMAIL PROTECTED] wrote:
Should belink rel=shortcut icon href="" type=image/x-icon /

And make sure your favicon is in /app/webroot/favicon.icoOn 7/21/06, saavedrajj 
[EMAIL PROTECTED]
 wrote:I just add the linelink rel=shortcut icon href=""
favicon.ico type=image/x-iconin app/views/layouts/default.thtmland nothing happensif I copy the favicon.ico at app/webroot/imgand then add the line:link rel=shortcut icon href=""
type=image/x-icononly works on Firefox...What I'm doing wrong?



--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Why my fav.ico does not work properly?

2006-07-21 Thread John Zimmerman [gmail]
link rel=shortcut icon href="" echo $html-url('/favicon.ico');? type=image/x-icon /This one adds the full url using the Cake HtmlHelper
On 7/21/06, John Zimmerman [gmail] [EMAIL PROTECTED] wrote:
Also make sure to clear the cache, close, and then re-open the browser (especially IE) to get the favicon to display. Some versions of IE only display the favicon if you save the site in your Favorites.

On 7/21/06, John Zimmerman [gmail] [EMAIL PROTECTED]
 wrote:
Should belink rel=shortcut icon href="" type=image/x-icon /


And make sure your favicon is in /app/webroot/favicon.icoOn 7/21/06, saavedrajj 

[EMAIL PROTECTED]
 wrote:I just add the linelink rel=shortcut icon href=""
favicon.ico type=image/x-iconin app/views/layouts/default.thtmland nothing happensif I copy the favicon.ico at app/webroot/imgand then add the line:link rel=shortcut icon href=""
type=image/x-icononly works on Firefox...What I'm doing wrong?





--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Why my fav.ico does not work properly?

2006-07-21 Thread John Zimmerman [gmail]
Didn't try your code out yet, but right off your closing head tag is invalidneeds to be /headOn 7/21/06, saavedrajj 
[EMAIL PROTECTED] wrote:mmm... doesn't work, this is my code!DOCTYPE html PUBLIC -//W3C//DTD XHTML 
1.0 Transitional//ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdheadtitleTitle/title
link rel=shortcut icon href="" type=image/x-icon /?php echo $html-charset('ISO-8859-1'); ?meta name=description content=This is my Description /
meta name=keywords content=keyword1, keyword2 /?php echo $html-css('default'); ?headbody?php echo $content_for_layout; ?
/body/html
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Why my fav.ico does not work properly?

2006-07-21 Thread John Zimmerman [gmail]
Try the following...!DOCTYPE html PUBLIC -//W3C//DTD XHTML 
1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
htmlhead titleTitle/title
 link rel=shortcut icon href="" echo $html-url('/favicon.ico');? type=image/x-icon /
 ?php echo $html-charset('ISO-8859-1'); ?
  meta name=description content=This is my Description /  meta name=keywords content=keyword1, keyword2 /
  ?php echo $html-css('default'); ?
/headbody
  ?php echo $content_for_layout; ?
/body/html
On 7/21/06, John Zimmerman [gmail] [EMAIL PROTECTED] wrote:
Didn't try your code out yet, but right off your closing head tag is invalidneeds to be /headOn 7/21/06, saavedrajj
 
[EMAIL PROTECTED] wrote:
mmm... doesn't work, this is my code!DOCTYPE html PUBLIC -//W3C//DTD XHTML 
1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtdheadtitleTitle/title
link rel=shortcut icon href="" type=image/x-icon /?php echo $html-charset('ISO-8859-1'); ?meta name=description content=This is my Description /
meta name=keywords content=keyword1, keyword2 /?php echo $html-css('default'); ?headbody?php echo $content_for_layout; ?

/body/html


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Save Date 1970

2006-07-21 Thread John Zimmerman [gmail]
What version of CakePHP are you using? What version of PHP and MySQL?I just did a grep on the cake directory and found no reference to mktime().I then setup a test model/controller/view and used a DATETIME MySQL field type. I scaffolded everything and CakePHP brought up 1946 as the earliest year with no modifications on my part (in a dropdown box).
I am going to test out parameters, but everything saved correctly in 1946 for me.I am using CakePHP v1.1.6, PHP 5.x, and MySQL 5.xOn 7/21/06, 
Nick [EMAIL PROTECTED] wrote:
How do I link into the existing Cake infrastructure for saving dates?Where is that specific code, where it's using the mktime function.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Save Date 1970

2006-07-21 Thread John Zimmerman [gmail]
And the webserver is Apache on DebianOn 7/21/06, John Zimmerman [gmail] [EMAIL PROTECTED] wrote:
What version of CakePHP are you using? What version of PHP and MySQL?I just did a grep on the cake directory and found no reference to mktime().
I then setup a test model/controller/view and used a DATETIME MySQL field type. I scaffolded everything and CakePHP brought up 1946 as the earliest year with no modifications on my part (in a dropdown box).
I am going to test out parameters, but everything saved correctly in 1946 for me.I am using CakePHP v1.1.6, PHP 5.x, and MySQL 5.x
On 7/21/06, 
Nick [EMAIL PROTECTED] wrote:

How do I link into the existing Cake infrastructure for saving dates?Where is that specific code, where it's using the mktime function.



--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Save Date 1970

2006-07-21 Thread John Zimmerman [gmail]
So far I am unable to get $html-dateTimeOptionTag() to display a year below 1946, but I did manually modify the database entry to make the year 1700 and it displays correctly when I view the timestamp output by Cake, but when I go to edit that record the year still stops at 1946.
Anyone have any insight into the dateTimeOptionTag?On 7/21/06, John Zimmerman [gmail] [EMAIL PROTECTED]
 wrote:And the webserver is Apache on Debian
On 7/21/06, John Zimmerman [gmail] 
[EMAIL PROTECTED] wrote:
What version of CakePHP are you using? What version of PHP and MySQL?I just did a grep on the cake directory and found no reference to mktime().
I then setup a test model/controller/view and used a DATETIME MySQL field type. I scaffolded everything and CakePHP brought up 1946 as the earliest year with no modifications on my part (in a dropdown box).
I am going to test out parameters, but everything saved correctly in 1946 for me.I am using CakePHP v1.1.6, PHP 5.x, and MySQL 5.x
On 7/21/06, 
Nick [EMAIL PROTECTED] wrote:


How do I link into the existing Cake infrastructure for saving dates?Where is that specific code, where it's using the mktime function.





--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Bug: using multiple models in controller

2006-07-21 Thread John Zimmerman [gmail]
I believe if you add the multiverse onto the end of any line of your sources.list that has universe and then do an 'aptitude search java' you will get the sun packages again. Just run 'aptitude install packagename'.
I did this with Ubuntu and it works fine.Should be similar with a straight Debian distro.On 7/17/06, invincible 
[EMAIL PROTECTED] wrote:I've noticed.Message passed.Debian doesn't seem to have a problem with the java licence anymore
(thanks to Sun).
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Missing Database Table

2006-07-21 Thread John Zimmerman [gmail]
http://www.cakephp.org/pastes/addCan you create some pastes of your code?On 7/21/06, Matt2012 
[EMAIL PROTECTED] wrote:Dont know whats happening - CAKE loading fine the homepage
definitely connecting to the right database but what ever table I putinuseTable its saying its missing. (I started off with the default table'trains' for model Train).Not had this problem before.
Anyone any ideas?
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Missing Database Table

2006-07-21 Thread John Zimmerman [gmail]
What versions of the following are you using: PHP, DB Type and Version (i.e. MySQL 5), CakePHP?What operating system are you running the webserver on?And can you dump the SQL schema for your database as well?
One thing to double check is that the table name is the plural form instead of singular. i.e. 'trains' instead of 'train'Set your debuge level in /app/config/core.php to 3 as well to get some more error messages.
On 7/21/06, Matt2012 [EMAIL PROTECTED] wrote:
well theres not all that much to it (I think you can ignore the view?)http://www.cakephp.org/pastes/show/2f021e23b8505de6867f55b79f090276
I appreciate the extra eyes..!
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Need examples of CakePHP driven e-commerce sites

2006-07-20 Thread John Zimmerman [gmail]
BakeSale is one in progress I believe.I will have a custom site done by the end of the month that is an ecommerce store. After it is running I will look at extracting a distributable application with it.Can you think of any reason not to use it for ecommerce?
On 7/20/06, 379 the manifesto [EMAIL PROTECTED] wrote:
Could anybody point me towards a CakePHP driven e-commerce site please?I need to convince the other guys at work that Cake would be areasonable framework to build our next project with.I think its great, but some of my colleagues are more set in their
ways...
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Admin Route

2006-07-20 Thread John Zimmerman [gmail]
I have the same kind of setup going except that my 'admin_controller.php' is actually called 'administrators_controller.php'My route looks like
$Route-connect('/admin', array('controller' ='administrators', 'action' ='index'));I have no problems using it this way, and I maintain administrators seperate from other users so in my case 'administrators' makes sense, since there can be multiple administrators.
CakePHP is probably having a problem with routing with admin routes enabled along with the index action of your admin controller.My guess is that your best option would be to rename your admin_controller.php to administrators_controller.php. I know that works at least.
On 7/20/06, cammo [EMAIL PROTECTED] wrote:
Hi There,I am able to get the admin route to work for everything except for thehttp://path/to/admin/ I can get it to work forhttp://path/to/admin/users
 http://path/to/admin/add etc... but not thedefault admin path. I tried adding a route to the routes.php file$Route-connect('/admin', array('controller' = 'admin', 'action' =
'index'));I have an admin controller and an index funtion and view but it comesup with address not found, has anybody had this problem before?Thanks in advance
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Hosting (i.e. Dreamhost)

2006-07-19 Thread John Zimmerman [gmail]
@chrisI have the SESSID popup on a couple of custom scripting sites, but it wouldn't stick around. Was kind of weird.You might try turning the extra security option off in the controll panel on your domain and see if that helps. It wasn't a regular occurance for me, but I did see it happen.
@stefanoIf problems come up with dreamhost again I think I will request to be moved to another server. I am guessing this affects my static IP's though, hI do check 
www.dreamhoststatus.com quite often actually, and while I understand things happen, things have just been happening way too often lately.So far the response I got from their support has been pretty friendly but consisted on we are working on it or are you sure you are programming your scripts right?.
While one site is a mess of code I inherited, the others are actually either based on Cake or fairly well thought out. The database performance issue affects them all.Thanks for all the suggestions.
Additional host recommendations are still welcomed.Thanks!On 7/19/06, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:Have any of you dreamhost-based bakers had problems with SESSID as a
get variable in the address bar? I've have the development copy of anapp on dreamhost for a few months now, and I haven't been able to getrid of the get variable...
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: CakePHP 1.1.6.3264 Released

2006-07-19 Thread John Zimmerman [gmail]
First thing you should do when upgrading from 1.0 is replace your .htaccess files and the index.php files in your /app directory with the ones from the new /app directory.Then compare your files in /app/config with the new ones and make changes as necessary, usually replacing your file with the one fro m the new installation and then adding your modifications to the new file.
Then you will have to troubleshoot any other errors that come up.On 7/19/06, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
From 1.0.0.2378. Sorry I forgot to search, will have a look now.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: trying to create a form builder

2006-07-19 Thread John Zimmerman [gmail]
I haven't looked at it too closely lately but WebsiteBaker has a sort of form builder that might be helpful in answering some design questions.It is nothing fancy but it lets you define as many fields as you want.
On 7/19/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Any progress on this? I am facing the same problem.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Getting scaffolding to work in /admin

2006-07-19 Thread John Zimmerman [gmail]
Baking your controllers for the admin section would be the best solution.You will get the main funcitonality of scaffolds which can then be customized to create a proper admin interface and change over time.
Even if it worked, if you rely on scaffolding for any part of your site that is not temporary, the next release of Cake could produce slightly different scaffolding which completely breaks what you were relying on for the admin interface
There is a reason not to rely on scaffolding for anything other than initial development.On 7/19/06, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
Hey guys,I've done a search and can't seem to find anything concrete on how toget the scaffolding working for models when using the CAKE_ADMINsetting.I've seen 
https://trac.cakephp.org/ticket/327 and phpNut, I take yourpoint about scaffolding not being suitable for production but in someinstances, it would be really handy.So, if this is not possible, should I use the 
bake.php script andcreate the everything that way?Sorry, I'm still just learning about everything and I'm still sussingout best practices.Best Regards,Ryno
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Time Zone ?

2006-07-18 Thread John Zimmerman [gmail]
Do you know if your server's time is UTC?One way you can do it is log all times as UTC and then only convert them to local time upon display based on either a user's timezone or a timzone variable set in your cake app.
I have some basics going for timezones like this, but maybe somebody has a more robust solution?On 7/18/06, seefai 
[EMAIL PROTECTED] wrote:Hi brother,I am Andy from Malaysia and just a begineer to cakePHP.
I having a problem that when i try to save a Created/Modified date (ByCake's Default) in to the database, i will get 8 hours delay of thetime, can i know how to solve itThanksBest wishes,
Andy
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Hosting (i.e. Dreamhost)

2006-07-18 Thread John Zimmerman [gmail]
I have recently consolidated a bunch of the websites I have been working on to Dreamhost, mainly because I originally planned to port some of them to Rails before I came across CakePHP.Dreamhost has been giving me headaches reguarding phpMyAdmin crapping out, their own control panel being unresponsive, email being significantly delayed, email being rejected when sent through their SMTP server, and most importantly MySQL performance is intermittently horrible. Sometimes the database connection or lack there of causes a site to stop loading completely.
Anyway, I have two questionsIs anyone else here using Dreamhost to host CakePHP projects?What would you recommend for a web host if you do not use Dreamhost?My main reason for going with dreamhost was Rails support and shell access via SSH. I also like their ability to host many domains under one login. Rails support is no longer a necessity.
One shared setup I am looking at is http://www.resellerzoom.com/ which is the reseller portion of hostingzoom. Any one have experience with them?Any information is appreciated.


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Turn off Cake processing for a file via view

2006-07-17 Thread John Zimmerman [gmail]
Does putting the file in /app/webroot/files/filename.type and then accessing it via a url like http://example.com/app/webroot/files/filename.type not work?
You should also be able to do http://example.com/files/filename.type if mod_rewrite is working correctly.This would eliminate the need to write special code to do this.
If you are trying to protect the files to only be downloaded via a login you will need to move them out of the webserver's webroot and serve them using PHP.On 7/17/06, 
I. E. Smith-Heisters [EMAIL PROTECTED] wrote:
I tried doing a $this-redirect() in the view to the file, eg.(/app/views/resources/files/foo) but it still came up with a missingcontroller error. The following code allows me to do what I'm trying.Hope someone finds it useful.
Note that the 'dl' type makes the browser create a Save As dialog. Toturn that off and make the browser decide what to do depending on themime-type, comment out the Content-disposition line.
Thanks for your help, all.-Ian?php$this-pageTitle = $resource['Resource']['name'];$location = $resource['Resource']['location'];$file ={$_SERVER['DOCUMENT_ROOT']}/app/views/resources/files/{$location};
??phpif($resource['Resource']['type'] === 'include') {//echo $this-render(files/{$location});include($file.thtml);} elseif ($resource['Resource']['type'] === 'link') {
$this-controller-redirect($location);} elseif ($resource['Resource']['type'] === 'dl') {$this-layout = null;$this-autoLayout = false;
$mimeType = mime_content_type($file);if (isset($mimeType)  strlen($mimeType)  0)header(Content-Type: $mimeType);header(Content-Disposition: attachment; filename= .
basename($file));header(Content-Length:  . filesize($file));@readfile ($file);die;}?
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Bug: using multiple models in controller

2006-07-16 Thread John Zimmerman [gmail]
You might want to jump on the IRC channel and see if you can chat PHPNut up quick.If not then I would probably open a ticket and if nothing else they will explain a reason for it to work the way it does.
On 7/16/06, invincible [EMAIL PROTECTED] wrote:
I've just again looked into cake/libs/controller/controller.phpController::$modelClass (not modelName) is used in GenerateFieldNames()and cleanUpFields().Tough Controller::ConstructClasses populates the array
Controller::$modelNames[](from Controller::$uses).the 'bug' seems to be concentrated here.Can i ticket this or is it the way it is supposed to work?anyone?Thanks in advance.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Turn off Cake processing for a file via view

2006-07-16 Thread John Zimmerman [gmail]
You can put the file in the /app/webroot directory and then just reference the file's url directly.For example when I am developing I usually keep a phpinfo.php file that just executes the phpinfo() command in the webroot.
When I want to link to it I just use http://example.com/app/webroot/phpinfo.php The file is not processed by Cake and comes up fine.
On 7/16/06, I. E. Smith-Heisters [EMAIL PROTECTED] wrote:
Hi,is there a way that a view can just dump a file without Cake doing anyprocessing. Right now, I sort of have it working by doing somethinglike this:?phpif($resource['Resource']['type'] === 'include') {
echo $this-render(files/{$location});$this-autoLayout = false;} elseif ($resource['Resource']['type'] === 'dl') {$file ={$_SERVER['DOCUMENT_ROOT']}/app/views/resources/files/{$location};
$mimeType = mime_content_type($file);$fp = fopen($file, rb) or die ('File not found');if (isset($mimeType)  strlen($mimeType)  0)header(Content-Type: $mimeType);
header(Content-Disposition: attachment; filename= .basename($file));header(Content-Length:  . filesize($file));while (!feof($fp)) {
print fread($fp, 4096);}fclose($fp);}?But the downloaded file is just the CakePHP page with the file contentsincluded within! And furthermore, this seems to be a kludgey and
unportable solution, even if I could get it working.Is there anyway to just tell Cake to turn serving the file over toApache?TIA. And sorry if this question has already been asked; I don't think I
found the right search terms.-Ian
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Bug: using multiple models in controller

2006-07-16 Thread John Zimmerman [gmail]
http://irc.cakephp.org/irc.htmlIf you have a java plugin installed for your web browser you can just go to the link above and login to the irc channel via the java applet.
On 7/16/06, invincible [EMAIL PROTECTED] wrote:
Thanks man.I've found that GenerateFieldNames() is only used in scaffold andbake.php.The only real bugger seems to be cleanUpFields().K i'll have to install a ircclient on debian here then.
And it is weekend of course (just came back from diner myself).Thanks again.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: redirect after a short delay

2006-07-14 Thread John Zimmerman [gmail]
As suggested above, headHelper is what you are looking for.http://cakeforge.org/snippet/detail.php?type=snippetid=56This will allow you to insert the _javascript_ between the head tags to redirect after a delay. The code to do this will go in whatever view you want to redirect from.
The link above is to the snippet page which has links to RosSoft's website. It does require UtilHelper but that is available in the snippets as well.For directions on how to set it up the RosSoft link should guide you through.
Good luck and happy baking!On 7/14/06, eDevil [EMAIL PROTECTED] wrote:
Thanks for the comments. AD7six, you're right but I dont want to send amessage therefore Flash and setFlash are not useful to me. All I wantis to display whatever there is in /app/views/users/logout.thtml and
then redirect after 5 seconds.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: work with relationships in controller and view

2006-07-14 Thread John Zimmerman [gmail]
http://manual.cakephp.org/chapter/22Reviewing the conventions will help you out a lot here. Cake will then be able to do a lot of the work for you.After reviewing conventions take a look at the chapters on Models.
Basically your tables should be 'areas_events'area_idevent_id'events'idname'areas'idnameAfter reviewing models and conventions and using the above as a general guideline you should be on your way to making things work.
HTHOn 7/14/06, Kenia [EMAIL PROTECTED] wrote:
hi...i have tables:events_areasid_areaid_eventareasid_areanameeventsid_eventnamei need to put in the view add of Event the multiple select with the
existing areas.how I make this? thanks... and sorry my english is terrible

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Setting a variable throughout cake when user logs in

2006-07-14 Thread John Zimmerman [gmail]
You still call the function in your beforeFilter.The general way that I am doing this is in my AppController I execute the beforeFilter = 'checkAccess';In my checkAccess function I first check a variable called $this-authorized for being null. If it is set to null I assume everyone has access.
Otherwise I have the specific roles defined in an array in the $this-authorized variable that have access.So pseudocode is
class AppController extends Controller{
 var $beforeFilter = 'checkAccess'; var $authorized = null;
 function checkAccess() {
 if($this-authorized == null) return true; //check to see if your logged in user's role is in the authorized array
 //if it is return true, if not redirect to login page, or if already logged in return false.
 }}
So in a controller that I want everyone to be able to access I can just not define the authorized array (it is set to null be default above).In a controller I want to restrict access to I would set it to an array of roles that get access.
My setup is a bit more complicated than this, but that is the general idea.On 7/14/06, Luke [EMAIL PROTECTED]
 wrote:Anybody have an answer for this?
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


viewPath and Admin URL's

2006-07-13 Thread John Zimmerman [gmail]
I just have a couple of questions here about proper use of viewPath variable and possibly making admin url's a little more automatic in the views.When I do the following...
$html-link('New Item', $this-viewPath.'/add');The URL that is created is...
http://example.com/controllers/controllers/addWhat I expected (logically, not that I am using this as intended) was...
http://example.com/controllers/addor
http://example.com/admin/controllers/adddepending on wether or not the admin route was being used.The idea with wanting it to work this way is that I can more easily re-use code from my views without re-writing the URL's every time.
Any ideas if I am doing something wrong?Ideas about submitting a feature request to trac?Thanks

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: file_get_contents()

2006-07-13 Thread John Zimmerman [gmail]
I replaced the following line of codereturn file_get_contents($url);with
$curl_handle = curl_init($url);curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT,10);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
$content = null;$content = curl_exec($curl_handle);
curl_close($curl_handle);return $content;and everything works fine.I sent a support request to my hosting support so they can figure out why file_open works with my original script when it was intended to be disabled in the server's 
php.ini.I will post back if I actually figure out why this is. The above code is good to have if you every have to convert file_get_contents calls to curl calls as I have run across several 3rd party libraries that use file_get_contents and similar calls.
On 7/11/06, John Zimmerman [gmail] [EMAIL PROTECTED] wrote:
I have found the issue with command line being different as well in some environments.That is usually due to the webserver either being on a different host than your shell server or your webserver is using PHP through CGI.
Both of my situations are being executed by the webserver and output is in the browser. The only difference is Cake.My phpinfo output tells me the setting is 'off' and when I eche the ini_get value for the setting it confirms off in both circumstances. But yet the non-cake script executes with no errors.
My host is dreamhost BTW, running PHP5.Really odd.Thanks for the replies.On 7/11/06, 
Samuel DeVore 
[EMAIL PROTECTED] wrote:I have found that in some cases my php from the command line is completely different from php as interpreted in the browser.
Sam DOn 7/11/06, nate
 [EMAIL PROTECTED] wrote:

Yeah, that's really odd.The only thing that comes to mind is an
errant ini_set, but it doesn't look like Cake is setting anything thatwould do that.All I could suggest is to try doing the read fromdifferent parts within the framework, i.e. app/webroot/index.php,bootstrap.php


, etc.See if you can narrow it down to a particular line or file.







--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: file_get_contents()

2006-07-11 Thread John Zimmerman [gmail]
The library that uses the file_get_contents() function on the external URL is not my code, but I can modify the library to use curl I guess and notify the author.I guess what is stumping me here is why it works correctly with a plain linear PHP script, but not in Cake. Cake causes the server configuration error, but the server should be fine since the PHP script executes successfully on the same server.
I can put my plain script at /app/webroot/script.php and it works. But going through the normal cake MVC pattern does not.Thanks for the suggestion. Any insight as to what is causing hte file_get_contents problems with Cake is appeciated.
I will change as much of it as I can to curl and see what happens.On 7/11/06, nate [EMAIL PROTECTED]
 wrote:Using any file functions (file_get_contents, fopen, etc.) against an
external URL is considered unsafe in general.Your best bet is to usecurl instead.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: file_get_contents()

2006-07-11 Thread John Zimmerman [gmail]
I have found the issue with command line being different as well in some environments.That is usually due to the webserver either being on a different host than your shell server or your webserver is using PHP through CGI.
Both of my situations are being executed by the webserver and output is in the browser. The only difference is Cake.My phpinfo output tells me the setting is 'off' and when I eche the ini_get value for the setting it confirms off in both circumstances. But yet the non-cake script executes with no errors.
My host is dreamhost BTW, running PHP5.Really odd.Thanks for the replies.On 7/11/06, Samuel DeVore 
[EMAIL PROTECTED] wrote:I have found that in some cases my php from the command line is completely different from php as interpreted in the browser.
Sam DOn 7/11/06, nate
 [EMAIL PROTECTED] wrote:
Yeah, that's really odd.The only thing that comes to mind is an
errant ini_set, but it doesn't look like Cake is setting anything thatwould do that.All I could suggest is to try doing the read fromdifferent parts within the framework, i.e. app/webroot/index.php,bootstrap.php

, etc.See if you can narrow it down to a particular line or file.





--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: How do I create a login element

2006-07-11 Thread John Zimmerman [gmail]
I just created a form in /app/elements/login.thtml with a username box and a password box with a login button.I conditionally check to see if the user is logged in within my element to display the current name of the logged in user with a logout button.
if($this-controller-Session-check('LoggedInUser')) {
 //display current username and logout button. logout button posts to /users/logout} else {
 //display login form. login form posts to /users/login}
I can render the login element on any page using $this-renderElement('login'); in my view or page layout.Works well for me. I can capture the page they were on using a hidden element in the form and redirect back to that page after login, or I can get that page from the cake controller.
The above is just a general description and rough code for what I did. I didn't copy and paste so you will most likely have to tweak it to make it worth anything.I do have this working quite well on a couple of sites I am developing so post back if you can't get it and I will put code into the CakeBin with some instructions.
On 7/11/06, John David Anderson (_psychic_) [EMAIL PROTECTED] wrote:
On Jul 11, 2006, at 6:44 PM, codecowboy wrote: Hi, I have followed the instuctions in chapter 21 of the manual to create a user authentication system.I have that system completely working.
 I want to create a login element that functions the same way.This way, I can place the login element in the left column of my layout. The problem that I am running into is that cake requires the view
 to be related to an action.I do not know how to tell cake that the login element is the view for the users/login action.I'd just leave it as an action and use $this-requestAction() to pull
it into places you want it displayed.?php echo $this-requestAction('/users/login', array('return')); ?-- John

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: How do I create a login element

2006-07-11 Thread John Zimmerman [gmail]
Sorry. That should have been /app/views/elements/login.thtmlOn 7/11/06, John Zimmerman [gmail] [EMAIL PROTECTED]
 wrote:I just created a form in /app/elements/login.thtml with a username box and a password box with a login button.
I conditionally check to see if the user is logged in within my element to display the current name of the logged in user with a logout button.
if($this-controller-Session-check('LoggedInUser')) {

 //display current username and logout button. logout button posts to /users/logout} else {

 //display login form. login form posts to /users/login}

I can render the login element on any page using $this-renderElement('login'); in my view or page layout.Works well for me. I can capture the page they were on using a hidden element in the form and redirect back to that page after login, or I can get that page from the cake controller.
The above is just a general description and rough code for what I did. I didn't copy and paste so you will most likely have to tweak it to make it worth anything.I do have this working quite well on a couple of sites I am developing so post back if you can't get it and I will put code into the CakeBin with some instructions.
On 7/11/06, John David Anderson (_psychic_) 
[EMAIL PROTECTED] wrote:
On Jul 11, 2006, at 6:44 PM, codecowboy wrote: Hi, I have followed the instuctions in chapter 21 of the manual to create a user authentication system.I have that system completely working.
 I want to create a login element that functions the same way.This way, I can place the login element in the left column of my layout. The problem that I am running into is that cake requires the view
 to be related to an action.I do not know how to tell cake that the login element is the view for the users/login action.I'd just leave it as an action and use $this-requestAction() to pull
it into places you want it displayed.?php echo $this-requestAction('/users/login', array('return')); ?-- John




--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Controller without association with a model

2006-07-10 Thread John Zimmerman [gmail]
Define a class variable called uses at the top of your setup controller class called 'uses' and set it to 'null'i.e.class SetupController extends AppController{ var $name = 'Setup'; var $uses = null;
 //actions below here}After that it will not look for a model.On 7/10/06, eDevil [EMAIL PROTECTED]
 wrote:I want to create an Installer for the application I built.
The first page collects information (user and database), when the formis submitted an SQL is dumped into the server and the second page willconfirm the installation (or show an error).The problem is that the setup application (setup_controller.php) doesnt
need to have any models assciated with it (or does it?) and I cantfigure out how to do this.Can anyone help? Thanks in advance.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


file_get_contents()

2006-07-10 Thread John Zimmerman [gmail]
I am having a bit of a problem with using an external library with Cake.I have a page that uses a 3rd party class to generate a map. I am porting this page from plain old PHP scripting into my cake environment.
The class works correctly when just being run in a standard PHP file. But as soon as I include (via vendor or require, tried both) in my Cake environment I have problems with the file_get_contents() function.
This is the warning that comes upWarning:  file_get_contents(): URL file-access is disabled in the server configuration
And the map will not load. The file which is a parameter of the above function is actually a URL to an external site.The server configuration shouldn't be at fault because on the same server the map loads with just a regular PHP script.
I have even tried moving all of the executated code dealing with the class creation and parameters to the view and it still gives the same error.Has anyone else had problems using something like file_get_contents() or have any insight on this?


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Odd firefox behaviour when posting form

2006-07-09 Thread John Zimmerman [gmail]
If there is any type of password field in firefox it will ask if you want to save your password.This is a Firefox feature and can be completely turned of under the Tools-Options-Passwords Tab in firefox.
If this is happening without a password type field then something else is definitely awry.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Frustrated with CakePHP

2006-07-08 Thread John Zimmerman [gmail]
In my endeavors with CakePHP I can definitely see documentation improving.The documentation is still lacking from where it needs to be but the best thing you can do is to submit a ticket on 
http://trac.cakephp.org to either have documentation written or updated.Open source is a community effort and making requests for what you need is part of that effort. Chances are if you need something, someone else will need it too, and the developers and maintainers can address the issue.
A while back I requested some more information on plugins since the manual page was blank. I submitted a track ticket. Someone was nice enough to write a little section on plugins.You can also have a lot of questions answered here or on IRC.
Part of the problem is that CakePHP has been changing (for the better). v1.0 wasn't released that long ago and v1.2 should be released in a few weeks (according to IRC logs). 1.2 addresses a lot of issues and requests that the community brought up, and the documentation should follow.
Everyone can help make CakePHP better, whether you are an inexperienced baker or PHPNut.On 7/8/06, ShepherdWeb 
[EMAIL PROTECTED] wrote:I chose CakePHP after extensive research and trying out a couple of
other frameworks.The biggest obstacle I've found to accomplishinganything in CakePHP is incomplete documentation.When I first got here I read the Manual, went through the blogtutorial, and tried some things out from the manual.Things couldn't
have been better.Now, as I try to dig in and build a real-worldapplication I'm finding that the documentation simply doesn't exist.The API is helpful.However, as a newbie to MVC in general, I havebigger hurdles.I need examples.I dug through the CakeForge snippets
and the WIKI tutorials, but found most of those examples are alsoeither incomplete or underdocumented as well.I am frustrated with this.I am a fairly experienced php and ASP.NET
developer.Programming is not new to me.What am I missing?

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Is there anyone who integrate CakePHP with Prado?

2006-07-06 Thread John Zimmerman [gmail]
I have no .NET experience whatsoever.Can you explain (just a little bit) why .NET is dumb?I have no doubt that it is, but it is working for some people. I just want to know where you think .NET is failing and what CakePHP/MVC has over it.
Not being confrontational, just curious.On 7/6/06, nate [EMAIL PROTECTED] wrote:
I came to PHP from .NET, so I can say with relative confidence that.NET is dumb.Since Prado is based on .NET, I can only infer thatPrado is also dumb.Whether or not Prado is actually dumb, I have noidea, because I've never used it.
So now why are we trying to do this?
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: cool editors for using with cakephp

2006-07-06 Thread John Zimmerman [gmail]
Thanks for the easyeclipse.org link.Anyone have experience with the EasyEclipse for Rails packages?Do they offer anything that is helpful to you with Rails development that would be cool to have in Cake development?


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: cool editors for using with cakephp

2006-07-05 Thread John Zimmerman [gmail]
I have been using just VIM for a while now. I usually have 3-4 terminals open with VIM sessions running. I have my .vimrc file setup so formatting happens the way I need it to.I use ditto to keep track of handy copy/pastes.
My main OS is Windows XP, but I use putty to SSH into either my linux test server or to my hosting service.I have tried out other IDE's but usually end up going back to my VIM setup.I have not tried Eclipse or Komodo, but have been thinking about it.
I would like to see something really geared toward CakePHP.But if you are just looking for a good editor VIM works great for me.On 7/5/06, 
Mika [EMAIL PROTECTED] wrote:
I used to use and be very happy with Eclipe and the Trustudio eclipeplugin, but nowdays I use ActiveState's Komodo. It's a commercialeditor but it's really good if you've got the cash.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Plurals Problem

2006-06-30 Thread John Zimmerman [gmail]
I have a little bit of a plurals problem.The setup I am trying to implement here is the following:Model: filter_criterion.phpTable: filter_criteriaController: filter_criteria_controller.php
What happens when accessing the hostname/filter_criteria url is that it says I need a model named 'FilterCriterium' but that is the wrong singular form because it should be 'FilterCriterion'.So I have edited app/config/inflections.php and added an entry to irregular plurals 'criterion' = 'criteria'. I have also tried various forms here with a filter prefix.
But basically it is not picking it up. I am assuming that it has something to do with my using 'filter_' in front of the controller/table/model.Every time it asks for a model named 'FilterCriterium'.
Any suggestions?

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Plurals Problem

2006-06-30 Thread John Zimmerman [gmail]
More info on the problem...So I have a Filter model and a
FilterCriterion model. A Filter hasMany FilterCriterion and a
FilterCriterion belongs to a FilterIf I load the Filters
controller it comes up fine if I have 'filter_criterion' =
'filter_criteria' in the irregularPlurals array in inflections.phpBut when I click on the controller for filter_criteria it asks for the model 'FilterCriterium'If
I remove the entry from inflections.php the Filters controller will
complain about not having access to a table called 'filter_criterions'
So it seems I either have something confused or wrong in the
inflections.php file or for some reason the inflection is not working
correctly when trying to go from plural to non-plural. It seems to
load ok (not tested 100% yet) when going from non-plural to plural.
ThanksOn 6/30/06, John Zimmerman [gmail] [EMAIL PROTECTED] wrote:
I have a little bit of a plurals problem.The setup I am trying to implement here is the following:Model: filter_criterion.phpTable: filter_criteriaController: filter_criteria_controller.php
What happens when accessing the hostname/filter_criteria url is that it says I need a model named 'FilterCriterium' but that is the wrong singular form because it should be 'FilterCriterion'.So I have edited app/config/inflections.php and added an entry to irregular plurals 'criterion' = 'criteria'. I have also tried various forms here with a filter prefix.
But basically it is not picking it up. I am assuming that it has something to do with my using 'filter_' in front of the controller/table/model.Every time it asks for a model named 'FilterCriterium'.

Any suggestions?



--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Scaffolding??

2006-06-29 Thread John Zimmerman [gmail]
When using scaffolding is it intentional that when you have actions and other variables defined in your controller besides the scaffold variable, that the scaffolding is not executed?
On 6/29/06, gwoo [EMAIL PROTECTED] wrote:
check this out:http://cakephp.org/screencasts/view/4

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Default page that doesnt need database access...

2006-06-27 Thread John Zimmerman [gmail]
A variable called $content_for_layout is set. This is the output for your view.You
can copy the layouts from the cake core library directory
cake/lib/templates I belive and modify them inside your
app/views/layouts directory. This should give you a pretty good idea
of what goes where and how to use the views.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Controller Redirect and Flash method problems

2006-06-27 Thread John Zimmerman [gmail]
I think if you use the html helper to generate your url's this will solve your problem.On 6/27/06, bitrace 
[EMAIL PROTECTED] wrote:Hi All!Great framework being baked here!
I'd appreciate a bit of help with the following.I'm running the lastest version of Cake (1.1.5.3148) on an Apachewebserver, where mod re-write is NOT available, so I've deleted the 3.htaccess files and
uncommented the BASE_URL line in core.php.Everything seems to berunning fine except some problem with the controllers flash andredirect methods which are producing some strange URLs.The problem occurs when I call $this-redirect('/users/view') or
$this-flash('/users/view') the new url produced is actually appendedto the EXISTING url instead of being appended to the BASE_URL.i.e.while I would expect a new url of the form
www.someurl.com/index.php/users/view I'm gettingwww.someurl.com/index.php/lastcontroller/lastaction/users/view.Is this a bug or have missed something in the configuration set up?
Thanks,Clive
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: NEWBIE QUESTION: code continues executing after this-redirect()?

2006-06-27 Thread John Zimmerman [gmail]
A return would make more sense than an exit I suppose.Thanks for the explanations.On 6/27/06, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
John Zimmerman [gmail] wrote: Is there a situation where you would not want to exit after a redirect?For myself I cannot think of any.afterFilter won't be called if you do an exit or die.
Now, I've never yet had to use afterFilter, but I try to structure sothat I can in the future. So the most I ever do after a redirect orrender is a return, ending method execution.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Roles, groups and users with Cake ACL

2006-06-26 Thread John Zimmerman [gmail]
On the road map for CakePHP version 1.2 an authentication class is listed.I am not sure what the details are for this class, but it might be helpful in kind of creating a cake standard for this type of thing.
On 6/26/06, sicapitan [EMAIL PROTECTED] wrote:
I used othAuth as it is readable both in code and in db tables.I hada little bit of trouble setting up, but thats because I'm a noob.Othy(CrazyLegs) has a nother version coming but it has not been tested yet,
still, you can grab it here:http://cakeforge.org/snippet/detail.php?type=packageid=14
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Creating a CakePHP Content Management System

2006-06-26 Thread John Zimmerman [gmail]
I would go with creating the seperate docs controller. That way if you did want to use a static page for something you can still make use of the pages controller.On 6/26/06, 
BlenderStyle [EMAIL PROTECTED] wrote:
Okay, so I want to create a basic CakePHP CMS. All I need is a tablewith pages and CRUB operations. I tried customizing the PagesController(pages_controller.php) but I had very little luck. It seemsPagesController works a lot differently than others.
So, my question is, would it just be easier to create a table calleddocs as opposed to pages so I can create a DocsController to do what Iwant? Then, I could just edit app/config/routes.php to point to my
DocsController instead of PagesController. Does this sound like a goodidea? Can anyone think of a word that means pages? All I could come upwith is docs. I guess it doesn't matter, I'm just particular aboutthings.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Saving strings to database - problem, becouse the string is numeric

2006-06-20 Thread John Zimmerman [gmail]
So far I have not had trouble doing this either, but if all else fails what happense if you cast that specific variable as a string in a beforeSave call.On 6/20/06, 
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I'm not having any problems with this... I can save any kind ofnumeric/whatever, and the quotes are there. Are you using the latestversion of cake?
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


MySQL Question

2006-06-19 Thread John Zimmerman [gmail]
This is more of a MySQL question than a CakePHP question, but I thought I would ask here first.I did a little bit of searching on this but can't find any decent leads to the answer so far. I am hoping someone here just knows, as I don't know exactly how to refer to what I am trying to do.
I am working with PHP 5, MySQL 5 and CakePHP 1.1.4.x.What I would like to know is thisIs it possible to have a virtual or composite type field in MySQL that is basically two other fields put together? AND if this feature exists in MySQL is it useable with CakePHP?
A simplistic example of this would be that in a table called 'users' I would have fields of 'first_name' and 'last_name'. What I would like to do is to be able to query for 'name' and get first_name.last_name.
So basically...first_name = Johnlast_name = Zimmermanwhen I query for 'name' I want to get John ZimmermanAny help is appreciated.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Stat Failed Warning?

2006-06-19 Thread John Zimmerman [gmail]
This may have been fixed in the latest bug fix release (released today!)http://cakeforge.org/frs/shownotes.php?release_id=108I think this may have something to do with it...
Adding fix for Ticket #1036.This corrects: No such file error with bake.php when choosing toinclude basic class methods message 
maybe related?On 6/19/06, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:Hi Folks,Wondering if anyone has run into this message when trying Graham's Ajax
Task List tutorial:* warning: filemtime() [function.filemtime]: stat failed for/var/www/html/drake/_cake/app/tmp/cache/models/dbomysql_drupal_list in/var/www/html/drake/_cake/cake/basics.php on line 694.
* warning: filemtime() [function.filemtime]: stat failed for/var/www/html/drake/_cake/app/tmp/cache/models/dbomysql_tasks in/var/www/html/drake/_cake/cake/basics.php on line 694.Getting the above intermittently when accessing the tasks controller.
Also, the Add Task button doesn't seem to be working (not sure if thetwo issues are connected).P.S. Fedora FC4/PHP 5.0.4/MySQL 4.1P.P.S. I've got Cake PHP and Drupal integrated (Drake).P.P.P.S
. I've already run chmod -R 0777 on the /tmp directory.Any thoughts?Thanks,Taurus

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Cake Tutorial: Books Title Example (With hasOne)

2006-06-17 Thread John Zimmerman [gmail]
She meant they are deleting the entries in the application.Most likely they are just trying to test everything to get a feel for what is going on and don't actually mean to be malicious.If it seems appropriate I would still post the URL, but maybe back up your database before hand.
Also if before you give the link you precede it by please don't delete the data I am sure those on this group will obey your wishes. I don't think anyone here is trying to cause harm.
On 6/17/06, Olivier Percebois-Garve [EMAIL PROTECTED] wrote:



  
  


If you have errors that are disappearing by switching debug from 2 to
0,
then its not errors it is notices or warnings.

AD7six wrote:

  jeannie109 wrote:  
  
The tutorial seems to work ok even with the error message.  I did findout that if I change the debug to 0 instead of 2, it gets rid of theerror.
  
  With Debug set to 0, errors are not displayed in the browser, but theyare not removed.If you rename /app/models/titles.php to /app/models/title.php the errorwill be 'cured' (I think). Left unchecked it would mean (again, I
think) you will not be able to use the findByXXX and findByAllXXXmethods, as these rely on overloading.  
  
On another note, everytime I post to this forum, and put in my URL,some nasty person deletes all my entries.  I can't believe people canbe so rude.  Should I not post my URL in this forum?
  
  AFAIK it isn't possible for anyone to delete a message from the googlegroup (this isn't really a forum, or are you referring to somethingelse?), what has lead you to draw that conclusion? Eveyone's pretty
friendly around here ;)Cheers,AD7six  










--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Internal Messaging System

2006-06-16 Thread John Zimmerman [gmail]
Thanks, that is the idea I was looking for and just wasn't grasping at the time.I think I got it straightened out now.Thanks for the help.On 6/14/06, 
Samuel DeVore [EMAIL PROTECTED] wrote:
I have a model that has a belongs to like var $belongsTo = array(  'Owner'   = array('className'='Client','foreignKey'='owner_id'),  'Photographer' = array('className'='Client','foreignKey'='photographer_id'),
  'Billto'  = array('className'='Client','foreignKey'='billto_id'),  'Client'  = array('className'='Client','foreignKey'='client_id'));4 parts all connected to same model works fine for me
On 6/14/06, John Zimmerman [gmail] 
[EMAIL PROTECTED] wrote:
Is anyone building an application with an internal messaging system?I
am trying to build a basic internal messaging system that sort of
mimicks the basic functionality of email (i.e. send/reply/view) between
two users only. No need to edit, delete, forward, etc.. as I am
addressing this with auto archiving and providing an alternate core
communications system as well. My idea here is only the basics.
I am trying to figure out the models for this since both the
sender and the receiver will both be of model 'User'. The message will
need an id pointing to both users.I have seen example code
where one user is linked to the message using a 'user_id' column and
the other user is linked using a 'fromid' column. How well does this
work?
Any help / hints / ideas reguarding the model relationships
are appreciated. I am still learning the cake way, sorry if I am just
making this too hard.Thanks.









--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Cakebased bot ?

2006-06-16 Thread John Zimmerman [gmail]
The hardest part here is going to be the logs in step. Everything else can be done with pretty much any scripting language. For the automation you will need to use a cron job or whatever the schecduling agent is on your host platform.
If I am understanding things correctly you are wanting to build the bot using cake. If that is the case, cake really is not the best tool for the job. A simple perl script will be much easier to get the task done.
I wrote a perl script a while back that logged into an old PHP wiki that was password protected using standard .htaccess file. It then scraped the stats page and calculated who had the most edits on the wiki. The results of the top 10 were then appended to a text file at the end of every day. The script ran as a cron job on a linux box.
The login step depends on how the login/authorization is done on that site. If you are running the site then you can change it as needed.On 6/16/06, 
Darian Anthony Patrick [EMAIL PROTECTED] wrote:
-BEGIN PGP SIGNED MESSAGE-Hash: SHA1Olivvv,The first question could be answered by using an external script whichmakes an HTTP request to your Cake application, invoked from cron.
Cake could also, in theory, be used as a generalized applicationdevelopment framework, when coupled with a daemon that handlestime-based action invocation, vaguely similar to POE in Perl.I believe the second question could be answered by using generally
available PHP classes, or core or extensions fuctions which handle HTML,or text parsing.All in all, it sounds quite feasible.And fun.Best,DarianOlivier Percebois-Garve wrote:
 Hi I got a proposal for a job and I'm trying to figure out how difficult it is and how long it would take. The job is to make a bot that connects to an external url, logs in, catch somewhere on the page the number in front of the string treffer,
 save it and then start again with another url. So I have several questions: Can cake run code without a query (every night for instance) ? Can cake (or something else) open external urls and walk through the DOM
 of the opened page ? Olivvv - --Darian Anthony Patrick [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-Version: GnuPG v1.4.2.2 (GNU/Linux)Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.orgiD8DBQFEkykzKpzEXPWA4IcRAlmyAJkBGwozs+TmY9yyAzSdz1Cxp4p7TQCfUD3g
kDSnz3povRiK5jLO5jpxzPU==YEGc-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: using cake with database sessions.

2006-06-16 Thread John Zimmerman [gmail]
I just tried using the database to store sessions and did not receive the mysql errors.I did however have some other oddities which I have not tracked down yet.I have been setting the flash messages using $this-Session-setFlash() and then getting the message when the next view is rendered.
This was working fine until I switched to database sessions. Once I set a message it appears on every page (i.e. is never removed from the Session). I can explicitly delete the variable after it is displayed but it doesn't get removed on it's own.
Right now I am not sure if it is because of something I am doing or because of a bug. I will try to track it down later.The problem goes away when I change the session storage to 'php' or 'cake';
On 6/16/06, Carlos Mauricio Samour [EMAIL PROTECTED] wrote:
Does this mean that no one is using databases to store sessions? Iread in a tread last month that one guy had it up and running.Thanks!On 6/16/06, Felix Geisendörfer 
[EMAIL PROTECTED] wrote:Hi,I had this problem before and it was fixed in [3000]. However, it seems like this fix has (accidently?) been removed in[3028] so the errors come
 up again. I already reopened the ticket for it. You could propably just apply the [3000] changset to your code base (the session part of it), in order to get it to work, or you just set sessions to cake/php for now and
 wait until it is fixed like me.Best Regards,Felix Geisendörfer aka the_undefined --http://www.thinkingphp.org
http://www.fg-webdesign.deCarlos Mauricio Samour schrieb:One more thing. If I set up the define('DEBUG', 0); I get no erros what so ever.
 On 6/15/06, Carlos Mauricio Samour [EMAIL PROTECTED] wrote:Hello everyone. I have one quiestion regarding using sessions with my database instead of php or cake.
 I create the cake_sessions database with the sql script that is located on app/config/sql. I change the value in my core.php from define('CAKE_SESSION_SAVE', 'php') to define('CAKE_SESSION_SAVE', 'database') and I get this weird
 output at the end of my pages. Warning: mysql_real_escape_string(): 77 is not a valid MySQL-Link resource in /home/msamour/www/cake/cake/libs/model/dbo/dbo_mysql.php on line 244
 Warning: mysql_query(): 77 is not a valid MySQL-Link resource in /home/msamour/www/cake/cake/libs/model/dbo/dbo_mysql.php on line 126 Warning: mysql_errno(): 77 is not a valid MySQL-Link resource in
 /home/msamour/www/cake/cake/libs/model/dbo/dbo_mysql.php on line 301 Warning: mysql_real_escape_string(): 77 is not a valid MySQL-Link resource in /home/msamour/www/cake/cake/libs/model/dbo/dbo_mysql.php
 on line 244 Warning: mysql_real_escape_string(): 77 is not a valid MySQL-Link resource in /home/msamour/www/cake/cake/libs/model/dbo/dbo_mysql.php on line 244 Warning: mysql_real_escape_string(): 77 is not a valid MySQL-Link
 resource in /home/msamour/www/cake/cake/libs/model/dbo/dbo_mysql.php on line 244 Warning: mysql_query(): 77 is not a valid MySQL-Link resource in /home/msamour/www/cake/cake/libs/model/dbo/dbo_mysql.php on
 line 126 Warning: mysql_errno(): 77 is not a valid MySQL-Link resource in /home/msamour/www/cake/cake/libs/model/dbo/dbo_mysql.php on line 301 I checked with the guys at the irc and they suggested to do a clean
 install to see if my cake was to old or something. Well I did that and still got the same errors. Can anyone tell me if I am missing some steps on enabling saving my sessions on my db?
 Thanks.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Internal Messaging System

2006-06-14 Thread John Zimmerman [gmail]
Is anyone building an application with an internal messaging system?I
am trying to build a basic internal messaging system that sort of
mimicks the basic functionality of email (i.e. send/reply/view) between
two users only. No need to edit, delete, forward, etc.. as I am
addressing this with auto archiving and providing an alternate core
communications system as well. My idea here is only the basics.
I am trying to figure out the models for this since both the
sender and the receiver will both be of model 'User'. The message will
need an id pointing to both users.I have seen example code
where one user is linked to the message using a 'user_id' column and
the other user is linked using a 'fromid' column. How well does this
work?
Any help / hints / ideas reguarding the model relationships
are appreciated. I am still learning the cake way, sorry if I am just
making this too hard.Thanks.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: form on one page submits to another model - validation to show on original page?

2006-06-09 Thread John Zimmerman [gmail]
You can also try to use $this-Session-setFlash('Your Message Here'); followed directly by a redirect to your page, 
$this-redirect('/pages/home');In your default layout you would need to do something like this...$this-controller-Session-flash();
This method will work in other situations too.On 6/9/06, nate [EMAIL PROTECTED] wrote:
If you haveecho $html-tagErrorMsg('Subscriber/email', 'Valid Email is
required.');on both pages, it should work.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: popular framework?

2006-06-07 Thread John Zimmerman [gmail]
http://www.phpit.net/article/ten-different-php-frameworks/This is a comparison chart. Somewhat inaccurate in some areas but one of the only ones I ca really find.
I think most of the people on the Cake list are going to tell you that Cake is the best.I tried a couple of others (Symfony and Seagul to name two) and found them rather clumsy for what I was trying to do and the way I wanted to work. I found Cake to be nearly perfect.
I also started on Rails but lost interest the day I found Cake. I have been programming PHP for a while and porting sites from my home grown code and projects I inherited was easier to go to Cake than Rails.
I can't tell you about useage resources on a busy server as my projects aren't being launched in high traffic targets (but one of them should soon). I am sure others can tell you about that though.
On 6/7/06, yusuf [EMAIL PROTECTED] wrote:
Is cake php the most popular framework for php? Are there others thatare widely used out there?Also, how does cake scale up, in terms of users and resource over head?Thanks.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Layout Help

2006-06-07 Thread John Zimmerman [gmail]
Question 1:In each of your action functions you can change the value of $pageTitle before the pages is rendered. So if you want to change the title to the Post title your would do $this-pageTitle = $PostTitle; before the end of your action function. You can conditionally set the title and if it is not changed it will display whatever you set it to in the class variable.
In my controllers I set pagetTitle to null if I don't want to be displayed and in my layout I check to make sure it is not set to null before displaying. That way on pages I do not want a title it won't be there.
Question 2:You can do something similar to my solution for pageTitle in question 1. You set a default value for the css file name and make it a variable (i.e. $css_file) and subsititute that variable when including your css value.
In your controller you would call $this-set('css_file', 'new_file_name');In your view you would check to make sure $css_file is already set, if it is not you set it in your layout equal to your default css file.
If that doesn't make sense I am sure we can come up with some specific code snippets.On 6/7/06, Garth Braithwaite 
[EMAIL PROTECTED] wrote:I followed along with the blog tutorial in the manual and now a I am
customizing it to my needs.I figured out I could change the pagetitle by assigning it to the variable $this-pageTitle = 'Blog'; likeso and I then can echo it out in the custom layout.This works great
in most of the functions in the controller, however I want to make itso that when you view the individual post it passes through the titleof the post stored in the database as $this-pageTitle.That is my first question, my second: Is there anyway to make any other
variables that I can pass through for layout sake other than$content_for_layout and $title_for_layout, for example I want to usethe same layout but use a different css (I do not want to create a newlayout for the new css, but just change the text in the css link tag).
Any help is appreciated.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Gettign a Adodb Session to work in cake

2006-06-06 Thread John Zimmerman [gmail]
I don't know about ADODB myself but if you change your debug level to 2 and post the error messages someone might be able to better help find a solution for you.On 6/6/06, 
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
No one who can help me in this case?[EMAIL PROTECTED] wrote: I need my session in cake work with the adodb sessio lib. I get it to work in an older cake version, but with the latest cake cake_1.0.1.2708
 it dont work any more. my bootstrap looks like this: ### $ADODB_SESSION_DRIVER = 'mysql'; $ADODB_SESSION_CONNECT = 'localhost'; $ADODB_SESSION_USER = 'user';
 $ADODB_SESSION_PWD = 'pass'; $ADODB_SESSION_DB = 'test'; vendor('adodb/adodb.inc'); vendor('adodb/adodb-session'); ### The Site alwas tells my that it cannot connect to the datase, the
 credentials are 100 percent correct hope anybody hears me crying thanks

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: ACL and AUTH

2006-06-06 Thread John Zimmerman [gmail]
The Rails link was on Digg this morning.http://digg.com/programming/Basic_User_Authentication_in_RailsI posted the same chapter 19 response in the digg thread.
On 6/6/06, John David Anderson [EMAIL PROTECTED] wrote:
http://manual.cakephp.org/chapter/19This is much shorter and simpler than the link you've posted. Haveyou already looked at this? If so, where did it fall short?
-- JohnOn Jun 6, 2006, at 2:49 PM, HW wrote: Hi, I was curious why there is no AUTH setup or easy method of implementing it in CakePHP. CakePHP seems to be based loosley upon Ruby on Rails
 and they have the ability to easily implement it.The link for one such application is listed below.All of the methods and information that I can find for the CakePHP seems to be overly complicated and
 incomplete.Please advise.Thanks!!! http://www.aidanf.net/rails_user_authentication_tutorial 

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: OT: Fase v0.8

2006-06-06 Thread John Zimmerman [gmail]
On 6/6/06, Michal Tatarynowicz [EMAIL PROTECTED] wrote:
...- All CSS and JS files are parsed with PHP by default. This not onlyallows for portable web apps, but also allows for include()'s in CSSand JS (which they sadly lack) and constants in CSS ( .Foo { color:
#5870a2 } can become .Foo { color: COLOR_FUCHSIA } which is far morereadable and less error-prone). I think something like this would be excellent for cake. I was wishing I had something like this the other day when altering CSS files after copying a couple from one application to another.


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Difficulty using PEAR library Date_calc

2006-06-06 Thread John Zimmerman [gmail]
I was under the assumption (and looking at my PEAR installation I think I might be right) that Date.php should not be inside the 'Date' directory.On my installation it is outside (i.e. 'PEAR/Date.php' instead of 'PEAR/Date/Date.php')
Also, with the PEAR libraries I had mixed results when trying to vendor/include/require in the controller, but I did not persue it too far. I just put my require_once statements in bootstrap.php and everything worked just fine.
I did a quick grep on the cake directory and I did not see a Date class which is what it is complaining about being re-declared, so it is likely that by trying to vendor/require the pear library in the controller where you are it is trying to declare the class multiple times. I can't say this for sure though.
But try it in the bootstrap.php file (using require_once) and see if that works for you.On 6/6/06, nate 
[EMAIL PROTECTED] wrote:If the library is using require_once to load a file, it shouldn't
matter how many times it gets loaded, since PHP won't actually load itmore than once.This may seem a little obvious, but did you look to see what file isgetting loaded on line 88, that's actually causing the error?It's
possible that one of the Pear classes in conflicting with a Cake coreclass.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Cake admin

2006-06-05 Thread John Zimmerman [gmail]
In your admin_*() functions you will need to change the $this-layout class variable to the name of the new layout.i.e$this-layout = 'adminlayout';(not the lack of .thtml at the end).

In one of the apps I am working on the user authentication is role
based. I use the same layout for all users. The menu is different
(and access control) for each type of role. I have each roles menu
setup as an element and I render the correct element in the layout
according to the users role.
Depends on your preference and your app as to which method will work best for you.On 6/5/06, John Zimmerman 
[EMAIL PROTECTED] wrote:In your admin_*() functions you will need to change the $this-layout class variable to the name of the new layout.
i.e$this-layout = 'adminlayout';(not the lack of .thtml at the end).
In one of the apps I am working on the user authentication is role based. I use the same layout for all users. The menu is different (and access control) for each type of role. I have each roles menu setup as an element and I render the correct element in the layout according to the users role.
Depends on your preference and your app as to which method will work best for you.On 6/5/06, Ect0pLaSm 

[EMAIL PROTECTED] wrote:
 but the simpler way is to uncomment the admin route in the
 app/config/routes.phpthen, you can functions likeadmin_edit{} , admin_delete{}their views are the same: admin_edit.thtml and admin_delete.thtmlthe url should be: /admin/yourcontroller/edit and /admin/yourcontroller/delete
is this what you need ?That right.But How use different design in admin part? How separate images and cssfrom admin part and images and css from main part. How use differentlayouts?




--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


Re: Any idea how read views from database?

2006-06-03 Thread John Zimmerman [gmail]
One option might be to just allow the user to modify CSS and store those CSS modifications in the database. You could restrict what CSS is allowed so as to not ruin the whole page.I guess this would be similar to how 
myspace.com allows people to customize their pages. In your thtml file you would just put section at the top for the style to be set and in the controller you would pull the information from the data base and use the $this-set('styles', $styles); to change the look of your guest book.
On 6/3/06, Petr Vytlacil [EMAIL PROTECTED] wrote:
And how for this problem?I need know how use view from database for any functions incontrollers. Now this view are use from app/view/...

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php  -~--~~~~--~~--~--~---


  1   2   >