Various modifications for phpBB3Smile alignment on middle of text

Snippets for phpBB3
Previous topicNext topic
User avatar

Topic Author
dmzx
Founder
Founder
Magic user status: Online
Posts: 5978
Joined: Jan 13th, '14, 20:45
    unknown unknown

Smile alignment on middle of text

Post by dmzx »

Smile alignment on middle of text

Open includes/functions_content.php
Find This may be a partial find and not the whole line

Code: Select all

return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/(.*?) \/><!\-\- s\1 \-\->#', '<img src="' . $root_path . $config['smilies_path'] . '/\2 />', $text);
Replace with Replace the preceding lines with the following

Code: Select all

return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/(.*?) \/><!\-\- s\1 \-\->#', '<img style="vertical-align: middle;" src="' . $phpbb_root_path . $config['smilies_path'] . '/\2 />', $text);

Demo: Hello :buigen: see the smillie is aligned in the middle of the text.
binance.com ;) try it!
User avatar

clight77
Donator
Donator
Magic user status: Offline
Posts: 444
Joined: Sep 24th, '15, 14:23
    Windows 10 Firefox

Re: Smile alignment on middle of text

Post by clight77 »

Thanks, this makes things look neater :)
User avatar

clight77
Donator
Donator
Magic user status: Offline
Posts: 444
Joined: Sep 24th, '15, 14:23
    Windows 10 Firefox

Re: Smile alignment on middle of text

Post by clight77 »

Hi
Can this be done for avatars in mchat ?
As I have a single line shout box..

Please and thanks :)
You do not have the required permissions to view the files attached to this post.
User avatar

clight77
Donator
Donator
Magic user status: Offline
Posts: 444
Joined: Sep 24th, '15, 14:23
    Windows 10 Firefox

Re: Smile alignment on middle of text

Post by clight77 »

Solved :)

Changed mchat.ccs
From this:

Code: Select all

.mChatAvatars {
	float: left;
	padding-right: 5px;
}
To this:

Code: Select all

.mChatAvatars {
    height: 15px;
    width: 15px;
    vertical-align: middle;
    margin-top: 2px;
    float: left;
    padding-right: 5px;
You do not have the required permissions to view the files attached to this post.
User avatar

Topic Author
dmzx
Founder
Founder
Magic user status: Online
Posts: 5978
Joined: Jan 13th, '14, 20:45
    Windows 8 Firefox

Re: Smile alignment on middle of text

Post by dmzx »

:thumbup:
Previous topicNext topic