「Cms/mediawiki/広告挿入」の版間の差分
提供: 初心者エンジニアの簡易メモ
(ページの作成:「==記事上に広告を入れる== *skins/Vector/VectorTemplate.php <?php $this->html( 'prebodyhtml' ) ?> <<nowiki />div id="bodyContent" class="mw-body-content">...」) |
|||
| 行13: | 行13: | ||
<<nowiki />!-- ここに広告を入れる --> | <<nowiki />!-- ここに広告を入れる --> | ||
</div> | </div> | ||
| + | |||
| + | ==ユーザによって広告を非表示に | ||
| + | <?php if ($this->get('username') != 'Username1'): ?> | ||
| + | <<nowiki />!-- ここに広告を入れる --> | ||
| + | <?php endif; ?> | ||
2015年5月21日 (木) 03:38時点における版
記事上に広告を入れる
- skins/Vector/VectorTemplate.php
<?php $this->html( 'prebodyhtml' ) ?>
<div id="bodyContent" class="mw-body-content">
<!-- ここに広告を入れる -->
<?php
if ( $this->data['isarticle'] ) {
記事下に広告を入れる
- skins/Vector/VectorTemplate.php
<div class="visualClear"></div>
<?php $this->html( 'debughtml' ); ?>
<!-- ここに広告を入れる -->
</div>
==ユーザによって広告を非表示に
<?php if ($this->get('username') != 'Username1'): ?>
<!-- ここに広告を入れる -->
<?php endif; ?>
