I have had a lot of problems getting i18n translation working but I
think this may be one for the trac. THis is a sanity check before
posting a ticket... please read on and tell me I am wrong :) (which is
always fun)
I have debugged a bit in cake/libs/i18n.php and found that my
"default.mo" is lo
Paginate takes, as the second parameter, any conditions you want.
This paginates all users that are flagged (have had others report
them).
function flagged()
{
$this->User->recursive = 0;
$this->set('users', $this->paginate(null,'User.flagged <>
\'0\''));
}
On Apr 1, 11:17 am, bob <[
See! That's the beauty of cake. It can look awfully restrictive with
all this convention over configuration, but when it comes down to it
the framework will let you achieve pretty much anything!
It's a while since I enthused, so well done once more everyone. That
said, what do people think about
On Tue, Apr 1, 2008 at 2:01 AM, kdecapite <[EMAIL PROTECTED]> wrote:
>
> > Oh, and don't forget to create an index on (fn, ln) for both tables.
>
> Sorry for being out of touch lately. I had to table this issue to make
> progress on a different work-related project. Anyway, I spent some
> time
Unfortunately I don't think there is a native way to allow this (yet)
however correct me if I am wrong.
I did a test the other day and managed to get it to work as far as I
could tell.
create your model as below:
app/models/list_model.php
alias = 'List';
}
}
?>
Then in your controll
On Tue, Apr 1, 2008 at 8:03 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> > 1/ Having a generic home page, leading to different pages and models
> > (users profile, content admin)
Using many models in the controller that renders the action that is
routed as default should do the trick.
Thanks :)
Now I can be happy again ;)
Yes, in error report Zend Optimizer is mentioned :(
On 1 Bal, 08:09, Grant Cox <[EMAIL PROTECTED]> wrote:
> I'll bet that what is actually crashing apache is the Zend Optimizer
> extension for PHP.
>
> On Apr 1, 11:17 am, Vangel <[EMAIL PROTECTED]> wr
can u please provide me the particular link.
On Mar 28, 10:13 pm, "Sonic Baker" <[EMAIL PROTECTED]> wrote:
> There is a test suite in cakeforge for 1.1. IIRC there are instructions for
> installing it there. I've only used it to test models and there are no
> fixtures. I use Selenium then to test
> I'll bet that what is actually crashing apache is the Zend Optimizer
> extension for PHP.
The Zend Optimizer is pure evil.
>
> On Apr 1, 11:17 am, Vangel <[EMAIL PROTECTED]> wrote:
> > The topic sounded like a troller post, I guess it served its purpose.
> > Hack the cake core if you beli
Those variables are undeclared because they come from the extract
statement and DO contain values.
So I changed the topic to reflect the real question:
Why is MY mo-file not accepted?
My "magic" value in the header is "-1794895138".
Apparently it should be "2500072158".
I come to this conclusion
http://cakebaker.42dh.com/2007/12/12/a-black-sheep-with-the-name-modelupdateall/
is an interesting article about this topic, and the comments LOL
On Tue, Apr 1, 2008 at 4:53 AM, yifan <[EMAIL PROTECTED]> wrote:
>
> Thanks a lot! They are quite useful.
>
>
>
> On Apr 1, 6:13 am, Grant Cox <[
I've wondered about this too, however if cakephp core team thought it
was a bug it would have been fixed by now. So obviously they do not
consider it a bug.
You can override this behaviour in your afterFind if you deem it
necessary, however I would just do a check for
empty($location['ContactPer
Thanks a lot! They are quite useful.
On Apr 1, 6:13 am, Grant Cox <[EMAIL PROTECTED]> wrote:
> Tickets go onhttps://trac.cakephp.org
>
> However, if you search there you will find a few tickets on the same
> topic, such as:https://trac.cakephp.org/ticket/3029
>
> "The purpose of updateAll() is
using pagination in cake 1.2, how do you paginate a subset of data in a
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 unsubs
How different are we talking here?
If you just mean different CSS, it may be easy to use some sort of
dirty hack based on $_SERVER (not very Cakey, but you still have php
under all that) when you use the css include.
If you want something a bit more, you should be able to have multiple
app direc
> Another more elegant, and much more Cakey approach would be to set the
> viewPaths in the bootstrap based on the $_SERVER['HTTP_HOST'].
Or (still based on $_SERVER['HTTP_HOST']) set a different layout, or
use ThemeView with the same trick again.
--~--~-~--~~~---~-
Hello
I need to setup multiple domains for 1 website.
There will be a default domain with a default layout for example
www.default.com.
When a user visits www.example.com it the site needs to be the same
but with a different layout.
I want the same code base to run on all the sites - they must ju
Hi everyone, I'm new to CakePHP and find this set of tools very
useful.
I understand how to build an app when it's drived by a MVC approach
(model, views, controlers created with the Console, w/i or w/o
scaffholding or the default CRUD methods).
But I'm a bit confused when it deals with handling
Hello Adam,
thank you for your answer.
> empty($location['ContactPerson']['id'])
Yeah, I already checked this. :-)
I think the reason for this "feature" is that only one SQL statement
(LEFT JOIN) is necessary to fetch a record with its associated hasOne
data.
Regards, Christoph
--~--~
> 1/ Having a generic home page, leading to different pages and models
> (users profile, content admin)
I am not sure exactly what you want to know. Are you talking about
generating a menu-system or a single page with several sections?
> 2/ Having a stats module which displays (on one or several
My controller files code has gone very long. I want to break it in
different files.
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@goo
Well, two things:
1. Fat models, skinny controllers.
2. Create and use components.
On Tue, Apr 1, 2008 at 9:07 AM, mans <[EMAIL PROTECTED]> wrote:
>
> My controller files code has gone very long. I want to break it in
> different files.
> thanks in advance
> >
>
--~--~-~--~~
On Mon, Mar 31, 2008 at 11:44 PM, bob <[EMAIL PROTECTED]> wrote:
> I am using cake 1.2
>
> I am trying to use paginate, but the problem i am having is that my URL is
> localhost/controller/action/param1/param2
>
> so when i try to do echo $paginator->numbers(); in my view, I get the URL
> localhos
Hi all,
After seeing someone's comment tonight about having issues with accessing the
cakephp session while using SWFUpload, I have written a tutorial that covers
how to overcome this issue.
http://blogs.bigfish.tv/adam/2008/04/01/cakephp-12-sessions-and-swfupload/
Hope this helps some of you.
Martin,
Run the code from this paste: http://bin.cakephp.org/saved/30507
You should get the same output as in the "note"
If this is not the case your php is not configured properly.
Please provide more information about your server environment.
--
/**
* @author Larry E. Masters
* @var string $
I'm not trying to keep a one-man discussion going but I stumbled on
something that may be of relevance.
I found a lot a reports around the web regarding binary files on 64bit
systems. The magic number is a BIG number. Apparently 32bit numbers
that are out or range will "wrap around" to a negative
On Tue, Apr 1, 2008 at 10:14 AM, Mech7 <[EMAIL PROTECTED]> wrote:
>
> I am trying to allow access to some controllers.. but it seems it does
> not work at all?
> I am using latest version from SVN.. Also what is strange in windows
> it works normal.. but in Ubuntu the login page sends the pass
Nice job Adam!
Looks like a pretty simple way to get it working.
--~--~-~--~~~---~--~~
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 thi
I'd love to see this sort of functionality in there - I've just built
a component to handle that side of things, it's not perfect but it
does work.
On Apr 1, 12:13 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> See! That's the beauty of cake. It can look awfully restrictive with
> all this
Adam,
Thanks for taking the time to write a tutorial and sharing it with the
community.
Regards,
Tim
--~--~-~--~~~---~--~~
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@go
I am trying to allow access to some controllers.. but it seems it does
not work at all?
I am using latest version from SVN.. Also what is strange in windows
it works normal.. but in Ubuntu the login page sends the password in
plaintext does anybody know whats up with that ? :p
$this->Auth->author
Click on http://groups.google.com/group/cake-php/web/cakephp-official-resources
- or copy & paste it into your browser's address bar if that doesn't
work.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" g
If you could share that code, I'll happily look at creating a patch to
tart it up a bit.
simon
http://www.simonellistonball.com/
On Apr 1, 3:09 pm, Stephen Orr <[EMAIL PROTECTED]> wrote:
> I'd love to see this sort of functionality in there - I've just built
> a component to handle that side of
I followed the Bakery page on setting up my db and models for the
Polymorphic Behavior and it looks like I'm almost there, but the rest
of the db fields for my associated model aren't being included. I'm
seeing a return like this...
Array
(
[Person] => Array
(
[id] => 4045
Missing information:
1. A litle background about what are you trying to do.
2. The code you are using to define the models.
3. How are you calling the models.
4. The SQL that is beign generated.
5. The version of cake you are using.
On Tue, Apr 1, 2008 at 12:11 PM, rob5408 <[EMAIL PROTECTED]> wr
hey,
are you doing a $this->redirect(); (or anything like that) in the same
action where you set your session-variables?! that was the problem I
had. I solved it by setting the session-variables in a different
action.
da_student
On Mar 29, 7:11 pm, BC <[EMAIL PROTECTED]> wrote:
> Hey all,
>
> I'
Hi,
I'm an avid cakePHP developper working alone doing client work for
various clients. I find myself often writing common components or
writing widgets and blocks of functionality that I think could be used
by the community but I personally lack the man-power to build them to
completion.
I have
hey,
I'm having kind of a problem here. ok, first the things I've done:
I have a controller, in which I have an action called tasklist, which
just sets some variables, nothing interesting. Then I have a a view to
this action, called tasklist.ctp, looking like this (just the
important stuff):
-
> Table cache is the name of what is happening, and your DB engine is
> who is doing it. Also about setting indexes:
Thanks for the links. I read through them but will have to again to
make sure the information sinks in. Overall, it sounds like the best
optimization is to only include fields in t
> 1. A litle background about what are you trying to do.
I have Person information that is common to all people (name,
nationality, birthdate). But People can be different things though,
like Coaches, Players, Officials etc. These Person Types can have
statistical information like player stats fo
Thanks Adam!
I'm new to CakePHP (and MVC in general), but I did a bit of digging in
the manual and I'm thinking maybe this is possible with routing?
Basically, name the model "Xlist" or something, then change the
routing configuration to add:
Router::connect(
'/lists/*',
array('controlle
I'll second that. It really seems that Cake could take care of this for you.
Create a view with:
element('your_controller/some_method', array('cache'=>'1 day')) ?>
Put all of your other params in the array as well and they'll be
available in the view, from where you can pass them through a
requ
Can a sort order field easily be applied to a HABTM relationship?
Can it be done in the HABTM association (join) table?
Example:
I have a "person" model and a "friend" model.
Each person can have many friends and each person can be a friend to
many other people.
When listing a person's friends, i
Sounds like you want to start up a project here:
http://www.cakeforge.org
--~--~-~--~~~---~--~~
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 unsubscri
I make a lot of similar websites for work and I would like to be able
to make a custom settings file where I can store variables that will
be used throughout the site. For example I want to have:
I would then like to be able to use those variables in all my
controllers and actions. How would I
He proposition was:
1. Make a ListModel model (that uses the lists table)
2. In the ListsController (aka url /lists/) get a reference of
ListModel in $this->List, this is made in beforeFilter before any
controller action.
3. Make the ListsController use (var $uses = array('ListModel'); ) the
mode
Sorry, I was reading wrong, I meant:
Nice trick Adam!
On Tue, Apr 1, 2008 at 4:18 PM, Dardo Sordi Bogado <[EMAIL PROTECTED]> wrote:
> He proposition was:
>
> 1. Make a ListModel model (that uses the lists table)
> 2. In the ListsController (aka url /lists/) get a reference of
> ListModel in $
if they're constants, put them in the bootstrap file,e.g.
// sales taxes
Configure::write('gst', 0.05);
if they are dynamic, maybe override app_controller.php (copy
app_controller.php from cake folder into app/) and set variables
there, that should work too.
Zoltan
www.yyztech.ca
On Apr 1, 2:5
Please can anyone post the file
http://groups.google.com/group/cake-php/web/create_a_wiki_with_cakephp.zip
? It's returning File Not Find.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to
What if you replace your line with :
'onClick'=>'new Ajax.Updater(\'tasktable\', "' . $html->url('/
controller/taskbar') . '", {asynchronous:true, valScripts:true});',
?
by the way, asynchronnous is default, no need to specify it.
On 1 avr, 13:22, da_student <[EMAIL PROTECTED]> wrote:
> hey,
>
What if you replace your line by :
'onClick'=>'new Ajax.Updater(\'tasktable\',"' . $html->url('/
controller/'tasktable') . '",
{asynchronous:true, valScripts:true});',
?
by the way, asynchronous is default, no need to specify it.
On 1 avr, 13:22, da_student <[EMAIL PROTECTED]> wrote:
> hey,
> I
I tried tried putting them in the app_controller like:
set("title",$clientName);
// etc
Any other suggestions?
On Apr 1, 3:55 pm, Zoltan <[EMAIL PROTECTED]> wrote:
> if they're constants, put them in the bootstrap file,e.g.
>
> // sales taxes
> Configure::write('gst', 0.05);
>
Sure thing. I'm pretty certain my method isn't optimal, but it does
work (and as a bonus, because I'm using a model to represent the
Sites, you can add them dynamically).
It relies on the ThemeView at the minute, because that's how I'm
representing each of the different site designs. I ran into t
There is a bug in the behavior that make it fetch only id and
displayfield (that is a virtual field and is documented in the
behavior. ).
In the line 45, change:
array('id',
$model->$class->displayField), null, -1);
to:
First of all, thanks for your comment, the Bindable behavior is very
useful! Also, sorry for my very late response, I've been busy with
school and work.
Unfortunately the Bindable behavior doesn't help me with my problem :
(, although it made me think.
I thoughtI found a solution by using a hasOn
Try $this->clientName
On Apr 1, 1:42 pm, Kyle Decot <[EMAIL PROTECTED]> wrote:
> I tried tried putting them in the app_controller like:
>
>
> class AppController extends Controller {
>
> var $clientName = "Somebody";
>
> //etc
>
> }
>
> but then when I try to access it in my PagesController i ge
On Sat, Mar 15, 2008 at 3:26 PM, Maff^ <[EMAIL PROTECTED]> wrote:
>
> Hi There,
>
> First of all I want to state that I'm not a very advanced CakePHP
> user. I tried to find answers to my question here and with Google, but
> I'm probably not using there right keywords.
>
See, if only more peo
That did it, thanks for all your help! Rob
On Apr 1, 4:55 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> There is a bug in the behavior that make it fetch only id and
> displayfield (that is a virtual field and is documented in the
> behavior. ).
>
> In the line 45, change:
>
>
Hi,
Sorry I'm still being fairly new to cake and I have the follwing
problem:
I'm mass updating some data and use the following code for that
$this->Model->findByName("name");
$this->Model->save($data);
when I do that cake is inserting a new record with $data instead of
updating the existing on
On Tue, Apr 1, 2008 at 5:33 PM, MarcS <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Sorry I'm still being fairly new to cake and I have the follwing
> problem:
>
> I'm mass updating some data and use the following code for that
> $this->Model->findByName("name");
> $this->Model->save($data);
>
> w
I already have and it's been almost 2 weeks I've been waiting for
approval. I want to get things started asap and looking for similarly
motivated people to work with to really push things forward.
I especially have an interesting idea for using cake components/
helpers to drive my software develo
irc://irc.freenode.net/cakephp
There are currently no projects awaiting approval on cakeforge.
--~--~-~--~~~---~--~~
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@googlegrou
I replaced the line:
'host' => 'localhost',
with:
'host' => 'www.toreadandtowrite.com',
Is it wrong?
On 31 mar, 01:59, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> You just seem to have an issue with the database connection, verify
> the file config/database.php
>
> cheers (and welcome to
Try this one (untested):
Router:connect('/:year/:controller/:action/*', null,
array('year'=>'\d{4}'));
Cheers,
Adam
ModByChris wrote:
> I have not been able to find the way around this an it seems like it
> should be possible.
> I have a News controller, and I am dealing with a biennial event,
That's wierd, can't find anything in my email... I guess when we find
it (i'll keep asking in the IRC channel) I'll post the link to
actually see if anybody's interested.
On Apr 1, 6:14 pm, Gwoo <[EMAIL PROTECTED]> wrote:
> irc://irc.freenode.net/cakephp
> There are currently no projects awaiting
Hi,
I decided on taking a different route and cutting out the ACL all
together. I changed the Auth system to be based on the controller
rather then actions
//$this->Auth->authorize = 'actions';
$this->Auth->authorize = 'controller';
This allows me to roll my own system using the
::isAuthorized(
The files work on and off - Google has been having a lot of issues
with files and pages in groups for a while and have been trying to fix
them. I just tried the file and it works, but it could stop working
again at any time :/
You can read about it here:
http://groups.google.com/group/Google-Gro
This may be what you are looking for:
http://cricava.com/blogs/index.php?blog=6&title=using_configure_on_your_cakephp_applicat&more=1&c=1&tb=1&pb=1
On Tue, Apr 1, 2008 at 5:58 PM, Joe <[EMAIL PROTECTED]> wrote:
>
> Try $this->clientName
>
>
>
> On Apr 1, 1:42 pm, Kyle Decot <[EMAIL PROTECTED]>
I figured $this->id would be set when calling read
thanks for the answer.
On Apr 1, 10:44 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Tue, Apr 1, 2008 at 5:33 PM, MarcS <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > Sorry I'm still being fairly new to cake and I have the follwing
> > prob
I really do hope that someone replies to this inquiry. I think I have
spent about the whole day trying to "use the framework" to do a simple
query like this. Is it possible
On Mar 30, 12:51 pm, acoustic_overdrive <[EMAIL PROTECTED]>
wrote:
> What's the recommended way to use aggregate f
Nope ... I am using routing and baseURL is commented out.
Any other ideas here?
--~--~-~--~~~---~--~~
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 unsu
I want to maintain the session & the items I store in it longer than
the predefined timeout in core.php. Would this work, if I put it in a
beforeFilter?
function beforeFilter() {
if (!$this->Session->valid()) {
$this->Session->renew();
}
}
or is there another way to maintain session t
On Tue, Apr 1, 2008 at 7:36 PM, chewie124 <[EMAIL PROTECTED]> wrote:
>
> I want to maintain the session & the items I store in it longer than
> the predefined timeout in core.php. Would this work, if I put it in a
> beforeFilter?
Why wouldn't you just alter the pre-defined timeout then?
--
Sessions are automatically "renewed" when a request is performed. Two
options are:
1. Increasing the Session.timeout setting in core.php to something
massive
2. Use a small javascript to "ping" the server every so often to keep
the connection alive.
eg.
// ping server every 5 minutes
new Ajax.P
Adam's proposition makes sense (inasmuch as I'm new to MVC and
CakePHP, so I'll defer to other's wisdom).
I was just wondering if there was a drawback to the idea I suggested,
since it seems to work also. Again, I'm new to all this so there
might be something I'm not aware of that would cause my
When you do a find it needs to return into something...
On Tue, Apr 1, 2008 at 6:08 PM, MarcS <[EMAIL PROTECTED]> wrote:
>
> I figured $this->id would be set when calling read
>
> thanks for the answer.
>
> On Apr 1, 10:44 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> > On Tue, Apr 1, 2008 at
As I said I haven't done extensive testing, however it could screw
with behaviours, since they are instantiated in the __construct method
and so they will receive the un-altered alias. I'm not sure if this
would cause a huge problem or not, would need some testing.
Cheers,
Adam
On Apr 2, 11:16 a
Probably.
Suggestion - ask your HOST what the correct settings should be.
On Apr 1, 11:23 pm, Raistlin Majere <[EMAIL PROTECTED]> wrote:
> I replaced the line:
>
> 'host' => 'localhost',
>
> with:
>
> 'host' => 'www.toreadandtowrite.com',
>
> Is it wrong?
>
> On 31 mar, 01:59, "[EMAIL PROTECTED]
So I have this piece of code:
link( __('Create an Incident.'), '/incidents/add' );?>
And it seems like the link isn't created correctly. The only thing
that shows up is:
Create an Incident.
(or in whatever language I select. If I do this:
link( __('Create an Incident.').'[*]', '/incidents/
add'
On Wed, Apr 2, 2008 at 10:55 AM, Elmo <[EMAIL PROTECTED]> wrote:
>
> So I have this piece of code:
> link( __('Create an Incident.'), '/incidents/add' );?> h1>
Try link( __('Create an Incident.',true), '/incidents/add' );?>
HTH
Tarique
--
Disregard, I forgot to add 'true' to the __() statement so that it
RETURNS the value instead of outputting it. It should read: link( __('Create an Incident.', true), '/incidents/add' );?>
I guess it's getting way late, and I should go to bed.
On Apr 2, 1:25 am, Elmo <[EMAIL PROTECTED]> wrote:
>
Thanks! It's late here and I should go to bed! :)
On Apr 2, 1:40 am, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> Try link( __('Create an Incident.',true), '/incidents/add' );?>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Hi,
I have a small Ajax question that I'm hoping someone can help me with.
I'm trying to integrate the YUI (Yahoo UI) Treeview into an
application and I want to execute an Ajax update of a Div on the click
of a node in the tree. I need to attach the Ajax Update link to the
Treeview Node and to d
83 matches
Mail list logo