- Posts: 3
- Thank you received: 0
Kunena 7.1.1 & Kunena 6.4.17 – Security Updates Released
The Kunena team has announce the arrival of Kunena 7.1.1 [K 7.1.1] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x./6.1.x./6.2.x This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 / K7.0 and issues discovered during the last development stages of K 7.1
Just a reminder: K6.4.17 receives only securities fixes until end of 2026, so it's advised for users to upgrade to K7.1.
Solved Prevent counting of article views two times for non-logged in users
Am quite new to joomla and kunena
Am having a problem where by if the user is not logged in before viewing an article,the number of views keep increasing each time the same user visits the link.
How can I prevent this for non-logged in users?
For logged in users it works out of the box and counts only one view even if the same users visits the article a number of times.
Regards
Please Log in or Create an account to join the conversation.
My guess is that you would have to hack the source files to achieve this particular result. Shouldn't be too difficult if you know your way around PHP programming and know which files to modify. Probably a couple of hours for an experienced programmer.
Blue Eagle vs. Crypsis reference guide
Read my blog and
Please Log in or Create an account to join the conversation.
DO you know the file to edit? searching and looks like cant get it
Please Log in or Create an account to join the conversation.
Using a tool like Windows Grep , for example, you can search files to locate strings of text. That's what I would be doing.
I am making an educated guess—the Kunena developers can confirm if I'm right—but it looks like the number of hits (i.e. topic views) is incremented in the file ../libraries/kunena/forum/topic/topic.php.
What you would have to do is to insert an if-test to check if the topic was being viewed by someone who is already logged-in and, accordingly, execute the part the increments the counter. Does that help?
Blue Eagle vs. Crypsis reference guide
Read my blog and
Please Log in or Create an account to join the conversation.
I was able to achieve the same and the file to edit is ../libraries/kunena/forum/topic/topic.php.
I stored cookies on user's browsers.
At least it is a good approximation for the number of hits but not so exact as users don't always use the same browser.
Now I want to prevent views from adding for logged in users.
I know it is achievable and am guessing one can store user information in topics table so when the users hits the topic again the hits are not incremented.At least for logged in users we can prevent this across browsers
Do you know the best way to do this?
Please Log in or Create an account to join the conversation.