1021
schneider
Re: The Protector module is blocking my IP address.
  • 2021/1/26 18:35

  • schneider

  • Just popping in

  • Posts: 2

  • Since: 2021/1/26


Goffy, my installed Xoops is older than version 2.5.9, it doesn't exist inside the xoops_data folder to the "badips" file.
I'm very new to xoops, I don't know how to get to the database table to do the "isactive" modification of the protector from 1 to 0.



1022
BigKev73
2.5.10+ Getting new PM to send Notification Email
  • 2021/1/26 16:57

  • BigKev73

  • Just popping in

  • Posts: 13

  • Since: 2021/1/26


I was running an old 2.2.4RC2 website and recently converted over to XOOPS 2.5.11-Beta1

I've had to weave back in all my prior hacks/mods to restore some of the functionality I had before. One of those was getting a notification when a new PM was sent. I couldn't figure out why this wasn't working. Then looking at the code in pmlite.php I noticed this TODO comment at around line 86:


// @todo: Send notification email if user has selected this in the profile




So I made two changes to enabled this functionality again.

1) Change the above to read:

// Added by BigKev73 to enabled email on new PM
            
$sUser $member_handler->getUser(XoopsRequest::getInt('to_userid'0'POST'));
            
$rez=  $pm_handler->sendPMEmail($pm$sUser);


2) At this code into ..modules/pm/class/message.php after the sendEmail function (around line 191):

//added by BigKev73 to renable sending a email when a new PM is created
public function sendPMEmail(PmMessage $pmXoopsUser $user)
    {
        global 
$xoopsConfig;

        if (
is_object($user)) {
           
        
$from = new XoopsUser($pm->getVar('from_userid'));
        
$to   = new XoopsUser($pm->getVar('to_userid'));
            
$msg 'You received a new Private Message from ' $from->getVar('name');
            
$msg .= "nn";
            
$msg .= "Sent: " formatTimestamp($pm->getVar('msg_time'));
             
$msg .= "n";
            
$msg .= "n Subject: " $pm->getVar('subject') . "n";
            
$msg .= "n Message: " strip_tags(str_replace(array('

''

'
'
'
'
'
), "n"$pm->getVar('msg_text'))) . "nn";
            
$msg .= "--------------n";
            
$msg .= $xoopsConfig['sitename'] . ': ' XOOPS_URL "n";
    
            
$xoopsMailer xoops_getMailer();
            
$xoopsMailer->useMail();
            
$xoopsMailer->setToEmails($user->getVar('email'));
            
$xoopsMailer->setFromEmail($xoopsConfig['from']);
            
$xoopsMailer->setFromName($xoopsConfig['fromname']);
            
$xoopsMailer->setSubject(sprintf("You received a Private Message on " $xoopsConfig['sitename']));
            
$xoopsMailer->setBody($msg);
    
            return 
$xoopsMailer->send();
        }else {
            return 
null;
        }
    }


A couple of notes:

1) You can obviously use variable tokens instead of the literal message strings I am using
2) I am using users 'name' on my website instead of uname. So change the
$msg 'You received a new Private Message from ' $from->getVar('name');
to
$msg 'You received a new Private Message from ' $from->getVar('uname'); if you want the default.

3) I'm also using a specific noreply@sitename.com email address vs the normal admin email when sending things out. So if you want to change the email, then change the following lines:

$xoopsMailer->setFromEmail($xoopsConfig['from']);
 
$xoopsMailer->setFromName($xoopsConfig['fromname']);

to
$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
        
$xoopsMailer->setFromName($xoopsConfig['sitename']);


4) This is basically a modified version of the sendEmail function, that is taylored with a more tailored message. This could be wired up to a template as needed.

Hope this helps!

-BigKev



1023
goffy
Re: The Protector module is blocking my IP address.
  • 2021/1/26 16:55

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


hi
please check also \xoops_data\protector\ and delete file badips....

if still not working, quick and dirty: go into database table modules and change value "isactive" from Protector from 1 to 0



1024
schneider
Re: The Protector module is blocking my IP address.
  • 2021/1/26 16:14

  • schneider

  • Just popping in

  • Posts: 2

  • Since: 2021/1/26


Good afternoon, I did the whole procedure, I cleared the browser cache. I updated the browser and still the message still appears: "You are registered as BAD_IP by the Protector. This restriction will expire on 1/18/2038 9:14:07 PM"
You sent Today at 12:55
I deleted the "badips" file in "xoops_lib / modules / protector / configs".
Does anyone know another way to solve this problem?



1025
Mamba
xSitemap 1.55 Beta-4 (XOOPS 2.5.11, PHP 7.2+ & PHP8)
  • 2021/1/14 4:34

  • Mamba

  • Moderator

  • Posts: 11373

  • Since: 2004/4/23


xSitemap 1.55 Beta 4 is released: https://github.com/XoopsModules25x/xsitemap/releases/

It fixes bug with reading the XML file, reported by AxelF
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



1026
Mamba
Re: site map
  • 2021/1/14 4:27

  • Mamba

  • Moderator

  • Posts: 11373

  • Since: 2004/4/23


Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



1027
Dante7237
Re: A big surprise for 2020
  • 2021/1/14 1:32

  • Dante7237

  • Friend of XOOPS

  • Posts: 294

  • Since: 2008/5/28


That's some very nice work....



1028
Mamba
xSitemap 1.55 Beta-1 (XOOPS 2.5.11, PHP 7.2+ & PHP8)
  • 2021/1/13 8:14

  • Mamba

  • Moderator

  • Posts: 11373

  • Since: 2004/4/23


Resized Image

xSitemap 1.55 Beta-1 is released for testing

This module has been updated for the upcoming XOOPS 2.5.11 and PHP 8

DOWNLOAD: https://github.com/XoopsModules25x/xsitemap/releases

FORK: https://github.com/XoopsModules25x/xsitemap
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



1029
Mamba
Re: Publisher 1.08 Alpha 4 Released for Testing
  • 2021/1/13 2:44

  • Mamba

  • Moderator

  • Posts: 11373

  • Since: 2004/4/23


Publisher 1.08 Alpha 4 Released for Testing

new: you can now select voting type in the article form edit

https://github.com/XoopsModules25x/publisher/releases
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



1030
alain01
Re: (More ?) Useful Tags in User Message Manager
  • 2021/1/11 14:36

  • alain01

  • Just can't stay away

  • Posts: 530

  • Since: 2003/6/20


Done !

Issue : Missed "{X_NAME}" in the User message manager #919
and Pull Request merged

Now, we could use
{X_UNAME} (login)
and a new variable, {X_NAME} (real name)

and we could use the real name, even it's empty :

{X_NAMEwill print name or uname if empty


Thank you Mage!




TopTop
« 1 ... 100 101 102 (103) 104 105 106 ... 29425 »



Login

Who's Online

414 user(s) are online (304 user(s) are browsing Support Forums)


Members: 0


Guests: 414


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits