Difference between revisions of "Install Vanilla forums"

From UNPM.org Wiki
Jump to navigation Jump to search
Line 7: Line 7:
 
==== vanilla.conf ====
 
==== vanilla.conf ====
  
<code>
 
 
  username@servername:~$ sudo nano /etc/nginx/package-configs/vanilla.conf
 
  username@servername:~$ sudo nano /etc/nginx/package-configs/vanilla.conf
</code>
 
  
 
Paste into the file, with <code>/forums/</code> being the site's root subdirectory Vanilla will be installed to:
 
Paste into the file, with <code>/forums/</code> being the site's root subdirectory Vanilla will be installed to:
<code>
+
 
 
  location = /forums/index.php {
 
  location = /forums/index.php {
 
     include global-configs/php.conf;
 
     include global-configs/php.conf;
Line 31: Line 29:
 
     rewrite ^/forums/(.+)$ /forums/index.php?p=$1 last;
 
     rewrite ^/forums/(.+)$ /forums/index.php?p=$1 last;
 
  }
 
  }
</code>
 
  
 
==== vanilla_https.conf ====
 
==== vanilla_https.conf ====
  
<code>
 
 
  username@servername:~$ sudo nano /etc/nginx/package-configs/vanilla_https.conf
 
  username@servername:~$ sudo nano /etc/nginx/package-configs/vanilla_https.conf
</code>
 
  
 
Paste into the file, with <code>/forums/</code> being the site's root subdirectory Vanilla will be installed to:
 
Paste into the file, with <code>/forums/</code> being the site's root subdirectory Vanilla will be installed to:
<code>
+
 
 
  location = /forums/index.php {
 
  location = /forums/index.php {
 
     include global-configs/php_https.conf;
 
     include global-configs/php_https.conf;
Line 59: Line 54:
 
     rewrite ^/forums/(.+)$ /forums/index.php?p=$1 last;
 
     rewrite ^/forums/(.+)$ /forums/index.php?p=$1 last;
 
  }
 
  }
</code>
 
  
 
=== Edit sites-available file ===
 
=== Edit sites-available file ===
Line 65: Line 59:
 
Open the sites-available file for the domain:
 
Open the sites-available file for the domain:
  
<code>
 
 
  username@servername:~$ sudo nano /etc/nginx/sites-available/example.com
 
  username@servername:~$ sudo nano /etc/nginx/sites-available/example.com
</code>
 
  
 
In the HTTP server block, add:
 
In the HTTP server block, add:
<code>
+
 
 
  include package-configs/vanilla.conf;
 
  include package-configs/vanilla.conf;
</code>
 
  
 
In the HTTPS server block, add:
 
In the HTTPS server block, add:
<code>
+
 
 
  include package-configs/vanilla_https.conf;
 
  include package-configs/vanilla_https.conf;
</code>
 
  
 
=== Test and Restart nginx ===
 
=== Test and Restart nginx ===
  
 
Test and restart nginx.<br />
 
Test and restart nginx.<br />
<code>
+
 
 
  username@servername:~$ sudo nginx -t
 
  username@servername:~$ sudo nginx -t
 
  username@servername:~$ sudo service nginx restart
 
  username@servername:~$ sudo service nginx restart
</code>
 
  
 
== Create Vanilla database and database user ==
 
== Create Vanilla database and database user ==
  
 
Create a Vanilla database and database user:
 
Create a Vanilla database and database user:
<code>
+
 
 
  username@servername:~$ sudo mysql -uroot -p
 
  username@servername:~$ sudo mysql -uroot -p
 
  MariaDB [(none)]> create database databasename default character set utf8 default collate utf8_general_ci;
 
  MariaDB [(none)]> create database databasename default character set utf8 default collate utf8_general_ci;
 
  MariaDB [(none)]> grant all on databasename.* to 'databasenameusername'@'localhost' identified by 'databasenameusernamepassword';
 
  MariaDB [(none)]> grant all on databasename.* to 'databasenameusername'@'localhost' identified by 'databasenameusernamepassword';
 
  MariaDB [(none)]> exit
 
  MariaDB [(none)]> exit
</code>
 
  
 
Note that the <code>databasename</code>, <code>databasenameusername</code> and <code>databasenameusernamepassword</code> will be required for the Vanilla installation process.
 
Note that the <code>databasename</code>, <code>databasenameusername</code> and <code>databasenameusernamepassword</code> will be required for the Vanilla installation process.
Line 103: Line 91:
 
This install is for Vanilla Forums 2.1.3.
 
This install is for Vanilla Forums 2.1.3.
  
<code>
 
 
  username@servername:~$ wget <nowiki>http://vanillaforums.org/get/vanilla-core-2.1.3.zip</nowiki>
 
  username@servername:~$ wget <nowiki>http://vanillaforums.org/get/vanilla-core-2.1.3.zip</nowiki>
 
  username@servername:~$ unzip -d /var/www/example.com/public vanilla-core-2.1.3.zip
 
  username@servername:~$ unzip -d /var/www/example.com/public vanilla-core-2.1.3.zip
Line 110: Line 97:
 
  username@servername:~$ find /var/www/example.com/public/forums -type f | xargs chmod 664
 
  username@servername:~$ find /var/www/example.com/public/forums -type f | xargs chmod 664
 
  username@servername:~$ sudo chown -R www-data:www-data /var/www/example.com/public/forums
 
  username@servername:~$ sudo chown -R www-data:www-data /var/www/example.com/public/forums
</code>
 
  
 
Navigate to the '''secure''' <tt><nowiki>https://www.example.com/forums/</nowiki></tt> and complete the Vanilla Forums online installation.
 
Navigate to the '''secure''' <tt><nowiki>https://www.example.com/forums/</nowiki></tt> and complete the Vanilla Forums online installation.
Line 122: Line 108:
 
It is strongly recommended that admins using the default theme create a clone of the default and use that instead. Otherwise all customizations made to the default theme may be lost during an update.
 
It is strongly recommended that admins using the default theme create a clone of the default and use that instead. Otherwise all customizations made to the default theme may be lost during an update.
  
<code>
 
 
  username@servername:~$ cp -r /var/www/example.com/public/forums/themes/default/ /var/www/example.com/public/forums/themes/defaultclone/
 
  username@servername:~$ cp -r /var/www/example.com/public/forums/themes/default/ /var/www/example.com/public/forums/themes/defaultclone/
 
  username@servername:~$ nano /var/www/example.com/public/forums/themes/defaultclone/about.php
 
  username@servername:~$ nano /var/www/example.com/public/forums/themes/defaultclone/about.php
</code>
 
  
 
