Wednesday, December 31, 2014

Re: Trouble with Twitter plugin: Where to place it?

Hello there!

You will have to add the component prefixed by the plugin name. So Twitter.Twitter. The same applies to Helpers, Models, etc.

On Tuesday, 30 December 2014 21:21:47 UTC+1, acl68 wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I migrate a project from 1.3 to 2.n. I replace the old Twitter Component
with the Twitter plugin
https://github.com/mishudark/CakePHP-2.x-Twitter-Plugin

Usage: Upload to app/Plugin/Twitter


So I unzip the Plugin place it inside .../app/Plugin and rename it to
"Twitter". It pop up under plugins in my testsuite. But when I try to
add a new item in my controller I get this error

Missing Component

Error: TwitterComponent could not be found.

Error: Create the class TwitterComponent below in file:
app/Controller/Component/TwitterComponent.php

In this controller I added the Component like this:
class AddressesController extends AppController
{
    public $components = array(
        'Paginator',
        'JsonUrl',
        'MathCaptcha',
        'Twitter'
   );
......


So should the component go under
app/Controller/Component/TwitterComponent.php
or
app/Plugin/Twitter/Controller/Component/TwitterComponent.php

Or do I add it differently in my controller?

Calamity Jane
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlSjCTQACgkQbOdiIJzHNKG4SgCfb0TKh4qPLnLDS16bXneqVrqs
UEoAoL4LF4r1c2mz7Tu9yAEkB7xitj86
=crbH
-----END PGP SIGNATURE-----

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: