127 - Create a Joomla! v 1.5 Content Plugin to embed Scribd Documents

Google's Highly Open Participation Program tries to get young students into Open Source and Joomla! specifically. Everyone is welcome, there are not limits. You can be a coder, documenter, tester, translator to help out. Jump in and start helping!
User avatar
SanderKromwijk
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Thu Dec 13, 2007 2:59 pm

127 - Create a Joomla! v 1.5 Content Plugin to embed Scribd Documents

Postby SanderKromwijk » Thu Dec 13, 2007 3:08 pm

Hello!

I claimed this task.

About me:
I am a student in Switzerland(Europe). I am on a public high school. I am new to Joomla though, so I'm reading a few tutorials. I just wanted to ask one question: How should the scribd documents be embedded (in an article or somewhere else)?


Claimed: 12/13/2007 Due: 12/27/2007
Google Task

[me=AmyStephen]Added links and due dates[/me]
[me=jlleblanc]Marked task as completed[/me]
Last edited by jlleblanc on Mon Dec 17, 2007 1:25 am, edited 1 time in total.
Simple and elegant messaging. Download the Messaging extension for Joomla! See http://extensions.joomla.org/extensions/4026/details

User avatar
jlleblanc
Joomla! Guru
Joomla! Guru
Posts: 963
Joined: Fri Aug 19, 2005 12:37 am
Location: Washington, DC / NoVA
Contact:

Re: 127 - Create a Joomla! v 1.5 Content Plugin to embed Scribd Documents

Postby jlleblanc » Thu Dec 13, 2007 3:30 pm

Welcome to the contest! Yes, the plugin should allow the user to embed the Scribd document directly in an article or module without having to use the raw code. You'll need to decide on some sort of token to look for and replace with the embed code. I've built a lot of plugins like this, so feel free to contact me if you run into any issues.
Joseph L. LeBlanc: http://www.jlleblanc.com
Frontend components start here: /components/com_[name]/[name].php
Backend components start here: /administrator/components/com_[name]/admin.[name].php

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: 127 - Create a Joomla! v 1.5 Content Plugin to embed Scribd Documents

Postby AmyStephen » Thu Dec 13, 2007 3:32 pm

Use the core loadmodule plugin as a guide.

Also, there are a number of other contestants working on plugins. You could review their extensions, too, for ideas.

Joe is a great resource, so be certain to take advantage of his offer. It is helpful to keep the discussions in the thread for the benefit of other learners.

Thanks!
Amy :)

User avatar
SanderKromwijk
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Thu Dec 13, 2007 2:59 pm

Re: 127 - Create a Joomla! v 1.5 Content Plugin to embed Scribd Documents

Postby SanderKromwijk » Fri Dec 14, 2007 1:14 pm

Hi

Thanks for offering help! I finished the first version of the plugin, but it is not finished yet. At the moment you can insert a scribd document by putting in the following code:
{scribd}h3v3m7tzvgzl{/scribd}
the "h3v3m7tzvgz" is the guid. The problem is that the guid is relatively hard to find, so I want to improve that.

By the way, it would be a great idea to document the events a little better, because it took quite some time before I found the right event.

-I uploaded the wrong file. The file wich is attached now is the right one.
You do not have the required permissions to view the files attached to this post.
Last edited by SanderKromwijk on Fri Dec 14, 2007 1:40 pm, edited 1 time in total.
Simple and elegant messaging. Download the Messaging extension for Joomla! See http://extensions.joomla.org/extensions/4026/details

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: 127 - Create a Joomla! v 1.5 Content Plugin to embed Scribd Documents

Postby AmyStephen » Fri Dec 14, 2007 3:55 pm

Fabulous!
SanderKromwijk wrote:By the way, it would be a great idea to document the events a little better, because it took quite some time before I found the right event.


It would! Looking for some extra credit?  :) <-- Note: that was *not* a wink.

Feedback:

1. plg_ instead of com_ for a plugin (com is for component);

2. This is not necessary.

Code: Select all

      <param name="enabled" type="radio" default="1" label="ENABLE" description="ENABLE">
         <option value="0">No</option>
         <option value="1">Yes</option>
      </param>


3. The installer gives error messages for the missing language files (which you likely know.)

4. Other than that, the install and un-install work great.

5. Regarding the difficulty of locating the guid - provided you include a description in your plugin of how one might do that, I see no problem with it.

6. None of the bottom links work.

7. Consider adding a "view fullscreen" link.

Fullscreen


Button --> http://www.scribd.com/images/fullscreen.gif

Nicely done. I realize all of my feedback might seem negative. The truth is, the image loads perfectly and this would be "acceptable", as is. You are doing great work!

Thanks for your contributions to the Joomla! community!
Amy :)

User avatar
jlleblanc
Joomla! Guru
Joomla! Guru
Posts: 963
Joined: Fri Aug 19, 2005 12:37 am
Location: Washington, DC / NoVA
Contact:

Re: 127 - Create a Joomla! v 1.5 Content Plugin to embed Scribd Documents

Postby jlleblanc » Fri Dec 14, 2007 4:20 pm

I like it, I like it  ;D

As far as the GUID goes, yeah, that's just the way these things go. Hopefully, Scribd will someday have a little box saying "here's the ID if you have software that auto embeds."

Another "extra credit" thing you could add would be a way of specifying the width and height in the code to override the plugin parameters. Using something like {scribd 600x800}guidgoeshere{/scribd} would override while {scribd}guidgoeshere{/scribd} would use the default.

Looking good!
Joseph L. LeBlanc: http://www.jlleblanc.com
Frontend components start here: /components/com_[name]/[name].php
Backend components start here: /administrator/components/com_[name]/admin.[name].php

User avatar
SanderKromwijk
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Thu Dec 13, 2007 2:59 pm

Re: 127 - Create a Joomla! v 1.5 Content Plugin to embed Scribd Documents

Postby SanderKromwijk » Fri Dec 14, 2007 4:27 pm

Ok, i'll correct those few bugs and work on the improvements.
Simple and elegant messaging. Download the Messaging extension for Joomla! See http://extensions.joomla.org/extensions/4026/details

User avatar
SanderKromwijk
Joomla! Intern
Joomla! Intern
Posts: 68
Joined: Thu Dec 13, 2007 2:59 pm

Re: 127 - Create a Joomla! v 1.5 Content Plugin to embed Scribd Documents

Postby SanderKromwijk » Fri Dec 14, 2007 7:00 pm

Hi,

This is the new version with the improvements. It is now also possible to specify the size with the following syntax:
{scribd 800x600}guid{/scribd}
where 800x600 is the size.
It is not necessary to specify the size though, then it just sets the size to the default size. I also added a "View Fullscreen" button. I didn't manage (yet) to get the links working, but I hid them so it shouldn't be to much of a problem. I couldn't correct the install problem because the plugin installs on my computer without a problem. I'm starting to write the documentation now, but in which format should it be? In html, odt or pdf?

Sander
You do not have the required permissions to view the files attached to this post.
Simple and elegant messaging. Download the Messaging extension for Joomla! See http://extensions.joomla.org/extensions/4026/details

AmyStephen
Joomla! Champion
Joomla! Champion
Posts: 7056
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: 127 - Create a Joomla! v 1.5 Content Plugin to embed Scribd Documents

Postby AmyStephen » Fri Dec 14, 2007 8:16 pm

Maybe Joe knows how to fix? #3 comment errors from install -
        * JInstaller::install: The language file 'nl_NL.plg_content_scribd.ini' could not be installed because the Administrator language package for 'nl-NL' has not been installed or does not exist.
        * JInstaller::install: The language file 'fr_FR.plg_content_scribd.ini' could not be installed because the Administrator language package for 'fr-FR' has not been installed or does not exist.
        * JInstaller::install: The language file 'de_DE.plg_content_scribd.ini' could not be installed because the Administrator language package for 'de-DE' has not been installed or does not exist.



How about div statements  8), instead of tables?  :P

//make html for the scribd document
$html = '';
$html .= '
';
$html .= '';
$html .= '';
$html .= '';
$html .= '';
$html .= '';
$html .= '';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '';
$html .= '';
$html .= 'Fullscreen';
$html .= '
';
$html .= '
';
$html .= '
';


Make certain you get the instructions into the description nad figure the language issue figured out and I think you're ready to go.

Amy :)