Jump to content

teraßyte

Clients
  • Posts

    33,393
  • Joined

  • Days Won

    47

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Everything posted by teraßyte

  1. Ops, sorry guys. I've had the update ready since last week but I completely forgot to release it... 😅 The file is currently pending approval from IPS. Also, considering everything I added, the new version is 1.1.0. Here's the changelog: I also looked into group promotions, but the only option available is to add filters based on which members are promoted. There is no way to execute extra actions with the current extension provided by the IPS framework. For now I made a request in the developer forum to include more options in the extension:
  2. That means the forum can't connect to the mysql database. Possible causes: The user is wrong. The password is wrong. The user doesn't have the needed permissions for the database. For #1 and #2 you can edit the conf_global.php file. For #3 you need to check your server, something like Cpanel, DirectAdmin, or whatever else you use.
  3. The file is not marked as compatible with 4.7 in the marketplace (only 4.5 & 4.6) so it won't show up in Admin CPs running 4.7.
  4. Have you tried deleting the Db.php file before reuploading/overwriting it? It happened to me once that a file was somehow "stuck" and it wouldn't work no matter how many times I tried replacing it. In the end deleting the file first before reuploading it fixed the issue for me in that case. No idea if it will work for you, but it's worth a shot.
  5. Until IPS changes how Q&A forums work you can use this plugin in case ordering by votes is not required:
  6. You'll also need to upgrade PHP at least to 7.4 before upgrading the forum to the latest version. PHP 8 would be even better. You can ask your hosting about that, unless you manage also the server yourself.
  7. Your core_sessions table crashed, most likely caused by the server outage you mentioned: You can repair the table from phpMyAdmin or a similar tool. If you are unsure on how to do it it's probably best if you ask your hosting for assistance instead.
  8. Based on the error you have a custom Nexus gateway that is not updated for the latest version and the PHP upgrade is now making it throw a fatal error. The NmiCom gateway applications/nexus/sources/Gateway/NmiCom/NmiCom.php isn't a default one provided by IPS.
  9. Are they all using the same browser? It could also be a browser update causing issue.
  10. There's shouldn't be any need of editing the core files themselves, rather it would be more troublesome as you'd have to redo the edits with every upgrade. You should be able to accomplish everything with applications or plugins. Nathan already provided a link to the Developer Mode guide above, but in case you have trouble figuring it out yourself there's also the option of hiring someone who already knows the framework. A list of available developers for hire can be found here: https://invisioncommunity.com/third-party/providers/ (I'm on it, too 😉)
  11. I've seen this error a lot with ImageMagick lately. It seems a recent version has broken (?) the code that handles GIF images. You can either ask your hosting to go back to a previous ImageMagick or switch the image setting in ACP to GD instead.
  12. There's no built-in option for this, but it should be easy enough to edit the template and remove/disable the button for guests or replace it with a message in case. Or, as I usually suggest, it's better making a quick plugin that takes care of it so you don't edit the template (which properly keeps auto-updating with new versions).
  13. In /applications/blog/sources/Blog/Blog.php I noticed this code on lines 1445-1448: /** * @brief The class of the ACP \IPS\Node\Controller that manages this node type */ protected static $acpController = "IPS\\calendar\\modules\\admin\\calendars\\calendars";
  14. In 4.7.0 the file \system\Helpers\Form\Upload.php now uses \IPS\Image::$imageExtensions instead of \IPS\Image::supportedExtensions() to retrieve the list of supported image formats. Because of this change the webp format is not available anymore.
  15. In \system\Helpers\Table\Custom::__construct() is there any point in adding this new $count parameter when it's not used? /** * Constructor * * @param array $dataSource Data source * @param \IPS\Http\Url $baseUrl Base URL */ public function __construct( $dataSource, \IPS\Http\Url $baseUrl, $count = NULL ) { $this->dataSource = $dataSource; $this->count = \count( $this->dataSource ); return parent::__construct( $baseUrl ); } Should the code be updated to use it if it's available perhaps? $this->count = $count ?? \count( $this->dataSource );
  16. In the mentioned function \applications\core\sources\Messenger\Conversation::memberCanReceiveNewMe() you added a new $type parameter but it's not checked anywhere in the function itself? /** * Check if a member can receive new messages * * @param \IPS\Member $member The member to check * @param \IPS\Member $sender The member sending the new message * @param string $type Type of message to check (new, reply) * @return bool */ public static function memberCanReceiveNewMessage( \IPS\Member $member, \IPS\Member $sender, $type='new' ) { /* Messenger is hard disabled */ if ( $member->members_disable_pm == 2 ) { return FALSE; } else if ( $member->members_disable_pm == 1 ) { /* We will allow moderators */ return $sender->modPermissions() !== FALSE; } /* Group can not use messenger */ if ( !$member->canAccessModule( \IPS\Application\Module::get( 'core', 'messaging' ) ) ) { return FALSE; } /* Inbox is full */ if ( ( $member->group['g_max_messages'] > 0 AND $member->msg_count_total >= $member->group['g_max_messages'] ) and !$sender->group['gbw_pm_override_inbox_full'] ) { return FALSE; } /* Is being ignored */ if ( $member->isIgnoring( $sender, 'messages' ) ) { return FALSE; } return TRUE; }
  17. Another file full of hardcoded language strings is \applications\core\sources\DataLayer\DataLayer.php.
  18. Well, looks like data layer has a lot more hardcoded language strings also in "\applications\core\modules\admin\settings\dataLayer.php". Line 97: return "You should Upgrade!"; Line 139: if ( isset( $_SESSION['deleted_datalayer_property'] ) ) { \IPS\Output::i()->inlineMessage = 'Deleted Property'; unset( $_SESSION['deleted_datalayer_property'] ); } Line 178: $form->add( new \IPS\Helpers\Form\Node( 'core_datalayer_replace_with_sso', $default, false, array( 'class' => '\IPS\Login\Handler', 'zeroVal' => 'Use internal Member ID (default)', 'where' => array( ['login_enabled=?', 1], ['login_classname LIKE ?', '%Login_Handler%'], ['login_classname NOT LIKE ?', '%Login_Handler_Standard'] ), ) ) ); Lines 200 + 204: /* Check for invalid characters */ if ( preg_match( '/[^a-z,A-Z,0-9,\_]/', $_value ) ) { throw new \InvalidArgumentException( 'The variable name can only contain alphanumeric characters and underscores.' ); } elseif ( preg_match( '/[0-9]/', \mb_substr( $_value, 0, 1 ) ) ) { throw new \InvalidArgumentException( 'The variable name cannot start with a number.' ); } Line 220: if ( class_exists( 'IPS\cloud\DataLayer' ) AND \IPS\core\DataLayer::i() instanceof \IPS\cloud\DataLayer AND \count( \IPS\Db::i()->select( 'datalayer_key', \IPS\cloud\DataLayer\Handler::$databaseTable, $where, null, 1 ) ) ) { throw new \InvalidArgumentException( "$_value or window.$_value is in use by a custom handler." ); } Line 479: \IPS\Output::i()->title = 'Add property'; Lines 571 + 579: foreach ( array_keys( $events ) as $_eventKey ) { $events[$_eventKey]['description'] = 'Fires when ' . $events[$_eventKey]['description']; } /* Create our sidebar */ $eventSelector = \IPS\Theme::i()->getTemplate( 'settings', 'core', 'admin' )->dataLayerSelector( $events, 'events', 'event_key', 'Data Layer Events', $event_key, true, array( $this, '_truncate' ) ); Line 674: /* Render Content */ $event['description'] = "Fires when {$event['description']}"; Lines 700 + 705 + 718: if ( $group === 'properties' AND \strtolower( $value ) === 'event' ) { throw new \InvalidArgumentException( "You cannot name a property '$value' because that key is reserved" ); } if ( preg_match( '/[^a-z,A-Z,\_]/', $value ) ) { throw new \InvalidArgumentException( 'The name can only contain letters and underscores.' ); } $collection = ( $group === 'events' ) ? \IPS\core\DataLayer::i()->eventConfiguration : \IPS\core\DataLayer::i()->propertiesConfiguration; foreach ( $collection as $key => $data ) { if ( $key === $current ) { continue; } if ( isset( $data['formatted_name'] ) AND $data['formatted_name'] === $value ) { throw new \InvalidArgumentException( 'This Data Layer name is already in use' ); } } Line 733 + 745: public function _enabledDisabled( $val, $row=null ) { return $val ? 'Enabled' : 'Disabled'; } public function _yesNo( $val, $row=null ) { return $val ? 'Yes' : 'No'; } And one more thing I noticed is that some TEMPLATES are hardcoded in the file rather than using PHTML files like every other ACP area. Also, PHP variables are often used inline without wrapping them with curly brackets. Here's some examples below from the "\applications\core\modules\admin\settings\dataLayer.php" file: $output = $this->$tab(); $output = "<div id='dataLayerContent'>$output</div>" ; === return "<br>$form"; === return "<span class='ipsType_monospace ipsMargin:none'><a href='$url' data-ipstooltip title='$title'>$val</a></span>"; === return "<span class='ipsMargin:none ipsType_monospace'><a href='$url' data-ipstooltip title='$title'>$val</a></span>"; === return "<pre class='ipsMargin:none'><a href='$url' data-ipstooltip title='$title' >$val</a></pre>";
  19. In "\applications\core\modules\admin\members\members.php" on lines 1233-1237: if ( isset( $_SESSION['member_datalayer_changed'] ) ) { \IPS\Output::i()->inlineMessage = 'Saved'; unset( $_SESSION['member_datalayer_changed'] ); } Replace it with: \IPS\Output::i()->inlineMessage = \IPS\Member::loggedIn()->language()->addToStack('saved');
  20. The language key's nexus_subs_register_reg_desc text in 4.7.0 currently is: Remove the word they from it.
  21. This is the template's code in 4.7.0: {{if 0 && \IPS\Dispatcher::i()->controllerLocation == 'admin' AND !( $object instanceof \IPS\Helpers\Form\Address ) AND !( $object instanceof \IPS\Helpers\Form\Upload ) AND !( $object instanceof \IPS\Helpers\Form\Node ) AND !( $object instanceof \IPS\Helpers\Form\Codemirror )}}<br>{{endif}} {{if \IPS\Dispatcher::i()->controllerLocation == 'front' AND ( !( $object instanceof \IPS\Helpers\Form\Checkbox ) OR $object instanceof \IPS\Helpers\Form\YesNo )}}<br>{{endif}} <span class='ipsFieldRow_desc'> %s </span> Someone left a 0 that results always in a FALSE value at the start of the IF condition: 0 &&
  22. The data layer JS is: {{if settings.core_datalayer_enabled}} <script> $('body').trigger( 'ipsDataLayer', { _key: 'content_view', _properties: { {{foreach $event->getDataLayerProperties() as $key => $value}} $key : {expression="json_encode( $value )" raw="true"}, {{endforeach}} view_location: 'hovercard', } } ); </script> {{endif}} Update the line inside the foreach to: '{$key}' : {expression="json_encode( $value )" raw="true"},
  23. Is still still pending review? I don't see it fixed in 4.7.0 at least.
×
×
  • Create New...