Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: SaltedWeb on February 05, 2018, 11:14:09 PM

Title: Remove file tag on picture in post ?
Post by: SaltedWeb on February 05, 2018, 11:14:09 PM
Is there a way to remove file tag on picture in post ?
I included a snippet of what I am talking about when adding 3-4 pictures its makes the area look
messy and I would like the tag to not be there. It might be just a setting but not sure what that is?

Thanks
SW
Title: Re: Remove file tag on picture in post ?
Post by: Sir Osis of Liver on February 05, 2018, 11:26:49 PM
Not a setting, that's the download link.  Try this -

Display.template.php



}
// echo '
// <a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" />&nbsp;' . $attachment['name'] . '</a> ';

if (!$attachment['is_approved'] && $context['can_approve'])
echo '
[<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a>]&nbsp;|&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['delete'], '</a>] ';
// echo '
// (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';

echo ' <br />';

}



You can add one or two additional <br /> if you want more spacing between stacked images.
Title: Re: Remove file tag on picture in post ?
Post by: SaltedWeb on February 05, 2018, 11:44:27 PM
Cool, i'll give it a go tomorrow, thank you.
Title: Re: Remove file tag on picture in post ?
Post by: SaltedWeb on February 06, 2018, 12:11:10 PM
Perfect, did a little tweaking but worked thank you Osis exactly what I needed now looks nice and clean. :-)


Quote from: Sir Osis of Liver on February 05, 2018, 11:26:49 PM
Not a setting, that's the download link.  Try this -

Display.template.php



}
// echo '
// <a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" />&nbsp;' . $attachment['name'] . '</a> ';

if (!$attachment['is_approved'] && $context['can_approve'])
echo '
[<a href="', $scripturl, '?action=attachapprove;sa=approve;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['approve'], '</a>]&nbsp;|&nbsp;[<a href="', $scripturl, '?action=attachapprove;sa=reject;aid=', $attachment['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $txt['delete'], '</a>] ';
// echo '
// (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />';

echo ' <br />';

}



You can add one or two additional <br /> if you want more spacing between stacked images.