Go Back   Pligg Forum > Pligg Development > Pligg Mods
Reply
 
LinkBack Thread Tools Display Modes
  #31 (permalink)  
Old 05-27-2007, 09:50 PM
dollars5's Avatar
dollars5 dollars5 is offline
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,164
Downloads: 29
Uploads: 1
Thanks: 292
Thanked 267 Times in 178 Posts
When using this, you will have to remove the sidebar registration and provide a link to register.php refer to some sites which use this mod http://memeorlame.com and http://do1thing.net
Reply With Quote
Sponsored Links
Check out the New Templates at the Pligg Pro Shop.
  #32 (permalink)  
Old 05-28-2007, 12:23 AM
jrothra jrothra is offline
Constant Pligger
Pligg Version: 9.7 - updating is a MAJOR task
Pligg Template: Custom - complete redesign needed to update
 
Join Date: Apr 2007
Posts: 160
Downloads: 9
Uploads: 0
Thanks: 19
Thanked 2 Times in 2 Posts
Auto-redirect

It would be nice to have the validation page include the following:

1. A redirect after 15-20 seconds or so to the main site's login.php page.
2. A link to the login page (I've done that myself in the php code) saying "Log in here" or something.

I don't know how to do the auto redirect after a time span. I can do it on the server, but that will immediately redirect them.
Reply With Quote
  #33 (permalink)  
Old 05-28-2007, 12:30 AM
jrothra jrothra is offline
Constant Pligger
Pligg Version: 9.7 - updating is a MAJOR task
Pligg Template: Custom - complete redesign needed to update
 
Join Date: Apr 2007
Posts: 160
Downloads: 9
Uploads: 0
Thanks: 19
Thanked 2 Times in 2 Posts
Email Info Goofy

I tested the system and it works, but I noticed the following:

1. The sender's email address is listed as: PLIGG_PassEmail_From @ linux39.cqservers.com (spaces put around the @ to prevent auto-linking as email)

2. The subject is listed as: Welcome to PLIGG_Visual_Name

I checked the admin > Modify Language section and here's what's set to be in those sections:

PLIGG_PassEmail_From = webmaster @ faithtag.com
PLIGG_Visual_Name = FaithTag

I would think the sending email address would be the webmaster email and the welcome to would say FaithTag.
Reply With Quote
  #34 (permalink)  
Old 05-28-2007, 02:11 AM
dollars5's Avatar
dollars5 dollars5 is offline
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,164
Downloads: 29
Uploads: 1
Thanks: 292
Thanked 267 Times in 178 Posts
Pls refer this thread for an updated version with more customizations and detailed instructions : How to check if a registering user's email is valid?

Also Ash will be working to improve on it latter when he finds time - atp he is busy with critical things for version 9.5.1 release.
Reply With Quote
  #35 (permalink)  
Old 05-28-2007, 03:31 AM
jrothra jrothra is offline
Constant Pligger
Pligg Version: 9.7 - updating is a MAJOR task
Pligg Template: Custom - complete redesign needed to update
 
Join Date: Apr 2007
Posts: 160
Downloads: 9
Uploads: 0
Thanks: 19
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by dollars5 View Post
Pls refer this thread for an updated version with more customizations and detailed instructions : How to check if a registering user's email is valid?

Also Ash will be working to improve on it latter when he finds time - atp he is busy with critical things for version 9.5.1 release.
I read that thread and didn't see anything about the email sent by the validator to the registrant. Did I miss it? It says what in the latest version (which I downloaded and implemented on yesterday).

I don't see where it pulls the info for PLIGG_PassEmail_From and PLIGG_Visual_Name as set in the Admin > Modify Language section. As of the version I'm using, it does not pull correctly. To see what it looks like, register with my site (sometimes it's easier to show than to describe )
Reply With Quote
  #36 (permalink)  
Old 05-28-2007, 05:43 AM
dollars5's Avatar
dollars5 dollars5 is offline
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,164
Downloads: 29
Uploads: 1
Thanks: 292
Thanked 267 Times in 178 Posts
Please check this function do_register1() in register.php that is responsible for sending e-mails you should find the from address in headers part as
$headers = "From: " . $main_smarty->get_config_vars("PLIGG_PassEmail_From") . "\r\nReply-To: " . $main_smarty->get_config_vars("PLIGG_PassEmail_From") . "\r\nCC: account@domain.com\r\nX-Priority: 1\r\n";

and the subject is constructed as $subject= 'Welcome to ' . $main_smarty->get_config_vars("PLIGG_Visual_Name");

So sure the code uses lang.conf elements.

EDIT: the packed files will send an cc to some account you mention too - atp that is hardcoded to account [at] greatinnovus.com - chage it

Last edited by dollars5 : 05-28-2007 at 05:48 AM.
Reply With Quote
The Following User Says Thank You to dollars5 For This Useful Post:
  #37 (permalink)  
Old 05-28-2007, 06:30 PM
jrothra jrothra is offline
Constant Pligger
Pligg Version: 9.7 - updating is a MAJOR task
Pligg Template: Custom - complete redesign needed to update
 
Join Date: Apr 2007
Posts: 160
Downloads: 9
Uploads: 0
Thanks: 19
Thanked 2 Times in 2 Posts
That makes more sense to me. Thank you.

I'll look into it and make the necessary adjustments.
Reply With Quote
  #38 (permalink)  
Old 05-28-2007, 07:06 PM
jrothra jrothra is offline
Constant Pligger
Pligg Version: 9.7 - updating is a MAJOR task
Pligg Template: Custom - complete redesign needed to update
 
Join Date: Apr 2007
Posts: 160
Downloads: 9
Uploads: 0
Thanks: 19
Thanked 2 Times in 2 Posts
I checked the register.php file and two strings are not listed in there anywhere. The one I've got is the one-step registration version from here.

Here's the code of my register.php
Code:
<?php
// The source code packaged with this file is Free Software, Copyright (C) 2005 by
// Ricardo Galli <gallir at uib dot es>.
// It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
// You can get copies of the licenses here:
// 		http://www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".

include_once('Smarty.class.php');
$main_smarty = new Smarty;

include('config.php');
include(mnminclude.'html1.php');
include(mnminclude.'link.php');
include(mnminclude.'smartyvariables.php');
include(mnminclude.'ts.php');

// determine which step of the registration process we are on
if(isset($_POST["process"])) {
	switch ($_POST["process"]) {
		case 1:
		  // breadcrumbs and page title
			$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_RegisterStep2');
			$navwhere['link1'] = getmyurl('register', '');
			$main_smarty->assign('navbar_where', $navwhere);
			$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_RegisterStep2'));
			break;
	}
} 
else {
	// breadcrumbs and page title
	$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_Register');
	$navwhere['link1'] = getmyurl('register', '');
	$main_smarty->assign('navbar_where', $navwhere);
	$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_Register'));
}

// pagename
define('pagename', 'register'); 
$main_smarty->assign('pagename', pagename);

// sidebar
$main_smarty = do_sidebar($main_smarty);

// show the template
$main_smarty->assign('tpl_center', $the_template . '/register_center');
$main_smarty->display($the_template . '/pligg.tpl');

// register step 1
function do_register0() {
	global $main_smarty, $the_template;
	$main_smarty->display($the_template . '/register_step_1.tpl');
}

// verify registration information
function verify_reg($username, $email, $password, $password2) {
	global $main_smarty, $the_template;
	
	if(!isset($username) || strlen($username) < 3) { // if no username was given or username is less than 3 characters
		$main_smarty->assign('register_error_text', "usertooshort");
		$main_smarty->display($the_template . '/register_error.tpl');
		$error = true;
	}	
	if(!preg_match('/^[a-zA-Z0-9\-\.@]+$/', $username)) { // if username contains invalid characters
		$main_smarty->assign('register_error_text', "usernameinvalid");
		$main_smarty->display($the_template . '/register_error.tpl');
		$error = true;
	}
	if(user_exists(trim($username)) ) { // if username already exists
		$main_smarty->assign('register_error_text', "usernameexists");
		$main_smarty->display($the_template . '/register_error.tpl');
		$error = true;
	}
	if(!check_email(trim($email))) { // if email is not valid
		$main_smarty->assign('register_error_text', "bademail");
		$main_smarty->display($the_template . '/register_error.tpl');
		$error = true;
	}
	if(email_exists(trim($email)) ) { // if email already exists
		$main_smarty->assign('register_error_text', "emailexists");
		$main_smarty->display($the_template . '/register_error.tpl');
		$error = true;
	}
	if(strlen($password) < 5 ) { // if password is less than 5 characters
		$main_smarty->assign('register_error_text', "fivecharpass");
		$main_smarty->display($the_template . '/register_error.tpl');
		$error = true;
	}
	if($password !== $password2) { // if both passwords do not match
		$main_smarty->assign('register_error_text', "nopassmatch");
		$main_smarty->display($the_template . '/register_error.tpl');
		$error = true;
	}	
	
	return $error;
	
}

function do_register1() {
	global $main_smarty, $the_template;

	$error = false;
	$error = verify_reg($_POST["username"], $_POST["email"], $_POST["password"], $_POST["password2"]);
	
	if ($error) return;

	if(enable_captcha == 'true') {
	$main_smarty->assign('reghash', generateHash($_POST["username"].$_POST["email"].$_POST["password"]));
	$main_smarty->assign('ts_random', rand(10000000, 99999999));
	$main_smarty->display($the_template . '/register_step_2.tpl');
	}
	else {
	do_register2();
	}
}

function do_register2() {
	global $db, $current_user, $main_smarty, $the_template;
	
	if(enable_captcha == 'true') {
		if (!ts_is_human()) { // if incorrect captcha code was entered
			$main_smarty->assign('register_error_text', "badcode");
			$main_smarty->display($the_template . '/register_error.tpl');
			return;
		}
	
		$reghash = $_POST["reghash"];
		$mycombo = $_POST["username"].$_POST["email"].$_POST["password"];
		if(generateHash($mycombo, substr($reghash, 0, SALT_LENGTH)) != $reghash){
			loghack('Register Step 2', 'username: ' . $_POST["username"].'|email: '.$_POST["email"]);
		}
	}

	$error = false;
	$error = verify_reg($_POST["username"], $_POST["email"], $_POST["password"], $_POST["password"]); 
	if ($error) return;

	$username=$db->escape(trim($_POST['username']));
	$password=$db->escape(trim($_POST['password']));
	$userip=$_SERVER['REMOTE_ADDR'];
	$saltedpass=generateHash($password);
	$email=$db->escape(trim($_POST['email']));
	if (!user_exists($username)) {
		if ($db->query("INSERT INTO " . table_users . " (user_login, user_email, user_pass, user_date, user_ip) VALUES ('$username', '$email', '$saltedpass', now(), '$userip')")) {
			if($current_user->Authenticate($username, $password, false) == false) {
				$main_smarty->assign('register_error_text', "errorinserting");
				$main_smarty->display($the_template . '/register_error.tpl');
			} else {
				
				define('registerdetails', $username . ';' . $password . ';' . $email . ';' . $return);
				check_actions('register_success_pre_redirect');
				
				header('Location: ' . getmyurl('user', $username));
			}
		} else {
			$main_smarty->assign('register_error_text', "errorinserting");
			$main_smarty->display($the_template . '/register_error.tpl');
		}
	} else {
		$main_smarty->assign('register_error_text', "usernameexists");
		$main_smarty->display($the_template . '/register_error.tpl');
	}
}
?>
Reply With Quote
  #40 (permalink)  
Old 06-03-2007, 09:51 AM
blackpr blackpr is offline
New Pligger
 
Join Date: Mar 2007
Posts: 21
Downloads: 18
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
I am using paul01 template and Pligg 9.1.
What should i do to get this work?
Reply With Quote
Reply



Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks Enabled by vBSEO 3.0.0