The Joomla! Forum ™






Post new topic Reply to topic  [ 64 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Sat Dec 08, 2007 8:34 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
Hello, my name is John and I've just claimed this task:

http://code.google.com/p/google-highly- ... ail?id=138

I've been working with PHP for a little over a year (I think), and I've been working with JavaScript for around 2 1/2 years.  I haven't started working on this yet, so any suggestions or comments about how I should go about this are greatly appreciated.

I look forward to working with everyone here on many tasks.

Thanks! :)


Quote:
Create a Joomla! v 1.5 Slideshare Module
Describe the task.

SlideShare is a very popular social networking environment for sharing
presentations on the web.

Create a Joomla! module to:

  # Retrieve slideshows by User, Tag or Group;
  # Display a list of matching slideshows;
  # Display a slideshow selected from the list.

Resources:

    * Slideshare

  # Home - http://www.slideshare.net/
  # API - http://www.slideshare.net/developers
  # Developer Documentation -
http://www.slideshare.net/developers/documentation

    * Examples

  # Chris Heilmann -
http://www.wait-till-i.com/2007/10/31/s ... avascript/
  # Demo - http://icant.co.uk/sandbox/slidesharesh ... reshow.php


Google Task

Claimed: Dec 8 Due: Dec 24
[me=AmyStephen]added project information.[/me]


Last edited by AmyStephen on Tue Jan 22, 2008 3:46 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Dec 10, 2007 2:00 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
I have a quick question.  I'm trying to add parameters for my module, but it doesn't seem to be working.  I added the tag to the install.xml file like in the example (http://forum.joomla.org/index.php?topic=233628), but it's not adding the parameter options when I go to my module from the Module Manager page.  Is there something else that I have to do?


Top
 Profile  
 
PostPosted: Mon Dec 10, 2007 2:10 pm 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
John -

Sorry for the late response.  Briefly - so that you are not held back - check the xml files for core modules - ex. mod_latestnews - to see how to set the parameters.

Hope that helps you get started,
Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Mon Dec 10, 2007 8:12 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
That's exactly what I need :)

Thanks!


Top
 Profile  
 
PostPosted: Mon Dec 10, 2007 8:28 pm 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
Thought that might do the trick. The beauty of the GPL - learn from the core devs!  :pop

Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Mon Dec 10, 2007 10:43 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
Ok, I think I have all the PHP done.  I'm just working on the layout and stuff now, which is where I have a small problem.  The SlideShare viewer is about 420 px wide, which is much wider than anything else on the page.  Is it alright if I use the Scriptaculous JavaScript library (Open Source under the MIT License) to kind of make a pop-up viewer?  It's easier to just show you what it does... Here it is in action.  When you click on an image, it does it's thing.


Top
 Profile  
 
PostPosted: Mon Dec 10, 2007 10:50 pm 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
Couple points:

1. 420 px is not bad. I always make certain my images, etc., are 450px. So, I don't think that is unreasonable. However, you should have control over that as you write out the script. Maybe you can make width and height a parameter in your module.

2. If you want a popup, it would make more sense to use Squeezebox, which is a Mootools Slimbox equivalent and is native in Joomla!. I would recommend the popup be optional though. (I believe Scriptaculous has conflicts with Mootools, as does JQuery).

Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Mon Dec 10, 2007 11:10 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
Uh... I think I may be a bit confused.  Where did you want this module to go?  I thought this was going to go on the left around the "Main Menu" module.


Top
 Profile  
 
PostPosted: Mon Dec 10, 2007 11:17 pm 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
You could - although that would be very cramped - and now I understand your concerns.

There is a plugin in Joomla! called Load Module.

It allows you to insert the modules for a specific module position into your article.

Code:
{loadposition userx}


That's one way I could see this used.

HTH,
Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Tue Dec 11, 2007 12:07 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
When I first skimmed through the task on the GHOP page, that's how I thought it was going to be done, put in articles.  But after reading into it, I thought you wanted it on the left, and I thought that was odd.  This makes more sense.


Top
 Profile  
 
PostPosted: Tue Dec 11, 2007 12:13 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
John -

do you think this should be a plugin, rather than module?

I wonder. I don't want you to have to do a lot of rework, but hopefully the code cany be reused IF you think it's better as a plugin.

Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Tue Dec 11, 2007 12:25 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
I'd like to try and use the Load Module plug-in, but I'm not sure how to go about doing that. 

However, if you think that it would be better suited as a plug-in, then I'll do that.


Top
 Profile  
 
PostPosted: Tue Dec 11, 2007 12:35 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
It's truly up to you.

If you create a module, it can be used within an article if you include the Load Module plugin.

To do so:

1. Make certain the Load Module plugin is enabled in the Plugin Manager.

2. Specify a unique "location" for your module by opening the module in the Module Editor. In the upper left corner, you will find a listbox called "position." You can type into that listbox, as well. So, let's say for example, you type in GHOP as the position name.

In a template, you specify where positions go - then Joomla! places output for all modules with that name positon at that exact location in a template.

3. You can also put module output into article using this syntax:

Code:
{loadposition GHOP}


Then, Joomla! places all of the output for modules with the position GHOP into that spot in your article.

Try it with any module. See what it looks like in your article.

I guess the more I think about this, the more I wonder why should it be a module? Will it ever be useful in the "normal" sense of a model - by surrounding a component. I don't think so because of it's size. It would be nice to have the thoughts of some developers on this - if someone wants to share their perspective, it would be helpful.

Give it some thought.

HTH,
Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Tue Dec 11, 2007 12:45 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
Oh, ok, I see now.

I'm going to finish this as a module, since I'm almost done with it this way.  If this doesn't work out, then I can always go back and redo it as a plug-in.


Top
 Profile  
 
PostPosted: Tue Dec 11, 2007 11:16 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
I have a rough first release done.  There are a few things that I intend on changing, but I just wanted to first get this out, to get some feedback about the layout, etc.

The things I'm going to change:

  • I'm going to take out the PHP from the top of tmpl/default.php, and put it in the helper.php file, allowing me to,
  • take all the files out of tmpl/ except index.html and default.php.
  • Change it so that the user can specify the username, type of filter, and limit in the article, instead of as paramters.
  • Actually enable filtering by something other than username (the others don't work yet).
  • There's probably something that I'm forgetting, but I have to run, so I'll post more tonight.

Thanks!


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Wed Dec 12, 2007 12:28 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
John -

It's not done, yet, but, still it's FABULOUS! and it's showing a slideshow I posted yesterday. I am very excited to have this available for the Joomla! community! It's an amazing social networking app. Thank you for taking this challenge!

Image

This isn't an easy one, is it? It's impressive what you have accomplished in short order.

Some ideas:
Pull the CSS out of default.php. Create a file, and then load it. Here's an example of that for a JS and CSS file.

Quote:
// Add Javascript
$document =& JFactory::getDocument();
$document->addScript( JURI::base() . 'plugins/content/mootoolsaccordion.js' );

// Load Accordion CSS
$document->addStyleSheet( JURI::base() . 'plugins/content/mootoolsaccordion.css', 'text/css', null, array( ' id' => 'StyleSheet' ) );

             

The JS you are building can be loaded like this example:

Quote:
$js = "window.onload = function () { ";
$js .= "    dp.SyntaxHighlighter.ClipboardSwf = '";
$js .= baseurl;
$js .= "plugins/content/clipboard.swf'; ";
$js .= "    dp.SyntaxHighlighter.HighlightAll('code'); } ";

$document->addScriptDeclaration($js);


It would be nice to get rid of that table if at all possible.

For certain, pull the style tags out of the table and get those into the CSS file.


LOVE IT!  :-*

Looking forward to the next view. You have a future in code!
Amy :)


+++

Also - Internationalization - http://forum.joomla.org/index.php/topic ... msg1102267

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Last edited by AmyStephen on Wed Dec 12, 2007 12:32 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Dec 12, 2007 2:00 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
AmyStephen wrote:


Ah yes, that was the other thing I had on my to-do list.

I'm cleaning up the default.php file now, then I'm going to add to the helper class to not just show blank boxes when a user only has one slide.

A quick question... That image that you posted, what browser was that?

Edit:  When I tried adding the external CSS style sheet, it works in IE7, but in Firefox I'm getting an error that says

Quote:
Error: The stylesheet http://localhost/joomla/modules/mod_sli ... olor=black was not loaded because its MIME type, "text/html", is not "text/css".
Source File: http://localhost/joomla/index.php?optio ... icle&id=44
Line: 0


Last edited by jgirata on Wed Dec 12, 2007 2:59 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Dec 12, 2007 3:49 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
I use FF.

I'll bet the problem is that relative path. Including "JURI::base()" when you load the CSS, it might clear up the problem.

Good work, so far! Hope you are having fun!
Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Thu Dec 13, 2007 2:08 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
I've decided that I'm going to turn this into a plug-in.  The way that I get the info from the user will be modeled off of the Odeo plug-in (Issue 131), since it's going to be generally the same thing: the user will type {SlideShare variables}.


Top
 Profile  
 
PostPosted: Thu Dec 13, 2007 2:14 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
Cool! That makes sense to me. Thanks for taking a step backward from work already accomplished in the module, in order to build a better result. That is admirable.

This is going to be a great plugin!
Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Thu Dec 13, 2007 2:35 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
The only thing (well, the first thing :P) that I'm having trouble with is having my plug-in load when the page is created.  It seems that in the Odeo plug-in, the main function that does the work is onPrepareContent().  I tried changing the name of my main function to that (as well as adding jimport('joomla.event.plugin') above my class and extends JPlugin to the class declaration (if that's what it's called), but it's still not running.  Is there something else that I need to do?

Nevermind, I figured it out. :)


Last edited by jgirata on Thu Dec 13, 2007 8:39 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Dec 13, 2007 11:25 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
I'm working on the Internationalization now, and I added the tag to the XML file, and I created the language file, but when I add JTEXT::_('USER') to my file that displays the content, it should display "User" but it displays "USER."  Is there something else that I need to do?

Attached is the latest version of my code.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Sat Dec 15, 2007 7:09 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Nov 29, 2007 4:14 pm
Posts: 104
Location: Piotrków Trybunalski, Poland
Use:
Quote:
$lang = & JFactory::getLanguage();
$lang->load('plg_frontend_myplugin', JPATH_ADMINISTRATOR);


I had this same problem ;)

_________________
Great Hacking Opportunity Project
numbers? sure! 3d 22h on forum, about 500h of work <- this is real GHOP


Last edited by depresz on Sat Dec 15, 2007 10:41 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat Dec 15, 2007 1:55 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
depresz wrote:
Use:
Quote:
$lang = & JFactory::getLanguage();
$lang->load('plg_frontend_myplugin', JPATH_ADMINISTRATOR);


I had this same problem ;)


Thank you SO much.  I've been trying to get this to work for 2 days now :)

I'm still not able to get the parameter labels and descriptions to change to their translated strings.  It still just has the capital letter.  Any idea why?


Last edited by jgirata on Sat Dec 15, 2007 2:55 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat Dec 15, 2007 3:20 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Nov 29, 2007 4:14 pm
Posts: 104
Location: Piotrków Trybunalski, Poland
If you have configuration file (file.xml), you can see for example:
Quote:
I love Open Source so much


You can just enter there a text to translate:
Quote:
I LOVE OPEN SOURCE


...and add following line to file (for example en-GB.plg_pluginname.ini); file where you were putting normal text to translating ;)
Quote:
I LOVE OPEN SOURCE=I love Open Source so much


