Customizing SMF > Modifications and Packages

Avatars Display Integration

(1/6) > >>

Link to Mod

Avatars Display Integration

For SMF 2.1.x (Hook install)
Tested only with the SMF default theme...but should work with other themes aswell!

What does this mod do...
- Poster or user avatar display integration on: (Note: This mod will display the default/initial avatar when user has posted or mentioned as guest.)

* Board index
* Unread, Update and Message index
* Personal Message index
* Alert list
* Top section dropmenu
* Topic title header
* Recent post index
* Memberlist
* Who's Online page
* Search result
* When using bbc @mention member name in posts
* Other costum places*
- Layout the avatar:

* With shadow
* As a circle shape
* Add connection status overlay
* Initial avatar of displayname
*Other costum places:
How to add user avatar anywhere in your template file from mods maybe, simple type:

--- Code: ---data-adi-id="{userid}"
--- End code ---

How to example in template file:

--- Code: (find) ---<div class="most_downloaded"><a href="'.$last['href'].'"><b>'.$last['name'].'</b></a></div>

--- End code ---

--- Code: (replace by) ---<div class="most_downloaded">data-adi-id="'.$last['user']['id'].'"<a href="'.$last['href'].'"><b>'.$last['name'].'</b></a></div>

--- End code ---

How to style your costum output element:

--- Code: ---<span class="{whatever}">data-adi-id="{userid}"</span>
--- End code ---

 * This SMF modification is subject to the BSD 2-Clause License
Admin settings
- Admin->Forum->Attachments and Avatars->Avatar Settings

- English
- Russian by wylekk
- Spanish_Latin by Rock Lee

Version 1.2 - Mar 7, 2020
- Fixed anchor bbc @mention member name 'before the @name link'
- Fixed Undefined index: alert icon

Version 1.1 - Mar 4, 2020
- Added option avatar Who's Online page
- Optimized several css rules
- Fixed css for the 'who likes posts' avatar position
- Fixed comparison operator
- Fixed initial avatar for guests when using bbc @member in posts and at the recent post index

Version 1.0 - Jan 28, 2020
- Initial Release

I have istalled this mod, but user avatars in related posts in topics was resized from 100 to 65 pixels.
Is it possible to restore their usual size of 100 pixels?


--- Quote from: Hatshepsut on February 16, 2020, 02:14:02 AM ---I have istalled this mod, but user avatars in related posts in topics was resized from 100 to 65 pixels.
Is it possible to restore their usual size of 100 pixels?

--- End quote ---
Yes, you can by change the mod css file at ...Themes/{your_theme}/css/AvatarsDisplayIntergration.css
also be sure to set these settings at Admin->Forum->Attachments and Avatars->Avatar Settings:

* Maximum width of external avatar
* Maximum height of external avatarto 100

--- Code: (find) ---li.avatar, .avatar, .poster .avatar[data-adi~="avatar"], #profileview .avatar[data-adi~="avatar"], #profileview .adi_item_context {
width: 65px;
height: 65px;
line-height: 60px;
font-size: 42px;

--- End code ---

--- Code: (replace by) ---li.avatar, .avatar, .poster .avatar[data-adi~="avatar"], #profileview .avatar[data-adi~="avatar"], #profileview .adi_item_context {
width: 100px;
height: 100px;
line-height: 90px;
font-size: 70px;

--- End code ---

--- Code: (find) ---#profileview [data-adi~="back"], .avatar [data-adi~="back"] { /* ok */
right: 0px;
    padding: 8px;
    bottom: 0px;

#profileview [data-adi~="front"], .avatar [data-adi~="front"] { /* ok */
right: 2px;
    padding: 6px;
    bottom: 2px;

--- End code ---

--- Code: (replace by) ---#profileview [data-adi~="back"], .avatar [data-adi~="back"] { /* ok */
right: 8px;
    padding: 8px;
    bottom: 0px;

#profileview [data-adi~="front"], .avatar [data-adi~="front"] { /* ok */
right: 10px;
    padding: 6px;
    bottom: 2px;

--- End code ---

you can adjust the pixels to your wishes, i just point out how to do it.

Conflict with the Optimus mod.

--- Code: ---Type of error: Database
Database Error: Not unique table/alias: 'a' https://site/index.php?topic=10.0
/Sources/Display.php (Line 182)
--- End code ---

Translation into Russian language
AvatarsDisplayIntegration Files.russian.php and AvatarsDisplayIntegration.russian-utf8.php must be utf8 encoded

--- Code: ---<?php
 * @package Avatars Display Integration
 * @version 1.0
 * @author Pipke;u=314795
 * @copyright Copyright (C) 2020, Pipke
 * @All rights reserved. 
 * @This SMF modification is subject to the BSD 2-Clause License
 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

$txt['adi_settings_title'] = 'Интеграция аватаров';
$txt['adi_layout_title'] = 'Дизайн аватаров';
$txt['adi_boardindex'] = 'Показать аватар с последним ответом в разделах форума';
$txt['adi_message_first'] = 'Показать аватар автора темы в "Непрочитанных сообщениях" и "Темах с непрочитанными ответами"';
$txt['adi_message_last'] = 'Показать аватар с последним ответом в "Непрочитанных сообщениях" и "Темах с непрочитанными ответами"';
$txt['adi_topic_header'] = 'Показать аватар автора в заголовке темы';
$txt['adi_recent_posts'] = 'Показать аватар в "Последних сообщениях"';
$txt['adi_memberlist'] = 'Показать аватар в "Списке пользователей"';
$txt['adi_search_posts'] = 'Показать аватар в "Результате поиска"';
$txt['adi_mentions'] = 'Показать аватар при использовании участником бб-кода @mention в сообщениях...';
$txt['adi_avatar_shadow'] = 'Добавить тень ко всем аватарам';
$txt['adi_avatar_shape'] = 'Сделать все аватары круглыми';
$txt['adi_log_in'] = 'в сети';
$txt['adi_log_un'] = 'не в сети';
$txt['adi_icon_overlay'] = 'Наложить значок подключения на аватар, если пользователь находится в сети или нет...';
$txt['adi_icon_both'] = 'для обоих вариантов';
$txt['adi_icon_online'] = 'только если в  сети';
$txt['adi_none'] = 'пожалуйста, не надо';
$txt['adi_mention_before'] = 'перед ссылкой @name';
$txt['adi_mention_after'] = 'после ссылки @name';
$txt['adi_mention_no_name'] = 'и скрыть ссылку @name';
$txt['adi_icon_shape'] = 'Сделать значок статуса подключения круглым';
$txt['adi_initials'] = 'Перезаписать аватар по умолчанию с инициалом отображаемого имени';
$txt['adi_view_your_profile'] = 'Просмотр профиля';
$txt['adi_you_are_logged_in'] = 'Вы в сети';
$txt['adi_unknown_user'] = 'ID пользователя:';

--- End code ---



[0] Message Index

[#] Next page

Go to full version