- Sau khi cài đặt và cấu hình BbCodeManager cho gkPlugins, em đã chạy thành công, nhưng không biết sao nó cứ hiện mấy dòng chữ kế bên khung video. Anh nào giúp em với - Code trong file Default.php của em trong đường dẫn : KingK\BbCodeManager\BbCode\Formatter Mã: <?php class KingK_BbCodeManager_BbCode_Formatter_Default { public static function parseTagGkPlugins(array $tag, array $rendererStates, &$parentClass){ //========= config ========== $width = '600'; $height = '400'; $player = 'gkplugins/player.swf'; $proxy = 'gkplugins/plugins/proxy.swf'; //=========================== $rand = rand(0,999999999); $content = $parentClass->renderSubTree($tag['children'], $rendererStates); if(strpos($content,'href="')>0){ $content = explode('href="',$content); $content = $content[1]; } $content = explode("[/",$content); $linkpx = $content[0]; $flashvars = 'plugins='.$proxy.'&proxy.link='.$linkpx; $embed = '<object id="flashplayer'.$rand.'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'.$width.'" height="'.$height.'"> <param name="movie" value="'.$player.'" /> <param name="allowFullScreen" value="true" /> <param name="allowScriptAccess" value="always" /> <param name="FlashVars" value="'.$flashvars.'" /> <embed name="flashplayer'.$rand.'" src="'.$player.'" FlashVars="'.$flashvars.'" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="'.$width.'" height="'.$height.'" /> </object>'; return $embed; } public static function parseTagFlash(array $tag, array $rendererStates, &$parentClass) { if (!empty($tag['option']) && $parentClass->parseMultipleOptions($tag['option'])) { $attributes = $parentClass->parseMultipleOptions($tag['option']); $attributes['width'] = $attributes[0]; $attributes['height'] = $attributes[1]; $src = $tag['children'][0]; } else { $attributes['width'] = '550'; $attributes['height'] = '400'; $src = $tag['children'][0]; } return '<object width="' . $attributes['width'] . '" height="' . $attributes['height'] . '"> <param name="movie" value="' . $src . '"> <embed src="' . $src . '" width="' . $attributes['width'] . '" height="' . $attributes['height'] . '"> </embed> </object>'; } public static function parseTagUser(array $tag, array $rendererStates, &$parentClass) { if(!isset($tag['children'][0])) { return ''; } //Strip BbCodes $tag['children'][0] = preg_replace('#\[/?\S+?\]#i', '', $tag['children'][0]); $userModel = XenForo_Model::create('XenForo_Model_User'); if ($tag['option'] != NULL) { $userid = $tag['option']; } else { $userid = XenForo_Model_User::getUserIdFromUser($userModel->getUserByName($tag['children'][0])); } $url = XenForo_Link::buildPublicLink('members', array('user_id' => $userid, 'username' => $tag['children'][0])); list($class, $target) = XenForo_Helper_String::getLinkClassTarget($url); $class = $class ? " class=\"$class\"" : ''; $target = $target ? " target=\"$target\"" : ''; $noFollow = (empty($rendererStates['noFollowDefault']) ? '' : ' rel="nofollow"'); return '<a href="' . htmlspecialchars($url) . '"' . $target . $class . $noFollow . '>' . $tag['children'][0] . '</a>'; } public static function parseTagSpoiler(array $tag, array $rendererStates, &$parentClass) { if($tag['option'] != NULL) { if(is_array($parentClass->parseMultipleOptions($tag['option'])) && count($parentClass->parseMultipleOptions($tag['option'])) > 1) { $attributes = $parentClass->parseMultipleOptions($tag['option']); $buttonText = htmlspecialchars($attributes[0]); $hideText = htmlspecialchars($attributes[1]); $noScriptHelp = ''; } else { $tag['option'] = htmlspecialchars($tag['option']); $buttonText = $tag['option'] . new XenForo_Phrase('bbcm_bbcode_spoiler_open'); $hideText = $tag['option'] . new XenForo_Phrase('bbcm_bbcode_spoiler_close'); $noScriptHelp = '<noscript><span class="bbcm_spoil_noscript_hastitle">' . $tag['option'] . '</span> <span class="bbcm_spoil_noscript_desc">' . new XenForo_Phrase('bbcm_bbcode_spoiler_noscript_desc_generic') . '</span></noscript>'; } } else { $buttonText = new XenForo_Phrase('bbcm_bbcode_spoiler_showspoiler'); $hideText = new XenForo_Phrase('bbcm_bbcode_spoiler_hidespoiler'); $noScriptHelp = '<noscript><span class="bbcm_spoil_noscript_hastitle">' . new XenForo_Phrase('bbcm_bbcode_spoiler_title') . '</span> <span class="bbcm_spoil_noscript_desc">' . new XenForo_Phrase('bbcm_bbcode_spoiler_noscript_desc') . '</span></noscript>'; } $content = $parentClass->renderSubTree($tag['children'], $rendererStates); $output = '<div class="bbCodeBlock bbCodeQuote bbcmSpoilerBlock"> <div class="attribution type">' . $noScriptHelp . ' <span class="button JsOnly"> <span class="bbcm_spoiler_show">' . $buttonText . '</span> <span class="bbcm_spoiler_hide" style="display:none">' . $hideText . '</span> </span> </div> <div class="quotecontent"> <div class="bbcm_spoiler_noscript"><blockquote>' . $content . '</blockquote></div> </div> </div>'; return $output; } public static function templateRawTag(&$content, array &$options, &$templateName, &$fallBack, array $rendererStates, $parentClass) { if($rendererStates['canUseBbCode'] === true && !XenForo_Application::get('options')->get('Bbcm_TagsMap_Disable')) { $content = htmlspecialchars_decode($content); } $fallBack = $content; } } ?>
Đây là folder em để ngang hàng trang index. Không biết có dư file hay đoạn code nào không mà nó thừa mấy dòng chữ đó