Difference between revisions of "Install Vanilla forums"
(18 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | 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 | + | '''Note:''' This article has had no material updates since November 30, 2014 and is not currently being maintained. Vanilla forums have had several updates since then, so this article should be used for reference purposes only. |
+ | |||
+ | 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 LEMP web server set up according this site's series of articles, which can be reviewed in the [[Steps to create a UNPM Server]]. | ||
== Nginx configuration == | == Nginx configuration == | ||
Line 7: | Line 9: | ||
==== vanilla.conf ==== | ==== vanilla.conf ==== | ||
− | |||
username@servername:~$ sudo nano /etc/nginx/package-configs/vanilla.conf | username@servername:~$ sudo nano /etc/nginx/package-configs/vanilla.conf | ||
− | |||
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: | ||
− | + | ||
location = /forums/index.php { | location = /forums/index.php { | ||
include global-configs/php.conf; | include global-configs/php.conf; | ||
Line 31: | Line 31: | ||
rewrite ^/forums/(.+)$ /forums/index.php?p=$1 last; | rewrite ^/forums/(.+)$ /forums/index.php?p=$1 last; | ||
} | } | ||
− | |||
==== vanilla_https.conf ==== | ==== vanilla_https.conf ==== | ||
− | |||
username@servername:~$ sudo nano /etc/nginx/package-configs/vanilla_https.conf | username@servername:~$ sudo nano /etc/nginx/package-configs/vanilla_https.conf | ||
− | |||
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: | ||
− | + | ||
location = /forums/index.php { | location = /forums/index.php { | ||
include global-configs/php_https.conf; | include global-configs/php_https.conf; | ||
Line 59: | Line 56: | ||
rewrite ^/forums/(.+)$ /forums/index.php?p=$1 last; | rewrite ^/forums/(.+)$ /forums/index.php?p=$1 last; | ||
} | } | ||
− | |||
=== Edit sites-available file === | === Edit sites-available file === | ||
Line 65: | Line 61: | ||
Open the sites-available file for the domain: | Open the sites-available file for the domain: | ||
− | |||
username@servername:~$ sudo nano /etc/nginx/sites-available/example.com | username@servername:~$ sudo nano /etc/nginx/sites-available/example.com | ||
− | |||
In the HTTP server block, add: | In the HTTP server block, add: | ||
− | + | ||
include package-configs/vanilla.conf; | include package-configs/vanilla.conf; | ||
− | |||
In the HTTPS server block, add: | In the HTTPS server block, add: | ||
− | + | ||
include package-configs/vanilla_https.conf; | include package-configs/vanilla_https.conf; | ||
− | |||
=== Test and Restart nginx === | === Test and Restart nginx === | ||
− | Test and | + | Test and reload nginx. |
− | + | ||
username@servername:~$ sudo nginx -t | username@servername:~$ sudo nginx -t | ||
− | username@servername:~$ sudo service nginx | + | nginx: the configuration file /etc/nginx/nginx.conf syntax is ok |
− | + | nginx: configuration file /etc/nginx/nginx.conf test is successful | |
+ | username@servername:~$ sudo service nginx reload | ||
+ | * Reloading nginx configuration nginx [ OK ] | ||
== 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: | ||
− | + | ||
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 | ||
− | |||
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 101: | Line 94: | ||
== Vanilla Forums package installation == | == Vanilla Forums package installation == | ||
− | This install is for Vanilla Forums 2. | + | This install is for Vanilla Forums 2.1.6. |
− | + | username@servername:~$ wget <nowiki>https://open.vanillaforums.com/get/vanilla-core-3.1.zip</nowiki> | |
− | username@servername:~$ wget <nowiki> | + | username@servername:~$ unzip -d /var/www/example.com/public vanilla-core-2.1.6.zip |
− | username@servername:~$ unzip -d /var/www/example.com/public vanilla-core-2. | ||
username@servername:~$ mv /var/www/example.com/public/vanilla/ /var/www/example.com/public/forums | 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 | + | username@servername:~$ find /var/www/example.com/public/forums -type d | xargs -d '\n' chmod 775 |
− | username@servername:~$ find /var/www/example.com/public/forums -type | + | username@servername:~$ find /var/www/example.com/public/forums -type f | xargs -d '\n' chmod 664 |
+ | username@servername:~$ chmod -R 777 /var/www/example.com/public/forums/{conf,uploads,cache} | ||
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 | ||
− | |||
− | + | Navigate to the '''secure''' <tt><nowiki>https://www.example.com/forums/</nowiki></tt> and complete the Vanilla Forums online installation. | |
− | + | Note that the <code>777</code> permissions are required by Vanilla, so complain to them about this. | |
− | |||
− | <code> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </code> | ||
− | |||
− | |||
== Configure Vanilla Forums == | == Configure Vanilla Forums == | ||
Line 134: | Line 116: | ||
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. | ||
− | + | 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/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 | ||
− | |||
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 145: | Line 125: | ||
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. | ||
− | + | username@servername:~$ mkdir /var/www/example.com/public/forums/themes/defaultclone/views | |
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/ | ||
− | |||
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 156: | Line 135: | ||
To use the following configurations, open <code>config.php</code> for editing: | To use the following configurations, open <code>config.php</code> for editing: | ||
− | + | ||
username@servername:~$ nano /var/www/example.com/public/forums/conf/config.php | username@servername:~$ nano /var/www/example.com/public/forums/conf/config.php | ||
− | |||
==== Load local fonts and jQuery scripts ==== | ==== 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, | + | 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, edit the following line: |
− | |||
$Configuration['Garden']['Cdns']['Disable'] = TRUE; | $Configuration['Garden']['Cdns']['Disable'] = TRUE; | ||
− | |||
==== Combine CSS files ==== | ==== Combine CSS files ==== | ||
Line 172: | Line 148: | ||
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: | ||
− | |||
$Configuration['Garden']['CombineAssets'] = TRUE; | $Configuration['Garden']['CombineAssets'] = TRUE; | ||
− | |||
==== Change input method ==== | ==== Change input method ==== | ||
Line 180: | Line 154: | ||
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: | ||
− | |||
$Configuration['Garden']['InputFormatter'] = 'Markdown'; | $Configuration['Garden']['InputFormatter'] = 'Markdown'; | ||
− | |||
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 190: | Line 162: | ||
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. | ||
− | |||
$Configuration['Debug'] = TRUE; | $Configuration['Debug'] = TRUE; | ||
− | |||
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 208: | Line 178: | ||
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: | ||
− | + | username@servername:~$ wget <nowiki>http://vanillaforums.org/get/quotes-plugin-1.6.9.zip</nowiki> | |
− | username@servername:~$ wget <nowiki>http://vanillaforums.org/get/quotes-plugin-1.6. | + | username@servername:~$ unzip -d /var/www/example.com/public/forums/plugins quotes-plugin-1.6.9.zip |
− | username@servername:~$ unzip -d /var/www/example.com/public/forums/plugins quotes-plugin-1.6. | + | username@servername:~$ find /var/www/example.com/public/forums/plugins/Quotes/ -type f | xargs chmod 664 |
− | 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/Quotes/ -type d | xargs chmod 775 |
− | 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/Quotes |
− | username@servername:~$ sudo chown -R www-data:www-data /var/www/example.com/public/forums/plugins/ | + | username@servername:~$ rm quotes-plugin-1.6.9.zip |
− | username@servername:~$ rm quotes-plugin-1.6. | ||
− | |||
The Quotes plugin should now be an option in the dashboard. | The Quotes plugin should now be an option in the dashboard. | ||
Line 223: | Line 191: | ||
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. | ||
− | |||
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 229: | Line 196: | ||
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 | ||
− | |||
Change the following lines: | Change the following lines: | ||
− | < | + | <nowiki><!-- Piwik --></nowiki> |
− | _paq.push(["setTrackerUrl | + | <script type="text/javascript"> |
− | + | var _paq = _paq || []; | |
− | + | _paq.push(['trackPageView']); | |
− | + | _paq.push(['enableLinkTracking']); | |
− | <img src="/ | + | (function() { |
− | </ | + | var u="$PiwikInstall"; |
+ | _paq.push(['setTrackerUrl', u+'js/']); | ||
+ | _paq.push(['setSiteId', '$PiwikSiteID']); | ||
+ | var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; | ||
+ | g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'js/'; s.parentNode.insertBefore(g,s); | ||
+ | })(); | ||
+ | </script> | ||
+ | <noscript> | ||
+ | <nowiki><img src="$ImageTrack/randomsymlinkname2.php?idsite=$PiwikSiteID" style="border:0" alt="" /></nowiki> | ||
+ | </noscript> | ||
+ | <nowiki><!-- End Piwik Code --></nowiki> | ||
− | For an explanation of <code>secondrandomsymlinkname</code>, see the Piwik article. | + | For an explanation of <code>secondrandomsymlinkname</code>, see the [[Install_Piwik#Privacy_tools|Piwik]] article. |
− | In the Vanilla Forums dashboard, navigate to Addons -> Plugins and enable Piwik Analytics. In the plugin's settings, set PiwikInstall to <tt> | + | In the Vanilla Forums dashboard, navigate to Addons -> Plugins and enable Piwik Analytics. In the plugin's settings, set PiwikInstall to <tt>//www.example.com/randomsymlinkname/</tt> (again, see the Piwik article for an explanation of randomsymlinkname) and set PiwikSiteID to the Id of the website. |
==== Making nice code blocks with [http://vanillaforums.org/addon/1166/prettyprint PrettyPrint] ==== | ==== Making nice code blocks with [http://vanillaforums.org/addon/1166/prettyprint PrettyPrint] ==== | ||
Line 249: | Line 225: | ||
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. | ||
− | |||
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 | ||
− | 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/PrettyPrint -type f | xargs chmod 664 |
− | username@servername:~$ find /var/www/example.com/public/forums/plugins -type d | xargs chmod 775 | + | username@servername:~$ find /var/www/example.com/public/forums/plugins/PrettyPrint -type d | xargs chmod 775 |
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 prettyprint-plugin-1.2.zip | 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:~$ 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 | ||
− | |||
Paste into the new file: | Paste into the new file: | ||
− | + | ||
/* Pretty printing styles. Used with prettify.js. */ | /* Pretty printing styles. Used with prettify.js. */ | ||
Line 317: | Line 291: | ||
li.L7, | li.L7, | ||
li.L9 { background: #f0f0f0 } | li.L9 { background: #f0f0f0 } | ||
− | |||
To make in-line code a lighter shaded background: | To make in-line code a lighter shaded background: | ||
− | + | ||
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 | ||
− | |||
Remove the following code: | Remove the following code: | ||
− | + | ||
{background-color:#ddd !important} | {background-color:#ddd !important} | ||
− | |||
== External links == | == External links == | ||
Line 336: | Line 307: | ||
[http://vanillawiki.homebrewforums.net/index.php/Main_Page Vanilla Community Wiki Project] | [http://vanillawiki.homebrewforums.net/index.php/Main_Page Vanilla Community Wiki Project] | ||
+ | |||
+ | [//mailinator.com Mailinator] provides a free, disposable email service that is very convenient for testing. | ||
[[Category:PHP Web Packages]] | [[Category:PHP Web Packages]] |
Latest revision as of 17:51, 20 July 2019
Note: This article has had no material updates since November 30, 2014 and is not currently being maintained. Vanilla forums have had several updates since then, so this article should be used for reference purposes only.
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 LEMP web server set up according this site's series of articles, which can be reviewed in the Steps to create 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 reload nginx.
username@servername:~$ sudo nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful username@servername:~$ sudo service nginx reload * Reloading nginx configuration nginx [ OK ]
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.6.
username@servername:~$ wget https://open.vanillaforums.com/get/vanilla-core-3.1.zip username@servername:~$ unzip -d /var/www/example.com/public vanilla-core-2.1.6.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 -d '\n' chmod 775 username@servername:~$ find /var/www/example.com/public/forums -type f | xargs -d '\n' chmod 664 username@servername:~$ chmod -R 777 /var/www/example.com/public/forums/{conf,uploads,cache} 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.
Note that the 777
permissions are required by Vanilla, so complain to them about this.
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:~$ mkdir /var/www/example.com/public/forums/themes/defaultclone/views 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, edit 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.9.zip username@servername:~$ unzip -d /var/www/example.com/public/forums/plugins quotes-plugin-1.6.9.zip username@servername:~$ find /var/www/example.com/public/forums/plugins/Quotes/ -type f | xargs chmod 664 username@servername:~$ find /var/www/example.com/public/forums/plugins/Quotes/ -type d | xargs chmod 775 username@servername:~$ sudo chown -R www-data:www-data /var/www/example.com/public/forums/plugins/Quotes username@servername:~$ rm quotes-plugin-1.6.9.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:
<!-- Piwik --> <script type="text/javascript"> var _paq = _paq || []; _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="$PiwikInstall"; _paq.push(['setTrackerUrl', u+'js/']); _paq.push(['setSiteId', '$PiwikSiteID']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'js/'; s.parentNode.insertBefore(g,s); })(); </script> <noscript> <img src="$ImageTrack/randomsymlinkname2.php?idsite=$PiwikSiteID" style="border:0" alt="" /> </noscript> <!-- End Piwik Code -->
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/PrettyPrint -type f | xargs chmod 664 username@servername:~$ find /var/www/example.com/public/forums/plugins/PrettyPrint -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
Vanilla Community Wiki Project
Mailinator provides a free, disposable email service that is very convenient for testing.