I'm having this problem with cake 1.2 pagination: Things work well if
I just want to search and paginate data on 1 model (i.e: $this-
>paginate("Entry", $condition);)
However, if Entry can have and belong to many Tags (I have table
entries_tags and table tags), I want to search and paginate all
en
On 2/22/07, abba bryant <[EMAIL PROTECTED]> wrote:
> minutes ago ) attempting to use the validator and still had $html->tagE.. in
> my views that I missed. Oops.
Thanks for the feedback.
If you use the latest SVN version it is 100% backwards compatible (or
atleast thats what we tried to make it)
Can anyone recommend a web resource to learn the basic issues in
making a site scalable?
An introduction for beginners would be great, but anything would be
appreciated.
If not on the web, than what books would you recommend?
Thanks in advance!
Robin
--~--~-~--~~~-
It would also seem useful to add an html helper or override the
html->tagErrorMsg so that it could accept both the old and the cheesecake
methods. That would make it more portable. I have been caught ( about 20
minutes ago ) attempting to use the validator and still had $html->tagE.. in
my views
Well now. * I * have used it some for my own development / learning cycles a
number of times. The one thing I noticed is the order of the errors and
messages in the validation arrays matters. You need to put them in the
specific order you want the tests checked. IE valid not empty needs then the
Hello Everyone,
Another thread here made me want to raise a question of best practices when
defining directory paths - it really applies both in Cake and in general.
I notice that the Cake convention when defining paths is to create a
concatenated string for the path using the "DS" constant for
On 2/22/07, Wey <[EMAIL PROTECTED]> wrote:
> Hi, I'm actually trying to do exactly this. I don't know .htaccess
> that well, so I how would I configure it to serve up directories and
> files if they exist?
I just solved a similar situation where in I wanted the
http://mysite.com/ (and in turn u
On 2/22/07, abba bryant <[EMAIL PROTECTED]> wrote:
>
>
> If you are using the validator class from CheeseCake or others ( I assume
> here - not sure if it Tariq's or someone else's and he is simply using it. )
> the correct method is to use
The class is ours (cheesecake team) but heavily draws fr
On 2/21/07, jamieh <[EMAIL PROTECTED]> wrote:
>
> Hi again [EMAIL PROTECTED],
>
> Eventually managed to get back onto this. I am a little lost now as I
> don't understand why i would need to use:
>
> $uses = array("Users", "Projects");
You would need that if your User and Project are not associa
parse_url() would work well for this IF you could pass a full URL including
the anchor to it, but the HTTP request sent to the server does not include
the anchor.
Javascripts in the view would have access to the location URL including the
anchor... so you could send that information to the serv
On 2/21/07, AD7six <[EMAIL PROTECTED]> wrote:
> On Feb 21, 2:16 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > In my project after registration completed i want to send a mail to
> > that user and admin.Give me an examples
>
> At the very least, you are missing the magic word.
>
Hint: Re
PaulV,
I've encountered a similar problem. For now I've worked around it by
putting the following AT THE BOTTOM of my .htaccess file:
RewriteRule ^$ /controller/action [R,L]
RewriteRule ^/$ /controller/action [R,L]
If you want to read all the gory details on why this is happeni
Sorry mate I misunderstood your question. I thought you were asking if
Cake was doing something about the anchor ;)
-MI
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send
http://us2.php.net/parse_url
On Feb 21, 9:26 pm, "aranworld" <[EMAIL PROTECTED]> wrote:
> I am familiar with CakePHP's $params array which can give me the GET
> values from a URL.
>
> However, does CakePHP keep track of the "anchor" text in a URL?
>
> For example, if my URL is:
>
> http://www.usa
Looking at the new test file I think I have it.
On top:
uses('Validation');
then before use:
$Validation = new Validation();
Then it works :-)
On Feb 21, 6:07 pm, "Cynthia" <[EMAIL PROTECTED]> wrote:
> Hi Nate :-)
>
> After just having learned about using the Inflector statically I hoped
>
Anchors are dealt on the browser side, there's nothing going on the server
side.
1. If you are on page /controller/action and you have a link like so: then the browser would look for anchor #anchor on the
current loaded page.
2. If you are on page /controller/action and you have a link like so:
I think you would have to use JavaScript to extract an anchor value and send
the information to Cake through AJAX. I could be mistaken but as far as I
know, the anchor portion of a request URL is not even passed to the server.
Rhett
-Original Message-
From: cake-php@googlegroups.com [mail
In windows you can't start a path with a backslash. Try:
if (!defined('ROOT')) {
define('ROOT', 'C:'.DS.'wamp'.DS.'apps');
}
if (!defined('APP_DIR')) {
define('APP_DIR', 'cakeApp1' );
}
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', 'C:'.DS.'wa
Hi All
Why i Create a custom function for valide only uploaded imagem files?
In cake/libs/validators.php is possible create a custom validade, but
only using regular expressions, right?
I'd like to create a custom validade for example which these code:
thanks!
Petry
--~--~-~--~--
I am familiar with CakePHP's $params array which can give me the GET
values from a URL.
However, does CakePHP keep track of the "anchor" text in a URL?
For example, if my URL is:
http://www.usa.gov/billofrights/#amend10
Referring to the in-page anchor named "amend10", can I access this
informa
i found that any pre-existing GET parameters are automatically
sorted out and re-appended during the pagelink generation.
that's really nice, because you just have to pass an initial extra
parameter like this:
http://localhost/cake/index.php/articles/index?myparam=1
the "next" button link will b
Hello,
thanks for your answer !
i found that AD7six, Andy Dawson created that component,
so let's hope he looks over this thread... hehe
Well, i *bet* there is a way of extending the helper methods
_generateUrl / _generateLink
but i need some idea to get started.
in the meantime, yes, post you
Uuummm, I must say I don't really understand what your problem
precisely is, however I can spot a few mistakes in the code you
provided;
* using the HtmlHelper the tagName param should be User/id, not User/
user_id (that's if you're using the cake naming conventions)
* also if your relations
Hi Ritesh,
Try placing:
Options -Indexes
In your .htaccess file.
That should disable directory listings.
Rhett
-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of bingo
Sent: Wednesday, February 21, 2007 7:41 PM
To: Cake PHP
Subject: Re: file uploa
You need to put it under the webroot
mysite
-- app
- webroot
file
HTH,
David Lloyd
--
lloydhome consulting, inc
http://lloydhome.com
On Feb 21, 6:58 pm, "bingo" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to allow users to upload files on to the server...however, I
> got all
I haven't really looked at the new Validation options, but the
traditional way is to do this in your model beforeValidate callback.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this g
Hi,
I think i found solution to my problem..
I created a .htaccess file and placed it inside files folder with the
following line
#prevent directory listing
IndexIgnore *
and now it doesn't allow browsing...great
Regards,
Ritesh
On Feb 21, 8:31 pm, "bingo" <[EMAIL PROTECTED]> wrote:
> Hi
>
>
> is there a way to avoid cakephp taking control over file the folder
why not follow Cake's conventions and save the files in:
mysite/app/webroot/files
which will be publically accessible via:
www.mysite.com/files/filename.ext
hth
jon
--
jon bennett
t: +44 (0) 1225 341 039 w: http://www.
Hi
thanks to all your reply..I got file upload working..however there is
one problem..
Now anyone can see the directory structure and all the files..
I am not sure how to manipulate htaccess so users can only use the
link provided by the application and do not have access to other files
Regards,
Put file inside your webroot folder instead. Still link it as
/file/demo.pdf, but file folder should be inside webroot. This is why: your
/.htaccess file reads:
RewriteEngine on
RewriteRule^$ app/webroot/[L]
RewriteRule(.*) app/webroot/$1 [L]
This means that everything is
Hey there,
For I have use that same pagination helper, I'm almost sure there is
no way to add more param/value pairs to the generated Url.
However I extended it to add a 'filterBy' and it ended up being fairly
simple (minimal coding).
I haven't had the time to have a good look at the new paginat
Hey,
You might want to give this article from the bakery a look;
http://bakery.cakephp.org/articles/view/55
I've been using it and extending it for months now and it works like a
charm!
Hope this helps!
Seb.
Grant Cox wrote:
> I haven't really looked at the new Validation options, but the
> t
If you do:
http://www.jhinestrosa.com/dev
you don't get anything, but if you do:
http://www.jhinestrosa.com/dev/
You do, there's an issue on your server.
Regarding the model error, that's because you may be setting User as a model
in your controller but don't have the table created yet. Can y
Hi,
I want to allow users to upload files on to the server...however, I
got all the code..but have some problem in providing a link to the
user..
my configuration is as follows
mysite
-- app
-- cake
-- file //in this folder I will keep all the uploaded files
however, if I create a
Set the names of your config vars in the form of:
App.variable
So instead you would have:
$this->set('rechte_values',Configure::read('App.rechte_values'));
$this->set('texttyp_values',Configure::read('App.texttyp_values'));
$this->set('ressort_values',Configure::read('App.ressort_values'));
$th
I'm new to cakephp and very confused about setting directories...
I want to create a development directory and place the app and cake
folders inside of it. I created a database called "contactos" and a
table
called "bookmarks"..I created the bookmark.php inside dev/app/models/
and the bookmarks_
Try it with:
var $paginate = array( 'limit' => 2);
I don't set any page value and it works *great* for me :)
On Feb 21, 3:34 pm, "isk" <[EMAIL PROTECTED]> wrote:
> thanks Preloader, I saw your trick in the groups - but it does not
> work for me (I use
> 1.2.0.4451alpha), parameters stay repeate
Hi, I'm actually trying to do exactly this. I don't know .htaccess
that well, so I how would I configure it to serve up directories and
files if they exist?
TIA
On 15 Feb, 21:39, "Dat Chu" <[EMAIL PROTECTED]> wrote:
> In .htaccess, you can specify that if the URL is a correct file/
> directory
Hi Nate :-)
After just having learned about using the Inflector statically I hoped
that this would do the trick ... but when I call Validation from my
component this way I get:
"Fatal error: Call to undefined function: __reset()"
:(
On Feb 21, 3:43 pm, "nate" <[EMAIL PROTECTED]> wrote:
> For t
If those tables and your models are properly related you can do
something like this:
$one = $this->Whatever->Oneofyourtable->generateList();
$two = $this->Whatever->Othertable->generateList();
$this->set(compact('one', 'two'));
On Feb 21, 4:38 pm, "MickeU" <[EMAIL PROTECTED]> wrote:
> Hi there,
> Hi there, I have implemented othAuth and all is working fine. When I
> log in it attemps to go to admin/index. After writing an
> admin_controller stub it now complains about 'No Database table for
> model Admin (expected "admins")' I am a newbie to cakPHP and I have
> looked though the manual.
thanks Preloader, I saw your trick in the groups - but it does not
work for me (I use
1.2.0.4451alpha), parameters stay repeated even I do unset($this-
>params['pass']['page']) in the view before all paginator calls.
when I add filtering parameters by array('url' => $this-
>params['pass']) my li
DB2, Cloudscape, Derby developers:
The first version of the DB2 driver built on the ibm_db2 extension
(db2_* functions) has been committed to the 1.2 branch:
https://trac.cakephp.org/changeset/4519
https://svn.cakephp.org/repo/branches/1.2.x.x/
Please try it out and submit your bug reports to Tr
Thanks,
That fixed those errors. Now I'm getting a php.exe application error:
The instruction at "0x024c93a2" referenced memory at "0xf4a6f3ac". The
memory could not be read.
This happens on all bake functions. The console then has the message:
"Error in my_thread_global_end(): 2 threads didn
>
>
>
>
try:
then in your controller access it like so:
$img = $this->params['form']['image'];
the action/url for your form looks wrong btw, you would usually do:
hth
jon
--
jon bennett
t: +44 (0) 1225 341 039 w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett
i installed this pagination component:
http://bakery.cakephp.org/articles/view/65
which does a fine job, but i'm not getting further with query
constraints that i would like to maintain across pages.
i have selectbox with different time intervals constraining
the data amount being pulled from t
For the most part, the methods of the Validation class can be accessed
statically, i.e. to validate a date, you can just do
Validation::date($date). There's also an optional $format parameter
which defaults to 'ymd'.
On Feb 21, 2:09 pm, "Cynthia" <[EMAIL PROTECTED]> wrote:
> I'm writing a compon
Hi there, my first post here, and also new to cakephp, so bear with
me.
In my app that i´m trying to build i´m using two separate tables for
populating two select fields in a register form. Is there a simple way
using form helpers to accomplish this?
--~--~-~--~~~---
On Feb 21, 9:05 pm, "the_woodsman" <[EMAIL PROTECTED]> wrote:
> Ad7six,
>
> Thans for your input, but to be honest i'm still confused!
>
> To quote from that link you posted:
>
> "In Cake 1.2, we're transitioning to an approach to form building that
> is more directly model-oriented, and accordi
hi there,
i've utilized the Configure class in cake to store some app wide
settings, which are accessed in views as well as controllers.
now i would like to avoid initialising them as follows:
$this->set('rechte_values',Configure::read('rechte_values'));
$this->set('texttyp_values',Configure::r
Ah. Thanks, Grant. I suppose I should have realized that I could use
the revision numbers from the back of the release numbers. I had been
looking for taged copies, but revision numbers should work just fine.
I'll give the upgrade another try. To date it hasn't been as easy as
hoped or promised,
> 1) By defining it in the association directly
> class CollegeDepartmentextends AppModel
> {
> var $name = 'CollegeDepartment';
> var $hasAndBelongsToMany = array('Organization' =>
> array(
> 'fields' => array('user_id','name')
>
On Feb 21, 7:44 pm, "codecowboy" <[EMAIL PROTECTED]> wrote:
> > 1) By defining it in the association directly
> > > class CollegeDepartmentextends AppModel
> > {
> > var $name = 'CollegeDepartment';
> > var $hasAndBelongsToMany = array('Organization' =>
> > array
Woodsman,
The helper grabs the metadata of the model behind-the-scenes. This
does not involve access or manipulation of the model data itself, it
simply introspects static data about the model. Subtle difference.
On Feb 21, 3:05 pm, "the_woodsman" <[EMAIL PROTECTED]> wrote:
> Ad7six,
>
> Thans
If the form was available throughout your site (like setting it in the
layout or through an element) then that variable was needed on
beforeRender(). But if you are only showing the form on the search view,
then there's no need for that.
-MI
--
Hi there, I have implemented othAuth and all is working fine. When I
log in it attemps to go to admin/index. After writing an
admin_controller stub it now complains about 'No Database table for
model Admin (expected "admins")' I am a newbie to cakPHP and I have
looked though the manual. Could some
I have the latest nightly build and I also get this error when baking
a model.
My error reads:
Fatal error: Class 'Model' not found in C:\Program Files\xampp\cake
\cake\scripts\bake.php on line 437
and when I try and bake a controller named "Student":
Fatal error: Class 'Student' not found in C
If you are using the validator class from CheeseCake or others ( I assume
here - not sure if it Tariq's or someone else's and he is simply using it. )
the correct method is to use
echo $validator->tagErrorMsg( 'Project/start_date' );
I am NOT sure if this is the codebase you are working with bu
I have this code in the AgentsController
var $paginate = array('limit' => 2, 'page' => 1);
...
function index() {
..
$this->set('table', $this->paginate('Agent'));
..
}
and this in the view:
prev('<< Previous', null, null, array('class' => 'nav-
dis')) ?>
|next('Next >>', null, null, array('clas
It is inside a method.
On Feb 21, 1:51 am, "Grzegorz Pawlik" <[EMAIL PROTECTED]>
wrote:
> where do You call this function? Is it in some of your controllers
> method or callback?
>
> On Feb 21, 2:44 am, "josesquared" <[EMAIL PROTECTED]> wrote:
>
> > I am using theinvalidatefunction in the control
I had the same problem using bake.php from 1.1.x.x/SVN.
I discovered that Model.php wasn't being included and I added the
following at line 131:
require_once (CORE_PATH.'cake'.DS.'libs'.DS.'model'.DS.'model.php');
On 21 Feb, 17:06, "Michael Gartner" <[EMAIL PROTECTED]> wrote:
> I have the late
Hello again!!
I think I've found a way to solve my problem...
I do the table creation before saving (using beforeSave() as opposed
to afterSaave())
and use the
$this->exists()
method to check wheter or not my Model instance already exists...
I think it's pretty straightforward...but I might b
I was able to sort my related data on field that was another level
deep in the relationship, but I'm not sure if it's the "Cake" way
since it required me to write a very specific SQL fragment
(subquery) . Let me try to explain with a simple example:
Let's say I have a dynamically generated questi
I successfully set up Cake on my LAMP hosting to have multiple
applications on one hosting account (http://bakery.cakephp.org/
articles/view/141). Now, I'm not sure the settings on my WAMP (local
computer) for the directory of the application.
On my local system, I've set up cake in the following
Hello,
ich have Problems to save data in a hasMany/belonsto
Users_ProfilesTable.
Sie Array is OK.
My source:
View User:
hidden('User/user_id', array('value' =>
$post['User']['id']));?>
post to User/Controller save the data and post user_id to Profile/
controller
View/Profile
echo $form->hidden('
Hey walker,
I tried your site in IE6.0, IE7.0 and FireFox2, all running on WinXP
SP2.
In each case everything worked fine. Must be a Mac/IE thing...
cook
On Feb 7, 12:29 pm, "Walker Hamilton" <[EMAIL PROTECTED]> wrote:
> Lance,
>
> Thank you thank you thank you.
> I was only able to use one sy
That's great works a treat thanks. I thing..could you tell me the
advantage of putting it the AppController::beforeRender() method
rather than just in the controller.
Thanks again.
On Feb 21, 2:31 pm, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> First set the options in the controller as to t
Hi,
I tried to use cake_1.2.0.4451alpha from nigthlybuild ... but
unfortunately I always get this "Fatal error: Class 'Model' not found
in ... bake.php line 437.
The name of the Model should be ok ... Sportler?
About the lines that Toby mentioned to uncomment: Which lines are
affected?
Thanks a
Hi there,
I am trying to use the FileHandler component from Chris Partridge.
I have setup the following form as a view:
The point is, without using name="data[Best][image]", I don't get
back any data in $this->data. But with this name for the file input
the FileHandler does not work any
Hello!
Many thanks to Mariano and Wood for your inputs.
You know, I'm having a little trouble making the
"function afterSave()
{
if (!isset($this->data[$this->name]['id']) ||
empty($this->data[$this->name]['id']))
{
// We just created the record
}
} "
s
First set the options in the controller as to the available fields the
search can use (you can do so on your AppController::beforeRender() method
if the search form is displayed directly on the layout):
$fields = array (
'surname' => 'Surname',
'name' => 'Name'
);
$this->set('fie
Hi again [EMAIL PROTECTED],
Eventually managed to get back onto this. I am a little lost now as I
don't understand why i would need to use:
$uses = array("Users", "Projects");
My biggest problem is the understanding of AJAX and how models work
together within AJAX operations!
Would the best a
On Feb 20, 7:01 pm, "codecowboy" <[EMAIL PROTECTED]> wrote:
> Thank you. Can you elaborate a little on that last paragraph? Are
> you talking about adding code to the CollegeDepartment model?
Hi Codecowboy,
Although not mentioned in the manual you can define the fields for an
association (at
On Feb 21, 2:16 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> In my project after registration completed i want to send a mail to
> that user and admin.Give me an examples
At the very least, you are missing the magic word.
http://www.google.com/search?q=cakephp+send+email
--~--~-
In my project after registration completed i want to send a mail to
that user and admin.Give me an examples
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to ca
Hi...im having the same problem..and i found this is only happening
when the conten i try to load in $contentforlayout is smaller than the
content in the layout.. i have a sidebar in the layout and when i load
a content shorter than this sidebar, the problem appears..i duplicate
the content and it
I have a plugin setup in 1.2, yet it seems that routes don't seem to
recognise them.
Router::connect('/switchboard/blog/1', array('plugin' =>
'switchboard', 'controller' => 'blog', 'action' => 'read'));
The above code tries to access the blog_controller within the app's
controllers and not withi
Hi all!
In reply to an old thread that I found (couldn´t answer there, just
send it to the author?).
I think this could help others running CakePHP against SQL Server
2000:
I know that this thread is quite old, but I just had the same problem
on Windows Server 2003 and SQL Server 2000.
Create n
Grant Cox's reply solved my issue.
Having a db config setup with "persistent = false" is REQUIRED for it
to work (as nate states) but it is not sufficient.
Login/pass needs to be different (at least with MySQL DBMS) for each
dbconfig as Grant Cox states.
Then associations across databases works.
On Feb 21, 1:49 am, "lloydhome" <[EMAIL PROTECTED]> wrote:
> The easiest solution off the top of my head is to use mod_rewrite to
> force ^$ and ^/$ to go to your custom controller/action
>
> RewriteRule ^$ index.php?url=/mycontroller/myaction [QSA,L]
> RewriteRule ^/$ index.php?url=/mycon
Hi,
I have implimented a search using the code below which works well, but
it only searches one field. What I'd like is a drop down box in the
view to select the feild to be searched (name, address, postcode,
etc). However i'm not sure how to reflect this in the controller code.
I wonder if some
where do You call this function? Is it in some of your controllers
method or callback?
On Feb 21, 2:44 am, "josesquared" <[EMAIL PROTECTED]> wrote:
> I am using the invalidate function in the controller and it is not
> triggering the tagErrorMsg. I also tested and it doesn't seem to
> block the
http://www.cakepeople.com/
--~--~-~--~~~---~--~~
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 [EMAIL PROTEC
http://en.wikipedia.org/wiki/Scaffolding
On Feb 20, 3:44 pm, "anselm" <[EMAIL PROTECTED]> wrote:
> > Would be nice from the doc team should to clarify if scaffold is or not OK
> > for production...
>
> That's not really up to them to tell you -- because this is a process
> problem, not a technica
The head helper isn't part of the core.
it was written by rossoft and it's available in his blog
On Feb 20, 9:33 am, "GreyCells" <[EMAIL PROTECTED]> wrote:
> If you're using 1.2, then take a look here:
>
> http://cake.insertdesignhere.com/posts/view/17
>
> The HeadHelper functionality is impleme
Isn't there any way to "purge" the groups posts?
There would be cool to have some kind of "moderation" that eliminated
duplicate questions and posts in other languages than English...
I know that moderating is a time consuming task, but there are ways to
distribute the load (a moderator for every
On 2/21/07, MaxPower <[EMAIL PROTECTED]> wrote:
> if ($this->params['action'] == 'add') {
>// do the above code
> } else if ($this->params['action'] == 'edit') {
> // check to see if username/email in $this->data is the same as the
> existing records for the given $id
> }
Try checking if th
Hello all,
I'm trying to set up validation to check for existing values within
the beforeValidate() function. What I'm aiming for is to do a check to
make sure the username & email isn't already taken when the user is
signing up. But when the user is editing their info I don't want an
error thrown
Worked a treat - thanks so much. Ian
On 21 Feb, 00:04, "AD7six" <[EMAIL PROTECTED]> wrote:
> On Feb 21, 8:54 am, "ianh" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi all,
>
> > I'm working on an app to allow people to book courses online. I want
> > users to be able to select courses by the day on whic
On Feb 21, 8:54 am, "ianh" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm working on an app to allow people to book courses online. I want
> users to be able to select courses by the day on which they are held.
> I have a "start" date (in datetime format) and have been trying to
> create a conditi
90 matches
Mail list logo