Jump to content

Community

Daniel F

Invision Community Team
  • Posts

    4,934
  • Joined

  • Days Won

    19

 Content Type 

Profiles

Downloads

IPS4 Providers

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Forums

Store

Posts posted by Daniel F

  1. Correct:)
     

    We've actually located and fixed few bugs while looking at the above bug:)

    Quote

    - Fixed orphaned files being left over when deleting fields, records and databases in the AdminCP.
    - Fixed orphaned files being left over when deleting custom fields throughout the Suite.
    - Fixed orphaned files being left over in some cases when uninstalling applications.

     

  2. On 3/26/2021 at 4:43 PM, rllmukforum said:

    However, it's not terribly obvious how I go about making the message required before "Submit Report" will function. I've spent quite a bit of time reading the dev docs and searching this whole community for "required field" and other terms, to no avail.

    Almost all form fields are handled via Form Helpers so if you need to change any of these fields, you'll have to search for the method which creates the form, then you can create a hook to change the form fields!

    There are few methods where above approach won't work, in this case you can create a hook on \IPS\Helpers\Form\FormAbstract to override the constructor to adjust the field data 🙂 

  3. Yea, IPS\Dispatcher\Standard seems like a good spot!

    If you care about literally anything and if you want to log "everything" , you could even hook into IPS\Dispatcher! 

    I'm doing something similar with rollbar:

     

    //<?php
    
    /* To prevent PHP errors (extending class does not exist) revealing path */
    if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
    {
    	exit;
    }
    
    abstract class rollbar_hook_dispatcher_standard extends _HOOK_CLASS_
    {
    
    	public function init()
    	{
    		$this->initRollbar();
    		parent::init();
    	}
    
    
    	protected function initRollbar()
    	{
    		if ( \IPS\Settings::i()->rollbarapikey )
    		{
    			require_once \IPS\Application::getRootPath('rollbar')  . '/sources/vendor/autoload.php';
    			$config = array(
    				'access_token' => \IPS\Settings::i()->rollbarapikey,
    				'environment' => \IPS\Settings::i()->base_url,
    				'root' => \IPS\ROOT_PATH
    			);
    			\Rollbar\Rollbar::init($config);
    		}
    	}
    }

     

  4. 27 minutes ago, ReyDev said:

    the new version released and has an option to show the widget for specific user group.

    You should mention that people could notice performance issues because of this!
    As mentioned in one of the tickets, it's not that smart to disable the widget cache. It's probably working on smaller boards but literally going to kill any medium & big boards with many topics or other items which the widget is trying to show! 

  5. 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.

  6. 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 );
    	}
    }

     

  7. 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. 

  8. 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.

     

  9. There was a setting in vBulletin where you could define a time cutoff ( 30 days by default) and then it would just count the members which were online in these last X days and return them as active members.

    Quite useless statistic for the frontend IMO:) 

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy