Difference between revisions of "Talk:HSYCO"

From HSYCO
Jump to navigation Jump to search
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
== Special pages ==
 +
http://wiki.hsyco.com/3.5.0/index.php/MediaWiki:Sidebar
 +
 
== Page structure ==
 
== Page structure ==
 
The title must be formatted properly: The first letter must be a capital letter, all main words must start with capital letters and acronyms must use capital letters.  
 
The title must be formatted properly: The first letter must be a capital letter, all main words must start with capital letters and acronyms must use capital letters.  
Line 45: Line 48:
 
{{note|Include the category "Incomplete" to all pages that are incomplete! <nowiki>[[Category:INCOMPLETE]]</nowiki>}}
 
{{note|Include the category "Incomplete" to all pages that are incomplete! <nowiki>[[Category:INCOMPLETE]]</nowiki>}}
  
To exclude something from the PDF version:
+
To exclude something from the PDF version :
 
  <nowiki><div class="noprint">not in print</div></nowiki>
 
  <nowiki><div class="noprint">not in print</div></nowiki>
 
To include something only in the PDF version:
 
To include something only in the PDF version:
Line 54: Line 57:
  
 
  ssh hsyco@wiki.hsyco.com
 
  ssh hsyco@wiki.hsyco.com
+
 
 
  sftp://hsyco@wiki.hsyco.com/
 
  sftp://hsyco@wiki.hsyco.com/
  
 
Go to "/var/www/html/wiki/<version>"
 
Go to "/var/www/html/wiki/<version>"
  
1. Backup everything and DO NOT DELETE ANYTHING before all is done!
+
1. Check if last backup was successful
: run the script ./backup_script.sh and wait for process to terminate
 
: check the backup files listed in the output of the script
 
 
 
2. duplicate database (e.g. hsyco_3_3_0 -> hsyco_3_3_1). Do not use '.' in the name of the database
 
: move "/var/www/html/pma" to "/var/www/html/wiki/pma"
 
: go to http://wiki.hsyco.com/pma/
 
: duplicate database: select the database, select "operations" and "copy database to"
 
: move back "/var/www/html/wiki/pma" to "/var/www/html/pma"
 
  
3. duplicate wiki folder (e.g. wiki/3.3.0 -> wiki/3.3.1)
+
2. run "bash /var/www/duplicate_hsyco_wiki.sh"
: cd /var/www/html/wiki
+
: Use bash, NOT sh
: cp -R 3.3.0/ 3.3.1
 
  
4. Edit LocalSettings.php in the new version folder:
+
3. Edit LocalSettings.php in the new version folder:
 
: $wgScriptPath
 
: $wgScriptPath
 
: $wgDBname
 
: $wgDBname
  
5. Edit backup_script.sh:
+
4. Edit backup_script.sh:
: wikidb
+
: /var/backups/custom/backup.sh
: wikidir
+
#
: backupdir
 
  
6. Change redirect
+
5. Change redirect
: Edit /etc/httpd/conf/httpd.conf
+
: Edit /etc/apache2/sites-available/wiki.hsyco.conf  
 
E.g. edit:
 
E.g. edit:
 
     RedirectMatch ^/$ /3.3.0/
 
     RedirectMatch ^/$ /3.3.0/
    #RewriteEngine On
 
    #RewriteRule ^/3.3.0/(.*)(?!index\.php)(.*)$ %{DOCUMENT_ROOT}/3.3.0/index.php
 
 
to:
 
to:
 
     RedirectMatch ^/$ /3.3.1/
 
     RedirectMatch ^/$ /3.3.1/
    #RewriteEngine On
+
 
    #RewriteRule ^/3.3.0/(.*)(?!index\.php)(.*)$ %{DOCUMENT_ROOT}/3.3.0/index.php
+
== How to reduce the size of the database ==
    #RewriteRule ^/3.3.1/(.*)(?!index\.php)(.*)$ %{DOCUMENT_ROOT}/3.3.1/index.php
+
https://www.mediawiki.org/wiki/Manual:Reduce_size_of_the_database
 +
In ssh:
 +
 
 +
/maintenance/
 +
php deleteArchivedRevisions.php —delete
 +
 
 +
/maintenance/storage
 +
php compressOld.php
 +
 
  
 
== Extensions ==
 
== Extensions ==

Latest revision as of 11:02, 22 January 2016

Special pages

http://wiki.hsyco.com/3.5.0/index.php/MediaWiki:Sidebar

Page structure

The title must be formatted properly: The first letter must be a capital letter, all main words must start with capital letters and acronyms must use capital letters.

E.g.

Java Command and Utility Methods API --> OK

java command and utility methods api --> NO


After the page introduction start from level 2 (== bla bla ==)

Syntax

When writing technical information use the following syntax:

  • <pippo> : placeholder for a general variable parameter or attribute. For '<' and '>' use "&lt;" and "&gt;" (e.g. &lt;pippo&gt;).
  • pippo | pluto : the param or attr can be "pippo" or "pluto"
  • 1 ... 10 : the param or attr can be any value from 1 to 10 (1 and 10 included)

Styles

CSS Custom style:

http://wiki.hsyco.com//index.php/MediaWiki:Common.css

To include a table of contents up to a certain level:

{{TOClimit|3}}

To include a tip:

{{tip|Tip text}}

Note Tip text

To include a note:

{{note|Note text}}
Note text


To color code:

<syntaxhighlight lang="javascript">
...
</syntaxhighlight>

(most languages are supported, e.g. java,javascript,php,html5,css)

Incomplete category, for easy reference

List of incomplete pages

Include the category "Incomplete" to all pages that are incomplete! [[Category:INCOMPLETE]]


To exclude something from the PDF version :

<div class="noprint">not in print</div>

To include something only in the PDF version:

<div class="onlyinprint">only in print</div>

How to duplicate wiki

To access the wiki on the server:

ssh hsyco@wiki.hsyco.com
sftp://hsyco@wiki.hsyco.com/

Go to "/var/www/html/wiki/<version>"

1. Check if last backup was successful

2. run "bash /var/www/duplicate_hsyco_wiki.sh"

Use bash, NOT sh

3. Edit LocalSettings.php in the new version folder:

$wgScriptPath
$wgDBname

4. Edit backup_script.sh:

/var/backups/custom/backup.sh

5. Change redirect

Edit /etc/apache2/sites-available/wiki.hsyco.conf

E.g. edit:

   RedirectMatch ^/$ /3.3.0/

to:

   RedirectMatch ^/$ /3.3.1/

How to reduce the size of the database

https://www.mediawiki.org/wiki/Manual:Reduce_size_of_the_database In ssh:

/maintenance/ php deleteArchivedRevisions.php —delete

/maintenance/storage php compressOld.php


Extensions

DynamicListing

Directory:

extensions/DynamicListing

allows listing of all pages inside a category, with many layout options See http://semeb.com/dpldemo/index.php?title=DPL:Manual E.g.

<DynamicPageList>
category = UI Objects
rowcolformat=width=100%
columns=3
ordermethod=title
</DynamicPageList>

Poem

Directory:

extensions/Poem

retain
 newlines
  and
   spaces

Breadcrumbs2

Directory:

extensions/Breadcrumbs2

Show breadcrumbs on pages that match the categories in MediaWiki:Breadcrumbs Usage:

  • category name @ breadcrumb wikitext @ tab name @ site logo

Ref: http://www.mediawiki.org/wiki/Extension:BreadCrumbs2

Pages that don't match won't show breadcrumbs.

NoTitle

Directory:

extensions/NoTitle

The NoTitle extension adds a magic word, __NOTITLE__, that lets you hide the main title heading on any page. http://www.mediawiki.org/wiki/Extension:NoTitle

H2

H3

H4

H5