XF 2.2 Poke Addon

Robert9

Well-known member
There is a poke addon from NF and one with "arrows"; both are nice, but i need something different.
The one form NF is more or less a copy from the following function, also the code is more or less the same.

In my addon i want some new functions like:
canPoke again after cooldown-period
count pokes from A for B
but delete them all, if there are no new pokes in the last x days

also i want the pokes to be unpoked, but now i have a problem.

poke_id, userA, userB, poke_count, poke_time
cooldown = 3600 (one hour)

if i take back the last poke (possible in now < poke_time + cooldown,
i can decrease the counter by one, but i have no info, about the poke_time.

Maybe someone has an idea, how to solve this?

Idea again: You can poke some one every hour, the date of the last poke is saved, the number of pockes also.
How the unpoke the last one!

I can set the poke_time back to now-cooldown+1; => that the info about the last existing poke is wrong!
Or i can save the poke-time from n-1 to a new field? Then i can unpoke and set the real time for the poke before.

Any idea?
Any other idea?
 
Top Bottom