Extra Form
PHP PHP 5.5
CMS XpressEngine

유튜브(YouTube) 모듈 ver. 1.1.1.

https://xe1.xpressengine.com/?mid=download&package_id=22753675

 

을 적용해 사용하고 있는데요 트위터 공유가 되지 않네요.
요리 조리 얼씨구 절씨구 해 보아도 도무지 해결이 되지 않네요.


모바일에서 공유 주소가 들어가게 하긴 했는데  긴 주소로 들어가고

누리집 주소가 붙어 나와서 삭제해야 하는 번거로움이 생깁니다. 

주소도 스케치북 게시판과 다르게 길게 나오네요.

어디를 수정해야 되는지 도움 부탁드립니다.
 

--------------------

sns.js 


(function($) {
    "use strict";
    $.fn.snspost = function(opts) {
        var loc = "";
        opts = $.extend({}, {type:"twitter", event:"click", content:""}, opts);
        opts.content = encodeURIComponent(opts.content);
        switch(opts.type) {
            case "facebook":
                loc = "http://www.facebook.com/share.php?t="+opts.content+"&u="+encodeURIComponent(opts.url||location.href);
                break;
            case "delicious":
                loc = "http://www.delicious.com/save?v=5&noui&jump=close&url="+encodeURIComponent(opts.url||location.href)+"&title="+opts.content;
                break;
            case "twitter":
                loc = "http://twitter.com/intent/tweet?url="+opts.content;
                break;
            case "google" :
                loc = "http://plus.google.com/share?url="+encodeURIComponent(opts.url||location.href)+"?l=ko="+opts.content;
                break;
        }
        this.bind(opts.event, function() {
            window.open(loc);
            return false;
        });
    };
    $.snspost = function(selectors, action) {
        $.each(selectors, function(key,val) {
            $(val).snspost( $.extend({}, action, {type:key}) );
        });
    };
})(jQuery);

--------------------------------

_peruse.html 

<div class="peruse">
    <!--@if($video)-->
    <div class="peruse_header">
    <div class='youtubeMSkinDefaultInfo'>
        <div style='font-size:20px'> &nbsp; {$video[snippet][title]} </div></div>
        
        
        <p class="peruse_meta">
            <span class="peruse_channel"><a href="{$video[channelUrl]}" target="_blank">&nbsp;{$video[snippet][channelTitle]}</a></span>
            <span class="peruse_date">{date("Y-m-d h:i:s", $video[snippet][kst])}</span>
        </p>
    </div>
    <div class="peruse_contents">
        <div class="peruse_player">
            

 


        </div>
        <div class="peruse_description">
            <p>{nl2br($video[snippet][description])}</p>
        </div>
    </div>
    <div class="peruse_footer">
        <div class="peruse_sns">
            <ul>
                <li><a href="http://facebook.com/" class="facebook tooltip"><i class="xi-facebook"></i></a></li>
                <li><a href="#" class="google"><i class="xi-google-plus"></i></a></li>
                <li><a href="http://twitter.com/" class="twitter"> <i class="xi-twitter"></i></a></li>
            </ul>
            <script>
                var sTitle = "{$video[snippet][title]}";
                jQuery(function($){
                    $(".twitter").snspost({
                        type : "twitter",
                        content : sTitle + " {$video [fullUrl]}"
                    });
                    $(".facebook").snspost({
                        type : "facebook",
                        content : sTitle
                    });
                    $(".google").snspost({
                        type : "google",
                        content : sTitle
                    });
                });
            </script>            
        </div>

 

------------------

그리고 첨부 사진 파일  노출에 대해 찾아 보니 이걸 발견했는데
이걸 연구해 보면 노출이 가능한지 궁굼하네요.
 살펴 보았는데 너무 어렵네요ㅠ 
https://xetown.com/tips/214874

