Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - YouTube Mod
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

YouTube Mod

 Post Reply Post Reply
Author
DomitianX View Drop Down
Newbie
Newbie


Joined: 28 January 2008
Status: Offline
Points: 32
Post Options Post Options   Thanks (0) Thanks(0)   Quote DomitianX Quote  Post ReplyReply Direct Link To This Post Topic: YouTube Mod
    Posted: 28 January 2008 at 4:56am
Since the existing code only likes the http://www.youtube.com/v/ YouTube format and most people either use the embed code or the link code presented by YouTube in the clips, I made a little mod to the format post page. Watch the wrap. Around line 839 on functions_format_post.asp

strYouTubeLink = Replace(Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)), "watch?v=", "v/")

If the user uses the "/watch?v=" format, its replaced with the "v/" format instead.

So far it seems to work. You can post the link in the "http://www.youtube.com/v/xxxxxxx" format, the  "http://www.youtube.com/watch?v=xxxxxx" format or just the clip number and it will work either way.

If anyone sees an error in my logic, let me know.


Back to Top
iSec View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 February 2005
Status: Offline
Points: 1140
Post Options Post Options   Thanks (0) Thanks(0)   Quote iSec Quote  Post ReplyReply Direct Link To This Post Posted: 28 January 2008 at 7:05pm
Excellent job.
 
Bruce, I hope that this gets added to the next release. I had an awful time trying to train users on how to use the Tube BBCode.
"When it gets dark enough, you can see the stars"
-Charles A. Beard
Back to Top
freakdaddy View Drop Down
Groupie
Groupie


Joined: 24 January 2008
Status: Offline
Points: 79
Post Options Post Options   Thanks (0) Thanks(0)   Quote freakdaddy Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2008 at 6:32am
Good job, this works well!
Back to Top
bconway99 View Drop Down
Newbie
Newbie


Joined: 18 August 2006
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote bconway99 Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2008 at 5:10am
Sorry to sound all Noobish.
 
That line of code you have is that to be put in place of something or just in and around line 839?  Will it allow the poster to past a youtube link and it will display as a utube video instead of the link.
Thank you and I appreciate you allowing people to use your code.  Your knowledge and hard work is greatly appreciated
Back to Top
chong67 View Drop Down
Groupie
Groupie


Joined: 15 November 2004
Location: United States
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote chong67 Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2008 at 10:07pm
How does this think work?

I added that code on post # 1, but I didnt see the youtube video.  All I see is the hyperlink.
Back to Top
raisingkids View Drop Down
Newbie
Newbie


Joined: 13 February 2008
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote raisingkids Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2008 at 3:55pm
Superb bit of code - many thanks for all your work.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.