Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares > Mods & Themes
Reply
  #1  
Old 6th December 2009, 17:08
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default [TSSE 5.6] Christmas Gift
for the start i have to tell you it's not my mod but i modified to working on TS 5.6 so if you wish it take it if you don't then leave it .

10x@ tbdev.net - the original it was created for tbdev by Ezero

the sql part
PHP Code:
ALTER TABLE `usersADD `gotgiftENUM'yes''no' NOT NULL DEFAULT 'no'
you have to create a gift.php
PHP Code:
<?
 
require './global.php';
 
dbconn();
 
loggedinorreturn();
 
 
 
$xmasdaymktime(0,0,0,12,24,2009);
 
$today mktime(date("m"),date("d"),date("Y"));
 
$gifts = array("upload""bonus""invites");
 
 
 
$randgift array_rand($gifts);
 
$gift $gifts[$randgift];
 
$userid $CURUSER["id"];
 
if(!
is_valid_id($userid))
 
stderr("Error""Invalid ID");
 
$open $_GET["open"];
 
if(
$open != 1){
 
stderr("Error","Invalid url");
 
}
 
if(
$open == 1){
 
if(
$today == $xmasday){
 
if(
$CURUSER["gotgift"] == 'no'){
 
if(
$gift == "upload"){
 
mysql_query("UPDATE users SET uploaded=uploaded+1024*1024*1024*5, gotgift='yes' WHERE id=$userid") or sqlerr(__FILE____LINE__);
 
stderr("Congratulations!","<img src=\"/pic/gift-cat.png\" style=\"float: left; padding-right:10px;\">You received 5GB Christmas Gift! Merry Christmas and a Happy New Year wish to you ".$SITENAME." staff!");
 
}
 
 
 
if(
$gift == "bonus"){
 
mysql_query("UPDATE users SET seedbonus = seedbonus + 500, gotgift='yes' WHERE id=$userid") or sqlerr(__FILE____LINE__);
 
stderr("Congratulations!","<img src=\"/pic/gift-cat.png\" style=\"float: left; padding-right:10px;\">You received 500 bonuspoint as Christmas Gift! Merry Christmas and a Happy New Year wish to you ".$SITENAME." staff!");
}
 
 
 
if(
$gift == "invites") {
 
mysql_query("UPDATE users SET invites = invites + 2, gotgift='yes' WHERE id=$userid") or sqlerr(__FILE____LINE__);
 
mysql_query("UPDATE users SET seedbonus = seedbonus + 700, gotgift='yes' WHERE id=$userid") or sqlerr(__FILE____LINE__);
 
stderr("Congratulations!","<img src=\"/pic/gift-cat.png\" style=\"float: left; padding-right:10px;\">You received 2 invitation and 700 bonuspoint  as Christmas! Merry Christmas and a Happy New Year wish to you ".$SITENAME." staff!");
 
}
 
} else {
 
stderr("Sorry...""You already received your gift, don't cheat!!");
 
}
 
} else {
 
stderr("Sorry...""Be Patient ,you can't open your gift till Christmas ! " date("j", ($xmasday $today)) . " days left.");
 
 
 
}
 
}
 
?>
and now you create a plugin
PHP Code:
<?php
if ($CURUSER["gotgift"] == 'no') {?>
<style type="text/css">
<!--
.style1 {
 color: #FF0000;
 font-style: italic;
 font-weight: bold;
 font-size: 20px;
}
-->
</style> 
<a href="gift.php?open=1"><img src="/pic/gift-cat.png" style="float: left;border-style: none;"></a> <span class="style1">Christmas Gift please click on the gift:)</span> 
<?php}?>
you will need a gift pic witch you will put on pic folder

i hope it will working to everyone.
i wish to remember to anyone it's not my work, i just modified to ts5.6
Attached Images
 
Reply With Quote
The Following 8 Users Say Thank You to Marco For This Useful Post:
alpha1969 (6th December 2009), Darkness (9th December 2011), eckeO5 (24th November 2011), FENIX (24th December 2013), Fynnon (6th August 2011), peiratikos (10th November 2011), skyf4llen (14th May 2014), youacehole (5th September 2011)
  #2  
Old 6th December 2009, 23:59
alpha1969 alpha1969 is offline
Senior Member
 
Join Date: Nov 2008
Sweden
Posts: 25
Default
works to tsse 5.4.1
www.gutezone.se

Last edited by alpha1969; 7th December 2009 at 08:57.
Reply With Quote
  #3  
Old 8th December 2009, 17:27
ciobancai ciobancai is offline
Senior Member
 
Join Date: Mar 2008
Posts: 43
Default
Can somebody make to work on 5.1 ?
Reply With Quote
  #4  
Old 8th December 2009, 23:35
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default
Quote:
Originally Posted by ciobancai View Post
Can somebody make to work on 5.1 ?
i really don't know that source but it's possible to need
require bittorent.php or functions.php maybe you give me what error you are received and maybe i will could help you ;)

require './global.php';
change to : include("include/bittorrent.php"); or include("include/functions.php"); this i tested and work on ts 3.1 :D

Reply With Quote
  #5  
Old 9th December 2009, 12:50
ciobancai ciobancai is offline
Senior Member
 
Join Date: Mar 2008
Posts: 43
Default
I tested and it`s work ;)
Reply With Quote
  #6  
Old 9th December 2009, 16:11
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default
i am happy then :) use it well :)
Reply With Quote
  #7  
Old 24th December 2009, 14:55
ciobancai ciobancai is offline
Senior Member
 
Join Date: Mar 2008
Posts: 43
Default
Reacive this msg :| , why ?
Reply With Quote
  #8  
Old 22nd November 2011, 23:31
open open is offline
Senior Member
 
Join Date: Nov 2010
P2P
Posts: 22
Default Christmas Gift
hello I want s'avoir mods if this works well for a 5.6 ts
thank you
Reply With Quote
  #9  
Old 24th December 2013, 10:49
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default
yes my work is still functionally even is more than 2 years when i do this :)
Reply With Quote
Reply

Tags
56 , christmas , gift , tsse

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Christmas Icons hack346 Downloads 4 20th September 2010 21:59
xBtit Christmas Theme Extreme86 xBTiT 1 9th March 2010 22:04
xBTIT christmas theme connected xBTiT 0 21st November 2008 21:28



All times are GMT +2. The time now is 01:25. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.