hi bakers,
I am trying to speed up things on my website by using caching. I have
an action that displays all the articles that a user has in his
library based on user id. I am not sure how to cache this action so
that cache are stored for each user.
Regards,
Ritesh
--~--~-~--~~
I'm using mysql5.0.32/php5.2.0-8, trying to get 2 tables echo'd out
together and ordered by their time columns. column_id and column_id
are the primary keys for each table. The data type is the same for
each of the tables and looks like:
table1(column_id, time)
table2(column_id, time)
I've tried
I'm using mysql5.0.32/php5.2.0-8, trying to get 2 tables echo'd out
together and ordered by their time columns. column_id and column_id
are the primary keys for each table. The data type is the same for
each of the tables and looks like:
table1(column_id, time)
table2(column_id, time)
I've tried
Please be more clear with your question - from what you've asked just
$model_data = $result['Model']
would be enough. But I doubt you're asking something so simple
On May 5, 2:36 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> In 1.1x, is there a built in function to turn a cake array
after my controllers grew larger and larger i had the same
notion of not using the framework efficiently.
i tried to keep my controllers thin by making use of inheritance
from app_controller. also consider using components (it's fairly
easy to copy a component and overwrite it with your own method
I've tried the same blog tutorial using both the stable and unstable
version of CakePHP. There has to be something I can do to figure out
what the problem is. I'm pretty sure I followed the tutorial step by
step, but perhaps I need to run through it once more.
--~--~-~--~~-
Hi, Bernardo,
Thanks for your reply.
I set the debugging level to 0, but I cannot get any warning messages.
I don't know how to debug this problem at IE7.0.
This works as expected when I use Firefox. but not use IE7.0
Thanks.
On May 4, 3:15 pm, bernardo <[EMAIL PROTECTED]> wrote:
> Check the
I absolutely agree, my application goes against the "fat models, thin
controllers" way of coding.
I think it will be a while until we have something solid as the guys
are working hard on 1.2, but if anyone has any examples, or would be
willing to look at a couple of examples to improve them, post
no a problem in 5.x versions of php you'll be able to leverage
http://us.php.net/soap
in 4.x you will probably want to use something like nusoap
http://dietrich.ganx4.com/nusoap/
On 5/4/07, dasiel <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> I'm working in a project and I need to use web services but
Check the ajax response, there are some warning messages. Note that
everything that is returned is pased to the element to be updated.
Just to see if that is the problem, set the debugging level to 0.
On May 4, 5:59 pm, seedme <[EMAIL PROTECTED]> wrote:
> Can you help me?
>
> I want to using AJAX
I really like that approach so here's essentially what I did:
photos
- id
- owner_model (varchar(20))
- owner_id
array(
'foreignKey' => 'owner_id',
'conditions' => array('Photo.owner_model' => 'Person')),
'Group' => array(
'foreignKey' => 'owner_id
Can you help me?
I want to using AJAX to populate the data based on the selected value.
but the following codes work well at FireFox, but not display the
populated data IE7.0 . Some can help me to find the solutions?
My test website's link is http://dev.fuzgo.com
I need the help ASAP. Thanks.
Hi
I'm working in a project and I need to use web services but I don't
know how web services are consumed in Cake, the web services are
based on SOAP and they are developed in .NET I don't know if this
could be a problem. Thanx a lot. Excuse me my english.
--~--~-~--~~
Can you help me?
I want to using AJAX to populate the data based on the selected value.
but the following codes work well at FireFox, but not display the
populated data IE7.0 . Some can help me to find the solutions?
For member register Action
Country -> State -> City.
At register.ctp file: I
Some more details that might help:
Inside your CitiesController you would have a view() action (a
function) that you can pass the city id too.
Just in case you need to get really basic with how the MVC aspects
work (broken into MVC):
After requesting the url suggested by gwoo: /cities/view/1
C
Hi Macon I'm already working in a project and I need to consume some
web services. But I don't know how to use it in CakePHP, acording to
your post it seem that you has used some web services from Cake. Where
I can see something about this topic?
Excuse me for my english ;-).
Thanx.
Dasiel
On 2
You would create a CitiesController with a City model.
Your URL would be /cities/view/1 for the city with id 1.
You could use this to set a Session that would allow the current city
to persist across other controllers.
hope this helps.
--~--~-~--~~~---~--~~
You r
How does one prevent $form->select from escaping characters in the
option titles?
--~--~-~--~~~---~--~~
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 u
also take a look at routes...?
On 5/4/07, djiize <[EMAIL PROTECTED]> wrote:
>
>
> Hi jeffy
>
> 1. to custom the homepage, create the file /app/views/pages/home.thtml
> (or .ctp with Cake 1.2)
> 2. search in the manual and group for Pages controller
>
> On 4 mai, 15:12, jeffy <[EMAIL PROTECTED]> wr
You could also add a model and id field, and set the belongsTo conditions in
Photo specifying foreignKey and conditions.
So you add two fields to table photos:
model
record_id
And then on Photo model:
array(
'foreignKey' => 'record_id',
'conditi
Let me start by saying I am a complete novice to Cake PHP but plan to
change that very soon, I am an intermediate php developer and can't
wait to start using this framework for new apps I am developing.
I don't see the whole picture yet and could use some assistance in
getting started.
i'm using
Yep for 1-1 relations that would work - I should've used a 1-n example. :)
Imagine a social networking site with people, groups, & photos:
- Person hasMany Photo
- Group hasMany Photo
- Photo belongsTo Person, Group
Then you'd need to do:
photos
- id
- person_id
- group_id
On 5/4/07, J
On May 4, 2007, at 12:18 PM, [EMAIL PROTECTED] wrote:
>
> You're right - that should work. You'd end up with two foreign keys
> in the addresses table, only one of which would be valid in each row:
>
> addresses
> - id
> - person_id
> - company_id
Or:
people
- address_id
companies
- addre
You're right - that should work. You'd end up with two foreign keys
in the addresses table, only one of which would be valid in each row:
addresses
- id
- person_id
- company_id
Then each person and company would have its address found properly.
Each address would have both a person and a co
I've noticed that I'm producing hacks in Cake more than actually using
it to the fullest and following best practices. As an avid student,
I'm at a loss, having gone through the Cake manual, watched some
screencasts, and searched the web for other blogs and tutorials. As of
yet, there aren't any s
On 5/4/07, regent <[EMAIL PROTECTED]> wrote:
>
> In order to speed loading times of my pages, I added this to my
> default view:
>
> ob_start("ob_gzhandler");
>
>
> Now I get blank pages in firefox, and it crashes IE6. Do I need to
> put the code somewhere else? Or is there something else I need
In order to speed loading times of my pages, I added this to my
default view:
ob_start("ob_gzhandler");
Now I get blank pages in firefox, and it crashes IE6. Do I need to
put the code somewhere else? Or is there something else I need to do
to get this to work?
Thanks.
--~--~-~--~---
On May 4, 2007, at 10:17 AM, [EMAIL PROTECTED] wrote:
>
> Sometimes you'd like a single common model to be able to belong to
> multiple other models: for example, an Address could belong to a
> Person or a Company. Rails has Polymorphic Associations to handle
> this:
>
> http://wiki.rubyonrails
Ok, here is my code that now works, anyone please feel free to use:
';
foreach ($data as $key=>$value) :
$output .= '';
$output .=
$this->Html->link($value['Menu']['name'],$value['Menu']['url']);
if (isset($v
app/
second_app/
...
http:\\localhost\ - default app
http:\\localhost\second_app- second app
On May 4, 3:13 pm, "SIXS" <[EMAIL PROTECTED]> wrote:
> Hi,
> I was wondering how to set up several projects in cakephp, and e testing them
> at the same time?
> Thanks for any help
> Jim
--~--~
Sometimes you'd like a single common model to be able to belong to
multiple other models: for example, an Address could belong to a
Person or a Company. Rails has Polymorphic Associations to handle
this:
http://wiki.rubyonrails.org/rails/pages/PolymorphicAssociations
Does CakePHP have an easy w
You can get a cake friendly URL with the $html->url function, eg
window.location = 'url('/users/profile/')?>';
On May 4, 8:32 am, Romano <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> A newby question: how do I code a window.location redirect in
> javascript? I cannot seem to find the correct path to
In the find and replace dialog of Textpad I use
Find what: src="images/\(.*\.gif\)"
Replace with: src="url('/img/\1')?>"
It assumes your images were in a directory called "images", and now
you have moved them to "img" in the cakePHP directory structure.
The regular expression is greedy, so you
In 1.1x, is there a built in function to turn a cake array into
standard assoc array(s), so that
Array
(
Model => array(field=>val, field=>val)
)
becomes
$model_data =
Array
(
field => val,
field => val
}
I search the docs but couldn't find something like this, didn't want
to write it if al
Hmm, that seems rather much for what I'm doing, and anyway for the JS
I use in my menu, it needs to be a tested unordered list. This is
what I have so far:
';
foreach ($data as $key=>$value) :
$output .= '';
$output .=
$this->Html-
u can make recursive function in helper.
Maybe U need only recursive call implement to your code:
if (isset($item['children']) && is_array($item['children']) &&
count($item['children']))
{
$out .= $this->menu($id_selector, $htmlAttributes=null, $_sublevel+1,
$item['children']);
}
menu arr
I'm converting my site with a lot of image helper tags.
Is there any tool to automatize this process ou another method to do
this without rewrite all these tags?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
next time please post code in the paste bin http://bin.cakephp.org/
this has a couple of advantages.
1. it retains formatting (code pasted in email looks like poop) which
makes it easier to read and easier for human parsing.
2. It allows people who want to help you a way to make changes with
out
OK, so here's the skinny...
I've tested all your suggestions (thank you, BTW), and then some, and
haven't found a solution yet. But here's some more detail, and why
it's a little weird. (I'm still convinced my host changed some
configurations on the server which has resulted in the problem all of
Hi all,
A newby question: how do I code a window.location redirect in
javascript? I cannot seem to find the correct path to any of my views
in the way that the $html->link helper does.
Best regards,
Romano
--~--~-~--~~~---~--~~
You received this message because
Cool, how'd you get into this complex code, did u study all
architecture or what?
Thanks for sharing your experience.
Best!
On May 2, 8:06 am, "Mariano Iglesias" <[EMAIL PROTECTED]>
wrote:
> If you really need to:
>
> loadHelper('Text');
> $Text =& new TextHelper();
>
> -MI
>
> -
Trying to figure this out for the past couple of days, and can't get
it right.
Need a alternative installation so that CAKEPHP can run both httpdocs
and httpsdocs directories under Plesk.
Plesk 7.5.4 creates for every domain the following directories
/var
/www/vhosts/domain_name.com/
httpdoc
If you're in a view, try
... instead.
Also, you can always do this:
That'll give you an idea of what's inside the array. I highly
recommend stepping through this tutorial:
http://manual.cakephp.org/appendix/blog_tutorial
It's a quick way to get your feet wet. It's what I did to become
fam
Well Yes,
I do some checks on allowed languages, but I don't have a separate
controller to deal with this.
Just scan URL into function (in app_controller.php) and then redirect.
And thank you I do not know that Configure::write('Config.language',
'en') and $_SESSION['Config.language'] are actuall
THANKS you're a star!
On 04/05/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote:
>
>
> If you are on DEBUG mode set to 0 delete your app/tmp/cache/models files
> (not the directory!)
>
> -MI
>
>
> ---
>
> Remember, smart cod
Hi folks,
I've pasted some code here: http://bin.cakephp.org/view/1509962324
What I am looking to do is instead of hard-coding the 3 levels of menu
that I produce from my findAllThreaded method in the controller, I
would like to be able to produce "infinite" levels of menus from the
data return
Have you tired calling the model's create() method before calling the
save() method? create() initializes the model for saving a new record
(http://api.cakephp.org/
class_model.html#2edb2497b980ad65e76ddda6d2494d97)
On May 3, 8:33 pm, ifcanduela <[EMAIL PROTECTED]> wrote:
> I'll follow your advic
Hi jeffy
1. to custom the homepage, create the file /app/views/pages/home.thtml
(or .ctp with Cake 1.2)
2. search in the manual and group for Pages controller
On 4 mai, 15:12, jeffy <[EMAIL PROTECTED]> wrote:
> Hi guys
>
> A newbie question, I can't find the answer:
>
> 1. How can I set a main i
If you are on DEBUG mode set to 0 delete your app/tmp/cache/models files
(not the directory!)
-MI
---
Remember, smart coders answer ten questions for every question they ask.
So be smart, be cool, and share your knowledge.
Anyone using the FormWizard component every have trouble with the
wizard session vars NOT being cleared in the last step? I am doing a
pr($SESSION) on pages after the form submission and I still see the
_Wizard array set. I am clearing the related session vars manually by
using $this->Session->del
Hi guys
A newbie question, I can't find the answer:
1. How can I set a main index page for a website?
There are a lot of manuals, but in every manual there are examples of
how to create www.mysite.com/posts/index
or www.mysite.com/posts/user. How do I create and index for www.mysite.com?
BTW mai
Hi All,
I'm very new to cake development but I URGENTLY need to make some
amendments to a site because the original developer deserted us :S I
just need to add a new field to a template. I added it to the table in
the database and Im trying to view it the value using but it wont workI must b
Hi guys
A newbie question, I can't find the answer:
1. How can I set a main index page for a website?
There are a lot of manuals, but in every manual there are examples of
how to create www.mysite.com/posts/index
or www.mysite.com/posts/user. How do I create and index for www.mysite.com?
BTW mai
Hi,
I was wondering how to set up several projects in cakephp, and e testing them
at the same time?
Thanks for any help
Jim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send
Grant, thanks for your time and pointers.
I found that if I set a value explicitly for the radio button, that if
for some reason the form fails validation, the form is rendered again
setting all fields to those explicitly set values. This is problematic
(i.e. if a user chooses Yes for one questio
What's going to be in the popup? You could potentially make a
javascript "window" from an absolute-positioned draggable (ajax.drag)
div. Obviously this wouldn't work for some content.
On May 4, 4:35 am, "Javier Ramirez Molina" <[EMAIL PROTECTED]>
wrote:
> Hi everybody,
> I'm almost new with aj
- if You will store selected language in session, route url '/language/
*' to some controller->action and do $this->Session-
>write('Config.language', $arg); in it (probably with check if this
lng is allowed) - then redirect to referer
- if You will save Config.language in session, You don't have
Trev, I just emailed you regarding this request. I hope you got that.
Regards,
Joel Moss
http://joelmoss.info
On May 3, 10:51 am, ImageNation <[EMAIL PROTECTED]> wrote:
> Looking for a Cake PHP developer to take over an existing Cake App and
> add new features on an ongoing basis.
>
> The cur
Ok,
I'll tell you how I put the pieces together and than you tell me if
there is some better way of doing it:
1. I have prepared language files in /app/locale//LC_MESSAGES/
default.po with correct msgid/msgstr pairs
2. I create language change block with links like /language/
(/language/en)
3.
Hi everybody,
I'm almost new with ajax/javascript, so sorry if this is a dummy question.
I know how to update a div in the same view that the "ajax.updater",
but what I need now is to be able to open a pop-up window, and
depending what is selected in the new window, update the original one.
I also
Larry E. Masters aka PhpNut wrote:
>
> Any ideas why three Tokens are generated and why two of them have
> different hashes?
>
> Marcus
>
>
> I would need to see the view code related to that output.
Ok, here we go:
This is the View code for the edit form:
create('CmsArticle', a
Thanks djiize,
funny thing, it was during the approvement process while I was looking
for it but as soon as I asked on IRC it magically went online :)
And it's a good one (though couple typo's in bakery article), you put
it where it should be, create what should be created and it just
works.
I
> Any ideas why three Tokens are generated and why two of them have
> different hashes?
>
> Marcus
I would need to see the view code related to that output.
--
/**
* @author Larry E. Masters
* @var string $userName
* @param string $realName
* @returns string aka PhpNut
* @access public
*/
--~
Configure::write('Config.language', 'en');
or same key in session (takes precedence)
--~--~-~--~~~---~--~~
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
Marcus, one of them is the token key as shown on the name attribute
while the other is a token to verify that all fields from your form
are receive on the controller end.
On May 4, 2:37 pm, "Marcus T. Jaschen" <[EMAIL PROTECTED]> wrote:
> dericknwq wrote:
> > I remember asking PhpNut about this a
65 matches
Mail list logo