Automattic / media-explorer

With Media Explorer, you can now search for tweets and videos on Twitter and YouTube directly from the Add Media screen in WordPress.
126 stars 30 forks source link

Better documentation for setup #51

Closed bendoh closed 10 years ago

bendoh commented 10 years ago

The setup for this plugin isn't very obvious out-of-the-box.

The documentation in README.md speaks of editing "mexp-creds.php" in the plugin directory, but doesn't bother to mention that the file isn't actually included by this plugin, and that it's actually a template to be filled in and copied to one of the variety of places that these filters could be configured (e.g., in the theme, in wp-config.php, sunrise.php, etc?)

Also the directions for obtaining a YouTube API key were not obvious for the Google API v3 system, since you have to turn on "YouTube Data API v3" in your developer profile to make this work.

johnbillion commented 10 years ago

Hi Ben!

The mexp-creds.php plugin is included, you can see it here. You just need to enter your API details and then activate the plugin.

I agree though that the setup instructions aren't great, but this is because the plugin was initially built for WordPress.com and Automattic are/were planning on adding it to Jetpack.

The plugin would be best served with an admin UI for fetching and entering your API details, but this isn't currently on the roadmap.

bendoh commented 10 years ago

What I meant to say was that the plugin does not actually execute the code in mexp-creds.php, but I understand that the file itself is included in the plugin folder. I know this because I put a breakpoint on the first line of PHP in that file and it was never hit, and I also don't see any reference to that file anywhere in the executable plugin code.

The documentation in README.md leads one to believe that all one needs to do in order to set up the plugin is edit the mexp-creds.php file and then just activate the plugin, which isn't actually the case: you need to copy the code in that file and place it somewhere where it will actually be executed.

I'll happily make some adjustments to the documentation to outline this and also add more useful instructions for setting up the Google v3 API.

johnbillion commented 10 years ago

mexp-creds.php is a plugin in itself (you'll note it has a plugin header of its own). It needs activating separately from Media Explorer. The reason it's a separate plugin is because some of the sites that Media Explorer has been deployed on hook into the authentication hooks differently.

bendoh commented 10 years ago

Aha, thanks for clarifying that. I see that now.

bendoh commented 10 years ago

Put in a pull request related to this ticket that expands the README.md text with more specific instructions.