Active+ Member Mutulic 615 Posted February 13, 2024 Active+ Member Share Posted February 13, 2024 (edited) Hello comunity, This is a tutorial to add custom delete code character for Metin2CMS by @ IonutRO. Location: pages/register.php Under: <tr> <td><?php print $lang['email-address']; ?>:</td> <td><input class="form-control" name="email" id="email" pattern=".{7,64}" maxlength="64" placeholder="*****@*****.tld" required="" type="email"> <p class="text-danger" id="checkemail"></p> </td> </tr> Add: <tr> <td>Delete code:</td> <td><input class="form-control" name="delete_char" id="delete_char" pattern=".{7,7}" maxlength="7" required="" type="number"> </td> </tr> Location: include/functions/register.php Replace: if(isset($_POST['captcha']) && isset($_POST['username']) && isset($_POST['password']) && isset($_POST['rpassword']) && isset($_POST['email']) && isset($_SESSION['captcha']['code'])) With: if(isset($_POST['captcha']) && isset($_POST['username']) && isset($_POST['password']) && isset($_POST['rpassword']) && isset($_POST['email']) && isset($_SESSION['captcha']['code'] && isset($_POST['delete_char'])) Location: include/functions/register.php Replace: if($database->register($_POST['username'],$_POST['password'],$_POST['email'],$ref)) With: if($database->register($_POST['username'], $_POST['password'], $_POST['email'], $ref, $_POST['delete_char'])) Location: include/classes/user.php Replace: public function register($username,$password,$email,$ref) With: public function register($username, $password, $email, $ref, $delcode) Location: include/classes/user.php Replace: $stmt->bindparam(":social_id", $social_id); With: $stmt->bindparam(":social_id", $delcode); Location: include/classes/user.php Remove: $social_id = rand(1000000, 9999999); // updated in v2.12 Thanks Edited February 13, 2024 by Mutulic 5 4 Link to comment https://metin2.dev/topic/32173-metin2cms-by-ionut-custom-delete-code/ Share on other sites More sharing options...
Recommended Posts
Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/