thanks sir!
but order doesn't seem to work for me. i have even have debug = 2 in
the query but i will figure out what's wrong.
anyway, i guess the default scaffolding does not always give you what
you want.
related with this question, how would you be able to change the label
in the select form?
var $belongsTo = array('ModeName'=>array('className'=>'ModelName',
'order'=>'created DESC')):
--~--~-~--~~~---~--~~
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@googlegr
sure, $this->Model->query('select...');
--~--~-~--~~~---~--~~
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 [
Thx for these answers.
I have to admit I was caught too much in my day job application
(developed in ABAP), where I use different level views that make up the
complete _view_.
And on the other side I tried to not give in too early, to feed a
lively discussion and get detailed opinions from others
Hi All:
Can i run a direct query in cake without using function i.e. findAll
etc.
Direct query means by writing complete query like
select * from tablename
Thanks
David
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Grou
i am using the default scaffolding for now. i have properly set up a
belongsTo association. in the add page, i have a select form for the
associated model. however, it is sorted by id. can i be able to sort it
in another way without creating a view?
thanks!
--~--~-~--~~~-
I have this:
link('Choose','/accountmanagers/choose_company/' .
$item['id'],
array('update'=>'display_card',
'after' => 'myAccordion.showThisHideOpen(stretchers[1]);',
'complete' => 'new Effect.Highlight(\'display_card\');'));
?>
it comes u
Uhm
I don't see the point for a fieldset helper method. Sorry for the offtopic.
On 8/7/06, iceaxe <[EMAIL PROTECTED]> wrote:
>
> Howdy all,
>
> I didn't see an open ticket for this issue, and in my newness I haven't
> figured out how to submit a proper bug report.
>
> If someone can point me i
That'll do it. Thanks a lot.
--~--~-~--~~~---~--~~
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 PROT
Howdy all,
I didn't see an open ticket for this issue, and in my newness I haven't
figured out how to submit a proper bug report.
If someone can point me in the right direction, I'll be happy to put in
a ticket and I'll even fix the problem. (It's an easy one.)
This applies to the 1.1.7.3363 r
Thanks for the function. I should have searched the API.On 8/7/06, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:Exactly what I was looking for Chris - thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake PHP"
Exactly what I was looking for Chris - thanks!
--~--~-~--~~~---~--~~
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 em
Hi
On Mon, 7 Aug 2006 12:58:17 -0700
"John Zimmerman [gmail]" <[EMAIL PROTECTED]> wrote:
> This won't work all the time and can't be completely trusted, but you
> can write a function to deal with different scenarios based on the
> contents of $_SERVER['HTTP_REFERER'].
Cake already has such a
You're definitely right. thanks a lot. I should think about it every
time I see something recurrent in my code.
Jon Bennett wrote:
Any thoughts ??
how about adding this function to your app_controller.php
function getSelectedItems ($data)
{
$return = array();
foreach (
Hi,
at the scriptaculous Manual i found a function calles change() in the
dragable class. The called function gets the Draggable instance as its
parameter. But, how can I use this in cakePHP? Is there any example? I
want to save the new position of a dragable via an ajax request.
Greetings from
This won't work all the time and can't be completely trusted, but you can write a function to deal with different scenarios based on the contents of $_SERVER['HTTP_REFERER'].Not all browsers will report it, and some will report it incorrectly on purpose.
But you should be able to determine the acti
Is there any way to find out the controller/action that a user was at
prior to the current controller/action? Say you wanted to redirect a
user back to the page they came from - how would you find out that
page?
I'd prefer not to have to keep any sort of history, or last page, in a
session. Jus
>
> Would there be a way to set my subversion up such that I can use it to
> merge the latest Cake version with my local website repository? Such
> that the latest version I retrieved from Cake's SVN could be merged
> with my local site in case I made changes to my local copy of cake's
> core fil
Thanks John. I'm still learning my way around, and that's sound advice.
--~--~-~--~~~---~--~~
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
On Aug 7, 2006, at 12:38 PM, Shutter wrote:
>
> Hey,
>
> I've set up subversion/TortoiseSVN on windows for the site I'm working
> on, and I've come to like using the latest svn version of Cake
> since it
> containes the latest fixes. Right now I've just been checking out
> Cake's SVN builds fr
Hey,
I've set up subversion/TortoiseSVN on windows for the site I'm working
on, and I've come to like using the latest svn version of Cake since it
containes the latest fixes. Right now I've just been checking out
Cake's SVN builds from time to time and copying that to my working copy
of the site
Bump. I cross-checked this url database by installing CodeIgniter and
trying out the scaffolding feature there. While not quite as mature as
Cake seems to be, the CodeIgniter scaffolding code worked perfectly
with the database for all operations. It also works properly with
mod_rewrite.
I don't k
> Any thoughts ??
how about adding this function to your app_controller.php
function getSelectedItems ($data)
{
$return = array();
foreach ($data as $row)
{
$return[$row['id']] = $row['name'];
}
Sorry, i am late on this one: the other day i have wondered: what is so
bad about having slugs as primary keys? i might be running against some
database practices that they should rather be numbers. But it is rather
trivial to make slugs unique, as well.
--~--~-~--~~~
I've got something similar in the app I build. You'd need to set up all
items off of /shop/ to go through a single action. Then, take that
action, and have it route to internal functions.
like:
function processAction($param1, $param2=null)
{
if($param2){
$this->_products($param1, $param2);
Thanks for submitting. Every time I went to submit, it told me I didn't
have permission, and I couldn't find where to register. Went to look
right now, and found the register link immediately.
Thanks again.
--~--~-~--~~~---~--~~
You received this message because
i'm interested in migrating a site over to cake a few apps at the time,
what would the best strategy to do this? my idea now is to make a /c/
subdirectory that handles the cakified pages, while my old apps all run
as usual in the root web directory.
--~--~-~--~~~---~-
whoops, looks like we repeated each other, How Ironic. :-)
Sorry for repeating yourself, Nate; i was composing my as yours came in.
Mark
On 8/7/06, Mark Quinn wrote:
> On 8/7/06, ByteDoc wrote:
> >I see the view on a lower level than the layout. The view as
> > such uses helpers/elements to cre
On 8/7/06, ByteDoc wrote:
>I see the view on a lower level than the layout. The view as
> such uses helpers/elements to create its content, but I don't like the
> idea of letting the view set something above/outside of it.
>
> I'd rather create some logic to set layout parameters from the
> view-c
@ByteDoc: Mark is correct. The chief concern of MVC is separating view
and controller logic, and secondarily, separating controller and model
logic. This says nothing of preventing templates and layouts (view and
view) from sharing data. In fact, I would argue that embedding view
data in the co
Mark Quinn wrote:
> To me, this is where your argument breaks down. A view is only part of
> the picture.
>
> A view *and a layout* *and perhaps some elements* is the _view_
>
> To say a view cannot set data is shortsighted. Perhaps a better way to
> think of this is to think of "passing" dat
Ok, now go all. I have wrong the use of a field ...
--~--~-~--~~~---~--~~
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, se
> $ext = $File->getExtension($myFile);
>
> Is that what you were getting at?
kinda, though I would have thought that this kind of functionality
would be better suited to a Component. Then it's not tied to an
applications structure, and can be reused easily.
check out the page on the manual http:
I have a database table where save the image's name.
I have to implement the edit function, and I try to do with this code :
$file = $_FILES['immagine'];
$imgpath = WWW_ROOT."img/";
$msg ="";
if (move_uploaded_file($file['tmp_name'],$imgpath.$file['name'])) {
$msg = "File uploaded.";
} els
On 8/7/06, ByteDoc <[EMAIL PROTECTED]> wrote:
>
> The line that has to be drawn here is not easy to see, I hope I can
> make my opinion clear without using too much words (long explanations
> are more confusing than helpful).
>
> A view should not be able to set any kind of data whatsoever - becau
But, doesn't your method amount to dropping a copy of your existing app
folder into the new Cake install? Then, if you wish, replace the
stylesheets inside app.
That's how I did it on the previous upgrade (after a few false starts)
and everything worked fine.
Ralph
Martin Wood wrote:
> Bert Va
Cheers, thats great,
in fact I recycled some code from a tutorial on the cake wiki
(http://wiki.cakephp.org/tutorials:beginners_only) to do what i wanted
fairly sucessfully.
I have another question regarding the safety of letting users upload
content to my database, as it seems a fairly risky busi
requestAction('foo/bar'); ?>
would echo the foo/bar action to the output automatically so you don't
need to echo(print) it. And also because of that you are not able to
treat it like a string variable.
But if you use the function like this:
requestAction('foo/bar', array('return')); ?>
Then you c
Let me make sure I understand what you're saying.
In this particular case I should create a model called "File" that has
a method called "getExtension()".
In my controller I can then use the method by declaring uses('File').
and calling:
$ext = $File->getExtension($myFile);
Is that what you w
The line that has to be drawn here is not easy to see, I hope I can
make my opinion clear without using too much words (long explanations
are more confusing than helpful).
A view should not be able to set any kind of data whatsoever - because
it is a _view_.
I would tackle your described problem
You could define a function in app/config/bootstrap.php, but in a way
that goes against using an MVC framework in the first place. Rather
than just stick the logic some place conveinent, why not think about a
way to structure your code so that you don't have to?
For example, you could write a cu
i recommend you have a look at DHH's keynote at railsconf this year,
where he describes a way of further embracing CRUD and viewing
relationships as CRUDable "things" in their own right.
e.g. think of the user->group relationship as a CRUDable Membership
model. suddenly the world becomes a much s
On 8/3/06, lorenzo wrote:
>
> Mark Quinn ha scritto:
>
> My current problem is how to get a view to set a variable that is
> available in the layout. From everything i've read. this should be
> easy, but i'm just not getting any loving.
>
> I baked a trivial example:
>
> my layout contains
> my fa
Hi All:
I am facing memory exhausted problem in my application.
The file use to pick up around 600 records from one table and
runs a for loop.Under this for loop there is another loop runs
for 120 times.
In simple php applications these queries use to work fine.
But in cake its giving a problem
Hi,
I'm relatively new to CakePHP and I was wondering if someone could give
me some advice on where to put "common" snippets of code. For example,
I have a simple function that determines the file extension of a given
file. I want to be able to access this function from a model, component
or view
Hi Toby,
I only have the one app setup at the moment, but this will apply to
additional apps as well. I altered the following lines in the index.php
file in the webroot (myCakeAppWebRoot) folder...
if (!defined('ROOT')) {
//define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECT
Hi Graham,
Do you have multiple cake apps set up this way?
Are each of your sites accessed by www.mydomain.com/mysubfolder1?
If that's the way you set it up what did you have to do?
Was it just a case of editing the first few lines in the index.php file
in the webroot folder?
Cheers,
Toby
--~--~
Hi Toby,
Do you perhaps have access to the folder above your html (www on my
host) directory on the host? For instance, on my host I have the
following kind of setup...
myAccount -> mydomain1
-> mydomain2
-> CakePHPLibs
-> ssl
That was just a typo, my point still stands
--~--~-~--~~~---~--~~
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
Sorry about this basic question. I just seem to be getting conflicting
reports, and am having trouble getting it working on a domain on which
I only have FTP upload.
If I'm setting up a cake project in a directory on a host. ie:
www.test.com/projectfolder/
should it be sufficient to just dump the
50 matches
Mail list logo