Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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 "You're 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
You can’t perform that action at this time.