vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Make your own bbcode? (https://vborg.vbsupport.ru/showthread.php?t=254170)

Kyojii 11-24-2010 05:32 AM

Make your own bbcode?
 
I'm attempting to replicated the current [video] tag in vB 3.8.4. Now I thought I could do this with a custom bbcode.

Code:

<script type="text/javascript"> if (/youtube/i.test("http://www.youtube.com/watch?v=7xrU5BxaPWo")){ var a ="http://www.youtube.com/watch?v=7xrU5BxaPWo".split('?')[1].split('&amp;'); var b = []; b[0] = a[0].split('=')[1]; b[1] = a.slice(1).join('&amp;'); document.write('<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/'+ b[0] +'?fs=1&amp;'+ b[1] +'"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'+ b[0] +'?fs=1&amp;'+ b[1] +'" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>'); } </script>
This works, however if someone were to use the ajax edit, the javascript will not be run again and the videos do not show if you refresh the page. Thus I was wondering if there is a post somewhere on how to make your own custom bbcodes via php?

BirdOPrey5 11-27-2010 03:42 AM

You can't use php in a bb code. But have you tried this mod? https://vborg.vbsupport.ru/showthread.php?t=202476


All times are GMT. The time now is 04:24 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.00948 seconds
  • Memory Usage 1,710KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete