"미디어위키 MobileFrontend 모든 문단 펼치기"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
 
(사용자 2명의 중간 판 7개는 보이지 않습니다)
1번째 줄: 1번째 줄:
{{테스트|MediaWiki 1.23.3, MobileFrontend 20e2e16}}
==개요==
==개요==
;Stop collapsing sections by default
;Stop collapsing sections by default
5번째 줄: 6번째 줄:
;MobileFrontend 모든 섹션 펼치기
;MobileFrontend 모든 섹션 펼치기
*MobileFrontend는 기본적으로 모든 섹션을 접어두고 클릭시에 펼치지게 되어 있다.
*MobileFrontend는 기본적으로 모든 섹션을 접어두고 클릭시에 펼치지게 되어 있다.
*2013-10-13 현재, 그와 관련된 설정 변수가 없어서 하드 코딩해야 한다.


==방법==
==방법==
includes/MobileFormatter.php 의 enableExpandableSections 함수를 수정하면 된다.
*[[LocalSettings.php]]에 MobileFrontend 불러오는 부분 하단에 다음 내용을 추가하면 된다.<ref>예전에는 그와 관련된 설정 변수가 없어서 includes/MobileFormatter.php 파일을 하드코딩 수정(<code>$this->expandableSections = false;</code>)했었다. 그렇게 하면 문단이 많을 때 펼쳐지지 않는 문제가 생긴다. (문단 많으면 자바스크립트에 의해 동적으로 펼쳐지는데 그게 안됨)</ref>
 
<syntaxhighlight lang='php' highlight='2'>
;변경 전
require_once "$IP/extensions/MobileFrontend/MobileFrontend.php";
<source lang='php'>
$wgMFCollapseSectionsByDefault = false;
public function enableExpandableSections( $flag = true ) {
</syntaxhighlight>
$this->expandableSections = $flag;
}
</source>
 
;변경 후
<source lang='php'>
public function enableExpandableSections( $flag = true ) {
//$this->expandableSections = $flag;
$this->expandableSections = false;
}
</source>


==같이 보기==
==같이 보기==
*[[미디어위키 MobileFrontend]]
*[[미디어위키 MobileFrontend]]


==참고 자료==
==주석==
<references/>
 
==참고==
*http://thread.gmane.org/gmane.org.wikimedia.mobile/1045
*http://thread.gmane.org/gmane.org.wikimedia.mobile/1045
*https://www.mediawiki.org/wiki/Extension_talk:MobileFrontend
*https://www.mediawiki.org/wiki/Extension_talk:MobileFrontend
*http://stackoverflow.com/questions/24279670/mediawiki-mobilefrontend-stop-collapsing-sections-by-default


[[분류: 미디어위키]]
[[분류: 미디어위키]]

2020년 11월 2일 (월) 02:58 기준 최신판

1 개요[ | ]

Stop collapsing sections by default
default status of Sections as uncollapsed
미디어위키 MobileFrontend 모든 문단 펼치기
MobileFrontend 모든 섹션 펼치기
  • MobileFrontend는 기본적으로 모든 섹션을 접어두고 클릭시에 펼치지게 되어 있다.

2 방법[ | ]

  • LocalSettings.php에 MobileFrontend 불러오는 부분 하단에 다음 내용을 추가하면 된다.[1]
require_once "$IP/extensions/MobileFrontend/MobileFrontend.php";
$wgMFCollapseSectionsByDefault = false;

3 같이 보기[ | ]

4 주석[ | ]

  1. 예전에는 그와 관련된 설정 변수가 없어서 includes/MobileFormatter.php 파일을 하드코딩 수정($this->expandableSections = false;)했었다. 그렇게 하면 문단이 많을 때 펼쳐지지 않는 문제가 생긴다. (문단 많으면 자바스크립트에 의해 동적으로 펼쳐지는데 그게 안됨)

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}