CodeIgniter Forums
ci cookies to show add 1 hr interval - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: ci cookies to show add 1 hr interval (/showthread.php?tid=263)



ci cookies to show add 1 hr interval - cisjackie - 11-15-2014

hi,
i want to show an add as popup when a guest/user browse my site. add must be displyed once an hour. is there any way to solve this using CI any method.
i am a new dev on this platform.

thanks in advance.


RE: ci cookies to show add 1 hr interval - alroker - 11-15-2014

Take a look at docs. There is cookie helper. Show ad to user who has no cookie, and set cookie expiration for 1 hour when they view the ad. However, CodeIgniter will not be able to make the ad "pop up" unless you use a nasty, blockable popup window using the javascript class. To do all of this you would be better off using JQuery and the JQueryCookie JS which will set and read the cookie using javascript on the client side!


RE: ci cookies to show add 1 hr interval - cisjackie - 11-15-2014

hi alroker,
gr8... thanks for the suggestion.