News:

Wondering if this will always be free?  See why free is better.

Main Menu

email Inactive Users

Started by Suki, April 19, 2014, 02:00:47 PM

Previous topic - Next topic

Miker1029

Ya I've done manually even set it to 10 days, uninstalled reinstalled still nothing....

I did redo some user permissions yesterday thinking that might be it...

Csn you tell me all the db entries?  Or does the remove data on uninstall handle them all?

Thinking uninstall and remove all settings associated with the mod and reinstall.

And I can give you my thanks for the mod. It is useful..

Mike

Suki

Reinstalling it won't do anything, perhaps the only thing it will do is having duplicate code on your forum which will create yet more issues.

Read this topic, I already explained what the criteria is and even posted a few scripts to help debugging.


As for mails and the mail queue, once this mod calls SMF's sendmail() function the mod cannot do anything beyond that, once again, reinstalling it won't do anything. The mails this mod sent are already on SMFs mail queue so uninstalling the mod won't change that.

This mod cannot possible know if an user's mail is indeed a valid one, it just checks that the user has an email address.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Miker1029

Hey all,

    We were talking about this earlier, and figured I'd post here for folks still using the mod...

I've changed the delete dates from 6 months/0 posts, to 1 year 50 posts, and thought, HELL, without a Check all option that's gonna hurt....

SOOO I went searching, and since I stink at coding I found a Javascript that will do the job, and I made a Bookmarklet out of it....

SO Basically Create a Bookmark by Hand... call it what you want, Mines CMT (Check Mark Toggle)

Paste this code in the Link and Viola, Check mark toggle for any page you go to....

javascript:(function(){
function checkFrames(w) {

  try {
    var inputs = w.document.getElementsByTagName('input');
    for (var i = 0; i < inputs.length; i++) {
      if (inputs[i].type && inputs[i].type == 'checkbox'){
        inputs[i].checked = !inputs[i].checked;
      }
    }
  } catch (e){}
  if(w.frames && w.frames.length>0){
   
    for(var i = 0; i < w.frames.length;i++){
      var fr = w.frames[i];
      checkFrames(fr);
    }
  }
}
checkFrames(window);
})()


I closed the link to the source, so I can't post it, but this was by no means created bv me, The Implementation Was, But that's cause I couldn't make a code call work.... And Actually I kind of like this better....

Hope It helps someone, as this could be used in MANY situations.....

Mike

aegersz

#163
ignore me as i didn't check all the appropriate membergroups and now it's working fine !

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Miker1029

Should I not waste my time posting Fake E-Mail Texts here?

Mike

Suki

Thats up to you, no time is wasted unless you decide to mark it as such.

Having said that, I cannot think of a reason for posting fake email texts or rather, what would be the purpose of doing so.  This mod is not a spamming oriented mod and shouldn't be used to prevent/control spam.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Miker1029

Oh Damn, Sorry, I posted on the wrong thread!!!!!!!!!

I thought this was "e-mail username", and I've been working on trying to keep up with the 1000's of fake address for that mod, and uploading them, then I came here and they're GONE!!! Imagine my surprise!!!  LOL

Explains why they are gone!

Mike

elexx

Hello, thank you for this mod!

It works on SMF 2.0.11 but with a little Problem:

The {last_login} variable would not be replaced correctly - the place ist empty.

My custom Mail body is like follows:
QuoteHallo {user_name},
Du warst schon lange nicht mehr im Forum aktiv (zuletzt am {last_login} ).

Klick: {forum_url}

Viele Grüße ..

The replacement of {user_name} and {forum_url} works. I've looked in the ScheduledTasks.php an found the code for replacement:

// Lets create the message. Replace our wildcards with the actual data.
$replacements = array(
'{user_name}' => $row['real_name'],
'{display_name}' => $row['member_name'],
'{last_login}' => timeformat($row['last_login']),
'{forum_name}' => $mbname,
'{forum_url}' => $scripturl,
);


I think, timeformat() returns with an empty string, but why?

