Page 1 of 1
131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Sat Dec 08, 2007 9:38 pm
by annerajb
creating thread per contest quideline my task create a Joomla! 1.5 plugin that will embed odeo player when the appropiate tags used.
there is no much description :S right now i am working on the regex but it is not liking me
this is what i have in mind right now.
a parameter to set the default player style
2 type of tags
{odeo
http://odeo.com/audio/1632351/view} << this one will use the default parameter
{odeo small-black
http://odeo.com/audio/1632351/view} << this one will override the default parameter
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Sat Dec 08, 2007 9:59 pm
by AmyStephen
Loadposition uses this:
Code: Select all
// expression to search for
$regex = '/{loadposition\s*.*?}/i';
Would this work?
Code: Select all
// expression to search for
$regex = '/{odeo\s*.*?}/i';
Thanks for taking this task!
Amy
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Sat Dec 08, 2007 10:10 pm
by annerajb
http://annerajb.mine.nu/joomla/index.ph ... &Itemid=60
got it wokring
now need to make it so it parses the url inputted and extracts the song id
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Sat Dec 08, 2007 11:35 pm
by annerajb
have a dilemma here.
problem:
the ode embed players(only the medium and small one) needs the file path of the mp3 this varies by song
solutions:
use curl and with a regex to parse the song url and get the mp3 location and allow the small and medium player to be use.
or only provide the large player without small and medium player.
thats the only thing i can thing of other thing will be getting the source code of the word press extension see how they did it but the blog and the file give a 404 error
if somebody have any idea please.
thanks Amy but i got one working.
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Mon Dec 10, 2007 5:26 am
by annerajb
ok got the dilema solved now i get the webpage using curl and then i use some regex to get the location of the mp3 file and output it to the song. going to upload tomorrow a version of the plugin. need to add parameters and parameters override
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Mon Dec 10, 2007 1:30 pm
by AmyStephen
Sorry we left you alone to talk to yourself! :P
But, it sounds like you figured it out. Looking forward to listening to some tunes with your plugin!
Amy
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Mon Dec 10, 2007 11:18 pm
by annerajb
ok got a version ready
.
somethings i know:
the code needs comment been the whole day fixing joomla bugs at pbf and working with the regex so excuse me.
i will have comments in next version
need to localize it not sure how to do that one i know its a ini file but not sure about what line to add to the xml file
Note: the regex got me the whole morning i know the syntax looks ugly but heres how to get it on your site
create a article with the following tags
{odeo
http://odeo.com/audio/1632351/view|} << this one uses the plugin parameter to set the layout of the plugin and size
{odeo small-grey|
http://odeo.com/audio/1632351/view} << this one uses the size and color specified
Note: the server needs to have curl if its going to use the small size or medium site if not the player wont play the song
sizes avaible:
small
medium
large
colors avaible:
black
grey
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Mon Dec 10, 2007 11:25 pm
by annerajb
forgot the file :P:P:P:P
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Sat Dec 15, 2007 8:52 pm
by annerajb
let me bump this and state that i am having problems with getting the localizations to load apart from that i am done
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Sun Dec 16, 2007 5:03 am
by AmyStephen
Sorry about that delay. :P We are swamped, as you well know, with over 100 contestants and the bug smash, etc. Thank YOU for your contributions to the bug smash. You have already made a big and positive difference for our community. It is recognized and appreciated!
For
Internationalization
Code it so it does not require the | at the end. That's tooo cryptic.
{odeo
http://odeo.com/audio/1632351/view}
I'd override the default player second. Honestly, most of your users won't do that. It will be hard enough to remember the brackets, odeo and a URL.
This doesn't work:
Code: Select all
{odeo small-grey|http://odeo.com/audio/1632351/view}
I'll try to watch closely for your next update.
Thanks,
Amy
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Sun Dec 16, 2007 2:27 pm
by annerajb
the problem is that if i remove the last | the regex will continue seaching and wont close only one bracket i am not that good at regex
so if somebody could help
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Sun Dec 16, 2007 8:28 pm
by AmyStephen
Let the end user select the default player in the plugin manager.
Use the regex to find the occurrences of the odeo plugin. (Just like the loadmodule plugin, except loadposition changed to odeo.)
You can do a string search to see if | exists. If it does - everything previous to | is your URL; everything after is your player.
Does that help?
Amy
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Sun Dec 16, 2007 8:31 pm
by annerajb
i never tough of the check for the |
thanks amy. i am on a bad mood today my hdd is not showing up and it says only solution is to format and there is where i have my joomla site
but still thanks
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Sun Dec 16, 2007 10:04 pm
by annerajb
finally fixed everything
amy or somebody else anyone have any idea why does my localization arent being loaded and wy does my debug output dosnt have a 1 at the end
see com_plugins have a 1 at the end but my file what does that mean?
# C:\Documents and Settings\Administrator\My Documents\workspace\php\joomla test\administrator\language\en-GB\en-GB.com_plugins.ini 1
# C:\Documents and Settings\Administrator\My Documents\workspace\php\joomla test\administrator\language\en-GB\en-GB.plg_content_odeo.ini
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Sun Dec 16, 2007 10:13 pm
by AmyStephen
I don't have any 1's at the end of my file, so, I'm not certain what that is. (I don't even have a en-GB.com_plugins.ini file, either.)
Here's a post on
Internationalization you might find helpful.
Glad you have things working; I *hate* system problems. :P
Amy
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Mon Dec 17, 2007 11:02 pm
by annerajb
thanks Amy Ian help me out with the localization problem
i had in the wrong path the translation. i created a Joomla forge project for this going to upload there. as always input is appreciated next is to improve on what you guys suggest and create another translation language
btw: found a small bug on my rc3 installation when you finish installing it didnt localized the description of the plugin so if somebody can take a look at it and tell me if it still a issue.
updated the tags you no loger need the | at the end just at the middle when you are specifying size and color
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Tue Dec 18, 2007 3:52 pm
by AmyStephen
Need to pull all of your CSS out into a separate file, then include it as a separate stylesheet (you'll have to have a different style per player, it appears).
style="font-size: 9px; padding-left: 35px; color: #6a99fe; letter-spacing: -1px; text-decoration: none"
Example of loading a stylesheet:
// Load Accordion CSS
$document->addStyleSheet( JURI::base() . 'plugins/content/mootoolsaccordion.css', 'text/css', null, array( ' id' => 'StyleSheet' ) );
Other than the style tags, this seems to work very good. I tested a number of default options and overrides.
I couldn't ever get this one to play {odeo medium-grey|
http://odeo.com/audio/1632351/view} but, it might have been my machine. Could you try that - and on the next version, I'll try, again, too.
Looking good!
Amy
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Tue Dec 18, 2007 3:57 pm
by annerajb
well as that is the medium sized player it has to use curl so maybe the odeo site was down and the plugin coudnt get the mp3 path or other problem on their side because i could listen to that one fine its my favorite song
but i cant test it on my linux webserver because i am preparing it for rc4 and idk how to get curl working on windows. going to take a look at the style sheet. thanks amy let me know if it dosnt work.
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Tue Dec 18, 2007 4:30 pm
by annerajb
got the next version done
added a css file and referenced the style using css classes also tested the song you told me and it works fine probably a problem with your curl extension or that odeo website was having some problems.
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Wed Dec 19, 2007 6:50 am
by AmyStephen
annerajb -
Fantastic work! Very very good! That is a fun extension and it will be used.
I'll call for another judge to review and we will get this finalized ASAP!
Thank you for your contributions to the Joomla! community - MUCH appreciated!
Amy
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Wed Dec 19, 2007 12:54 pm
by annerajb
you welcome i opened a joomla forge repository but havent been able to upload the initial commit its giving me a error
so if you know somebody that could help me out on that it would be much appreciated.
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Wed Dec 19, 2007 8:38 pm
by AmyStephen
Are you still having trouble? Sometimes the Forge does have problems, but if you try later everything works.
Also, upload it to your Google Task so we can close it - and then, if you want, you could choose another.
Let me know if you are still having trouble.
Thanks again!
Amy
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Wed Dec 19, 2007 9:39 pm
by annerajb
submitted to google also the svn is giving me a 501 invalid method message something about PUT not sure what i am doing wrong
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Sun Dec 23, 2007 5:15 pm
by AmyStephen
annerajb -
I believe you and Ian have been working together? Do you still have problems with your JoomlaCode upload?
Thanks,
Amy
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Posted: Sun Dec 23, 2007 5:51 pm
by annerajb
yes i am but have no idea why it says something about PUT so i quess its having a problem with allowing me to upload to the server.
Adding: Documents and Settings\Administrator\Desktop\plgOdeo\odeo.xml
Sending content: Documents and Settings\Administrator\Desktop\plgOdeo\odeo.xml
Error: Commit failed (details follow):
Error: PUT of '/svn/odeo-plugin/!svn/wrk/7328249d-0483-a64b-bbe8-00c72ea8254e/odeo.xml': 501 Method Not Implemented (
http://joomlacode.org)