점심 때가 되었네요. 식사 맛있게 하시고요^^

  • profile
    접해보지 못한 모듈이라 잘은 모르겠습니다.
    그래도 다른 게시판 스킨에 나와 있는 링크 공유 방식을 차용해 이런 식으로 바꿔보면 어떨까 싶습니다.
    $video [fullUrl]가 어떤 식으로 풀어지는지 모르겠지만 트위터에 공유될 때 & 같은 특수기호가 잘 변환이 되는 게 관건일 것 같습니다.
    안 되면... 또 뭐 어딘가 길이 있겠죠 하하하하;;;;

    loc = "http://twitter.com/intent/tweet?url="+opts.content;
    =>
    loc = "//twitter.com/share?text="+opts.content;

    content : sTitle + " {$video [fullUrl]}"
    =>
    content : sTitle + "&url={$video [fullUrl]}"
  • profile

    답변 감사합니다.
    아쉽게도  해결은 되지 않았습니다 

    {$video[fullUrl]} 이 도메인을 포함해서 게시물 주소가 출력이 됩니다.
    ​​​​​​​
    dunun.orghttp://dunun.org/index.php?mid=youtube_LoAo97&video_id=iGI18gElhRo 
     

  • profile profile

    맨 앞에 도메인이 왜 들어가는 걸까요? ㅉ
    {getUrl('mid', $mid, 'video_id', $videoId)} 로 하면 어떻게 되나요?

     

    아, 그냥 {$video[url]} 로 해도 될 것 같습니다.

  • profile profile
    아 도메인은 사라졌는데 주소가 조금 잘 못 된 거 같아요^^
    쫌 만 어찌 하면 ㅋㅋ
    something clean and safe 작업과정 http://dunun.org/index.php?mid=youtube_LoAo97&amp;category=0&amp;no=1&amp;video_id=iGI18gElhRo
  • profile profile
    그럼 이렇게 해보실까요..

    loc = "http://twitter.com/intent/tweet?url="+opts.content;
    =>
    loc = "//twitter.com/share?text="+opts.content;

    content : sTitle + " {$video [fullUrl]}"
    =>
    content : encodeURIComponent(sTitle) + "&url={$video[url]}"
  • profile profile
    알려 주신 것으로 공유해 보니 해답이 보였습니다 ㅋㅋ
    그래서 이렇게 수정해 보니 성공 했습니다^^

    sTitle + "{$video[url]}"

    감사합니다^^
  • profile profile
    에효, 저는 뭐가 뭔지 잘 모르겠습니다ㅋㅋㅋ 어쨌든 잘 되셨다니 다행이에요~
  • profile profile
    어쩌다가 성공하니 희열이 있네요 ㅋㅋ
    가상공간에서 집짓기는 수정을 거듭하면 언젠가는 구축 된다는 것에 매력이 있는 거 같아요.
    포기했다가 다시 도전하고 ㅋㅋ
  • profile profile

    네, 저도 그 포인트에 빠져버렸어요.
    뭔가 안 풀려도 어딘가에 반드시 답이 있다는 점이요.
    도파민 뿜뿜이죠. 뭔가 도피성 오락 같은 느낌도 들 정도로요.
    평상시 답없는 분야에 있는 사람일수록 이렇게 좌뇌도 쓰면서 밸런스를 맞추는 게 좋은 것 같습니다ㅎㅎ

  • profile profile
    ㅎㅎ 네
    제가 하는 예술이 개념 예술에 속하기도 해서 이렇게
    도전? 할 수 있는 거 같아요^^
  • profile profile

    윤삼님 이게 또 pc 버전에서는 주소가 요로코롬 나오네요
    오류를 제거 하는 건 참 멀고도 험하네요.ㅠㅠ

    상징적 가치로서의 전환 작업과정 1시간8분의 기록http://dunun.org/index.php?mid=youtube_LoAo97&video_id=ZmWAWTvitEE https://twitter.com/share?text=%EC%83%81%EC%A7%95%EC%A0%81%20%EA%B0%80%EC%B9%98%EB%A1%9C%EC%84%9C%EC%9D%98%20%EC%A0%84%ED%99%98%20%20%EC%9E%91%EC%97%85%EA%B3%BC%EC%A0%95%201%EC%8B%9C%EA%B0%848%EB%B6%84%EC%9D%98%20%EA%B8%B0%EB%A1%9Dhttp%3A%2F%2Fdunun.org%2Findex.php%3Fmid%3Dyoutube_LoAo97%26video_id%3DZmWAWTvitEE

  • profile profile
    트위터에 전송한 content 가 반복되는가 보군요.
    잘은 모르겠지만 어제 성공하셨던 부분에서 url이 파라미터로 넘어가지 않아서 생기는 문제일 수도 있겠다 싶습니다.
    그래도 pc, 모바일이 이렇게 계속 다르게 나온다면 어쩌면 모바일 기기 체크하는 함수를 써서 트위터에 보낸 content 값을 서로 다르게 가져가야 할 수도 있을 것 같아요.
    저는 정말 잘 모르겠어요ㅜㅜ
  • profile profile
    아네 함수가 달라야 하는 군요
    크롬 브라우저만 저리 되더라고요
    요리 조리 더 시도 해 봐야겠네요.
    답변 감사합니다. 연휴 잘 보내세요^^