Jump to content

Metin2CMS by Ionut - Custom Delete Code


Recommended Posts

  • Premium

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 by Mutulic
  • Metin2 Dev 5
  • Love 2
Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.