PDA

View Full Version : After "X" click on thanks button the next Popup window


dxflw
03-05-2009, 09:57 PM
I have added this popup code to my thanks button template.

<if condition="$show['post_thanks_postbtn']">
<a href="showthread.php?$session[sessionurl]thanks_mode=add&amp;postid={$postid}"
onclick="window.open('http://www.somesite.com/')";return false;>
<img src="$stylevar[imgdir_button]/thanks.gif" alt="$vbphrase[say_thank_you]"
title="$vbphrase[say_thank_you]" border="0" /></a> </if>

And every time if the user clicks to the thanks buttons they shows a avertise site.
Now i wan't to change that like this:
If a member clicks the thanks button and its shows the popup window then the next popup window must opens after 10 clicks or after 15 minutes.
(10 clicks or after 15 minutes is example, i want to set manual higher or lower)

Any idea how do i that?

Dismounted
03-06-2009, 03:53 AM
That will require a lot more complex Javascript. What you want to do is probably set a cookie that lasts for so long, if this cookie expires/does not exist, then open the window.

dxflw
03-06-2009, 11:47 AM
Thanks.But how do i this cookie?I have no idea.:(

Mr-Moo
03-06-2009, 02:18 PM
This may be a bigger project then you initially figured dxflw.

You may want to submit this to the "unpaid mod" section or possibly pay a freelancer to do this.