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
-
Customize The Download Category Error Message
teraßyte replied to hpcrazy's topic in Technical Problems
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). -
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";
-
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 );
-
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; }
-
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>";
-
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');
-
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 &&
-
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"},
-
[Bug] Old versions in downloads show the wrong changelog date
teraßyte replied to teraßyte's topic in Developer Connection
Is still still pending review? I don't see it fixed in 4.7.0 at least. -
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.
-
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. 👍
-
(TB) Sort Questions Forums by Date [Support Topic]
teraßyte replied to teraßyte's topic in Marketplace
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. 👍 -
(TB) Show Notifications Status in Messenger [Support Topic]
teraßyte replied to teraßyte's topic in Marketplace
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. 👍 -
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. 👍
-
(TB) Show Badge for Locked Topics [Support Topic]
teraßyte replied to teraßyte's topic in Marketplace
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. 👍 -
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. 👍
-
(TB) Replace Topic Status Icons with Badges [Support Topic]
teraßyte replied to teraßyte's topic in Marketplace
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. 👍 -
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. 👍
-
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. 👍
-
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. 👍
-
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. 👍