Hey, my new website is just starting out and I'm trying to get a better idea of who all is viewing the posts on my board. So I would like a way for the software to only increase the view counter for topics when someone that is not an admin views the topic. That way I can see who all is viewing it besides me.
I'm sure I saw a MOD to do this somewhere, but I can't find it now, after spending quite a few minutes on phpBB.com. I would delve into the code myself to try and find it, but I don't have the time at the moment.
A mod to not increase topic views for admin
-
- Supporter
- Posts: 32
- Joined: 12 Aug 2009, 16:16
- Real name: David
- Contact:
A mod to not increase topic views for admin
phpBB.com Development Team Member | View My MODs | View My Website
Please do NOT contact for support via PM or email.
Please do NOT contact for support via PM or email.
-
- Supporter
- Posts: 32
- Joined: 12 Aug 2009, 16:16
- Real name: David
- Contact:
Re: A mod to not increase topic views for admin
Well, I found [url=http://www.phpbb.com/community/viewtopic.php?f=69&t=1744245&start=0]Prevent Topic View Increase by Author[/url], by BondGamer. Which is also something that can be useful. I added that MOD, and then I added and so far that seems to work just fine for what I need.
So what I ended up changing was:
Open viewtopic.php, and replace:
with:
I hope this helps someone.
Code: Select all
&& !$auth->acl_get('a_')
So what I ended up changing was:
Open viewtopic.php, and replace:
Code: Select all
if (isset($user->data['session_page']) && !$user->data['is_bot'] && (strpos($user->data['session_page'], '&t=' . $topic_id) === false || isset($user->data['session_created'])))
with:
Code: Select all
if (isset($user->data['session_page']) && !$user->data['is_bot'] && !$auth->acl_get('a_') && $user->data['user_id'] != $topic_data['topic_poster'] && (strpos($user->data['session_page'], '&t=' . $topic_id) === false || isset($user->data['session_created'])))
I hope this helps someone.
phpBB.com Development Team Member | View My MODs | View My Website
Please do NOT contact for support via PM or email.
Please do NOT contact for support via PM or email.