Anyone?
On Jul 3, 8:41 pm, gerbenzomp [EMAIL PROTECTED] wrote:
I have the following beforefilter, to make sure some queries have the
additional condition WHERE sitename = 'x'.
function beforeFind($queryData) {
if ($this-hasField('siteindex') !in_array('siteindex',
array_keys
, thanx a lot for your help, because I've been trying to solve
this for months now!
Gerben.
On Jul 11, 3:53 pm, AD7six [EMAIL PROTECTED] wrote:
On Jul 11, 3:26 pm, gerbenzomp [EMAIL PROTECTED] wrote:
Anyone?
Just a guess but:
More than likley somewhere you have a constrfaint that is a string
Yeah, that's a really good one, I use it a lot too!
On Jul 11, 11:40 pm, mastorna [EMAIL PROTECTED] wrote:
While Flash doesn't have much in the way to do with Cake (its
exclusively an artifact of the view being a plugin and all), I would
recommend this xml driven player:
I have the following beforefilter, to make sure some queries have the
additional condition WHERE sitename = 'x'.
function beforeFind($queryData) {
if ($this-hasField('siteindex') !in_array('siteindex',
array_keys($queryData)) !in_array($this-name . '.siteindex',
I use AD7six's pagination helper/component, and it works great! But
right now I'm changing the default routes, so the user's sitename
comes before every controller-action.
Like this:
$Route-connect(/:sitename/posts/edit/*, array(controller =
posts, action = edit));
This works fine for most
I don't understand, which way?
On 4 jun, 18:26, Dan Bair [EMAIL PROTECTED] wrote:
I haven't done that before, but to me, that seems like a very logical
way to do it.
On Jun 4, 7:00 am, gerbenzomp [EMAIL PROTECTED] wrote:
I've started a new project, and in that site everything should
I've started a new project, and in that site everything should belong
to the Site model. So articles, posts, users, products, etc. all
belong to a site, and should only be visible to users that belong to
that site.
To make it clearer: a user belongs to a site, and once that user logs
in he or
methods for
both models?
On 16 май, 07:33, gerbenzomp [EMAIL PROTECTED] wrote:
I have a form where users can register (model: users), but they should
also be able to create a sitename (model: sites) in that same form.
How should I approach
I have a form where users can register (model: users), but they should
also be able to create a sitename (model: sites) in that same form.
How should I approach this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
('sitename' = 'a_site_name', 'controller' =
'posts', 'action' = 'index'));
On May 3, 1:54 am, gerbenzomp [EMAIL PROTECTED] wrote:
I've changed the routes in my app, so that my paths are like this:
$Route-connect(/:sitename/, array(controller = posts, action
= index));
and urls are like
I've changed the routes in my app, so that my paths are like this:
$Route-connect(/:sitename/, array(controller = posts, action
= index));
and urls are like this:
site.com/sitename/controller/action/
But the html helper automatically creates links like this:
site.com/controller/action/
Is
A while ago AD7six told me that it is possible to override the default
path of an element when calling renderElement(). Up to now, it hasn't
become clear to me how to change that path, and what the path should
look like.
When an element resides in app/plugins/my_plugin/views/elements/
You can't (if I am guessing correctly?) from one of your app views render
an element from a plugin unless you explicitly tell cake exactly where
the file is (3rd parameter iirc).
Can anyone explain how to do this exactly?
--~--~-~--~~~---~--~~
You received
');
}
return $queryData;
}
The errors are gone now, but no posts are displayed.
Does anyone know what I'm doing wrong?
On 22 apr, 21:21, gerbenzomp [EMAIL PROTECTED] wrote:
Cool! That will save me a lot of code rewriting ;)
Thanks for the reply, Mariano! I'm going
-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de gerbenzomp
Enviado el: Domingo, 29 de Abril de 2007 11:18 a.m.
Para: Cake PHP
Asunto: Re: Routing and FindAll();
I added a field called sitename to the posts table and to some posts
added the sitename value mysite
apr, 22:29, gerbenzomp [EMAIL PROTECTED] wrote:
I still get the errors, even with your updated example.
To fix it, I changed:
array_keys($queryData['conditions'])
to:
array_keys($queryData)
Does that make sense?
A related question:
Is there a way to use the same method for changing
');
}
return $queryData;
}
Any idea what could cause this problem?
Sorry for the amount of posts in a row, b.t.w...
On 30 apr, 01:07, gerbenzomp [EMAIL PROTECTED] wrote:
Your example works great, I only get errors when I go to /sitename/
posts/view/
For some reason the $this-Post
It's easily done using cake!
Just put all content you want to be replaced in a div, and use
ajax.updater to replace it with the edit view (forms fields).
Something like this:
?php echo $ajax-link(edit this, /content/edit, array('update' =
mydiv),null,false); ?
div id=mydivyour content
I suppose you followed the instructions in
http://bakery.cakephp.org/articles/view/swfupload-and-multipurpose-uploader
?
Make sure you've created an upload folder in the files folder in
webroot: that is where the files get uploaded. So check there to see
if it works. Also, play around with the
You should put your js files in the js folder in webroot, so:
app/webroot/js/myscript.js
And then call it like:
?php echo $javascript-link('myscript'); ?
On 21 apr, 16:13, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
where to put js files? and how to refence it?
PROTECTED] wrote:
The BlogsController:http://bin.cakephp.org/view/616075649
and the CategoriesController:http://bin.cakephp.org/view/1748048905
Staring myself blind I think ... ;)
On Apr 21, 1:44 am, gerbenzomp [EMAIL PROTECTED] wrote:
What is your current code?
On 21 apr, 00:26,matlin[EMAIL
Here's some links:
Wordpress:
http://www.webdevkungfu.com/accessing-wordpress-with-cakephp/
... there was another good wordpress/cake integration article, but I
can't find the link right now...
Joomla:
http://dev.sypad.com/projects/jake/
Drupal:
I want different users to be able to use my whole system, and I want
them to have their own sitename before the controller and action, like
this:
www.domain.com/sitename/controller/action/
With help from people on the forum, I've discovered I can best use
this approach in routes.php:
be smart, be cool, and share your knowledge.
BAKE ON!
blog:http://www.MarianoIglesias.com.ar
-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de gerbenzomp
Enviado el: Domingo, 22 de Abril de 2007 11:07 a.m.
Para: Cake PHP
Asunto: Routing
understand your
expanation on how to do this: (3rd parameter iirc). What does iirc
stand for?
On 12 apr, 08:38, AD7six [EMAIL PROTECTED] wrote:
On 10 abr, 15:38, gerbenzomp [EMAIL PROTECTED] wrote:
I heavily use AD7six's mini-controllers approach
(http://www.noswad.me.uk/MiBlog
Images are best put in the img folder in the webroot, because this
way you can use Cake's built in html helper:
$html-image('myimage.jpg');
what is the webroot dir for? when and what to put into this dir?
The webroot is meant for all external files your layout uses, so
images, css,
What is your current code?
On 21 apr, 00:26, matlin [EMAIL PROTECTED] wrote:
A short question, does $hasMany honor the the 'order' directive?
It doesn't seem to be so. To me. I can't get it to work anyway.
--~--~-~--~~~---~--~~
You received this message
I vaguely remember your approach could cause some issues
Try this approach:
form onsubmit=return false;
// your form fields here
?php
if (!isset($complete)) $complete = '';
$options = array(
'url' = '/test/controls',
'update'=
, and the widgets each layer contains, so maybe there's a
much simpler approach. It's just that I can't see how to do this.
On 13 apr, 16:18, gerbenzomp [EMAIL PROTECTED] wrote:
You mean in the model? I've tried that before, but it doesn't change
the error.
I think there's something wrong with my
be a hack. I just don't know how to set up the
associations.
Any help is appreciated!
On 13 apr, 00:03, gerbenzomp [EMAIL PROTECTED] wrote:
I've been trying to get the associations right, but I somehow got lost
in my thinking about how every model relates to the other. Maybe
someone can have
, which is in a way understandable, because a page contains
no widgets: a page contains layers, which in turn contain widgets.
It's hard for me to have a clear understanding of how I should set
this up.
On 13 apr, 13:38, Mike Griffin [EMAIL PROTECTED] wrote:
On 4/13/07, gerbenzomp [EMAIL
I've just discovered the magic of setting the recursive value using
FindAll(). It's really exiting to see how easy it is to make complex
associations, and how well Cake can search up and down the association
tree!
My question is: how do I use recursive with FindBy? I want to have
nice urls, so I
I've been trying to get the associations right, but I somehow got lost
in my thinking about how every model relates to the other. Maybe
someone can have a fresh view on my problem.
I've put all my models between in this explanation, so it is easier
to read.
I have several models:
All the
Take a look at RosSoft's excellent pdf:
http://rossoft.wordpress.com/2006/06/24/blog-tutorial-chapter-3-done/
It contains a section about how to create your own custom flash
layouts, and how to write a function that calls this layout.
I've found it quite useful.
Gerben.
On 12 apr, 16:16,
You can just do an ajax-submit
?php
if (!isset($complete)) $complete = '';
$options = array(
'url' = ''url_for_submit',
'update'= 'div_to_update',
'complete' = $complete.some effects here
maybe...?);
I've changed Cake's default static pages architecture to be dynamic,
and also commented out the default route for this controller. All went
fine, until I tried to get some associations up and running.
I tried to link pages to sites, using belongsTo, but when I do a
pr($data); in the view,
the default pages architecture?
Gerben.
On 11 apr, 16:22, gerbenzomp [EMAIL PROTECTED] wrote:
I've changed Cake's default static pages architecture to be dynamic,
and also commented out the default route for this controller. All went
fine, until I tried to get some associations up and running
Nice job, I recently built something quite like this, only in my set-
up the widgets themselves are in fact mini-controllers using a
component and an element.
On 11 apr, 16:15, Dustin [EMAIL PROTECTED] wrote:
Just an update to anyone looking for help with building a drag drop
interface in
logic.
What was your reasoning for retrieving pages as dynamic instead of
static?
And if you removed your route for the pages controller, how are you
performing the logic?
On Apr 11, 10:22 am, gerbenzomp [EMAIL PROTECTED] wrote:
I've changed Cake's default static pages architecture
So you've been able to load the add view into the div already?
Then you just need to change a few things in the add form:
// start the form
form onsubmit=return false;
// normal form fields
?php echo $html-input('MyModel/title', array('size' = '35'))? //
etc
// ajax submit button
?php
I heavily use AD7six's mini-controllers approach (http://
www.noswad.me.uk/MiBlog/MiniControllers) and because I combine this
approach with the normal approach of having a model, controller, view,
it would really be nice if I could bundle all this into a plugin.
Is it possible to have components
Wouldn't it be much easier (and less memory-intensive) to load the
view through ajax only when it is needed. This way there will still be
no page reloads, and it's a much cleaner way to accomplish it.
?php echo $ajax-link('link text', '/view/to/load/', array('update'
= 'div_to_update',
I've read the article on routing (http://bakery.cakephp.org/articles/
view/86) and serached through this group, but couldn't really find an
answer to this question:
How can I enable users to have their custom sitename, like this:
http://www.site.com/users_custom_sitename/controller/action/
So
Maybe a strange question, but is there a way I can have subfolders in
the elements folder? I have so many elements I really need a way to
organize them. Right now I give the elements a prefix_ but but putting
them in subfolders would be so much easier, and easier to read.
Or do I have to change
sub folders all the time
$this-renderElement('this/that/and/the/other/thing');
Did you try it and not have it work?
On 4/4/07, gerbenzomp [EMAIL PROTECTED] wrote:
Maybe a strange question, but is there a way I can have subfolders in
the elements folder? I have so many elements I really
pm, Samuel DeVore [EMAIL PROTECTED] wrote:
mainly I use it to keep admin stuff together, menu pieces together and
form elements together
I don't think it works for helpers or components (but does for vendors)
On 4/4/07, gerbenzomp [EMAIL PROTECTED] wrote:
Oops! I figured
Ok, I described the issue: https://trac.cakephp.org/ticket/2345
Would be great if this enhancement could be made. For now, maybe the
only solution is to use prefixes.
Gerben.
On 5 apr, 00:23, gerbenzomp [EMAIL PROTECTED] wrote:
Nope, I already tried, but doing:
var $components = array
background: url(/img/template/content_box/big-content_box-bg.jpg)
Why do you keep your templates in the img folder?
If you use more then one template of theme, you should take a look at
the themeableView class:
http://abing.gotdns.com/posts/2006/themeable-view-class-for-cakephp/
On 5 apr,
I tried both your examples, but the problem seems to be that I use the
requestaction within default.thtml, and it seems there's no data
available about the parent action...
Is there some other way, because now I use the $_GET['url'] method,
which is just very dirty and unreliable.
On 2 apr,
? Because if requestAction is so heavy this is a great workaround!
On 2 apr, 12:30, AD7six [EMAIL PROTECTED] wrote:
On Apr 2, 12:19 pm, gerbenzomp [EMAIL PROTECTED] wrote:
I tried both your examples, but the problem seems to be that I use the
requestaction within default.thtml, and it seems
that model from within the component?
thx for the great job you did on the mini-contollers, I really use
them a lot!
Gerben.
On 2 apr, 14:01, AD7six [EMAIL PROTECTED] wrote:
On Apr 2, 1:40 pm, gerbenzomp [EMAIL PROTECTED] wrote:
The problem seemed to be that I cannot pass the variable $this-name
sure evalScripts is set to 'true' while doing the ajax call
- it is used for evaluating the script received in an ajax response.
Thanks,
Mandy.http://mandysingh.blogspot.com
On Apr 1, 8:03 pm, gerbenzomp [EMAIL PROTECTED] wrote:
I just built my own swfupload script using the new
I believe it's the same problem as described about TinyMCE:
http://bakery.cakephp.org/articles/view/140 - In response to point
2
But I can't see that solution fit with my example, because it's
TinyMCE-specific.
On 2 apr, 15:10, gerbenzomp [EMAIL PROTECTED] wrote:
does it help you ?
http
I just built my own swfupload script using the new article in the
bakery:
http://bakery.cakephp.org/articles/view/296
It's a great article, and the uploader works fantastically!
Everybody's talking about ajax upload, but this is the first good
implementation I've seen.
One question though:
I've made a plugin which is included in every page using
requestAction, but I need to show and hide different parts of the view
depending on the current main action (the action which is visible in
the url).
I've tried using
if($this-name == 'my_action'){
//
}
else
{
//
}
But that
Sorry, I meant controller, instead of action in the above post.
On 2 apr, 02:29, gerbenzomp [EMAIL PROTECTED] wrote:
I've made a plugin which is included in every page using
requestAction, but I need to show and hide different parts of the view
depending on the current main action (the action
to access them in another controller's
view.
On 12 mrt, 16:40, gerbenzomp [EMAIL PROTECTED] wrote:
Strange, I do use the requestHandler in my app_controller.
Line 213 is:
if ((!$this-auto) || isset ($controller-params['requested']) ||
$controller-RequestHandler-isAjax() || ($this-Session-
read
There's so much love put into the development of Cake, that anyone who
uses it, cannot but love it! Thanks so much, Cake has been an eye-
opener and is such a pleasure to work with!
Gerben.
On 18 mrt, 04:45, phirschybar [EMAIL PROTECTED] wrote:
true that.
On Mar 17, 2:38 pm, yolabingo
I've created an ajax form, which submits its data to /posts/add/.
After that I want the ajax call to update a div, showing the view of
the post the user just submitted. The div to be updated should thus
contain the following view:
/posts/view/id
I know how I can update the div to display any
I've also tried requestAction, but that doen't seem to work either.
On 16 mrt, 14:42, gerbenzomp [EMAIL PROTECTED] wrote:
I've created an ajax form, which submits its data to /posts/add/.
After that I want the ajax call to update a div, showing the view of
the post the user just submitted
Sorry, my mistake: I do have version 1.1
So what should the code read now?
When I do this:
uses('Sanitize');
$sanitize = new Sanitize();
pr($sanitize);
and then exit;
I get this:
sanitize Object
(
)
If I remove exit; to let the script go on, the email is sent, but in
the email I get:
(Error
BTW: Are you all working with version 1.2, and should I upgrade? Or
wait till it's stable?
Gerben.
On 14 mrt, 01:34, Mariano Iglesias [EMAIL PROTECTED]
wrote:
My bad.
Good thing I asked him to do new Sanitize() and then pr
-MI
, or just email_layout.thtml?
Thanks for all your help!
Gerben.
On 14 mrt, 11:43, AD7six [EMAIL PROTECTED] wrote:
On Mar 14, 10:53 am, gerbenzomp [EMAIL PROTECTED] wrote:
BTW: Are you all working with version 1.2, and should I upgrade? Or
wait till it's stable?
I think it would be wise to get
Hi Chris,
Thanks for the tutorial! Because I use version 1.1, I used your
previous example (http://www.littlehart.net/atthekeyboard/2006/11/29/
using-cakephps-native-web-service-support/). It worked just fine
(although it seems a lot easier in 1.2!), but I found a strange
particularity when I
on building!
Gerben.
On 14 mrt, 17:47, Chris Hartjes [EMAIL PROTECTED] wrote:
On 3/14/07, gerbenzomp [EMAIL PROTECTED] wrote:
Hi Chris,
Thanks for the tutorial! Because I use version 1.1, I used your
previous example (http://www.littlehart.net/atthekeyboard/2006/11/29/
using-cakephps-native
I'm trying to create a dropdown list to select the category in the add
and edit views of the Post controller. I found an example in this
thread:
http://groups.google.com/group/cake-php/browse_thread/thread/a4af5b2ffeb1231e/0de3fed71d9697c2?lnk=gstq=category+dropdownrnum=1#0de3fed71d9697c2
So I
', $cats);
$this-set('catselected', $catselected);
}
else
{
//...
}
On 13 mrt, 11:13, Dr. Tarique Sani [EMAIL PROTECTED] wrote:
On 3/13/07, gerbenzomp [EMAIL PROTECTED] wrote:
foreach ($this-model['post']-category-findAll() as $pass)
Try
$categories
I'm using Mariano's email form code as well, and updated it to work
with 1.2, but it still throws errors over this line:
$this-Sanitize-cleanArray($this-data);
error: Call to a member-function on a non-object
Any idea what could be the problem? Maybe I use the wrong email-
component?
On 13
all the time!
Thanks for pointing to the link, it helped me out!
Gerben.
On 13 mrt, 13:45, Dr. Tarique Sani [EMAIL PROTECTED] wrote:
On 3/13/07, gerbenzomp [EMAIL PROTECTED] wrote:
In my app, a post can belong to one category, and I want to list all
categories in a dropdown
be smart, be cool, and share your knowledge.
BAKE ON!
blog:http://www.MarianoIglesias.com.ar
-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de gerbenzomp
Enviado el: Martes, 13 de Marzo de 2007 08:36 a.m.
Para: Cake PHP
Asunto: Re: email form
knowledge.
BAKE ON!
blog:http://www.MarianoIglesias.com.ar
-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de gerbenzomp
Enviado el: Martes, 13 de Marzo de 2007 10:47 a.m.
Para: Cake PHP
Asunto: Re: email form
Changed that, but get a fatal error
be much more
elegant.
Thanks!
Gerben.
On 12 mrt, 08:59, AD7six [EMAIL PROTECTED] wrote:
On Mar 11, 3:59 pm, gerbenzomp [EMAIL PROTECTED] wrote:
Hey AD7six,
I've been working hard to try and get your example code to work
(http://www.noswad.me.uk/MiBlog/MiniControllers), but being
:
On Mar 12, 10:28 am, gerbenzomp [EMAIL PROTECTED] wrote:
Hi AD!
Thanks for your reply!
Ok, I'm beginning to see it:
I've created a new component: test.php in controllers/components
class TestComponent extends TemplateComponent {
var $name= 'Test';
function _getData
and blogs_app_model.php and its own
controller, model and views), but I guess I am wrong. I wasn't sure
either how I should include the widget in another controller's view.
Can you explain a bit more about how to implement your solution?
Thanks a lot in advance!
On 1 mrt, 12:52, gerbenzomp
don't have views, but perhpas that was a slip of the keys.
Yep, I meant another controller's view :)
On 1 mrt, 08:47, AD7six [EMAIL PROTECTED] wrote:
On Mar 1, 8:45 am, AD7six [EMAIL PROTECTED] wrote:
On Mar 1, 12:08 am, gerbenzomp [EMAIL PROTECTED] wrote:
I've been programming in php
I've been programming in php for years, but I'm relatively new to
cake. I must say I am amazed at the ease of use and intuïtivity of the
framework! Mostly things just work the way you expect them to, which
makes it very easy to work with, and a great pleasure too!
There's also a lot of good
I would like to attach an ajax-call to an image, instead of a text-
link, but I can't get it to work.
My code is:
?php echo $ajax-link('/icons/edit.png', '/posts/edit/'.$post['Post']
['id'], array('update' = array('post_'.$post['Post']['id'],
'second'))); ?
77 matches
Mail list logo