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
Invite Code System [v3.0 Port]
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Mods in Progress

Unknown User
2019-07-04 21:56:13
"serph, post: 66792, member: 1398":

did you remove the @SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,NOW(), 'System', 'New User:".$wantusername." ')"); in account-signup.php
on my site its removing the created invite after you confirm the user i need [USER=311]@MicroMonkey[/USER] to test it on his end and see if its doing the same for him

The problem is i set no email confirmation, so users are automatically confirmed without needing to confirm them inside invite.php. They are not pending, they have confirmed as soon as they register.
Unknown User
2019-07-04 22:02:51
$site_config['CONFIRMEMAIL'] = false;        //Enable / Disable Signup confirmation email

should be set  to false are you using the account-signup i posted or the v3 one ?
Unknown User
2019-07-04 22:08:04
"serph, post: 66794, member: 1398":

$site_config['CONFIRMEMAIL'] = false;        //Enable / Disable Signup confirmation email

should be set  to false

It is, I think I need to add takeconfirm.php code into account-signup.php so it automatically removes the code from user invite.php after successful registration

       SQL_Query_exec("UPDATE users SET status = 'confirmed' WHERE id IN (" . implode(", ", $_POST['conusr']) . ") AND status='pending'");
       SQL_Query_exec("UPDATE invites SET confirmed='yes' WHERE inviteid IN (" . implode(", ", $_POST['conusr']) . ") AND confirmed='no'");


Can I put it somewhere here the code above?


...else{

   if ($site_config["INVITEONLY"] && $site_config["CONFIRMEMAIL"]){

   $status = "pending";

   }else{

       $status = "confirmed"; <---- HERE below this

   }
Unknown User
2019-07-04 22:10:59
this is what you should have in there
if ($site_config["CONFIRMEMAIL"] && !$site_config["INVITEONLY"]){ //email confirmation is on
//                ini_set("sendmail_from", "");
               sendmail($email, "Your ".$site_config['SITENAME']." User Account", $body, "From: ".$site_config['SITENAME']." <".$site_config['SITEEMAIL'].">");
               header("Refresh: 0; url=account-confirm-ok?type=signup&email=" . urlencode($email));
       }else{
               if ($site_config["INVITEONLY"]){ //invite only is on
               header("Refresh: 0; url=account-confirm-ok?type=invite");
               }else{
               header("Refresh: 0; url=account-confirm-ok?type=noconf");
       }

edit: and set email confirm to false you use one or the other not both
so either inviteonly false or email confirm to false
2019-07-05 06:25:20
The ajshoutbox prolly explains why I didnt have any issues with this code. I have the ajax shitbox installed on my test box. I still removed it tho lol
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Unknown User
2019-07-05 07:13:30
"MicroMonkey, post: 66799, member: 311":

The ajshoutbox prolly explains why I didnt have any issues with this code. I have the ajax shitbox installed on my test box. I still removed it tho lol

Or just put it under the mysql_insert_id
Is the code getting erased after confirm now ?
2019-07-05 07:25:19
yep. Seems good. Let me know and we can move it to mod complete if you feel like its done. Let me know
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2019-07-05 07:29:24
just to be an asshole to myself, I was doing this on my test machine
<?php
require_once("backend/functions.php");
dbconn();
$id = (int) $_GET["id"];
if (!@count($_POST['conusr'])) autolink("invite.php", "Nothing Selected.");
SQL_Query_exec("UPDATE users SET status = 'confirmed' WHERE id IN (" . implode(", ", $_POST['conusr']) . ") AND status='pending'");
SQL_Query_exec("UPDATE invites SET confirmed='yes' WHERE inviteid IN (" . implode(", ", $_POST['conusr']) . ") AND confirmed='no'");
autolink("invite.php", "Matrix reconfiguring. New users Accepted. ");
?>


I like slow and irritating. I replaced this (because most of it makes no sense anyways)
header("Refresh: 0; url=invite.php?id=$id");

with this
autolink("invite.php", "Matrix reconfiguring. New users Accepted. ");


autolink is your friend....
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2019-07-05 07:39:56
so what should this say
         show_error_msg(T_("SUCCESS"), T_("INVITE_DONE"), 1);

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Unknown User
2019-07-05 08:07:13
I still don't see why takeconfirm.php and form box into invite.php exists. It shouldn't exist there. Users should NOT be allowed to confirm users they invite or see them at all. Once code is used that's it. It should be removed automatically and shouldn't exist anymore, nor inviter should be able to confirm, non-confirmed user they invite due to privacy reasons. Only moderators should see who invites who, so they can ban all of them if they see abuse.
Unknown User
2019-07-05 08:09:52
$LANG["INVCODE_ERR"] = "Sorry you do not have any invites to generate a code!";
$LANG["SUCCESS"] = "Sign Up Succsesful Welcome To $site_config[SITENAME]";
$LANG["INVITE_DONE"] = "<b>Invite Succsesful Please Note Your Inviter Needs To Confirm Your Account Before You Can Login!<b>";
theres still loads of language to edit in the invite.php like the instructions could be moved to lang.php etc
Unknown User
2019-07-05 08:32:09
"serph, post: 66805, member: 1398":

$LANG["INVCODE_ERR"] = "Sorry you do not have any invites to generate a code!";
$LANG["SUCCESS"] = "Sign Up Succsesful Welcome To Our Site";
$LANG["INVITE_DONE"] = "<b>Invite Succsesful Please Note Your Inviter Needs To Confirm Your Account Before You Can Login!<b>";
theres still loads of language to edit in the invite.php like the instructions could be moved to lang.php etc

[USER=1398]@serph[/USER] there is a mistake in account-signup.php

You use if ($site_config["INVITEONLY"] instead of $site_config["INVITEONLY"] && $site_config["CONFIRMEMAIL"] which means the code will always give pending status regardless if user sets confirmation by mail or disable it. Now try to see if the code will disappear when a user is automatically confirmed because email confirmation is turned off.

if ($site_config["INVITEONLY"] && $site_config["CONFIRMEMAIL"]){

   $status = "pending";

   }else{

       $status = "confirmed";

   }

Edit2: More mistakes:

In invite.php it should be  "$CURUSER['class'] >= 7". The one "if ($CURUSER['id'] == $id || get_user_class() == 7)" there is NOT working on TTv3.
Unknown User
2019-07-05 09:02:00
that code should be like so i dont see  ! in your post

Quote:
@shadows  [b]if ($site_config["INVITEONLY"] [/b]instead of $site_config["INVITEONLY"] && $site_config["CONFIRMEMAIL"]


if ($site_config["CONFIRMEMAIL"] && !$site_config["INVITEONLY"]){ //email confirmation is on
//                ini_set("sendmail_from", "");
               sendmail($email, "Your ".$site_config['SITENAME']." User Account", $body, "From: ".$site_config['SITENAME']." <".$site_config['SITEEMAIL'].">");
               header("Refresh: 0; url=account-confirm-ok?type=signup&email=" . urlencode($email));
       }else{
               if ($site_config["INVITEONLY"]){ //invite only is on
               header("Refresh: 0; url=account-confirm-ok?type=invite");
               }else{
               header("Refresh: 0; url=account-confirm-ok?type=noconf");
       }
}





its saying if inviteonly is off !$site_config["INVITEONLY"]){ //email confirmation is on then use email confirm else if inviteonly
so you need to turn email confirm to false in backend/config

why email they know there signup was a sucsess becuase there told there inviter needs to confirm them so no need for email ???

as for the other mistake ill make correctiions thanks @shadow
Unknown User
2019-07-05 09:02:51
Not that part, find the pending part in the code it should be above this part.

[USER=1398]@serph[/USER] This is the wrong part from your archive.

It should be like this:
     if ($site_config["CONFIRMEMAIL"]){//req confirm email true/false
       $status = "pending";
   }else{
   if ($site_config["INVITEONLY"] && $site_config["CONFIRMEMAIL"]){
   $status = "pending";
   }else{
       $status = "confirmed";
   }
  }
Unknown User
2019-07-05 09:27:36
well thats what i got in my account-signup i must of messed the file up in the archive my apologies have you added the code like i said and dose it work ?

edit:
why should it be like that you're already asking if confirm email is on. you're asking if its on twice and to set status to pending twice or am i not following you sorry :oops:

edit:2  no sorry your asking if inviteonly and confirmemail is on they both wouldnt be on at the same time thats not how the script is set up
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: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728