Jump to content

teraßyte

Clients
  • Posts

    33,811
  • Joined

  • Last visited

  • Days Won

    55

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Projects

Release Notes v5

Invision Community 5 Bug Tracker

Forums

Events

Store

Gallery

Everything posted by teraßyte

  1. 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).
  2. 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";
  3. 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.
  4. 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 );
  5. 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; }
  6. Another file full of hardcoded language strings is \applications\core\sources\DataLayer\DataLayer.php.
  7. 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>";
  8. 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');
  9. The language key's nexus_subs_register_reg_desc text in 4.7.0 currently is: Remove the word they from it.
  10. 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 &&
  11. 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"},
  12. Is still still pending review? I don't see it fixed in 4.7.0 at least.
  13. It does tasks depending on the priority (from 1 to 5). If attachments has a higher priority than anything else it will do only that first. As for the 100% on PMs, given how many you have I doubt it has already rebuilt them only. Most likely a bug in how the complete % is calculated.
  14. This modification is already compatible with 4.7 but I'm working on a new version to add the suggestions from this topic before I mark it as compatible in the IPS marketplace. Those who have it already installed can keep using it without problems. 👍
  15. This modification is already compatible with 4.7 and I've just submitted a new version to mark it as compatible (no actual changes). Those who have it already installed can keep using it without problems. 👍
  16. This modification is already compatible with 4.7 and I've just submitted a new version to mark it as compatible (no actual changes). Those who have it already installed can keep using it without problems. 👍
  17. This modification is already compatible with 4.7 and I've just submitted a new version to mark it as compatible (no actual changes). Those who have it already installed can keep using it without problems. 👍
  18. This modification is already compatible with 4.7 and I've just submitted a new version to mark it as compatible (no actual changes). Those who have it already installed can keep using it without problems. 👍
  19. This modification is already compatible with 4.7 and I've just submitted a new version to mark it as compatible (no actual changes). Those who have it already installed can keep using it without problems. 👍
  20. This modification is already compatible with 4.7 and I've just submitted a new version to mark it as compatible (no actual changes). Those who have it already installed can keep using it without problems. 👍
  21. This modification is already compatible with 4.7 and I've just submitted a new version to mark it as compatible (no actual changes). Those who have it already installed can keep using it without problems. 👍
  22. This modification is already compatible with 4.7 and I've just submitted a new version to mark it as compatible (no actual changes). Those who have it already installed can keep using it without problems. 👍
  23. This modification is already compatible with 4.7 and I've just submitted a new version to mark it as compatible (no actual changes). Those who have it already installed can keep using it without problems. 👍
  24. This modification is already compatible with 4.7 but I'm working on a new version to fix some minor bugs before I mark it as compatible in the IPS marketplace. Those who have it already installed can keep using it without problems. 👍
×
×
  • Create New...