oracledba.help

PMWiki 101

<- SpecialTopics

TOC

Install Apache & PHP on Linux

1. yum install httpd
   systemctl start httpd.service
   systemctl enable httpd.service
   Test http://localhost
2. yum install php
   systemctl restart httpd.service
   systemctl enable php.service
3. Create Test File
   vi /var/www/html/pi.php 
   <?php phpinfo(); ?>
4. Test
   http://myhostname/pi.php

Privs

Set privs as shown below as needed:

chown -R apache:apache /var/www/html
chmod -R 757 /var/www/html

PMWiki Getting Started

Download software from here.

On Linux

mkdir /var/www/html/MyWikiDir

On PC

  - Create Logo Image.
  - unzip pmwiki-latest.zip to D:\sw\PMWiki\pmwiki-latest\pmwiki-n.n.nn
  - Use FileZilla to copy ...\pmwiki-n.n.nn\* to Linux systems  /var/www/html/MyWikiDir
  - Copy Logo Image to /var/www/html/MyWikiDir/pub/skins/pmwiki

On Linux

cd /var/www/html/MyWikiDir/docs
cp sample-config.php /var/www/html/MyWikiDir/local/config.php

Test
   http://MySiteURL/MyWikiDir/pmwiki.php

Common Initial Changes

Edit /var/www/html/MyWikiDir/local/config.php

 $WikiTitle = 'MyTitle';
 $PageLogoUrl = "$PubDirUrl/skins/pmwiki/MyLogo.png";

 Physical dir for image file:
 /var/www/html/oradocs/pub/skins/pmwiki

 # Set Links Default to Open in New Tab (add this to end of file)
 $UrlLinkFmt = "<a class='urllink' href='\$LinkUrl' rel='nofollow' target='_blank'>\$LinkText</a>";

 # Enable CSS line-height
 $WikiStyleCSS[] = 'line-height';

To disable link behavior for specific links use %target=_self% in front of the link.

Create root web page forwarding file (index.html).

<html>
<head>
<meta http-equiv="refresh" content="0;url=http://MySiteURL/MyWikiDir/pmwiki.php">
</head>
</html>

OR

Rename pmwiki.php to index.php

Password Protect Site

Place at top of file: /var/www/html/MyWikiDir/local/config.php

# Custom Changes: Start ###############
$DefaultPasswords['read'] = pmcrypt('MySitePW');
# Custom Changes: End   ###############

Uncomment\Edit

$DefaultPasswords['admin'] = pmcrypt('MySitePW');
...
$DefaultPasswords['upload'] = pmcrypt('MySitePW');

Commonly Installed Cookbooks


APPENDIX

Enable Uploads

  1. Create an uploads dir under wherever pmwiki.php found. Note lower case.
  2. Make required changes to config.php
# Uploads Cfg
$DefaultPasswords['upload'] = pmcrypt('MySitePW');
$EnableUpload = 1;
$UploadPermAdd = 0;
$UploadPrefixFmt = ''; #Cfg for site-wide uploads
$UploadMaxSize = 1000000; # Upload Max File Size: 1mb=1000000, 25mb=25000000 etc.

# To find path use PHP Variable (pi.php): _SERVER["APPL_PHYSICAL_PATH"]
# Ex: D:\home\oracledba.help\wwwroot\
# Then from that:
#$UploadDir = "D:\home\oracledba.help\wwwroot\app\mp3\uploads";
#$UploadUrlFmt = "http://oracledba.help/mp3/uploads";

Note: Ensure your PHP installation allows uploads. The php.ini file needs file_uploads = On.

Usage
Attach:FileName.jpg
Example: Attach:chuck.jpg

Show All Uploaded Files: (:attachlist:)


Clean Table Look

CaseCreatedTopic
237636507/06/17This is a test.
234413003/24/17This is another test.

Form Controls: ASCII

☑ 
☐
⮽

🖸
⮾
⮿

🢧
🢠
🠈
🠊
🡆
🡄 
✓ 
✔

Form Controls: HTML

   Abcd...
   Zyxw...
  Year: 


Standard Callouts

 %target=_blank%
 %bgcolor=yellow%

 >>note      fullwidth border='1px solid DarkGray' font-size=small<<
 >>important fullwidth border='1px solid DarkGray' font-size=small<<
 >>warning   fullwidth border='1px solid DarkGray' font-size=small<<

 <warning|important|tip> border='1px solid gray'

Custom Changes: <Hn> Values

Custom HTML <Hn> changes from the base install.

  • Get a color swatch for site.
    Ex: https://coolors.co
  • Edit /var/www/html/oradocs/pub/skins/pmwiki/pmwiki.css as shown:
#h1, h2, h3, h6 { font-weight:normal; }

h1 { font-size:2em;    font-weight:bold; color:#0d0221;}
h2 { font-size:1.5em;  font-weight:bold; color:#0f084b;}
h3 { font-size:1.15em; font-weight:bold; color:#26408B;}
h4 { font-size:.85em;  font-weight:bold; color:#a6cfd5;}
Set the color: values to match your swatch.
  • Edit /var/www/html/oradocs/pub/skins/pmwiki/pmwiki.tmpl
Change this line:
<h1 class='pagetitle'>{$Title}</h1></div>

to this:
<h1>{$Title}</h1></div>
This ensures page title uses your <Hn> swatch value.

Enabling Javascript

(:html:)
   <script language="JavaScript">
       alert("Thanks to PM for that markup.");
   </script>
(:htmlend:)

Smaller Text Block

>>frame background-color=#eeeeee border='1px' font-size=smaller padding=0px width=500<<

Ei labore minimum quaestio quo. Ut vel docendi tibique, vix in quem meis
menandri, no eam labore invenire patrioque. Eu eum consul suscipiantur, 
mel ea soluta libris. Tollit laudem vim no. Aliquid intellegam voluptatibus
ad cum, lorem populo iracundia ut mei. Salutandi facilisis necessitatibus
in quo, aeque gloriatur eum an, laboramus voluptaria eu sea.