The Joomla! Forum ™






Post new topic Reply to topic  [ 25 posts ] 
Author Message
PostPosted: Sat Dec 08, 2007 9:38 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
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


Last edited by AmyStephen on Thu Dec 20, 2007 12:02 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sat Dec 08, 2007 9:59 pm 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
Loadposition uses this:
Code:
    // expression to search for
    $regex = '/{loadposition\s*.*?}/i';


Would this work?
Code:
    // expression to search for
    $regex = '/{odeo\s*.*?}/i';


Thanks for taking this task!
Amy :)

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


Top
 Profile  
 
PostPosted: Sat Dec 08, 2007 10:10 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
http://annerajb.mine.nu/joomla/index.ph ... &Itemid=60
got it wokring :D now need to make it so it parses the url inputted and extracts the song id


Top
 Profile  
 
PostPosted: Sat Dec 08, 2007 11:35 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
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.


Top
 Profile  
 
PostPosted: Mon Dec 10, 2007 5:26 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
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 :D


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

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
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 :)

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


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

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
ok got a version ready :D.
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


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

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
forgot the file :P:P:P:P


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


Top
 Profile  
 
PostPosted: Sat Dec 15, 2007 8:52 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
let me bump this and state that i am having problems with getting the localizations to load apart from that i am done :D


Top
 Profile  
 
PostPosted: Sun Dec 16, 2007 5:03 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
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:
{odeo small-grey|http://odeo.com/audio/1632351/view}


I'll try to watch closely for your next update.

Thanks,
Amy :)

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


Top
 Profile  
 
PostPosted: Sun Dec 16, 2007 2:27 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
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 :D


Top
 Profile  
 
PostPosted: Sun Dec 16, 2007 8:28 pm 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
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.)
Code:
$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 :)

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


Top
 Profile  
 
PostPosted: Sun Dec 16, 2007 8:31 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
i never tough of the check for the | :D 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


Top
 Profile  
 
PostPosted: Sun Dec 16, 2007 10:04 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
finally fixed everything :D 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


Top
 Profile  
 
PostPosted: Sun Dec 16, 2007 10:13 pm 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
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 :)

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


Top
 Profile  
 
PostPosted: Mon Dec 17, 2007 11:02 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
thanks Amy Ian help me out with the localization problem :D 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 :D
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.


Top
 Profile  
 
PostPosted: Tue Dec 18, 2007 3:52 pm 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
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).

Quote:
style="font-size: 9px; padding-left: 35px; color: #6a99fe; letter-spacing: -1px; text-decoration: none"


Example of loading a stylesheet:
Quote:
// 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 :)

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


Top
 Profile  
 
PostPosted: Tue Dec 18, 2007 3:57 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
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 :D 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.


Top
 Profile  
 
PostPosted: Tue Dec 18, 2007 4:30 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
got the next version done :D 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.


Top
 Profile  
 
PostPosted: Wed Dec 19, 2007 6:50 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
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 :)

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


Top
 Profile  
 
PostPosted: Wed Dec 19, 2007 12:54 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
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.


Top
 Profile  
 
PostPosted: Wed Dec 19, 2007 8:38 pm 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
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 :)

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


Top
 Profile  
 
PostPosted: Wed Dec 19, 2007 9:39 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
submitted to google also the svn is giving me a 501 invalid method message something about PUT not sure what i am doing wrong :(


Top
 Profile  
 
PostPosted: Sun Dec 23, 2007 5:15 pm 
Joomla! Champion
Joomla! Champion

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

I believe you and Ian have been working together? Do you still have problems with your JoomlaCode upload?

Thanks,
Amy :)

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


Top
 Profile  
 
PostPosted: Sun Dec 23, 2007 5:51 pm 
Joomla! Intern
Joomla! Intern

Joined: Tue Sep 04, 2007 8:59 pm
Posts: 62
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


Last edited by annerajb on Sun Dec 23, 2007 5:53 pm, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ] 



Who is online

Users browsing this forum: No registered users and 2 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