My code (Cake 1.2.5):
echo $html->url( array(
'controller' => 'users',
'action' => 'activate',
'?' => array('e' => 'EMAIL', 'c' => 'CODE')), TRUE );
The output:
http://localhost/index.php/users/activate?e=EMAIL&c=CODE
This output is wrong, right? Should be:
http://localhost/index.php/us
Ok, thanks for the replies, I'll try them..
Miles J wrote:
>
> You can enable the Security component, which does the session and bot
> validation automatically.
>
> Secondly, after a post is done, you can unset the data so that the
> form is empty. unset($this->data['Model']);
>
> Thirdly, yo
@Jamie,
Its not wrong , its just not best practice and fall out of palce for
MVC design pattern i guess.
On Jan 26, 3:45 am, Jamie wrote:
> You don't need to import a component, especially since components are
> for controllers. You can just do this in your Cart model:
>
> public $session = n
I have not tried it but isn't the Miles idea the best option? it's
the simplest and other solutions stated here are just unuseful,
complicating things when not needed
On 28 ian., 05:08, Marcelo Andrade wrote:
> On Mon, Jan 25, 2010 at 10:50 AM, Chad Smith wrote:
> > (..)
>
> I'm not 100% sure a
what kind of project do you want? what's the proposed reward to the
coder? part of the business / flat fee per project?
On 28 ian., 04:31, stefano wrote:
> Andrew
>
> tell me about the project iam from Chile
>
> S
>
>
>
> On Wednesday, January 27, 2010, Andrew wrote:
> > Hi Guys!
>
> > I am look
I found this but every url takes me to pages now...
http://paulherron.net/articles/view/managing_simple_pages_in_cakephp
Routes:
App::import('model', 'Page');
$Page = new Page();
$pages = $Page->find('list', array('fields' => array('id',
'title')));
//debug($pages
I built an 'about' controller with a function for each page, then used routing
to remove the 'about' part from the url.
Jeremy Burns
On 28 Jan 2010, at 06:10, Dave wrote:
> I have to build a simple site, 5 pages but the tricky part seems to be the
> pages are index, about us, info, history and
I have to build a simple site, 5 pages but the tricky part seems to be the
pages are index, about us, info, history and contact us so the urls need to
be reflected by that (site/about_us site/contact) and the only thing on
these pages will be text. Admin logs in and using wysiwyg editor can upd
(This is more of an overall programming / PHP question than Cake ..
but it will ultimately be built in Cake, and this community kicks ass
so I figured I would throw it out there)
Hello everyone. Here is the challenge I am working on:
I want to build a system that would allow you to control the re
No it doesnt really. I just uses the AppModel in its place.
On Jan 27, 5:47 pm, Jon Bennett wrote:
> > Im guessing its just a lot of HABTM tables. If so, you don't need
> > models for those unless it has specific functionality.
>
> Cake still creates a model class per join though I think, so you
On Mon, Jan 25, 2010 at 10:50 AM, Chad Smith wrote:
> (..)
I'm not 100% sure and cannot try for now, but doesn't this work?
'Email');
var $components = array('EmailComponent'=> 'Email');
var $helpers = array('MyForm'=> 'Form');
// ...
}
Best regards.
--
MARCELO F ANDRADE
Belem, Amazoni
Andrew
tell me about the project iam from Chile
S
On Wednesday, January 27, 2010, Andrew wrote:
> Hi Guys!
>
> I am looking for a developer. I have a small project might take a few
> weeks. I am looking for someone who wants to donate some time to a
> small startup. You can be anywhere in the w
> Im guessing its just a lot of HABTM tables. If so, you don't need
> models for those unless it has specific functionality.
Cake still creates a model class per join though I think, so you still
use up memory even though there's no physical file to load.
jb
--
jon bennett - www.jben.net - bl
You can enable the Security component, which does the session and bot
validation automatically.
Secondly, after a post is done, you can unset the data so that the
form is empty. unset($this->data['Model']);
Thirdly, you can have the page just redirect somewhere else.
On Jan 27, 5:24 pm, euromark
May I ask what type of site? Ive worked on large projects before and
never got over 600.
Im guessing its just a lot of HABTM tables. If so, you don't need
models for those unless it has specific functionality.
On Jan 27, 4:53 pm, tiberium911 wrote:
> No 600 is not extreme. We have over 600, all
Have you tried Mark Story's two part tutorial
http://mark-story.com/nodes/view/auth-and-acl-an-end-to-end-tutorial-pt-1
- S
2010/1/27 Alejo
> Hi!
> I want to use some ACL in CakePHP, but I´ve tried with : Authake
> ( http://conseil-recherche-innovation.net/authake ) and with PHPGacl
> http://d
by the way
i just tried this snippet
$("form input.submit").bind("dblclick", function(e){
e.preventDefault();
return false;
});
and it works quite well for prevention of any double (or multiple)
clicks :)
On 28 Jan., 02:10, euromark wrote:
> maybe some js disabling after clicking the s
maybe some js disabling after clicking the submit button like in
http://www.norio.be/blog/2008/09/using-jquery-prevent-multiple-form-submissions
but i guess this can get problematic if the connection gets aborted or
user cancels manually
he would then have to reload or hit F5 - some users might no
How can I avoid multiple form submission ??
I know that this topic has been discussed in other forums.
When a user submits a form, how can we prevent the user to submit the form
again and again ?
I read some threads in other forums. They use a session variable (writing a
value to a session variabl
No 600 is not extreme. We have over 600, all necessary, over about 7
database servers. Thanks for the link, helped quite a bit. Still need
to find some more speed improvements, but most of that will probably
be more caching.
On Jan 27, 7:36 pm, Miles J wrote:
> Forgot to say, use a lazy loader.
>
Forgot to say, use a lazy loader.
http://github.com/mcurry/lazy_loader
On Jan 27, 4:34 pm, Miles J wrote:
> Does your site really have 600 database tables? That's a bit extreme
> don't you think.
>
> On Jan 27, 2:13 pm, tiberium911 wrote:
>
> > Can cake handle a website with 600+ connected mode
Does your site really have 600 database tables? That's a bit extreme
don't you think.
On Jan 27, 2:13 pm, tiberium911 wrote:
> Can cake handle a website with 600+ connected models? Right now the
> site takes 7-10 seconds as soon as cake initializes any model. I
> looked through the cake code, and
Yes .htaccess is required because its uses mod_rewrite. If you didn't
your URLs would be like so:
index.php?url=/items/view/
On Jan 27, 1:18 pm, Johnny Cupcake wrote:
> This issue was last discussed here in 2006, as far as I can tell. I'd
> like to know if anything has changed since then.
>
> A
Hi!
I want to use some ACL in CakePHP, but I´ve tried with : Authake
( http://conseil-recherche-innovation.net/authake ) and with PHPGacl
http://dev.sypad.com/installing-phpgacl-plugin-cakephp but this was
imposible to install with Cakephp 1.2.5 version.
Can you help me with some ideas to use ACL
This issue was last discussed here in 2006, as far as I can tell. I'd
like to know if anything has changed since then.
Are pretty URLs available without using .htaccess? For example, with
my Apache document root set to my app's webroot dir, a controller
"items" and an action "view", and scaffold
Okay, I just re-read that. I don't know what he meant, but my last
reply will probably fix the issue.
On Jan 27, 11:27 am, BrendonKoz wrote:
> I believe he meant the $name property within the controller.
>
> var $name = 'Author';
> ...should be...
> var $name = 'Authors';
>
> On Jan 26, 11:11 am
Can cake handle a website with 600+ connected models? Right now the
site takes 7-10 seconds as soon as cake initializes any model. I
looked through the cake code, and it appears that cake initializes all
600+ models on any model initialization.
Check out the new CakePHP Questions site http://cakeq
Just remove 'id' as an index.
array('action' =>'remover', $registro['Proprietario']['id'])
You only need to pass indexes for named params and for routing.
On Jan 27, 1:36 pm, Celso wrote:
> echo $this->Html->link('Remover',
> array(
> 'act
echo $this->Html->link('Remover',
array(
'action' =>'remover',
'id' => $registro['Proprietario']['id']
),
null,
'Deseja realmente remover?' );
cr
> and removing the viewed rows in the db when a comment is added
I don't understand what you mean by that. If it's what I think then
I'd guess it would require a lot of writes to the DB.
I did put something together last night. It's a bit rough around the
edges but it's a start. It involves code
Hi Guys!
I am looking for a developer. I have a small project might take a few
weeks. I am looking for someone who wants to donate some time to a
small startup. You can be anywhere in the world. The company is not
looking to become the next Google. We simply want to make the world a
little better.
I googled after jsonp example and this article turned up, which from
what I read, seems to explain the whole concept in a very
understanding way. Give it a try:
http://www.ibm.com/developerworks/library/wa-aj-jsonp1/
Enjoy,
John
On 27 Jan., 19:04, thomaus wrote:
> I agree with you John and th
Add the title option as this:
[code]
link(
'View Post',
array( 'controller' => 'hello', 'action' => 'world', 1 ),
array( 'update' => 'post', 'title' => 'your nice title for this
link' )
);
[/code]
Enjoy,
John
On Jan 27, 5:54 pm, biofox wrote:
> How do you set the href title attribut
Ok, I would like to understand what is your issue here, because I do
not see a calculate method in the DataSource class! Do you mean the
DboSource?
John
On Jan 27, 5:52 pm, fain182 wrote:
> 2010/1/26 John Andersen
>
> > How do you search for your files that fulfill your criteria?
>
> > If you
Ok, so I changed Cake to use 'pretty urls' and turned mod_rewrite off
and it works now.
Now, I just need to figure out why it wasn't working in the first
place
On Jan 27, 11:17 am, Andrew Poquette wrote:
> I got this when I restarted apache...
>
> * Restarting web server
> apache2
I got this when I restarted apache...
* Restarting web server
apache2apache2: Could
not reliably determine the server's fully qualified domain name, using
127.0.1.1 for ServerName
apache2: Could not reliably determine the server's fully qualified
dom
Thank you for the help so far! I enabled mod rewrite, no luck.
On Jan 27, 9:59 am, Akeda Bagus wrote:
> On Wed, Jan 27, 2010 at 10:24 PM, Andrew Poquette wrote:
> > So, I installed cake, set everything up, and have the welcome page
> > saying that Cake can connect to the database, and I'm good
I'm having the same prob... Don't know the solution :(
// subcategory routing
Router::connect(
'/:catslug/:subcatslug/*',
array('controller' => 'sub_categories', 'action' => 'view'),
array(
'pass' => array('catslug','subcatslug')
)
);
// product routing
Router
I agree with you John and this makes sense. The problem is that I
absolutely don't want to put any PHP in the requesting domain.
It seems that the only remaining solution is to do JSON-P query. Is
there a simple way to do a JSON-P query and to update a with a
full content of a Cake view?
On Jan
Thank you for your work, Veres-Szentkiralya Andras. Although I do not
work with the Cake team, I do know that sending this to the Google
Group isn't the proper place to submit change requests, and may go
unseen by the developers.
To submit bug reports/patches/fixes, you would want to use their
cu
> $form->input('Curse.0.curse_id',array('type' => 'checkbox', 'value' =>
> 13));
>
> how do I recoup the fields checked for edition?
The data will be in $this->data['Curse'] in the controller.
> $this->data = $this->User->read(null, $id);
By doing this you are completely blowing away the for
I believe he meant the $name property within the controller.
var $name = 'Author';
...should be...
var $name = 'Authors';
On Jan 26, 11:11 am, euromark wrote:
> but it is supposed to be plural
> class BooksController extends AppController {
>
> On 26 Jan., 16:30, "andrei.b" wrote:
>
>
>
> > I f
Thanks again. So I have 2 followup questions.
Does the containable behavior apply for insert too?
In theory, bind/unbind should work according to documentation, no?
I will look more into contanable, it was next on my list to explore. Thank
you
On Wed, Jan 27, 2010 at 9:39 AM, Jeremy Burns wro
I got this working (although I have amended the model since but not updated
this article - perhaps I should!). This might help as a starting place.
http://www.jeremy-burns.co.uk/2009/11/cakephp-dynamic-navigation-bars/
Jeremy Burns
On 27 Jan 2010, at 16:06, Dave wrote:
> I m trying to figure
You could create XML sitemaps from which you draw the actual urls and text
for your navigation links. Then create an admin tool (page) to administer
those XML files. That is pretty common in professional web development.
On Wed, Jan 27, 2010 at 9:06 AM, Dave wrote:
> I m trying to figure out th
How do you set the href title attribute within a ajax->link call, i.e.
to set the title to 'Todo Overview' in the example below
Here is an example ajax link
link(
'View Post',
array( 'controller' => 'hello', 'action' => 'world', 1 ),
array( 'update' => 'post' )
);
Check out the new CakePHP Que
I m trying to figure out the best way to create dynamic navigation but not
sure where to start.
The idea is have a "manager" for main nav, left side, right side, footer so
the admin can create or edit each nav from the manager. They most likely
will not change from page to page so all the navs wi
On Wed, Jan 27, 2010 at 10:24 PM, Andrew Poquette wrote:
> So, I installed cake, set everything up, and have the welcome page
> saying that Cake can connect to the database, and I'm good to go.
>
> I created a model, a controller, and a view via the tutorial, but when
> I go to http://localhost/po
2010/1/26 John Andersen
> How do you search for your files that fulfill your criteria?
>
> If you are using a pattern, like "*.txt", then you could just use the
> function glob("*.txt") to return the filenames and dirnames that
> comply with the pattern. The result is an array, which you can
> co
You can set recursion and containment restrictively in app_model:
var $actsAs = array('Containable');
var $recursive = -1;
...then undo it as you need. Take a look at the section on the contain
behaviour in the online book - http://book.cakephp.org/view/474/Containable -
I'd rec
I double checked, and they are all there.
On Jan 27, 9:31 am, Jeremy Burns wrote:
> It might not be this, but I've done it in the past. Check that when you
> installed Cake you also copied over the .htacces files. They exist in the
> root, in /app and in /app/webroot. If these files are hidden
It might not be this, but I've done it in the past. Check that when you
installed Cake you also copied over the .htacces files. They exist in the root,
in /app and in /app/webroot. If these files are hidden it is easy to overlook
them, especially the one in the root.
Jeremy Burns
On 27 Jan 2010
Thats a very good question. In fact, I am still exploring CakePHP and
trying to find out more about the ins and outs. Anyway. I did that and it
worked. However, my reasoning for not using associations in the model was
the following:
If I do use association the model, then any select on Users t
So, I installed cake, set everything up, and have the welcome page
saying that Cake can connect to the database, and I'm good to go.
I created a model, a controller, and a view via the tutorial, but when
I go to http://localhost/posts/index I get a 404 error. I've searched
the group here and I co
Can I pose the question "Why are you not defining associations in your models?"
They are incredibly powerful.
Jeremy Burns
jeremybu...@me.com
(Skype) +44 208 123 3822 (jeremy_burns)
(m) +44 7973 481949
(h) +44 208 530 7573
On 27 Jan 2010, at 04:36, YS wrote:
> I am very new to cakephp and havi
Hi
i try to integrate the captcha component with my login form. after
install all the files i try the following error coming ..
Fatal error: require_once() [function.require]: Failed opening
required 'D:\wamp\www\furniture_project\app\vendors\phpcaptcha\php-
captcha.inc' (include_path='D:\wamp
Hi,
Tables :
1.user_profiles
fields :-> userid (PK)
2. Memberships
fields :->membid , userid (reference to users profile )
Can you help me over this issue.?
Solution :
user_profiles table : id
memberships table: id, user_profile_id (it will refers the user_profi
As captioned, this is very strange that i can't figure it out till now
But it's true that the database table only got refreshed when i set
the debug to on.
Nothing will be inserted into the table when debug is off.
Does anyone have any idea what's going on with cakephp debug? PLS PLS
Many thank
I am very new to cakephp and having problems understanding bindModel.
I have read the documentation several times but bindModel is not
behaving as I expect. This is my issue:
I have user who has one profile and one resume. I am storing resume
in a separate table and I am not defining association
Hi,
the e-mail address validator in CakePHP considers addresses in the form of
f...@bar.com invalid because of the regular expression used for this purpose
in cake/libs/validation.php. Although RFC 5322 specifies that the local-part
of an e-mail address cannot end with a dot, some providers (e.g
As far as I could understand the second article, you have to place the
proxy script in the "requesting" domain, not the CakePHP app domain.
The proxy script will then request the CakePHP app domain for the
information, receive it and pass it back to your JQuery processor.
Enjoy,
John
On Jan 27,
app/webroot is the right place.
Try accesing /url_proxy.php directly from the browser and see what happens
Regards!
Pablo Viojo
pvi...@gmail.com
http://pviojo.net
¿Que necesitas?
http://www.needish.com
On Wed, Jan 27, 2010 at 11:14 AM, thomaus wrote:
> Hi there,
>
> I need to do a JQuery a
Hi there,
I need to do a JQuery ajax request to an action of my CakePHP app but
with the Javascript in a different domain than the Cake app's one.
After reading this very good article :
http://developer.yahoo.com/javascript/howto-proxy.html
I created a proxy PHP file following these explanations
Hi Chander,
Please show the code from the AppController which you would like to
use in another Controller.
Also the code in the controller that you have the issue.
Then we may better be able to help you!
Enjoy,
John
On Jan 27, 1:53 pm, Chander Bhan wrote:
> I am unable to get all the proper
Thanks - I looked at the page source and it is there - Apparently I've
screwed up the CSS so it doesn't appear.
Rick
On Jan 25, 8:50 pm, euromark wrote:
> usually it is printed before the tag starts
> in a normal browser environment it would display as ugly code at the
> very top
>
> maybe its
Hey Leaf,
We've done a lot of rewriting with our sites and mainly with
http://theeasyapi.com, and http://www.countycriminal.com. One thing
that I have found is that you must always use the controller name in
the URL even when you are rewriting which controller picks it up.
In your example I woul
Hi,
I have a question about HABTM.
I'm making a access permission system itself, because I don't need the
complexity of the ACL.
I have 3 tables:
- Users
- Locals -> access locals of the system.
- Permissions -> Table N:M with the fields (id, user_id, local_id, _add,
_read, _delete, _update
I am unable to get all the properties of app_controller in a
controller which extends app Controller and using the method of
another controller which also extends app controller
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You
I resolved this, and it was quite easy.
I created a folder within app/webroot (let's call it appfolder), installed the
program there and pointed my subdomain at the folder. Now I can access the
application either by going to www.domain.com/appfolder or appfolder.domain.com
Hope this helps some
I fixed the problem and I thought I would post the solution here in
case someone came across the same problem.
After WEEKS of trying to figure it out, I found the solution by
accident. I accidentally commented the $components variable in my
users_controller.php file and it suddenly started working
Its a good idea, but i want to be able to see when a user has viewed a
comment, and then act upon that at the end of the day. The solution
i'm going with is tracking the post views, as opposed to the comment
views, and removing the viewed rows in the db when a comment is added.
any thought?
On Jan
Hi
I'm newbie on cakephp
I have a big doubt about if use ACL or HABTM in my web application. I
would ask you some suggestion.
My system is:
Model:
User , Organization , Document
Organization HABTM Recipient (User)
Organization HABTM Administrator (User)
Document belongsTo Organization
Document H
Great jobs, this library very helpfull for dojo lover.
Mufti Ali
087831163105
http://wordtaps.com
http://blogfreakz.com
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the
You can write trigger in the database
On Mon, Jan 25, 2010 at 5:25 PM, Javier wrote:
> Is it possible to automagically update 'modified' field in a
> 'belongsTo' table when a table is updated.
>
> my example is this: I have two tables with 'modified'
> fields...'families' and 'family_members'. mo
74 matches
Mail list logo