Developer Connection
Use this forum to interact with our development team on technical issues, suggestions and official best practices advice.
1,678 topics in this forum
-
- 1 reply
- 285 views
Ihave a widget that uses javascript as part of an app. When I embed the widget on a module from my app I get the JS I included from the app. How can I include JS to the widget on different pages in the suite?
Last reply by newbie LAC, -
- 2 replies
- 215 views
Hello, I use \IPS\Helpers\Table\Db. Don't tell me use \IPS\Helpers\Table\Custom I only need specific columns In that class you have ( \count( $selects ) ) ? $this->table . '.*, ' . implode( ', ', $selects ) : '*' Could you add new property and change above code? For example /** * @brief Select only specific columns */ public $selectColumns = NULL; and $this->selectColumns ?? ( ( \count( $selects ) ) ? $this->table . '.*, ' . implode( ', ', $selects ) : '*' )
Last reply by newbie LAC, -
- 4 replies
- 219 views
I'm adding a new content moderator permission on my app: public function getPermissions( $toggles ) { $return['can_convert_rev_com'] = 'YesNo'; return $return; } But it is creating a new tab: Shouldn't it add my permisison to the existing CONTENT tab? That way it won't make any difference in use ContentModeratorPermissions or ModeratorPermissions extension. Tks.
Last reply by bfarber, -
- 1 follower
- 2 replies
- 210 views
Quick question - working on developing a frontend notification plugin and adding a new 'type' within the notification preference settings. The column definition for 'preference' within the 'core_notification_preferences' table is set(email,inline). Would my plugin be rejected if on install my plugin changed the column definition to add a 3rd type?
Last reply by Jon Erickson, -
- 1 follower
- 1 reply
- 213 views
Could you replace: /* If it's an AWS file just redirect to it */ if ( $file instanceof \IPS\File\Amazon ) { \IPS\Output::i()->redirect( $file->generateTemporaryDownloadUrl() ); } in the Downloads app (or any other places that $file->generateTemporaryDownloadUrl() is called) to look up the method in the storage method used for the file? I want to implement generateTemporaryDownloadUrl() in a storage method I'm coding now and have it used by IPS apps such as the Download app.
Last reply by bfarber, -
- 1 follower
- 3 replies
- 227 views
I'm developing a new Storage Method (call it Amazon2) to replace the current Amazon method. I've got public buckets working (I think), but I want to support private buckets in Amazon2. I'm actually using Minio as my S3 backend. Minio supports most of the S3 API, but Minio does not support ACLs at the Object level. So, I need to support private buckets to keep some/all files from being publicly available with just a "public URL". Private buckets require pre-signed URLs to download, but pre-signed URLs have an expiration time of up to 7 days and also have a QUERY_STRING (of course). How do I add private bucket URL support into my Amazon2 storage method? The c…
Last reply by KT Walrus, -
- 1 reply
- 284 views
@Matt @Mark @bfarber Anyone can please take a look in the ticket #1038277? That's the 2nd or 3rd attempt to submit tickets with core bugs that simply didn't go forward because they happen on a 3rd-party resource, but the source is a core function. Calendar in this specific case. If it isn't a core issue, ok, then just tell after take a look.
Last reply by bfarber, -
- 1 follower
- 2 replies
- 317 views
I'm looking into allowing large files to be uploaded into S3 using the Amazon Storage Method. But, it looks to me like this Storage Method reads the entire file into memory first and "puts" its entire contents to the Amazon S3 endpoint. Is this correct? If so, am I going to have to implement my own Amazon Storage Method to override the setFile() method to save the filename instead of the contents() into the Storage Method class and later use a stream to read the file and a stream to write the file to S3? I think I need to use AWS PHP SDK to write the stream to S3, right? Something like this (using the S3 stream wrapper): $in = fopen($this->temporaryF…
Last reply by KT Walrus, -
- 1 follower
- 1 reply
- 195 views
Hello, In IPB 3.4 there was a method named $hanLogin->loginWithoutCheckingCredentials($memberId, $rememberMe). What is the equivalent of that in IPS 4?
Last reply by newbie LAC, -
- 1 follower
- 1 reply
- 217 views
I have some plugin with custom JS. How could i let IPS know when my JS file should be loaded? I.e. move to header or footer, load synchronously or with async or defer attribute. Thanks.
Last reply by Martin A., -
- 0 replies
- 337 views
Yes, I am fully aware I can do this by extending the KeyValue form helper class. Every, single, time I want to use something not a text input for the key or value. Can we pass this as an option like 'keyFieldType' and 'valueFieldType', defaulting to Text instead, and pass the field type specific options through to them with something like 'keyFieldOptions' and 'valueFieldOptions' please? For reference, I often use this field with the Stack field type, so such a change would need supported with this field type as well to be of value. For example: $form->add( new \IPS\Helpers\Form\Stack( 'my_setting', $values, true, [ 'stackFieldType' => 'KeyValue', …
Last reply by Marcher Technologies, -
- 1 follower
- 3 replies
- 235 views
Not sure what to call this, but in the lang files I see the href attributes set to an external value: 'filehandler__Amazon_bucket_desc' => "You can create a bucket in your <a href='{external.amazons3_buckets}' target='_blank' rel='noopener'>S3 Management Console</a> How do I add my "external.my_url" if my lang bit is: 'click_here' => "Click <a href='{external.my_url}' target='_blank' rel='noopener'>here</a>!" Where is this documented? I searched but came up empty.
Last reply by bfarber, -
- 3 followers
- 6 replies
- 338 views
I don't know if there is a good section for this topic, but the IPS community does not have a dedicated forum for technical support or soft-forum reporting issues. I have not seen such a section that would treat such aspects clearly! I have the latest IPS4 installed and I generated a block with the latest articles. This block has been integrated into the index page but the column that lists the latest comments added to the articles show my admin name to all articles, although I have not made the last comments !!! For example, there are articles where I have not added any comments but the block displays the last comment made by me on all the articles listed. Be a te…
Last reply by bfarber, -
- 6 replies
- 351 views
I want to load an editor with an ajax request and when the ajax request is sent and the editor looks like this: How can I fix it? Thanks
Last reply by Gil Ronen, -
- 9 replies
- 363 views
The form helper is generally great, but one downside of the current setup is when someone wants a change to part of an existing IPS form. Since the form is created in the php file (usually in one method), there aren't many options for changing just part of one. You'd have to either override a method and totally replace the code (not allowed in marketplace), do a really odd replace attempt, or... I don't know. Maybe in 5.x have all of the forms similar to the content item ones where you set up an array of elements for the form, where you can simply overwrite an element? Maybe even have it also check for an existing function with the element's key for the function name…
Last reply by bfarber, -
- 2 followers
- 2 replies
- 238 views
there is quite an annoying debug log that fills up my log all the time: if ( \defined('\IPS\DEBUG_LOG') and \IPS\DEBUG_LOG ) { \IPS\Log::debug( "\n\n------------------------------------\ncURL REQUEST: {$this->url}\n------------------------------------\n\n" . var_export( $this->dataForLog, TRUE ) . "\n\n------------------------------------\nRESPONSE\n------------------------------------\n\n" . $output, 'request' ); } and if i have disabled curl: if ( \defined( '\IPS\DEBUG_LOG' ) and \IPS\DEBUG_LOG ) { \IPS\Log::debug( "\n\n------------------------------------\nSOCKETS REQUEST: {$this->url}\n----------------------------------…
Last reply by bfarber, -
- 1 follower
- 3 replies
- 226 views
I know right, a shocker, a weird request coming from me? bet you are all surprised. anyway, could there be two events fired for ipsmentions, first one when the mentions results are opened and a second one when they are closed. this way i know when a mentioned is being used so i can disable any special effects i might have for the enter key (like example in stratagem and babble, hitting the enter key submits the editor content).
Last reply by bfarber, -
- 1 follower
- 6 replies
- 316 views
Hi, I want to add a form element where you can select one forum from the forums like this one: How can I do this? Thanks!
Last reply by Gil Ronen, -
- 1 follower
- 5 replies
- 540 views
Hi, I tried doing \IPS\forums\Topic::create() like you do when creating a post to a topic with \IPS\forums\Topic\Post::create() and it didnt work, I couldnt find the method in the method in the topic class. how can I create a topic? I have the target forum object and the topic content. Thanks
Last reply by Gil Ronen, -
- 1 reply
- 265 views
Hi, we are still fighting with articles on our page. It looks good now, but what we want focus now is recommended articles. If someone finish reading one article it should have on bottom next few (5 for example) recommended to stay at our site. Ive made a block for it, and it works fine, but I have 2 issues: - block is visible under articles, which is fine, but it is also visible on main page of article list (list view), and on category view under the lists. Which have no sense, because on categories there should be only categories, and on main page it duplicates content from top of page. Can I somehow set it to display only in record view? - if some reads ne…
Last reply by bfarber, -
- 1 reply
- 230 views
Was wondering where to look to find the basic breakdown of a datatable with search functionality such as for example admin logs in the ACP Want to make something similar to display info for an external db on the frontend. Was hoping someone could point me in the directory to look into or even link an existing example app if one exists. Thanks
Last reply by bfarber, -
- 7 replies
- 299 views
I implemented the IPS\Content\ItemTopic trait in my apps but two of them has a particularity: the topic should not be created right after the item is submitted; user must add questions/answers or prizes then click in a button so the topic is created. I mean, that's how it was on <4.3 because I didn't have the syncTopic(() on createFromForm; I had it on my controller function. So the question is: how can I prevent the topic from being created right after submit the item when using the ItemTopic trait? I can't return parent in createFromForm on my item model, otherwise the topic will be created. Tks.
Last reply by Adriano Faria, -
- 1 follower
- 2 replies
- 278 views
Hello, I seem to be unable to figure out what I'm doing wrong. This is what I had originally: if( \IPS\Settings::i()->anon_inforums === '0' ) { \IPS\Settings::i()->anon_inforums = 0; } # Forums where the selected members can post anonymously $form->add( new \IPS\Helpers\Form\Node( 'anon_inforums', isset( \IPS\Settings::i()->anon_inforums ) ? \IPS\Settings::i()->anon_inforums : array(), NULL, array( 'class' => '\IPS\forums\Forum', 'multiple' => true, 'zeroVal' => 'all' ) ) ); This worked for selecting multiple forums in the node selector. After saving it would still show the selected forums for the setting. (So far so good…
Last reply by newbie LAC, -
- 1 follower
- 2 replies
- 213 views
Hi, I am trying to use a piece of javascript to insert dynamically a button in the CKEditor toolbar. (Based on the Chevereto popup upload plugin.) After adding the html code in the global template before the </head> and refreshing all caches, when I go back to the front site, the button does appear at the first loading of the editor. However, it is not added on any other page loaded after that (at least for some time. Long inactivity acts as a kind of reset.) This made me suspect some cache issues. I did a couple of trials : the place of the script (before </head> or before </body>), the place of the includeJS as well (I noticed it chan…
Last reply by SRFA, -
- 1 follower
- 4 replies
- 286 views
I've created a custom static method in \IPS\Member: static function hello() { $hello = "something"; return $hello; } Now I need to retrieve it in a template: {{$hello = \IPS\Member::hello();}} but forums/topicRow template, where I'm working, start with a foreach and I can't hook before it to assign passing $hello. I've found a dirty workaround but what is the best way to do it?
Last reply by bfarber,