Jump to content

Daniel F

Invision Community Team
  • Posts

    6,563
  • Joined

  • Days Won

    37

 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 Daniel F

  1. 43 minutes ago, CoffeeCake said:

    You may want to run them as a cronjob instead to make sure that they run every minute.

    Which sounds still suspicious because the test email wouldn't use any cron jobs ( mentioning it because of following OP sentence: ) 

    On 12/29/2020 at 8:43 AM, livegames.co.il said:

    I tried to send a test mail from the Email setting, and indeed I got the test mail a few hours after I send it.

     

  2. 3 minutes ago, Sonya* said:

    You can do it if you have Pages. Just create a database, that is only visible to moderators. Create your posts in a database as articles, connect the database to a forum, where the posts should be post and set the future publish date. No extra feature is needed to accomplish it. Unless you do not have Pages.

     

    That's a brilliant work around.

  3. Why would you want to get a friendly url for 

    http://ips.valacoding.com/index.php?app=core&module=system&controller=widgets&do=getBlock&blockID=app_nexus_latestProducts_tfxsn9iaq&pageApp=nexus&pageModule=store&pageController=product&pageArea=header&orientation=horizontal..... 

    ? The page is meant to be shown in a modal and only to moderators with permissions to edit the sidebar, there's no point in having a friendly url here.

  4. 14 minutes ago, Ilya Hoilik said:

    P.S. I really hate \IPS\Member::loggedIn()->language()->addToStack(). Wanna a shortcode like \IPS\Lang::getString() 🙂

    You could use live templates or snippets to automate this;) I have probably 50 snippets making my life easier:)

    https://www.jetbrains.com/help/pycharm/tutorial-creating-and-applying-live-templates-code-snippets.html

    Or, if it's only for your own usage, create some helper functions

    if(!function_exists('l'))
    {
    	function l()
    	{
    		$args = \func_get_args();
    		return \IPS\Member::loggedIn()->language()->addToStack(  ...$args );
    	}
    }
    
    if(!function_exists('lg'))
    {
    	function lg($key)
    	{
    		return \IPS\Member::loggedIn()->language()->get(  $key );
    	}
    }

     

  5. 4 minutes ago, CoffeeCake said:

    I thought this was the number of e-mails sent in each call to the email handler, and not for the logic that I thought @bfarber was referring to which suggests if there's less than 50 followers, the e-mails are sent immediately; otherwise the e-mails are queued.

    Half paying attention in meetings with no access to source code at the moment, but weird choice if the constant applies to both those scenarios.

    Sorry, it was the wrong constant! I have edited my post in the meanwhile.

    It's NOTIFICATIONS_PER_BATCH which handles this.

     

    Sorry again for the confusion. 

  6. 29 minutes ago, CoffeeCake said:

    Is this 50 number configurable? I like the idea of queuing all e-mails as an option. I think sendgrid sometimes introduces a bit of lag.

    Yes, this is handled via the NOTIFICATIONS_PER_BATCH constant.

     

×
×
  • Create New...