Jump to content

Daniel F

Invision Community Team
  • Posts

    6,568
  • 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. IPS 4.6.8 is going to remove following extensions:

    • core/extensions/core/Sitemap/Applications.php
    • core/extensions/core/Sitemap/Profiles.php

    So if your 3rd party applications or plugins hook into any of these files, please be warned.

     

    Everything else 3rd Party related from our changelog:

    Quote

    - Fixed an issue where it was not possible to create new default database inserts in the developer center.
    - Fixed an issue where adding a hook to the topic sidebar would shift the sidebar to underneath the topic.
    - Fixed an issue where adding a hook can cause CSS selectors with a colon (eg: ipsFlex:4) to be broken (eg: ipsFlex---cln---4)
    - The ACP Member Profile Template will remove the left column if there are no blocks to show.
    - The GroupForm extension can now have a new method `canDelete()` which can be used to set specific groups not deletable (e.g. if it is used for target after a purchase).

    I'm really excited about the last point.
    Now you're be able to set a member group as not deletable, to prevent that a group which is used for member promotions, or which is literally essential for your 3rd party code can be deleted by the admin.

    	/**
    	 * Can this group be deleted?
    	 *
    	 * @param	\IPS\Member\Group	$group	The group
    	 * @return	void
    	 */
    	public function canDelete( $group ) : bool
    	{
    		return TRUE;
    	}

     

    Just a short update after a while:)

  2. You could either take a look at the core_members database table or the system/Member/Member.php class to see all the available fields.

     

    The lazy way would be probably Member::logged()->apiOutput() , which would return an array with following data:

    	
    	/**
    	 * Get output for API
    	 *
    	 * @param	\IPS\Member|NULL	$authorizedMember	The member making the API request or NULL for API Key / client_credentials
    	 * @param	array|NULL			$otherFields		Array of additional fields to return (raw values)
    	 * @return	array
    	 * @apiresponse			int											id						ID number
    	 * @apiresponse			string										name					Username
    	 * @apiresponse			string										title					Member title
    	 * @clientapiresponse	string										timezone				Member timezone
    	 * @apiresponse			string										formattedName			Username with group formatting
    	 * @apiresponse			string										ipAddress				IP address used during registration
    	 * @apiresponse			\IPS\Member\Group							primaryGroup			Primary group
    	 * @clientapiresponse	[\IPS\Member\Group]							secondaryGroups			Secondary groups
    	 * @clientapiresponse	string										email					Email address
    	 * @apiresponse			datetime									joined					Registration date
    	 * @clientapiresponse	string										registrationIpAddress	IP address when registered
    	 * @clientapiresponse	int											warningPoints			Number of active warning points
    	 * @apiresponse			int											reputationPoints		Number of reputation points
    	 * @apiresponse			string										photoUrl				URL to photo (which will be the site's default if they haven't set one)
    	 * @apiresponse			bool										photoUrlIsDefault		Indicates if the value of photoUrl is the site's default
    	 * @apiresponse			string										coverPhotoUrl			URL to profile cover photo (will be blank if there isn't one)
    	 * @apiresponse			string|null									profileUrl				URL to profile
    	 * @clientapiresponse	bool										validating				Whether or not the validating flag is set on the member account
    	 * @apiresponse			int											posts					Number of content item submissions member has made
    	 * @apiresponse			datetime|null								lastActivity			Last activity date on the site.
    	 * @clientapiresponse	datetime|null								lastVisit				Last distinct visit date on the site.
    	 * @clientapiresponse	datetime|null								lastPost				Latest content submission date.
    	 * @apiresponse			int											profileViews			Number of times member's profile has been viewed
    	 * @apiresponse			string										birthday				Member birthday in MM/DD/YYYY format (or MM/DD format if no year has been supplied).
    	 * @apiresponse			[\IPS\core\ProfileFields\Api\FieldGroup]	customFields			Custom profile fields. For requests using an OAuth Access Token for a particular member, only fields the authorized user can view will be included
    	 * @apiresponse			[\IPS\core\Achievements\Rank]					rank					Rank
    	 * @apiresponse			int											achievements_points		Points
    	 */

     

  3. Set the type to "Other/Manual" and then use following code:

    <?php
    
    $options = ['fa-angle-up' => '<i class="fa fa-angle-up"></i>', 'fa-chevron-up' => '<i class="fa fa-chevron-up"></i>', 'fa-window-close' => '<i class="fa fa-window-close"></i>'];
    
    
    
    return new \IPS\Helpers\Form\Radio("core_theme_setting_title_{$row['sc_id']}", $value, FALSE, array(
        'options' => $options,
        'parse' => "raw"
        ), NULL, NULL, NULL, 'theme_setting_' . $row['sc_key']);

    Result:

    Bildschirmfoto 2021-10-18 um 19.44.28.png

     

    You could also use the IPS\Helpers\Form\Custom form field type which allows you to literally customize the whole output...

     

     

  4. I can confirm that the issue is in your code inside the newtopicplaceholders_hook_newtopicplaceholderforms hook.

       $placeholder = $container->getNewTopicPlaceholderSettings();

    You're assuming that $container is set, but there are many cases where $container will be null, which is also indicated by the default values from the method declaration

    public static function formElements( $item=NULL, \IPS\Node\Model $container=NULL )

     

  5. This application isn't handling the category deletion correct because it's leaving the mapped club data in the database, which results in following error:

     

    Class 'IPS\cms\Categories12' not found
    #0 /system/Member/Club/Club.php(1882): IPS\Member\_Club->nodes()
    #1 /system/Member/Club/Club.php(2020): IPS\Member\_Club->tabs()
    #2 /applications/core/modules/front/clubs/view.php(130): IPS\Member\_Club->firstTab()
    #3 /system/Dispatcher/Controller.php(101): IPS\core\modules\front\clubs\_view->manage()
    #4 /applications/core/modules/front/clubs/view.php(120): IPS\Dispatcher\_Controller->execute()
    #5 /system/Dispatcher/Dispatcher.php(153): IPS\core\modules\front\clubs\_view->execute()
    #6 /index.php(13): IPS\_Dispatcher->run()
    #7 {main}

     

  6. 6 minutes ago, IPCommerceFan said:

    I wonder if it'd be worthwhile to include a check before running the upgrader, to make sure the suite isn't in dev mode?  If it is, don't allow the upgrade and instruct how to turn off dev mode?

    OR, what if dev tools were ready prior to the official release, and clicking "Upgrade" upgraded both the suite AND the dev tools seamlessly (only if the dev tools are present already)?

    Just ideas!

    You won’t be able to run the upgrader with IN_DEV mode 🙂 

×
×
  • Create New...