vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   BB Code Enhancements - Embed XHTML valid YouTube and Google Video into your posts (https://vborg.vbsupport.ru/showthread.php?t=130868)

Viper007Bond 11-19-2006 08:08 PM

Quote:

Originally Posted by xtrass (Post 1120929)
Ok, not sure what happened, but it seems if you edit the post it becomes invalid and you have to enter the youtube url again.

Let me explain a little how this plugin works behind the scenes, using [youtube] as an example (the Google Video one works the same way).

First, it finds all validly formatted calls to the BBCode and replaces them with [VALIDYOUTUBE12345]gakjh43hj34f[/VALIDYOUTUBE12345]. Anything left over is then bad calls to the BBCode (ex: [YOUTUBE]http://www.yahoo.com/[/YOUTUBE]). These get replaced with [INVALIDYOUTUBE] so that the BBCode parser doesn't replace them and make a broken embed box.

Then once the BBCode parser is done, it replaces all of the [INVALIDYOUTUBE]'s with [YOUTUBE]. This results in them displaying as the user typed in (in plain text) with no HTML.

However, it seems that second plugin (which puts the tags back) doesn't always work and I'm not quite sure why (since I'm new to vB). That's why you may see [INVALIDYOUTUBE]'s sometimes in your posts rather than [YOUTUBE]http://www.yahoo.com/[/YOUTUBE]. Valid calls to the BBCode though should always work and show up correctly.

Viper007Bond 11-19-2006 08:09 PM

Quote:

Originally Posted by RidinHighSpeeds (Post 1120975)
Great mod, however I would strongly recommend a new feature much like the "hyperlink" pop-up windows.

If you currently click on Google or the YouTube link, it brings up the window where you enter the URL. However, many users do not enter a title within the tags, and then when they submit just the URL, it does not display the video..

I think there should be 2 windows. 1 window for the URL, and another for the TITLE. That would work perfectly!

Wait, what? I'm lost.

Viper007Bond 11-19-2006 08:10 PM

Quote:

Originally Posted by smoknz28 (Post 1121025)
I know you hit on this one previously....but I'd like to know if it would be better to remove the Custom BB Codes we added with the previous version of this hack? Seemed like your response was more of a...you can if you want...but if not...there's no issues. But I'd rather not have it there if there's no need for it with this verion.

No, there is no need to remove them. :)

ubblite 11-19-2006 08:21 PM

A CMPS module would be a great addition for this mod.

Also, if you could have your own player instead of using Google's and YouTube's, it would be a real nice option.

xtrass 11-19-2006 08:27 PM

Viper, great mod. I also run a SMF forum, version 1.1 RC3,

any chance you can port this over for 1.1RC3?

They only have a similar mod for 1.1RC2 and all the suggested hacks to get it to work on RC3 fails. Plus you need to install 2 mods to get what your VB mod does!

I know your mod would be greatly appreciated for SMF :)

Any chance it happening?

smoknz28 11-19-2006 08:57 PM

Quote:

Originally Posted by Viper007Bond (Post 1121033)
No, there is no need to remove them. :)

Sounds good....thanks again for taking time out in putting this hack together. ;)

RidinHighSpeeds 11-19-2006 08:59 PM

Quote:

Originally Posted by Viper007Bond (Post 1121032)
Wait, what? I'm lost.

When you click the YouTube icon for example, it brings up a window where you enter in the URL of the video.

Now if I submit my reply without entering in a title within the tags, it does not display the video. I would recommend another pop-up window asking the user to enter in a description or title.

redlabour 11-19-2006 09:28 PM

Attention :

If you have used something like [gv] before this Update and want to change now all old Codes to [gvideo] operate this SQL Querie.

Code:

UPDATE vb3_post SET pagetext = REPLACE(pagetext, '[gv]', '[gvideo]');
UPDATE vb3_post SET pagetext = REPLACE(pagetext, '[/gv]', '[/gvideo]');
UPDATE vb3_post SET pagetext = REPLACE(pagetext, '[GV]', '[gvideo]');
UPDATE vb3_post SET pagetext = REPLACE(pagetext, '[/GV]', '[/gvideo]');
UPDATE vb3_post SET pagetext = REPLACE(pagetext, '[Gv]', '[gvideo]');
UPDATE vb3_post SET pagetext = REPLACE(pagetext, '[/Gv]', '[/gvideo]');

Same for old [anymedia] or [yt] Codes. ;)

Attention - maybe you have to change Tableprefix.

@Viper007Bond - include this to Installinstructions please or use it for coding a AdminCP Option. ;)

transitbus 11-19-2006 10:26 PM

Quote:

Originally Posted by Viper007Bond (Post 1121032)
Wait, what? I'm lost.

I think what he is asking is like the insert link:

Attachment 56240

ByG SteAm 11-19-2006 11:28 PM

I am a little confused, you have the example usage thing but how do i make it so when they click to insert the video url it shows more than the [google][ /google] thing but instead the full Usage code you have posted above.


All times are GMT. The time now is 02:22 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01316 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete