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
User Posts

Go to Profile

Based on this http://www.torrenttrader.xyz/index.php?threads/v2-08-mods-completed-encrypting-emails-in-bdd.26/  so credit to original author.
just a few more things to test but i have this installed on my live site, members do need to update emails but looking at adding staff to be able to see old un-encrypted emails and maybe a account-recovery1.php to allow members to recover account with old un-encrypted emails.

Upload encrypt_email.php to backend

[color=rgb(251, 160, 38)]backend/config.php add[/color]
// email encrypt
$site_config["clef"] = 'AHIJKLMNOPQRSTUVWXYZabcde,;:!§#)nopqrstuvwxyz0123456789+@='; // change your key as you wish


[color=rgb(251, 160, 38)]backend/functions.php find[/color]
require_once(BACKEND."/languages.php");


add below
require_once($_SERVER["DOCUMENT_ROOT"]."/backend/encrypt_email.php");


[color=rgb(251, 160, 38)]account-ce.php find[/color]
$email = $_GET["email"];


add below
// encrypt email
$crypt = new Cryptage();
$clef = $site_config["clef"];


find
if ($md5 != md5($sec . $email . $sec))
   show_error_msg(T_("ERROR"), T_("NOTHING_FOUND"), 1);


add below
// encrypt email
$email = $crypt->b64encode($email, $clef);


[color=rgb(251, 160, 38)]account-details.php find[/color]
$modcomment = htmlspecialchars($user["modcomment"]);


add after
// email encrypt
$crypt = new Cryptage();
$clef = $site_config["clef"];
$mail = $crypt->b64decode($user[email], $clef);


find
print("<tr><td>".T_("EMAIL")."</td><td align='left'><input type='text' size='67' name='email' value=\"$user[email]\" /></td></tr>\n");


replace with
print("<tr><td>".T_("EMAIL")."</td><td align='left'><input type='text' size='67' name='email' value=\"$mail\" /></td></tr>\n");


[color=rgb(251, 160, 38)]account-recover.php[/color]
dbconn();


add after
// email encrypt
$crypt = new Cryptage();
$clef = $site_config["clef"];


find
        $res = SQL_Query_exec("SELECT id, username, email FROM users WHERE email=" . sqlesc($email) . " LIMIT 1");


replace with
// email encrypt
       $mail = $crypt->b64encode($email, $clef);
 
$res = SQL_Query_exec("SELECT id, username, email FROM users WHERE email=" . sqlesc($mail) . " LIMIT 1");


find
              $res2 = SQL_Query_exec("UPDATE `users` SET `secret` = ".sqlesc($sec)." WHERE `email`= ". sqlesc($email) ." LIMIT 1");


replace with
              $res2 = SQL_Query_exec("UPDATE `users` SET `secret` = ".sqlesc($sec)." WHERE `email`= ". sqlesc($mail) ." LIMIT 1");


[color=rgb(251, 160, 38)]account.php find[/color]
loggedinonly();


after add
// encrypt email
$crypt = new Cryptage();
$clef = $site_config["clef"];
$mail = $crypt->b64decode($CURUSER["email"], $clef);


find
    print("<tr><td align='right' class='alt2'><b>" . T_("EMAIL") . ":</b> </td><td align='left' class='alt2'><input type=\"text\" name=\"email\" size=\"50\" value=\"" . htmlspecialchars($CURUSER["email"]) .
     "\" /><br />\n<i>".T_("REPLY_TO_CONFIRM_EMAIL")."</i><br /></td></tr>");


replace with
    print("<tr><td align='right' class='alt2'><b>" . T_("EMAIL") . ":</b> </td><td align='left' class='alt2'><input type=\"text\" name=\"email\" size=\"50\" value=\"" . $mail . "\" /><br />\n<i>".T_("REPLY_TO_CONFIRM_EMAIL")."</i><br /></td></tr>");


