| How install your own MediaWiki (dreamhost.com) |
|
|
|
| Written by Administrator | |
| Tuesday, 05 February 2008 | |
Install MediaWikiYou can use the DreamHost Control Panel to install your own MediaWiki-based wiki. Requires PHP5.
It's under Goodies Control Panel > One-Click Installs Execute the form, move the newly generated LocalSettings.php to the parent directory, and delete the config directory with its content. Important! In the MediaWiki installation process, the configuration form will ask for a "database host" which defaults to "localhost". It seems you must change this to an answer that looks like "mysql.<yourdomain.net> Beautifying URLs.In the ROOT directory of www.yourdomain.com place the following .htaccess file: RewriteEngine on # do the rewrite Google AdSense, see more..
If you're interested in running a MediaWiki site with Google AdSense, you should know that in order to comply with the Google TOS, you shouldn't display ads on non-content pages. The following solution will cause ads to not be displayed on Special, User, User talk, Image, Template, and edit/preview pages. I've solved this by limiting my users' choice of skins to Monobook, and modifying the Monobook.php file as follows: For a vertical ad below your left-side navigation, after this: echo htmlspecialchars($this->data['nav_urls'][$special]['href']) put this: <?php For a horizontal ad at the bottom of your articles, after this: <?php if($this->data['catlinks']) { ?><div id="catlinks"><?php $this->html('catlinks') ?></div><?php } ?> put this: <?php Now, you'll need to create an adsense/ directory in your main wiki directory, and place two files in it, adsense_horizontal.php and adsense_vertical.php as needed. The contents of my files are as follows: adsense_vertical.php: <div id="p-advertisement" class="portlet"> adsense_horizontal.php: <div style="border: 1px solid #ccc; padding: 1px; margin-top: 25px;"> I've found that these layouts fit nicely with the Monobook skin. For the vertical ad, the 120x240 tall format ad works best. Google AnalyticsFor those using Google Analytics (http://www.google.com/analytics/) (now free and openly available), here is the short and simple way to modify your code to be recognized by Google's site tracker: In the MonoBook.php file (or your skin file of choice), insert the following code right before the "</body>" tag (no quotes): <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> Where you would replace the "XXXXXX" with the tracker number associated with your Analytics account. Google MapsTo add google maps to your wiki, install the Google Maps Extension (http://www.mediawiki.org/wiki/Extension:Google_Maps)] |
|
| Last Updated ( Wednesday, 18 March 2009 ) |
| < Prev | Next > |
|---|


