@Andrew
The reason the li.active method is so widely used is that is works
for CMSes and other dynamic applications where the contents of the
menu changes. The technique you describe uses hard-coded menu items
which I very rarely find to be sufficient for the applications I work
on.
On Jan
Hi Clark,
Looks to me like the thing you are missing is the small problem your
source-file has with its quotes.
Use of undefined constant â Organizationâ
This suggests that your modelname is not in fact enclosed by single
quotes but some other glyph that looks like it but really has another
I renamed posts to articles and users to accounts. I searched for ser
without U and without u in the profuture folder (the one that was
app)! I get the error message Error: UsersController could not be
found. I can't figure out what is missing to rename! What is it?
What did you rename? users_controller.php file, db table, model...?
On Jan 16, 9:57 am, Delirium tremens pedbe...@gmail.com wrote:
I renamed posts to articles and users to accounts. I searched for ser
without U and without u in the profuture folder (the one that was
app)! I get the error
I'm having real problems when performing finds in CakePHP. I can't
seem to get my head around it. Here's my problem.
Association Structure
users--users_pay_groups--pay_groups--event_deadlines
How do I get all event_deadlines for a given user and order by a field
in event_deadlines ?
If I do:
manual? i looked through the api, but couldnt understandthanks
though i found my old code and everything worked out fine
Don't Judge people without understanding the situation they are in
On Jan 14, 9:04 pm, Smelly_Eddie ollit...@gmail.com wrote:
I think in the same amount of time you
Was wondering if there is a delay function i could use in my
controller , to force cake to wait for a find() function to execute...
This is the situation iam in
$temp=$this-Invno-find('all',array('conditions'=''.
$conditions,'fields'=array('id')));
$this-data['invno_id']=0;
Hi all,
I'm trying to put some images in /app/webroot/img/photo, but the
following html doesn't display anything:
img src=/img/photo/HawaiiSurf.jpg alt= /
In addiction, if I point my broser directly to
http://mysite.com/img/photo/HawaiiSurf.jpg
I get this:
Missing Controller
Error:
Hmm. Just found the same thing. Seems to be to do with lines 110 to
117 in core error.php __construct method
if ($method !== 'error') {
if (Configure::read() == 0) {
$method = 'error404';
if (isset($code) $code == 500) {
$method =
All databse queries are executed synchronously - i.e. once you call
`find()`, the next line of code will not execute until the find has
been completed, the data fetched and formatted.
If the returned data is not there, then there must be a problem with
your query. Using the sql query log
http://book.cakephp.org/view/165/Controller-Setup, this may help you
2009/1/16 forrestgump vikhya...@gmail.com
manual? i looked through the api, but couldnt understandthanks
though i found my old code and everything worked out fine
Don't Judge people without understanding the
Resolved thanks to Martin's help in the following thread ...
http://groups.google.com/group/cake-php/browse_thread/thread/cf431215392af9bb/3e927decddb4f1b2#3e927decddb4f1b2
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Aw man. Effort?
Ok thanks, will do and will try post the results in a readable
fashion.
On Jan 16, 1:22 am, Miles J mileswjohn...@gmail.com wrote:
Tablekit mainly JS/AJAX, which can simply be ported to CakePHP with a
little effort.
--~--~-~--~~~---~--~~
You
Hello everybody.
I'm trying to access a website through the cake shell to use the 'Cake
schema run create DbAcl' command but have no idea how to link the IP
address / URL to the command. I've read all over te internet and
apparantly it has something to do with a '-connection' extension, i.e.
This error happens when the image doesn't exist, and the request is
forwarded to cakephp. Make sure the file is there and case-sensitive
if on linux.
Cheers,
Adam
On Jan 16, 8:48 pm, g4b0 gabriele.bros...@gmail.com wrote:
Hi all,
I'm trying to put some images in /app/webroot/img/photo, but
I usually add this to my .htaccess files:
# Do not route missing asset requests through cake
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !img/titles
RewriteRule ^/?((img|js|css|swf)/.*)$ - [R=404,L]
The img/titles rule is an exception
I'm trying to use save() to update model data after submitting an edit
form and the resulting SQL is missing any reference to a foreign key
association. The core data updates fine, but if I change the foreign
key data, the change is ignored.
I have an Entry model that belongsTo an EntryType
Graham, thanks for your answer. The RemotingController class is loaded
fine with:
App::import('Controller', 'Remoting');
but components don't get initialized, it throws the same error. I also
tried adding after the App::import():
ClassRegistry::init('RemotingController');
But didn't
Hello Martin,
Thanks for your reply. My files are all UTF-8. And, no - never touch
MS Word - pasted in from browser. Running Linux on dev and production
boxes.
I also looked at Firefox View Source. The leading mysterious quote
mark is the upward curving opening quote, and the trailing one is
could you post your Entry EntryType model?
On 16 jan, 15:21, Rob Wilkerson r...@robwilkerson.org wrote:
I'm trying to use save() to update model data after submitting an edit
form and the resulting SQL is missing any reference to a foreign key
association. The core data updates fine, but if
when i began with cake I use this website
http://www.formation-cakephp.com/1/environnement-travail-cakephp-windows
or if you don't understand french:
http://translate.google.fr/translate?u=http%3A%2F%2Fwww.formation-cakephp.com%2F1%2Fenvironnement-travail-cakephp-windowssl=frtl=enhl=frie=UTF-8
Buenas.
Querria insertar un archivo html independiente del cake en la carpeta
app del cake. El problema es que me da erro como de no conexion con la
base de datos cuando intento acceder a el: por ej: localhost/cake/app/
prueba.htm. Es como si tuviese que darle permiso desde algun sitio del
my upcoming projects all cakephp so i want to learn cake plz anyone
guide me.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To
Bernardo, we need to separate very differently our web-apps in two
parts: communication with flash client-side and HTML back-end
administration panel. So we have general app-wide logic and another
very specific logic for client-side that is general to all the
controllers that will be used in the
try putting it in your app/webroot folder.
garza2002 wrote:
Buenas.
Querria insertar un archivo html independiente del cake en la carpeta
app del cake. El problema es que me da erro como de no conexion con la
base de datos cuando intento acceder a el: por ej: localhost/cake/app/
prueba.htm.
On Fri, Jan 16, 2009 at 9:38 AM, ezekfred ezekf...@wanadoo.fr wrote:
could you post your Entry EntryType model?
Sure, though there's not much to it:
?php
class EntryType extends AppModel {
public $name = 'EntryType';
public $hasMany = array ( 'Entry' );
}
?
?php
class
Hi,
I have a form with two models (User Consumer, Consumer belongs to
User) - my view looks like this:
echo $form-create('', array
('controller'='users','action'='first'));
echo $form-input('User.firstName', array('label' = 'First Name'));
echo $form-input('User.lastName', array('label' =
sasikumar a wrote:
my upcoming projects all cakephp so i want to learn cake plz anyone
guide me.
http://book.cakephp.org/view/4/Beginning-With-CakePHP
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP
I never try to use a varchar pk wtih cake btw if you can add/edit
EntryTypes in your database, I don't see the reason it won't work with
an exotic pk
may be an idea: did you try to force your model definitions like
this:
'EntryType' = array (
'className' = 'EntryType ',
I moved all of this code into the controller and did queries on the
data instead of if statements in the view and also did the writes to
the database in the controller and it all works. Lesson is you can't
write to the database from the view file...
On Jan 15, 1:38 am, xybersoftw...@gmail.com
Oh yes thanks to everybody who helped me out on this one...
On Jan 16, 8:31 am, xybersoftw...@gmail.com
xybersoftw...@gmail.com wrote:
I moved all of this code into the controller and did queries on the
data instead of if statements in the view and also did the writes to
the database in the
http://letmegooglethatforyou.com/?q=cakePHP+Resources
On Fri, Jan 16, 2009 at 10:41 AM, Alexandru Ciobanu
ics.cake...@gmail.comwrote:
sasikumar a wrote:
my upcoming projects all cakephp so i want to learn cake plz anyone
guide me.
http://book.cakephp.org/view/4/Beginning-With-CakePHP
Here is my edit function code i don't know where i mistaken if i edit
my record it added automatically one new record and i didn't get
validation messages also below is my edit function code
function edit($id = null){
$this-set('sections', $this-Entry-Section-find
('list',array
Can anybody tell me how to use bake.php for baking in cakephp1.2 i
know how to use this in cakephp1.1 but i don't know in 1.2 i read the
manual and tried but it was not working
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
I know this comes up a lot. I've always fixed this before (1.1) with a
core hack. I thought that as I moved my sites to 1.2 now I would come
up with a little better solution.
I'm not sure if this is the best solution but it works for me. I want
others thoughts and opinions for this solution.
On 16 Gen, 11:48, g4b0 gabriele.bros...@gmail.com wrote:
Hi all,
I'm trying to put some images in /app/webroot/img/photo, but the
following html doesn't display anything:
img src=/img/photo/HawaiiSurf.jpg alt= /
Uhm, just a simple doubt: did you try img src=photo/HawaiiSurf.jpg
alt= / ?
Hey all,
Our CakePHP CMS is growing in size and some of the controllers load as
much as 19-20 helpers each, even when all of them are not required.
There are few controller actions which require max of 6-7 helpers at
max. So in order to make CMS more fast, I was thinking it'll be better
to load
Thanks a Bunch!!! again Grigri...tht helped :)
On Jan 16, 4:37 pm, grigri j...@hendersonwebdesign.com wrote:
All databse queries are executed synchronously - i.e. once you call
`find()`, the next line of code will not execute until the find has
been completed, the data fetched and formatted.
I am building a social network and work on the users, requests, friends
portion.
users: id
requests: id, user_id, friend_id
friends: id, user_id, friend_id
I had setup the requests and friends tables to have user_id and friend_id
but they both point back to the users table. When working on the
On Fri, Jan 16, 2009 at 10:54 AM, ezekfred ezekf...@wanadoo.fr wrote:
did you try to force your model definitions
I haven't tried being that explicit. I guess I assumed that's what all
of the DESCRIBE queries were doing and they would pick up the fact
that it was a key even though its data
I'm pretty sure you can do this in your controller action:
$this-helpers[] = 'asset';
The helper will be added to the helpers already set up for the
controller.
-Matt
http://www.pseudocoder.com/
On Jan 16, 11:52 am, Abhimanyu Grover gigapromot...@gmail.com wrote:
Hey all,
Our CakePHP CMS
Martin had already answered the question quite well...
but just to add a little... in terms of good practice... think about
the usage of requestAction()...
Are you getting some data from another model and returning it to the
current controller?
In that case you are better off doing $myData =
Hopefully this is an easy one, please help if you can.
I have 1 table that has a 'submittedDate' field (fieldtype is 'date')
When trying to paginate this table using the following conditions: (to
get every submittedDate after 2006-06-15)
.'submittedDate ' = '2008-06-15'
I only get the
Oops, ignore this, it works fine and i need some caffeine.
On Jan 16, 12:47 pm, Al al.scheur...@gmail.com wrote:
Hopefully this is an easy one, please help if you can.
I have 1 table that has a 'submittedDate' field (fieldtype is 'date')
When trying to paginate this table using the
Thanks for you help, it has gotten me closer.
Another thing I figured out is I needed to use the $uses array, which
I didn't have.
var $uses = array('User','Recipe','Mastercat');
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
That's not a good idea, because since your models are related they are
already loaded.
Actually, using $uses is rearely a good idea.
The only time you might consider it, is when you need an absolutely
unrelated model...
Even still... within your action you can load the model just when you
need
My goal is to have the Auth component challenge a login on every URL
into the application.
I have setup my app using the code found in the Auth component section
of the cake 1.2 manual, but if I try to access a non-existent
controller I get the 'Missing Controller' error message.
I was hoping
Why not using the html helper in view?
$html-image('photo/HawaiiSurf.jpg');
Andrea
On Jan 16, 5:40 pm, Stefano Manfredini stefanomanfredin...@gmail.com
wrote:
On 16 Gen, 11:48, g4b0 gabriele.bros...@gmail.com wrote:
Hi all,
I'm trying to put some images in /app/webroot/img/photo, but
If you set up properly the model associations, and set the recursive
value of the $this-EventDeadline object to the number of associations
you have,
you can do :
$this-EventDeadline-find('all', array(
'conditions'=array('User.id'=$user['User']['id']),
A site I'm working on has a couple of tables of data that, until now,
have been open for submission by anyone. The client agreed to my
recommendation to make those available to logged-in users only and
would also like to be able to display user info for each entry, which
seems like a good idea
And did u remember to delete the files in app/tmp/cache
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group,
User is a subclass of model. Model::read api here:
http://api.cakephp.org/class_model.html
Think u need to set the model recursive attribute:
$this-User-recursive = 2;
$user = $this-User-read(null, $id);
debug($user);
http://book.cakephp.org/view/439/recursive
I found the solution!
The default user model for the auth component is User. so I changed it
to Account. That's all!
Thank you for listening, anyway.
On 16 jan, 06:57, Delirium tremens pedbe...@gmail.com wrote:
I renamed posts to articles and users to accounts. I searched for ser
without U
Can I call a function from a php file from a view controller? I tried
it with an include and it didn't work...Here is a sample of what I
want...
// File tester.php
? function testCall ()
{ return 100;}
?
// File view controller
?php
class TesterController extends AppController
{
function
Hello. I'm starting a simple application using CakePHP 1.2 and it
greatly improve my experience over 1.1, congratulations!
But (of course, there is always a but =), I'm having some troubles
with a created and modified fields that I expect CakePHP to fill
automatically. Using var $scaffold; in my
What do you mean by, view controller? It appears to me that
TesterController is a controller. There doesn't seem to be any view
involved here.
What is tester.php? Is it your model class?
If testCall is just a function you want globally available, you can
put it in bootstrap.php. If you need
Figured it out, with the help of a sharper pair of eyes than mine. It
turns out that the original code did in fact come from a web page -
the CakePHP manual (I copied, pasted, and edited the table name and
other code). When I pasted into my text editor, I didn't notice that
the quote marks were
Is there a way to activate and set the text of a $form-error outside
a validation rule? I've got some complicated validation logic in the
controller and I would like the error to show near the offending field
instead of using setFlash.
-John
--~--~-~--~~~---~--~~
How can I specify a redirect array which includes a URL fragment/hash?
/my_controller/my_action#my_fragment
eg. array('controller' = 'my_controller', 'action' = 'my_action', ? = ?)
Google's not showing anything and, while the functionality may not be
possible, I'm sure someone else must have
Jesse,
Are you wanting to access static pages without seeing the word pages
in the URL?
You could edit app/config/routes.php to have lines like this in it:
Router::connect('/about', array('controller' = 'pages', 'action' =
'display', 'about'));
Router::connect('/join', array('controller' =
You can use Model::invalidate();
Johnathan Henderson wrote:
Is there a way to activate and set the text of a $form-error outside
a validation rule? I've got some complicated validation logic in the
controller and I would like the error to show near the offending field
instead of using
No, the controller has to exist. But before the user can access any
action, it has be authorized and logged in.
Theres nothing you can do about the missing controller, unless you
write your own error handler.
--~--~-~--~~~---~--~~
You received this message because
So I have Teams HABTM Areas, with the following in the Team model:
var $hasAndBelongsToMany = array(
'Area' = array('className' = 'Area',
'joinTable' = 'areas_teams',
'foreignKey' = 'team_id',
'associationForeignKey' = 'area_id',
I've encountered major problem on one of our applications. Cake is
taking a very long time creating the resulting data array from a DB
query. Here's the scenario:
Models: Order has many OrderLineItem
Data: About 2800 Orders, each with one OrderLineItem
This is part of a function in the Order
The response to CakePHP 1.2 Final has been amazing. In less than a
month, we have seen over 40, downloads. These numbers go along
nicely with the 2000+ users who grab the svn version. We cannot thank
everyone enough for continuing to support the project.
As a little reward, we worked hard to
Why do you even need to grab 2800?
Also whats the speed like for a low amount of results. And what
happens when you limit what fields are returned.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To
After the release of 1.2 Final, we received a lot of attention. Some
of this came in the form of a security concern. The issue could affect
sites relying on the AuthComponent for user authentication, without
the use of the SecurityComponent. Essentially, an attacker may be able
to obtain
Nevermind, it was a MySQL issue involving duplicate keys. Whoops on my
part.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To
In addition to clarkphp's comment, if you have static files inside
directories, ie. views/pages/about/foo.ctp
Router::connect('/about', array('controller' = 'pages', 'action' =
'display', 'about/index'));
Router::connect('/about/*', array('controller' = 'pages', 'action' =
'display', 'about'));
You components are missing because __mergeVars() which does the
variable merging only works with AppController / PluginAppController.
In all other situations related to inheritance you will need to
redeclare the components, uses and helpers.
-Mark
On Jan 16, 10:14 am, caminante
I too went through the same issue when putting together an app
sometime back, as Mark said when inheriting like this the components,
uses and helpers controller vars need to be redeclared or merged by
you.
The obvious answer for me ended up being to create a plugin (given
that your happy using
I should say too, I'm sure someone will moan about the suggestion of
creating a plugin for something that is not essentially that, but we have
built a number of large applications and found the plugin architecture quite
useful for segmenting parts of your application as much as creating drag and
Here is my setup on something similar to a weekly planner or punch
clock with on-duty time blocks.:
DutyPeriods has many Deviations
Deviations belongs to DutyPeriods
I have a validation setup that checks to see if data being added to
DutyPeriods doesn't overlap with existing ones. I need to be
I have a multi page input form thingy - on the first page, the user
inputs some event information, then clicks next, this information is
saved, then on the next page, the user inputs some user information,
clicks save, and this information is saved. The issue is, now the
event info has to be
This is a new cakephp install. I'm trying to use postgresql 8.3.5.
However, whenever I rename the database.php.default to database.php
and include the following for the postgresql details, the graphics
disappear from my cakephp main page.
var $default = array(
'driver' =
After the Event info has been submitted, if your models are set up
correctly, you should get the Event id included in your User form if
it's in $this-data['Event']['id']
User form:
$form-hidden('Event.id')
However, wouldn't it make more sense to submit the User info before
the Event info? I
Hi guys,
I am new to cakePHP, and am trying to set up a dev installation on my
Hostmysite.com account. However, I keep getting the following error...
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the
I want to build 1 controller running (5 minutes to run 1 times).
Examples: 5 minutes I will write log files 1 times and backup
database.
Controller will run without calling anyone.
So I have to write how.
Thanks
--~--~-~--~~~---~--~~
You received this message
If so, how did you do the following:
- Determining if a user has read a thread or leave it unread, also
marking all threads as read
- Whos online (thinking of using a model for a memory table)
- User groups (supermod, admin, etc), did you use ACL or custom system?
hi,everyone.
I have use the emailcomponent to send Email.
but my subject can't be show by my charset-setting
but the content can be show very good.
version cakephp 1.2
I have no use the smtp and template.
Thanks
rimoe
--~--~-~--~~~---~--~~
You received
maybe is the rewrite mod :P or the .htaccess
On Fri, Jan 16, 2009 at 10:34 PM, PHPScriptKiddy curl.rob...@gmail.com wrote:
Hi guys,
I am new to cakePHP, and am trying to set up a dev installation on my
Hostmysite.com account. However, I keep getting the following error...
Internal Server
However, wouldn't it make more sense to submit the User info before
the Event info? I assume that a User hasMany Event. In which case,
you'd have the User submit their info and ensure that
$this-data['User']['id'] was set before rendering (not redirect to)
the Event form view, which
Tester.php is a file with a regular php function I want available to
view/tester/index.thtml
And also need to call it from the TestController Class...
controller/tester_controller.php...can call it from view/tester/
index.thtml ok with a
include tester.php
but can' seem to get to the function
Whoops! Yes, what Jon said.
On Fri, Jan 16, 2009 at 10:43 PM, Jon Bennett jmbenn...@gmail.com wrote:
However, wouldn't it make more sense to submit the User info before
the Event info? I assume that a User hasMany Event. In which case,
you'd have the User submit their info and ensure that
I'm not sure I understand this. How would the user controller know
which event its supposed to be related to?
I have the user model set to hasMany Events, and Event belongsTo
User. In the view I have the hidden field as suggested.
then I tried this:
Does the User already exist? Or, is the User being created at the same
time as the event?
Either way, if you create the event with the Event controller, all you
need to do is make sure there's a hidden field for Event.user_id and
that its value is set to the User.id.
On Fri, Jan 16, 2009 at
No graphics? That's because real Postgres users do everything from a
terminal window. And LIKE it!
...
I kid! Long-time pg user here. I've no idea what the problem might be,
though. You're not missing a closing brace or something?
On Fri, Jan 16, 2009 at 10:01 PM, reidster
A who's online feature was discussed here just in the past week. I
think the idea was to use the DB for sessions. That would make it
pretty simple to find out who was logged in.
For the thread thing, I suppose you could have a threads_users table
and update it each time a thread is requested.
88 matches
Mail list logo