Banner mod + points mod

a complete banner management system, any number of banners can be added
Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Banner mod + points mod

Postby Niels on Tue 29. Apr, 2003 09:44

A user have requested a way to make points raise, when ever a user click on a banner

the only thing needed to do so, is to modify redirect.php slightly

insert some thing like this:
Code: Select all
$sql ='UPDATE '.USERS_TABLE.' SET user_points=user_points+10 WHERE user_id="'.$userdata['user_id'].'"';
if ( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, "Couldn't update users points", "", __LINE__, __FILE__, $sql);
}


this should be inserted rigth BEFORE this:
Code: Select all
$template->set_filenames(array(
      'body' => 'redirect.tpl'));


this shows how to add 10 points, you may ofcouse raise it, if you fell like
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Lord Nite on Mon 14. Jul, 2003 21:26

Is there any way to make it give points only after a certain period of time has passed?

Say a user clicks a banner, and gets the points for it. I want it to check whether he has clicked again in the past 24 hours, and if 24 hours has passed, then give him another points addition.
Lord Nite
Poster
Poster
 
Posts: 1
Joined: Mon 14. Jul, 2003 21:21
Location: Goldsboro, NC

Postby Niels on Wed 16. Jul, 2003 09:23

this is almost posible already, simply add the code after this (instead of the above posted place)

Code: Select all
      message_die(GENERAL_ERROR, "Couldn't update banner data", "", __LINE__, __FILE__, $sql);
   }


when a user clicks on a banner a cookie is stored for 600 sec on the client machine, if this cookie exist the user will not get points
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Amerex on Fri 12. Sep, 2003 19:39

sorry to sound stupid, but what do you mean by adding "points"
Amerex
Poster
Poster
 
Posts: 4
Joined: Fri 12. Sep, 2003 09:01

Postby Niels on Sun 14. Sep, 2003 21:46

some have installed a "points" mod, witch make it posible for admin to give some users "points"

this topic describe how to give users some points when they click on the banners - sort of paying them in "e-money" for clicking on the banners
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Hi

Postby mojojojo on Fri 31. Oct, 2003 08:41

Hi.

In my machine and other Pcs make the points every time a user clicks on the banner, so when you click at once give points, but when they click again they gain points AGAIN!.

I tried the solution by the cookies but it doesn't work at all.

What can i do?, Theres another solution?.

Thanks.
mojojojo
Poster
Poster
 
Posts: 4
Joined: Tue 28. Oct, 2003 11:32

Postby Niels on Tue 04. Nov, 2003 01:55

are you shure you inserted the code the correct place, since the code should only be updaed if no cookie exist (this will ofcouse require cookies to work)
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Hi

Postby mojojojo on Thu 06. Nov, 2003 11:51

Thanks Niels for your answer but it still doesn't work.

Do you know other way to prevent the users click the banner like 3 times continuosly and get points?

Thanks!
mojojojo
Poster
Poster
 
Posts: 4
Joined: Tue 28. Oct, 2003 11:32

Next

Return to Complete banner [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron