Extra Form
PHP PHP 7.4
CMS Rhymix 2.x

https://xetown.com/index.php?document_srl=1533299&mid=point_contents&rnd=1656343#comment_1656343

 

해당 스케쥴 모듈을 최신판으로 사용하고 있습니다.

 

미디어 임베드 설정에서 대상 지정도 제대로 해놨지만, 스케쥴 글쓰기에서만 미디어 임베드가 되지 않습니다.

 

그냥 링크로만 올라갑니다. 혹시몰라 다른 게시판에도 작성 테스트를 해봤는데 다른게시판은 문제가 없네요

 

저만 그런건지 혹시 다른 사용자분들은 어떤지 궁금합니다. 또한, 해당 문제와 관련해 해결법을 알 수 있으면 좋겠습니다.

  • profile

    스케줄모듈은 임베드적용대상인 게시판이 아니기 때문에 적용이 안되는게 정상입니다.

     

    애드온에서 act 액션중 스케줄모듈의 읽는 데이터를 추가해야 정상적으로 작동할듯 합니다.

  • profile profile
    감사합니다~!
  • profile

    지난번에 @눈팅용 님도 찾으셨던 것 같은데, 또 찾으시니 ^^;;

    람보님 말씀대로 손을 좀 봤습니다.

    media_embed.addon.php 파일 전체를 아래의 내용으로 바꿔보세요.

     

    <?php
    if ( !defined('RX_VERSION') )
    {
    return;
    }
    if ( $called_position !== 'after_module_proc' || !in_array($this->module, array('board', 'schedule')) )
    {
    return;
    }
    if ( !in_array($this->act, array(
    'dispBoardContent', 'dispBoardWrite', 'dispBoardWriteComment', 'dispBoardReplyComment', 'dispBoardModifyComment', 'dispBoardDeleteComment',
    'dispScheduleContent', 'dispScheduleInsert')) )
    {
    return;
    }
    
    // 애드온 커스텀 스크립트 전달
    if ( $addon_info->script )
    {
    Context::addHtmlFooter('<script>'. $addon_info->script .'</script>');
    }
    
    // 본문 view 모드
    if ( $this->act === 'dispBoardContent' || $this->act === 'dispScheduleContent' )
    {
    $oDocument = Context::get('oDocument');
    // 문서번호 없으면(목록만 있으면) 리턴
    if ( !$oDocument->document_srl && !Context::get('schedule_srl') )
    {
    return;
    }
    
    Context::addCssFile(__DIR__ . '/css/default.css');
    Context::addCssFile(__DIR__ . '/css/custom.css');
    Context::addJsFile(__DIR__ . '/js/default.js');
    
    $editor_config = getModel('editor')->getEditorConfig($this->module_srl);
    // 댓글 허용시에만 임베딩 활성화
    if ( in_array($editor_config->comment_editor_skin, array('ckeditor', 'froalaeditor')) )
    {
    if ( $oDocument && $oDocument->get('comment_status') !== 'ALLOW' ) {
    return;
    }
    Context::addJsFile(__DIR__ . '/js/_' . $editor_config->comment_editor_skin . '.js');
    }
    }
    // 본문 view 외 모드
    else
    {
    // 본문 쓰기 모드
    if ( $this->act === 'dispBoardWrite' || $this->act === 'dispScheduleInsert' )
    {
    $editor_config = getModel('editor')->getEditorConfig($this->module_srl);
    if ( in_array($editor_config->editor_skin, array('ckeditor', 'froalaeditor')) )
    {
    Context::addCssFile(__DIR__ . '/css/default.css');
    Context::addCssFile(__DIR__ . '/css/custom.css');
    Context::addJsFile(__DIR__ . '/js/_' . $editor_config->editor_skin . '.js');
    }
    }
    // 댓글 삭제 모드
    else if ( $this->act === 'dispBoardDeleteComment' )
    {
    Context::addCssFile(__DIR__ . '/css/default.css');
    Context::addCssFile(__DIR__ . '/css/custom.css');
    Context::addJsFile(__DIR__ . '/js/default.js');
    }
    // 댓글 쓰기, 댓글 수정, 대댓글 쓰기 모드
    else
    {
    // 대댓글 쓰기 모드일 때만 
    if ( $this->act === 'dispBoardReplyComment' )
    {
    Context::addCssFile(__DIR__ . '/css/default.css');
    Context::addCssFile(__DIR__ . '/css/custom.css');
    Context::addJsFile(__DIR__ . '/js/default.js');
    }
    
    $editor_config = getModel('editor')->getEditorConfig($this->module_srl);
    if ( in_array($editor_config->comment_editor_skin, array('ckeditor', 'froalaeditor')) )
    {
    // (대댓글 쓰기 모드에선 이미 css를 로드했으므로) 그 외의 경우(댓글 쓰기/수정)에만 로드함
    if ( $this->act !== 'dispBoardReplyComment' )
    {
    Context::addCssFile(__DIR__ . '/css/default.css');
    Context::addCssFile(__DIR__ . '/css/custom.css');
    }
    Context::addJsFile(__DIR__ . '/js/_' . $editor_config->comment_editor_skin . '.js');
    }
    }
    }
    
    // 애드온 기본 변수 정리 및 전달
    $embed_leave_link = ( $addon_info->leave_link === 'Y' ) ? 1 : 0;
    $embed_link_style = ( $addon_info->link_style ) ? $addon_info->link_style : '<p>%text%</p>';
    
    $script = '<script>
    var embed_leave_link = '. $embed_leave_link .';
    var embed_link_style = \''. $embed_link_style .'\';
    </script>';
    Context::addHtmlHeader($script);

     

    한번 테스트해보세요.

    저는 아래와 같이 잘 나오네요.

    https://dev.aporia.blog/schedule/list_style/list/26690

     

    * 다만, 미디어 임베드 애드온의 타 모듈 적용은 향후 버전에는 적용이 안 될 수도 있으니 잘 저장해두시면 좋을 것 같습니다.

     

  • profile profile
    아이고 번거롭게 해드려서 죄송합니다 좀만 더 찾아보고 질문드리는 것을 ㅠㅠㅠ
  • profile profile
    감사합니다 덕분에 저도 문제 해결했습니다!