I see, i never really had math and i kind of know nothing about it.
I see now that if you calculate 3*1-2 = 1, so indeed 3*2-2 = 4. These are indeed the numbers i am looking for!
I'm still a little bit stuck though.
When it comes to math all i get are brainfreezes. I just can't figure it out .
What i did now:
IF > commentCheck = 3*commentPage-2 > Do action
IF > commentCheck = 3*commentPage-1 > Do action, Do Action
IF > commentCheck = 3*commentPage > Do action, Do Action, Do Action
commentCheck = The number of comments
commentPage = The comment page
I think i'm stuck at the pages.
If i got 1,2 or 3 comments everything works perfect as mentioned above. Now the problem starts having a 4th comment.
If i have 4 comments the formulas above don't work anymore if the commentPage is still 1. This makes sense but i am not sure how to switch over.
Even if commentCheck = 4 but i am still on comment page 1 it should show the first 3 comment.
The information is always right in my php script no matter the page because i use limit 0,3 if the comment page is 1, i use limit 3,6 if the comment page is 2 and so on.
So my information is always correct in my script.
So if i have 4 comments but commentPage = 1 it should read it as 3 comments. Once a user hits the "More comments" button commentPage will be 2.
My conclusion: commentCheck = commentCheck(4) - commentPage(1). So if i have 4 comments, and i'm on page 1, it will be counted as 3 and it will create 3 comment blocks.
If i go a page up, the new calculation will be commentCheck = commentCheck(4) - commentPage (2) which results in 2. This is incorrect. Because it should be 1.
I am really not getting the clue here .
My code so far: