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 »

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 -->
User avatar
janus_zonstraal
Registered User
Posts: 6427
Joined: Sat Aug 30, 2014 1:30 pm

Re: Hiding content when post/topic was deleted

Post by janus_zonstraal »

Don't put the ads in the header!!

See:
viewtopic.php?f=46&t=2133053#p13013518
Sorry! My English is bat ;) !!!
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Hiding content when post/topic was deleted

Post by david63 »

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!

I now no longer support any of my extensions but they will start to become available here
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53413
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Hiding content when post/topic was deleted

Post by Brf »

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 »

Such a great idea. Thank you!
Post Reply

Return to “[3.2.x] Support Forum”