Page 1 of 1

phpBB Code

Posted: Fri Nov 30, 2018 11:45 pm
by kachan64
This is a collection of code for phpBB.

We are not responsible for damaged phpBB board. Please create a backup before proceed.

Tested with: 3.2.x

Set gravatar as default for registration:
Open includes/functions_user.php and find:

Code: Select all

		'user_avatar'			=> '',
		'user_avatar_type'		=> '',
Replace with:

Code: Select all

		'user_avatar'			=> strtolower($user_row['user_email']),
		'user_avatar_type'		=> 'avatar.driver.gravatar',
Set gravatar as default for registration (Pt.2):
This will generate random avatar for each user instead of default Gravatar icon.
Open phpbb/avatar/driver/gravatar.php and find:

Code: Select all

			$url .= '?s=' . max($row['avatar_width'], $row['avatar_height']);
Replace with:

Code: Select all

			$url .= '?s=' . max($row['avatar_width']."&d=identicon", $row['avatar_height']);
You can change &d=identicon part to something other than Identicon.
Identicon = identicon
Wavatar = wavatar
MonsterID = monsterid
Retro = retro
Thanks Ephestione's HQ for the Gravatar code.