3.1.x Snippetsuser avatar in the birthday list

Snippets
Previous topicNext topic
User avatar

Topic Author
salazardeaguiar
Users
Users
Magic user status: Offline
Posts: 47
Joined: Dec 6th, '15, 19:47
    Windows 8.1 Firefox

user avatar in the birthday list

Post by salazardeaguiar »

First, open index.php
FIND:

Code: Select all

$sql_ary = array(
		'SELECT' => 'u.user_id, u.username, u.user_colour, u.user_birthday',
After u.user_colour,, add

Code: Select all

u.user_avatar, u.user_avatar_type, u.user_avatar_height, u.user_avatar_width,
FIND:

Code: Select all

$birthdays[] = array(
			'USERNAME'	=> $birthday_username,
			'AGE'		=> $birthday_age,
After, add

Code: Select all

	'AVATAR'	=> phpbb_get_user_avatar($row),
Open /styles/prosilver/template/index_body.html

FIND:

Code: Select all

<!-- IF S_DISPLAY_BIRTHDAY_LIST -->
	<div class="stat-block birthday-list">
		<h3>{L_BIRTHDAYS}</h3>
		<p>
			<!-- EVENT index_body_block_birthday_prepend -->
			<!-- IF .birthdays -->{L_CONGRATULATIONS}{L_COLON} <strong><!-- BEGIN birthdays -->{birthdays.USERNAME}<!-- IF birthdays.AGE !== '' --> ({birthdays.AGE})<!-- ENDIF --><!-- IF not birthdays.S_LAST_ROW -->, <!-- ENDIF --><!-- END birthdays --></strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF -->
			<!-- EVENT index_body_block_birthday_append -->
		</p>
	</div>
<!-- ENDIF -->
REPLACE WITH:

Code: Select all

<!-- IF S_DISPLAY_BIRTHDAY_LIST -->
	<div class="stat-block birthday-list">
		<h3>{L_BIRTHDAYS}</h3>
		<p>
			<!-- EVENT index_body_block_birthday_prepend -->
			<!-- IF .birthdays -->{L_CONGRATULATIONS}{L_COLON} <strong><!-- BEGIN birthdays --><div class="avatarbirth">{birthdays.AVATAR}</div>{birthdays.USERNAME}<!-- IF birthdays.AGE !== '' --> ({birthdays.AGE})<!-- ENDIF --></br></br><!-- IF not birthdays.S_LAST_ROW -->, <!-- ENDIF --><!-- END birthdays --></strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF -->
			<!-- EVENT index_body_block_birthday_append -->
		</p>
	</div>
<!-- ENDIF -->
open: styeles/prosilver/theme/common.css

Add anywhere

Code: Select all

.avatarbirth img {
max-width:40px;
max-height:40px;
float: left; }
Change max-width and max-height for what you want

RESULTS:

Image
Previous topicNext topic