User Reminder

Here my mods and history gets moved when validated and released to the phpbb.com MODDB

Re: User Reminder

Postby ScrapbookSupplies » Sat Jan 24, 2009 7:10 am

Hi Lefty,
I have a question on this mod. Am wondering if it's running a cron job that I found in our raw access logs or if this is a malicious cron job. We've had some funny things happen on our site lately and for some reason our sessions table keeps crashing - probably twice a week it seems.

Anyway, this is what was in our log (it appears probably about three or four times through the day and the IP goes to Yahoo), but I thought I'd check just to be sure. :happysmerk:

Code: Select all
96.248.128.234 - - [23/Jan/2009:15:41:53 -0700] "GET /scrapchat/cron.php?cron_type=tidy_cache HTTP/1.1" 200 380 "http://www.scrapbooksuppliesdirect.com/scrapchat/gallery/posting.php?mode=image&submode=upload&album_id=108" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5"


As always, thanks so much Lefty!
Jeanne :tigs:
ScrapbookSupplies
Forum Member
 
Posts: 14
Joined: Wed Jul 09, 2008 8:42 pm

Re: User Reminder

Postby lefty » Sat Jan 24, 2009 10:01 am

Hi jeanne, the user reminder mod does not run cron scripts so if you did not create it, you might want to report it to your host or delete it. Question is, of course, how did it get there in the first place.
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: User Reminder

Postby makapusa » Tue Feb 17, 2009 7:33 am

hi!
i've got bug there... whem i installed and did everything form guide it's returned
general: index page
Code: Select all
General Error
SQL ERROR [ mysqli ]

Unknown column 'user_reminder_zero_poster' in 'where clause' [1054]

SQL

SELECT * FROM phpbb_users WHERE user_id NOT IN ('', 1) AND user_type NOT IN (2, 1) AND ( (user_reminder_zero_poster < 1217572184 AND user_reminder_zero_poster > 0) OR (user_reminder_inactive > 0 AND user_reminder_inactive < 1217572184) OR (user_reminder_not_logged_in > 0 AND user_reminder_not_logged_in < 1217572184) ) AND user_allow_massemail = 1 AND user_reminder_inactive_still = 0

BACKTRACE


FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: includes/functions_user_reminder.php
LINE: 79
CALL: dbal_mysqli->sql_query()

FILE: index.php
LINE: 118
CALL: send_user_reminders()


in administration .mods> 2nd Reminder
Code: Select all
General Error
SQL ERROR [ mysqli ]

Unknown column 'user_reminder_zero_poster' in 'where clause' [1054]

SQL

SELECT * FROM phpbb_users WHERE user_id NOT IN ('', 1) AND user_type NOT IN (2, 1) AND ( (user_reminder_zero_poster < 1217572362 AND user_reminder_zero_poster > 0) OR (user_reminder_inactive > 0 AND user_reminder_inactive < 1217572362) OR (user_reminder_not_logged_in > 0 AND user_reminder_not_logged_in < 1217572362) ) ORDER BY user_lastvisit DESC

BACKTRACE


FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: includes/acp/acp_user_reminder.php
LINE: 400
CALL: dbal_mysqli->sql_query()

FILE: includes/acp/acp_user_reminder.php
LINE: 71
CALL: acp_user_reminder->inactive_still()

FILE: includes/functions_module.php
LINE: 507
CALL: acp_user_reminder->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
makapusa
Newbie/Neuling
 
Posts: 1
Joined: Tue Feb 17, 2009 7:19 am

Re: User Reminder

Postby lefty » Tue Feb 17, 2009 9:02 am

hi, could you please do me a favour and run the install file mentioned in the first post of the topic.

looks like not all sql were successfully executed.
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: User Reminder

Postby Hippie459MN » Thu Feb 19, 2009 3:01 am

I have installed this mod and everything but one thing seems to work. When I click on '2nd Reminder' in the ACP I get this:

Code: Select all
General Error
SQL ERROR [ mysql4 ]

Unknown column 'user_reminder_zero_poster' in 'where clause' [1054]

SQL

SELECT * FROM phpbb_users WHERE user_id NOT IN ('55', '63', '93', '98', '118', 1) AND user_type NOT IN (2, 1) AND ( (user_reminder_zero_poster < 1232416045 AND user_reminder_zero_poster > 0) OR (user_reminder_inactive > 0 AND user_reminder_inactive < 1232416045) OR (user_reminder_not_logged_in > 0 AND user_reminder_not_logged_in < 1232416045) ) ORDER BY user_lastvisit DESC

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: includes/acp/acp_user_reminder.php
LINE: 400
CALL: dbal_mysql->sql_query()

