Solved it by doing the following:
$this->News->NewsTag->bindModel(array('belongsTo' =>
array('News',
'Tag')));
$news = $this->News->NewsTag->find('all', array(
'order'=>'News.created DESC',
'condition
I'm experiencing a problem with this; I can't figure out how to sort
the news according to their date created. They are being returned to
me in an array consisting of tags, that each have a number of news
associated to them. Is there an elegant way I can sort the returned
news so that they're bein
Ah, thanks a bunch. I'll give it a try :)
On Apr 16, 7:21 am, John Andersen wrote:
> You should perform a find in the Tag model, not in the news model,
> like:
>
> $taggedNews = $this->Tag->find('all', array(
> 'conditions' => array( 'Tag.name' => [your tag value here] ),
> 'recursive' =>
Using the RequestHandler you could automatically switch the layout
based on the extension (in your case csv). In the layout file you
could generate the CSV content, which should be quiete easy.
--~--~-~--~~~---~--~~
You received this message because you are subscrib
You should perform a find in the Tag model, not in the news model,
like:
$taggedNews = $this->Tag->find('all', array(
'conditions' => array( 'Tag.name' => [your tag value here] ),
'recursive' => 1 ) );
Enjoy,
John
On Apr 16, 12:55 am, Cepheus wrote:
> Hey everyone,
>
> I've setup a s
How does the find call look like in your controller?
John
On Apr 16, 12:41 am, Toby wrote:
> I have a problem with an SQL call.
>
> I have the following tables, linked as shown...
>
> SizeType -> hasMany Products
> SizeType -> hasMany Sizes
> Product -> hasMany StockItems
> Size -> hasMany St
Thanks Dr. Loboto,
That may be, but not in my case, as I don't use any components
together with my installations controller, and each model, loaded by
request, does not have any conflict with CakePHP or other parts, so to
sum it up, I am happy with that :)
Enjoy,
John
On Apr 16, 5:36 am, "Dr.
Never hurts to try. See if you can get Cake setup and go through the
blog tutorial. If that makes sense then you are on the right track.
http://book.cakephp.org/view/219/Blog
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gr
Although those INSERTs won't be seen if the controller redirects after
a save. There should only be a redirect if the save is successful, so
this shouldn't (usually) be a problem.
On Wed, Apr 15, 2009 at 10:52 PM, Dr. Loboto wrote:
>
> On debug 2 all queries are printed. If you do not see there
Cronjobs are working for me, with a Shell of course.
On Apr 15, 4:54 pm, brian wrote:
> You definitely don't want to send more than a couple emails in a loop
> using the default EmailComponent. I suppose you could write a shell
> that would sleep between batches.
>
> I've been sending 3000+ emai
On debug 2 all queries are printed. If you do not see there INSERT
query there wasn't such query.
On Apr 15, 9:06 pm, Stu wrote:
> I got my problem fixed without it, but I'm still curious. My debug is
> set to ' 2 ', but how do you print the insert query as you're adding
> $this->data in the da
$this->autoRender = false should be set before return statement,
that's all.
On Apr 15, 10:09 pm, jsundquist wrote:
> Thank you all. $this->autoRender = false; is exactly what I was
> looking for. Does it have to be at the top of the function or can it
> just be anywhere in the function. I curre
You cannot avoid escape URL when using helper (link() or url()
methods). Output such links as plain HTML.
Attribute 'escape' is for link title only.
On Apr 15, 6:57 pm, Henrik Gemal wrote:
> I'm using the MailtoHelper to encode a mailto address to avoid
> spammers.
>
> the code is something like
There can be also conflict between models and components names (not
classnames).
On Apr 16, 1:45 am, John Andersen wrote:
> Thanks Dardo and Teh, but it turned out to be a conflict between all
> my models, when I loaded them all in an installations controller :)
> Solved by loading the models on
I am a new PHP Developer. I have read at least 2 books on PHP. I have
mostly PHP down only in theory. I now want to develop a data based
driven website in PHP. Here is my dilema. Should I learn a framework
for possibly better structure and or presentation or should I just go
ahead and start coding
$content_for_layout is essentially everything in your view, after PHP
has parsed it. I think what you probably want is to use
$this->element().
On Wed, Apr 15, 2009 at 7:24 PM, Dave Maharaj :: WidePixels.com
wrote:
>
> So if I had in default.ctp and then in
> the actual ctp for action say posts
So if I had in default.ctp and then in
the actual ctp for action say posts/view I could inside the view.ctp have 2
variables
and for each side of the columns and define what
would show up there by defining it in the controller view () action?
Thanks,
Dave
-Original Message-
From: dr
Hey everyone,
I've setup a simple news page and I'm trying to add tags to my news
posts. I've read a couple of tutorials on it and I've got the HABTM
relationship working.
My problem is that I'm not sure how to correctly query for news items
that belong to a specific tag. I'm currently doing some
Of course you can. $content_for_layout is nothing but a regular view
variable, like the ones you set in your controller with $this->set().
On Apr 15, 10:43 pm, "Dave Maharaj :: WidePixels.com"
wrote:
> Can you take 1 template (default.ctp) and define sections within it?
>
> I have a 2 col layout
Hi All,
I'm setting up Auth and ACL on a site, to manage access to the admin area,
and I'm just looking for clarification. I've been looking at the "Simple Acl
controlled Application" in the example applications section of the manual,
and also the "Access Control Lists" bit (under Core Componen
thanks, it was really helpful ...
On Apr 15, 10:51 am, yodi wrote:
> In my ways using ACL, i'm create 2 function in Controller, example :
> function usersWrite() and function adminWrite(). Then we can set :
>
> $this->Auth->mapActions(array('usersWrite'=>'read'));
>
> if($this->Acl->check($this-
I have a problem with an SQL call.
I have the following tables, linked as shown...
SizeType -> hasMany Products
SizeType -> hasMany Sizes
Product -> hasMany StockItems
Size -> hasMany StockItems
When my controller attempts to fetch all the StockItems for a given
product the SQL it generates doe
Just set your layout to 'ajax', i.e. in your controller/view:
$this->layout = 'ajax';
On Apr 15, 10:15 pm, Paco Gomez wrote:
> Hello,
>
> I'm developing a register user form where I have the typical checkbox
> with an agreement text. This is a link to the agreement conditions.
>
> How Could I d
Can you take 1 template (default.ctp) and define sections within it?
I have a 2 col layout and would like to define what modules to load
depending on the page a user is on / if logged in / by group
How can this be done if all i have is
Thinking of Joomla where you can set what modules for ea
Hello,
I'm developing a register user form where I have the typical checkbox
with an agreement text. This is a link to the agreement conditions.
How Could I do for opening a page without the content from
default.ctp?
Thank you very much
--~--~-~--~~~---~--~~
You
Try adding 'escape' => false into the link() options argument.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this g
Yes thats how you would do it.
Router::connect('/user/:slug/resume/*',
array('controller' => 'profile', 'action' => 'resume'),
array('pass' => array('slug'), 'slug' => '[a-zA-Z0-9_-]+')
);
And your html link would be:
$html->link('user', array('controller' => 'profile', 'action'
You definitely don't want to send more than a couple emails in a loop
using the default EmailComponent. I suppose you could write a shell
that would sleep between batches.
I've been sending 3000+ emails using SwiftMailer[1]. There's a
SwiftMailerComponent at the Bakery (I had to modify it quite a
Its best to use the shell/console, and do it from the command line.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from t
I'm about to use the EmailComponent to do some very small-scale "mass"
mailing (65 at the moment). However, I am still curious how some of
you have implemented your usage of the EmailComponent when sending out
massive amounts of emails to your lists, or perhaps all users of a
very busy site.
Are
it throws a cakeError which renders and exits so the return value is
always null.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsu
Hi guys. Ive'd implemented a captcha with my login but im having a
difficult problem with it. Sometimes i can make the image show and
suddenly ony the alt shows.. Please help
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
Out of lack of time and some frustration I've come to the same stall.
We had a similar situation to yours about three weeks back. We fiddled
a lot and tried to work around the limitations given by Cake and PHP.
I say and PHP because classes are inherently closed in PHP vs. Ruby
where a plugin can
Thanks Dardo and Teh, but it turned out to be a conflict between all
my models, when I loaded them all in an installations controller :)
Solved by loading the models only by request (ClassRegistry).
Enjoy,
John
On Apr 15, 5:14 pm, Teh Treag wrote:
> In addition to the classes -http://api.cake
the next and prev functions from paginator require an "Options" array
as the second argument as you are currently giving it a boolean. You
might want to go check out the paginator helper line 189 and 201.
Good luck,
Stu
--~--~-~--~~~---~--~~
You received this mes
In your /app/config/bootstrap.php file, before the ending ?> (if the
file contains one), use the following PHP code:
date_default_timezone_set('America/New_York');
You can find your OWN area's timezone by checking the examples from
http://php.net/timezones - just switch the string in the functio
I was wondering how would i go about a url like this
site/user/{slug}/resume
i have the routing setup so its actually site/user/profile/{slug}
Just not sure how i would go about setting up the controller action. would
it be as normal
function resume ($slug)
{
}
And then the rest contro
It's slightly broken... I mistyped this...
The isset()s should be negated too... now it's corrected...
var $dontUseModels = Array(
'method1' => true,
'method2' => true,
...
);
function constructClasses() {
if(!isset
I'll give that a shot...not very knowledgeable on JavaScript.
Thanks for the help!
Chris
On Apr 14, 3:21 pm, Miles J wrote:
> When your calling datepicker(), shouldnt it be on ready when the page
> loads?
--~--~-~--~~~---~--~~
You received this message because y
link(
$html->image('cake.power.gif',
array('alt'=> __("CakePHP: the
rapid development php framework", true), 'border'=>"0")),
'http://www.cakephp.org/',
Hi all,
Consider a big Cake application which could be divided into a small
core and many plugins providing extended funcionality. Pretty much as
Wordpress is built: tiny, efficent core, and pluggable extensions
connected by hooks. The same applies to MediaWiki, to cite just
another wide known ex
Hello all,
I have a client that wants to be able to export any results he sees on
screen to a csv file. This will be used for different models and will
need to work on large queries. I was wondering if anyone would be
willing to share their thoughts on the best 'cake' way to do this. I'm
asking f
My sites are hosted at http://sensson.net/
On Apr 15, 4:15 pm, Jon Bennett wrote:
> I use SliceHost
>
> https://manage.slicehost.com/customers/new?referrer=72080a7f7a6ddeeda...
>
> Cheers,
>
> Jon
>
> 2009/4/15 Jonathon Musters :
>
>
>
>
>
> > I use wet-host.com
>
> > smaller more personal servi
Hi Teh :)
Thank you for the suggestion and the example! Very cool like Arvind ;)
Well, by the way, I have chose to use ajax because the problem is that the
object that
can placed in the cart can be inserted manually by the user.
This cart is for a technician that fill a report where he insert th
You can leave out the ".js" part, also:
echo $javascript->link('jquery-1.3.2.min'');
On Wed, Apr 15, 2009 at 12:06 AM, d1ve blu3 wrote:
> Thank you very much..
>
> I'm confused with all the examples..
>
> It worked now..
>
> On Wed, Apr 15, 2009 at 11:00 AM, Miles J wrote:
>>
>> Its $javascrip
You have to return false if you want the submission to be cancelled.
I'm confused about you setting window.location -- are you trying to
have the form submit somewhere else? You need to change the form's
action for that.
On Wed, Apr 15, 2009 at 7:15 AM, Arvin wrote:
>
> Hi, I've been using cake
In the cake/libs/model/model.php in the function setDataSource(), it
would appear that there is not always a return value.
According to the last if statement in that function, the function will
only return a value if $db is empty, null, or is not an object. This
last if statement isn't always gu
Why would you want to? That doesn't belong in an img tag. What HTML
are you looking to end up with? Do you mean you want to add that to a
link HREF?
On Wed, Apr 15, 2009 at 4:58 AM, aryan wrote:
>
> How do put target="_blank" in the following code?
>
> image('image.gif', array('alt' => 'image',
Thank you all. $this->autoRender = false; is exactly what I was
looking for. Does it have to be at the top of the function or can it
just be anywhere in the function. I currently have it at the bottom
and I haven't noticed any problems as of yet. So does this mean I can
possible expect some in the
On Wed, Apr 15, 2009 at 12:18 AM, Rufus wrote:
>
> This is true I hope, I am using prepared statements with mysqli so
> they should be getting cached as far as I can tell from the
> documentation.
No, the idea is that you should implement a cache for these images so
that your app needn't go to t
hey people
thanks for dat inspirational help... will update u with its
progress... cheers
u made my day
On Apr 15, 2:20 pm, Martin Westin wrote:
> Thanks for the tip. That line of code has probably been around since
> early 2006 so it is a bit rough.
>
> On Apr 15, 10:54 am, "Dr. Loboto" wrot
Emacs too! ;)
Franco Tampieri Details: - Linux User #286282 - FSF Member #5827
GNU/Linux: Hardened / Embedded / H.A. Cluster / System Integrator
Certification: ECDL / LPIC 1 - Acquiring Certification: Cisco CCNA / LPIC 2
Sent from Bologna, Emilia Romagna, Italia
2009/4/15 jcorrea
>
> VIM :)
>
I have a problem using paginator with filter, using cake version :
1.2.2.8120.
this is my controller. It shows only elements that have a particular
value for $attivo (i.e.1 or 0):
Assyst->recursive = 0;
$this->set('assysts', $this->paginate('Assys
In addition to the classes - http://api.cakephp.org/classes, there are
also the global constants and functions -
http://book.cakephp.org/view/120/Global-Constants-and-Functions
-teh
On Apr 15, 5:22 am, John Andersen wrote:
> Hi all,
>
> Is there reserved words in CakePHP, which I can't use when
I use SliceHost
https://manage.slicehost.com/customers/new?referrer=72080a7f7a6ddeeda018ddbb61e630a3
Cheers,
Jon
2009/4/15 Jonathon Musters :
>
> I use wet-host.com
>
> smaller more personal service there i found... very happy
>
>
> On Tue, Apr 14, 2009 at 5:42 PM, Miles J wrote:
>>
>> I use
How do put target="_blank" in the following code?
image('image.gif', array('alt' => 'image', 'url' =>
'http://www.google.com')); ?>
Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post t
Hello Everyone,
I am creating a log in application and done with that. Right now I am
adding a forgot password application and the reset password using the
cake PHP 1.1. I used "user" and "password" on my login application. On
the login page I put the "forgot password" textlink which redirects to
I use wet-host.com
smaller more personal service there i found... very happy
On Tue, Apr 14, 2009 at 5:42 PM, Miles J wrote:
>
> I use Dreamhost and MT.
>
> Both work well but the MT DV server took a lot of configuration to get
> cake working.
> >
>
--~--~-~--~~~--
Hi, I've been using cake for about 5 months now. I'm not really
familiar with cake's advanced features though I somehow managed to
come up with a decent Document Management System for use in a research
company.
I would like to know how I could add a javascript confirm dialog box
when submitting f
Hi all,
at first i think i should tell you i am new to cakePHP.
I went into a problem with the paginator and i think, the correct
routing.
I need to paginate two models on the same page, one with ajax, one in
the "normal" way.
So ive used this excample for me:
http://debuggable.com/posts/how-to-
Yes, $javascript->link().
You try it, I do not know what version you are
2009/4/15 Miles J
>
> Its $javascript->link(), not the $html.
> >
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post
Thank you very much..
I'm confused with all the examples..
It worked now..
On Wed, Apr 15, 2009 at 11:00 AM, Miles J wrote:
>
> Its $javascript->link(), not the $html.
> >
>
--
"One of the mankind greatest enemy is man itself"
-Gendo Ikari
--~--~-~--~~~---~--~--
Hi everyone,
I am stumbling through the blog tutorial on a LAMP server where
mod_rewrite is enabled. I am fairly certain it is enabled and
functioning properly for a few reasons:
1)the server hosts serveral drupal sites utilizing clean URLs,
therefore it must be working.
2)I copied an existin
The first step, in layout:
link('jquery-1.3.2.min.js'');
echo $javascript->link('jquery.datepick.js'');
?>
and then, in view
//TODO: js code
This should be the simplest way, there are other high-level point comparison
method. For example, one ca
I got my problem fixed without it, but I'm still curious. My debug is
set to ' 2 ', but how do you print the insert query as you're adding
$this->data in the database?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
OK, I managed to avoid this issue by sending the data to the server
using 'POST' rather than encoding it into the url and using 'GET'.
The data becomes available to the controller through the $_POST[]
array.
The following url may help if you're using ajax:
http://www.openjs.com/articles/ajax_xmlh
What kind of advanced js grid are you looking to be able to do?
Currently I am working on a project where we are using cakePHP 1.2 and
ExtJS. We are using the ExtJS datagrids with simple(single query
field) and advanced search(query field for each column). We are also
using Excel exports with the
I'm sorry to post this here but I can't seem to google why way out of
it. How do you print insert queries from the add function, I just
want to see what's going on back there.
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
VIM :)
On Apr 15, 6:21 am, Teh Treag wrote:
> I prefer emacs. Am I the only emacs user around here.
>
> On Feb 28, 3:14 pm, adam wrote:
>
>
>
> > I'm using Eclipse with PDT, but Dreamweaver for making layouts.
--~--~-~--~~~---~--~~
You received this message becau
we want to implement advanced js grid,
so before use of Ext JS or YUI!
we ask for advice which is better to use with Cakephp
On Apr 5, 11:54 pm, jmcneese wrote:
> i have done a couple projects that are extjs front-ends backed by
> cake. what exactly are you trying to do?
>
> On Apr 3, 10:35 p
Well what also works is just calling another action in the controller
at the last line ... e.g. $this->index(); etc. ... just make sure that
action is defined with a view.
Its not listed, but it works (it might also not be the cake way of
doing things)
On Apr 15, 12:45 am, "Mark (Germany)"
wrote
Hello.
i can't connect to SQL Server using CakePHP.
i get the following errors:
Warning (2): mssql_connect() [function.mssql-connect]: Unable to
connect: SQL Server is unavailable or does not exist. Specified SQL
server not found. (severity 9)
Warning (2): mssql_connect() [function.mssql-conn
> Is there reserved words in CakePHP, which I can't use when naming my
> models?
http://api.cakephp.org/classes
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to c
I'm using the MailtoHelper to encode a mailto address to avoid
spammers.
the code is something like:
$mail = $html->link($m, $mailto->encode($m));
the problem is now that the mailto address is already encoded so I
dont want html->link to reencode (html entities) since this messes up
my mailto ad
Hello Friends,
I am keyur vaghani and working on cakephp1.2 and want to make
integration with Flash or Flex using cpamf plugin.
here i am facing error while calling remote gateway servise from
location like
http://localhost/cpamf_demo/cpamf/browser/
[RPC Fault faultString="Send failed"
faultC
Franco,
I've noticed a few people having issues updating form elements using
Ajax and CakePHP recently in #cakephp. Although, this does not address
your problem directly, it may be useful to others attempting to update
a form filed using Ajax.
http://v2.cybergod.net/article/show/u/ajax_input_upd
Hi,
I'm getting a very similar problem.
I think it's something to do with the rewrite engine on the server,
not cake.
If you use the following urls you get a different response.
http://overheard.it/people/%2525
http://cheesecake-photoblog.org/demo/view/%2525
My theory is that the url is decod
Hi all,
Is there reserved words in CakePHP, which I can't use when naming my
models?
For example "collection" and "tag".
Enjoy,
John, Latvia
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To po
I prefer emacs. Am I the only emacs user around here.
On Feb 28, 3:14 pm, adam wrote:
> I'm using Eclipse with PDT, but Dreamweaver for making layouts.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group
Thanks for the tip. That line of code has probably been around since
early 2006 so it is a bit rough.
On Apr 15, 10:54 am, "Dr. Loboto" wrote:
> > $link = 'http://'.$_SERVER['SERVER_NAME'].'/'.$this->params
> > ['controller'].'/activate/'.$ticket;
>
> Standard way for absolute URLs:
> $link = Ro
Php is configurated to use memcache to save session.
However even if I set
Configure::write('Session.save', 'cache');
The problem is the same.
Exactly the situation is as follows
I start a session inside a action/controller and inside this action/
controller I can read the session(all works
> $link = 'http://'.$_SERVER['SERVER_NAME'].'/'.$this->params
> ['controller'].'/activate/'.$ticket;
Standard way for absolute URLs:
$link = Router::url('/users/activate/'.$ticket, true);
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Your keyword for google is "Trailing Slash Problem"
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
http://httpd.apache.org/docs/2.0/mod/mod_dir.html
On Apr 15, 6:26 am, Beedge wrote:
> I have uploaded cake to a testing folder on my domain hbit.ie to play
> around with it and see what I
I dont see how memcache has anything to do with this, when the session
save is set to php.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.co
pspad
On Mar 2, 7:35 am, Samuel DeVore wrote:
> a tutu and go go boots
>
> On Sun, Mar 1, 2009 at 12:34 PM, Tomás Laureano Peralta Tormey
>
> wrote:
> > Currently using NetBeans 6.5. The hints from this bakery article [1] were
> > really useful.
> > Hopefully, better support for CakePHP could
In my ways using ACL, i'm create 2 function in Controller, example :
function usersWrite() and function adminWrite(). Then we can set :
$this->Auth->mapActions(array('usersWrite'=>'read'));
if($this->Acl->check($this->Auth->user('username'),'Users','*')){
$this->Auth->mapActions(array('
Hi,
I wonder where I could find detailed information on how data[index] is
computed on HTML form for the cases of various relation in the model.
What I mean by data[index] is for example data[name] for a Person when
a person creation form is submited, you can see that also on the HTTP
post.
Sorry but nobody has ever had a problem like this.
On Apr 14, 3:12 pm, "marco.rizze...@gmail.com"
wrote:
> Hi
> I try to use memcache for save sessions in a CakePHP application.
> I install memcache,all works fine also the php sessions.
> Now in my CakePHP application I set in core.php this:
>
>
88 matches
Mail list logo