remove attachment filename and view count from post

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
dannyfish
Registered User
Posts: 5
Joined: Sat Nov 23, 2019 11:58 am

remove attachment filename and view count from post

Post by dannyfish »

running a forum on 3.2.8 with the flat styles theme. I have created some posts with inline images and when viewed it shows the filename and view count under the image. Is it possible to remove this? Thanks
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6731
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James

Re: remove attachment filename and view count from post

Post by HiFiKabin »

OPEN

styles/prosilver/template/attachment.html

DELETE

<dd>{_file.DOWNLOAD_NAME} ({_file.FILESIZE} {_file.SIZE_LANG}) {_file.L_DOWNLOAD_COUNT}</dd>

SAVE>UPLOAD>PURGE BOARD CACHE

Remember to make a backup before you start.
dannyfish
Registered User
Posts: 5
Joined: Sat Nov 23, 2019 11:58 am

Re: remove attachment filename and view count from post

Post by dannyfish »

Hi,
Thanks for the detailed instructions. I have followed to the letter, cleared the cache and cleared browser history/cache etc. The filename and viewcount are still visible.
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6027
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: remove attachment filename and view count from post

Post by thecoalman »

If you are using theme other than prosilver you need to apply changes to that themes template. See if this file exists.

styles/custom_template_name/template/attachment.html
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
dannyfish
Registered User
Posts: 5
Joined: Sat Nov 23, 2019 11:58 am

Re: remove attachment filename and view count from post

Post by dannyfish »

I have no file in my theme called attachment.html. I am using the flat style theme.
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6027
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: remove attachment filename and view count from post

Post by thecoalman »

If the file dose not exist it's not something out of the ordinary. The best place to ask your question is in the themes topic since people using it will be more familiar with it.

You might try searching the files for some of the template variables. Using something like Notepadd++ you can use it's search feature to search files in the themes directory, try searching for _file.L_DOWNLOAD_COUNT Note that could appear in more than one template file so make sure you are editing the right one.

As another option if has a viewtopic_body.html template open it with text editor. Somewhere in that file will be the code for attachments or include for another template file with the attachment code.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
Lumpy Burgertushie
Registered User
Posts: 69228
Joined: Mon May 02, 2005 3:11 am

Re: remove attachment filename and view count from post

Post by Lumpy Burgertushie »

how about a link to a post on your board that we can see to check things.
are you running the current version (3.2.8) of flat style?
flat style only has 9 template files so all the rest have to come from prosilver.
so, you must have prosilver installed for it to work.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6731
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James

Re: remove attachment filename and view count from post

Post by HiFiKabin »

Doing the edit I suggested in my first post results in the following. So if you are not seeing the same you have either edited a file in a different location, not purged your boards cache correctly or you have some other caching going on that we are not aware of.
screenshot_254.jpg
Tested locally phpBB 3.2.8 Flat Style 1.0.8
You do not have the required permissions to view the files attached to this post.
dannyfish
Registered User
Posts: 5
Joined: Sat Nov 23, 2019 11:58 am

Re: remove attachment filename and view count from post

Post by dannyfish »

HiFiKabin wrote: Sat Nov 23, 2019 4:43 pm Doing the edit I suggested in my first post results in the following. So if you are not seeing the same you have either edited a file in a different location, not purged your boards cache correctly or you have some other caching going on that we are not aware of.

screenshot_254.jpg

Tested locally phpBB 3.2.8 Flat Style 1.0.8
Many thanks, now sorted. I edited the wrong line in the attachment file. Now displaying without file names etc.

Thanks again
psal
Registered User
Posts: 30
Joined: Wed Apr 23, 2003 9:52 pm
Location: Australia
Name: Peter Salmon

Re: remove attachment filename and view count from post

Post by psal »

I'm still having problems removing attachment filename, size and view count from post.

I'm running PHPBB board version 3.3.11 using the prosilver style. Here is a snapshot of my styles/prosilver/template/attachment.html file and I have highlighted the what I have deleted from the file however despite saving the edited file, deleting cache and reloading the web page, I still haven't been able to remove filename, size and view count from post.

Is 3.3.11 different with the 3.2.x version?

Would appreciate advice.

Click on image to enlarge.

Peter.
You do not have the required permissions to view the files attached to this post.
Last edited by psal on Fri Feb 23, 2024 4:38 pm, edited 1 time in total.
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72475
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK

Re: remove attachment filename and view count from post

Post by KevC »

-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
psal
Registered User
Posts: 30
Joined: Wed Apr 23, 2003 9:52 pm
Location: Australia
Name: Peter Salmon

Re: remove attachment filename and view count from post

Post by psal »

Your too quick, thank you, I'll give it a go.

Peter.
psal
Registered User
Posts: 30
Joined: Wed Apr 23, 2003 9:52 pm
Location: Australia
Name: Peter Salmon

Re: remove attachment filename and view count from post

Post by psal »

Yes, the https://phpbb.hifikabin.me.uk/viewtopic.php?t=236 extension does work but the problem is that it also removes the file comment.

I'd like to retain the file comment:
.
file comment.jpg
.
but delete file name, file size and view stats.
.
edit.jpg
.
Anyhow I've just sent an email off to HiFiKabin seeking his assistance.

Peter.
You do not have the required permissions to view the files attached to this post.
Last edited by psal on Fri Feb 23, 2024 6:17 pm, edited 2 times in total.
User avatar
KevC
Support Team Member
Support Team Member
Posts: 72475
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK

Re: remove attachment filename and view count from post

Post by KevC »

Try asking on the support tab on the page I linked.
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6027
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: remove attachment filename and view count from post

Post by thecoalman »

psal wrote: Fri Feb 23, 2024 4:35 pm Click on image to enlarge.

Peter.
The section for thumbnails is not highlighted, you need to remove that. Make sure to purge the cache after making template changes otherwise they won't take affect.

Quick tip, instead of deleting the lines you can comment them out.

Code: Select all

<!-- IF 0 -->
Template code commented out. 
<!-- ENDIF -->

“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison

Return to “[3.2.x] Support Forum”