vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Including Automatic Media Embedding in vbAdvanced (https://vborg.vbsupport.ru/showthread.php?t=180916)

simunaqv 05-28-2008 09:00 PM

Including Automatic Media Embedding in vbAdvanced
 
The Automatic Media Embedding mod by The Geek does not parse media links inside vbAdvanced modules. I have tried a simple hack for that seems to work, and I am sharing this hack here.

Open file admincp/vba_cmps_admin.php

Find:

PHP Code:

case 'bb_code':
if (
$vbulletin->GPC['wysiwyg'])
{
require_once(
DIR '/includes/functions_wysiwyg.php');
$vbulletin->GPC['message'] = convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], $vbulletin->GPC['html']);


Add below:

PHP Code:

include_once('./includes/ame_bbcode.php'); 

Find:

PHP Code:

$modulehtml $bbcode_parser->do_parse(
$vbulletin->GPC['message'],
$vbulletin->GPC['html'],
$vbulletin->GPC['smilies'],
1,
$vbulletin->GPC['imgcode']
); 


Add below:

PHP Code:

$modulehtml ame_process_bbcode($parser$vbulletin->GPC['message'] , ''); 


Find:

PHP Code:

// Kill the wordwrap setting to avoid problems with HTML links/images
$vbulletin->options['wordwrap'] = 0;
include_once(
'./includes/class_bbcode.php'); 


Add below:

PHP Code:

include_once('./includes/ame_bbcode.php'); 


Find:

PHP Code:

$module['code_parsed'] = $bbcode_parser->do_parse(
$module['filename'],
$module['options']['allow_html'],
$module['options']['allow_smilies'],
1,
$module['options']['allow_image_code']
); 


Add below:

PHP Code:

$module['code_parsed'] = ame_process_bbcode($parser$module['code_parsed'] , ''); 

Please note that this would work only for the vbAdvanced modules of type 'bbcode'.

ARSamo 04-10-2011 05:42 AM

its working dear....... thanx


All times are GMT. The time now is 10:12 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.01966 seconds
  • Memory Usage 1,728KB
  • 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
  • (8)bbcode_php_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