Logo has been changed to
Instruction $wgLogo = "/skins/common/images/avbwiki.png" was added into LocalSettings.php
Monday, September 29, 2008
Saturday, September 20, 2008
Dynamic Page List
Today I'm looking for plug-in for generating article list for main page (for example, list of new articles or list of new edits). It seems DynamicPageList extension will be helpful in this situation. In fact, DynamicPageList or (also known as DPL) is base for number of other plug-ins (for example, Wgraph, TreeAndMenu, Calendar).
DPL manual is here.
As recommended here, I'll install DynamicPageList itself and Call and Inputbox. There are no cross references in DPL extensions in Semeb_extensions.zip!
Step 1
Invoke DPL from your LocalSettings.php with
Step 2: skipped
Step 3: skipped
DPL manual is here.
As recommended here, I'll install DynamicPageList itself and Call and Inputbox. There are no cross references in DPL extensions in Semeb_extensions.zip!
Step 1
Invoke DPL from your LocalSettings.php with
require_once("extensions/DynamicPageList/DynamicPageList2.php");
Step 2: skipped
There is a special feature in DPL which needs another extension: If you use page inclusion and want to use images as link symbols for the original source you must install the LinkedImage extension. For details see there.
Step 3: skipped
In some special cases (when DPL queries refer to uncategorized pages) DPL needs a special database view in the MySQL database. You should run the database statement which creates that view if you want to use DPL statements which refer to uncategorized pages. Many installations work well without that and you can postpone this step until you really need it. If DPL cannot execute a DPL statement without that view it will issue a corresponding warning. More...
Thursday, September 18, 2008
MediaWiki skins
Below a list of sites with non-traditional MediaWiki skins and non-traditional MediaWiki usage (for example, as CMS for commercial site).
Site with well designed skins:
Site with interesting main page (with minor skin changes):
Interesting main page layout:
There are only design ideas... If somebody know where to get cool free template, please notify me via comments to this post.
Site with well designed skins:
- The best one: http://www.aquawiki.ru/%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0
- http://www.sunandshadows.com/wiki/index.php?title=Main_Page
- http://wikiknitting.com/wiki/Main_Page
- http://www.theplenty.net/wiki/index.php/Main_Page
- http://www.wowace.com/wiki/Main_Page
- http://pynchonwiki.com/
- http://www.scion-tech.org/wiki/Main_Page
- http://www.wikihow.com/Main-Page
- http://xbmc.org/wiki/?title=Main_Page
- http://en.wiredtape.com/wiki/Main_Page
- http://middleton-stjohns.com/wiki/Main_Page
- https://wiki.mozilla.org/Main_Page
- http://www.openwetware.org/wiki/Main_Page
- http://www.theplenty.net/wiki/index.php/Main_Page
- http://www.organicdesign.co.nz/
- http://www.mono-project.com/Main_Page
- http://www.wikithesia.com/index.php?title=Main_Page
- http://www.tyska.net/
- http://www.starcadia.sasoriza.us/wiki/Portal:Main
- http://24.wikia.com/wiki/Main_Page
- http://www.ukgameshows.com/page/index.php?title=Main_Page
- http://www.werelate.org/wiki/Main_Page
- http://krass.com/wiki/Main_Page
- http://www.hayinteriors.com.au/
- http://strategywiki.org/wiki/Main_Page
- http://www.aidklinik.de/
- http://www.wikipathways.org/index.php/WikiPathways
- http://www.smartlogicsolutions.com/wiki/Main_Page
- http://smallbusiness.com/wiki/Main_Page
- http://wiki.openid.net//Main_Page
- http://oberwiki.net/Main_Page
- http://www.newstartministries.org/MediaWiki/index.php/Main_Page
- http://wiki.limewire.org/index.php?title=Main_Page
- http://www.hurghada-apartment.com/Media%20Wiki%20Script/index.php?title=Home
- http://dishiwiki.com/index.php/Main_Page
- http://thediypal.com/index.php?title=Main_page
- http://www.wikihow.com/Main-Page
Site with interesting main page (with minor skin changes):
- http://www.xbox360gaming.com/wiki/index.php?title=Main_Page
- http://developer.valvesoftware.com/wiki/Main_Page
- http://wirelessafrica.meraka.org.za/wiki/index.php/Wireless_Africa_Home_Page
- http://wiki.wazaabi.org/index.php?title=Main_Page
- http://vim.wikia.com/wiki/Main_Page
- http://www.videoville.org/wiki/Main_Page
- http://www.mailquizzer.com/index.php?title=Main_Page
- http://wiki.case.edu/Main_Page
- http://www.aboutus.org/
Interesting main page layout:
- http://www.unmaintained-free-software.org/wiki/Main_Page
- http://www.sklogwiki.org/SklogWiki/index.php/Main_Page
- http://www.scramble.nl/wiki/index.php?title=Main_Page
- http://www.mono-project.com/Main_Page
- http://wiki.guildwars.com/wiki/Main_Page
- http://www.hifi-wiki.com/index.php/Main_Page
- http://www.machinelearning.ru/wiki/index.php?title=%C3%90%C2%97%C3%90%C2%B0%C3%90%C2%B3%C3%90%C2%BB%C3%90%C2%B0%C3%90%C2%B2%C3%90%C2%BD%C3%90%C2%B0%C3%91%C2%8F_%C3%91%C2%81%C3%91%C2%82%C3%91%C2%80%C3%90%C2%B0%C3%90%C2%BD%C3%90%C2%B8%C3%91%C2%86%C3%90%C2%B0
- http://wiki.lamak.ru/%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0
There are only design ideas... If somebody know where to get cool free template, please notify me via comments to this post.
Wednesday, September 17, 2008
Disable edit for unregistred users
Disable edit/create page without registration.
Add into LocalSettings.php
http://www.mediawiki.org/wiki/Manual:User_rights
Add into LocalSettings.php
$wgGroupPermissions['*']['edit'] = false;
// Not necessary to disable this explicity: it requires the edit right
$wgGroupPermissions['*']['createpage'] = false;
$wgGroupPermissions['*']['createtalk'] = false;
http://www.mediawiki.org/wiki/Manual:User_rights
Change the Math button
Change the Math button in editor (standard Edit Toolbar) to produce <tex> and </tex> tags, instead of <math> and </math>
<math> tag support is like small hack, so I prefer to give users <tex> tag and save <math> tag for compatibility with Wikipedia standards.
Find into WIKI_HOME/includes/EditPage.php
and replace it with
See also http://www.mediawiki.org/wiki/Mimetex_alternative
It's possible to change MediaWiki system messges like math_sample or math_tip. List of messages is here http://WIKI_HOST/index.php5/Special:AllMessages
To change messages see files in WIKI_HOME/languages/messages (find files for your language).
<math> tag support is like small hack, so I prefer to give users <tex> tag and save <math> tag for compatibility with Wikipedia standards.
Find into WIKI_HOME/includes/EditPage.php
array(
'image' => $wgLang->getImageFile('button-math'),
'id' => 'mw-editbutton-math',
'open' => "<math>",
'close' => "</math>",
'sample' => wfMsg('math_sample'),
'tip' => wfMsg('math_tip'),
'key' => 'C'
),
and replace it with
array(
'image' => $wgLang->getImageFile('button-math'),
'id' => 'mw-editbutton-math',
'open' => "<tex<",
'close' => "</tex>",
'sample' => wfMsg('math_sample'),
'tip' => wfMsg('math_tip'),
'key' => 'C'
),
See also http://www.mediawiki.org/wiki/Mimetex_alternative
It's possible to change MediaWiki system messges like math_sample or math_tip. List of messages is here http://WIKI_HOST/index.php5/Special:AllMessages
To change messages see files in WIKI_HOME/languages/messages (find files for your language).
Adding math tag support
Adding <math> tag support (without Latex installing).
The basic recipe is here: http://www.mediawiki.org/wiki/LaTeX_on_a_shared_host
src="/cgi-bin/mimetex.cgi... because I've added mimetex.cgi into my cgi-bin directory. See also http://avbwiki.blogspot.com/2008/09/enable-tex.html
The basic recipe is here: http://www.mediawiki.org/wiki/LaTeX_on_a_shared_host
- Find
WIKI_HOME/includes/Math.php - Backup it!
- Find public static function renderMath($tex, $params=array())
- Change function body to
public static function renderMath( $tex, $params=array() ) {
return '<img class="tex" src="/cgi-bin/mimetex.cgi?' . rawurlencode($tex) . '" alt="TeX: ' . rawurlencode($tex) . '">';
}
src="/cgi-bin/mimetex.cgi... because I've added mimetex.cgi into my cgi-bin directory. See also http://avbwiki.blogspot.com/2008/09/enable-tex.html
Saturday, September 13, 2008
Enable TeX
Add tex-style math expression support functionality into MediaWiki.
Here is the complete recipe to add TeX support.
The official way to do it based on texvc which is written on Caml, so you need texvc binary (try to find it!) or calm compiler binary to compile texvc, so
I prefer more convenient way to add tex math expressions into my wiki:
So, good news is that the mimetex is working, but it accessible for everyone over the web! Now I'll do few steps to integrate mimetex into MediaWiki and correct accessibility trouble later (this situation is convinient for testing).
TeX in MediaWiki
About TeX:
If somebody knows how to prevent direct access to mimetex.cgi from the web, please, notify me via comment to this post! I see the only way - make changes into mimetex.cgi code, but it is not very convenient to reapply my own changes when new version of mimetex.cgi will come. I've tried to solve this with Apache rewrite rules, but...
this is working, but how to split direct access and access from PHP?
Here is the complete recipe to add TeX support.
The official way to do it based on texvc which is written on Caml, so you need texvc binary (try to find it!) or calm compiler binary to compile texvc, so
- compile caml compiler with c++ compiler;
- compile texvc with caml compiler;
- plus: adjust all paths into makefiles;
- install LaTeX and dvips;
- install ImageMagic (aka convert utility);
- install Ghostscript;
I prefer more convenient way to add tex math expressions into my wiki:
- download mimeTeX from http://www.forkosh.com/mimetex.html (binaries are also available there);
- extract mimetex.cgi into cgi-bin directory;
- test it: go to http://host/cgi-bin/mimetex.cgi?\sin{x^2}+y^{\cos{x^3}}
So, good news is that the mimetex is working, but it accessible for everyone over the web! Now I'll do few steps to integrate mimetex into MediaWiki and correct accessibility trouble later (this situation is convinient for testing).
- read http://www.mediawiki.org/wiki/Mimetex_alternative
- create mimetex.php into wiki_home/extensions/mimetex folder. See code below:
<?php
$wgExtensionFunctions[] = "MimetexExtension";
function MimetexExtension() {
global $wgParser;
# register the extension with the WikiText parser
# the first parameter is the name of the new tag.
# In this case it defines the tag <example> ... </example>
# the second parameter is the callback function for
# processing the text between the tags
$wgParser->setHook( "tex", "render_Mimetex" );
}
/**
* Renders $text in Mimetex
*/
function render_Mimetex($input, $argv, $parser = null) {
if (!$parser) $parser =& $GLOBALS['wgParser'];
// $img_url is the url the mimetex will be sent to.
// IMPORTANT!! The URL below should be the link to YOUR mimetex.cgi if possible
// $img_url = "http://www.forkosh.dreamhost.com/mimetex.cgi?".$input;
$img_url = "/cgi-bin/mimetex.cgi?".$input;
// Sets the output of the tex tag using the url from above, and the input as
// the Alt text. It's important to note that there is no error output added yet.
$output = "<img src=\"$img_url\" alt= \"$input\" />";
return $output;
}
?>
- Warning! $img_url in the listing above should point to minitex.cgi
$img_url = "/cgi-bin/mimetex.cgi?".$input;
- add
require("extensions/mimetex/mimetex.php");
at the end of LocalSettings.php - set $wgUseTeX to true in LocalSettings.php
- try to add TeX expression somewhere in wiki, for example:
<tex>\sin{x^2}+y^{\cos{x^2}}</tex>
TeX in MediaWiki
- TeX notation manual: http://meta.wikimedia.org/wiki/Help:Formula
- http://www.mediawiki.org/wiki/LaTeX_on_a_shared_host
- http://www.mediawiki.org/wiki/PhpMathPublisher_alternative
- http://www.mediawiki.org/wiki/Mediawiki_and_LaTeX_on_a_host_with_shell_access
About TeX:
If somebody knows how to prevent direct access to mimetex.cgi from the web, please, notify me via comment to this post! I see the only way - make changes into mimetex.cgi code, but it is not very convenient to reapply my own changes when new version of mimetex.cgi will come. I've tried to solve this with Apache rewrite rules, but...
RewriteCond %{REQUEST_URI} .*mimetex\.cgi.* [NC]
RewriteRule ^(.*)$ index.php [F,L]
this is working, but how to split direct access and access from PHP?
Syntax highlight
Add syntax highlighting functionality.
I think I'll write many code snippets, so it's necessary to add programming languages syntax highlight into my MediaWiki engine.
I tried to find the same plug-in (extension) like is used in Wikipedia project. It seems these guys use something like SyntaxHighlight_GeSHi, because they format code snippets with <source> tag.
SyntaxHighlight_GeSHi
http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi
svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SyntaxHighlight_GeSHi ./SyntaxHighlight_GeSHi
GeSHi itself
http://qbnz.com/highlighter/
http://sourceforge.net/project/showfiles.php?group_id=114997&package_id=124605&release_id=618638
To add frame around source code (like around <pre> tag) change main.css into skin folder:
/* avb: add div.source-XXX for SyntaxHighlight_GeSHi */
pre, div.source-abap, div.source-actionscript, div.source-ada, div.source-apache, div.source-applescript, div.source-asm, div.source-asp, div.source-autoit, div.source-bash, div.source-basic4gl, div.source-blitzbasic, div.source-bnf, div.source-c, div.source-c_mac, div.source-caddcl, div.source-cadlisp, div.source-cfdg, div.source-cfm, div.source-cpp-qt, div.source-cpp, div.source-csharp, div.source-css, div.source-d, div.source-delphi, div.source-diff, div.source-div, div.source-dos, div.source-dot, div.source-eiffel, div.source-fortran, div.source-freebasic, div.source-genero, div.source-gml, div.source-groovy, div.source-haskell, div.source-html4strict, div.source-idl, div.source-ini, div.source-inno, div.source-io, div.source-java, div.source-java5, div.source-javascript, div.source-latex, div.source-Code, div.source-lisp, div.source-lua, div.source-m68k, div.source-matlab, div.source-mirc, div.source-mpasm, div.source-mysql, div.source-nsis, div.source-objc, div.source-ocaml-brief, div.source-ocaml, div.source-oobas, div.source-oracle8, div.source-pascal, div.source-per, div.source-perl, div.source-php-brief, div.source-php, div.source-plsql, div.source-python, div.source-qbasic, div.source-rails, div.source-reg, div.source-robots, div.source-ruby, div.source-sas, div.source-scheme, div.source-sdlbasic, div.source-smalltalk, div.source-smarty, div.source-sql, div.source-tcl, div.source-text, div.source-thinbasic, div.source-tsql, div.source-vb, div.source-vbnet, div.source-vhdl, div.source-visualfoxpro, div.source-winbatch, div.source-xml, div.source-xpp, div.source-z80 {
padding: 1em;
border: 1px dashed #2f6fab;
color: black;
background-color: #f9f9f9;
line-height: 1.1em;
}
It was "pre { ... }" only.
I think I'll write many code snippets, so it's necessary to add programming languages syntax highlight into my MediaWiki engine.
I tried to find the same plug-in (extension) like is used in Wikipedia project. It seems these guys use something like SyntaxHighlight_GeSHi, because they format code snippets with <source> tag.
SyntaxHighlight_GeSHi
http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi
svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SyntaxHighlight_GeSHi ./SyntaxHighlight_GeSHi
GeSHi itself
http://qbnz.com/highlighter/
http://sourceforge.net/project/showfiles.php?group_id=114997&package_id=124605&release_id=618638
To add frame around source code (like around <pre> tag) change main.css into skin folder:
/* avb: add div.source-XXX for SyntaxHighlight_GeSHi */
pre, div.source-abap, div.source-actionscript, div.source-ada, div.source-apache, div.source-applescript, div.source-asm, div.source-asp, div.source-autoit, div.source-bash, div.source-basic4gl, div.source-blitzbasic, div.source-bnf, div.source-c, div.source-c_mac, div.source-caddcl, div.source-cadlisp, div.source-cfdg, div.source-cfm, div.source-cpp-qt, div.source-cpp, div.source-csharp, div.source-css, div.source-d, div.source-delphi, div.source-diff, div.source-div, div.source-dos, div.source-dot, div.source-eiffel, div.source-fortran, div.source-freebasic, div.source-genero, div.source-gml, div.source-groovy, div.source-haskell, div.source-html4strict, div.source-idl, div.source-ini, div.source-inno, div.source-io, div.source-java, div.source-java5, div.source-javascript, div.source-latex, div.source-Code, div.source-lisp, div.source-lua, div.source-m68k, div.source-matlab, div.source-mirc, div.source-mpasm, div.source-mysql, div.source-nsis, div.source-objc, div.source-ocaml-brief, div.source-ocaml, div.source-oobas, div.source-oracle8, div.source-pascal, div.source-per, div.source-perl, div.source-php-brief, div.source-php, div.source-plsql, div.source-python, div.source-qbasic, div.source-rails, div.source-reg, div.source-robots, div.source-ruby, div.source-sas, div.source-scheme, div.source-sdlbasic, div.source-smalltalk, div.source-smarty, div.source-sql, div.source-tcl, div.source-text, div.source-thinbasic, div.source-tsql, div.source-vb, div.source-vbnet, div.source-vhdl, div.source-visualfoxpro, div.source-winbatch, div.source-xml, div.source-xpp, div.source-z80 {
padding: 1em;
border: 1px dashed #2f6fab;
color: black;
background-color: #f9f9f9;
line-height: 1.1em;
}
It was "pre { ... }" only.
Subscribe to:
Posts (Atom)