Re: Building a forum plug-in

2007-11-02 Thread Cheeze
I've seen many projects with a lot of talk at the beginning but nothing concrete was done about it. Perhaps the guys who really need should start something first? And if there are people who want more features, then more will start contributing? Of course documentation must be good ;) On Nov 1, 4

Re: Space before layout content - Resolved

2007-11-02 Thread Langdon Stevenson
Hi Wayne Wayne Fay wrote: >>> similar utility? Essentially, any space in any non-view file (outside >>> of tags) should be identified and eliminated. >> I use Ant for my build process out of Eclipse and have just looked up >> regular expressions in Ant. You could easily use the "ReplaceRegExp"

Re: HABTM findAll with incorrect data

2007-11-02 Thread fallenrayne
I figured out the problem. I had another belongsTo hiding in my poker controller that was adding the extra data. Thanks for your help again. On Nov 2, 7:05 pm, fallenrayne <[EMAIL PROTECTED]> wrote: > Hi AD7six, > > Thank you for the tip on using pr instead of echo. I had a pretty > good idea

Re: the superclass

2007-11-02 Thread mbavio
On Nov 2, 9:30 am, Cristian Vrabie <[EMAIL PROTECTED]> wrote: > hi everybody, > i'm new to phpcake organization model and i'm having some problems > integrating some classes. maybe you can give me a hand. > > i need a "visitor" class that will be responsible with tracking a site > 'visitor' (not a

Re: Space before layout content - Resolved

2007-11-02 Thread Wayne Fay
> > similar utility? Essentially, any space in any non-view file (outside > > of tags) should be identified and eliminated. > > I use Ant for my build process out of Eclipse and have just looked up > regular expressions in Ant. You could easily use the "ReplaceRegExp" Ideally we could cook up a

Re: xml parsing

2007-11-02 Thread Langdon Stevenson
Hi Moesian I have recently used simplexml to parse and modifiy some svg image files and (once I got used to it) found it easy to work with. It is fairly limited (as the name implies), but if it has the tools to do the job you need, then I would use it. Regards, Langdon moesian wrote: > Hi,

Re: Space before layout content - Resolved

2007-11-02 Thread Langdon Stevenson
Hi Wayne > Thanks for following up, Langdon. This is a not-uncommon issue with > PHP, unfortunately. I have always wondered why people make such a big issue over extraneous spaces (I always just check for them when I make the models and controllers). However in this case I accidentally intro

Re: OthAuth with Cake 1.2.0.5875 pre-beta problems?

2007-11-02 Thread gmwebs
I have also been experiencing some issues - I have posted mine this evening to the group as well. Have you seen http://www.ancientwisdom.cc/news/archives/111 which outlines some changes? Might be of some help to you... --~--~-~--~~~---~--~~ You received this mess

othAuth with Cake 1.2.x.x Nightly Build (5938)

2007-11-02 Thread gmwebs
For some reason or another, since upgrading to the latest pre-beta 1.2.x.x I have been experiencing issues with the othAuth component. I have also upgraded to the latest nightly build but it has not made any difference. I followed the instructions in http://www.ancientwisdom.cc/news/archives/111

Re: the superclass

2007-11-02 Thread Dardo Sordi Bogado
This may or may not help you: http://snook.ca/archives/cakephp/elemental_conditional_content_with_cakephp/ 2007/11/2, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > I get where we're going, but let's try on a real example. Please have > a look at a type of site i usually work at in average (some are

building url from parameter array

2007-11-02 Thread bingo
hi I am trying manipulate the url to provide different link options in the view. Although I can get all the parameters using Router::parser(Router::url("")), I am not sure how can I pass back the parameter array and get a valid url. Below is an example of what I am trying to do Assume that I hav

Re: HABTM findAll with incorrect data

2007-11-02 Thread fallenrayne
Hi AD7six, Thank you for the tip on using pr instead of echo. I had a pretty good idea of what it was doing (I have to deal with a lot of arrays and hashmaps at work), but I am still not entirely sure of how to fix it. I changed my tournament function to look like this: function tourna

Re: the superclass

2007-11-02 Thread [EMAIL PROTECTED]
I get where we're going, but let's try on a real example. Please have a look at a type of site i usually work at in average (some are least complicated but few are many times more complicated): http://mapolitique.be/ ok, the header menu and footer are easy. the commercials are doable with element

OthAuth with Cake 1.2.0.5875 pre-beta problems?

2007-11-02 Thread chewie124
Hi all - has anybody else noticed problems with othAuth breaking down with the latest release of cakephp? With the previous alpha release, things were working hunky dory. When I tried to upgrade to the latest beta version released on the 22nd the system started behaving very funny. Some actions w

Re: the superclass

2007-11-02 Thread [EMAIL PROTECTED]
What I would do is use a component only in your main page controller - the one that draws the other bits together. As far as the header and footer stuff goes, that would be best done with Elements. For example: /app/controllers/components/logger.php class LoggerComponent extend Object { funct

Re: the superclass

2007-11-02 Thread [EMAIL PROTECTED]
it's true i don't respect the conventions all the time, because in some cases this can bring significant speed gains (necessary on heavily accessed sites). however, if you're kind enough to share, i would like to know 'the cake way' for this: i have to show on one page different kind of informatio

Re: YAMMY!: feed your migrations faster

2007-11-02 Thread DanielMedia
Nice work Daniel. Good luck with the new blog. --~--~-~--~~~---~--~~ 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 em

Re: the superclass

2007-11-02 Thread [EMAIL PROTECTED]
Sounds like you're not doing it the cake way. If you really really want to do that, your best bet is to use loadModel. To be honest, what you're doing doesn't really fit the cake, or MVC model particularly well, so if I were you I would look at elements as an alternative to all the requestActions

Re: the superclass

2007-11-02 Thread [EMAIL PROTECTED]
If I write that in the startup function of the component it will be called for the every controller in a page (which is not good because I use 'requestAction' a lot so startup will be called more than once). What I was actually thinking is to create my own class and call the initialization somewhe

xml parsing

2007-11-02 Thread moesian
Hi, I want to parse a few xml feeds and stick their contents into a database. Whats the best way of doing this using cakephp? Can I use simplexml? If I can should I? Thanks alot --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: I need help with understanding the webroot directory

2007-11-02 Thread Dardo Sordi Bogado
Also take a look at app/config/routes.php 2007/11/2, jinhr <[EMAIL PROTECTED]>: > > webroot is viewed from client-side (that is web browser). > So if a file is "webroot/img/logo.jpg". It is publicly accessible as > "http://www.mydomain.com/img/logo.jpg"; > > On 11月2日, 上午11时08分, brehg <[EMAIL PROTE

Re: New guy needs some help

2007-11-02 Thread John David Anderson (_psychic_)
On Nov 2, 2007, at 12:00 PM, Chris Thompson wrote: > > Where I work, we are testing out CakePHP to replace our existing > codebase. > > I have two questions. > > 1. Do all primary keys for tables have to be 'id'? By convention, yes. By configuration, no. See $primaryKey in the Model. > For $

New guy needs some help

2007-11-02 Thread Chris Thompson
Where I work, we are testing out CakePHP to replace our existing codebase. I have two questions. 1. Do all primary keys for tables have to be 'id'? 2. I have 3 tables, blogs, posts, users. blogs id user_id title subtitle posts id blog_id user_id added updated text users id username password

Re: How do you do Client/Server interaction? (CakePHP/JSON/jQuery)

2007-11-02 Thread Tane Piper
Just to let you all know, I've put up a tutorial explaining it a bit more here: http://digitalspaghetti.me.uk/2007/11/02/developing-a-persistent-javascript-variable-with-cakephp-12-jquery/ Please feel free to comment as it probably could be improved upon. On 02/11/2007, Tane Piper <[EMAIL PROTEC

Re: 1.2, AuthComponent: Call to a member function isAuthorized() on a non-object

2007-11-02 Thread Martin Schapendonk
On 10/30/07, a.php.programmer <[EMAIL PROTECTED]> wrote: > $this->auth->authorize = 'controller'; I already had that, the error still appears. Martin -- Martin Schapendonk, [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subs

Re: Can i have url like domain/username

2007-11-02 Thread James
Hey Yujin, I do something similar. 'faqs', 'action' => ':action')); // This line is a catch all Router::connect('/*', array('controller' => 'pages', 'action' => 'display')); ?> Check out this article. http://bakery.cakephp.org/articles/view/custom-urls-from-the-site-root Hope this helps. j

Re: I need help with understanding the webroot directory

2007-11-02 Thread jinhr
webroot is viewed from client-side (that is web browser). So if a file is "webroot/img/logo.jpg". It is publicly accessible as "http://www.mydomain.com/img/logo.jpg"; On 11月2日, 上午11时08分, brehg <[EMAIL PROTECTED]> wrote: > I'm new to cakePHP and have a basic web application up and running. > Can s

I need help with understanding the webroot directory

2007-11-02 Thread brehg
I'm new to cakePHP and have a basic web application up and running. Can someone please explain the webroot directory and the webroot/ index.php file. I would like to have my own index page load using the standard MVC like every other view I have created. The index.php page is somehow reading in my

Re: Multiple $content_for_layout

2007-11-02 Thread francky06l
You could also cache your elements, it depends how frequently they are changing, but that's an alternative solution as well. (with cake 1.2) On Nov 2, 12:37 pm, AD7six <[EMAIL PROTECTED]> wrote: > On Oct 31, 11:53 am, "Cristi A." <[EMAIL PROTECTED]> wrote: > > > > > Hi everyone, > > > This is my

Re: Update gone wrong.

2007-11-02 Thread [EMAIL PROTECTED]
I'm not sure if I'm having this problem or not (I'll explain why in a second..) - I've updated to the latest Cake 1.2 pre-beta, (not tried any of the nightlies yet though - at the moment the nightlies page only seems to link to empty files) I seem to be able to get the cache to write files to my

Re: Model with custom id fields

2007-11-02 Thread AD7six
On Nov 2, 1:43 pm, maxpo <[EMAIL PROTECTED]> wrote: > My table has primary key made up of two primary keys. > Now when i call save it gives me the error of duplicate record, since > there is no column in table named id and the two id keys are : > > student_id, assessment_id. > > What i want from

Re: Model with custom id fields

2007-11-02 Thread maxpo
My table has primary key made up of two primary keys. Now when i call save it gives me the error of duplicate record, since there is no column in table named id and the two id keys are : student_id, assessment_id. What i want from cake is to perform save operation based on these two keys instea

Re: the superclass

2007-11-02 Thread [EMAIL PROTECTED]
What you probably want to do is write a component and handle your logging in the startup function. You probably also want to be using the component to inform the controller as to layout / views to use for the skinning. Depending on your controllers, there are all sorts of ways you could do this,

the superclass

2007-11-02 Thread Cristian Vrabie
hi everybody, i'm new to phpcake organization model and i'm having some problems integrating some classes. maybe you can give me a hand. i need a "visitor" class that will be responsible with tracking a site 'visitor' (not a user), keep a track and use his settings (like language and skin pref

Re: Router::url not returning absolute url

2007-11-02 Thread bingo
hi Grant, I tried '/', but the problem is then it will only return the base url and not the absolute url to the view. I found two possible hacks to solve this 1. $absolute_url = Router::url('/', true) . Router::url('', true) -- however the problem with this one is that introduces two slashes bef

Re: Model with custom id fields

2007-11-02 Thread AD7six
On Nov 2, 10:45 am, maxpo <[EMAIL PROTECTED]> wrote: > How can assign custom id fields to model, so that whenever i call save > it should reffer to those id fields before inserting. > I know var $id is there in models but how to use it? how about var $id = "name of primary key field" ? hth, A

Re: Multiple $content_for_layout

2007-11-02 Thread AD7six
On Oct 31, 11:53 am, "Cristi A." <[EMAIL PROTECTED]> wrote: > Hi everyone, > > This is my first post and I am new to cakephp. > > I decided to start from the basic so I am trying to move a simple HTML > web-site (mostly static pages) to cakephp and add an Administration > for a photo gallery wit

Re: Model with custom id fields

2007-11-02 Thread Grant Cox
Please explain what you want to achieve more clearly. But perhaps the beforeSave() model callback is what you are after? Then you can modify the data that is about to be saved in any way you like. On Nov 2, 7:45 pm, maxpo <[EMAIL PROTECTED]> wrote: > How can assign custom id fields to model, so

Re: app not fully "baking"

2007-11-02 Thread AD7six
On Nov 1, 6:17 pm, Miyagi <[EMAIL PROTECTED]> wrote: > Not the first time I've written a CakePHP application, but it's been > awhile and this is the first time I've gone ahead and used the > bake.php script. (IIS6 + Apache) > > http://localhost/cake/- works finehttp://localhost/cake/app/index.ph

Re: checkSession doesn't work well

2007-11-02 Thread AD7six
On Nov 1, 11:43 am, Rhee <[EMAIL PROTECTED]> wrote: > Hi, > > I use checkSession() in AppController to check if the user logged in > or not and I also put $beforeFilter in AppController. > Basically it does work. But as soon as I need this function for almost > any views in UserController, it do

Re: Components array used opposed to extends?

2007-11-02 Thread AD7six
On Nov 1, 2:46 pm, Richard <[EMAIL PROTECTED]> wrote: > Hi, > > I have several component classes that need to extend a parent class. > Which is the correct approach: > > class Availability extends Object > { > var $components = array('Parent'); > > OR: > > class Availability extends Pare

Re: Routes issue

2007-11-02 Thread AD7six
On Nov 1, 6:43 pm, befidled <[EMAIL PROTECTED]> wrote: > I currently have a controller for Articles which accesses the articles > table in my db for all primary and secondary pages on my site. I'd > like to create a route so that when I call a page, "articles/" is not > part of the URL. For exam

Re: HABTM findAll with incorrect data

2007-11-02 Thread AD7six
On Nov 2, 3:11 am, fallenrayne <[EMAIL PROTECTED]> wrote: > Hello all, > > This is my first post here and it is a weird problem that I have been > trying to fix for a few days now with no luck. I have a HABTM that is > connecting a poker tournament table with a users table so that I can > track

Re: Is possible to return variables from a element?

2007-11-02 Thread AD7six
On Oct 31, 9:44 pm, Defranco <[EMAIL PROTECTED]> wrote: > Hi, > > Besides the standard html returned from a element while using > renderElement - is possible to return variables from a view like when > you pass an argument as reference to a function? > > I'm rendering a element and it is returni

Model with custom id fields

2007-11-02 Thread maxpo
How can assign custom id fields to model, so that whenever i call save it should reffer to those id fields before inserting. I know var $id is there in models but how to use it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog