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]Affiliate on signup
Controls ·  Search New posts · Mark unread

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

Unknown User
2011-07-14 21:15:37
This is a mod for the new tt version 2.0.7..This adds the option for members when they signup if they are affiliated with ur site also with admin functions shown in screen shots.







First run this sql

ALTER TABLE `users` ADD `affiliate` ENUM( 'yes', 'no' ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'no'


account-signup.php

Find

$age = (int) $_POST["age"];
Add After


$affiliate = $_POST["affiliate"];



Around line 72 Find



INSERT INTO users



Add this after age,



affiliate,



in same part find



$age,



Add after



$affiliate,



Find



<td><?php echo T_("GENDER"); ?>:</td>

<td>

<input type="radio" name="gender" value="Male"><?php echo T_("Male"); ?>

&nbsp;&nbsp;

<input type="radio" name="gender" value="Female"><?php echo T_("Female"); ?>

</td>

</tr>



add after



<tr>

<td><?php echo T_("AFFILIATE"); ?>:</td>

<td>

<input type="radio" name="affiliate" value="yes">yes

&nbsp;&nbsp;

<input type="radio" name="affiliate" value="no">no

</td>

</tr>





SAVE AND UPLOAD



account-details.php

Find



<?php echo T_("WARNINGS"); ?>: <?php echo htmlspecialchars($user["warned"])?><BR>



Add after



<?php echo T_("AFFILIATE_ACCOUNT"); ?>: <?php echo htmlspecialchars($user["affiliate"])?><BR>



Find



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



Add after



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



Find



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



Add after



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





SAVE AND UPLOAD



Admin-modtasks.php

Find



$email = $_POST["email"];



Add after



$affiliate = sqlesc($_POST["affiliate"]);



Arund line 72 find



UPDATE users SET email='$email',



Add after



affiliate=$affiliate,





SAVE AND UPLOAD



Language english.php

Find



$LANG["YOUR_SETTINGS"] = "Your Settings"



Add after



$LANG["AFFILIATE"] ="Are you Affiliated with this site"; // - Added By Fozshell

$LANG["AFFILIATE_ACCOUNT"] ="Affiliated with this site"; // - Added By Fozshell

$LANG["AFFILIATE_ADMIN"] ="Affiliated"; // - Added By Fozshell



SAVE AND UPLOAD

ENJOY
screen1.png
screen1.png
screen2.png
screen2.png
screen3.png
screen3.png
2011-07-15 07:19:40
Thanks fozshell!  :D
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: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728