find
if ($email != $CURUSER["email"]) {


replace with
if ($email != $mail) {


[color=rgb(251, 160, 38)]admin-modtask.php find[/color]
//continue updates


add after
// encrypt email
$crypt = new Cryptage();
   $clef = $site_config["clef"];
   $email = $crypt->b64encode($email, $clef);


[color=rgb(251, 160, 38)]account-signup.php find[/color]
dbconn();


add after
// email encrypt
$crypt = new Cryptage();
$clef = $site_config["clef"];


find
$maildomain = (substr($email, strpos($email, "@") + 1));

           $a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from email_bans where mail_domain='$email'")));


replace with
// encrypt email
           $maildomain = (substr($email, strpos($email, "@") + 1));
$mail = $crypt->b64encode($email, $clef);
$maildomain = $crypt->b64encode($maildomain, $clef);
     
$a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from email_bans where mail_domain='$mail'")));


find
$a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from users where email='$email'")));


replace with
$a = (@mysqli_fetch_row(@SQL_Query_exec("select count(*) from users where email='$mail'")));


find
      implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $email, $status, get_date_time(), get_date_time(), $age, $country, $gender, $client, $site_config["default_theme"], $site_config["default_language"], $signupclass, getip()))).")");


replace with
implode(",", array_map("sqlesc", array($wantusername, $wantpassword, $secret, $mail, $status, get_date_time(), get_date_time(), $age, $country, $gender, $client, $site_config["default_theme"], $site_config["default_language"], $signupclass, getip()))).")");


[color=rgb(251, 160, 38)]admincp.php & mass mail[/color]
still checking these
blank page on forum — 2019-06-27 14:56:43 in v3 Support
Did you fix this spirtblue, for white page i do this, this helps to show whats wrong. For forums add to top of forums.php etc

<?php

ini_set('display_errors', 1);

ini_set('display_startup_errors', 1);

error_reporting(E_ALL);


this code is for testing, do not keep it on live site
finding peers — 2019-06-26 18:29:04 in v3 Support
are you using utorrent by any chance m8
wait times — 2019-06-26 18:27:49 in v3 Support
in backend/confif php you can edit these change wait class to 0
//WAIT TIME VARS
$site_config['WAIT_CLASS'] = '1,2';        //Classes wait time applies to, comma seperated
$site_config['GIGSA'] = '1';            //Minimum gigs
$site_config['RATIOA'] = '0.50';        //Minimum ratio
$site_config['WAITA'] = '24';            //If neither are met, wait time in hours

$site_config['GIGSD'] = '0';            //Minimum gigs
$site_config['RATIOD'] = '0.0';        //Minimum ratio
$site_config['WAITD'] = 0';            //If neither are met, wait time in hours

$site_config['GIGSD'] = '0';            //Minimum gigs
$site_config['RATIOD'] = '0.0';        //Minimum ratio
$site_config['WAITD'] = 0';            //If neither are met, wait time in hours

$site_config['GIGSD'] = '0';            //Minimum gigs
$site_config['RATIOD'] = '0.0';        //Minimum ratio
$site_config['WAITD'] = 0';            //If neither are met, wait time in hours
TTv3 Modded — 2019-06-26 18:23:56 in v3 Download
make sure you using the correct version https://gitlab.com/M-jay/tt2019/tree/raversv3 this is the current stable version

if this is the one your using and you still get issues
on index.php on the first line replace <?php with
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

if when you visit your site you dont see any error check your config.php and mysql.php are edited to your webaddress and database, if you can visit your site it might be worth checking the youraddress/check.php
updated the first post m8, for original smilies and to sort image dir out. Smilies in preview you can add in BBtag.js couldnt get them all to work it looks like its the string length
heres two examples that work but :) or 8) wont
// angel
          t=remplace_tag(/O:-D/g,'<img src="/images/smilies/angel.png" alt="" />',t)    
// help
           t=remplace_tag(/:help/g,'<img src="/images/smilies/help.png" alt="" />',t)
This is from TT-fr so big credit to original Author

Updates the bbcode and allows preview