Does anybody use this variable, (it's not used in the default message)?

Suki

I believe the last_login row will never be filled for accounts that register but never ever come back again.

A quick fix for those cases would be:

<?php

$request $smcFunc['db_query']('''
SELECT id_member, email_address, inactive_mail, member_name, real_name, last_login, date_registered
FROM {db_prefix}members
WHERE inactive_mail = 0
AND posts <= {int:postLimit}
AND last_login < {int:inactiveFor}
AND date_registered < {int:inactiveFor}
AND is_activated = 1
AND to_delete = 0
AND email_address is NOT NULL
AND (id_group IN ({array_int:groups})
OR id_post_group IN ({array_int:groups})
'
. (implode(' '$additionalgroups)). ')',
array(
'inactiveFor' => $today $inactiveFor,
'groups' => $inGroups,
'postLimit' => $postLimit,
)
);
$messages = array();
while($row $smcFunc['db_fetch_assoc']($request))
{
// Lets create the message. Replace our wildcards with the actual data.
$replacements = array(
'{user_name}' => $row['real_name'],
'{display_name}' => $row['member_name'],
'{last_login}' => timeformat(!empty($row['last_login']) ? $row['last_login'] : $row['date_registered']),
'{forum_name}' => $mbname,
'{forum_url}' => $scripturl,
);
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Tones

#169
What I'd like to do is not just send a mail to the member but also one to the webmaster so there's a record one was sent. I'm just unsure how to do this.


$messages[$row['id_member']] = array(
'message' => str_replace($find, $replace, $customMessage),
'mail' => $row['email_address'],
'subject' => str_replace($find, $replace, $customSubject),
);


I'm assuming the mail line needs to be an array though without hardcoding in an email address i don't know how to place the webmaster email in there.

'mail' => array($row['email_address'], $modSettings['webmaster_email']),


Am i even close and would that be the variable to use for the forums email address?

SMiFFER

Nice mod.

Question:
Could you include a function to remind/auto-purge members that have not posted since x days ?
Quote of the day: A troll is an obstinate bloke who only hungers for your attention. If you feed him, he will puke all over you!

blunted

Every time I select groups, hit save, none are selected at options.
Is this normal?

Suki

No, is there any error on your error log?   what SMF version are you using?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

CrescentEclipse

#173
Hello Suki :)

I have some questions about your mod.
First of all, the mod works like intended on SMF 2.0.12. No problems at all. Great mod, thank you for your effort! :D

Is it possible to easily disable the minimum post count?
I think it is a bit redundant when you have post count based membergoups, which are very common.
On the other hand it could be handy if you could set a different behavior for users with a higher post count.
(no deletion, only inform)

The next thing is, and many people here seem to have the same opinion, it is confusing to only see the users marked for possible deletion after the grace period expired. Is it possible to somehow enhance the user list by showing some categories?

Maybe something like this:

1. A list with informed users
2. A list with users marked for possible deletion
3. A list with users who will be deleted on next task run
4. A list with users who are protected (maybe with a reset button?)

I think this will give you a nice overview what is currently going on. This is only an idea.
It would be great to have such features, to give this mod a perfect finishing.

Some additional information:
Hm, I found a text variable, which is not used in the mod: $txt['eiu_list_will_be_deleted'] (planned feature, like it suggested?)
$txt['eiu_list_title_potential'] and $txt['eiu_list_title'] are used for the user list (in the menu and in the list itself). Maybe one should be enough?

If you are interested, I can provide a german translation as well ;)

Thank you again for this nice mod. It is a mystery that this is not a standard feature of SMF.

lg Cres

Suki

Yeah, those are nice features and are doable, unfortunately, I do not have the time to implement them.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

SMiFFER

Quote from: Marceline on October 27, 2016, 10:12:34 AM
Yeah, those are nice features and are doable, unfortunately, I do not have the time to implement them.
What if we share that work then?
Quote of the day: A troll is an obstinate bloke who only hungers for your attention. If you feed him, he will puke all over you!

Suki

Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Paracelsus

Hi Suki,

Quick question, how do I "reset" the list of inactive users that have already received the email? I use this MOD not to dele the users but as a reminder to visit the forum. Since last time most of them got the email was ages ago, I wanted to send them once more.

aegersz

Just increase (backdate) your time limit to catch them again, that's my guess.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

romanos8

Can you tell me the name of the tables in database ? because I am getting the following  error:

Duplicate entry 'emailInactiveUsers' for key 'task'


Maybe I had installed the same mode.

Advertisement: