• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

UrlRewriter ( Auto Media Embed and Affiliate Schemes )

buro9

Active member
Sound Cloud is now working, but as my work location is too locked down to be useful I cannot check-in the changes until probably tomorrow morning. But it will be released within 24 hours.
 

jacko

Well-known member
Sound Cloud is now enabled.
I added new definition for Soundcloud sets:

PHP:
    '~http://soundcloud\.com/[\w-]+/sets/[\w-]+~', // Soundcloud Set
PHP:
    '<object height="auto" width="100%"><param name="movie" value="http://player.soundcloud.com/player.swf?g=bb&amp;url=[URL]"></param><param name="allowscriptaccess" value="always"></param><embed allowscriptaccess="always" height="auto" src="http://player.soundcloud.com/player.swf?g=bb&amp;url=[URL]" type="application/x-shockwave-flash" width="100%"></embed></object> <a href="[URL]">[URL]</a>', // Soundcloud Set

example Soundcloud set url looks like this: http://soundcloud.com/chimpstudio/sets/chimpstudio
 

ArnyVee

Well-known member
buro, when you add an Amazon product link, will it pull an image of the item with it as well to display in the post?
 

buro9

Active member
buro, when you add an Amazon product link, will it pull an image of the item with it as well to display in the post?
No.

At the moment XenForo does not cache the parsed output of a single post. What this means is that the replacements are done each time the post is rendering. What that means is that you *really* do not want your server making requests to a backend server just to be able to make a page.

So until XenForo gains a cache for parsed posts I cannot add a lookup ability against the remote page without causing noticeable performance issues for your site. Further, if you had a lot of pages generating such calls it could lock up your web processes long enough to really hurt your server.

So adding this, whilst desirable, is probably out of the question until a cache for posts comes along.

If XenForo do not add a post cache, then I may be tempted to write that too just to enable this kind of functionality (and to increase performance). But this is something that definitely should be part of the core product, so I'm hesitant to do this hastily.
 

buro9

Active member
I added new definition for Soundcloud sets:

PHP:
    '~http://soundcloud\.com/[\w-]+/sets/[\w-]+~', // Soundcloud Set
PHP:
    '<object height="auto" width="100%"><param name="movie" value="http://player.soundcloud.com/player.swf?g=bb&amp;url=[URL]"></param><param name="allowscriptaccess" value="always"></param><embed allowscriptaccess="always" height="auto" src="http://player.soundcloud.com/player.swf?g=bb&amp;url=[URL]" type="application/x-shockwave-flash" width="100%"></embed></object> <a href="[URL]">[URL]</a>', // Soundcloud Set

example Soundcloud set url looks like this: http://soundcloud.com/chimpstudio/sets/chimpstudio
Thanks, I'll put it into the main addon package this evening.
 

buro9

Active member
Added the Sound Cloud sets.

Not totally convinced about the Sound Cloud flash player. Sometimes it doesn't load, but when it does it all works fine so there's not a problem with the generated HTML.

Also changed the installation so that people download the .zip file containing all of the code from github via the link in the first post. This is mostly just to prevent me forgetting to update the first post whilst also making it so that people can use the "Like" functionality against the first post to show that they're interested in the Add-on, which is better than the numbers against the downloads as those are reset every time I update it.
 

onyxchase

Active member
Is there an admin panel to turn off some of the features? I only want the YouTube auto-embed without the other stuff. :)
 

Skeletor

Member
Thanks for this great mod, especially the soundcloud edition. No problems found with that yet.

Is there a way to stop it parsing links in signatures? I've found a few members with youtube videos in signatures ...not ideal.
 

kforo

Active member
Just a comment - I see if you click on "share" - on youtube's site..., some are showing up as "http://youtu.be/" -with the video extension at the end. Such as: http://youtu.be/6VAkOhXIsI0

I don't know if you have interest in writing the code to allow people posting that directly into a post or not?
The same blank window happens if someone tries to paste a youtube video in that may have a "related" link, or embed link. Such as

following an embedded video on another site to youtube - if you grab the URL in the browser window it may look like this
http://www.youtube.com/watch?v=6VAkOhXIsI0&feature=player_embedded

Or if you watched another related vid, and tried to copy that url out of the browser, it may look like:
http://www.youtube.com/watch?v=5xZw9D9c18E&feature=related

If someone tries to drop those urls into a forum page, it comes up as a white box - from what I see. I'm also on xen 1.01, so I don't know if things changed with the latest xen update. Very cool addon though. My users will enjoy this.
 

Phillip

Active member
buro9,

Thanks for all the time you've given to this. I noticed that it works fine on Amazon product pages, however, it seems to not include the affiliate code on Amazon search results. This would be a great addition in the future.
 

Cezz

Well-known member
from the member card...
buro9 was last seen:
Jan 8, 2011

The GitHub Repository hasn't been updated since November 24, 2010 this is a really interesting mod though and if I have time I may Fork it and add some desirable features EG, Admin options to enable/disable each replacement & settings for each one like ebay...

Don't take this as a promise though and if anyone else wants to Fork it and do the same first go ahead, it is open-source after all!
 

Garamond

Well-known member
It's sad the author of this mod have abandoned the project, I would really like to have such a feature built into XenForo since it builds under the ease-of-use otherwise seen all over this forum software. Linking videos are happening all the time, and it shouldnt be necessary to do 3 clicks to embed it when it should be enough to just paste the address directly and be done with it.

But then again, I know we're only at 1.0.x so far. Much to be awaited the next years, I'm sure :)
 
Top