I'm tryinig to access a modem that I can't change the name through
another model ( belongsto association) the problem is that this table
was not created using plurar form so I have problems when I try to
access it.
UseTable it's not working on this, please helpme.
Here's the code :
class
In the Model you can specify the name of the table that it should use:
var $useTable = 'tablename';
On Aug 26, 2:54 pm, JuanWalker juanwal...@gmail.com wrote:
I'm tryinig to access a modem that I can't change the name through
another model ( belongsto association) the problem is that
Do you have a beforeFilter in your users controller, and if yes, does
it invoke the parent beforeFilter?
Enjoy,
John
On Aug 26, 8:59 am, DavidH djhollingwo...@gmail.com wrote:
Just changed the subject back from solved to not solved.
I found that unless I have autoRedirect = false in both
Hi
I'm trying to understand if and in which way could be possible to
achieve such a result. Maybe I've explained the wrong way: I need to
format some common fields like boolean value and achieve this adding
an afterFind(results) callback in the app_model.php. I'd like to know
if this is the best
Ok, as far as I see Overloadable2 is used basically when you need auto-
magically generated getters and setters.
So is just a bad decision in the class name :)
Thank you Mark
On Aug 25, 8:10 pm, mark_story mark.st...@gmail.com wrote:
I don't think its deprecated. The JsHelper in 1.2 uses it
Hi Nicola.
I'm trying to understand if and in which way could be possible to
achieve such a result. Maybe I've explained the wrong way: I need to
format some common fields like boolean value and achieve this adding
an afterFind(results) callback in the app_model.php. I'd like to know
if
Hi All,
Currently using version 1.2.4.8284
I spent a good half-day trying to get the Auth and Acl components to
play nicely with the Auth::authorize var equal to 'actions' and a
single root ACO node of 'controllers', accessible by the ARO that is
connected to a Group model, which has many users
Cheers guys,
well my problem is mainly related to the DB entries.
I'm deploying my application to the production server with capistrano,
pulling the application from a github (git) repository.
I have teh following DB config:
From phpinfo()
I have Apache:
HTTP_ACCEPT_CHARSET ISO-8859-1,utf-8;q=0.7,*;q=0.7
on both servers.
Dev server:
PHP Version 5.2.6
MySQL 5.0.67
I am Searching on web but not find proper solution if you have vendor class
or helper.
Please guide for the same in littel beat detail.
On Wed, Aug 26, 2009 at 9:37 AM, Marcelo Andrade mfandr...@gmail.comwrote:
On Wed, Aug 26, 2009 at 8:51 AM, liyakat Ali ali786...@gmail.com
wrote:
hi
Thx! I didnt know about that yet!
On Aug 26, 6:31 am, Dr. Loboto drlob...@gmail.com wrote:
If you're using PHP5 you can try class constants for
this:http://ru2.php.net/manual/en/language.oop5.constants.php
Because defines are _global_ as euromark mentioned.
On Aug 25, 5:53 pm, pph7
Hi,
I am uploading files(images, mp3s etc) to my webroot /files/ folder.
The files are named their id number.their extension. Without any
custom routing I can access these files by /files/343.png.
I would like to access this file by using the URL /files/343-
sometitle.png as well. At the moment
Hi, people
i wanna show commentaries in my site and i would like be possible
answers them. What i want is to show something like youtube
author answer
commentaries
So, after click on answer, one textarea should appear after
comentaries. How can i start?
Hi Jon
thanks for your kind reply but that's just what I'd avoid: I'm trying
to accomplish an automatic way to achieve that result, I know it's not
right to use a model function and I asked for an MVC and non-
validation-breaking way..
On 26 Ago, 11:23, Jon Bennett jmbenn...@gmail.com wrote:
Hi,
I am uploading files(images, mp3s etc) to my webroot /files/ folder.
The files are named their id number.their extension. Without any
custom routing I can access these files by /files/343.png.
I would like to access this file by using the URL /files/343-
sometitle.png as well. At the
Hi Nicola,
thanks for your kind reply but that's just what I'd avoid: I'm trying
to accomplish an automatic way to achieve that result, I know it's not
right to use a model function and I asked for an MVC and non-
validation-breaking way..
Another way would be to create a helper.
How about
@ Bert: yes that's the problem, I'm looking for a way to accomplish in
an automatic way and not only for boolean fields (which aren't
difficult to implement with an ad-hoc behavior)
On 26 Ago, 15:46, Bert Van den Brande cyr...@gmail.com wrote:
I don't really understand the problem you present.
I am searching for vendor file that can be used for yui editor.
But I am not getting..
Do you have any idea for same
On Aug 26, 9:07 am, Marcelo Andrade mfandr...@gmail.com wrote:
On Wed, Aug 26, 2009 at 8:51 AM, liyakat Ali ali786...@gmail.com wrote:
hi
I need to Apply YUI(yahoo)
I have already studied (implemented) the blog and acl tutorials
getting quite familiar with the basic elements of the framework. I've
also learnt how to use a bit of bake.
My question came when I wanted to start my own web page. I have my
data model, logic, structure (all of them in design), and
when i create controller , cakephp show missing_tabel error
any controller must be have tabel ?
i want create controller without tabel, can i do this ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
I don't really understand the problem you present.
Either you display a model field as a read-only piece of information
in the view, and then there is no problem with data being updated.
Or you display model data in a form that can be edited, and in case of
for example the boolean you provide a
Hi Matias,
You don't need a database for your model
You can use the $useTable = false; to disable the use of database in
your model/controller
You can make a 'Page' controller and a 'home' action/view to display
your home page
Then you can use Routes to set your index page is pages/home
I
That's a good starting point but there's need to change every
interested line in the views, while I'd like to obtain an automatic
and centralized solution i.e. if I write a new page there should be no
need to remember that work-around
On 26 Ago, 15:42, Jon Bennett jmbenn...@gmail.com wrote:
Hi
I do indeed John. This is my current UsersController beforeFilter:
function beforeFilter()
{
//
// Inherit beforeFilter from appController
//
parent::beforeFilter();
$this-Auth-autoRedirect = false;
}
On Aug 26, 7:53 am, John Andersen
Hi all.
I have a situation, that must be very common, and i'm wondering what
the Cakephp approved way to do it is. I don't really want to just make
up a way, because i might lose some of the goodness of following the
conventions etc.
I have a page with an article on it, and want a form to add
Hello,
What i am doing wrong with link overwrite, as it is not working.
in AppHelper
function __construct() {
parent::__construct();
}
function link($title, $url = NULL,$htmlAttributes = array(),
$confirmMessage = false,$escapeTitle = true){
$title .= test;
return
Hi all,
I'm a big CakePHP supporter and introduced it to a few enterprises as
both a framework and development methodology.
Recently I started using Tumblr and thought it might be possible to
use it for some good, providing knowledge about development practices
in small bite size chunks then
Hi,
I am a programmer from a 7 gays team, and I have recently finisher my module.
When I uploaded my work to stage one server, I have a bug in sql
query generated by cake:
It appends the model name to an alias code
MortgageDetail`.(`interest_only_rate + 0 `) as interest_only_rate,
/code. This is
I am developing my first cake app. everything is going fine until I
altered my table to include a new field,
everything still saves but it just wont save into my newly created
field?
Is there any procedure when it comes to altering tables?
--~--~-~--~~~---~--~~
dear cakephp users,
i am in the process of extending a simple cakephp app which now
requires me to use multiple tables and data associations. now i'm
stuck at a problem and i looking for help!
basically i have one form from which i want to save/update to several
models. when the user adds or
Hey,
You can do this using controller attribute $uses.
Follow that link:
http://book.cakephp.org/view/51/Controller-Attributes
--
Amol
a...@weboniselab.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP
There is a bug when apc_cache is used. This leads to cached entries
which will never expire.
Current code apc.php
function write($key, $value, $duration) {
$expires = time() + $duration;
apc_store($key.'_expires', $expires, $duration); // here is a
bug.
Make your db schema, and use cake command line tool for a first draft
and admin part, and after that make the front end.
On Wed, Aug 26, 2009 at 3:21 PM, Persivo Cunharicky...@gmail.com wrote:
Hi, people
i wanna show commentaries in my site and i would like be possible
answers them. What i
Yes, I believe that should work.
I have one more dought; shouldn't I use the APP/views/pages/home.ctp
to build up my home page? instead of treating the home like any other
view? and if this is so, how do I controle THAT home? I mean, if I
want it to display contents of a database/table
How are you moving the data between servers? And are you using MySQL?
It can be a real PITA when it comes to UTF-8. I've noticed, for
example, that PHPMyAdmin fails to include a line, 'SET NAMES utf-8' in
the dumps it produces, which can mean that MySQL will b0rk the text
when it's read in.
On
Hello people,
I am facing a small problem here.To get you to the point i have 2
models User,Profile and their controllers as well.I have set up the
relations and then i created an element which appears when user logs
in.In the element i have put options in order to view,edit User
details and
Copy the file cake/libs/controllers/pages_controller.php to your
controllers folder. Edit you config/routes.php file to have:
Router::connect('/', array('controller' = 'pages', 'action' =
'display', 'home'));
Next, create a view file at views/pages/home.ctp with your home page.
On Wed, Aug 26,
Hi ark0n3,
That's a good starting point but there's need to change every
interested line in the views, while I'd like to obtain an automatic
and centralized solution i.e. if I write a new page there should be no
need to remember that work-around
I don't see a way around that really. You
Delete everything in tmp/cache/models folder. Also, set debug to 2.
This will force Cake to fetch the table schema using DESCRIBE TABLE.
On Wed, Aug 26, 2009 at 6:15 AM, danielle raymondmcflose...@hotmail.com wrote:
I am developing my first cake app. everything is going fine until I
altered
OK, but, where do I put the logic of that home.ctp? for instance if I
want to display data from another model (ie. news)?
On 26 ago, 11:54, brian bally.z...@gmail.com wrote:
Copy the file cake/libs/controllers/pages_controller.php to your
controllers folder. Edit you config/routes.php file to
In CommentsController::add() do something like this:
if ($this-Comment-validates())
{
if ($this-Comment-save($this-data))
{
...
}
else
{
...
}
}
else
{
$this-Session-setFlash('...');
$this-redirect(
That's a good starting point but there's need to change every
interested line in the views, while I'd like to obtain an automatic
and centralized solution i.e. if I write a new page there should be no
need to remember that work-around
I think you'll find it easier to tackle this issue once
How do you specify a Dealer or Location in the form? Normally, Cake
would expect $data to be, eg:
$data['Artwork']['dealer_id'] = x
However, if the form simply has a text field to enter that
information, Cake won't know anything about the existing record.
I think the thing to do in this case
On Wed, Aug 26, 2009 at 11:32 AM, Matias_castromattias.cas...@gmail.com wrote:
Yes, I believe that should work.
I have one more dought; shouldn't I use the APP/views/pages/home.ctp
to build up my home page?
Yes, that's what I said.
instead of treating the home like any other
view? and if
Actually make that...
var $uses = array('News');
On Aug 26, 6:19 pm, PaulW willis...@googlemail.com wrote:
In the pages_controller.php that Brian talked about you just need to
add
var $uses = array('news');
at the top
http://book.cakephp.org/view/53/components-helpers-and-uses
On Aug
Thanks!
Now I know where to start I will investigate further correct use/mime-
types of the function.
On Aug 26, 2:30 pm, Jon Bennett jmbenn...@gmail.com wrote:
Hi,
I am uploading files(images, mp3s etc) to my webroot /files/ folder.
The files are named their id number.their extension.
In the pages_controller.php that Brian talked about you just need to
add
var $uses = array('news');
at the top
http://book.cakephp.org/view/53/components-helpers-and-uses
On Aug 26, 5:12 pm, Matias_castro mattias.cas...@gmail.com wrote:
OK, but, where do I put the logic of that home.ctp? for
As I said: You can invoke elements inside the view. Have a look at
requestAction,
for instance.
Although, be sure to read this, also:
http://mark-story.com/posts/view/reducing-requestaction-use-in-your-cakephp-sites-with-fat-models
On Wed, Aug 26, 2009 at 12:12 PM,
Because link() method is in HtmlHelper, not in Helper itself. Make
your own helper, load Html helper there, make method link(), load this
helper by default and call it in your views instead of $html-link().
On Aug 26, 3:13 pm, Aurimas Lickus w...@codecard.lt wrote:
Hello,
What i am doing
If it would have been a class constant, you could have accessed it
with className::constant, e.g.
class MyClass
{
const constant = 'constant value';
}
however, you're defining a global constant in which the variable can
be accessed anywhere during the execution of the script just by typing
Use $session-read('Auth.User.profile_id') *if* your User model has
that field. You haven't explained how the association between User
Profile has been set up, so it's difficult to say.
On Wed, Aug 26, 2009 at 12:01 PM, Paulos23paulitosthe...@gmail.com wrote:
Hello people,
I am facing a small
Hi,
I haven't done any file upload handling for a long time in php, so
maybe I am missing something quite obvious here.
I have a simple upload form using the form helper that seems to work.
My controller then calls a model function called data_upload which
is responsible for moving the uploaded
Thank you! I really appreciate it. :)
On Aug 25, 8:31 pm, delocalizer conrad.leon...@hotmail.com wrote:
Hi Sarah;
If you declare in your user model file:
var $displayField = 'username';
then find('list') returns an array with keys of id's and values of
usernames...
and then if you have
I'm brand new to cake so please be gentle
My view look like the following :
div id=property
?php
echo $form-create('property', array('action' = 'findzip'));
echo $form-input('Zip Code');
echo $form-submit();
echo $form-end();
?
/div
?php
Sry Brian you are right!The relations are: User HasOne Profile and Profile
belongsTo User.In profiles table i use the user_id field but in users i
didn't use the profile_id.So in order to make your solution work i must add
a field with that name,if there is not any other soluton.
Many thanks for
Is there way to setup modules in cake... I don't mean plugins which
are seperate capplications but modules that will hace MVC files... but
could also work togheter... for example you can install a Tag module..
and if you install a Pages or Blog modules they could make use of
it... all in seperate
hi
you should turn on debug=2 and have a look at your query. i suspect you
aren't returning the value you want to return any data.
have you pr($this-data) within your controller action? i suspect your
echo $form-input('Zip Code'); field is better named as
echo $form-input('zip',
Hi hb,
I don't know if this will reassure you or frustrate you - but it's not
a bug in db_acl. Acl with Auth-authorize = 'actions' works nicely for
me for a long time, including in 1.2.4.8284. May I ask, in your
AppController::beforeFilter, to what you have set the Auth-
actionPath?
regards,
C.
I have a microsoft SQL server that I need to connect to.
It has fields that are of type 'Text' which I can not read or write to
with the dbo_mssql.php.
This is a Unix-mssql issue for data type 'Text'
There are a couple of ways to get around this. one is to load FreeTDS
which I have done.
I
First off, why dont you just link to the file itself, to the full path
like you said in the first part?
Secondly, you could just rename the file when uploading also.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Hey,
I'm wondering if it would be possible to build up a small a medium
social network, just testwise, with CakePHP.
Let's say we would have approx 50.000 users and the could connect to
each other, could Cake and the DB handle those masses of users and
information?
How would it be pissible to
Updated! Solved!
I found the problem. I noticed in my php only testconn.php file that I
do not specify the port because connecting to the mssql via FreeTDS is
a mapping connection, the only thing you need to specify is the name
of the map you setup in the /usr/local/etc/freetds.conf file. Mine
Can somebody add http://cakeapp.com to Interesting projects/source
code?
--~--~-~--~~~---~--~~
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
o, ok. Thanks brian. i think thats a pattern im going to be using
heaps, so much appreciated.
will
On Aug 27, 2:19 am, brian bally.z...@gmail.com wrote:
In CommentsController::add() do something like this:
if ($this-Comment-validates())
{
if ($this-Comment-save($this-data))
I'm just wondering, why is it most of the items in cakeforge have no
files attached? Is that the right place to be looking for plugins,
bake scripts, applications etc? It seems odd that so many have been
created but without anything being released.
Thanks
Will
Hi there.
Can anyone tell me what's the difference between $this-Auth-
allowedActions and $this-Auth-Acl-Allow??
Will one of them overwrite the other??
Also, I'm having trouble giving free access to everyone to my home
page (in app\views\pages\home.ctp) can anyone tell me how to do this?
I have
Hello!
I'm looking to use jQuery with Cake, specifically with a form. My
plan was to use a DatePicker (http://docs.jquery.com/UI/Datepicker)
control instead of the default datetime drop-down menus, but it looks
like the easy approach (give the datetime div an id that jQuery's
DatePicker
This one's pretty easy actually...Just set the input to be type text
and attach the datepicker to the id of the input (not the div):
?php
echo $form-input('field', array('type' = 'text'));
?
script type=text/javascript
$(function(){
$('#ModelField').datepicker();
});
/script
-Matt
I personally never go to cakeforge.
Try:
http://bakery.cakephp.org/
http://thechaw.com/projects
http://github.com/search?langOverride=q=cakephprepo=start_value=1type=Repositories
-Matt
http://www.pseudocoder.com
On Aug 26, 7:53 pm, #2Will willjbar...@gmail.com wrote:
I'm just wondering, why
var $validate = array(
'username' = array(
'customFunction' = array('rule'=
'customFunction',
'message'='user name error', ),
),
);
function customFunction($data) {
if($data['username'] ==
Rather than trying to return an error message from your validation
functions, split up your validation into smaller single purpose
validations.
Each smaller validation method can be assigned a message to report on
failure.
$validate = array(
'field_name' = array(
71 matches
Mail list logo