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

imported>Gaon12
편집 요약 없음
Admin_Old (토론)
편집 요약 없음
3번째 줄: 3번째 줄:


==구현 못한 부분==
==구현 못한 부분==
* 아직까지 없습니다.
==해결됨==
===니코동 영상 가져오기===
===니코동 영상 가져오기===
# 어디서는<ref>크흠... 트리위키라 하면 알겠지...?</ref> SSL을 적용해도 잘만 가져오는데, 여기는 못 가져오네...<br/>
# 어디서는<ref>크흠... 트리위키라 하면 알겠지...?</ref> SSL을 적용해도 잘만 가져오는데, 여기는 못 가져오네...<br/>
# [https://www.mediawiki.org/wiki/Extension:EmbedVideo EmbedVideo 확장 기능]을 수정해 보았지만 어렵네...
# 그래도 수정을 완료했다!(<del>스스로 토닥이는 관리자. 잘했어. 하얗게 불태웠어.</del>)
===수정 전===
* ./extensions/EmbedVideo/classes/VideoService.php 파일이다.
<syntaxhighlight lang="PHP" highlight="2" start='215' line>
'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'
]
],
</syntaxhighlight><br/>
====수정 후====
<syntaxhighlight lang="PHP" highlight="2" start='215' line>
'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'
]
],
</syntaxhighlight><br/>
# '''<nowiki>'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;</nowiki>"'''를 '''<nowiki>'embed'=> '<iframe src="https://embed.nicovideo.jp/watch/%1s/"</nowiki>'''로 변경한다.


==해결됨==
===최근바뀜에서 문서명에 / 가 포함되어 있으면, 오류 뜨는 경우===
===최근바뀜에서 문서명에 / 가 포함되어 있으면, 오류 뜨는 경우===
# 같은 스킨을 쓰는 [[리브레 위키]]에서는 잘 되던데... 서버 설정 오류인가?<br/>
# 같은 스킨을 쓰는 [[리브레 위키]]에서는 잘 되던데... 서버 설정 오류인가?<br/>
# [https://quiple.mcsv.io/w/퀴플위키 퀴플위키]에서 해결책을 찾았다. 감사합니다. 퀴플위키!<ref>최신 버전 기준이다.</ref>
# [https://quiple.mcsv.io/w/퀴플위키 퀴플위키]에서 해결책을 찾았다. 감사합니다. 퀴플위키!<ref>최신 버전 기준이다.</ref>
====수정 전====
====수정 전====
* 리버티 스킨/js 폴더에 있는 live-resent.js를 수정한다.
<syntaxhighlight lang="JavaScript" highlight="5" start='55' line>
<syntaxhighlight lang="JavaScript" highlight="5" start='55' line>
var recentChanges, html, time, line, text;
var recentChanges, html, time, line, text;
55번째 줄: 96번째 줄:
# 아직 수정 전이므로 아래 내용은 없을 것이다.
# 아직 수정 전이므로 아래 내용은 없을 것이다.


<syntaxhighlight lang="Php">
<syntaxhighlight lang="PHP">


</syntaxhighlight>
</syntaxhighlight>
61번째 줄: 102번째 줄:
====수정 후====
====수정 후====
# [[LocalSettings.php]]의 하단 부분에 추가하자.
# [[LocalSettings.php]]의 하단 부분에 추가하자.
<syntaxhighlight lang="Php">
<syntaxhighlight lang="PHP">
$wgGenerateThumbnailOnParse = true;
$wgGenerateThumbnailOnParse = true;
</syntaxhighlight>
</syntaxhighlight>

2018년 10월 21일 (일) 20:41 판

이 문서는...

  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-resent.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 줄이기