Skip to content

Instantly share code, notes, and snippets.

@JedMeister
Last active September 16, 2019 05:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JedMeister/456cd69fbf7e4d7c92a41f8fad2fc601 to your computer and use it in GitHub Desktop.
Save JedMeister/456cd69fbf7e4d7c92a41f8fad2fc601 to your computer and use it in GitHub Desktop.
customise phpBB theme - TKL v14.x
#!/bin/bash -e
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root, please use sudo"
exit 1
fi
if [[ -n $1 ]]; then
NEW_STYLE=$1
else
NEW_STYLE=custom_style
fi
mkdir -p /etc/phpbb3/styles/$NEW_STYLE
cp -r /usr/share/phpbb3/styles/prosilver/* /etc/phpbb3/styles/$NEW_STYLE/
cd /etc/phpbb3/styles/$NEW_STYLE
FILES="imageset/imageset.cfg template/template.cfg template/overall_header.html theme/stylesheet.css theme/theme.cfg style.cfg"
for file in $FILES; do
sed -i "\|name|s|prosilver|$NEW_STYLE|" $file
done
echo "Your new custom style is named $NEW_STYLE, and can be found in /etc/phpbb3/styles/$NEW_STYLE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment