가온 위키:기능 구현 불가-누가 해결책을 알려주세요!: 두 판 사이의 차이

Admin_Old (토론)
편집 요약 없음
Admin_Old (토론)
m편집 요약 없음
50번째 줄: 50번째 줄:
# [https://quiple.mcsv.io/w/퀴플위키 퀴플위키]에서 해결책을 찾았다. 감사합니다. 퀴플위키!<ref>최신 버전 기준이다.</ref>
# [https://quiple.mcsv.io/w/퀴플위키 퀴플위키]에서 해결책을 찾았다. 감사합니다. 퀴플위키!<ref>최신 버전 기준이다.</ref>
====수정 전====
====수정 전====
* 리버티 스킨/js 폴더에 있는 live-resent.js를 수정한다.
* 리버티 스킨/js 폴더에 있는 live-recent.js를 수정한다.


<syntaxhighlight lang="JavaScript" highlight="5" start='55' line>
<syntaxhighlight lang="JavaScript" highlight="5" start='55' line>
68번째 줄: 68번째 줄:
}
}
</syntaxhighlight><br/>
</syntaxhighlight><br/>
====수정 후====
====수정 후====
<syntaxhighlight lang="JavaScript" highlight="5" start='55' line>
<syntaxhighlight lang="JavaScript" highlight="5" start='55' line>

2018년 11월 22일 (목) 14:47 판

이 문서는...

  1. 답답한 우리의 가온 위키 관리자가 구현하지 못해, 착한 유저가 해결책을 제시한 경우, 감사의 표시로 이곳과 가온 위키 커뮤니티에 표시하는 곳입니다.

구현 못한 부분

  • 아직까지 없습니다.

해결됨

니코동 영상 가져오기

  1. 어디서는[1] SSL을 적용해도 잘만 가져오는데, 여기는 못 가져오네...
  2. EmbedVideo 확장 기능을 수정해 보았지만 어렵네...
  3. 그래도 수정을 완료했다!(스스로 토닥이는 관리자. 잘했어. 하얗게 불태웠어.)

수정 전

  • ./extensions/EmbedVideo/classes/VideoService.php 파일이다.
'nico' => [
			'embed'			=> '<iframe srcdoc="&lt;script type=&quot;text/javascript&quot; src=&quot;http://ext.nicovideo.jp/thumb_watch/%1$s?w=%2$d&amp;h=%3$d&quot;&gt;&lt;/script&gt;" width="%2$d" height="%3$d" frameborder="0" allowFullScreen="true"></iframe>',
			'default_width'	=> 640,
			'default_ratio'	=> 1.59609120521173, // (490 / 307)
			'https_enabled'	=> false,
			'url_regex'		=> [
				'#nicovideo\.jp/watch/((?:[a-zA-Z]{2})?[\d]+)#is'
			],
			'id_regex'		=> [
				'#^((?:[a-zA-Z]{2})?[\d]+)$#is'
			]
		],


수정 후

'nico' => [
			'embed'			=> '<iframe src="https://embed.nicovideo.jp/watch/%1s/" width="%2$d" height="%3$d" frameborder="0" allowFullScreen="true"></iframe>',
			'default_width'	=> 640,
			'default_ratio'	=> 1.59609120521173, // (490 / 307)
			'https_enabled'	=> true,
			'url_regex'		=> [
				'#nicovideo\.jp/watch/((?:[a-zA-Z]{2})?[\d]+)#is'
			],
			'id_regex'		=> [
				'#^((?:[a-zA-Z]{2})?[\d]+)$#is'
			]
		],


  1. 'embed'=> '<iframe srcdoc="<script type="text/javascript" src="http://ext.nicovideo.jp/thumb_watch/%1$s?w=%2$d&h=%3$d"></script>"'embed'=> '<iframe src="https://embed.nicovideo.jp/watch/%1s/"로 변경한다.

최근바뀜에서 문서명에 / 가 포함되어 있으면, 오류 뜨는 경우

  1. 같은 스킨을 쓰는 리브레 위키에서는 잘 되던데... 서버 설정 오류인가?
  2. 퀴플위키에서 해결책을 찾았다. 감사합니다. 퀴플위키![2]

수정 전

  • 리버티 스킨/js 폴더에 있는 live-recent.js를 수정한다.
var recentChanges, html, time, line, text;
			recentChanges = data.query.recentchanges;
			html = recentChanges.map( function ( item ) {
				time = new Date( item.timestamp );
				line = '<li><a class="recent-item" href = "' + ( mw.config.get( 'wgArticlePath' ) ).replace( '$1', encodeURIComponent( item.title ) ) + '" title="' + item.title + '">[' + timeFormat( time ) + '] ';
				text = '';
				if ( item.type === 'new' ) {
					text += '[New]';
				}
				text += item.title;
				if ( text.length > 13 ) {
					text = text.substr( 0, 13 );
					text += '...';
				}


수정 후

var recentChanges, html, time, line, text;
			recentChanges = data.query.recentchanges;
			html = recentChanges.map( function ( item ) {
				time = new Date( item.timestamp );
				line = '<li><a class="recent-item" href = "' + ( mw.config.get( 'wgArticlePath' ) ).replace( '$1', encodeURI( item.title ) ) + '" title="' + item.title + '">[' + timeFormat( time ) + '] ';
				text = '';
				if ( item.type === 'new' ) {
					text += '[New]';
				}
				text += item.title;
				if ( text.length > 13 ) {
					text = text.substr( 0, 13 );
					text += '...';
				}


  1. 59번째 줄의 encodeURIComponent( item.title ) )에서 encodeURIComponent를 encodeURI로 변경

이미지 크기 설정시 파일 링크만 뜨는 현상

  1. [[파일:updates.png|100px]] 이렇게 하면 일반 문서처럼 링크로 뜬다.
  2. 서버 이전 전에는 이러지 않았는데...
  3. 미디어위키 헬프 데스크에서 찾았다.

수정 전

  1. 미디어위키의 루트 폴더에 있는 LocalSettings.php를 수정한다.
  2. 아직 수정 전이므로 아래 내용은 없을 것이다.

수정 후

  1. LocalSettings.php의 하단 부분에 추가하자.
$wgGenerateThumbnailOnParse = true;
  1. 그리고 미디어위키 버전이 1.30 이상인 경우, 썸네일을 재생성하자.
  2. 미디어위키의 루트 폴더에서 maintenance 폴더로 이동한 뒤, 아래의 명령어를 입력하자.
php rebuildImages.php

하고 싶은말

  1. 이 오류는 미디어위키 1.27 버전에서는 없던 오류이므로 1.30 이상 버전의 오류같다.
  2. 물론 썸네일은 Imagemagick가 미리 설치 및 미디어위키에서 미리 설정 되어 있어야 한다

구현한 기능

  • 아직 존재하지 않습니다.

각주

  1. 크흠... 트리위키라 하면 알겠지...?
  2. 최신 버전 기준이다.
• 현재 페이지 URL 줄이기