Hello,
The majority of my blog that I made with cakePHP is up and running. If
you would like to see what I got so far it is located at:
http://www.NeilsWeb.com
Now I would like to fix some minor things such as getting my URL's to
be nice and clean (ie: http://neilsweb.com/categoryname/postname
i
IMO, it is. Just make sure you specify fields with the find all.
But at the end of the day, it's whatever works
On Feb 12, 2008 10:06 PM, cartosys <[EMAIL PROTECTED]> wrote:
>
> Thanks all (your posts didn't show up yet on the google group by the
> time i posted). So do you think the find('
Thanks all (your posts didn't show up yet on the google group by the
time i posted). So do you think the find('all'... + set::combine
approach is the best way to go about this?
-B
ps don't worry, i'll still donate :)
On Feb 12, 3:51 pm, Baz <[EMAIL PROTECTED]> wrote:
> that too...
>
> On Feb 1
The probem with your concept is very simple, and dont be ashme to be
new. We all were at some point. :D
The problem is that in Cake each controller should have the CRUD
(Create, Read, Update, Delete) functions for A model.
You have an Industry controller. Industry in your case should be your
appl
I think the other conceptual viewpoint to look at are the notion of
fat models and thin controllers, and if you can conceptually break
repetitive code out into components and behaviours that more then one
controller/ model can share...
Sam D
--
--
(the old fart) the advice is free, the lack
I have a controller called "Industry". In Industry, I have methods
that create, edit and delete "Projects", the data for which are stored
in the "projects" table modeled by the "Project" model. In Industry I
also have methods that create, edit and delete "Roles", the data for
which are stored in t
My first cakephp project, 8 months ago, an e-commerce.
I was made a controller that list all categories, all subcategories and all
products, and cache it.
The result is this http://www.e-coyote.com.br/sitemap.xml.
I share the same idea of @T73 Net.
[]'s
On Feb 12, 2008 3:29 PM, T73 Net <[EMAIL
The question that must be made is: why you have a controller that includes
many models?
A controller, in principle, must deal with all the operations of only one
model.
You can have many models but on the same controller, but they should have
relations with the model. So if you do not have relatio
My questions are motivated by the fact that I have a controller which
includes a sizable number of methods. The result is that I must have a
long list of Models at the beginning of the class. It is often the
case that there is a method that only stores data from an input view
and then either "$thi
On Feb 12, 2008 7:18 PM, peterhf <[EMAIL PROTECTED]> wrote:
>
> Hello All,
>
> Philosophical Question:
>
> If my application requires a large number of methods is it "better" to
> include them all in one controller or is it "better" to put each
> method, or at least a small number of related metho
Hello All,
Philosophical Question:
If my application requires a large number of methods is it "better" to
include them all in one controller or is it "better" to put each
method, or at least a small number of related methods, in individual
controllers?
Practical Question:
If the methods are in
Have you tried JEdit? It's what I use, & with the PHP plugin & a
couple of conf changes to display PHP code colours in the .thtml files
it works a treat.
T
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP"
umm nevermind hehe my mistake i placed the poulate function outside
the 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 unsu
Umm it looks nice but when i run the populate function i get:
Warning (512): SQL Error: 1064: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near 'populate' at line 1 [C:\wamp\www
\cake_1.2\cake\libs\model\datasourc
I didn't realise google groups couldn't handle url requests. Here is
the url to copy and paste
http://img170.imageshack.us/my.php?image=schemavo5.gif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
hi bakers,
I have search for ages on this one. And i have a partial solution.
Problem:
I have a table that has two HABTM table off it ([URL=http://
img170.imageshack.us/my.php?image=schemavo5.gif][IMG]http://
img170.imageshack.us/img170/2968/schemavo5.th.gif[/IMG][/URL])
T
On this page (http://bakery.cakephp.org/articles/view/uuid-behavior) I
saw the following:
"Last cake 1.2 build support uuid for your primary key column. You
just need have field ID with type varchar(36)"
Does anyone have any more information on this?
--~--~-~--~~~---~
Aha!
http://groups.google.com/group/cake-php/browse_thread/thread/5617060b25ac6ee2/f895d8db8077367e?lnk=gst&q=component+startup#f895d8db8077367e
Scaffolding is the problem.
That is all.
On Feb 12, 1:31 pm, Aaron <[EMAIL PROTECTED]> wrote:
> I've written a small authentication widget and I'm ha
Apparently, my root problem is that the startup() method of the
component is not running before checkAuth().
Anyone know why that might be?
Thanks,
Aaron
On Feb 12, 1:31 pm, Aaron <[EMAIL PROTECTED]> wrote:
> I've written a small authentication widget and I'm having trouble with
> it. Inside t
put this in your controller:
$this->data = $modifiedData;
On Feb 12, 2008 7:17 PM, Dia <[EMAIL PROTECTED]> wrote:
>
> hi
>
> I know this question was already asked a few times and I read some
> topics about it on this g.group but didn't find the answer I'm looking
> for (found "put it in control
that too...
On Feb 12, 2008 3:31 PM, cartosys <[EMAIL PROTECTED]> wrote:
>
> I got it! It's in the models! Awesome:
>
> //model type.php
>
> $displayField = 'type';
>
>
> easy as that!
>
>
> -B
>
> >
>
--~--~-~--~~~---~--~~
You received this message because you a
The problem was quite simple, Model::find() has 4 parameters i was
using 6
On Feb 12, 10:13 pm, "Renan Gonçalves" <[EMAIL PROTECTED]> wrote:
> You can try this:
>
> $user = $this->find('first', array(
> 'conditions' => array('username' => $data['username'], 'password' => md5
> ($data['passwor
I've written a small authentication widget and I'm having trouble with
it. Inside the component I would like to use the calling controller's
redirect() method, but I get the following error:
Fatal error: Call to a member function redirect() on a non-object in
{file} on {line}.
The error occurs
I got it! It's in the models! Awesome:
//model type.php
$displayField = 'type';
easy as that!
-B
--~--~-~--~~~---~--~~
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@
hi
I know this question was already asked a few times and I read some
topics about it on this g.group but didn't find the answer I'm looking
for (found "put it in controller", for example)
so, how can I change the value of an attribute of a model in
beforeValidate and then see this change on the
change:
$types = $this->UrlsUser->Type->find('list',
to
$types = $this->UrlsUser->Type->find('all',.
Then:
$types = Set::combine($types, '{n}.UrlsUser.Type.id',
'{n}.UrlsUser.Type.type');
I think. Those paths in the combine reflect how the data is, in the array
return from find->('all'
Okay, the first thing to do would be to check the output in the
controller, i.e. pr($types).
Second, make sure you're actually *sending* the types var to the view,
i.e. $this->set("types", $types); or $this->set(compact("types"));
Third, check it in your view file (same code as step 1, just move
i am starting a new projetct with requirements to use
josso, in a short explanation, its a java copmonent used
to Single SignOn, if anyone have some tips or
link or just the same needs than i, contact me!
thanks, and will begin integrate, any news published here...
see ya!
[1] http://www.josso.
Hey there,
Check out my Blog post on this subject.
http://mentalramblings.info/posts/view/automatic-sitemap-generation-with-CakePHP-1.2
On Jan 25, 7:07 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> I am sure I have seen a cakephp googlesitemap thingie (either a components
> or a tutorial on ma
Ok, spent many hours looking for appropriate syntax for the formhelper
and controller in 1.2 for this (looked in manuals, API, groups, blogs
etc.). I've decided that I will donate $10 if this issue is resolved!
here's the tables:
urls_users
+-+--+--+-+---
Anyone who knows why your Favorites doesn't get stored in your
Favorites-link at the top? Can't delicious everything..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send emai
thanks for the explanation on calling Behaviors...
On Feb 12, 9:20 am, grigri <[EMAIL PROTECTED]> wrote:
> This way, if controller "CategoriesController" works on model
> "Category", then the following links will work without any extra
> controller or model code whatsoever:
>
> /admin/categories/
Hi Adam
Will have a look at it soon. Is working with a model with tree-
behavior right now.
Gerhard
--~--~-~--~~~---~--~~
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
On Feb 12, 9:16 am, Baz <[EMAIL PROTECTED]> wrote:
> May not be your best bet, but can't you start a transaction and retry until
> complete?
Well a transaction is good and useful, but it only contains writes, so
it still allows Thread B to come along and read the old position
values the instant b
OK, so it doesn't seem to work. I added several AROs with the same
alias ('User:1' for example) but with different parents, then I set
the rights on these parent (user groups) to contradictory rights over
an ACO. I then checked for the user's rights on the aco. I noticed
that there are queries per
On Feb 12, 2008 11:46 AM, avairet <[EMAIL PROTECTED]> wrote:
>
> Hi everybody,
>
> I'm trying to create a "reflexive association", a table HABTM with
> itself.
> What is the better way to generate it with Cake?
>
Have you tried this?
var $name = 'YourModel';
var $hasAndBelongsToMany = array(
Here are some interesting discussions:
http://groups.google.com/group/cake-php/browse_thread/thread/4a3f44f8217435cc/39065d9e99a1c5c1?lnk=gst&q=multiple+primary+key#39065d9e99a1c5c1
http://groups.google.com/group/cake-php/browse_thread/thread/4a3f44f8217435cc/3c1ff611e628644c?lnk=gst&q=multi+prima
http://bakery.cakephp.org/articles/view/what-s-up-docs
On Feb 12, 11:13 am, "R. Rajesh Jeba Anbiah"
<[EMAIL PROTECTED]> wrote:
> On Feb 12, 3:56 am, Baz <[EMAIL PROTECTED]> wrote:
>
>
>
>
> > Members:
>
> > - This is a big one. Please try to understand that CakePHP is very
> > intimidat
> This looks realy good
Try it before ;)
--~--~-~--~~~---~--~~
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
Ah, thanks for that Samuel, I had tried var $helpers = null;
On Feb 12, 4:02 pm, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> add to the fpdf helper
>
> var $helpers = array();
>
> and see if that works, it did for me as I start to relook at this
> helper docs in the latest releases. I am workin
Hi,
I've the same question.
Cake will never support compound or multiple primary keys?? Why?
How manage this issue?
Thanks by advance
Avairet
On 12 fév, 09:44, "Matias Lespiau" <[EMAIL PROTECTED]> wrote:
> On Feb 12, 2008 3:56 AM, adammc84 <[EMAIL PROTECTED]> wrote:
>
>
>
> > if the MySql da
Hi everybody,
I'm trying to create a "reflexive association", a table HABTM with
itself.
What is the better way to generate it with Cake?
Thanks by advance for answers...
BR
Avairet
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
before making a new controller, or model I always check the api
http://api.cakephp.org/1.2/classes.html
just to be on the safe side
On Feb 12, 2008 9:35 AM, Adam D. <[EMAIL PROTECTED]> wrote:
>
> It worked! Your a savior.
>
> I never would have figured that out, being a new cake user.
>
> Thank
there are pages associated with this group that could be used without
getting that whole wiki frackas of a conversation started again
http://groups.google.com/group/cake-php/web
On Feb 12, 2008 9:13 AM, R. Rajesh Jeba Anbiah
<[EMAIL PROTECTED]> wrote:
>
> On Feb 12, 3:56 am, Baz <[EMAIL PROTECTE
It worked! Your a savior.
I never would have figured that out, being a new cake user.
Thanks again!
-Adam
On Feb 5, 4:02 am, grigri <[EMAIL PROTECTED]> wrote:
> File is a reserved word in Cake - there is already a class called
> File. Try renaming yourmodel.
>
> On Feb 4, 7:23 pm, "AdamD." <[EM
On Feb 12, 3:56 am, Baz <[EMAIL PROTECTED]> wrote:
> Members:
>
>- This is a big one. Please try to understand that CakePHP is very
>intimidating to novices and sometimes people need *exact* examples.
>Not "hunt through this post with 12 different replies and try to pluck out
>
On Feb 12, 2008 11:01 AM, grigri <[EMAIL PROTECTED]> wrote:
>
> This is exactly what the PagesController does.
>
> Move your views/news directory to views/pages/news
>
> Edit /app/config/routes.php, and add this line:
>
> Router::connect('/news/*', array('controller' => 'pages', 'action' =>
> 'dis
> I knew I've seen this before:
>
> http://snook.ca/archives/cakephp/static_pages_cakephp12/
>
> Basically, he's overriding the Error handler and making it check for
> views without controllers.
Ok, that's even easier! Nice.
On Feb 12, 4:01 pm, grigri <[EMAIL PROTECTED]> wrote:
> This is exactly
add to the fpdf helper
var $helpers = array();
and see if that works, it did for me as I start to relook at this
helper docs in the latest releases. I am working on updating them for
1.2 but just haven't had time
Sam D
On Feb 12, 2008 6:12 AM, RichardAtHome <[EMAIL PROTECTED]> wrote:
>
> Hi A
This is exactly what the PagesController does.
Move your views/news directory to views/pages/news
Edit /app/config/routes.php, and add this line:
Router::connect('/news/*', array('controller' => 'pages', 'action' =>
'display', 'news'));
That should do it!
On Feb 12, 3:48 pm, "Chris Hartjes" <
I knew I've seen this before:
http://snook.ca/archives/cakephp/static_pages_cakephp12/
Basically, he's overriding the Error handler and making it check for views
without controllers.
--
Baz L
Web Development 2.0
http://WebDevelopment2.com/
On Feb 12, 2008 9:48 AM, Chris Hartjes <[EMAIL PROTECTED
This looks realy good - thanks for posting it! :-)
On Feb 12, 2:16 pm, jakecake <[EMAIL PROTECTED]> wrote:
> ...and thanks to the people who helped me to fight with the Bakery
> registration ;) Maybe an article on it later.
--~--~-~--~~~---~--~~
You received this m
On Feb 12, 2008 10:45 AM, cronet <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> is there a possibility to create views without a controller ?
>
> e.g. I have a view directory "news". I want to display all views
> automatically without the controller function!
> If someone request http://domain.com/news/a
Hi,
is there a possibility to create views without a controller ?
e.g. I have a view directory "news". I want to display all views
automatically without the controller function!
If someone request http://domain.com/news/abc it should render
abc.ctp (but without crating the controller function)
We have Images, tags, and imagestags tables.
One image can have one, many or no tags.
A tag can have many images.
We want to get all the images with a specific tag or no tags at all.
Can this be done with one findAll()?
We have tried a number of different ways to get at the data without
having
Hi,
In my login panel, after the focus is lost from the "Username" textbox, I
want a javascript function to validate on the "onBlur" event of "Username"
textbox to check whether the username is left blank or not.
I am new to cakephp and i am tyring to learn javascript helper using the
above exa
Hi everyone,
I know this topic has been discussed a million times, but I have a
weird problem with saving a HABTM relation. The premise is as follows:
I have a model "Event", which is setup with a HABTM relationship with
the model "Ticketseller". Now I let Bake create all the necessary
controlle
> But just for the future, is there any article/discussion about
> including controllers functions inside others?
> Thats a tipical case and I wanted to read more about it.
I don't think so, but I could be wrong. Here's a brief overview of
your options for sharing logic between controllers:
* If
Man I loved that solution. Also because it gives me a global solution.
Thanks!
But just for the future, is there any article/discussion about
including controllers functions inside others?
Thats a tipical case and I wanted to read more about it.
On Feb 12, 2:05 pm, grigri <[EMAIL PROTECTED]> wr
All public functions in a Behavior are available directly from the
Model, a kind of mix-in. The first argument is always the model, and
it's always passed automatically.
So you do this:
$this->Project->moveUp($id);
Since I use this behavior in a lot of models, I actually have this
(excerpt):
h
...and thanks to the people who helped me to fight with the Bakery
registration ;) Maybe an article on it later.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to
May not be your best bet, but can't you start a transaction and retry until
complete?
On Feb 12, 2008 7:49 AM, sbeam <[EMAIL PROTECTED]> wrote:
>
> On Feb 12, 5:59 am, wirtsi <[EMAIL PROTECTED]> wrote:
> > so I'll just go over to this thread with my problems :)
>
> sorry for derailing your threa
Hi all,
Here is the plugin to manage users/groups, registration,
authentication, ACL, and the GUI to manage everything.
http://conseil-recherche-innovation.net/authake
This is in development so becareful before using it. I made this in
few days to learn Cake (by the way, thanks to Marco Sbragi,
This is just an idea:
app/controllers/app_controller.php
class AppController extends Controller {
function redirect($url, $status = null, $exit = true) {
if (is_array($url)) {
$url['inline'] = !empty($this->params['named']['inline']);
}
return parent::url($url, $status, $exi
should be a numeric value stored in $this->data['MODELNAME']['FORM-ELEMENT']
0 for first selection, 1 for next, etc.
If that's not exactly it, you can determine it from how you wrote things
with the form helper.
Replace MODELNAME with the first parameter in our $form->create() function,
and FORM-EL
On Feb 12, 5:59 am, wirtsi <[EMAIL PROTECTED]> wrote:
> so I'll just go over to this thread with my problems :)
sorry for derailing your thread ;)
> ...
> function beforeSave()
> {
> $this->query("LOCK TABLE {$this->table} AS Framejob WRITE,
> {$this->table} WRITE,
>
I'm not sure about anyone else, but to me you still haven't explained
the big picture and what you are really trying to achieve.
Cheers,
Adam
On Feb 12, 11:28 pm, MX <[EMAIL PROTECTED]> wrote:
> I think I wrote too much and explained so little.
> This is the situation:
>
> 3 Backend Controllers:
You set up an account at:
trac.cakephp.org
and hit "new ticket" and follow the instructions.
On Feb 12, 2008 2:17 AM, DlEast <[EMAIL PROTECTED]> wrote:
>
> Yes most probably it is,
>
> I now manually solve it by adding and removing the associative array
> when loading and saving from/to the data
I think I wrote too much and explained so little.
This is the situation:
3 Backend Controllers:
- Users
- News
- Images
news/admin_add.ctp
__
...
'image', 'action' => 'index', 'inline' =>
true)>
...
images_controller.php
class ImagesController extend
On Feb 12, 4:46 am, grigri <[EMAIL PROTECTED]> wrote:
> I use that code in a lot of (admittedly small) projects, and although
> it fits my needs, if you can suggest improvements/enhancements, I'd be
> glad to hear them. But "it didn't quite work" doesn't really give me a
> lot to work with.
no do
Hi All,
I'm trying to get fpdf to work in a 1.2 app I'm building. I'm
following this tutorial (http://bakery.cakephp.org/articles/view/pdf-
helper-using-fpdf) for 1.1.
When I try to access the page that should produce the pdf I get the
following error:
Notice (8): Undefined property: fpdfHelpe
Hi Anna,
I tested your code and everything works as expected on my end. I am
using latest 1.2 so whether this has anything to do with it, I don't
know. You might need to pass null instead of an empty string, but this
didn't make a difference in my version.
By the way, I'm guessing (hoping) that
I fully agree with Baz !
I often find the answers on this mailing list obnoxious and not
helping at all. That's why I never ask questions here. The
"friendliness" of the developer community is one important factor
behind the success and adoption of a new platform like CakePHP. So
please stop with
Hi! I used hack for findAllThreaded function from this group - I
replaced cake's function with:
function findAllThreaded($root = null, $conditions = null, $fields =
null, $sort = null) {
return $this->__doThread(Model::findAll($conditions, $fields,
$sort), $root);
}
I need this function
You can try this:
$user = $this->find('first', array(
'conditions' => array('username' => $data['username'], 'password' => md5
($data['password'])),
'fields' => array('user_id', 'username'),
'recursive' => -1)
);
[]'s
On Feb 11, 2008 10:58 PM, adammc84 <[EMAIL PROTECTED]> wrote:
>
Hi ...
so I'll just go over to this thread with my problems :)
Grigri, your code worked perfectly, drop the paste into behaviours,
add
var $actsAs = array('List'=>
array(
'scope'=>'jobcolumn_id',
'column'=>'jobcolumn_posit
Are you including the correct javascript file in your layout?
Here is my version that I use within 1.2.
http://bin.cakephp.org/view/2055097872
and in my form I have this:
(using a "Person" model)
...
echo $form->input('description',array('rows' => 6, 'cols' => 40));
echo $fck->load('PersonDe
hi,
there is PHPEclipse. Similar to Leo, I have used many different IDE.
But in constrast to Leo, I am more and more liking PHPEclipse. It has
all the powers of PHP and never raised any errors related to your
first problem. Here is a blog on how to setup Eclipse for PHP
http://ragrawal.wordpress.
Hai i got answer it is images stored in database lke varchar and
retrive time this is like image() ?>
On Feb 11, 2:39 pm, abiram <[EMAIL PROTECTED]> wrote:
> Hi all i want store images in database actually images stored in
> webroot img folder in database image path is entering it means only
> i
I might be completely off here, but when I need to differentiate
between popups, ajax dialogs, flash messages and "normal" pages, I use
exactly the same view but change the layout. The layout also specifies
what css to include so the entire look of the view can be changed
without much effort.
On
> I tried the grigri stuff too but it didn't quite work.
Could you be more specific as to _how_ it didn't quite work? Was some
functionality you expected missing, or did it not work in a way you
expected? I don't know RoR so I've no basis for comparaison in that
respect.
I use that code in a lot
On Feb 12, 2008 3:56 AM, adammc84 <[EMAIL PROTECTED]> wrote:
>
> if the MySql database table my model is 'modeled' from has a primary
> key that is user_id,posts_id how do i configure that in cake model to
> use a dual primary key ?
Hi adammc84,
Cake does not support multiple primary keys.
--
This might help you:
http://cakebaker.42dh.com/2006/04/15/file-upload-with-cakephp/
On Feb 11, 2008 6:14 PM, AD7six <[EMAIL PROTECTED]> wrote:
>
>
>
> On Feb 11, 10:39 am, abiram <[EMAIL PROTECTED]> wrote:
> > Hi all i want store images in database actually images stored in
> > webroot img folde
Yes most probably it is,
I now manually solve it by adding and removing the associative array
when loading and saving from/to the database like this:
Load:
$this->data['MasterThesis']['ehl_date']['year'] = $this-
>data['MasterThesis']['ehl_date_year'];
Save:
$this->data['MasterThesis']['ehl_dat
84 matches
Mail list logo