Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/exizt/mediawiki-extension-aetgoogleadsense
https://github.com/exizt/mediawiki-extension-aetgoogleadsense
mediawiki mediawiki-extension
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/exizt/mediawiki-extension-aetgoogleadsense
- Owner: exizt
- License: gpl-2.0
- Created: 2022-10-16T04:52:13.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-09T01:17:39.000Z (almost 1 year ago)
- Last Synced: 2024-11-10T01:18:13.639Z (about 2 months ago)
- Topics: mediawiki, mediawiki-extension
- Language: PHP
- Homepage:
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AetGoogleAdSense
The AetGoogleAdSense extension lets you display Google AdSense in wiki pages and you can set up some settings.- Link: https://github.com/exizt/mediawiki-extension-AetGoogleAdSense
## Requirements
* PHP 7.4.3 or later (tested up to 7.4.30)
* MediaWiki 1.35 or later (tested up to 1.35)## cloning a repository
```shell
git clone [email protected]:exizt/mediawiki-extension-AetGoogleAdSense.git AetGoogleAdSense
```## Installation
1. Download and place the files in a directory called `AetGoogleAdSense` in your `extensions/` folder.
2. Add the following code at the bottom of your `LocalSettings.php`:
```
wfLoadExtension( 'AetGoogleAdSense' );
```## Configuration
주요 설정
- `$wgAetGoogleAdsense['client_id']`
- Google AdSense Client Id. (eg: `'ca-pub-xxx...'`)
- `required`
- type : `string`
- default : `''`
- `$wgAetGoogleAdsense['unit_id_content_top']`
- 콘텐츠 상단에 표시할 애드센스 광고 단위 아이디 (eg: `xxx...`)
- type : `string`
- default : `''`
- `$wgAetGoogleAdsense['unit_id_content_bottom']`
- 콘텐츠 히단에 표시할 애드센스 광고 단위 아이디 (eg: `xxx...`)
- type : `string`
- default : `''`
- `$wgAetGoogleAdsense['anon_only']`
- '비회원'만 애드센스 노출하기.
- type : `bool`
- default : `false`
- `$wgAetGoogleAdsense['exclude_ip_list']`
- 애드센스를 보여주지 않을 IP 목록.
- type : `array`
- default : `[]`
- `$wgAetGoogleAdsense['min_length']`
- 애드센스가 보여질 최소 문서의 본문 길이.
- type : `int`
- default : `500`사용할 훅 설정
- `$wgAetGoogleAdsenseHooks['ArticleViewHeader']`
- type : `bool`
- default : `true`
- `$wgAetGoogleAdsenseHooks['SiteNoticeAfter']`
- type : `bool`
- default : `false`
- `$wgAetGoogleAdsenseHooks['ArticleViewFooter']`
- type : `bool`
- default : `true`
- `$wgAetGoogleAdsenseHooks['SkinAfterContent']`
- type : `bool`
- default : `false`참고
1. `client_id`가 입력되고, `unit_id_content_top`과 `unit_id_content_bottom`이 입력 안 된 경우는 => 자동 광고만 허가.
2. `client_id`가 빈 값이거나 없는 경우에는 동작하지 않음.