Protoball:Setup: Difference between revisions
Jump to navigation
Jump to search
Line 52: | Line 52: | ||
=== TinyMCE on free text === | === TinyMCE on free text === | ||
http://www.tinymce.com/download/download.php JQuery | |||
unzip in root directory | |||
<pre> | |||
function textareaTinyMceOnForms() { | |||
if(wgPageName.indexOf("Special:FormEdit") > -1) { | |||
$.getScript("/tinymce/jscripts/tiny_mce/jquery.tinymce.js", function() { $('textarea.tinymce').tinymce({ | |||
// Location of TinyMCE script | |||
script_url : '/tinymce/jscripts/tiny_mce/tiny_mce.js', | |||
// General options | |||
theme : "advanced", | |||
plugins : "pagebreak,style,layer,save,advhr,advimage,advlink,iespell,inlinepopups,insertdatetime,preview,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", | |||
// Theme options | |||
theme_advanced_buttons1 : "justifyleft,justifycenter,justifyright,justifyfull,|,hr,nonbreaking,removeformat,visualaid,|,sub,sup,|,charmap,iespell,advhr,|,fullscreen", | |||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,insertdate,inserttime,preview", | |||
theme_advanced_buttons3 : "bold,italic,underline,strikethrough,|,link,unlink,anchor,cleanup,help,code" , | |||
theme_advanced_toolbar_location : "top", | |||
theme_advanced_toolbar_align : "left", | |||
theme_advanced_statusbar_location : "bottom", | |||
theme_advanced_resizing : true, | |||
})}); | |||
} | |||
} | |||
addOnloadHook(textareaTinyMceOnForms); | |||
</pre> | |||
== Extensions == | == Extensions == |
Revision as of 13:18, 19 May 2012
MediaWiki
Wikimedia is moving from SVN to Git. Current stable version is 1.19.0; Dreamhost uses 1.16. Many extensions are still svn only.
git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git cd core git checkout 1.19.6 cd .. mv core _web_directory_
Beta Site
A copy of the files and database of protoball.org
LocalSettimgs.php, per variable
if(basename(dirname(__FILE__)) == "beta.protoball.org") { $wgServer = "beta.protoball.org"; $wgDBname = _beta_db_; $wgDBname = _beta_logo_; }
Short Urls
LocalSettings.php
$wgScriptPath = ""; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php"; $wgArticlePath = "$wgScriptPath/$1";
.htaccess
RewriteEngine on RewriteBase / RewriteCond %{REQUEST_URI} !^/(skins|stylesheets|images|config|extensions)/ RewriteCond %{REQUEST_URI} !^/(redirect|texvc|index|load).php RewriteCond %{REQUEST_URI} !^/(favicon\.ico|robots\.txt) RewriteCond %{REQUEST_URI} !^/[^:]*\.(png|html|js) RewriteRule ^(.*)$ /index.php?title=$1 [L,QSA]
Javascript
TinyMCE on free text
http://www.tinymce.com/download/download.php JQuery unzip in root directory
function textareaTinyMceOnForms() { if(wgPageName.indexOf("Special:FormEdit") > -1) { $.getScript("/tinymce/jscripts/tiny_mce/jquery.tinymce.js", function() { $('textarea.tinymce').tinymce({ // Location of TinyMCE script script_url : '/tinymce/jscripts/tiny_mce/tiny_mce.js', // General options theme : "advanced", plugins : "pagebreak,style,layer,save,advhr,advimage,advlink,iespell,inlinepopups,insertdatetime,preview,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", // Theme options theme_advanced_buttons1 : "justifyleft,justifycenter,justifyright,justifyfull,|,hr,nonbreaking,removeformat,visualaid,|,sub,sup,|,charmap,iespell,advhr,|,fullscreen", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,insertdate,inserttime,preview", theme_advanced_buttons3 : "bold,italic,underline,strikethrough,|,link,unlink,anchor,cleanup,help,code" , theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, })}); } } addOnloadHook(textareaTinyMceOnForms);
Extensions
Semantic Bundle
svn co http://svn.wikimedia.org/svnroot/mediawiki/branches/REL1_19/phase3 mv phase3 cd phase3/extensions svn co http://semantic-mediawiki-bundle.googlecode.com/svn/trunk/ semantic-bundle make ext cp SemanticBundleSettings.sample.php SemanticBundleSettings.php cp * _web_directory_/extensions/ -R
LocalSettings.php
require_once( "$IP/extensions/semantic-bundle/SemanticBundleSettings.php" ); require_once( "$IP/extensions/semantic-bundle/SemanticBundle.php" );
In page Special:SMWAdmin, click Initialize
php maintenance/update.php
vim SemanticBundleSettings.php :%s/#include_once/include_once/g
Note: Parse error: syntax error, unexpected T_FUNCTION in /home/protoball/protoballproject.org/extensions/SemanticImageInput/SemanticImageInput.php on line 58
temp fix, do not enable Semantic Image Input
Cite
https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Cite.git
ParserFunctions
https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ParserFunctions.git
Enable Image Uploads
LocalSettings.php (edit)
$wgEnableUploads = true;
chmod a+w images
Special Pages
- MediaWiki:Mainpage
- edit what the main page of the wiki site is
- MediaWiki:Sidebar
- edit the sidebar links