https://www.icyphoenix.com/viewtopic.php?f=35&t=2987
-----------------------------------
aliks0905
Fri 26 Oct, 2007 07:10

"aliks0905 We Miss You" Emails ...
-----------------------------------
Hi, 

is there a way to implement or create or simulate the vbulletin type feature where if a user hasn't visited the site for a certain amount of days then they get an email saying something like:

"
Hello, aliks0905!

We've noticed that you've not been active on Icy Phoenix for quite some time now, and we miss you!

Please remember that inactive users are deleted regularly...

If you don't remember your password, you can request it here: http://www.icyphoenix.com/login.php?do=lostpw

We hope to see you soon!

Kindest Regards
Icy Phoenix Admin "

Thanks


-----------------------------------
Mighty Gorgon
Mon 05 Nov, 2007 00:59

Re: "aliks0905 We Miss You" Emails ...
-----------------------------------
I won't add it.

Try to look if there is a mod for phpBB which does this and then someone may help you in installing it on Icy Phoenix.


-----------------------------------
obus3000
Sat 15 Dec, 2007 19:21

Re: "aliks0905 We Miss You" Emails ...
-----------------------------------
Well I've been looking for it in phpbb, and ther'e no a similar hack to do this.

DO someody knows about it? I think is a vbulletin feature, but I just cant find it  :cry:


-----------------------------------
Zuker
Sat 15 Dec, 2007 23:59

Re: "aliks0905 We Miss You" Emails ...
-----------------------------------
I think that there it isn't this kind of mod.
I made something for personal use but it's manually, it's a script that export the emails of users that do not login to your forum since "x" days.


-----------------------------------
novice programmer
Sun 16 Dec, 2007 00:26

Re: "aliks0905 We Miss You" Emails ...
-----------------------------------
I think some users could take it as spam...


-----------------------------------
obus3000
Wed 19 Dec, 2007 01:28

Re: "aliks0905 We Miss You" Emails ...
-----------------------------------
[quote user="Zuker" post="22259"]I think that there it isn't this kind of mod.
I made something for personal use but it's manually, it's a script that export the emails of users that do not login to your forum since "x" days.[/quote]

Could you please show your project?


-----------------------------------
Zuker
Wed 19 Dec, 2007 14:15

Re: "aliks0905 We Miss You" Emails ...
-----------------------------------
i've got it coded on a website control panel. that files won't help you

i hope this piece of code will help you

[code linenumbers=false]// Count users
$sql = 'SELECT user_id FROM '.USERS_TABLE.' WHERE user_id > 0 AND user_lastvisit < '.(time()-86400*30).'';
if(!$result = $db->sql_query($sql))
{
	message_die(GENERAL_ERROR, "Could not count Users", "", __LINE__, __FILE__, $sql);
}
$total_users = $db->sql_numrows($result);
//

$query_result = mysql_query('SELECT username,user_email FROM '.USERS_TABLE.' WHERE user_id > 0 AND user_lastvisit < '.(time()-86400*30).'');

while( $row = $db->sql_fetchrow($query_result) )
{
	$userrow[] = $row;
}

for ($i = 0; $i < $total_users; $i++)
{
	if (empty($userrow[$i]))
	{
		break;
	}

	$row_color = (($i % 2) == 0) ? "row1" : "row2";

	$template->assign_block_vars('userrow', array(
		'COLOR' => $row_color,
		'NUMBER' => ($start + $i + 1),
		'USERNAME' => $userrow[$i]['username'],
		'U_ADMIN_USER' => append_sid("admin_users.$phpEx?mode=edit&amp;" . POST_USERS_URL . "=" . $userrow[$i]['user_id']),
		'EMAIL' => $userrow[$i]['user_email']
		) //end array
	);
} // end for[/code]

Set 30 for the amout of days you want


-----------------------------------
obus3000
Wed 19 Dec, 2007 18:33

Re: "aliks0905 We Miss You" Emails ...
-----------------------------------
How can i use the code?

Like a cron task?


-----------------------------------
Zuker
Wed 19 Dec, 2007 22:10

Re: "aliks0905 We Miss You" Emails ...
-----------------------------------
if you are confident with php, you can try to create an admin page. you need to define lang vars and create the template file


