Easy Podcasting Plugin: Linking

Creating and modifying plugins.
Post Reply
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Easy Podcasting Plugin: Linking

Post by Lux »

Hi,

the Easy Podcasting Plugin rewrites the links for media files.

First:
Sometimes this is not wanted. See here, it should read "als MP4 and M4V" with the appropriate links.

Second:
This is the original article showing buttons instead of filenames, the plugin changes it this way. What can we do to see buttons (or any other text) instead of the filename.

Third (and last for now):
Sometimes the show notes contain links to external media files as well. What can be done with them, if we don't want them to be managed by the plugin. Maybe setting <a href="xyz" class="nopodcast"> would be an idea? Or even better, tell the plugin which domain contains the podcast content, "archiv.radiotux.de" in our case.

We want to go live by end of February. Any chance to get this solved till then?

Cheers

Dirk
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Easy Podcasting Plugin: Linking

Post by garvinhicking »

Hi!

The problem is that the original <a> content is not really easily fetchable and injectable. Using the filename is the only placeholder that currently is available to be placed, I believe.

The code currently matches all media file links, it's also quite hard (with regexps) to exclude specific classes.

So the short answer is: This is very hard to code and cannot be easily done. If you remind me in March/April, I might have enough time to look into this - for now, I personally cannot offer to work on this, since it would take a few hours that I currently do not have.

Maybe Grischa, who did much initial work, is willing to inspect this? He has some more knowledge on regexp matching due to his oEmbed-Plugin I bet! ;-)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Re: Easy Podcasting Plugin: Linking

Post by Lux »

Hi Garvin,
garvinhicking wrote:The problem is that the original <a> content is not really easily fetchable and injectable. Using the filename is the only placeholder that currently is available to be placed, I believe.
is it really that difficult to parse a <a href ...>xxx</a>?
garvinhicking wrote:The code currently matches all media file links, it's also quite hard (with regexps) to exclude specific classes.
In my opinion this is the wrong starting point. You configure in the plugin a list of file extensions to look at and only those should be considered by the plugin and this would only be matching "(ogg|mp3|xxx)$".
garvinhicking wrote:So the short answer is: This is very hard to code and cannot be easily done. If you remind me in March/April, I might have enough time to look into this - for now, I personally cannot offer to work on this, since it would take a few hours that I currently do not have.
Ok!
garvinhicking wrote:Maybe Grischa, who did much initial work, is willing to inspect this? He has some more knowledge on regexp matching due to his oEmbed-Plugin I bet! ;-)
Informed Grischa via Twitter.

In addition to that I like the podcasting plugin only to operate on files from predefined domains.

Cheers

Dirk
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Easy Podcasting Plugin: Linking

Post by garvinhicking »

Hi!

Until the plugin is enhanced you might want to use a URL link shortening service to shorten those links you don't want the podcast plugin to catch...

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Re: Easy Podcasting Plugin: Linking

Post by Lux »

garvinhicking wrote:Until the plugin is enhanced you might want to use a URL link shortening service to shorten those links you don't want the podcast plugin to catch...
Yes, we will do that.

Cheers

Dirk
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: Easy Podcasting Plugin: Linking

Post by blog.brockha.us »

As the example links don't work any more, I assume the problem is: You want to define what media link should be exchanged and what not.

I think the easiest solution would be: Add an option "Don't autoreplace html links (use [podcast:] only)".

This would leave the <a href> links as they are and would only expand the explicit [podcast: ..] syntax (what is not documented any more in the plugins configuration screen, I noticed a little surprised).

Would this be a working solution for this problem, Dirk?
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Re: Easy Podcasting Plugin: Linking

Post by Lux »

blog.brockha.us wrote:As the example links don't work any more, I assume the problem is: You want to define what media link should be exchanged and what not.
Ah, yes sure. We did the import several times to have it like it is now.
blog.brockha.us wrote:I think the easiest solution would be: Add an option "Don't autoreplace html links (use [podcast:] only)".

This would leave the <a href> links as they are and would only expand the explicit [podcast: ..] syntax (what is not documented any more in the plugins configuration screen, I noticed a little surprised).

Would this be a working solution for this problem, Dirk?
Hi Grischa, thanks for the feedback.

This means every blog article has to be changed, if you consider using this option, which is bad in my opinion. I would like to go for a approach where media data that should not be displayed with the plugin will be marked separately.

Since only few articles contain links to media files in the show notes, it would be easier to change only them.

Maybe either with <a href="xyz" class="nopodcast"> or with [nopodcast: ...].

Cheers

Dirk
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: Easy Podcasting Plugin: Linking

Post by blog.brockha.us »

I added the possibility to exclude media links by CSS class: http://t.co/fMYhhTRQ
Betatests are welcomed. ;)
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Re: Easy Podcasting Plugin: Linking

Post by Lux »

blog.brockha.us wrote:I added the possibility to exclude media links by CSS class: http://t.co/fMYhhTRQ
Betatests are welcomed. ;)
Hi Grischa,

many thanks. I will take a look, when I find the time.

Cheers

Dirk
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: Easy Podcasting Plugin: Linking

Post by blog.brockha.us »

Cool. I already put the patch into Spartacus, so others can test this, too.
Worked here, I hope it'll work everywhere else, too. :)
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Re: Easy Podcasting Plugin: Linking

Post by Lux »

blog.brockha.us wrote:Cool. I already put the patch into Spartacus, so others can test this, too.
Worked here, I hope it'll work everywhere else, too. :)
Hi Grischa,

plugin installed. What is the preferred way to do it?

Code: Select all

<a href="link" class="nopodcast">Description</a>
Dirk
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: Easy Podcasting Plugin: Linking

Post by blog.brockha.us »

Yes, like that. If you use the class "nopodcast" it has to be configured like that in the plugins configuration.

Is it not working or why do you ask?
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/
Lux
Regular
Posts: 764
Joined: Fri Aug 12, 2005 4:36 pm
Location: Grüt, Zürich, Switzerland
Contact:

Re: Easy Podcasting Plugin: Linking

Post by Lux »

blog.brockha.us wrote:Yes, like that. If you use the class "nopodcast" it has to be configured like that in the plugins configuration.
Sure
blog.brockha.us wrote:Is it not working or why do you ask?
I did not test yet.

Cheers

Dirk
Post Reply