Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[MOD]Give user a gift
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2008-10-08 14:02:56
This mod allows your user to click on a present and get a gift from either upload cred seed bonus(MOD MUST BE INSTALLED) invites..



[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=3010"]gift.php[/url]

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=2963"]gift_block.php[/url]

ATTACHED IMAGE UPLOAD TO IMAGES DIRECTORY





To add option in account details to set user as gift yes or no



Oepn account-details.php

find

ALTER TABLE `users` ADD `gift` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no';





Upload gift.php to ur root & gift_block.php to ur blocks folder and activate


print("<tr><td>Account:</td><td align=left><input name=enabled value=yes type=radio" . ($enabled ? " checked" : "") . ">Enabled <input name=enabled value=no type=radio" . (!$enabled ? " checked" : "") . ">Disabled</td></tr>\n");





add bellow



// Gift mod

mysql_query("UPDATE users SET gift='no' WHERE gift='yes'");

print("<tr><td>Giftt:</td><td align=left><input name=gift value=yes type=radio" . ($gift ? " checked" : "") . ">Yes <input name=gift value=no type=radio" . (!$gift ? " checked" : "") . ">No</td></tr>\n");

// End Git mod



Find



$enabled = $user["enabled"] == 'yes';



Add after



$gift = $user["gift"] == 'yes';
gift_box.png
gift_box.png
gift.JPG
gift.JPG
gift.php
Download
Unknown User
2008-10-08 14:33:17
give credit to tbdev as it is there mod
Unknown User
2008-10-08 14:52:32
"fozshell, post: 47191":
This mod allows your user to click on a present and get a gift from either upload cred seed bonus(MOD MUST BE INSTALLED) invites..

ALTER TABLE `users` ADD `gift` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no';


Upload gift.php to ur root & gift_block.php to ur blocks folder and activate

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=2963"]gift_block.php[/url]

ATTACHED IMAGE UPLOAD TO IMAGES DIRECTORY



[size=14px]Credit to tbdev for this mod just took a few edits and made it tt[/size]
gift_block.php
Download
Unknown User
2008-10-08 16:42:41
mmm good thing!

every how much time the gift is active?

I thought to reduce gifts and to render assets link the every day, in order to stimulate a customer to return on the site. it is possible?
Unknown User
2008-10-08 18:44:07
the orignal post on tbdev is that you got a gift on xmas day...but you was able to set days to hoe you wanted ..i.e halloween ,,easter ..
Unknown User
2008-10-08 19:55:12
ok, but is no possible set a new gift avaible every day?
Unknown User
2008-10-08 20:09:51
yes you would have to change it in gift.php .as it is set at xmas in there....but that would mean you doing a edit everyday...why not do it once a week ..say on a sunday
Unknown User
2008-10-08 20:32:31
mmmm i have understand?

in gift.php find:

if($today == $xmasday){
replace with:


if($today == $sunday){



and new gift is avaible every sunday?

it's correct?
Unknown User
2008-10-09 15:09:33
"gandalf76, post: 47227":
mmmm i have understand?in gift.php find:

if($today == $xmasday){
replace with:


if($today == $sunday){



and new gift is avaible every sunday?

it's correct?

No cause when they get there gift it sets to yes in the database so then when u click it again u will get this message

'You already got your gift!'
Unknown User
2008-10-10 09:37:23
can you explain a query for set all "gift" in a db to "no"?

thnx
Unknown User
2008-10-10 09:53:26
if you want to do once a week or a day you could always put something in the cleanup that will set the yes to a no after 24 hours or a week or whenever. that will probably be the best solution. take a look in your cleanup and you may find a part in there that you can copy and adapt to work with this.
Unknown User
2008-10-10 11:23:54
i have set a "gift reset" from admincp..

in admincp.php find:

<td align="center"><a href=admincp.php?action=users><img src="images/admin/users.gif" border=0 width=32 height=32><br>Users</a><BR></td>





add after:



<td align="center"><a href=admincp.php?action=gift><img src="images/admin/uploaders.gif" border=0 width=32 height=32><BR>Reset Gift</a><BR></td>





always in adminphp find:



	$rqq = "SELECT * FROM users $where ORDER BY username $limit";

$resqq = mysql_query($rqq);

echo "<form action='admincp.php?action=users' method='POST'><input type='hidden' name='do' value='delete'>";

while ($row = mysql_fetch_array($resqq)){

echo "

<tr><td class=table_col1 align=center><a href=account-details.php?id=$row[id]>$row[username]</a></td>

<td class=table_col2 align=center>".get_user_class_name($row['class'])."</td>

<td class=table_col1 align=center>$row[email]</td>

<td class=table_col2 align=center>$row[ip]</td>

<td class=table_col1 align=center>".utc_to_tz($row['added'])."</td>

<td class=table_col2 align=center>$row[last_access]</td>

<td class=table_col1 align=center><input type=checkbox name='userids[]' value='$row[id]'></td>

</tr>\n";

}



echo "</table><BR><input type='button' value='Check All' onclick='this.value=check(form)'>&nbsp;<input type='submit' value='Delete checked'></form></CENTER>\n";



print($pagerbottom);



end_frame();

stdfoot();

}





add after:



#======================================================================#

# New gift for ALL user

#======================================================================#



if ($action=="gift"){

stdhead("New gift fol all user");

begin_frame("New gift");

mysql_query("UPDATE users SET gift='no' WHERE gift='yes'");

print("<font size=2 color=red><center>Success, A new gift is avaible for all user</b></center></font><br>\n");

print($pagerbottom);

end_frame();

stdfoot();

}
Unknown User
2008-10-13 12:23:00
can anyone help me to insert in a user-details a new "press-key" for set to "yes" a gift only for this user?

what is a sql query for set "YES" only a user?

so as to be able to directly reset the gift from the details of the user

sorry for bad english
Unknown User
2008-10-13 16:30:13
"gandalf76, post: 47412":
can anyone help me to insert in a user-details a new "press-key" for set to "yes" a gift only for this user?what is a sql query for set "YES" only a user?

so as to be able to directly reset the gift from the details of the user

sorry for bad english

Oepn account-details.php

find

print("<tr><td>Account:</td><td align=left><input name=enabled value=yes type=radio" . ($enabled ? " checked" : "") . ">Enabled <input name=enabled value=no type=radio" . (!$enabled ? " checked" : "") . ">Disabled</td></tr>\n");





add bellow



// Gift mod

mysql_query("UPDATE users SET gift='no' WHERE gift='yes'");

print("<tr><td>Giftt:</td><td align=left><input name=gift value=yes type=radio" . ($gift ? " checked" : "") . ">Yes <input name=gift value=no type=radio" . (!$gift ? " checked" : "") . ">No</td></tr>\n");

// End Git mod



Find



$enabled = $user["enabled"] == 'yes';



Add after



$gift = $user["gift"] == 'yes';
Unknown User
2008-10-14 09:10:27
i have tested.. sorry... this set a new gift for ALL user  ;)

and not only the user selected
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728