diff --git a/salt/profile/vbulletin/README.md b/salt/profile/vbulletin/README.md new file mode 100644 index 0000000..1633e12 --- /dev/null +++ b/salt/profile/vbulletin/README.md @@ -0,0 +1,42 @@ +# vBulletin 5 Setup for openSUSE Forums + +## Setup tools + +If the pillar ``vbulletin.tools`` is truthy, the extra files described below +are available to aid with setup of the new forums. + +**It is important to disable the ``vbulletin.tools`` pillar and running +``highstate`` again to remove the files before production use.** + +### ``/srv/www/vhosts/forums/db-tweak.sql`` + +Running this SQL script on the vBulletin database will: + + * Set up the correct grants for the database user. + * Define the site URL correctly for template setup + * Adjust various other vBulletin settings + +After running the script, run ``core/install/upgrade.php`` again to make sure +the templates are set up correctly. + +### ``/srv/www/vhosts/forums/htdocs/vb_test.php`` + +A tool for checking that vBulletin is installed correctly, including all +dependencies, as well as verifying that it is possible to connect to the +database. + +### ``/srv/www/vhosts/forums/htdocs/info.php`` + +Shows ``phpinfo()`` for the forum server. + +## Styling + +These steps achieve a minimal styling suitable for openSUSE Forums. + +Enable the _Default vB5 Style_, then customize these style variables: + + * ``global_palette_accent_02`` = #73ba25 + * ``global_palette_text_04`` = #5a911d + +Finally, change the site logo using the file ``logo_color_90.png``. + diff --git a/salt/profile/vbulletin/files/db-tweak.sql b/salt/profile/vbulletin/files/db-tweak.sql index 66448c2..5ab58bc 100644 --- a/salt/profile/vbulletin/files/db-tweak.sql +++ b/salt/profile/vbulletin/files/db-tweak.sql @@ -1,6 +1,8 @@ -grant all on '{{dbname}}'.* to '{{username}}'@'{{host}}' identified by '{{password}}'; +grant all on {{dbname}}.* to '{{username}}'@'{{host}}' identified by '{{password}}'; update vb_setting set value='{{bburl}}' where varname='bburl'; update vb_setting set value='{{frontendurl}}' where varname='frontendurl'; update vb_setting set value=1 where varname='bburl_basepath'; +update vb_setting set value='/srv/www/vhosts/forums/sitemap' where varname='sitemap_path'; + diff --git a/salt/profile/vbulletin/files/logo-color-90.png b/salt/profile/vbulletin/files/logo-color-90.png new file mode 100644 index 0000000..7dc56b4 Binary files /dev/null and b/salt/profile/vbulletin/files/logo-color-90.png differ diff --git a/salt/profile/vbulletin/setup.sls b/salt/profile/vbulletin/setup.sls index a2cae5c..954f22a 100644 --- a/salt/profile/vbulletin/setup.sls +++ b/salt/profile/vbulletin/setup.sls @@ -55,3 +55,7 @@ configure vBulletin {{key1}}-{{key2}}: - recurse: - user +/srv/www/vhosts/forums/sitemap: + file.directory: + - user: nginx +