[color=rgb(251, 160, 38)]In theme.css add[/color]
/* Display Part Of BBCodes */
#BBCode{
   height: 30px;
   width: 30px;
   margin: 8px;
   background: rgb(105, 105, 105, 100);
   background: -moz-linear-gradient(top, rgba(105, 105, 105, 100) 0%, rgba(64, 64, 64, 100) 100%);
   background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(105, 105, 105, 100)), color-stop(50%,rgba(64, 64, 64, 100)));
   background: -webkit-linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   background: -o-linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   background: -ms-linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   background: linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   -moz-box-shadow: 0px 3px 6px #000, 0px -2px 5px #111;
   -webkit-box-shadow: 0px 6px 6px #000, 0px -2px 5px #111;
   box-shadow: 0px 3px 6px #000, 0px -2px 5px #111;
   -moz-border-radius: 10px;
   border-top-left-radius: 8px;
   border-top-right-radius: 8px;
   -moz-border-radius-topleft: 8px;
   -moz-border-radius-topright: 8px;
   -webkit-border-top-left-radius:: 8px;
   -webkit-border-top-right-radius:: 8px;
   border-radius: 8px;
   border: 3px groove #1c252d;
   }
/* All For the Outline Effects of BBCode Buttons */
.BBCode-Contour{
   margin: 2px;
   margin-left : 5px;
   text-align: center;
   background: rgb(105, 105, 105, 100);
   background: -moz-linear-gradient(top, rgba(105, 105, 105, 100) 0%, rgba(64, 64, 64, 100) 100%);
   background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(105, 105, 105, 100)), color-stop(50%,rgba(64, 64, 64, 100)));
   background: -webkit-linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   background: -o-linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   background: -ms-linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   background: linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   -moz-box-shadow: 0px 3px 6px #000, 0px -2px 5px #111;
   -webkit-box-shadow: 0px 6px 6px #000, 0px -2px 5px #111;
   box-shadow: 0px 3px 6px #000, 0px -2px 5px #111;
   -moz-border-radius: 10px;
   border-top-left-radius: 8px;
   border-top-right-radius: 8px;
   -moz-border-radius-topleft: 8px;
   -moz-border-radius-topright: 8px;
   -webkit-border-top-left-radius:: 8px;
   -webkit-border-top-right-radius:: 8px;
   border-radius: 8px;
   border: 3px groove #1c252d;
   }
#BBCode-Contour2{
   margin: 10px;
   background: rgb(105, 105, 105, 100);
   background: -moz-linear-gradient(top, rgba(105, 105, 105, 100) 0%, rgba(64, 64, 64, 100) 100%);
   background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(105, 105, 105, 100)), color-stop(50%,rgba(64, 64, 64, 100)));
   background: -webkit-linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   background: -o-linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   background: -ms-linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   background: linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   -moz-box-shadow: 0px 3px 6px #000, 0px -2px 5px #111;
   -webkit-box-shadow: 0px 6px 6px #000, 0px -2px 5px #111;
   box-shadow: 0px 3px 6px #000, 0px -2px 5px #111;
   -moz-border-radius: 10px;
   border-top-left-radius: 8px;
   border-top-right-radius: 8px;
   -moz-border-radius-topleft: 8px;
   -moz-border-radius-topright: 8px;
   -webkit-border-top-left-radius:: 8px;
   -webkit-border-top-right-radius:: 8px;
   border-radius: 8px;
   border: 3px groove #1c252d;
   }
#BBCode-Contour2:hover{
   background: rgb(105, 105, 105, 100);
   background: -moz-linear-gradient(top, rgba(105, 105, 105, 100) 0%, rgba(64, 64, 64, 100) 100%);
   background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(105, 105, 105, 100)), color-stop(50%,rgba(64, 64, 64, 100)));
   background: -webkit-linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   background: -o-linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   background: -ms-linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   background: linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   }
