「Cms/mediawiki/広告挿入」の版間の差分
提供: 初心者エンジニアの簡易メモ
| 行14: | 行14: | ||
</div> | </div> | ||
| − | ==ユーザによって広告を非表示に | + | ==ユーザによって広告を非表示に== |
<?php if ($this->get('username') != 'Username1'): ?> | <?php if ($this->get('username') != 'Username1'): ?> | ||
<<nowiki />!-- ここに広告を入れる --> | <<nowiki />!-- ここに広告を入れる --> | ||
<?php endif; ?> | <?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; ?>
