Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-05-2011, 02:58 PM
Hummie Hummie is offline
 
Join Date: Nov 2007
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default BB Code for Video

I put this at vulletin dot com, but thought I'd try here too.
***
Before vbulletin added the standard bb code for "video," I had utilized the code "video" in a custom code to play windows media player videos in my forum. I teach with them and I have hundreds of threads with this code.

Now there is a conflict in my forum. I tried to edit my existing custom video bb code and it would not let me because there is this new video bb code.

I want to change the new bb code (that appears in the icon on the compose box) to a different named code (ie "vidoes") so they are different.

I don't want to change the custom bb code name because then I'd have to go through my forum and find hundreds and hundreds of threads and edit each post to get the video to work.

I cannot find where to change the built in codes in vbulletin.

***
I see there is a template for bbcode_video
....can I somehow add my code for my videos that are on my own hosting to that template?


My bb code is currently:
<embed src="http://www.mysite.com/folder/{param}" HEIGHT="480" WIDTH="720" ALIGN="center"AUTOSTART="false"/>


***
Found this thread. Is this what I need to do?
Reply With Quote
  #2  
Old 10-06-2011, 02:10 PM
ErnestA ErnestA is offline
 
Join Date: Jan 2009
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There are some dangers associated with this and since I've never been in this situation before, I can't say for sure what effect it would have.

But, if I was in this situation, I would consider doing a search and replace directly in the database table holding the threads. Obviously do an entire backup of your system before trying this.

If you're running MySQL here's how to do it:

http://www.mediacollege.com/computer...d-replace.html

I think the correct table in the vB database is 'post', and the field you're interested in is 'pagetext'. I'd run two queries:

update post set pagetext = replace(pagetext,'[VIDEO]','[CUSTOMVIDEO]');
update post set pagetext = replace(pagetext,'[/VIDEO]','[/CUSTOMVIDEO]');

replace CUSTOMVIDEO with whatever you want your new tag to be.

Like I said, backup, backup, backup (especially the database). I have no idea what effect this will have.

By default, MySQL should be case insensitive, but make sure just because you want one query to match [video] and [VIDEO] without having to worry about case sensitivity. You can find out more about that here:

http://dev.mysql.com/doc/refman/5.0/...nsitivity.html

Anyways, the information is provided AS-IS with no warranty or liability. Good luck.
Reply With Quote
  #3  
Old 10-06-2011, 04:18 PM
Hummie Hummie is offline
 
Join Date: Nov 2007
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your reply. Yes, a backup would be important before doing this suggestion.

It might be better to create a new database and then make the changes on it, then change the strings in the config files to the new one. That way if it doesn't work, I can always quickly reupload the original config pointing to the original database.

How do I do a search of mysql? In my hosting?

Thanks for your reply. I was beginning to think no one would answer.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:48 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04017 seconds
  • Memory Usage 2,175KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete