131 - Create a Joomla! v 1.5 Plugin for Odeo
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
131 - Create a Joomla! v 1.5 Plugin for Odeo
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
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
Last edited by AmyStephen on Thu Dec 20, 2007 12:02 am, edited 1 time in total.
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
Loadposition uses this:
Would this work?
Thanks for taking this task!
Amy
Code: Select all
// expression to search for
$regex = '/{loadposition\s*.*?}/i';
Code: Select all
// expression to search for
$regex = '/{odeo\s*.*?}/i';
Amy
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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
got it wokring now need to make it so it parses the url inputted and extracts the song id
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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.
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.
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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
But, it sounds like you figured it out. Looking forward to listening to some tunes with your plugin!
Amy
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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
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
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
forgot the file :P:P:P:P
You do not have the required permissions to view the files attached to this post.
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
let me bump this and state that i am having problems with getting the localizations to load apart from that i am done
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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:
I'll try to watch closely for your next update.
Thanks,
Amy
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}
Thanks,
Amy
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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
Use the regex to find the occurrences of the odeo plugin. (Just like the loadmodule plugin, except loadposition changed to odeo.)
Code: Select all
$regex = '/{odeo\s*.*?}/i';
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
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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
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
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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
Here's a post on Internationalization you might find helpful.
Glad you have things working; I *hate* system problems. :P
Amy
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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
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
You do not have the required permissions to view the files attached to this post.
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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).
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
Example of loading a stylesheet:style="font-size: 9px; padding-left: 35px; color: #6a99fe; letter-spacing: -1px; text-decoration: none"
Other than the style tags, this seems to work very good. I tested a number of default options and overrides.// Load Accordion CSS
$document->addStyleSheet( JURI::base() . 'plugins/content/mootoolsaccordion.css', 'text/css', null, array( ' id' => 'StyleSheet' ) );
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
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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.
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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.
You do not have the required permissions to view the files attached to this post.
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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
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
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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.
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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
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
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
submitted to google also the svn is giving me a 501 invalid method message something about PUT not sure what i am doing wrong
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
annerajb -
I believe you and Ian have been working together? Do you still have problems with your JoomlaCode upload?
Thanks,
Amy
I believe you and Ian have been working together? Do you still have problems with your JoomlaCode upload?
Thanks,
Amy
-
- Joomla! Intern
- Posts: 62
- Joined: Tue Sep 04, 2007 8:59 pm
Re: 131 - Create a Joomla! v 1.5 Plugin for Odeo
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)
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)
Last edited by annerajb on Sun Dec 23, 2007 5:53 pm, edited 1 time in total.