Topic: Announcement on frontpage only
I would like an option to display an announcement only on the frontpage, not on every page - I find it extremely messy, and it's going to affect search engines negatively when they try to index the pages...
You are not logged in. Please login or register.
PunBB Forums → Feature requests → Announcement on frontpage only
I would like an option to display an announcement only on the frontpage, not on every page - I find it extremely messy, and it's going to affect search engines negatively when they try to index the pages...
i agree, it would be a nice option. Perhaps this would require pretty lot of coding though
In 1.2 it won't require any coding. Each page has a different id so you can just do this
#announce {DISPLAY: none}
#punindex #announce {DISPLAY: block}
That should make it vanish for all the pages and then turn it back on for the index page. It won't solve the search engine problem though unless they honour css which is doubtful.
Other than that it's a simple edit in header.php to make the output of the announcement conditional upon it being the index page.
Clever - but as you pointed out, it doesn't solve the search engine problem. And it's a waste of bandwidth
95% of the internet is a waste of bandwidth, a little more won't do any harm.
Good argument, but the search engine problem remains.
In 1.2 replacing this
if ($pun_config['o_announcement'] == '1')
with this
if ($pun_config['o_announcement'] == '1' && basename($_SERVER['PHP_SELF']) == "index.php")
does the trick.
I assume something similar works in PunBB 1.1.x
PunBB Forums → Feature requests → Announcement on frontpage only
Powered by PunBB, supported by Informer Technologies, Inc.