Jump to content

DawPi

Clients
  • Posts

    8,448
  • Joined

  • Last visited

  • Days Won

    20

Reputation Activity

  1. Like
    DawPi reacted to Esther E. for an entry, IC5: Developer Center   
    As part of our commitment to encourage 3rd party development and extension, we have given our Developer Center a much needed makeover. A picture is worth a thousand words, but how about a video?
     
    Highlights
    The Developer Center now has its own dedicated tab in the ACP. What were previously tabs are now displayed on individual screens, making for a far less cluttered UI. You can easily switch from one application to another using the main menu or the button at the top right of the screen. We've implemented UI for some JSON files that previously had to be manually created; specifically acpsearch.json and furl.json We've replaced the "Support" button at the top of the ACP with a more helpful "Quick Links" dropdown menu. While this is not specific to developers, with easy access to things like the Task Manager and clearing caches, it's very handy for troubleshooting!  
    Application Landing Page
    When you open the Developer Center for a particular application, the landing page is designed to help you quickly access common functions, and to help you find any potential issues within your code.

     
    The Application Scanner currently checks for:
    Missing Admin CP Language Strings Missing Front-End Language Strings Missing EditorLocations extensions Missing FileStorage extensions Missing FrontNavigation extensions Missing FURLs Missing Email Templates  
    Language strings are grouped so that can you easily see where the missing strings were detected.

     
    We will continue to expand the scanners over the course of the next few months.
     
    Thoughts?
    What do you think? Are there any other useful features you'd like to see added to the Dev Center? What kind of scans can we implement on the landing page?
  2. Like
    DawPi reacted to Esther E. for an entry, IC5: Menus   
    Action and Moderation Menus can be one of the most tedious development tasks, while also being critical to user experience.
    For example, we may add support for pinning/unpinning content, then we need to remember to include the ability to pin/unpin that content in all the HTML templates. 3rd party developers add screens inside their applications, and then they need to add a link to the User Menu to make that accessible.
    With Invision Community 4, this would require a template hook targeting fairly complex classes and children that was susceptible to structural changes to templates between versions.
    In Invision Community 5, we have made significant changes to menu creation in order to streamline the process, and also to allow 3rd party developers better accessibility.
     
    New Helper Classes
    Menus are now built using helper classes, rather than relying on lengthy HTML templates. A menu is created by initializing a new Menu object.
    $menu = new Menu( 'AccountMenu' ); We can then add elements to the menu.
    $menu->addTitleField( 'menu_content' ); $menu->add( new Link( $member->url(), 'menu_profile', icon:'fa-solid fa-user' ) ); $menu->addSeparator(); $menu->add( new Link( Url::internal( "app=core&module=system&controller=markread", "front", "mark_site_as_read" )->csrf()->addRef( Request::i()->url() ), 'mark_site_read', dataAttributes: [ 'data-action' => 'markSiteRead', 'data-controller' => 'core.front.core.markRead' ], icon: 'fa-solid fa-eye' ) ); The most common menu element is the Link. This will generate the appropriate <li> element within the menu. You can define the URL, CSS class (default is ipsMenu_item), data attributes, icon, title, among other properties.
    Titles and Separators are added using the Menu::addTitleField() and Menu::addSeparator() methods respectively.
    You can also insert custom HTML into the menu using the Menu::addHtml() method.
    In your HTML template, you would then simply display the menu object as a string.
    {{if $menu->hasContent()}} {$menu|raw} {{endif}} The menu templates will include the link that opens the menu, as well as the menu itself.
    You'll notice that the above contains a call to the hasContent() method. This method will check if the menu object has any elements inside; if a user does not have permission to any of the elements, nothing will be displayed.
     
    Content Menus
    Almost all content items and comments (and reviews) require some kind of menu for moderation. Previously, this meant creating large chunks of redundant HTML code throughout the codebase. We've implemented \IPS\Content\Item::menu() and \IPS\Content\Comment::menu() to build these menus in a central location. The new methods include checks for whether a feature is in use and whether the user has permission to perform this action.
    Example:
    if( IPS::classUsesTrait( $this, 'IPS\Content\Pinnable' ) AND $this->canPin( $member ) ) { $links['pin'] = new ContentMenuLink( $this->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'pin' ) ), 'pin' ); } Now, the HTML template simply contains:
    {$entry->menu()|raw} (Note: Yes, these content menus can be extended using... you guessed it. UI Extensions.)
     
    Other Menus
    We have also migrated the following menus to the new structure:
    User Menu Mobile Menu Create Menu  
    Badges
    Another area with redundant HTML was our content badges. For example, pinned topics will display an icon on both the topic list and the topic header. We have created helper classes for badges and badge icons to centralize this logic. Within the new Item::badges() method, we build an array of icons that will be shown.
    if( IPS::classUsesTrait( $this, Featurable::class ) AND $this->isFeatured() ) { $return['featured'] = new Icon( Badge::BADGE_POSITIVE, 'fa-solid fa-star', Member::loggedIn()->language()->addToStack( 'featured' ) ); } The above generates a badge icon with the badge type ipsBadge--positive (constants have been declared for all common types, but any class can be used), the star icon, and the "featured" language string as the tooltip.
    In our template HTML, we now have
    <div class='ipsBadges'> {{foreach $entry->badges() as $badge}}{$badge|raw}{{endforeach}} </div>  
    UserMenu Extension
    Now that we've moved the menus into the codebase and out of the templates, we needed a way to allow 3rd party developers to insert their own menu items. We've introduced a new extension called UserMenu.
    The UserMenu extension contains the following methods:
    accountMenu
    This method allows you to add menu elements to the user menu. The method includes a parameter to allow you to add elements in one of 3 places within the menu: content, settings, or logout. mobileMenu
    Allows you to add elements to the mobile navigation menu. All elements are inserted before the "sign out" option. createMenu
    Replaces the CreateMenu extension, which has been deprecated. accountSettingsLinks
    Allows you to add links to the inner sidebar in the Account Settings overview tab (under the link for Notification Settings). Note: No, this does not add tabs to the Account Settings page, but fear not, that's coming. (Not in the UI Extension.)
    userNav
    This method will insert HTML in the user bar, to the left of the Create Menu. mobileNav
    Similar to the userNav method, but inserts HTML into the mobile navigation header.  
    What do you think of our changes to the Menus? Let us know in the comments below.
  3. Like
    DawPi reacted to Matt for an entry, Development update for October 2022   
    Welcome to our October developer's update!
    After a frantic few months of working on the PHP8 transition, we made it across the line with our November release (4.7.4), which requires PHP8 as the minimum version.
    Reminder: Invision Community 4.7.4 will disable plugins and applications that are not compatible with PHP8, and the only way to re-enable them is to upload a new version. Hopefully, you've had time to get your apps updated and through our review system. Thank you again for your patience throughout this process. The next big change will be PHP8.2, which changes how DateTime is overloaded, but that's a headache for 2023.
    Make sure you use PHP8 with your local development environments and set your IDE to PHP8 if it has this feature.

    If you need a refresher on the new functionality that comes with PHP8, then I recommend this blog or this video.
    Impacting Code Changes
    We've been very careful to avoid adjusting any parameter signatures this month, and we will endeavour to get you plenty of notice if we need to change things on a central method.
    The main change to look out for this month is the change to IPS\<app>\extensions\core\ContentRouter
    /** * @brief    Can be shown in similar content */ public $similarContent = TRUE; We added a public method variable to note if this content type can be used in the similar content widget. This change fixes a bug where some content types, like Commerce packages, appeared in the widget but with incompatible metadata.
    Holiday Release Schedule
    It's that time of year when we start planning releases around the Thanksgiving and Christmas holidays. We try and avoid larger releases at this point in the year to reduce the stress levels on our support and development teams. No one wants a crisis during what should be a relaxing time with family and friends.
    The current schedule looks like this:
    2 November: November release (4.7.4) First week of December: Smaller bug-fixing release (4.7.5) Early January: Patches or a very focused bug-fixing release (4.7.5.1/4.7.6) February: Full monthly releases as usual. Deprecations
    This month, we removed the older guest page caching. Those looking for a better replacement are having success with a free plan from Cloudflare.
    We also removed the Facebook promotion tool as Facebook keeps raising the bar for approval, and we want to focus on a Zapier replacement coming soon. Finally, we also removed Vigilink, which no longer works.
    Other News
    The November release features commits from @HeadStand, who is working with us part-time to chew through the backlog and work on feature improvements. She is a coding machine and has filled my inbox with GitHub pull request notifications which I'm very happy to receive!
    That's all for this month, happy developing!
  4. Like
    DawPi reacted to Matt Finger for an entry, Development update for August 2022   
    Welcome to our August (and June and July) developer's Update!
    We've had a busy summer so far, with our team working on the final touches to 4.7 which introduced range of new Cloud specific features. In our August release we also added a way to schedule topics.
    @Jordan Miller announced the new solutions improvements here, this will be included in our September release (4.7.2)
    PHP8 Compatibility Scanner
    We are excited to announce that as a platform we (finally) are starting the process of migrating from PHP7 to PHP8 in order to keep the software secure, modern, and performant.
    Since PHP8 includes some breaking changes from PHP7, we've built a Method Scanner that will iterate through third party apps and plugins to find fatal issues, disabling any such customizations on upgrade. The apps and plugins disabled in this manner will not be able to be re-enabled until they are updated with the fixes. Developers, please make sure that your resources are fully tested with PHP 8+ and the method signatures match.
    For developers, the main issue the scanner looks for is instances in which a method's signature is altered when extending a class; this can cause fatal errors that make even the AdminCP inaccessible. Violating code can be found both in your hooks as well as other PHP classes your app/plugin uses. See the PHP8 Incompatible Apps and Plugins in the AdminCP Support Page to see exactly the issues identified and how to resolve:

     
    Pre-Upgrade Resource Checker
    We're also introducing a new AdminCP upgrade step to check installed resources for whether compatibility updates are available for version they're upgrading to.

     
    Here is the full changelog for our upcoming September release.
    Core - Added ACP Tool to scan all hooks to identify PHP8 fatal errors related to method overloading. - Added AdminCP new search terms to guide admins to the new areas. - Added a pre-upgrade Marketplace compatibility check. - Fixed an issue where a large number of profile field options can break the page layout on the member stats overview page. - Fixed an issue where members following an item may not be following the remaining item after a merge. - Fixed an issue where word filters could cause an item to be held for approval even if the author had more than the required number of posts to bypass. - Fixed an issue with hCaptcha where an incorrect language override could be requested. - Fixed an issue where it was possible to create an alert with forced reply from a moderator/admin account with a disabled messenger. - Fixed an issue where editing the ACP => System => Postings page with disabled registrations would throw an exception while the submission. - Fixed an issue where some alerts were not shown if they had an end date. - Fixed an issue where post to Twitter could potentially result in an uncaught exception - Fixed an issue where the oauth configuration page was missing the required css files. - Fixed an issue where a report title may appear in trending content (does not expose any sensitive data). - Fixed an issue where removing a manually added badge would not remove the badge - Fixed an issue where the rank progression chart may not work when non-default ranks are used. - Fixed an issue where the achievements rebuild may fail. - Fixed an issue where content tags from content created by the RSS Import feature could be associated with a guest account. - Fixed an issue where alerts could not be dismissed if they had long titles. - Fixed an issue where search options may break on profiles when status updates were disabled. Pages - Fixed an issue where orphaned categories could break syncing from topics. - Fixed an issue when using the REST API to fetch records where fields may not have the image lazyload removed. Forums - Added multiple improvements to "Mark as solution" including a re-engagement email, new UI to prompt authors to mark a reply as the solution and new stats. - Fixed an issue where the default forum views may not be used for guests. - Fixed an issue where soft deleted items may be archived and then subsequently deleted leaving orphaned reports. - Fixed an issue where a malformed findComment link caused a 404 error instead of loading the topic from the start. Commerce - Fixed a typo on the invoice settings page. - Fixed an issue on the credits page - Fixed an issue where deleting a subscription package would leave some orphaned data in the database. Changes affecting third-party developers and designers - Fixed an issue where plugin index.html files may get included as CSS causing a browser rendering issue.  
  5. Like
    DawPi reacted to Matt for an entry, Development update for May 2022   
    Welcome to our May developer's update!
    May has been a bit of a whirlwind as we worked through the cloud platform feature set along, the backlog of existing issues reported to us and a new feature coming to all platforms.
    Along with the usual bug fixes in the backlog, we also worked on a few popular requests, such as adding hCaptcha as a new CAPTCHA option. We've seen this battle spam bots much more effectively than the existing methods, so if you're being hit by a lot of spam, consider upgrading to 4.7.0 and enabling hCaptcha.
    Jordan announced the new alerts feature here. It's a new way to reach out to members (or entire groups) and ensure they read and act on the alert. Many configuration options make it a very flexible feature useful for one-off alerts to a single member. It can also be used as a welcome message as part of your onboarding process.
    Invision Community 4.7.0 (also known as the June release) will have tentative support for PHP 8.1. While we have tested the core apps extensively, you should check with any third party developers to ensure their apps are PHP 8 ready. We intend to move to PHP 8.0 as the minimum version later this year (and our dev team is excited about this, they can't wait to use mixed return types, which is as exciting as it gets for us most days).
    Here is the full change log for the June release.
    Core - Added alerts functionality. - Added hCaptcha support. - Added a setting to exclude groups from search logs. - Added support for PHP 8.1. - Increased minimum PHP version to 7.4 and recommended version to 8.0. - Added a solved/unsolved filter for activity streams. - Changed Marketplace search to 'AND' mode for more accurate results. - Changed 'member download' to output comma-separated values instead of tab-separated values to be consistent with member import. - Changed the poll behaviour to allow everybody to view the poll result of closed polls. - Improved the email editor to show the full email name while editing it. - Updated CKEditor to 4.19.0. - Moved the stream subscription links to an own menu item. - Fixed an issue that may prevent attaching audio files to content. - Fixed a minor typo in the forms.css template. - Fixed upload area not showing on minimized editors for guest users. - Fixed an issue where post counts were incremented even when a new item was held for approval via the profanity filters. - Fixed an issue where filters and sort options do not persist between deleting members in the Admin CP. - Fixed an issue where sitemap may show entries from offline applications. - Fixed an issue where support account may show as the latest registered member. - Fixed an issue where the upgrade process would fail to finish because of duplicate DB queries. - Fixed an issue where the default streams had a broken time period. - Fixed an issue where widgets may not be available even with enabled apps. - Fixed an issue where status updates where appearing as search results even if the user had no permissions to view profiles. - Fixed some issues with the online status indicator in account settings. - Fixed an issue with deleting bulletins when deleted remotely. - Fixed an issue where clicking on the reorder-menu link in clubs can add multiple reorder icons. - Fixed an issue where managing Widgets via the AdminCP > Applications > Dev Center meant that Yes/No toggles could fail to work. - Fixed an issue where the block submission filter failed to catch loose matches when in the middle of a word and/or using non latin characters. - Fixed an incorrect link on a modal popup when trying to follow a member when the member hasn't configured their preferences. - Fixed an issue fetching Clubs via the REST API when they have custom fields. - Fixed an issue when viewing a list of awarded badges if one was earned by a rule in a deleted application. - Fixed a missing `</ul>` in the poll template. - Fixed an issue where the 'approved content' notification (and any newly added notifications) might not have valid default options until edited via AdminCP. - Fixed missing padding on the AdminCP file locations modal. - Fixed some UX issues when revoking an OAuth access token. - Fixed an issue where non-image attachments inserted via the editor may not download. - Fixed a missing language string in member history when spam defense system applies moderation to a new member. - Fixed an issue with 'solved' push notifications linking to a non-existent page. - Fixed an issue with the Zapier Extension when PHP was running in CGI mode. - Fixed an issue where rank progress would still show in profiles when no ranks exist. - Fixed an issue using the ban filters in member group promotion rules. - The Editor Preview Button was removed from ACP Editors. - Removed the deprecated FX Country code from the Geolocation class. - Removed the ability to rebuild existing attachment thumbnails due to an incompatibility with content attributes required for lazy-loading. - Removed the SQL Toolbox. Forums - Improved the fluid-mode per forum filters to remove a page reload, and to reverse the filter checkbox status to make it clear which are being viewed. - Fixed an issue where checking an archived topic for new replies when you ignore other members may always show a 'new' post has been created. - Fixed an issue where top posters in the topic statistics section may show in the wrong order. Gallery - Fixed an issue with the followed Gallery Images page. - Fixed an issue with rebuilding thumbnails on legacy communities where the original image may no longer exist. Pages - Added the missing `__indefart_cms_page` language string. - Added copy buttons on the modal that displays the HTML to copy to embed blocks elsewhere. - Improved search indexing speed of comments when Elastic Search is used. - Fixed an issue where sorting by a numerical field could duplicate the option with an incorrect label. - Fixed issue with 'image upload' block carousels not working in the sidebar - Fixed an issue where custom Yes/No fields when used as a database filter were ignored when further sorting. - Fixed an issue where categories could have broken breadcrumbs. - Fixed an issue where entering a blank value for a required decimal field would save the value as 0. - Fixed an issue where using a Yes/No field as a database filter may cause the custom sort form display to not allow toggling of the Yes/No field. - Fixed an issue that allowed duplicate template group names in some circumstances. - Fixed an issue where who's online widget blocks would throw an error while creating or editing them in the ACP. Converters - Fixed an issue rebuilding some profile photo images. - Fixed an issue where vBulletin `[video]` tags would not be parsed if the video ID contained a hyphen. Commerce - Added ability to require an active subscription to use community. - Added support for Stripe - Apple Pay Domain Verification Files on Cloud. - Improved Subscriptions including up/downgrading to other subscriptions and offering limited free subscriptions. - Improved performance when updating a large number of existing purchases. - Removed deprecated Amex Express checkout options. - Fixed some issues that can occur when requiring a subscription or product to be purchased during registration. - Fixed an issue where a card would not be auto-billed if the customer did not have an address. - Fixed a niche issue where a renewal invoice (for manual payment) would not be generated if a PayPal Subscription was cancelled on an active purchase. - Fixed an issue where account credit would not be used for an invoice if the credit remaining was the exact value of the invoice. - Fixed an issue calculating the next renewal date when upgrading between Subscriptions that may use a different renewal period (i.e. monthly vs annually). Calendar - Fixed an issue where the day view wouldn't show todays events when it's being used as the default calendar view. Downloads - Fixed an issue where change logs may show the wrong published date if the file description had been edited since the last update. - Fixed an issue where creating a downloads category with the "Keep previous versions?" Setting being disabled would result in a DB error. Platform - Added real time and historic trending data in sidebar blocks and leaderboard. REST, Webhooks and Zapier - Fixed an issue where the 'hidden' content item filter would be ignored for any content type except topics. - Fixed an issue where the date parameter for the 'Edit a topic' endpoint was not updating topic/post post date. Key points for developers are as follows:
    Added PHP 8.1 support; however, we have silenced deprecation errors for core applications and system directory as we work through those in the following releases. Updated Whoops to 2.14.5 Fixed an issue where managing MFA in the Account Settings would result in an IN_DEV CSRF key warning. Fixed an issue where you could not pass variables to the {hextorgb} theme plugin. Fixed an issue where creating or editing a forum with IN_DEV being enabled would return an error. Fixed an issue with ips.ui.infiniteScroll.js when using FURLs. Fixed a syntax error in the core unsubscribeStream.txt email template. Member filters will only be processed/visible for group promotions if they have a matches() method. That's it for now; see you on the forums!
  6. Like
    DawPi reacted to Matt for an entry, Development update for April 2022   
    Welcome to our April developer's update!
    This month has seen the developers work on a variety of features coming to our cloud platform, some of which we've been testing here, which include real-time updates on what members are viewing and when they are typing replies and an image scanner which not only identifies what is in the image, it also tags it for search results. Furthermore it can also hold images for moderation if they contain nudity, etc. We've got more to come and will announce them as they are finished.
    The cloud platform features leverage multiple technologies such as node, JWT security, and AWS specific functionality, enabling us to build pretty impressive new features quickly. As we expect more sophistication and algorithmic crunching from our web apps, we're starting to break out of the PHP and MySQL limitations to deliver forward-thinking features.
    Of course, we have plenty of new features coming to all platforms, including the self-hosting version; I can talk about a few changes we've made but let's start with some housekeeping.
    There will not be a full release for May, although we will be releasing several betas throughout the month. We are taking this time to finalise a few bigger changes to our codebase.
    For those running their own servers, we are updating the minimum PHP requirement to 7.4 and the recommended version to 8.0. If you're not sure which version you currently use, now is a good time to check!
    We are working on PHP 8.1 compatibility still and are aiming to have that finished for June's release.
    The list of fixes already in the June release is as follows:
    Core - Fixed an issue that may prevent attaching audio files to content. - Fixed a minor typo in the forms.css template. - Fixed upload area not showing on minimised editors for guest users. - Fixed an issue where post counts were incremented even when a new item was held for approval via the profanity filters. - Fixed an issue where filters and sort options do not persist between deleting members in the Admin CP. - Fixed an issue where sitemap may show entries from offline applications. - Fixed an issue where support account may show as the latest registered member. - The Editor Preview Button was removed from ACP Editors. - Removed the deprecated FX Country code from the Geolocation class. - Removed the ability to rebuild existing attachment thumbnails due to an incompatibility with content attributes required for lazy-loading. Gallery - Fixed an issue with the followed Gallery Images page. - Fixed an issue with rebuilding thumbnails on legacy communities where the original image may no longer exist. Pages - Added the missing `__indefart_cms_page` language string. - Fixed an issue where sorting by a numerical field could duplicate the option with an incorrect label. - Fixed issue with 'image upload' block carousels not working in the sidebar - Fixed an issue where custom Yes/No fields, when used as a database filter, were ignored when further sorting. Converters - Fixed an issue rebuilding some profile photo images. Commerce - Improved performance when updating a large number of existing purchases. - Removed deprecated Amex Express checkout options. - Fixed a niche issue where a renewal invoice (for manual payment) would not be generated if a PayPal Subscription was cancelled on an active purchase. Calendar - Fixed an issue where the day view wouldn't show today's events when it's being used as the default calendar view. A few items still being finished before being sent for peer review include tweaks to search logging. Andy added the ability to specify which groups to log anonymous search sessions. We got some feedback that bot searches were polluting the results, making it hard to discern search trends from members over time. As we anonymise the search data, we can't pick out specific member groups once it's been written. Andy also moved the search logs to their own page to reduce confusion over what the data represents.
    Andy has also been working on some activity stream improvements to bring a "Solved/Unsolved" filter option to allow you and your members to find unsolved (or indeed solved) topics quickly. This will require a search index rebuild after upgrading.
    You may also find a few new hook points added, which are in the following locations:
    \IPS\Helpers\Form\Upload::populateTempData()
    This is called from within processUploads and allows you to modify the data before it is saved into core_files_temp.
    \IPS\applications\forums\modules\front\forums\topic::finishManage()
    This is called during manage() and allows you to modify the $topic before it is returned to \IPS\Content\Controller. If you have to overload manage() in your apps, you may find this a better hook point.
    \IPS\Content\Search\Index\indexData now allows $content modification before it is stored via an extension in /applications/{app}/extensions/core/SearchIndex
    That's it for this month!
×
×
  • Create New...