Best way to automatically publish Twitter updates based on add()

2008-10-20 Thread Daehee

So I found this cool Twitter Component in the bakery:
http://bakery.cakephp.org/articles/view/twitter-component

I'd like to use it to publish status updates in Twitter every time
someone accesses a particular add() function. Is there a performance-
optimizing technique so that it cuts down on load time for the user,
such as using afterfilter() in the controller?

Daehee
--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Pagination link URL doesn't work with extra variable

2008-10-19 Thread Daehee Park
Nice, now the links actually are clickable and route to the correct
pagination view. But the link still looks like this:

http://localhost/test/newyorkcity/spots/newyorkcity/page:2

So using the options() in the paginationhelper is passing it twice to the
controller? If I *don't* use the options, however, the location is only
passed once through the url formatting but the links are no longer
clickable.

For reference, here are my changes as suggested by Mathew:

options(array('url' => array('location' =>
$this->params['location']))); ?>

Router::connect('/:location/spots/*', array('controller' => 'spots',
'action' => 'index'), array('pass' => array('location'), 'location' =>
'[a-z]+'));


On Sun, Oct 19, 2008 at 8:48 AM, Mathew <[EMAIL PROTECTED]> wrote:

>
> > Router::connect('/:location/spots/:page', array('controller' =>
> > 'spots', 'action' => 'index'), array('pass' => array('location'),
> > 'location' => '[a-z]+'));
>
> Your router should be like this.
>
> Router::connect('/:location/spots/*, array('controller' =>'spots',
> 'action' => 'index'), array('pass' => array('location'),'location' =>
> '[a-z]+'));
>
> You also need to add the location as an option for pagination in your
> view. So that it includes it when creating the URLs.
>
> $paginator->options(array('url' =>array('location'=>$this-
> >params['location])));
>
> If you don't have the location added as an option, then the Router
> will not match it to your URL pattern, and you need to have the wild
> character at the end of your connect URL, because pagination generates
> many types of parameters. Such as page, sorting, and field.
>
> >
>

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Pagination link URL doesn't work with extra variable

2008-10-18 Thread Daehee

After many hours of frustration, I am finally posting here for some
help.

I have the default pagination links on an index page like this which
are passing all params variables:


prev('<< '.__('previous', true), array(),
null, array('class'=>'disabled'));?> | numbers();?> next(__('next', true).' >>',
array(), null, array('class'=>'disabled'));?>


However, the links produced are the following:

http://localhost/test/spots/index/newyorkcity/page:2

The correct url should look like this:

http://localhost/test/newyorkcity/spots/2

After setting up the router like the following, the above "real" url
is accessible:

Router::connect('/:location/spots/:page', array('controller' =>
'spots', 'action' => 'index'), array('pass' => array('location'),
'location' => '[a-z]+'));

Does anyone have any tips on how to proceed with this to fix the
pagination link?

Thanks!

Daehee
--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Any one Familiar with XML/SWF charts usage in Cakephp

2008-10-16 Thread Daehee Park
Thanks everyone for your replies. It's working!

After considering the advice, I also used the tutorials here:

http://www.littlehart.net/atthekeyboard/2007/03/13/how-easy-are-web-services-in-cakephp-12-really-easy/
http://bakery.cakephp.org/articles/view/automatically-generate-dynamic-sitemaps

Then one thing I was stuck on was not modifying enough of the variables in
XML/SWF. I thought it was just xml_source but I was suffering from tunnel
vision and forgot about movie, src, and library_path. I pointed xml_source
to a charts.xml routing configured by parseExtensions in the Router file.

On Thu, Oct 16, 2008 at 5:00 PM, Sam Sherlock <[EMAIL PROTECTED]>wrote:

> Theres more than one way to do it - the old perl adage :)
>
> I was using
> http://www.amcharts.com/
>
> beofre that I tried jquery flot - but urgh not a lot of joy with that
>
> 2008/10/16 BrendonKoz <[EMAIL PROTECTED]>
>
>
>> I hate when people do exactly what I'm going to do, but I wouldn't
>> post if I didn't think it really was helpful (that is, suggest
>> something completely different).
>>
>> Unless you are using the paid-for version of that charting script (XML/
>> SWF), it may be easier to get "Open Flash Chart" (http://
>> teethgrinder.co.uk/open-flash-chart/) working with CakePHP a little
>> easier.  Obviously each project has different visual requirements, and
>> these applications do have differing features, but I found it very
>> easy to get it working with CakePHP.  There's even a few helpers and
>> behaviors for use with it in the bakery (if you'd be using it the same
>> way -- I was not).
>>
>> Just a thought.  :)  Good luck either way.
>>
>> On Sep 4, 3:06 am, vibhor <[EMAIL PROTECTED]> wrote:
>> > Hello all,
>> >
>> > I am looking to integrate the XML/SWF charts(
>> http://www.maani.us/xml_charts/
>> > ) feature in my cakephp application. I have read Chris Hartjes's
>> > tutorial (
>> http://www.littlehart.net/atthekeyboard/2006/09/26/tutorial-integrati...
>> > ) but he is using the PHP/SWF implementation.(thanks Chris for
>> > excellent tutorial! ).
>> >
>> > I just want to know which files of the charts go where in the cakephp
>> > application folder structure.
>> > I think once this is sorted out we can post this in the bakery for
>> > other bakers who can use this wonderful stuff in their application..
>> >
>> > Can someone please help me in this?
>> >
>> > Thanks,
>> > Vibhor
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Any one Familiar with XML/SWF charts usage in Cakephp

2008-10-16 Thread Daehee

My issue is.. I have the controller and views working to properly
output xml data at a particular URL using routing. However, XML/SWF
needs a physical file location for the xml_source being passed through
FlashVars. How to go about doing this?

On Oct 16, 10:08 am, Daehee <[EMAIL PROTECTED]> wrote:
> I have the same question. Did you figure this out?
>
> On Sep 4, 3:06 am, vibhor <[EMAIL PROTECTED]> wrote:
>
> > Hello all,
>
> > I am looking to integrate the XML/SWF charts(http://www.maani.us/xml_charts/
> > ) feature in my cakephp application. I have read Chris Hartjes's
> > tutorial 
> > (http://www.littlehart.net/atthekeyboard/2006/09/26/tutorial-integrati...
> > ) but he is using the PHP/SWF implementation.(thanks Chris for
> > excellent tutorial! ).
>
> > I just want to know which files of the charts go where in the cakephp
> > application folder structure.
> > I think once this is sorted out we can post this in the bakery for
> > other bakers who can use this wonderful stuff in their application..
>
> > Can someone please help me in this?
>
> > Thanks,
> > Vibhor
--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Any one Familiar with XML/SWF charts usage in Cakephp

2008-10-16 Thread Daehee

I have the same question. Did you figure this out?

On Sep 4, 3:06 am, vibhor <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I am looking to integrate the XML/SWF charts(http://www.maani.us/xml_charts/
> ) feature in my cakephp application. I have read Chris Hartjes's
> tutorial 
> (http://www.littlehart.net/atthekeyboard/2006/09/26/tutorial-integrati...
> ) but he is using the PHP/SWF implementation.(thanks Chris for
> excellent tutorial! ).
>
> I just want to know which files of the charts go where in the cakephp
> application folder structure.
> I think once this is sorted out we can post this in the bakery for
> other bakers who can use this wonderful stuff in their application..
>
> Can someone please help me in this?
>
> Thanks,
> Vibhor
--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: SQL WHERE statement working with "created" field

2008-10-15 Thread Daehee Park
Perfect, thanks so much!


On Wed, Oct 15, 2008 at 3:54 PM, Chez17 <[EMAIL PROTECTED]> wrote:

>
> I'm no expert but I think I maybe able to help. So lets assume you
> have a php variable $lastWeek that has the date you want (7 days ago).
> You create a find statement like this:
>
> $result = $this->YourController->find('all', array('conditions' =>
> array('Table.created >' => "$lastWeek")));
>
> Make sure Table is the name of the table you want. You put the ">" or
> what ever operator you want inside the quotes of the table name. I
> think that should do it.
>
> On Oct 15, 2:36 pm, Daehee <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > So I have a table with the "created" field. I am using query() in my
> > model to select rows from this table, and I would like to create a SQL
> > statement to only select up to 7 days previous of today. Please help
> > with this the WHERE portion of this SQL statement... Thanks!
> >
> > Daehee
> >
>

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



SQL WHERE statement working with "created" field

2008-10-15 Thread Daehee

Hi,

So I have a table with the "created" field. I am using query() in my
model to select rows from this table, and I would like to create a SQL
statement to only select up to 7 days previous of today. Please help
with this the WHERE portion of this SQL statement... Thanks!

Daehee

--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---