On Jan 29, 3:35 am, Johnny Cupcake wrote:
> Why did I disable mod_rewrite in the first place? Well, the core
> config file says pretty URLs are available regardless (see line 48),
> so I figured I'd keep complexity to a minimum.
I think you misunderstood the comment, it is not saying you can
s
While Miles J is right in general, there are exceptions.
This is how I used Emailcomponent from a model:
http://github.com/ionas/sna/blob/master/www/app/app_model.php#L98
(1.2.5)
I am not sure if an email datasource would be the best approach in
general (and the component as well as models could
Hey,
first of all, though I did not know bout it, Miles J's solution seems
to be great, and as far as I understood already works out of the box.
the way I went for to distinct Behaviors, components and Models and
have no singelton naming conflicts was this:
Permission <= Model (noun)
Permissonabl
Maybe use something like this: http://github.com/morrislaptop/baked_simple
?
Else there is a very easy way. Add your "site" or page model and MVC.
Then there is a third option, use requestaction from pages "views" (a
little dirty)
On Jan 28, 9:45 pm, "Dave" wrote:
> No, I need these pages to be d
On Jan 28, 11:55 pm, Alexandru Ciobanu wrote:
> On 1/29/2010 1:51 AM, cricket
> wrote:>http://book.cakephp.org/view/812/find-threaded
>
> > Is that what you're looking for?
>
> Sort of, but not quite.
> The book example uses nested set model, my tree is the basic adjacency
> list (http://dev.mysq
On 1/29/2010 1:51 AM, cricket wrote:
http://book.cakephp.org/view/812/find-threaded
Is that what you're looking for?
Sort of, but not quite.
The book example uses nested set model, my tree is the basic adjacency
list (http://dev.mysql.com/tech-resources/articles/hierarchical-data.html).
Why did I disable mod_rewrite in the first place? Well, the core
config file says pretty URLs are available regardless (see line 48),
so I figured I'd keep complexity to a minimum.
Having re-enabled mod_rewrite, both the problems I listed above are
resolved.
On Jan 28, 4:24 pm, AD7six wrote:
>
I just found out that add a use('Debugger') in my controller will
solve the problem, but i still would like to know
1. Will it slow down my application?
2. What's the trick of the Debugger behind the wall, what's the root
difference of deubg > 0 and debug = 0
Snippet of my cakephp code attached (
You'll have to post your Cake code, I think.
Do you use Debugger class anywhere? Also, try putting some $this->log
('...') lines in.
On Jan 28, 7:29 pm, Jeruliu wrote:
> As captioned, this is very strange that i can't figure it out till
> now.
> I'm using Cakephp with the jquery to submit the fo
On Wed, Jan 27, 2010 at 9:34 PM, Miles J wrote:
> Yes .htaccess is required because its uses mod_rewrite. If you didn't
> your URLs would be like so:
>
> index.php?url=/items/view/
If you uncomment App.baseUrl in core, you
can get URLs like index.php/items/view/.
Atts.
--
MARCELO F ANDRADE
Bel
As captioned, this is very strange that i can't figure it out till
now.
I'm using Cakephp with the jquery to submit the form.
I've spent sometime to investigate the issue, here is my script in
html source
//
Please be noted that when debug is on and off the html sources are
exactly the same but
On 28 ene, 23:49, Johnny Cupcake wrote:
> Right, I was referring to mod_rewrite and not .htaccess in
> particular.
>
> I see the links generated by HtmlHelper are wrong too. They point to
> "/app/webroot/filename" when Apache's root is already set to "/app/
> webroot/", so they ought to therefo
I've spent sometime to investigate the issue, here is my script in
html source
//
Please be noted that when debug is on and off the html source is
exactly the same but come up with different result
When debug is off the "data" in sucess function is empty, while i can
see sth when debug is on
Thi
On 28 ene, 08:59, Johnny Cupcake wrote:
> 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
Why don't you just use named params instead of a query string?
/users/active/email:t...@test.com/code:Jnds08JSD/
On Jan 28, 11:43 am, Johnny Cupcake wrote:
> I may do that...but I first want to know whether I am using these
> functions wrong, or they simply do not work as advertised.
>
> On Jan
See this example in the docs
http://book.cakephp.org/view/812/find-threaded
Is that what you're looking for?
On Jan 28, 12:59 pm, Alexandru Ciobanu wrote:
> Hi guys,
>
> I have a Category model with the following table setup:
>
> http://bin.cakephp.org/view/657815570
>
> Doing a $this->Category
Right, I was referring to mod_rewrite and not .htaccess in
particular.
I see the links generated by HtmlHelper are wrong too. They point to
"/app/webroot/filename" when Apache's root is already set to "/app/
webroot/", so they ought to therefore point to "/filename". At this
point I am only gues
For Comet, I just found a new project that aims to implement Comet for
you:
http://www.ape-project.org/home.html
Other than looking at the main page of the project, I haven't done
anything with it. Learn at your own risk. ;)
On Jan 4, 12:00 am, td-nathan wrote:
> I also need to implement a cha
No, I need these pages to be dynamic. There was an article on using /
making your own page controller
http://paulherron.net/articles/view/managing_simple_pages_in_cakephp
But I cant seem to get it to work.
I do not want to hard code about / history so on since the site owner may
add new pages
So why not interest someone to finance the project and pay a developer
to do a good job for you.
Working for free doesn't sound like a good paying roll. I've heard
"it'll look good in your portfolio" a million times but my landlord
wouldn't buy that either.
If you have a problem with some
Hi Brian,
I realize that you feel it is absurd for me to ask highly intelligent,
highly skilled programmers for help. Help without pay. Even though I
am not offering sums of money I am offering programmers the
opportunity to display their skills while working on an exciting
project with opportunit
I may do that...but I first want to know whether I am using these
functions wrong, or they simply do not work as advertised.
On Jan 28, 3:43 am, euromark wrote:
> why dont u use mod_rewrite and pretty urls instead?
> cleaner and much more fail proof anyway
>
> On 28 Jan., 10:00, Johnny Cupcake w
FINALLY, I've sorted through this mess and, once again, it comes back
to understanding the cakePHP conventions.
I had most of the linking relationships right, what was not working
was the choice of names for my foreign-key columns in the intermediate
table. I had columns in the 'mated' table named
Thank you Alexandru Ciobanu...I'll test...
Douglas Pacheco Cardoso
2010/1/28 Alexandru Ciobanu
> On 1/27/2010 2:06 PM, Douglas Pacheco Cardoso wrote:
>
>> I have 3 tables:
>> - Users
>> - Locals -> access locals of the system.
>> - Permissions -> Table N:M with the fields (id, user_id, loca
Router::connect('/', array('controller' => 'pages', 'action' =>
'display', 'index'));
Router::connect('/about', array('controller' => 'pages', 'action' =>
'display', 'about'));
Router::connect('/info', array('controller' => 'pages', 'action' =>
'display', 'info'));
Router::connect('/history', array
So you're looking to hire a coder for free? Programmers are small
businesses, too.
On Thu, Jan 28, 2010 at 8:24 AM, Andrew wrote:
> There are a few things we would do to make it worth while for the
> developer. You would be part of something that has the ability to do
> real good by organizing sp
You should not be using Components from your Model. If you are, then
your application structure is wrong.
There are if cases like the Email and Session component.
On Jan 28, 9:19 am, bujanga wrote:
> I have found 2 MVC use cases for this approach. One is to send email
> from a model and the othe
On 1/27/2010 2:06 PM, Douglas Pacheco Cardoso wrote:
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 created a page for managing permissions, but I have a problem,
becau
A callback in the controller avoid a broken the MVC pattern.
On 01/28/2010 02:20 PM, Jamie wrote:
Well, it's certainly better than importing the component...
If you want to be strict about it (and I'm not exactly sure how the
method I suggests falls outside of the MVC pattern, since session i
Hi guys,
I have a Category model with the following table setup:
http://bin.cakephp.org/view/657815570
Doing a $this->Category->find('threaded') returns the categories tree.
Is there a non-hackish way to return just a tree node?
E.g. return all children for Category.id='3'
Check out the ne
Well, it's certainly better than importing the component...
If you want to be strict about it (and I'm not exactly sure how the
method I suggests falls outside of the MVC pattern, since session info
is just data, just like model data), then just make a model:
class UserSession extends AppModel {
I have found 2 MVC use cases for this approach. One is to send email
from a model and the other is to send email from a shell task. Here is
how I go about it:
// IMPORT AND INITIALIZE EMAIL COMPONENT
App::import('Core', 'Controller');
App::import('Component', 'Email');
$this->Controller =& ne
This might seem a bit random/basic but I thought I'd ask it anyway. I
love using the html helper, but is there a performance hit (even teeny
tiny marginal because that can compound up) when calling up the helper
to echo $html->tag('p', 'Hello world') compared a vanilla with
Hello world?
Check out
http://api.cakephp.org/class/helper tells us that $helper->here is the
url being visited. You can Router::parse() to extract information,
including the controller, from a url.
On Thu, 2010-01-28 at 08:02 -0800, Raven wrote:
> Hi there,
>
> I know this is probably a really basic question, but how
This is my first round with ACL's. I'm going off of the cakephp book and
this
(http://komunitasweb.com/2009/03/cakephp-acl-tutorial-what-and-how/)
tutorial... I have my aco's and aro's setup. My access control objects
are:
Aco tree:
---
Walther, I really apreciate your comment. I did not know the action
CakePHP was taking with the js helper. I will immediatley begin
writing another library to support it. However, I will continue to
develop the old project for the sake of those who do not upgrade.
Again, thank you. Without you brin
Hi there,
I know this is probably a really basic question, but how would I go
about detecting the current controller from within a helper?
As of right now I'm manually passing the controller name from within
the view... which doesn't seem terribly efficient.
Thanks in advance for any help!
Chec
I noticed a strange behaviour today.
I tried to enter some manual validation into a form.
This worked fine, except that the error message was printed out before
the input element:
Please select or
enter a Journal [...]
When I use the Model Validation, the Error Message is appended after
the form
Hey,
Simply include
$this->layout = 'ajax';
$this->autoLayout = false;
$this->autoRender = false;
In the controller action to stop the view from output. All you get is the
json data then do what you need with it
Dave
-Original Message-
From: cake-php@googlegroups.c
you cant automatically use them
manual inclusion:
App::import('Component', 'My');
$this->My = new MyComponent();
...
On 28 Jan., 11:54, Florian wrote:
> Hi @ all,
>
> my Problem is that i can not call a component from a model.
>
> Source - Model:
>
> class Approval extends AppModel{
> $co
There are a few things we would do to make it worth while for the
developer. You would be part of something that has the ability to do
real good by organizing specific data in the world and making a
platform that allows many small businesses to benefit from one
another. Also, you would receive cred
Hi @ all,
my Problem is that i can not call a component from a model.
Source - Model:
class Approval extends AppModel{
$components = array('CheckKont');
.
.
.
.
function beforeSave(){
$this->CheckKont->execute ();
}
}
Source - Component :
class CheckKont extend
Hi @ all,
class Approval extends AppModel{
$components = array('CheckKont');
function beforeSave(){
$this->CheckKont->execute ();
}
class CheckKont extends Object(){
execute(){
return true;
}
}
Check out the new CakePHP Questions site http://cakeqs.org and help ot
thanks
On 27 jan, 18:57, Miles J wrote:
> 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',
> >
ACL Cake have a limitation:
-- only one group for a user. --
I recommend CustomACL:
http://mentalramblings.info/posts/view/cakephp-12-acl-auth-habtm.
We hope a day, the cake team understand our need !!!
Check out the new CakePHP Questions site http://cakeqs.org and help others with
th
Hi Sam
I'm trying with the link you sent.
Thanks a lot. Have a nice day.
Alejo
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 Google Groups
"CakePHP" group.
To post
Hi there,
I need to render a full HTML view with header, css and js includes and
pass it as a JSON.
I liked Dave's trick :
$response['html'] = $this->render('my_view_needed');
Then echo back my json_encode($response) and use response.html in the
js to
render the view / messages / errors.
But th
onclick="return confirm('Are you sure you wish to delete this record?');"
--
View this message in context:
http://old.nabble.com/confirm-message-tp23472058p27355240.html
Sent from the CakePHP mailing list archive at Nabble.com.
Check out the new CakePHP Questions site http://cakeqs.org and
i agree
miles solution is the most appropriate
@Marcelo Andrade
i dont think you
and imagine the array structure - we would have some keys as integer
and some as strings
pretty nasty to work with unless we completely change to the key/value
thing
so not really practicable
On 28 Jan., 08:00, "e
why dont u use mod_rewrite and pretty urls instead?
cleaner and much more fail proof anyway
On 28 Jan., 10:00, Johnny Cupcake wrote:
> Ack, my post was auto-mangled. There is a difference there: & vs. "&
> amp;". Try the "Show original" link on the post.
>
> On Jan 28, 12:08 am, Jeremy Burns
We are small gaming company, Our office is at Uttara,Dhaka,Bangladesh.
we are looking for a cool cakephp guy.
if any one interested please notify me .
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message becau
That makes a lot of sense, I think it puts me on the right track.
On Jan 27, 7:47 pm, cricket wrote:
> > 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.
>
Ok ignore my post, too little sleep :)
I could use ClassRegistry::init('model') on router.php combined with
caching i can get result what i want.
On Jan 28, 11:36 am, Aurimas wrote:
> Hello,
>
> I have navigation in site where url looks likewww.sitename.com/:lang/:slug
> is there any way to defin
Hello,
I have navigation in site where url looks like www.sitename.com/:lang/:slug
is there any way to define almost same pattern for different
controllers? Now for example if i want to define route to services
controller and must manually enter route to it.
Router::connect("/:language/paslaugos"
Ack, my post was auto-mangled. There is a difference there: & vs. "&
amp;". Try the "Show original" link on the post.
On Jan 28, 12:08 am, Jeremy Burns wrote:
> Aren't those two outputs the same?
>
> Jeremy Burns
>
> On 28 Jan 2010, at 07:59, Johnny Cupcake wrote:
>
> > My code (Cake 1.2.5):
>
I wonder what type of project is it? Could you reveal a bit of mystery
and tell what project need so many tables? I'm just very curious.
On 27 Sty, 23:13, tiberium911 wrote:
> Can cake handle a website with 600+ connected models? Right now the
> site takes 7-10 seconds as soon as cake initializes
The javascript stuff is just "optional".
On Jan 28, 8:11 am, aveev wrote:
> 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 un
Multiple form submissions are just the peak of the iceberg.
http://www.ad7six.com/entries/view/67/Generic-capability-based-security-%28CSRF-prevention%29
http://teknoid.wordpress.com/2008/11/05/make-your-cakephp-forms-a-lot-more-secure/
Basically speaking. Any CUD (like CRUD without the R) operat
Are you sure you do not mix up instances and classes? Yes you can
fetch 600 instances of one or a few models without any issue (be sure
not to store images along or at least not fetch them, or other binary
data)
Are you sure you modeled 600 classes? None of them are similar? If
they are:
- use beh
Aren't those two outputs the same?
Jeremy Burns
On 28 Jan 2010, at 07:59, Johnny Cupcake wrote:
> My code (Cake 1.2.5):
> echo $html->url( array(
> 'controller' => 'users',
> 'action' => 'activate',
> '?' => array('e' => 'EMAIL', 'c' => 'CODE')), TRUE );
>
> The output:
> http://localhost
60 matches
Mail list logo