Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev > Mods & Themes
Reply
  #1  
Old 29th January 2016, 10:13
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default Transfer bonus points [jQuery]
A simple mod that allows you to send bonus points to a user with just one click.

Click the image to open in full size.

So to use this mode, you must have registered library jQuery.

Open userdetails.php and add this code in any place you want to show:

PHP Code:
?>
<script language="javascript" type="text/javascript">
function present(from, to, amount) {
    jQuery.post("present.php",{"from":from,"to":to,"amount":amount},function (response) {
       alert(response);
    });
};
</script>
<tr><td class="rowhead">Give Bonuses</td><td align="left">
<img src="pic/10.png" alt="10" title="Send 10 bonus points" onclick="javascript:present('<?=$CURUSER["id"];?>', '<?=$user["id"];?>', '10');" />
<img src="pic/25.png" alt="25" title="Send 25 bonus points" onclick="javascript:present('<?=$CURUSER["id"];?>', '<?=$user["id"];?>', '25');" />
<img src="pic/50.png" alt="50" title="Send 50 bonus points" onclick="javascript:present('<?=$CURUSER["id"];?>', '<?=$user["id"];?>', '50');" />
<img src="pic/100.png" alt="100" title="Send 100 bonus points" onclick="javascript:present('<?=$CURUSER["id"];?>', '<?=$user["id"];?>', '100');" />
</td>
</tr>
<br>
<?
Create a file called present.php and add this code then put it in your root:

PHP Code:
<?
require_once("include/bittorrent.php");
dbconn();
loggedinorreturn(); 

$from = (int) $_POST["from"];
$to = (int) $_POST["to"];
$amount = (int) $_POST["amount"];

if (empty(
$from)) {
    
stdmsg("Error, If you are not a hacker - try again.");


sql_query("UPDATE users SET seedbonus = seedbonus + '$amount' WHERE id = '$to' LIMIT 1");
sql_query("UPDATE users SET seedbonus = seedbonus - '$amount' WHERE id = '$from' LIMIT 1"); 

if(
$CURUSER["id"] == $to) {
print(
"You can not pass bonuses themselves.");
} elseif(
$CURUSER["seedbonus"] <= $amount) {
print(
"You do not have enough bonuses");
} else {
print(
"You have successfully sent $amount bonus points.");
}
?>
Download attached icons and put them in your pic folder.

Enjoy!
Attached Images
       
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif

Last edited by Chez; 29th January 2016 at 12:05.
Reply With Quote
The Following User Says Thank You to Chez For This Useful Post:
BamBam0077 (23rd August 2022)
  #2  
Old 29th January 2016, 11:55
UFFENO1 UFFENO1 is offline
Senior Member
 
Join Date: Sep 2008
P2P
Posts: 24
Smile
Thank you very much for the mod, but i missing the icons.
Reply With Quote
The Following User Says Thank You to UFFENO1 For This Useful Post:
BamBam0077 (23rd August 2022)
  #3  
Old 29th January 2016, 12:06
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default
Quote:
Originally Posted by UFFENO1 View Post
Thank you very much for the mod, but i missing the icons.
sorry for that ... i forgot the icons. post updated
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif
Reply With Quote
  #4  
Old 10th March 2016, 10:37
Str1k3r's Avatar
Str1k3r Str1k3r is offline
Senior Member
 
Join Date: Feb 2009
P2P
Posts: 22
Default
Here for all.

regards Str1k3r
Attached Thumbnails
Screen.jpg  
Attached Files
File Type: rar Icons_Made_by_Str1k3r.rar (27.2 KB, 28 views)
Reply With Quote
The Following User Says Thank You to Str1k3r For This Useful Post:
BamBam0077 (23rd August 2022)
  #5  
Old 12th March 2016, 14:31
elvira's Avatar
elvira elvira is offline
Senior Member
 
Join Date: Jan 2008
Slovenia
Posts: 172
Default
PHP Code:
So to use this modeyou must have registered library jQuery

Where is the jQuery.js
Reply With Quote
  #6  
Old 12th March 2016, 19:47
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default
It says clearly ... YOU MUST HAVE (this means that you should already have that jquery.js)
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif
Reply With Quote
  #7  
Old 12th March 2016, 20:16
elvira's Avatar
elvira elvira is offline
Senior Member
 
Join Date: Jan 2008
Slovenia
Posts: 172
Default
Quote:
Originally Posted by Chez View Post
It says clearly ... YOU MUST HAVE (this means that you should already have that jquery.js)
I have but not work can you post yours
Reply With Quote
  #8  
Old 13th March 2016, 00:38
fireknight's Avatar
fireknight fireknight is offline
Administrator
 
Join Date: Aug 2010
Australia
Posts: 173
Default
This is the jQuery.js I have.
Might work for you.
Would not accept it as a js file, so had to rar it.
Attached Files
File Type: rar jquery.rar (23.4 KB, 11 views)
Reply With Quote
The Following User Says Thank You to fireknight For This Useful Post:
BamBam0077 (23rd August 2022)
  #9  
Old 13th March 2016, 10:50
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default
Download the attached archive and also try to insert this code in your stdhead.php file between your <head> </head> tags.

PHP Code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> 
Attached Files
File Type: rar jquery.rar (16.0 KB, 19 views)
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif
Reply With Quote
The Following User Says Thank You to Chez For This Useful Post:
BamBam0077 (23rd August 2022)
  #10  
Old 13th March 2016, 12:29
elvira's Avatar
elvira elvira is offline
Senior Member
 
Join Date: Jan 2008
Slovenia
Posts: 172
Default
Quote:
Originally Posted by Chez View Post
Download the attached archive and also try to insert this code in your stdhead.php file between your <head> </head> tags.

PHP Code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> 
Ok Thanks, works
Reply With Quote
Reply

Tags
bonus , jquery , points , transfer

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



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