[SOLVED]BBcode - Vimeo "www." issue

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
User avatar
Lowered
Registered User
Posts: 166
Joined: Sun May 10, 2009 10:55 pm

[SOLVED]BBcode - Vimeo "www." issue

Post by Lowered »

Hello..

Im having a small issue on Vimeo bbcoding.
I have the following BBCode added:

Usage:

Code: Select all

[vimeo]http://www.vimeo.com/{TEXT}[/vimeo]
Replacement:

Code: Select all

<embed src="http://www.vimeo.com/moogaloop.swf?clip_id={TEXT}&server=www.vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="800" height="500"></embed>
Help:

Code: Select all

[vimeo]http://www.vimeo.com/148137[/vimeo]
It all works perfect and all, but a couple months ago, VIMEO has changed from http://www.Vimeo to http://vimeo and it screwed me over.. Now each time a user wants to post a video i have to go behind him and add the www. to the start of the video address.

ie:
user post's http://vimeo.com/1234567 and wraps on [vimeo] tag and i have to go and edit it and make it http://www.vimeo.com/1234567..

Is there a workaround? I know i could edit the BBCode and remove the "www." from it and it whould become compatible, but the question is that i have hundred's of VIMEO videos allready posted all troughout the forums and i dont want to re-edit them all!
I thought about creating a new [VM] tag and modify the code.. But there's got to be a better way..?


Best regards
Nuno F.
Last edited by ric323 on Thu Aug 26, 2010 10:27 pm, edited 2 times in total.
Reason: Topic icon changed
:mrgreen:
User avatar
Mick
Support Team Member
Support Team Member
Posts: 23607
Joined: Fri Aug 29, 2008 9:49 am

Re: BBcode - Vimeo issue

Post by Mick »

  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • There will be legions of cricket lovers of both genders through whose lips the abomination ‘BATTER’ will never pass so long as we live” - Simon Heffer - Telegraph
User avatar
Lowered
Registered User
Posts: 166
Joined: Sun May 10, 2009 10:55 pm

Re: BBcode - Vimeo issue

Post by Lowered »

Hello.

Altough somewhat related, the topic posted doesnt help at all.
As stated above:
It all works perfect and all, but a couple months ago, VIMEO has changed from http://www.Vimeo to http://vimeo and it screwed me over.. Now each time a user wants to post a video i have to go behind him and add the www. to the start of the video address.(...)
Is there a workaround? I know i could edit the BBCode and remove the "www." from it and it whould become compatible, but the question is that i have hundred's of VIMEO videos allready posted all troughout the forums and i dont want to re-edit them all!
I think that every edit to the bbcode can make it compatible with the new address, but the old vid's will all fail to display...?

Thanks
:mrgreen:
User avatar
Lowered
Registered User
Posts: 166
Joined: Sun May 10, 2009 10:55 pm

Re: BBcode - Vimeo issue

Post by Lowered »

Anyone?
:mrgreen:
User avatar
Lowered
Registered User
Posts: 166
Joined: Sun May 10, 2009 10:55 pm

Re: BBcode - Vimeo issue

Post by Lowered »

Is anyone out there?
Is anyone out there?...
Is anyone out there?...
:mrgreen:
User avatar
AmigoJack
Registered User
Posts: 5932
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: BBcode - Vimeo issue

Post by AmigoJack »

Lowered wrote:the question is that i have hundred's of VIMEO videos allready posted all troughout the forums and i dont want to re-edit them all
What keeps you from doing this with one SQL command on your database? Consider an update like this to adjust all "old" links to "new" ones:

Code: Select all

UPDATE phpbb_posts SET post_text= REPLACE( post_text, ']http://www.vimeo.com/', ']http://vimeo.com/' );
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
Lowered
Registered User
Posts: 166
Joined: Sun May 10, 2009 10:55 pm

Re: BBcode - Vimeo issue

Post by Lowered »

Hmmm, so, by editing the current BBCode to make it compatible and executing that command on mysql.. It will replace all vimeo lines from old post's and replace them with the new ones?
Working kind of like the "replace all" feature on text editors? Nice fix :D
If that's correct i'll aply it now.

btw, my knowledge of SQL is inexistant.. So i would never have figured that out. ;)
:mrgreen:
User avatar
AmigoJack
Registered User
Posts: 5932
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: BBcode - Vimeo issue

Post by AmigoJack »

Lowered wrote:If that's correct
You got it.

However, this is untested by me. Be sure to make a database backup before proceeding. The command looks in each post for every text part mentioned first and replaces it with the text part mentioned last. Side effect: if someone used another BBCode (maybe [URL] or ) which also starts with a vimeo URL it also gets replaced.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
Lowered
Registered User
Posts: 166
Joined: Sun May 10, 2009 10:55 pm

Re: BBcode - Vimeo issue

Post by Lowered »

I made a full server backup now and i will be testing it. I'll report if sh1t hit's the fan in any way ;)
:mrgreen:
User avatar
Lowered
Registered User
Posts: 166
Joined: Sun May 10, 2009 10:55 pm

Re: BBcode - Vimeo issue

Post by Lowered »

Locked and loaded. SQL mod was almost instant and BBCode edit made all the remaining videos display with no hassle!

Thank you mate! :mrgreen:
:mrgreen:
User avatar
pjdm
Registered User
Posts: 35
Joined: Thu Aug 07, 2008 9:27 pm
Location: Calgary eh?
Name: Paul Miller
Contact:

Re: [SOLVED]BBcode - Vimeo "www." issue

Post by pjdm »

The Vimeo code has changed again and this is working on my site.

Usage

Code: Select all

[vimeo]{IDENTIFIER}[/vimeo]
HTML

Code: Select all

<iframe src="//player.vimeo.com/video/{IDENTIFIER}?title=1&byline=1&portrait=1" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
Help

Code: Select all

[vimeo]http://vimeo.com/148137[/vimeo]
LordGlissando
Registered User
Posts: 17
Joined: Mon Feb 09, 2015 6:49 am

Re: [SOLVED]BBcode - Vimeo "www." issue

Post by LordGlissando »

please sate what i should add to BBCodes in control panel, I've added the specific movie id and it works but when attempting to add another movie id by clicking add BBCode, it says BBCode already exists, surely this does not mean I am only able to add one movie at a time? is there a global code that relates to vimeo, so I add a vimeo code and then just add individual id's within posts? if so what is it? thanks
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: [SOLVED]BBcode - Vimeo "www." issue

Post by Oyabun1 »

The HTML replacement is not supposed to have "the specific movie id" in it. It has a token, such as {IDENTIFIER}, as shown above. When the BBCode is used the movie id replaces the token.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
LordGlissando
Registered User
Posts: 17
Joined: Mon Feb 09, 2015 6:49 am

Re: [SOLVED]BBcode - Vimeo "www." issue

Post by LordGlissando »

I am so thankful for your response, i assumed that was the case but it still does not work, it just shows as a url in type. here is a screen shot, please say what I'm doing wrong,thanks again,f
Attachments
bbcodeserror.tiff
(187.12 KiB) Downloaded 35 times
LordGlissando
Registered User
Posts: 17
Joined: Mon Feb 09, 2015 6:49 am

Re: [SOLVED]BBcode - Vimeo "www." issue

Post by LordGlissando »

got concept, works with youtube using {TEXT} instead of {IDENTIFIER}, neither which work with vimeo, any ideas as to what word i should use {?} thanks,f
Locked

Return to “[3.0.x] Support Forum”