/* Preview */
#previsualisation{
   margin: 10px;
   display: block;
   width: 100%;
   background: rgb(105, 105, 105, 100);
   background: -moz-linear-gradient(top, rgba(105, 105, 105, 100) 0%, rgba(64, 64, 64, 100) 100%);
   background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(105, 105, 105, 100)), color-stop(50%,rgba(64, 64, 64, 100)));
   background: -webkit-linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   background: -o-linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   background: -ms-linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   background: linear-gradient(top, rgba(105, 105, 105, 100) 0%,rgba(64, 64, 64, 100) 50%);
   -moz-box-shadow: 0px 3px 6px #000, 0px -2px 5px #111;
   -webkit-box-shadow: 0px 6px 6px #000, 0px -2px 5px #111;
   box-shadow: 0px 3px 6px #000, 0px -2px 5px #111;
   -moz-border-radius: 10px;
   border-top-left-radius: 8px;
   border-top-right-radius: 8px;
   -moz-border-radius-topleft: 8px;
   -moz-border-radius-topright: 8px;
   -webkit-border-top-left-radius:: 8px;
   -webkit-border-top-right-radius:: 8px;
   border-radius: 8px;
   }
/* CSS BBcode */


[color=rgb(251, 160, 38)]in functions.php find (look at finish line smilies to help)[/color]
function format_comment($text) {
   global $site_config, $smilies;

   $s = $text;

   $s = htmlspecialchars($s);
   $s = format_urls($s);

   //

  •    $s = preg_replace("/\[\*\]/", "<li>", $s);

       // Bold
       $s = preg_replace("/\[b\]((\s|.)+?)\[\/b\]/", "<b>\\1</b>", $s);

       // Italic
       $s = preg_replace("/\[i\]((\s|.)+?)\[\/i\]/", "<i>\\1</i>", $s);

       // Underline
       $s = preg_replace("/\[u\]((\s|.)+?)\[\/u\]/", "<u>\\1</u>", $s);

       // Underline
       $s = preg_replace("/\[u\]((\s|.)+?)\[\/u\]/i", "<u>\\1</u>", $s);

       //
       $s = preg_replace("/\[img\]((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\[\/img\]/i", "<img border='0' src=\"\\1\" alt='' />", $s);

       // [img=http://www/image.gif]
       $s = preg_replace("/\[img=((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\]/i", "<img border='0' src=\"\\1\" alt='' />", $s);

       // Text
       $s = preg_replace(
           "/\[color=([a-zA-Z]+)\]((\s|.)+?)\[\/color\]/i",
           "<font color='\\1'>\\2</font>", $s);

       // Text
       $s = preg_replace(
           "/\[color=(#[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9])\]((\s|.)+?)\[\/color\]/i",
           "<font color='\\1'>\\2</font>", $s);

    // Text
      $s = preg_replace(
      "/\[url=((http|ftp|https|ftps|irc):\/\/[^<>\s]+?)\]((\s|.)+?)\[\/url\]/i",
      "<a href='\\1' target='_blank'>\\3</a>", $s);

      // http://www.example.com
      $s = preg_replace(
      "/\[url\]((http|ftp|https|ftps|irc):\/\/[^<>\s]+?)\[\/url\]/i",
      "<a href='\\1' target='_blank'>\\1</a>", $s);

       // Text
       $s = preg_replace(
           "/\[size=([1-7])\]((\s|.)+?)\[\/size\]/i",
           "<font size='\\1'>\\2</font>", $s);

       // Text
       $s = preg_replace(
           "/\[font=([a-zA-Z ,]+)\]((\s|.)+?)\[\/font\]/i",
           "<font face=\"\\1\">\\2</font>", $s);

       //
    Quote:
    Text

       while (preg_match("/\[quote\]\s*((\s|.)+?)\s*\[\/quote\]\s*/i", $s))
       $s = preg_replace(
           "/\[quote\]\s*((\s|.)+?)\s*\[\/quote\]\s*/i",
           "<p class='sub'><b>Quote:</b></p><table class='main' border='1' cellspacing='0' cellpadding='10'><tr><td style='border: 1px black dotted'>\\1</td></tr></table><br />", $s);

       //
    Author:
    Text

       while (preg_match("/\[quote=(.+?)\]\s*((\s|.)+?)\s*\[\/quote\]\s*/i", $s))
       $s = preg_replace(
           "/\[quote=(.+?)\]\s*((\s|.)+?)\s*\[\/quote\]\s*/i",
           "<p class='sub'><b>\\1 wrote:</b></p><table class='main' border='1' cellspacing='0' cellpadding='10'><tr><td style='border: 1px black dotted'>\\2</td></tr></table><br />", $s);

       // [spoiler]Text[/spoiler]
       $r = substr(md5($text), 0, 4);
       $i = 0;
       while (preg_match("/\[spoiler\]\s*((\s|.)+?)\s*\[\/spoiler\]\s*/i", $s)) {
           $s = preg_replace("/\[spoiler\]\s*((\s|.)+?)\s*\[\/spoiler\]\s*/i",
           "<br /><img src='images/plus.gif' id='pic$r$i' title='Spoiler' onclick='klappe_torrent(\"$r$i\")' alt='' /><div id='k$r$i' style='display: none;'>\\1<br /></div>", $s);
           $i++;
       }

       // [spoiler=Heading]Text[/spoiler]
       while (preg_match("/\[spoiler=(.+?)\]\s*((\s|.)+?)\s*\[\/spoiler\]\s*/i", $s)) {
           $s = preg_replace("/\[spoiler=(.+?)\]\s*((\s|.)+?)\s*\[\/spoiler\]\s*/i",
           "<br /><img src='images/plus.gif' id='pic$r$i' title='Spoiler' onclick='klappe_torrent(\"$r$i\")' alt='' /><b>\\1</b><div id='k$r$i' style='display: none;'>\\2<br /></div>", $s);
           $i++;
       }

      //[align=(center|left|right)]text[/align]
      $s = preg_replace(
         "/\[align=([a-zA-Z]+)\](.+?)\[\/align\]/is",
         "<div style=\"text-align:\\1\">\\2</div>", $s);

        //

           $s = preg_replace("/\[hr\]/i", "<hr />", $s);

        //[hr=#ffffff] [hr=red]
           $s = preg_replace("/\[hr=((#[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9])|([a-zA-z]+))\]/i", "<hr color=\"\\1\"/>", $s);

           //[swf]http://somesite.com/test.swf[/swf]
           $s = preg_replace("/\[swf\]((www.|http:\/\/|https:\/\/)[^\s]+(\.swf))\[\/swf\]/i",
           "<param name='movie' value='\\1'/><embed width='470' height='310' src='\\1'></embed>", $s);

           //[swf=http://somesite.com/test.swf]
           $s = preg_replace("/\[swf=((www.|http:\/\/|https:\/\/)[^\s]+(\.swf))\]/i",
           "<param name='movie' value='\\1'/><embed width='470' height='310' src='\\1'></embed>", $s);

       // Linebreaks
       $s = nl2br($s);

       // Maintain spacing
       $s = str_replace("  ", " &nbsp;", $s);

       // Smilies


  • replace with
    function format_comment($text) {
       global $site_config, $smilies;

       $s = $text;

       $s = htmlspecialchars($s);
       $s = format_urls($s);
       //

  •    $s = preg_replace("/\[\*\]/", "<li>", $s);
       //
    Centrer
    ou
    center

       $s = preg_replace("#\[center\](.+)\[/center\]#isU", "<center>$1</center>", $s);
       // Bold
       $s = preg_replace("/\[b\]((\s|.)+?)\[\/b\]/", "<b>\\1</b>", $s);
       // Italic
       $s = preg_replace("/\[i\]((\s|.)+?)\[\/i\]/", "<i>\\1</i>", $s);
       // Underline
       $s = preg_replace("/\[u\]((\s|.)+?)\[\/u\]/", "<u>\\1</u>", $s);
       // Line
       $s = preg_replace("#\[s\](.+)\[/s\]#isU", "<span style='text-decoration:line-through;'>$1</span>", $s);
       // List 1
       $s = preg_replace("#\[list\](.+)\[/list\]#isU", "<li style= 'margin-left: 20px;'>$1</li>", $s);
       // List 2
       $s = preg_replace("#\[*\](.+)\[/*\]#isU", "<li style= 'margin-left: 20px;'>$1</li>", $s);
       // Quote 1
       while (preg_match("#\[quote\](.+)\[/quote\]#isU", $s))
           $s = preg_replace("#\[quote\](.+)\[/quote\]#isU", "<blockquote><strong> Quote : </strong></blockquote><table class='main' border='1' cellspacing='0' cellpadding='10'><tr><td style='border: 1px black dotted'>$1</td></tr></table><br />", $s);
       // Quote 2
       while (preg_match("#\[quote=(.+)\](.+)\[/quote\]#isU", $s))
           $s = preg_replace("#\[quote=(.*?)\](.+)\[/quote\]#isU", "<blockquote><strong>$1 écrit : </strong></blockquote><table class='main' border='1' cellspacing='0' cellpadding='10'><tr><td style='border: 1px black dotted'>$2</td></tr></table><br />", $s);
       ///Multi Quote For Private Message
       while(preg_match( '#\[reponse(.*)\](.+)\[/reponse\]#isU', $s))
           $s= preg_replace('#\[reponse(.*)\](.+)\[/reponse\]#isU','<table class=main border=2 cellspacing=0 cellpadding=10><tr><td style=border: 1px black dotted>$2</td></tr></table><br />',$s);
       // Extract the Code
       $s = preg_replace("#\[code\](.+)\[/code\]#isU", "<p class='sub'><b> Extract the Code : </b><center><table class=bbcodecode border=1 cellspacing=0 cellpadding=5><tr><td style='border: 1px lime solid'>$1</td></tr></table></center></p><br />", $s);
       // Links
       // Text
       $s = preg_replace("#\[url=((?:ftp|https?)://.*?)\](.*?)\[/url\]#i", "<a href='$1' target='_blank'>$2</a>", $s);
        // http://www.exemple.fr
       $s = preg_replace("#\[url\]((?:ftp|https?)://.*?)\[/url\]#i", "<a href='$1' target='_blank'>$1</a>", $s);
       // Image
       //
       $s = preg_replace("#\[img\]((?:ftp|https?)://[a-z0-9._/-]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\[/img\]#isU", "<img src='$1' />", $s);
       // [img=http://www/image.gif]
       $s = preg_replace("#\[img=((?:ftp|https?)://[a-z0-9._/-]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\]\[/img\]#isU", "<img src='$1' />", $s);
       // [video]http://youtube.com/[/video]
       $s = preg_replace("#\[video\](https://www.youtube.com.*v=.+)\[\/video\]#isU", "<center><embed src='https://www.youtube.com/v/$1' type='video' height='140'></embed></center>", $s);
       // [audio]http://image.gif[/audio]
       $s = preg_replace("#\[audio\]((?:ftp|https?)://[a-z0-9._/-]+(\.mp3|\.wav|\.wma|\.aac|\.bwf|\.ogg|\.ac3|\.flac|\.asx|\.pls|\.alac))\[/audio\]#isU", "<img src='$1' />", $s);
       // Polices
       // Text
       $s = preg_replace("#\[color=([a-zA-Z]+)\](.+)\[/color\]#isU", "<font color='$1'>$2</font>", $s);
       // [color=#XXX ou #XXXXXX]Text[/color]
       $s = preg_replace("#\[color=\#([a-fA-F0-9]{3}|[a-fA-F0-9]{6})\](.+)\[/color\]#isU", "<font color='$1'>$2</font>", $s);
       // Size of Style
       $s = preg_replace("#\[size=([1-7])\](.+)\[/size\]#isU", "<font size='$1'>$2</font>", $s);
       // Type of Style
       $s = preg_replace("#\[font=([a-zA-Z].*?)\](.+)\[/font\]#isU", "<font face='$1'>$2</font>", $s);
       // Blink
       $s = preg_replace("#\[blink\](.+)\[/blink\]#isU", "<div id='blink'>$1</div>", $s);
        // Scroller
       $s = preg_replace("#\[df\](.+)\[/df\]#isU", "<div class='marquee'>$1</div>", $s);
       // Text Alignment
       //[align=(center|left|right)]text[/align]
       $s = preg_replace(
       "/\[align=([a-zA-Z]+)\](.+?)\[\/align\]/is",
       "<div style=\"text-align:\\1\">\\2</div>", $s);
       // HTML HTML tag If Need Horizontal Line
       // Attention The Color Is Considered Only On IE For Info
       //

       $s = preg_replace("/\[hr\]/i", "<hr />", $s);
       //[hr=#ffffff] [hr=red]
       $s = preg_replace("/\[hr=((#[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9])|([a-zA-z]+))\]/i", "<hr color=\"\\1\"/>", $s);
       // Linebreaks
       $s = nl2br($s);
       // Maintain spacing
       $s = str_replace("  ", " &nbsp;", $s);

       // Smilies


  • Upload to backend/  -  bbcode.php & js
    Upload bbcodes folder to images

    NOTE - you may need to refresh cache, this should also work on 2.08[ATTACH type="full"]5073[/ATTACH]
    Page display issue — 2019-06-21 14:22:48 in v2.08 Support
    It looks like your url might of been https
    Page display issue — 2019-06-20 18:32:49 in v2.08 Support
    What OS are you using for ttv3 which php version?
    Read this before installing on live sites
    [color=rgb(251, 160, 38)]this mod is ready for live sites your members can recover there account on the login page or there is a link to account-login1.php so there can use old md5 passwords.
    If you login with account-login1.php you are redirected to you account settings page so you can add a new password. [/color]
    I was hoping it would be automatic but this is a step closer and all members will have access

    1) Before making edits in first post make a copy of account-login.php and name it account-login1.php

    in account-login1.php find
    header("Refresh: 0; url=index.php");

    replace with
    header("Refresh: 0; url=account.php?action=edit_settings&do=edit");

    find
    <form method="post" action="account-login.php">

    replace with
    <form method="post" action="account-login1.php">


    2) After making first post edits add this to account-login.php

    in account-login.php find
    <table border="0" cellpadding="3" align="center">

    add after
    <tr><td align="center"><b><font size="2" color="red">We have recently updated some security features including better encrypted passwords.<br/>If your password does not work please  <a href="account-login1.php">Login with old password</a> then update your password or you may click recover account to do it by email</font></b></td></tr>
    I do not use the ajax shout box but the issue will be the sql query try replace
    INSERT INTO shoutbox (userid, date, user, message)
    with
    INSERT INTO ajshoutbox (uid, date, name, text)
    This is designed for fresh installs and should be added to the original v3, for live sites see 2nd post

    This updates the out dated passhash/md5 to PASSWORD_BCRYPT or  PASSWORD_ARGON2I making passwords more secure
    This code is BCRYPT but you can change in sql 7.3 to ARGON2I by replacing in edits

    First in myphpadmin in user table stucture increase length from 40 to 255

    [color=rgb(251, 160, 38)]backend/functions.php find[/color]
    if (strlen($_COOKIE["pass"]) != 40 || !is_numeric($_COOKIE["uid"])) {


    replace with
    if (strlen($_COOKIE["pass"]) != 60 || !is_numeric($_COOKIE["uid"])) {


    find
    if (!$row || sha1($row["id"].$row["secret"].$row["password"].$ip.$row["secret"]) != $_COOKIE["pass"]) {


    replace with
    $hash = $row["id"].$row["secret"].$row["password"].$ip.$row["secret"];
       if (!$row || !password_verify($hash,$_COOKIE["pass"])){


    find
    $hash = sha1($id.$secret.$password.getip().$secret);


    replace with
        $hash = $id.$secret.$password.getip().$secret;
       $hash = password_hash($hash, PASSWORD_BCRYPT);


    [color=rgb(251, 160, 38)]account-recover.php find[/color]
            SQL_Query_exec("UPDATE `users` SET `password` = '".passhash($password)."', `secret` = $newsec WHERE `id`=".intval($_POST['id'])." AND MD5(`secret`) = ".sqlesc($_POST["secret"]));


    replace with
    $wantpassword = password_hash($password, PASSWORD_BCRYPT);
           SQL_Query_exec("UPDATE `users` SET `password` = '".$wantpassword."', `secret` = $newsec WHERE `id`=".intval($_POST['id'])." AND MD5(`secret`) = ".sqlesc($_POST["secret"]));


    [color=rgb(251, 160, 38)]admin-modtasks.php find[/color]
    $password = passhash($password);


    replace with
    $password = password_hash($password, PASSWORD_BCRYPT);


    [color=rgb(251, 160, 38)]account.php find[/color]
    $chpassword = passhash($chpassword);


    replace with
    $chpassword = password_hash($chpassword, PASSWORD_BCRYPT);


    [color=rgb(251, 160, 38)]account-login.php[/color]
    $password = passhash($_POST["password"]);


    replace with
    $password = $_POST["password"];


    find
    if ( ! $row || $row["password"] != $password )


    replace with
    if ( !$row || !password_verify($password,$row["password"]))


    [color=rgb(251, 160, 38)]account-signup.php find[/color]
    $password_maxlength = 40;


    replace with
    $password_maxlength = 60;


    find
    $res = SQL_Query_exec("SELECT id FROM users WHERE id = $_REQUEST[invite] AND MD5(secret) = ".sqlesc($_REQUEST["secret"]));


    replace with
    $res = SQL_Query_exec("SELECT id FROM users WHERE id = $_REQUEST[invite] AND secret = ".sqlesc($_REQUEST["secret"]));


    find
    $wantpassword = passhash($wantpassword);// hash the password


    replace with
    $wantpassword = password_hash($wantpassword, PASSWORD_BCRYPT); // hash the password
    Password verify is on account login and for the converter it's a specific piece of code which I'll highlight in case some one else can help
    That post you linked to is a good example it's just a case of defining password lenght (bycryt is longer) then verify or update old password then verify, its bugging me I'm so close
    Think I finally got bcrypt or argon2 encryption working for fresh install of v3
    For old boards I'm still struggling to convert the old md5 passwords the only option is to recover account. I'll post what I have just doing some last test.
    Another way is possibly having a back door like account-login2.php to login with old passwords then members can reset password in account settings
    problem to register — 2019-06-06 20:02:33 in v3 Support
    Which sql version are you using
    The easiest way would be run a sql query to empty the passwords in the table and ask members on the login page to use recover password to make a new one,
    They is a few examples of converting old md5 passwords on stack overflow so I'll check for anything that might be helpfull the main part now is testing members can use recovery
    had a look at the last code i did and im nearly there, account-recovery might need some thing still, ill put here while its fresh in my mind
    i have managed to get it working just need to do some testing tomorrow

    in myphpmyadmin you need to change password length from 40 to 255 in users table structure

    in account-signup find these lines
    make length 60
    $password_maxlength =  

    change md5 to password_hash
    $res = SQL_Query_exec("SELECT id FROM users WHERE id = $_REQUEST[invite] AND md5(secret) = ".sqlesc($_REQUEST["secret"]));

    make wantpassword line like this
    $wantpassword = password_hash($wantpassword, PASSWORD_BCRYPT);   // hash the password

    in account-login find
    $password  change line to $password = $_POST["password"];

    find
    $message = T_("LOGIN_INCORRECT");
    replace line above with this
    if ( !$row || !password_verify($password,$row["password"]))
    [color=rgb(251, 160, 38)]NOT FINISHED CODE[/color]

    i was looking at this 2 weeks ago but lifes been busy recently so didnt make much progress but from what i remember you can use sql password_hash this is bcrytpt and also auto salts i have passwords encrypting but cant login these are changes so far

    in myphpmyadmin you need to change password length from 40 to 255 in users table structure

    in account-signup make length 60   $password_maxlength = 60;  and change $wantpassword
    $wantpassword = password_hash('my super cool password', PASSWORD_DEFAULT);// hash the password

    that encrypts but still trying to get the login page to read it
    [ATTACH type="full" alt="5062"]5062[/ATTACH]


    im pretty sure there is a 2.08 mod that encryts so ill see if that can help or be updated if i can find it
    I'll have a look at this some point this week it should be input username but it would be better if once you type a letter it would recommend names, this helps with spelling so you don't get errors by users
    Top 10 — 2019-05-20 18:29:37 in v3 Mods Completed
    ive updated attachment with torrent images & changed top10.php to point to images/languages i will  see if i can find better flags :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: 3
    • Members: 0
    • Guests online: 3
    • Comments: 3
    • Messages: 1,728