News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

HTML errors

Started by gecitli, February 23, 2019, 05:19:02 AM

Previous topic - Next topic

gecitli

hello how to add this tag to this tag

function template_bi_board_lastpost($board)
{
if (!empty($board['last_post']['id']))
echo '
<p>'.$board['last_post']['member']['avatar']['image'].' ', $board['last_post']['last_post_message'], '</p>';
}


QuoteAn "img" element must have an "alt" attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images
http://www.webtiryaki.com
webmaster forumu
Free & Premium Responsive Themes for SMF.

Kindred

certainly not in that location....

you'd have to add it to the variable when the avatar is loaded... either in load.php or subs.php, can't recall which.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Version of SMF? Any mods?

gecitli

Quote from: Kindred on February 23, 2019, 07:52:41 AM
certainly not in that location....

you'd have to add it to the variable when the avatar is loaded... either in load.php or subs.php, can't recall which.
Quote from: Arantor on February 23, 2019, 07:58:35 AM
Version of SMF? Any mods?

SMF 2.1 RC1

index.template.php

// Set the following variable to true is this theme wants to display the avatar of the user that posted the last post on the board index.
$settings['avatars_on_boardIndex'] = true;


Boardindex.template.php

<p>', $board['last_post']['last_post_message'], '</p>
http://www.webtiryaki.com
webmaster forumu
Free & Premium Responsive Themes for SMF.

Arantor

This is probably a core bug in 2.1 RC1 - set_avatar_data in Load.php doesn't add an alt and it really should. It's near the bottom of Load.php if you want to change it yourself.

Advertisement: