Coloca na pasta vendors.
Chama antes do controler q tu for usar com a função vendor();
Pronto tá incluído. Se quiser usar em todos os controllers é só colocar a
chamada no app_controller =)
On 8/9/07, hostdesigner [EMAIL PROTECTED] wrote:
Legal esse seu script ai, eu estava estudando o
Qual a diferença de usar como vendor e usar como componente?
Falopa!
--~--~-~--~~~---~--~~
Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do
Grupos Google.
Para enviar mensagens para este grupo, envie um email para
Pode me explicar como funciona este componente?
Falopa!
On 9 ago, 21:06, Guga [EMAIL PROTECTED] wrote:
Velhão
vc pode utilizar o componente: othAuth component v0.5.4.5.
http://bakery.cakephp.org/articles/view/othauth-component-v0-5-4-5
Fui...
You want to extract this from where, I mean, in a controller ?
beforeFilter ?
On Aug 9, 7:50 am, CakeMan [EMAIL PROTECTED] wrote:
Hello Friends,
do anyone has list of Contants in Cakephp. i have seen in the manul
but they will not do me good in my task.
What i need is :-
Suppose we have
This is an effect of the scriptacolous library. Basically you
function should look like this : new Effect('SlidDown'); ..I have done
this somewhere, but I need to search for it.
hope this helps
On Aug 9, 6:55 am, housebolt [EMAIL PROTECTED] wrote:
?php echo $ajax-link('Ajax', '/contact/',
Hi,
The problem seems to be with your framework installation.
You can check if the file is still present at cake/libs/controller/
components/request_handler.php.
In the worst case you will have to update the framework.
Let me know the issue.
metasan.
http://www.pieg.net
On Jul 30, 3:44 pm, Saymons [EMAIL PROTECTED] wrote:
I found someone who has quite the same problem
:http://groups.google.com/group/cake-php/browse_thread/thread/b97c38e4...https://trac.cakephp.org/ticket/2448
But in my case, there are not join at all, that makes me unhappy
because it could
you have access from almost everywhere to:
$this-name // controller name (events)
$this-action // action name (view)
and several constants are in /cake/basics.php
On 9 août, 08:17, francky06l [EMAIL PROTECTED] wrote:
You want to extract this from where, I mean, in a controller ?
beforeFilter
Thanks francky for your reply,
I want to extract it from the controller and wants to use in the View.
or directly from the view.
On Aug 9, 11:17 am, francky06l [EMAIL PROTECTED] wrote:
You want to extract this from where, I mean, in a controller ?
beforeFilter ?
On Aug 9, 7:50 am, CakeMan
I don't know if you can access helpers from controller, but I know you
shouldn't do it!
Helpers are for views, components are for controllers (and behaviors
for models)
A component + helper combo is possible, maybe your solution.
On 9 août, 11:00, Mike Green [EMAIL PROTECTED] wrote:
Dear all
Dear all
I've come across a small problem.
In my app, I'm trying to totally seperate all of the calculations and
views into the controllers and .ctp files, which seem to be fine.
However, when I am populating my table array, ready for the view, I
want to use the cake html helper class, and it
You're absolutely right - I'm getting two different session IDs. And
security is set to medium...
Is there anything I can do about this? If I send the correct session
ID as a GET variable, is there any way that the right session can be
recovered or found?
S
On Aug 8, 6:28 pm, John David
I've discovered that you can do it, and it works exactly as I wanted.
loadHelper(Html);
$this-html= new HtmlHelper();
I can then use $this-html-link (or any other html helper function in
my controller as I wish.
Thanks to dhofstet and nukem932 on irc for the help. My app now quite
happily
The workaround I've found for this goes:
Make the Flash uploader post to /attachments/upload/(session id)
Then in attachments controller, recreate the session:
function upload($sessionId)
{
session_destroy();
session_id($sessionId);
session_start();
...
I then have to manually do any
Added The Pepin Press web shop and online presence ( http://pepinpress.com
) for a Dutch design books publisher.
Click on http://groups.google.com/group/cake-php/web/cake-apps-sites-in-the-wild
- or copy paste it into your browser's address bar if that doesn't
work.
On 8/8/07, phalvrson [EMAIL PROTECTED] wrote:
The Household Model:
class Household extends AppModel
{
var $name = 'Household';
/* Creates new record in households and returns it's ID */
function createRecord ($last_name, $HHID, $userid, $email,
$address_1,
Hi all,
I am sure there is a very simple solution to this, but it surely
doesn't come rapid to me.
I have a simple form which let's the user edit some simple data.
This is the part of the view I am having a problem with:
?php echo ($profile['User']['email']) ?
?php echo
That's the worst part about it. The file is present at cake/libs/
controller/component/request_handler.php . I have tried copying it to
app/controller/components as well. I downloaded the framework again
this morning and replaced the cake folder. I am still getting the
same errors.
On Aug
Ok,
it was really stupid, sorry for wasting space !
I was learning how to use cake using the IBM tutorial and it uses the
depreciated inputTag.
Changed it to just input and now it's all good...
this took me at least 4 hours to figure out.
On Aug 9, 10:09 pm, noWookies [EMAIL PROTECTED]
You can use FULL_BASE_URL.'/'.APP.'/'.$this-name; in controller
that should make it .. I use often FULL_BASE_URL..$html-
url('Controller') in view ...
Actually do you want to extract this from some variable, or set it ?
On Aug 9, 9:18 am, CakeMan [EMAIL PROTECTED] wrote:
Thanks francky for
Hi everyone,
I'm kind of new here (been reading, not contributing for a few weeks),
and was wondering if there were any cake developers in Florida on this
list? Ideally south florida.
I've got a couple projects I'm planning in cake, and am looking for
individuals or teams.
If you can point me to
Hello, everyone.
Does anyone has an idea on how to implement the custom autocomplete
like the demo on scriptaculous (http://demo.script.aculo.us/ajax/
autocompleter_customized)?
I have tried a little... I made this in my view:
div id=autocomplete class=input required autocomplete
Langdon,
I'm not sure I completely understand...
When a record is saved a reference to the ACO group that the data
belongs to is saved in one field. Now I can tell which ACO a record
belongs to
When a user logs in I get (using the ACL system) a list of ACOs that
the
user has access to and
I could not get all of the features to work also.. so i just wrote it
in html:
div id=TagTag_autoComplete class=auto_complete/div
script type=text/javascriptnew
Ajax.Autocompleter('TagTag',
'TagTag_autoComplete',
Nice! I'll give it a try!
Thanks
On Aug 9, 11:21 am, Mech7 [EMAIL PROTECTED] wrote:
I could not get all of the features to work also.. so i just wrote it
in html:
div id=TagTag_autoComplete class=auto_complete/div
script type=text/javascriptnew
I have an implementation like this...
ACOs
Admin
Clients
+ Company::1
+ + Company::1.login
+ + Company::1.users
+ + Company::1.transactions
+ + (... one for each controller)
+ Company::2
+ + (...)
+ (...)
Users
+ User::1
+ User::2
+ (...)
AROs
Admin
+ User::1
Users
+ User::2
+ User::3
+ (...)
I want to compare 2 dates to make sure 1 date is older than the other.
I believe I need to write my own comparison, but want to make sure
there's nothing in Cake that already does this. I know date formats
can be checked and I've seen a post saying the 'comparison' check is
regex-based, which
I have an implementation like this...
ACOs
Admin
Clients
+ Company::1
+ + Company::1.login
+ + Company::1.users
+ + Company::1.transactions
+ + (... one for each controller)
+ Company::2
+ + (...)
+ (...)
Users
+ User::1
+ User::2
+ (...)
AROs
Admin
+ User::1
Users
+
Yes you can do it with generateList. Just use the conditions array
wisely. Depending on the database setup you are using you can include
the keyword distinct in your conditions. I forget the details. You'll
have to do a search.
On Aug 8, 2:27 pm, libfree [EMAIL PROTECTED] wrote:
Hi all, I'm new
I am trying to select articles based on which menu item they are
attached.. but it wont work does anybody know how i can select the
fields from the other table ?
My model is like this :
var $hasAndBelongsToMany = array(
'Tag' =
array('className'= 'Tag',
Hello! I'm using Cake 1.1 and I'm trying to create a component that
accesses the database.
Here is what I have:
/cake
/app
/controllers
/components
tester.php
/models
model1.php
model2.php
class Tester extends Object {
var $controller = true;
var
I changed the name to TesterComponent and still no good.
Thanks!
On Aug 9, 11:56 am, starkey [EMAIL PROTECTED] wrote:
Hello! I'm using Cake 1.1 and I'm trying to create a component that
accesses the database.
Here is what I have:
/cake
/app
/controllers
/components
Hi guys,
Yep, another HABTM question I'm afraid... but I haven't been able to
find the answer to this one on the group, so maybe it hasn't been
brought up yet :)
My app contains a model merchants, each of which hasAndBelongsToMany
related merchants. No problem, I just use this code in the
I think the problem is that you have something like this in your controllers
var $uses=array('Menu','AdminMenu',);
But when you try to load an undefined action the models used are not
instantiated? (Maybe...I'm not sure)
--
Pablo Viojo
[EMAIL PROTECTED]
http://pviojo.net
On 8/9/07,
Actually I found a way to solve that problem:
In the html tag, if we specify the lang=ja , then the problem
disappear !!
On 3 Aug, 11:14, Jerome Eteve [EMAIL PROTECTED] wrote:
Hi all,
we are currently translating our website in japanese. Our system and
our website is full utf-8 .
Here
Thanks that was the problem.. i had only put in adminmenu in the $uses
var :)
On Aug 9, 6:13 pm, Pablo Viojo [EMAIL PROTECTED] wrote:
I think the problem is that you have something like this in your controllers
var $uses=array('Menu','AdminMenu',);
But when you try to load an undefined
On Aug 9, 2007, at 10:39 AM, John David Anderson (_psychic_) wrote:
Bakers,
Just another invitation to any and all who want to make documentation
about CakePHP better. The 1.2 manual (in the works) is 120 pages
strong, but I'm still looking for folks ready to work on any of the
still learning about cake... but surely converting the dates into a
timestamp and doing the comparison is the best way?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send
I have a function that sets a variable for a view and then it needs to
use a value returned to set another variable in the view. I am
getting an Undefined Variable error when I try to call the first
variable.
/*code*/
function view($id = null) {
if(!$id) {
Hello All,
I have come across an issue with view caching and I was wondering if
any had a similar experience. When a view is cached my function for
registering views in the database no longer works. See here.
I have a function in my MediaController
function view($id = null) {
This is in cakephp 1.1.16 BTW
--~--~-~--~~~---~--~~
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
The problem is :
$this-set('incentive', $this-Incentive-read(null,
$id));
you set the $incentive to your view, but not in this controller ..
$incentive = $this-Incentive-read(null, $id);
$this-set('incentive', $incentive);
On Aug 9, 6:25 pm,
Will do, thanks!!
On Aug 9, 11:16 am, rtconner [EMAIL PROTECTED] wrote:
Yes you can do it with generateList. Just use the conditions array
wisely. Depending on the database setup you are using you can include
the keyword distinct in your conditions. I forget the details. You'll
have to do a
True - I changed to use the buit-in functions - ie save() but I still
have the same problem. The problem is that the line $household_id =
$this-Household-field(id, $match_userid); doesn't always issue
it's underlying SQL SELECT `Household`.`id` FROM `households` AS
`Household` WHERE
Hello friends,
I am having 2 dates issue while working in cakephp. I have two tables
events_categories and events.
IN one part
I want to show the events according to the event_categories so i have
put this code in event_category model
var $hasMany = array('Event' =
Hi,
I am not sure how to best go about doing this. I have a model called
Project, each of which will have a set of images or pictures
associated with them.
How would I create the admin side for project? I would have to upload
multiple images, then store them somewhere, etc.
A brief
Here is an initial start of a Facebook component in CakePHP...
http://savarino.net/facebook-cakephp
Please let me know if there are ways to improve this.
On Aug 4, 8:17 am, thequietlab [EMAIL PROTECTED] wrote:
Hi,
yes, the article gave me a good point to start but I would like to
hear if
I guess using strtotime will make it. If ever you use the $from-
input for the date, do not forget to call the cleanupFields before
the save, this will ensure your date is concatenated in your date
field.
On Aug 9, 6:11 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
still learning about
Try
1 - 'Event.datefield=now()'
2 - 'Event.datefield=now() AND Event.datefieldDATE_ADD(now(),
INTERVAL 1 WEEK)'
--
Pablo Viojo
[EMAIL PROTECTED]
http://pviojo.net
On 8/9/07, CakeMan [EMAIL PROTECTED] wrote:
Hello friends,
I am having 2 dates issue while working in cakephp. I have two
I created my own loadModel method as part of my controller using the
path
$path = APP . 'controllers' . DS . 'components' .DS . 'models' . DS;
So, now the models are found but I get these errors
Warning: overload() was unable to locate class 'model1' :
Fatal error: Cannot instantiate
On 8/9/07, starkey [EMAIL PROTECTED] wrote:
Hello! I'm using Cake 1.1 and I'm trying to create a component that
accesses the database.
Components talk to *controllers*, behaviors talk to *models*. So, you
need to create a behavior, not a component.
This link might help point you in the
Thanks Pablo,
Your first one has worked. However second one didn't work.
for second one ( for extarcting current week's event DAY WISE) i am
using $this-event-findall as the date field is in the event table.
I have tried to put 2nd condition in as
$conditions=Event.eventday=now() AND
Caching has me a bit perplexed. I haven't dug into the cake caching source
and I'm hoping to avoid that. I have a simple page set up as a test with a
couple variables - one cached and the other wrapped in nocache tags. The
view gets written to the cache directory and the variable wrapped in the
If i am using Cake 1.2 in one application (call it App1.2) and Cake
1.1 in another application (App1.1). Can i use bootstrap.php in the
config folder of App1.2 to read models, view and controllers from
App1.1?
--~--~-~--~~~---~--~~
You received this message
I am trying to use a shared certificate with a cake application.
However, when I point to the directory it cannot be found. This is
the first time I've tried hooking it up to a cake application and I
would appreciate any help.
--~--~-~--~~~---~--~~
You received
I can't get view caching to work with CakePHP v1.2.0.5427alpha.
DEBUG = 0 and
CHECK_CACHE = true
The cache helper is added to the helpers array.
Has Cake ditched view caching?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
I would create an Image model, and associate it with a Project (i.e. a
Project hasMany Images, an Image belongsTo a Project, relating the two
based on project id).
On Aug 9, 12:51 pm, murtada [EMAIL PROTECTED] wrote:
Hi,
I am not sure how to best go about doing this. I have a model called
Version 1.1.10.3825 if that helps. The other issue which is
potentially related is expiration. I've set it to +60 seconds but
the cached view never seems to expire.
On Aug 9, 2:45 pm, Christian Primozich [EMAIL PROTECTED] wrote:
Caching has me a bit perplexed. I haven't dug into the cake
Have you tried $household_id = $this-Household-field(id,
array('id' = $match_userid)); instead? That seems to work for me...
On Aug 9, 1:34 pm, phalvrson [EMAIL PROTECTED] wrote:
True - I changed to use the buit-in functions - ie save() but I still
have the same problem. The problem is
I was just looking at Felix's Command line article (http://
www.thinkingphp.org/2006/10/16/command-line-fun-in-cakephp-12/), where
bake2.php was mentioned. I'm working with 1.2.0.5427. I couldn't
find bake2.php in there. I checked the subversion tree, and didn't
find it there either. Can
On 8/9/07, chewie124 [EMAIL PROTECTED] wrote:
I was just looking at Felix's Command line article (http://
www.thinkingphp.org/2006/10/16/command-line-fun-in-cakephp-12/), where
bake2.php was mentioned. I'm working with 1.2.0.5427. I couldn't
find bake2.php in there. I checked the
Try running the generated query (and post it here) and see if it
return any results. I tried it and it works for me
Regards,
Pablo
On 8/9/07, CakeMan [EMAIL PROTECTED] wrote:
Thanks Pablo,
Your first one has worked. However second one didn't work.
for second one ( for extarcting current
Read:
http://api.cakephp.org/1.2/class_model.html#029fcc94396edba60df5648e7086e01d
Or:
http://api.cakephp.org/class_model.html#029fcc94396edba60df5648e7086e01d
(Don't know which version are you using)
Regards,
Pablo
On 8/9/07, kionae [EMAIL PROTECTED] wrote:
Have you tried $household_id
But you do have association between projects and products. You have
the proper associations.
Your problem is that you need runtime conditions. I had the same
problem, ie. needed a condition which
is cannot be described with the association scheme.
You can't put runtime calculations (in this case
But you do have association between projects and products. You have
the proper associations.
Your problem is that you need runtime conditions. I had the same
problem, ie. needed a condition which
is cannot be described with the association scheme.
You can't put runtime calculations (in this case
Have you tried : $this-Category-find(array('Product.project_id'=
$this-Session-read('project_id')));
Geoff
--
http://lemoncake.wordpress.com
On Aug 10, 8:48 am, sarimarton [EMAIL PROTECTED] wrote:
But you do have association between projects and products. You have
the proper associations.
Hi Soulcatcher
This issue has been covered a number of times in this group, but can be
hard to find. Short answer is that it is quite safe.
Retrieving the last inserted ID is done in the context of your current
MySQL connection. So it doesn't matter if other people are saving at
the same
Hi, i'm new to Cake and i have a question about synchro issue. When
you have related tables (say table B has a foreign key pointing to
table A) and you want to save 2 related tuples, it's written in Manual
that you have to
1) Save tuple in table A
2) Get last id from A
3) Save tuple in table B
Woops. That should have been:
If you search the group for getLastInsertId you should find the
details (expressed much better than I have here)
Regards,
Langdon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
I'd like to filter my view based on the input from the user. The
thought is the user will enter a date range using input text boxes.
These values would be passed to the controller and an query($sql)
would return values I'll display in a table.
I can get the query and the table to work no
Is anyone displaying an image or some text after an input field in a
view? And what happens if there's an error for this input field?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this
Still trying to concat data from two models into a select list in a
third.
Thanks for the help thus far, Geoff. Taking your advice, and some
input from IRC, after much trying, I'm at:
In controller:
function getListData($data){
$data = $this-Model-query(SELECT CONCAT(bar,
After messing around a bit with the Auth component, I got to
CAKE_SESSION_STRING for security usages.
I wonder which value it should hold.
I just put in random chars? is it an md5 value? other type of hashed
value? Should it have a number of chars?
On 8/10/07, phpjoy [EMAIL PROTECTED] wrote:
$this-Auth-userModel = 'AdminUser';
$this-Auth-loginAction='/' .CAKE_ADMIN .'/login/';
What is the value for $this-Auth-authorize
IOW - what are you using to authorize your actions?
Possible values are actions, model, controller
Tarique
--
I setup the Auth component, and it's working great for the validation
stage.
If no session is found, it redirects to /admin/login/ just as it
should.
$this-Auth-userModel = 'AdminUser';
$this-Auth-loginAction='/' .CAKE_ADMIN .'/login/';
After I get validated (Goes to Users controller and Login
Hey,
I just joined the group so I thought I should share with you a blog
post that I found very helpful.
http://cake-php.blogspot.com/2006/09/21-things-you-must-know-about-cakephp.html
Hope you guys like it,
Matt
--~--~-~--~~~---~--~~
You received this message
Can you setup a default controller action in the routes?
For instance...
/my-url-here would by default go to homes/view/my-url-here. It
doesn't find an associated controller so it just defaults to the Homes
Controller View.
But if it finds a controller it does what is normal:
In the routes, can you setup a default action for your app?
For example:
/my-url-here ... runs the default controller view (houses view being
the default so it would act like ... houses/view/my-url-here)
/properties/view/my-url-here ... would still run the properties
controller view
78 matches
Mail list logo