Developer Connection
Use this forum to interact with our development team on technical issues, suggestions and official best practices advice.
1,734 topics in this forum
-
- 1 reply
- 327 views
Hi, After writing a custom login handler, a new issue appeared: What about unique emails? Our application allows a single user to have multiple identities. Say they have one super account, and many sub accounts. The super account contains information such as email, first & last name, password, etc. The sub account contains information such as nickname/username. Because of this model, many "nicknames" may have the same email. When a user authenticates with the custom login handler, I see 3 things I could do: Prompt the user for the email they want to use. I don't know what will happen if they pick one that's already in use. Probably they…
Last reply by bfarber, -
- 1 follower
- 1 reply
- 306 views
Hello, Referring to the code @newbie LAC in my previous topic, I'm trying to get the groups out of display. I try this: if (isset($allGroups[$sid]) = explode(',', \IPS\Settings::i()->ips1s2kSGIExclude)) unset($allGroups[$sid]); But I get an error: "Your code caused a parse error and could not be saved.". At this moment the error causes "\IPS\Settings::i()->ips1s2kSGIExclude". I added the settings to the plugin and added the code: $form->add(new \IPS\Helpers\Form\Select('ips1s2kSGIExclude', \IPS\Settings::i()->ips1s2kSGIExclude === '' ? '*' : (\IPS\Settings::i()->ips1s2kSGIExclude === '*' ? '*' : explode(',', \IPS\Settings::i()->ips1…
Last reply by newbie LAC, -
- 2 replies
- 594 views
Hello, I am working on an api for one of my projects and I need to compare the user's password to the hash of a given string. I am kind of unsure how the passwords are being hashed i've tried using crypt method and md5 and can't seem to get it. Anyone know what I need to do in order to hash the password for the user correctly? // Something I have tried, which seems to not work due to no data being in the members_pass_salt colum $pass_hash = crypt($pass, '$2a$13$' . $member->members_pass_salt);
Last reply by Voltz, -
- 1 follower
- 3 replies
- 272 views
I working on a custom sign up form for my site. I basically copied the form out of register.php and implemented a hook to provide my own fields. But the resulting form displays "This field is required" sometimes prefixed with an icon and sometimes not. I suppose that the fields validated by JavaScript are putting out an icon and the PHP validated fields are omitting the icon. How to I make all these messages look the same? Can you fix the core JS and PHP to make them the same, or am I going to have to develop a hook to make them consistent on my site? Here is a screenshot of my current Sign Up form:
Last reply by KT Walrus, -
- 1 follower
- 3 replies
- 770 views
I've decided for a site I'm building to not use Auto-Increment columns as the Primary Key in my apps, but use 64-bit UUIDs instead. But I want all visible IDs to be shorter and often visible to the user. For my member ids, I changed to set member ids to a 9 digit number, e.g., 220-04-3439 so they are easy to remember (much like an SSN), but still have the ability to add up to 1 billion members with unique ids. I'm using the member id as the username in a site-specific email address, e.g., 220043439@mysite.com so users can send private messages to each other without knowing the registered email address of the recipient. The site will forward all received email to the regis…
Last reply by KT Walrus, -
- 1 follower
- 6 replies
- 607 views
Hi, I'm working on migrating us from vbulletin to IPB. In order to do this, we need a custom login handler, to handle logins via our API. What I did so far: Read (although it seems somewhat outdated, there is still some good info) Enabled DEV mode Created the appropiate file structure: Using the following namespace: namespace IPS\Login\Handler; And class name: class _Reborn extends \IPS\Login\Handler Extended the handler array in Handler.php with: 'IPS\Login\Handler\Reborn', I get the following error when trying to add my login handler: Quite possibly I'm missing a few steps, but would anyone know? …
Last reply by Mark, -
- 1 reply
- 376 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
- 298 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
- 313 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
- 293 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
- 296 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
- 309 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
- 399 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
- 536 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
- 276 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
- 299 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
- 431 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
- 345 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
- 456 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
- 424 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
- 470 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
- 318 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
- 308 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
- 415 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
- 674 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,