How to remove attachment paperclip?

Started by CheeseHead05, July 13, 2013, 09:44:42 PM

Previous topic - Next topic

CheeseHead05

How do you remove the paperclip that is under an attachment?

Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

CheeseHead05


Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

CheeseHead05


kat

The "Don't need to code anything" way, would be to replace the image Themes/default/theme/images/icons/clip.gif with a single pixel, transparent gif file.

To save you farting about, creating one, there's one, attached. :)

If you wanna fiddle with the code, find this line, in Display.template.php:

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

and delete this bit:

<img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" />

Colin

Thanks K@.

That was really nice of you to include the single pixel file too.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

kat

No sweat, mate.

I use it on my forum, for something. I can't even remember what, now, though. :)

MrPhil

Quote from: K@ on July 14, 2013, 03:33:29 PM
To save you farting about, creating one, there's one, attached. :)
I can't see it. Where is it?

Chalky

LOL!!!  ;D

I had to open the file to see what it looked like, but K@ will tell you that's pretty normal for me  :P

kat



Nothing about you is normal, Chalky. ;)

(That's a compliment, coming from me). :)

CheeseHead05

K@,

I took your code and it deleted the paperclip alright, lol, but how do I delete the entire line besides the paperclip..

For example,

Shoes.jpg (97.67 kB, 480x480 - viewed 1 times.)

Sorry for not being thorough in my description request.

Kindred

Mmm...   What?

You plan to completely remove all reference to attachments?
If you want to do that, why don't you just disable attachments entirely?
Сл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."

CheeseHead05

Kindred,

y would I want to do that?? That's a cool feature of a forum. I just want the info in ref to the attachment gone, not the attachment itself.

Kindred

But, you just asked how to remove the link to the attachment....
Сл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."

CheeseHead05

Exactly, I don't want a link present under the attachment. I ONLY want the attachment pic.

Kindred

What if the attachment is not an image? In that case, the link s the only way to see or use it.
Сл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."

CheeseHead05

Yea I understand but my forum is for uploaded attachments straight into the forum.

kat

Most odd. But, hey! It's your forum. :)

You'll need to remove this entire block, then:

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 />';


CheeseHead05

Strangely, my notepad++ just found "echo"..Can you take a look at my display.temp?

Advertisement: