Hiding content when post/topic was deleted

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
Qrzysio
Registered User
Posts: 7
Joined: Fri Jul 20, 2012 9:58 pm

Hiding content when post/topic was deleted

Post by Qrzysio » Thu Apr 19, 2018 10:34 am

Google AdSense forces me to remove ads from pages where posts/topic were removed. In fact, the page is almost blank. What we can see is only "The requested topic does not exist." (L_NO_TOPIC) alert.

How to detect in overall_header template that on the page is displayed L_NO_TOPIC?

I had the same issue with ads on login pages and I found this solution:

Code: Select all

<!-- IF SCRIPT_NAME != "ucp" -->
// ads HTML code
<!-- ENDIF -->

janus_zonstraal
Registered User
Posts: 2667
Joined: Sat Aug 30, 2014 1:30 pm

Re: Hiding content when post/topic was deleted

Post by janus_zonstraal » Thu Apr 19, 2018 11:11 am

Don't put the ads in the header!!

See:
viewtopic.php?f=46&t=2133053#p13013518
Sorry! My English is bat ;) !!!

User avatar
david63
Jr. Extension Validator
Posts: 14724
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Hiding content when post/topic was deleted

Post by david63 » Thu Apr 19, 2018 11:40 am

Qrzysio wrote:
Thu Apr 19, 2018 10:34 am
How to detect in overall_header template that on the page is displayed L_NO_TOPIC?
You cannot.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51345
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Hiding content when post/topic was deleted

Post by Brf » Thu Apr 19, 2018 1:03 pm

janus_zonstraal wrote:
Thu Apr 19, 2018 11:11 am
Don't put the ads in the header!!
See:
viewtopic.php?f=46&t=2133053#p13013518
This is correct. If your ads are in viewtopic, rather than the header, you would not be having this problem. The "No topic" error you are seeing is not displaying the viewtopic_body template, so it would not show your ads.

User avatar
Qrzysio
Registered User
Posts: 7
Joined: Fri Jul 20, 2012 9:58 pm

Re: Hiding content when post/topic was deleted

Post by Qrzysio » Thu Apr 19, 2018 4:43 pm

Such a great idea. Thank you!

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: </Solidjeuh>, 22288DLW, bonelifer, Crizzo, david63, EA117 and 63 guests