In the line <code>$ThemeInfo['default'] = array(</code> change <code>default</code> to the desired name.
 
In the line <code>$ThemeInfo['default'] = array(</code> change <code>default</code> to the desired name.
Line 133: Line 117:
 
The <code>Description</code> line is displayed in the dashboard to describe the theme. The <code>Version</code> can be replaced with <code>""</code> around text that will be displayed as the version - be sure to leave the <code>,</code> at the end of the line. <code>Author</code>, <code>AuthorEmail</code> and <code>AuthorUrl</code> may also be changed as desired.
 
The <code>Description</code> line is displayed in the dashboard to describe the theme. The <code>Version</code> can be replaced with <code>""</code> around text that will be displayed as the version - be sure to leave the <code>,</code> at the end of the line. <code>Author</code>, <code>AuthorEmail</code> and <code>AuthorUrl</code> may also be changed as desired.
  
<code>
 
 
  username@servername:~$ touch /var/www/example.com/public/forums/themes/defaultclone/design/custom.css
 
  username@servername:~$ touch /var/www/example.com/public/forums/themes/defaultclone/design/custom.css
 
  username@servername:~$ cp /var/www/example.com/public/forums/applications/dashboard/views/default.master.tpl /var/www/example.com/public/forums/themes/defaultclone/views/default.master.tpl
 
  username@servername:~$ cp /var/www/example.com/public/forums/applications/dashboard/views/default.master.tpl /var/www/example.com/public/forums/themes/defaultclone/views/default.master.tpl
 
  username@servername:~$ sudo chown -R www-data /var/www/example.com/public/forums/themes/defaultclone/
 
  username@servername:~$ sudo chown -R www-data /var/www/example.com/public/forums/themes/defaultclone/
</code>
 
  
 
The new theme should now be an option in the dashboard's themes menu.
 
The new theme should now be an option in the dashboard's themes menu.
Line 144: Line 126:
  
 
To use the following configurations, open <code>config.php</code> for editing:
 
To use the following configurations, open <code>config.php</code> for editing:
<code>
+
 
 
  username@servername:~$ nano /var/www/example.com/public/forums/conf/config.php
 
  username@servername:~$ nano /var/www/example.com/public/forums/conf/config.php
</code>
+
 
  
 
==== Load local fonts and jQuery scripts ====
 
==== Load local fonts and jQuery scripts ====
Line 152: Line 134:
 
The default configuration for Vanilla makes use of Google APIs for loading jQuery scripts as well as some fonts, which will use fewer resources and may load faster than when locally stored. The tradeoff being that Google can track users who use the site by recording the header information sent when requesting the scripts and fonts. To force locally stored scripts and fonts to load, add the following line:
 
The default configuration for Vanilla makes use of Google APIs for loading jQuery scripts as well as some fonts, which will use fewer resources and may load faster than when locally stored. The tradeoff being that Google can track users who use the site by recording the header information sent when requesting the scripts and fonts. To force locally stored scripts and fonts to load, add the following line:
  
<code>
 
 
  $Configuration['Garden']['Cdns']['Disable'] = TRUE;
 
  $Configuration['Garden']['Cdns']['Disable'] = TRUE;
</code>
 
  
 
==== Combine CSS files ====
 
==== Combine CSS files ====
Line 160: Line 140:
 
CSS files may be combined for faster page loading. Note this is an experimental feature which may cause issues for some setups. Add the following line:
 
CSS files may be combined for faster page loading. Note this is an experimental feature which may cause issues for some setups. Add the following line:
  
<code>
 
 
  $Configuration['Garden']['CombineAssets'] = TRUE;
 
  $Configuration['Garden']['CombineAssets'] = TRUE;
</code>
 
  
 
==== Change input method ====
 
==== Change input method ====
Line 168: Line 146:
 
The input method can be specified by adding a line then specifying the desired method. If not present, add the following line:
 
The input method can be specified by adding a line then specifying the desired method. If not present, add the following line:
  
<code>
 
 
  $Configuration['Garden']['InputFormatter'] = 'Markdown';
 
  $Configuration['Garden']['InputFormatter'] = 'Markdown';
</code>
 
  
 
The above configuration sets [https://en.wikipedia.org/wiki/Markdown markdown] as the input type. Input type options are case sensitive: <code>Markdown</code>, <code>Html</code>, [https://en.wikipedia.org/wiki/Bbcode <code>BBCode</code>] or <code>Text</code>.
 
The above configuration sets [https://en.wikipedia.org/wiki/Markdown markdown] as the input type. Input type options are case sensitive: <code>Markdown</code>, <code>Html</code>, [https://en.wikipedia.org/wiki/Bbcode <code>BBCode</code>] or <code>Text</code>.
Line 178: Line 154:
 
This will display messages at the bottom of each page that may be useful for troubleshooting. It is different from the Debugger plugin.
 
This will display messages at the bottom of each page that may be useful for troubleshooting. It is different from the Debugger plugin.
  
<code>
 
 
  $Configuration['Debug'] = TRUE;
 
  $Configuration['Debug'] = TRUE;
</code>
 
  
 
Note that when disabling the plugin it easier to change <code>TRUE</code> to <code>FALSE</code> so that when Vanilla overwrites the config file for a settings change made via the dashboard the line will not be deleted, allowing for convenient enabling in the future.
 
Note that when disabling the plugin it easier to change <code>TRUE</code> to <code>FALSE</code> so that when Vanilla overwrites the config file for a settings change made via the dashboard the line will not be deleted, allowing for convenient enabling in the future.
Line 196: Line 170:
 
The [http://vanillaforums.org/addon/quotes-plugin Quotes] plugin adds a quote option to more easily quote posts:
 
The [http://vanillaforums.org/addon/quotes-plugin Quotes] plugin adds a quote option to more easily quote posts:
  
<code>
 
 
  username@servername:~$ wget <nowiki>http://vanillaforums.org/get/quotes-plugin-1.6.1.zip</nowiki>
 
  username@servername:~$ wget <nowiki>http://vanillaforums.org/get/quotes-plugin-1.6.1.zip</nowiki>
 
  username@servername:~$ unzip -d /var/www/example.com/public/forums/plugins quotes-plugin-1.6.1.zip
 
  username@servername:~$ unzip -d /var/www/example.com/public/forums/plugins quotes-plugin-1.6.1.zip
Line 203: Line 176:
 
  username@servername:~$ sudo chown -R www-data:www-data /var/www/example.com/public/forums/plugins/PrettyPrint
 
  username@servername:~$ sudo chown -R www-data:www-data /var/www/example.com/public/forums/plugins/PrettyPrint
 
  username@servername:~$ rm quotes-plugin-1.6.1.zip
 
  username@servername:~$ rm quotes-plugin-1.6.1.zip
</code>
 
  
 
The Quotes plugin should now be an option in the dashboard.
 
The Quotes plugin should now be an option in the dashboard.
Line 211: Line 183:
 
For servers with Piwik installed, the [http://vanillaforums.org/addon/piwik-plugin Piwik Analytics] plugin can be used to enable Piwik across the forum. To install, download and extract the plugin to the <code>/plugins/</code> directory. It is also advisable to make a few changes to some of the files to prevent popular tracker blockers from preventing the code from being loaded.
 
For servers with Piwik installed, the [http://vanillaforums.org/addon/piwik-plugin Piwik Analytics] plugin can be used to enable Piwik across the forum. To install, download and extract the plugin to the <code>/plugins/</code> directory. It is also advisable to make a few changes to some of the files to prevent popular tracker blockers from preventing the code from being loaded.
  
<code>
 
 
  username@servername:~$ wget <nowiki>http://vanillaforums.org/get/piwik-plugin-2.6.5.zip</nowiki>
 
  username@servername:~$ wget <nowiki>http://vanillaforums.org/get/piwik-plugin-2.6.5.zip</nowiki>
 
  username@servername:~$ unzip -d /var/www/example.com/public/forums/plugins piwik-plugin-2.6.5.zip
 
  username@servername:~$ unzip -d /var/www/example.com/public/forums/plugins piwik-plugin-2.6.5.zip
Line 217: Line 188:
 
  username@servername:~$ rm piwik-plugin-2.6.5.zip
 
  username@servername:~$ rm piwik-plugin-2.6.5.zip
 
  username@servername:~$ nano /var/www/example.com/public/forums/plugins/Piwik/class.piwik.plugin.php
 
  username@servername:~$ nano /var/www/example.com/public/forums/plugins/Piwik/class.piwik.plugin.php
</code>
 
  
 
Change the following lines:
 
Change the following lines:
  
<code>
 
 
  _paq.push(["setTrackerUrl", u+"js/"]);
 
  _paq.push(["setTrackerUrl", u+"js/"]);
 
   
 
   
Line 227: Line 196:
 
   
 
   
 
  <img src="/secondrandomsymlinkname?idsite=$PiwikSiteID&amp;rec=1" style="border:0" alt="" />
 
  <img src="/secondrandomsymlinkname?idsite=$PiwikSiteID&amp;rec=1" style="border:0" alt="" />
</code>
 
  
 
For an explanation of <code>secondrandomsymlinkname</code>, see the Piwik article.
 
For an explanation of <code>secondrandomsymlinkname</code>, see the Piwik article.
Line 237: Line 205:
 
If the forum being made is expected to make regular use of code blocks, users may not like the default code blocks created by Vanilla. The PrettyPrint plugin can be installed and configured to greatly enhance the forum's code blocks.
 
If the forum being made is expected to make regular use of code blocks, users may not like the default code blocks created by Vanilla. The PrettyPrint plugin can be installed and configured to greatly enhance the forum's code blocks.
  
<code>
 
 
  username@servername:~$ wget <nowiki>http://vanillaforums.org/get/prettyprint-plugin-1.2.zip</nowiki>
 
  username@servername:~$ wget <nowiki>http://vanillaforums.org/get/prettyprint-plugin-1.2.zip</nowiki>
 
  username@servername:~$ unzip -d /var/www/example.com/public/forums/plugins prettyprint-plugin-1.2.zip
 
  username@servername:~$ unzip -d /var/www/example.com/public/forums/plugins prettyprint-plugin-1.2.zip
Line 246: Line 213:
 
  username@servername:~$ mv /var/www/example.com/public/forums/plugins/PrettyPrint/prettify/prettify.css /var/www/example.com/public/forums/plugins/PrettyPrint/prettify/original.prettify.css
 
  username@servername:~$ mv /var/www/example.com/public/forums/plugins/PrettyPrint/prettify/prettify.css /var/www/example.com/public/forums/plugins/PrettyPrint/prettify/original.prettify.css
 
  username@servername:~$ nano /var/www/example.com/public/forums/plugins/PrettyPrint/prettify/prettify.css
 
  username@servername:~$ nano /var/www/example.com/public/forums/plugins/PrettyPrint/prettify/prettify.css
</code>
 
  
 
Paste into the new file:
 
Paste into the new file:
<code>
+
 
 
  /* Pretty printing styles. Used with prettify.js. */
 
  /* Pretty printing styles. Used with prettify.js. */
 
   
 
   
Line 305: Line 271:
 
  li.L7,
 
  li.L7,
 
  li.L9 { background: #f0f0f0 }
 
  li.L9 { background: #f0f0f0 }
</code>
 
  
 
To make in-line code a lighter shaded background:
 
To make in-line code a lighter shaded background:
<code>
+
 
 
  username@servername:~$ nano /var/www/example.com/public/forums/plugins/PrettyPrint/default.php
 
  username@servername:~$ nano /var/www/example.com/public/forums/plugins/PrettyPrint/default.php
</code>
 
  
 
Remove the following code:
 
Remove the following code:
<code>
+
 
 
  {background-color:#ddd !important}
 
  {background-color:#ddd !important}
</code>
 
  
 
== External links ==
 
== External links ==

Revision as of 17:27, 30 November 2014

Vanilla forums software is a popular forum software that includes many advanced features not found in other forum software, including automatic draft saving, active notifications of messages and discussion responses, and an overall clean look. This article covers installing Vanilla Forums to a UNPM server.

Nginx configuration

Create package-configs files

vanilla.conf

username@servername:~$ sudo nano /etc/nginx/package-configs/vanilla.conf

Paste into the file, with /forums/ being the site's root subdirectory Vanilla will be installed to:

location = /forums/index.php {
    include global-configs/php.conf;
    fastcgi_split_path_info ^(.+\.php)(.*)$;
}

location /forums/ {
    location ~* /categories/[0-9]*(/.*)?$ { return 404; }
    location ~* ^/uploads/.*.(html|htm|shtml|php|js)$ {
        types { }
        default_type text/plain;
    }
    try_files $uri $uri/ @forum;
    location ~ \.php$ { deny all; }
}

location @forum {
    rewrite ^/forums/(.+)$ /forums/index.php?p=$1 last;
}

vanilla_https.conf

username@servername:~$ sudo nano /etc/nginx/package-configs/vanilla_https.conf

Paste into the file, with /forums/ being the site's root subdirectory Vanilla will be installed to:

location = /forums/index.php {
    include global-configs/php_https.conf;
    fastcgi_split_path_info ^(.+\.php)(.*)$;
}

location /forums/ {
    location ~* /categories/[0-9]*(/.*)?$ { return 404; }
    location ~* ^/uploads/.*.(html|htm|shtml|php|js)$ {
        types { }
        default_type text/plain;
    }
    try_files $uri $uri/ @forum;
    location ~ \.php$ { deny all; }
}

location @forum {
    rewrite ^/forums/(.+)$ /forums/index.php?p=$1 last;
}

Edit sites-available file

Open the sites-available file for the domain:

username@servername:~$ sudo nano /etc/nginx/sites-available/example.com

In the HTTP server block, add:

include package-configs/vanilla.conf;

In the HTTPS server block, add:

include package-configs/vanilla_https.conf;

Test and Restart nginx

Test and restart nginx.

username@servername:~$ sudo nginx -t
username@servername:~$ sudo service nginx restart

Create Vanilla database and database user

Create a Vanilla database and database user:

username@servername:~$ sudo mysql -uroot -p
MariaDB [(none)]> create database databasename default character set utf8 default collate utf8_general_ci;
MariaDB [(none)]> grant all on databasename.* to 'databasenameusername'@'localhost' identified by 'databasenameusernamepassword';
MariaDB [(none)]> exit

Note that the databasename, databasenameusername and databasenameusernamepassword will be required for the Vanilla installation process.

Vanilla Forums package installation

This install is for Vanilla Forums 2.1.3.

username@servername:~$ wget http://vanillaforums.org/get/vanilla-core-2.1.3.zip
username@servername:~$ unzip -d /var/www/example.com/public vanilla-core-2.1.3.zip
username@servername:~$ mv /var/www/example.com/public/vanilla/ /var/www/example.com/public/forums
username@servername:~$ find /var/www/example.com/public/forums -type d | xargs chmod 775
username@servername:~$ find /var/www/example.com/public/forums -type f | xargs chmod 664
username@servername:~$ sudo chown -R www-data:www-data /var/www/example.com/public/forums

Navigate to the secure https://www.example.com/forums/ and complete the Vanilla Forums online installation.

Configure Vanilla Forums

In addition to the configurations available from the default plugins located in the Vanilla forums dashboard, plugins may be added to the /forums/plugins/ directory then enabled in the dashboard and configurations may be set in the /forums/conf/config.php file.

Themes

It is strongly recommended that admins using the default theme create a clone of the default and use that instead. Otherwise all customizations made to the default theme may be lost during an update.

username@servername:~$ cp -r /var/www/example.com/public/forums/themes/default/ /var/www/example.com/public/forums/themes/defaultclone/
username@servername:~$ nano /var/www/example.com/public/forums/themes/defaultclone/about.php

In the line $ThemeInfo['default'] = array( change default to the desired name.

In the line 'Name' => '+Baseline', change +Baseline to the desired name. This will be displayed in the dashboard as the name of the theme.

The Description line is displayed in the dashboard to describe the theme. The Version can be replaced with "" around text that will be displayed as the version - be sure to leave the , at the end of the line. Author, AuthorEmail and AuthorUrl may also be changed as desired.

username@servername:~$ touch /var/www/example.com/public/forums/themes/defaultclone/design/custom.css
username@servername:~$ cp /var/www/example.com/public/forums/applications/dashboard/views/default.master.tpl /var/www/example.com/public/forums/themes/defaultclone/views/default.master.tpl
username@servername:~$ sudo chown -R www-data /var/www/example.com/public/forums/themes/defaultclone/

The new theme should now be an option in the dashboard's themes menu.

Configuration settings in config.php

To use the following configurations, open config.php for editing:

username@servername:~$ nano /var/www/example.com/public/forums/conf/config.php


Load local fonts and jQuery scripts

The default configuration for Vanilla makes use of Google APIs for loading jQuery scripts as well as some fonts, which will use fewer resources and may load faster than when locally stored. The tradeoff being that Google can track users who use the site by recording the header information sent when requesting the scripts and fonts. To force locally stored scripts and fonts to load, add the following line:

$Configuration['Garden']['Cdns']['Disable'] = TRUE;

Combine CSS files

CSS files may be combined for faster page loading. Note this is an experimental feature which may cause issues for some setups. Add the following line:

$Configuration['Garden']['CombineAssets'] = TRUE;

Change input method

The input method can be specified by adding a line then specifying the desired method. If not present, add the following line:

$Configuration['Garden']['InputFormatter'] = 'Markdown';

The above configuration sets markdown as the input type. Input type options are case sensitive: Markdown, Html, BBCode or Text.

Enable debug

This will display messages at the bottom of each page that may be useful for troubleshooting. It is different from the Debugger plugin.

$Configuration['Debug'] = TRUE;

Note that when disabling the plugin it easier to change TRUE to FALSE so that when Vanilla overwrites the config file for a settings change made via the dashboard the line will not be deleted, allowing for convenient enabling in the future.

Plugins

The default set of plugins are fairly straightforward. Note that when enabling the WYSIWYG editor, the editor defaults to this mode and some features may not be available without selecting the text button. There are also a lot of great plugins found at the Vanilla forums website.

Enable Debugger

If the forum is not responding as expected, the debug mode may be enabled for troubleshooting by enabling the Debugger plugin. This mode will display information and error statements at the bottom of every page.

Add quote option for comments

The Quotes plugin adds a quote option to more easily quote posts:

username@servername:~$ wget http://vanillaforums.org/get/quotes-plugin-1.6.1.zip
username@servername:~$ unzip -d /var/www/example.com/public/forums/plugins quotes-plugin-1.6.1.zip
username@servername:~$ find /var/www/example.com/public/forums/plugins -type f | xargs chmod 664
username@servername:~$ find /var/www/example.com/public/forums/plugins -type d | xargs chmod 775
username@servername:~$ sudo chown -R www-data:www-data /var/www/example.com/public/forums/plugins/PrettyPrint
username@servername:~$ rm quotes-plugin-1.6.1.zip

The Quotes plugin should now be an option in the dashboard.

Piwik plugin

For servers with Piwik installed, the Piwik Analytics plugin can be used to enable Piwik across the forum. To install, download and extract the plugin to the /plugins/ directory. It is also advisable to make a few changes to some of the files to prevent popular tracker blockers from preventing the code from being loaded.

username@servername:~$ wget http://vanillaforums.org/get/piwik-plugin-2.6.5.zip
username@servername:~$ unzip -d /var/www/example.com/public/forums/plugins piwik-plugin-2.6.5.zip
username@servername:~$ sudo chown -R www-data /var/www/example.com/public/forums/plugins/Piwik/
username@servername:~$ rm piwik-plugin-2.6.5.zip
username@servername:~$ nano /var/www/example.com/public/forums/plugins/Piwik/class.piwik.plugin.php

Change the following lines:

_paq.push(["setTrackerUrl", u+"js/"]);

g.defer=true; g.async=true; g.src=u+"js/"; s.parentNode.insertBefore(g,s);


For an explanation of secondrandomsymlinkname, see the Piwik article.

In the Vanilla Forums dashboard, navigate to Addons -> Plugins and enable Piwik Analytics. In the plugin's settings, set PiwikInstall to ://www.example.com/randomsymlinkname/ (again, see the Piwik article for an explanation of randomsymlinkname) and set PiwikSiteID to the Id of the website.

Making nice code blocks with PrettyPrint

If the forum being made is expected to make regular use of code blocks, users may not like the default code blocks created by Vanilla. The PrettyPrint plugin can be installed and configured to greatly enhance the forum's code blocks.

username@servername:~$ wget http://vanillaforums.org/get/prettyprint-plugin-1.2.zip
username@servername:~$ unzip -d /var/www/example.com/public/forums/plugins prettyprint-plugin-1.2.zip
username@servername:~$ find /var/www/example.com/public/forums/plugins -type f | xargs chmod 664
username@servername:~$ find /var/www/example.com/public/forums/plugins -type d | xargs chmod 775
username@servername:~$ sudo chown -R www-data:www-data /var/www/example.com/public/forums/plugins/PrettyPrint
username@servername:~$ rm prettyprint-plugin-1.2.zip
username@servername:~$ mv /var/www/example.com/public/forums/plugins/PrettyPrint/prettify/prettify.css /var/www/example.com/public/forums/plugins/PrettyPrint/prettify/original.prettify.css
username@servername:~$ nano /var/www/example.com/public/forums/plugins/PrettyPrint/prettify/prettify.css

Paste into the new file:

/* Pretty printing styles. Used with prettify.js. */

pre, code {
   background-color: #fafafa;
   border-color: #aaa;
}
pre code {
   background-color: transparent;
}

/* SPAN elements with the classes below are added by prettyprint. */
.pln { color: #000 }  /* plain text */

.str { color: #080 }  /* string content */
.kwd { color: #00d }  /* a keyword */
.com { color: #800 }  /* a comment */
.typ { color: #606 }  /* a type name */
.lit { color: #066 }  /* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */
.pun, .opn, .clo { color: #660 }
.tag { color: #00d }  /* a markup tag name */
.atn { color: #606 }  /* a markup attribute name */
.atv { color: #080 }  /* a markup attribute value */
.dec, .var { color: #606 }  /* a declaration; a variable name */
.fun { color: red }  /* a function name */

/* Use higher contrast and text-weight for printable form. */
@media print, projection {
  .str { color: #060; }
  .kwd { color: #006; font-weight: bold; }
  .com { color: #600; font-style: italic; }
  .typ { color: #404; font-weight: bold; }
  .lit { color: #044; }
  .pun, .opn, .clo { color: #440; }
  .tag { color: #006; font-weight: bold; }
  .atn { color: #404; }
  .atv { color: #060; }
}

/* Specify class=linenums on a pre to get line numbering */
ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
li.L0,
li.L1,
li.L2,
li.L3,
li.L5,
li.L6,
li.L7,
li.L8 { list-style-type: none }
/* Alternate shading for lines */
li.L1,
li.L3,
li.L5,
li.L7,
li.L9 { background: #f0f0f0 }

To make in-line code a lighter shaded background:

username@servername:~$ nano /var/www/example.com/public/forums/plugins/PrettyPrint/default.php

Remove the following code:

{background-color:#ddd !important}

External links

Vanillaforums.org

Form the forum | Ars Technica

Vanilla Community Wiki Project