Nhờ các bác pro giúp đỡ

Thảo luận trong 'Style & Template Questions' bắt đầu bởi nhoccute, 2/11/12.

1votes
5/5, 1 vote

  1. nhoccute

    nhoccute Member

    Bài viết:
    412
    Likes :
    67
    Tình hình là thế này em có cài bbcode play ghackiem em cài rồi trong hosting thì như này
    KingK\BbCodeManager\BbCode\Formatter\Default.php

    file ;Default.php đã sửa giờ em muốn cài thêm
    Galleria nhưng nó cũng có file
    Default.php
    giờ em không biết phải cài sao nữa để em dùng đc thêm
    Galleria
    của tinhte.vn vì bbcode play gkplugins vì 2 thằng đều chung nhau
    Default.php giờ đại ca nào biết chèn cho hai thằng này đều chung 1 nhà và đều chạy tốt không.


    Đây là của
    play gkplugins



    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;
        }
    }
     
    ?>


    Đây là của galleria

    Mã:
    <?php
     
    class KingK_BbCodeManager_BbCode_Formatter_Default
    {
        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)
        {
            $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 = $attributes[0];
                    $hideText = $attributes[1];
                }
                else
                {
                    $buttonText = $tag['option'];
                    $hideText = new XenForo_Phrase('bbcm_hideSpoiler');
                }
            }
            else
            {
                $buttonText = new XenForo_Phrase('bbcm_showSpoiler');
                $hideText = new XenForo_Phrase('bbcm_hideSpoiler');
            }
     
            $content = $parentClass->renderSubTree($tag['children'], $rendererStates);
            $tagId = uniqid();
           
            $output = '<div class="bbCodeBlock bbCodeQuote">
                            <div align="center" class="attribution type">
                                <input id="spoiler_' . $tagId . '" class="button" type="button" value="' . htmlspecialchars($buttonText) . '" onclick="
                                    if (this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display != \'\')
                                    {
                                        this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display = \'\';
                                        this.innerText = \'\'; this.value = \'' . addslashes($hideText) . '\';
                                    }
                                    else
                                    {
                                        this.parentNode.parentNode.getElementsByTagName(\'div\')[1].getElementsByTagName(\'div\')[0].style.display = \'none\';
                                        this.innerText = \'\'; this.value = \'' . addslashes($buttonText) . '\';
                                    }" />
                            </div>
                            <div class="quotecontent">
                                <div style="display:none;"><blockquote>' . $content . '</blockquote></div>
                            </div>
                        </div>';
            return $output;
        }
       
        public static function parseTagGalleria(array $tag, array $rendererStates, &$parentClass)
        {
            if ($tag['option'] != NULL)
            {$tagId = $tag['option'];}
            else
            {$tagId = uniqid();}
            $content = $parentClass->renderSubTree($tag['children'], $rendererStates);
            return '<div id="galleria-'.$tagId.'" align="center">'.$content.'</div><script>$("#galleria-'.$tagId.'").galleria({width:640,height:480,showInfo:false})</script>';
        }
    }
     
    ?>



    Mong bác nào biết cách cho hai thằng này ghép vào nhau đều chạy tốt. xin chân thành cảm ơn

     
    Đang tải...
  2. nhoccute

    nhoccute Member

    Bài viết:
    412
    Likes :
    67
    upppppp
     
  3. nhoccute

    nhoccute Member

    Bài viết:
    412
    Likes :
    67
    Ai am hiểu hộ em phát
     
  4. nhoccute

    nhoccute Member

    Bài viết:
    412
    Likes :
    67
    cuối cùng là tự Trả lời bó tay
     
comments powered by Disqus

Chia sẻ trang này

Đang tải...