This same case is with other text in .xml file.
Maybe you have disabled plugin if you can't see translated text. <= that was in my case.

_________________
Great Hacking Opportunity Project
numbers? sure! 3d 22h on forum, about 500h of work <- this is real GHOP


Top
 Profile  
 
PostPosted: Sat Dec 15, 2007 3:32 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
I think I've done all that...

Here's slideshare.xml

Quote:


Content - SlideShare
John Girata
1.5.0
December 2007
(C) 2007 John Girata
http://www.gnu.org/copyleft/gpl.html GNU/GPL
A module to view SlideShare presentations.

slideshare.php
slideshare/class.rss.php
slideshare/default.php
slideshare/index.html
slideshare/css.php
slideshare/javascript.js
slideshare/SSUtil.php


language/en-GB/en-GB.slideshare.ini








And here's en-GB.slideshare.ini:

Quote:
USER=User
TAG=Tag
GROUP=Group
TOTAL SLIDES=Total Slides
CURRENT SLIDE=Current Slide
FIRST BACKGROUND COLOR=First Background Color
FIRST BACKGROUND COLOR DESC=The first background color to be used behind the presentation titles in the list.  This one will be used behind the first, third, fifth, etc., presentations.
SECOND BACKGROUND COLOR=Second Background Color
SECOND BACKGROUND COLOR DESC=The second background color to be used behind the presentation titles in the list.  This one will be used behind the second, fourth, sixth, etc., presentations.
BORDER COLOR=Border Color
BORDER COLOR DESC=The border color for the presentation viewer.


The thing is, the text in the actual plug-in is translated, it's only the text used by the parameters  :-\


Top
 Profile  
 
PostPosted: Sat Dec 15, 2007 4:01 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Nov 29, 2007 4:14 pm
Posts: 104
Location: Piotrków Trybunalski, Poland
Will you share your plugin? I'll check what's wrong  ;)

_________________
Great Hacking Opportunity Project
numbers? sure! 3d 22h on forum, about 500h of work <- this is real GHOP


Top
 Profile  
 
PostPosted: Sat Dec 15, 2007 4:06 pm 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
On install, I don't think this works quite right.

The language string, as in this example, will show on install.
Quote:
I LOVE OPEN SOURCE


Inside of the plugin, it is translated correctly.

If that's the problem you are having, it's a known issue.

Thanks!
Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Sat Dec 15, 2007 4:22 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Nov 29, 2007 4:14 pm
Posts: 104
Location: Piotrków Trybunalski, Poland
When plugin is disabled and when you enter to the configuration, you won't see translated string. How to create plugin with multi-language parameters?

jgirata, sorry for interpolation  :-[

_________________
Great Hacking Opportunity Project
numbers? sure! 3d 22h on forum, about 500h of work <- this is real GHOP


Last edited by depresz on Sat Dec 15, 2007 5:19 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat Dec 15, 2007 5:11 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Dec 08, 2007 8:11 pm
Posts: 30
AmyStephen wrote:
On install, I don't think this works quite right.

The language string, as in this example, will show on install.
Quote:
I LOVE OPEN SOURCE


Inside of the plugin, it is translated correctly.

If that's the problem you are having, it's a known issue.

Thanks!
Amy :)


Yes, if I understand correctly, that is my problem :P

If it's a known issue, and there's nothing I can do, then I'll just take the English text and put it in.

Edit:  After looking through it, I don't think there's anything else I need to do.  When I was adding the comment to the top of every file, like I saw in most plug-ins, I noticed, in the @version, there was a four-digit number in the middle, and a word at the end (in pagenavigation.php it was jinx).  I was wondering what those were :-/

Since that's relatively minor, and I can add that before I upload to Joomla! Code, I'd like to submit for Final Review.


You do not have the required permissions to view the files attached to this post.


Last edited by jgirata on Sat Dec 15, 2007 6:07 pm, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 64 posts ]  Go to page 1, 2, 3  Next



Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group