Skip to main content
Topic: Disable Youtube parsing (Read 2052 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Disable Youtube parsing

Hi
I have one particular thread that has loads of youtube videos - this kills the loading of the thread
Is there anyway to disable the auto parsing/preview for this particular thread so that it just shows the links instead? Or point me to the code where I can add some exclusion for this particular thread?

Thanks

Re: Disable Youtube parsing

Reply #1

There is no setting that I can think of for that ... The loading of the images (it only loads the preview image) happens on the client end, the server simply dumps out the link and then the client JS reads the page and fetches the images from youtube.

You could edit elk_jquery_embed.js and use a window.location.href call to see if the topic=1234 in question is in the url and then skip the processing.  Thats a "hack" but its all I can think of ATM

Re: Disable Youtube parsing

Reply #2

What about editing that topic and insert the YouTube links this way:

Link YouTube

Code: [Select]
 [url=https://youtube.com/watch?v=Ku4bRF8YCP0]Link YouTube [/url]
sorry for my bad english

Re: Disable Youtube parsing

Reply #3

Will give that a go thanks

Re: Disable Youtube parsing

Reply #4

We could also do with a "limit per page", something like with the attached.

Code: [Select]
		var oDefaultsSettings = {
preview_image : '',
embed_limit : 10,

Code: [Select]
		var domain_regex = /^[^:]*:\/\/(?:www\.)?([^\/]+)(\/.*)$/,
already_embedded = 0,

Code: [Select]
			// One of our video provider domains?
if (already_embedded < oSettings.embed_limit && m !== null && typeof(handlers[m[1]]) !== "undefined" && handlers[m[1]] !== null)
{

Code: [Select]
				if (args)
{
already_embedded++;

TBH I didn't test it, so it may be badly wrong. xD
@Spuds what do you think?
Bugs creator.
Features destroyer.
Template killer.

Re: Disable Youtube parsing

Reply #5

Good ides ... looks like that should work just fine.

We could add an setting in the next release so the admin can set this from ACP

Re: Disable Youtube parsing

Reply #6

I think 10 would be a rather low default though. :)

Re: Disable Youtube parsing

Reply #7

I wonder how many videos are on the page that is causing problems to @fritzelly .
Bugs creator.
Features destroyer.
Template killer.