How do you remove the paperclip that is under an attachment?
For all of them or just one post?
All of them.
What theme are you using?
Greengrass 1. A custom theme..
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="*" /> ' . $attachment['name'] . '</a> ';
and delete this bit:
<img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" />
Thanks K@.
That was really nice of you to include the single pixel file too.
No sweat, mate.
I use it on my forum, for something. I can't even remember what, now, though. :)
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?
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
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.katzy.dsl.pipex.com%2FSmileys%2Fgiggle.gif&hash=5e80a98c3d04c08d8574cd705bb1f58802253210)
Nothing about you is normal, Chalky. ;)
(That's a compliment, coming from me). :)
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.
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?
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.
But, you just asked how to remove the link to the attachment....
Exactly, I don't want a link present under the attachment. I ONLY want the attachment pic.
What if the attachment is not an image? In that case, the link s the only way to see or use it.
Yea I understand but my forum is for uploaded attachments straight into the forum.
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="*" /> ' . $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>] | [<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 />';
Strangely, my notepad++ just found "echo"..Can you take a look at my display.temp?
Yeah, that block's there, OK.
Now, just in case I've misedited it, rename the file that's there, now, to something like "Display.template0.php". Then, upload the attached file and check it out.
If it works, OK, you can then delete the renamed file, or keep it there, for a while, just in case.
If something goes wrong, simply delete the new file and rename the old one back.
K@,
U solved my issue! Thanks!
One question tho,
I have 4 forums, each named differently, now for my other 3, I used your "revised" version of the display.template to fix the attachment description and of course it worked. My question to u is are all the display.templates the same as far as codes? Or is the one u gave me specifically for that particular forum?
Matter fact, can you give me the lines that you removed? I think the lines would be the same in each display.template unlike the rest of the info.
well, it would really depend on what mods and/or themes you have installed in each
Kindred,
I was thinkin the same thing, I think imma just use the same mods and of course the same theme for all to make it easy on me.
K@,
Hope Im not asking for too much, but I added a new forum with a new theme and wanted to know if you could take a look at my display.template so that I can again remove the attachment paperclip and description?
To add to this how can I make my attachments side by side as opposed to vertical ?
GluenStuff:
1. Please start your own topics. This one is marked solved already so there was a high chance your request would be missed.
2. Have a look at the ILA- Inline Attachments (https://github.com/Spuds/ILA)mod. It is no longer on the mod site but it is still available at Github.
Quote from: CheeseHead05 on July 26, 2013, 05:44:55 PM
K@,
Hope Im not asking for too much, but I added a new forum with a new theme and wanted to know if you could take a look at my display.template so that I can again remove the attachment paperclip and description?
/me goes a fiddlin'...
There ya go!
Once again, though...
Quote from: K@ on July 16, 2013, 07:28:28 AM
Just in case I've misedited it, rename the file that's there, now, to something like "Display.template0.php". Then, upload the attached file and check it out.
If it works, OK, you can then delete the renamed file, or keep it there, for a while, just in case.
If something goes wrong, simply delete the new file and rename the old one back.