Old Video "dissapear" from the forum

New to Thea? Feel free to ask anything here and we will help!
Post Reply
User avatar
warnotte
Posts: 2212
Joined: Sat Jul 25, 2009 10:18 pm
Location: Belgium
Has thanked: 2 times
Been thanked: 28 times
Contact:

Thu Oct 18, 2018 2:21 pm

I was digging in some of my old posts and discovered that all video from youtube or vimeo are replaced by an iframe with "Thea website"

(see https://thearender.com/forum/viewtopic. ... 75#p153975)

Somebody can tell me I have to modify every post one by one to fix that or is another way ?

If not other way, what is the actual way to link a video (I see the Vimeo button and the youtube one but it doesn't seems to work).

EDIT : For youtube videos it looks that url has to be changed from

https://www.youtube.com/v/PSQUGNpjGfs
to this
https://www.youtube.com/watch?v=PSQUGNpjGfs

But it will take me hours and hours, isn't there a way to update all forum posts that contains all link like that pattern and change it ?

For Vimeo i didn't find why it's not working
User avatar
Tomasz
Thea Developer
Thea Developer
Posts: 7020
Joined: Fri Jul 18, 2008 5:09 pm
Has thanked: 8 times
Been thanked: 11 times
Contact:

Fri Oct 26, 2018 10:51 am

It has happened due to Forum upgrade.
Christina will check whether she can do something about it. She has tried it in a past, but couldn't find a solution.
User avatar
warnotte
Posts: 2212
Joined: Sat Jul 25, 2009 10:18 pm
Location: Belgium
Has thanked: 2 times
Been thanked: 28 times
Contact:

Fri Oct 26, 2018 11:28 am

Yes I understand. Also understand youtube has changed stuff also.

And Yes I know that something that can be difficult to solve, I hope there will be an automated solution.
These users thanked the author warnotte for the post:
werthen (Sat Oct 27, 2018 12:24 pm)
Rating: 4%
User avatar
warnotte
Posts: 2212
Joined: Sat Jul 25, 2009 10:18 pm
Location: Belgium
Has thanked: 2 times
Been thanked: 28 times
Contact:

Fri Oct 26, 2018 2:22 pm

Ok, I use the "My post" menu on top of the forum in order to get all the forum where I post something... then for 4 hours i've changed all youtube tags and fixed them. I certainly missed some in posts of other people where i posted video.

But for Vimeo for some of them, not all because too much, i've changed to :

Code: Select all

[vimeo]https://vimeo.com/22478136[/vimeo]
But doesn't seems to work, any idea ?
User avatar
Rombout
Thea Beta Tester
Thea Beta Tester
Posts: 14170
Joined: Tue May 12, 2009 12:42 am
Location: Curacao, Netherland Antilles
Has thanked: 6 times
Been thanked: 95 times

Sun Oct 28, 2018 8:53 pm

It would be nice if we could add the video by just using its ID. I believe that is how the current vimeo version works.
If you hover long enough over the buttons on the top right, it will show you how to add the videos btw.

I already asked Christina a couple times about it. Vimeo is way easier to add. The same is for Iframe, users need to add a lot of it manually, but with a simple jquery script it possible that a users would only have to add the video ID

Code: Select all

[Vimeo]199717443[/Vimeo]


Hints on youtube

Code: Select all

Youtube video: [youtube]https://www.youtube.com/watch?v=ffHLIZh0PHg[/youtube]
Hints on Iframe

Code: Select all

[iframe]<iframe width="560" height="315" src="https://www.youtube.com/embed/id" frameborder="0" allowfullscreen></iframe>[/iframe]
Hints on Vimeo

Code: Select all

Add vimeo id number, eg: [Vimeo]12345678[/Vimeo]
When i looked into the source page of the comment page. There is already a javascript checking the tags. This could be easily adjust.

Code: Select all

<script type="text/javascript">
// <![CDATA[
	var form_name = 'postform';
	var text_name = 'message';
	var load_draft = false;
	var upload = false;

	// Define the bbCode tags
	var bbcode = new Array();
	var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[size=]','[/size]', '[Vimeo]', '[/Vimeo]', '[iframe]', '[/iframe]', '[youtube]', '[/youtube]');
	var imageTag = false;

	// Helpline messages
	var help_line = {
		b: 'Bold\x20text\x3A\x20\x5Bb\x5Dtext\x5B\x2Fb\x5D',
		i: 'Italic\x20text\x3A\x20\x5Bi\x5Dtext\x5B\x2Fi\x5D',
		u: 'Underline\x20text\x3A\x20\x5Bu\x5Dtext\x5B\x2Fu\x5D',
		q: 'Quote\x20text\x3A\x20\x5Bquote\x5Dtext\x5B\x2Fquote\x5D',
		c: 'Code\x20display\x3A\x20\x5Bcode\x5Dcode\x5B\x2Fcode\x5D',
		l: 'List\x3A\x20\x5Blist\x5D\x5B\x2A\x5Dtext\x5B\x2Flist\x5D',
		o: 'Ordered\x20list\x3A\x20e.g.\x20\x5Blist\x3D1\x5D\x5B\x2A\x5DFirst\x20point\x5B\x2Flist\x5D\x20or\x20\x5Blist\x3Da\x5D\x5B\x2A\x5DPoint\x20a\x5B\x2Flist\x5D',
		p: 'Insert\x20image\x3A\x20\x5Bimg\x5Dhttp\x3A\x2F\x2Fimage_url\x5B\x2Fimg\x5D',
		w: 'Insert\x20URL\x3A\x20\x5Burl\x5Dhttp\x3A\x2F\x2Furl\x5B\x2Furl\x5D\x20or\x20\x5Burl\x3Dhttp\x3A\x2F\x2Furl\x5DURL\x20text\x5B\x2Furl\x5D',
		a: 'Inline\x20uploaded\x20attachment\x3A\x20\x5Battachment\x3D\x5Dfilename.ext\x5B\x2Fattachment\x5D',
		s: 'Font\x20colour\x3A\x20\x5Bcolor\x3Dred\x5Dtext\x5B\x2Fcolor\x5D\x20or\x20\x5Bcolor\x3D\x23FF0000\x5Dtext\x5B\x2Fcolor\x5D',
		f: 'Font\x20size\x3A\x20\x5Bsize\x3D85\x5Dsmall\x20text\x5B\x2Fsize\x5D',
		y: 'List\x3A\x20Add\x20list\x20element',
		d: 'Flash\x3A\x20\x5Bflash\x3Dwidth,height\x5Dhttp\x3A\x2F\x2Furl\x5B\x2Fflash\x5D'
					,cb_22: 'Add vimeo id number, eg: [Vimeo]12345678[/Vimeo]'
					,cb_24: '[iframe]<iframe width="560" height="315" src="https://www.youtube.com/embed/id" frameborder="0" allowfullscreen></iframe>[/iframe]'
					,cb_26: 'Youtube video: [youtube]https://www.youtube.com/watch?v=ffHLIZh0PHg[/youtube]'
			}

	function change_palette()
	{
		phpbb.toggleDisplay('colour_palette');
		e = document.getElementById('colour_palette');

		if (e.style.display == 'block')
		{
			document.getElementById('bbpalette').value = 'Hide\x20font\x20colour';
		}
		else
		{
			document.getElementById('bbpalette').value = 'Font\x20colour';
		}
	}

// ]]>
</script>
Attachments
Screen Shot 2018-10-28 at 16.52.10.png
Screen Shot 2018-10-28 at 16.52.10.png (19.68 KiB) Viewed 278 times
These users thanked the author Rombout for the post:
warnotte (Sun Oct 28, 2018 9:01 pm)
Rating: 4%
User avatar
Rombout
Thea Beta Tester
Thea Beta Tester
Posts: 14170
Joined: Tue May 12, 2009 12:42 am
Location: Curacao, Netherland Antilles
Has thanked: 6 times
Been thanked: 95 times

Sun Oct 28, 2018 9:01 pm

Tomasz wrote:
Fri Oct 26, 2018 10:51 am
It has happened due to Forum upgrade.
Christina will check whether she can do something about it. She has tried it in a past, but couldn't find a solution.
I think a simple find and replace script written in jquery could solve this.
User avatar
warnotte
Posts: 2212
Joined: Sat Jul 25, 2009 10:18 pm
Location: Belgium
Has thanked: 2 times
Been thanked: 28 times
Contact:

Mon Oct 29, 2018 10:45 am

I don't think it's so simple. And even if that can be done it should be done on server side, not on client side with jQuery. (But it can work if you edit each post, then run the script and submit but it would be a pain)

+ you'll have to write a nice regexp that will do the job for all exotic way we used to embed videos like :

Code: Select all

[youtube]https://youtu.be/v/654678e[youtube]
[youtube]https://www.youtube.com?v=654678e[youtube]
and so on... but maybe I'm wrong and approach the problem in a bad way.
User avatar
warnotte
Posts: 2212
Joined: Sat Jul 25, 2009 10:18 pm
Location: Belgium
Has thanked: 2 times
Been thanked: 28 times
Contact:

Mon Oct 29, 2018 12:35 pm

I followed your recommandation about the vimeo tag and replace it everywhere i posted vimeo videos. (a pain again ...)

But it also make me think that Video embbed is nice like this because if vimeo change something, the id should normally stay as it is and the forum just need to upgrade the script that will generate the complete url to see the video.

But the question is why it's not the same for youtube tag. The situation will happens maybe again and everything will have to be modified post by post.

So it would be nice to also do something on the youtube tag in the forum in order to keep the working link like

Code: Select all

[youtube]https://www.youtube.com/watch?v=qR4J3S6mvEU[/youtube]
and also

Code: Select all

[youtube]qR4J3S6mvEU[/youtube]
What do you think Tomasz, Christina and Rombout ?
User avatar
Rombout
Thea Beta Tester
Thea Beta Tester
Posts: 14170
Joined: Tue May 12, 2009 12:42 am
Location: Curacao, Netherland Antilles
Has thanked: 6 times
Been thanked: 95 times

Wed Nov 07, 2018 5:24 am

Yes i know, ive already asked Christina a couple time about this.

I hope she will or can fix this issue and add a new method like vimeo. Also the iframe could be like that. A user should not need to enter that much code.
Post Reply