Jump to content

Square Wheels

Members
  • Posts

    2,517
  • Joined

  • Last visited

  • Days Won

    5

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Posts posted by Square Wheels

  1. 5 minutes ago, stoo2000 said:

    If you wanted to, you could still combine/integrate this with Mail Bouncer.

    You could do something like this...

    
    <?php
    
    ... your code...
    
    include '/ips4path/init.php';
    \IPS\Dispatcher\External::i();
    
    $bounce = 'hard';
    $email = 'exampleemail@gmail.com';
    
    $member = \IPS\Member::load( $email, 'email' );
    
    /* Check it's a real account */
    if( $member->member_id )
    {
        if( $bounce == 'hard' )
        {
        	$member->bouncerHardBounce( time() );  //or use the time from the bounce itself
        }
        elseif ( $bounce == 'soft' )
        {
        	$member->bouncerSoftBounce( time() );  //or use the time from the bounce itself
        }
    	elseif( $bounce == 'spam' )
        {
            $member->bouncerSpam( time() );  //or use the time from the bounce itself
        }
    }

    Alternatively, if you're processing a lot of bounces at the same time (i.e. a periodic sweep of a mailbox) you can queue the bounces instead and let the app process them in the background.

    
    <?php
    
    .... your code
    
    include '/ips4path/init.php';
    \IPS\Dispatcher\External::i();
    
    foreach( $bounces as $bounce )
    {
        /* Create Bounce */
        $bounce = new \IPS\bouncer\Bounce;
        $bounce->email = $event['email'];
        $bounce->classification = $bounce['type']; // 'hard', 'soft', 'spam'
        $bounce->reason = $bounce['reason'];
        $bounce->timestamp = $bounce['timestamp'];
        $bounce->save();
    }
    
    /* Queue the process */
    \IPS\Task::queue( 'bouncer', 'ProcessBounces', array( 'class' => 'placeholder' ), 5, array('class') );

     

    Let's say I have no php skills, would you be able to create a tool that could move all bounced emails to a new group and remove all of their email notifications?

    That would be beyond amazing.

    I am using SMTP from my own server.  I currently have over 500 bounced emails I am processing one at a time.  I go to their preferences, uncheck all of the email notifications, then move them to a bounced member account.  It's a bit of a pain.

  2. I'd love a solution for this too.  I have a site that is 16+ years old, I get a lot of bounces.

    Sadly I got to the notifications of each of them and turn off all of their notifications.  Then I move them to a group called Bounced Member, this displays a large red banner asking them to update their email and let me know.

    It's a huge amount of work and a colossal waste of time.  I do it in hopes not to get black listed.

  3. Johns Hopkins makes the COVID-19 map available as an iframe embed.  I tried on my site as I allow admins to post HTML.  I was not able to post it.  Is there anything special I need to do to allow it?

    Is there a way to allow others to post embeds that are iframes?  Would you allow it?

    Here is the code:

    <iframe width=\"650\" height=\"400\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" title=\"2019-nCoV\" src=\"//arcgis.com/apps/Embed/index.html?webmap=14aa9e5660cf42b5b4b546dec6ceec7c&extent=77.3846,11.535,163.5174,52.8632&zoom=true&previewImage=false&scale=true&disable_scroll=true&theme=light\"></iframe>

    Taken from here: https://coronavirus.jhu.edu/map-faq

  4. On 2/13/2020 at 1:26 PM, Fosters said:

    You seem to be a nice & fair guy:)
    I've sent you a PM with the application. Feel free to install it and to test it on your own board. If you're not happy with it, just uninstall it, if you're happy with it, please purchase it from the marketplace:)

    Thank you.  My site is in the process of being moved to another host today.  I'll try it out today or tomorrow and if I like it, which I suspect I will, I'll happily purchase it.

  5. 9 hours ago, Lindy said:

    You know you can use WHERE clauses in queries? 

    I'm just kidding. Too soon?

    You're off my Holiday Card list.

    2 hours ago, Mark said:

    And you definitely want to prevent sending out hidden posts, posts in any forums normal users can't see, etc.

    If you're using PHP, you can use the \IPS\forums\Topic\Post::getItemsWithPermission() function. Alternatively, use the REST API setting "hidden" to 0 and "forums" to the ones you want to include.

    I am using Coldfusion and querying certain forums.  I retrieved the title, author, and the first 200 characters and sent that as an email newsletter (outside of IPS).  A couple of people told me about the problem and it drove me cukoo for an hour or so trying to find how these porn posts were getting imported since I could not click the link and find them.

    Anyhow, problem fixed.  I just wish it were off by default.

×
×
  • Create New...