미디어위키 MobileFrontend 별 아이콘 숨기기

Jmnote bot (토론 | 기여)님의 2020년 11월 2일 (월) 02:58 판 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
<img src='http://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/X_mark.svg/32px-X_mark.svg.png'> 이 문서는 더 이상 지원되지 않는 기능을 다루고 있습니다.

1 개요[ | ]

미디어위키 MobileFrontend 별 아이콘 숨기기
미디어위키 MobileFrontend 문서 주시하기 별 아이콘 숨기기
Watchstar 아이콘 숨기기
  • 더 이상 유효하지 않은 이슈
  • MobileFrontend 버전이 올라가면서 바보같은 별 아이콘이 없어졌음
MobileFrontend 20e2e16 버전에서 없는 것을 확인함

2 별 아이콘 숨기기[ | ]

방법 2를 권장한다.

2.1 방법 1: MobileFrontend.php 수정[ | ]

  • MobileFrontend.php에서 mf-watchstar.css 부분을 없애면 된다.
변경 전
	'styles' => array(
		'stylesheets/modules/mf-references.css',
		'stylesheets/modules/mf-cleanuptemplates.css',
		'stylesheets/modules/mf-watchstar.css',
		'stylesheets/modules/mf-photo.css',
	),
변경 후
	'styles' => array(
		'stylesheets/modules/mf-references.css',
		'stylesheets/modules/mf-cleanuptemplates.css',
		/*'stylesheets/modules/mf-watchstar.css',*/
		'stylesheets/modules/mf-photo.css',
	),

2.2 방법 2: SkinMobileTemplate.php 수정[ | ]

  • MobileFrontend.php 는 그대로 두고 /includes/skins/SkinMobileTemplate.php 의 searchBox() 함수를 수정해도 된다.
변경 전
	private function searchBox() {
		if ( $this->data['isAlphaGroupMember'] ) {
			$placeholder = wfMessage( 'mobile-frontend-placeholder-alpha' )->text();
		} else if ( $this->data['isBetaGroupMember'] ) {
			$placeholder = wfMessage( 'mobile-frontend-placeholder-beta' )->text();
		} else {
			$placeholder = wfMessage( 'mobile-frontend-placeholder' )->text();
		}
		?>
		<?php $this->html( 'menuButton' ) ?>
		<form id="mw-mf-searchForm" action="<?php $this->text( 'scriptUrl' ) ?>" class="search-box" method="get">
			<input type="hidden" value="Special:Search" name="title" />
			<div id="mw-mf-sq" class="divclearable">
				<input type="search" name="search" id="mw-mf-search" size="22" value="<?php $this->text( 'searchField' )
					?>" autocomplete="off" maxlength="1024" class="search"
					placeholder="<?php echo $placeholder ?>"
					/>
				<input class='searchSubmit' type="submit" value="<?php $this->msg( 'mobile-frontend-search-submit' ) ?>">
			</div>
		</form>
		<div id="mw-mf-menu-page"></div>
		<?php
	}
변경 후
	private function searchBox() {
		if ( $this->data['isAlphaGroupMember'] ) {
			$placeholder = wfMessage( 'mobile-frontend-placeholder-alpha' )->text();
		} else if ( $this->data['isBetaGroupMember'] ) {
			$placeholder = wfMessage( 'mobile-frontend-placeholder-beta' )->text();
		} else {
			$placeholder = wfMessage( 'mobile-frontend-placeholder' )->text();
		}
		?>
		<?php $this->html( 'menuButton' ) ?>
		<form id="mw-mf-searchForm" action="<?php $this->text( 'scriptUrl' ) ?>" class="search-box" method="get">
			<input type="hidden" value="Special:Search" name="title" />
			<div id="mw-mf-sq" class="divclearable">
				<input type="search" name="search" id="mw-mf-search" size="22" value="<?php $this->text( 'searchField' )
					?>" autocomplete="off" maxlength="1024" class="search"
					placeholder="<?php echo $placeholder ?>"
					/>
				<input class='searchSubmit' type="submit" value="<?php $this->msg( 'mobile-frontend-search-submit' ) ?>">
			</div>
		</form>
		<!--div id="mw-mf-menu-page"></div-->
		<?php
	}
<div id="mw-mf-menu-page"></div>를 주석처리하였다.

3 검색 창 키우기[ | ]

  • 오른쪽에 별 아이콘이 없어졌지만, 그 공간은 그대로 남아있다.
  • 검색 창을 오른쪽으로 좀 더 키우려면 /stylesheets/modules/mf-search.css 를 수정하자.
변경 전
.search-box {
  padding: 0 40px 0 40px;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
}
변경 후
.search-box {
  /*padding: 0 40px 0 40px;*/
  padding: 0 10px 0 40px;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
}
→ 오른쪽 padding이 40px → 10px으로 감소.
→ 즉 검색창이 오른쪽으로 30px 커진다.

4 같이 보기[ | ]

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