Hi guys.
This time, I'm trying to make a view count in my custom forum page.
Goal for my custom view counter is:
1. View count value increase once a registered user load this page at the first time.
2. View count value doesn't change if a same registered user loads a same page.
3. View count value dose change if a same page is modified even though a user visited before.
What I've got from search through internet, there are so many way of creating it.
Cookie, I think, doesn't work I guess because it either expires or deleted by user or browser.
Session might not work. I'm just guessing.
So, I'm trying to make some kind of a holder for the view count value.
I'm trying to create a field using API.
Then that field is attached either page or user template.
If it is in a page template, this field holds user IDs who loads this page.
This field should hold many other users IDs(thinking of an array datatype)
Once a same user loads a page and that user id is in the field of a page, view count doesn't change.
If a page has been modified, id of an user id is removed. So that whenever a user loads modified page, it can change view count value.
This is my plan.
Now that I've found some problem or I'm still not know how to solve it, yet.
I can't find any field that can hold array datatype.
If any of you know how to do this or have different solution, I would really appreciate it.
Thank you.