[SNIPPET] Shadow Avatars

Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support

[SNIPPET] Shadow Avatars

Post by Stoker »

Get shadow/reflactions on avatar images.
Idea from: http://cow.neondragon.net/stuff/reflection/

Screenshots:
avatar_topic.png
avatar_profile.png
Open styles/prosilver/template/overall_header.html
Find:

Code: Select all

<script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>
Add after:

Code: Select all

<script src="{ROOT_PATH}script/reflection.js" type="text/javascript"></script>
Open includes/functions_display.php
Find:

Code: Select all

return '<img src="' . (str_replace(' ', '%20', $avatar_img)) . '" width="' . $avatar_width . '" height="' . $avatar_height . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
Replace with:

Code: Select all

return '<img src="' . (str_replace(' ', '%20', $avatar_img)) . '" width="' . $avatar_width . '" height="' . $avatar_height . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" class="reflect rheight20" />';


Lets do the same with rank images.

Screenshots:
rank_viewtopic.png
rank_profile.png
Open includes/functions_display.php
Find:

Code: Select all

$rank_img = (!empty($ranks['special'][$user_rank]['rank_image'])) ? '<img src="' . $phpbb_root_path . $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image'] . '" alt="' . $ranks['special'][$user_rank]['rank_title'] . '" title="' . $ranks['special'][$user_rank]['rank_title'] . '" />' : '';
Replace with:

Code: Select all

$rank_img = (!empty($ranks['special'][$user_rank]['rank_image'])) ? '<img src="' . $phpbb_root_path . $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image'] . '" alt="' . $ranks['special'][$user_rank]['rank_title'] . '" title="' . $ranks['special'][$user_rank]['rank_title'] . '" class="reflect rheight40" />' : '';
The edit in overall_header.html stays the same.
script.zip
You do not have the required permissions to view the files attached to this post.

Re: Shadow Avatars

Post by kevinviet »

Thanks a lot Stoker, I'm glad this board going again :thumb:

Re: Shadow Avatars

Post by Stoker »

Nice to see you here Kevin ;)

[SNIPPET] Shadow Avatars

Post by Solidjeuh »

And if you have ' Random avatar mod ' installed.

Open includes/functions_display.php
Find:

Code: Select all

			return '<img src="' . $random_avatar . '" width="' . $avatar_width . '" height="' . $avatar_height . '" title="' . ((!empty($user->lang['RANDOM_AVATAR'])) ? $user->lang['RANDOM_AVATAR'] : 'RANDOM_AVATAR') . '" alt="' . ((!empty($user->lang['RANDOM_AVATAR'])) ? $user->lang['RANDOM_AVATAR'] : 'RANDOM_AVATAR') . '"/>';
Replace:

Code: Select all

			return '<img src="' . $random_avatar . '" width="' . $avatar_width . '" height="' . $avatar_height . '" title="' . ((!empty($user->lang['RANDOM_AVATAR'])) ? $user->lang['RANDOM_AVATAR'] : 'RANDOM_AVATAR') . '" alt="' . ((!empty($user->lang['RANDOM_AVATAR'])) ? $user->lang['RANDOM_AVATAR'] : 'RANDOM_AVATAR') . '" class="reflect rheight20" />';

[SNIPPET] Shadow Avatars

Post by Blackwolf »

Note: If you have 'Top Five' version 1.0.1.d mod installed...it will stretch your avatars there also.

I had it installed but removed due to throwing the alignment out. Shame...looked cool. :(
Screenshot-2.png
Screenshot.png
Screenshot-1.png
Edit Seems to have worked okay in Firefox....re edited just now......but shows as stretched in Google Chrome..... :?

Firefox does look fine :thumb:,.....UNTIL.....I log out...... :?

F5 good.....3 seconds later back to stretched.....


Is there a way to stop it loading avatar reflection on the top five mod? :?:
You do not have the required permissions to view the files attached to this post.

[SNIPPET] Shadow Avatars

Post by Stoker »

Nope, it is applied to the avatar function.
Its in play when the avatar is displayed.

[SNIPPET] Shadow Avatars

Post by Blackwolf »

Stoker wrote:Nope, it is applied to the avatar function.
Its in play when the avatar is displayed.
Cool....thanks for the speedy reply.....seems to expand some times...not others...good in ff & chrome tonight, ie stretched.....oh the pain, the pain! :D

Had to remove. A soon as I logged out the left boxed had stretched avatars. Prefer the way it was. Win some, loose some. :)

[SNIPPET] Shadow Avatars

Post by Leinad4Mind »

In gif avatar, the reflectin is not animated.

It would be the only thing I ddidn't like. But in the rest, 5*.