FILE: includes/acp/acp_user_reminder.php
LINE: 71
CALL: acp_user_reminder->inactive_still()

FILE: includes/functions_module.php
LINE: 507
CALL: acp_user_reminder->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()


I have applied the 2 files for the fix in the first post and also did the time fix. All the other modules seem to work just fine. Any ideas? :thinking:

EDIT: Yep, I feel kinda dumb now. lol Forgot to add this SQL
Code: Select all
ALTER TABLE phpbb_users ADD user_reminder_inactive INT( 11 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE phpbb_users ADD user_reminder_zero_poster INT( 11 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE phpbb_users ADD user_reminder_inactive_still INT( 11 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE phpbb_users ADD user_reminder_not_logged_in INT( 11 ) UNSIGNED NOT NULL DEFAULT '0';


Works like a champ now! Thank you. :cheer:
Hippie459MN
Newbie/Neuling
 
Posts: 7
Joined: Thu Feb 19, 2009 2:46 am

Re: User Reminder

Postby lefty » Thu Feb 19, 2009 10:06 am

great that you got it figured out yourself :thumbsup:
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: User Reminder

Postby Leahcim » Mon Mar 09, 2009 12:08 pm

Hi

I am running phpb3 on mssql.

I receive this when I list "Not logged in users":
SQL ERROR [ mssql_odbc ]

[Microsoft][ODBC SQL Server Driver][SQL Server]Column 'phpbb_users.user_type' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. [37000]

SQL

SELECT u.*, s.*, MAX(s.session_time) AS session_time FROM phpbb_users u LEFT JOIN phpbb_sessions s ON (s.session_user_id = u.user_id) WHERE u.user_id <> '' AND u.user_type NOT IN (2, 1) AND u.user_lastvisit = 0 AND user_regdate <= 1234868924 GROUP BY u.user_id ORDER BY u.user_regdate DESC

BACKTRACE


FILE: includes/db/mssql_odbc.php
LINE: 165
CALL: dbal->sql_error()

FILE: includes/acp/acp_user_reminder.php
LINE: 335
CALL: dbal_mssql_odbc->sql_query()

FILE: includes/acp/acp_user_reminder.php
LINE: 77
CALL: acp_user_reminder->not_logged_in()

FILE: includes/functions_module.php
LINE: 507
CALL: acp_user_reminder->main()

FILE: adm/index.php
LINE: 76
CALL: p_master->load_active()

Is anyone using this with mssql?

/Mike
Leahcim
Newbie/Neuling
 
Posts: 8
Joined: Tue Feb 10, 2009 11:18 pm

Re: User Reminder

Postby Leahcim » Mon Mar 09, 2009 6:59 pm

Swedish characters.

When sending reminders it strips the swedish characters.

I get
"Pminnelse frn "knxforum.se"!"
instead of
"Påminnelse från "knxforum.se"!"

/Mike
Leahcim
Newbie/Neuling
 
Posts: 8
Joined: Tue Feb 10, 2009 11:18 pm

Re: User Reminder

Postby lefty » Mon Mar 09, 2009 8:34 pm

Leahcim wrote:Hi

I am running phpb3 on mssql.

I receive this when I list "Not logged in users":
SQL ERROR [ mssql_odbc ]

[Microsoft][ODBC SQL Server Driver][SQL Server]Column 'phpbb_users.user_type' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. [37000]

SQL

SELECT u.*, s.*, MAX(s.session_time) AS session_time FROM phpbb_users u LEFT JOIN phpbb_sessions s ON (s.session_user_id = u.user_id) WHERE u.user_id <> '' AND u.user_type NOT IN (2, 1) AND u.user_lastvisit = 0 AND user_regdate <= 1234868924 GROUP BY u.user_id ORDER BY u.user_regdate DESC

BACKTRACE


FILE: includes/db/mssql_odbc.php
LINE: 165
CALL: dbal->sql_error()

FILE: includes/acp/acp_user_reminder.php
LINE: 335
CALL: dbal_mssql_odbc->sql_query()

FILE: includes/acp/acp_user_reminder.php
LINE: 77
CALL: acp_user_reminder->not_logged_in()

FILE: includes/functions_module.php
LINE: 507
CALL: acp_user_reminder->main()

FILE: adm/index.php
LINE: 76
CALL: p_master->load_active()

Is anyone using this with mssql?

/Mike


i am afraid i dont know anything about mssql but have you tried to add the u.user_type to the group by bit?
Leahcim wrote:Swedish characters.

When sending reminders it strips the swedish characters.

I get
"Pminnelse frn "knxforum.se"!"
instead of
"Påminnelse från "knxforum.se"!"

/Mike

i have never experienced that problems with emails signs like the german umlauts. do you read your emails in a webbrowser or a program that support UTF8? also, make sure your text files are saved as UTF8, no BOM.
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: User Reminder

Postby Leahcim » Mon Mar 09, 2009 10:33 pm

lefty wrote:i am afraid i dont know anything about mssql but have you tried to add the u.user_type to the group by bit?


I solved it this way but i have not analysed the consequenses:
Code: Select all
//      'SELECT'   => 'u.*, s.*, MAX(s.session_time) AS session_time',
         'SELECT'   => 'u.*, s.*, s.session_time AS session_time',
         'FROM'      => array(
            USERS_TABLE   => 'u'
         ),
      
         'LEFT_JOIN'   => array(
            array(
               'FROM'   => array(SESSIONS_TABLE => 's'),
               'ON'   => 's.session_user_id = u.user_id'
            )
         ),
      
         'WHERE'      => $db->sql_in_set('u.user_id', $excl_user_id_ary, true) . '
                  AND ' . $db->sql_in_set('u.user_type', $excl_user_type_ary, true) . "
                  AND u.user_lastvisit = 0
                  AND user_regdate <= " . $time .
                  $sql_choice
      
         //,'GROUP_BY'   => 'u.user_id'
      ,'ORDER_BY'   => 'u.user_regdate DESC'




lefty wrote:i have never experienced that problems with emails signs like the german umlauts. do you read your emails in a webbrowser or a program that support UTF8? also, make sure your text files are saved as UTF8, no BOM.


Sorry
I am editing in Visual Studio and had autodetect on the encoding and it did not autodetect UTF8 :nonono:
Now when i force it to UTF8 it works.

/Mike
Leahcim
Newbie/Neuling
 
Posts: 8
Joined: Tue Feb 10, 2009 11:18 pm

Re: User Reminder

Postby lefty » Mon Mar 09, 2009 11:11 pm

Leahcim wrote:I solved it this way but i have not analysed the consequenses:
Code: Select all
//      'SELECT'   => 'u.*, s.*, MAX(s.session_time) AS session_time',
         'SELECT'   => 'u.*, s.*, s.session_time AS session_time',
         'FROM'      => array(
            USERS_TABLE   => 'u'
         ),
      
         'LEFT_JOIN'   => array(
            array(
               'FROM'   => array(SESSIONS_TABLE => 's'),
               'ON'   => 's.session_user_id = u.user_id'
            )
         ),
      
         'WHERE'      => $db->sql_in_set('u.user_id', $excl_user_id_ary, true) . '
                  AND ' . $db->sql_in_set('u.user_type', $excl_user_type_ary, true) . "
                  AND u.user_lastvisit = 0
                  AND user_regdate <= " . $time .
                  $sql_choice
      
         //,'GROUP_BY'   => 'u.user_id'
      ,'ORDER_BY'   => 'u.user_regdate DESC'


i have never used MSSQL so i am not much help here as i cannot try things out but have you tried this already?

Code: Select all
        $sql_array = array(
            
'SELECT'    => 'u.*, s.*, MAX(s.session_time) AS session_time',
        
            
'FROM'        => array(
                
USERS_TABLE    => 'u'
            
),
        
            
'LEFT_JOIN'    => array(
                array(
                    
'FROM'    => array(SESSIONS_TABLE => 's'),
                    
'ON'    => 's.session_user_id = u.user_id'
                
)
            ),
        
            
'WHERE'        => $db->sql_in_set('u.user_id'$excl_user_id_arytrue) . '
                        AND ' 
$db->sql_in_set('u.user_type'$excl_user_type_arytrue) . "
                        AND u.user_lastvisit = 0
                        AND u.user_regdate <= $time  
                        $sql_choice"
,
        
            
'GROUP_BY'    => 'u.user_id, u.user_type',
            
'ORDER_BY'    => 'u.user_regdate DESC'
        
);

 
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: User Reminder

Postby Leahcim » Tue Mar 10, 2009 12:05 am

In mssql you cant have a select * in a Group by question.

/Mike
Leahcim
Newbie/Neuling
 
Posts: 8
Joined: Tue Feb 10, 2009 11:18 pm

Re: User Reminder

Postby lefty » Tue Mar 10, 2009 9:53 pm

i see ... didnt know that.

so, did you change all the parts that are in that file (there are more occurrences where * is selected)?
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: User Reminder

Postby GSX550 » Tue Mar 17, 2009 10:34 am

wenn der User erinnert wird, welchen Text bekommt er zugeschickt und wo kann ich diesen Text ändern ?
GSX550
Newbie/Neuling
 
Posts: 1
Joined: Tue Mar 17, 2009 10:21 am
Location: Essen

Re: User Reminder

Postby lefty » Tue Mar 17, 2009 6:39 pm

GSX550 wrote:wenn der User erinnert wird, welchen Text bekommt er zugeschickt und wo kann ich diesen Text ändern ?
du kannst die texte in deiner language/de/email folder finden und aendern.
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: User Reminder

Postby Nooka » Thu Apr 02, 2009 11:26 am

Hi Lefty,

Just a question: in the emails sent by this mod, there is no subject, just a few words "No email subject specified".
Is it possible to add a subject, like "Reminder from xxxxxxx" ? :unfurlhelp:
Nooka
Newbie/Neuling
 
Posts: 1
Joined: Thu Apr 02, 2009 11:18 am
Location: France

Re: User Reminder

Postby lefty » Thu Apr 02, 2009 5:16 pm

there actually are titles.

Code: Select all
Subject: Reminder from "{SITENAME}"!
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: User Reminder

Postby lefty » Sat Apr 25, 2009 11:51 am

i am currently working on the new version of this mod:

here is a current status overview of the changes:
  • bugfix in adm/style/acp_user_reminder.html thanks to 00mohgta7
  • bugfix that would stop automatic emails sent after year change
  • adding admin logs when the reminder script is ran and who the emails are sent to
  • adding admin logs when the user is clearing their reminder
  • bugfix avoid clearing the second reminder when an inactive user signs back on if that user is also due a second reminder as a zero poster
  • adding options to log or not
  • adding an install/upgrade/uninstall file
  • adding some pagination in the ACP
  • moved updating of the users reminders out of the loop when reminders are sent 8-0
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: User Reminder

Postby shaunokeefe » Sun Jun 14, 2009 7:35 pm

Hi,

Having a few problems with the User Reminder mod....i've installed it (and done the fix on page 1)...

When i goto the ACP and click on the .MODS i see everything as it should do...

Problem is , the only buttons on the left hand side that work are Protected, 2nd reminder, not logged in.

If i click on inactive users or zero posters it thinks about it...then HTTP 500 error

Any idea's ?....also does this module log in the logging section ? as i tried to e-mail the not logged in...its saying its e-mailed them all but no logs.

Shaun Okeefe
Undernet Webmasters
simba@user-com.undernet.org
shaunokeefe
Newbie/Neuling
 
Posts: 6
Joined: Sun Jun 14, 2009 7:31 pm

Re: User Reminder

Postby lefty » Sun Jun 14, 2009 8:30 pm

Hi, I would recommend you install the latest version (1.0.5) in the development area.

It has bugfixes, new features and an install file that takes care of sql and module installation.

probably best to uninstall and reinstall since there are not that many edits (or use the upgrade description in the contrib folder of that mod).
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: User Reminder

Postby shaunokeefe » Sun Jun 14, 2009 8:41 pm

Thanks for that,

Problem is there is no uninstall, I could just install the new version? All the manual edits to the files would still be there..

Shaun Okeefe
shaunokeefe
Newbie/Neuling
 
Posts: 6
Joined: Sun Jun 14, 2009 7:31 pm

Re: User Reminder

Postby lefty » Sun Jun 14, 2009 8:46 pm

no, just use the backup you did before the mod.

the alternative is to use the upgrade instructions in the contrib folder of the 1.0.5 version.
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: User Reminder

Postby shaunokeefe » Sun Jun 14, 2009 10:18 pm

Done that and it works now ! Thanks allot

1 question, ive enabled the automatic reminders.....clicked enable but it hasnt started doing anything yet...how do i kick it into action to start the process?

Many thnaks,
Shaun
shaunokeefe
Newbie/Neuling
 
Posts: 6
Joined: Sun Jun 14, 2009 7:31 pm

Re: User Reminder

Postby lefty » Sun Jun 14, 2009 10:51 pm

you may not want to send automatic reminders straight away as it could be that a user would fall into two reminder categories and therefore getting two emails at the same time, e.g. zero poster and inactive.

reminders are sent once a day, the script is triggered by whoever hits the index page after midnight. (you will be able to see that in the admin log).
lefty aka The Heikze! :eyebrowe:

Heiko Carstens
http://www.lefty74.com

Would you like me to install one of my mods for you? Read here for details
lefty
Abschlussklasse R10c
 
Posts: 1357
Joined: Mon Feb 06, 2006 1:20 am
Location: Den Haag - NL

Re: User Reminder

Postby shaunokeefe » Sun Jun 14, 2009 10:56 pm

Excellent idea, ive put them all on manual apart from never logged in

many thanks,
Shaun
shaunokeefe
Newbie/Neuling
 
Posts: 6
Joined: Sun Jun 14, 2009 7:31 pm

PreviousNext

Return to [3.0.x] MOD Database Releases

Who is online

Users browsing this forum: No registered users and 1 guest

cron