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
-
- 2 followers
- 13 replies
- 401 views
On communities that make use of IP.Downloads and have both paid and free files, if a user purchases a paid file and has exceeded their download quota for that day, they will not see a download button appear. If they go into their client area, then go to managed purchases and try and download the file that way, they will get an error stating they have exceeded their (daily/weekly/monthly) download limit. This is not desirable. There should, at the very least, be an option to allow paid files to ignore download limitations, so users who pay for files aren't forced to wait in order to download what they paid for.
Last reply by Makoto, -
- 1 reply
- 426 views
I'm not sure why, but when developing, ergo IN_DEV = true, the 'log in as' feature lasts not even 2 minutes. This results in a ridiculous amount of time waste when one needs to develop against and test a multitude of access levels and configurations. Is there a constant I can set to a member id to make 'log in as' stay put long term while IN_DEV?
Last reply by Marcher Technologies, -
- 1 follower
- 4 replies
- 351 views
Looks like v4.4.2 was just recently released. I was running the beta version on my dev installation when I got a notification for it, as well as a second "blank" NewVersion notification that causes the AdminCP to crash when in development mode, Not sure if it's just a glitch from running the beta or if other users might start seeing a new release of IPS from 1969 or not, so just thought I'd let you know.
Last reply by bfarber, -
- 1 follower
- 4 replies
- 324 views
Settings with this form helper won't work as usual and it doesn't summon colorpallet. Is this a bug? Edit: I'm using this way for a while. $form->add( new \IPS\Helpers\Form\Color( 'setting_key', \IPS\Settings::i()->setting_key ) );
Last reply by shahed, -
- 1 follower
- 1 reply
- 322 views
This is a minor annoyance since we generally don't need to call it often, but the simple task of creating language strings takes such a long method call \IPS\Member::loggedIn()->language()->addToStack('') I actually have a live template set up for this, but that's a static method call and two consecutive method calls for a common task. It makes sense that we would, under most sane circumstances, always want to add a language string from the current logged in members set language, so defining this method in \IPS\Lang itself seems like a non-issue to me. i.e., \IPS\Lang::addToStack('') This is much easier to read and type.
Last reply by TheJackal84, -
- 2 replies
- 618 views
I'm trying to make an external request using \IPS\Http\Url::external($somepath)->request()->setHeaders( array('Content-Type' => 'application/json') )->post( array()); So I can set the body and the headers. But How do I set the authorization? So either CURLOPT_USERPWD or a token?
Last reply by Ryan Ashbrook, -
- 1 follower
- 6 replies
- 940 views
Hello, I have been trying to figure out how to add my own parts of the API for an application I'm working on. I have tried doing research to find out how to do this and I've been searching for probably an hour and feel dumb if there is something on how to do this. But a lot of the docs / examples for developers is minimal or not documented (at least looking at the docs for what I want to do). I've tried looking at the core applications of IPS4 and recreating the way APIs are created in that application or even using a code hook. I can't seem to get it to work properly. I have gotten to a point where it registers the API request but when trying to access it I get the err…
Last reply by bfarber, -
- 1 reply
- 400 views
It's great that we can set up our own logging with \IPS\Log::log(). How can I log an error to the Error Logs instead of System logs? The trouble I have right now with \IPS\Log::log() is that it has no level of severity. So I cannot distinguish between warnings, errors, critical errors... I have noticed that errors that appear in the Error Logs trigger a notification in the ACP. So right now I see System Logs as a place for warnings and Error Logs as a place for critical errors that require more attention. I don't think this is ideal though. It would be nice if we could set a severity level with our logs. And depending on the severity, a notification co…
Last reply by Ryan Ashbrook, -
- 1 follower
- 1 reply
- 373 views
Hi, There is not any guide about custom payment gateway, could you please advise best way to develop a custom payment gateway? Should it be a hook or an application?
Last reply by bfarber, -
- 1 follower
- 3 replies
- 411 views
There's an issue with the Db table helper where if your table has filters that can return zero results, it will return an error on ajax requests due to an underflow exception and does not change the table results at all (while the correct behavior is to indicate there are no results). I attached a patch that resolves this issue by running a try/catch statement before iterating over the select results. DbEmptyFilter.patch Let me know if you need me to elaborate on the issue/fix.
Last reply by bfarber, -
- 1 reply
- 382 views
I'm creating a plugin to hook into a function to add some extra functionality. class hook100 extends _HOOK_CLASS_ { protected function someFunc() { $return = parent::clear(); // my code return $return; } } The problem is that when parent::clear(); runs it contains a bunch of \IPS\Output::i()->redirect() Meaning that my code never gets executed as the page leaves before then. Does anyone have any advice how to handle situations like this?
Last reply by bfarber, -
- 2 followers
- 4 replies
- 357 views
Hi, I'm making a plug-in with a code hook in Dev mode on my local Xampp. I read that you shouldn't replicate the source code but the Development documentation doesn't actually go on to provide any explanation on how to otherwise insert our code into the existing functions within a method. If you have several existing IPS functions mixed with chunks of PHP within a method, within a class, inside a system/file/file.php, and you want to extend them or insert additional code, what is the recommended way to do it, please? I may not be describing it correctly so I'm picturing this as an example of what I want to hook into... class xxx extends xxxxxxxx ... m…
Last reply by The Old Man, -
- 2 replies
- 490 views
When using this method: \IPS\Db::i()->select(); The table name you pass automatically gets the sql_table_prefix value defined in conf_global.php prepended to it. Is there a way to avoid this? I wish to access a table I have created that does not have this prefix added.
Last reply by Tom S., -
- 1 follower
- 6 replies
- 1.2k views
Please don't forget that marketplace submissions should be completely installable and uninstallable via the ACP, which means that they shouldn't include any additional files which need to be uploaded to the clients webspace manually. Applications can ship the custom js,image,font etc.. files within the interface folder and themes can utilize the theme resource system to add custom files ( JS, Font, Video, etc..).
Last reply by MIXOH, -
- 2 followers
- 3 replies
- 409 views
Hello, As I understand it, I can extend a class using code hooks in plugins. So, if I wanted to modify a method for the cart class I could do this inside of my plugin: class cart extends _HOOK_CLASS_ { protected function clear() { // some code } } Am I right in thinking I will completely override the clear() method with that? My question is how can I add some extra functionality to the clear() method without completely overriding it? Say, for example, I wanted to add an extra line to that method making a change to a table in the database (but keep the rest of the functionality the same). How could I do that? I read that just copying the entire …
Last reply by Tom S., -
- 2 followers
- 3 replies
- 273 views
I'm not really sure if you want to consider this a bug or not, but when submitting support requests, the e-mails are not validated against the list of banned e-mails (as they are not technically passed as "account emails" and thus do not go through those checks") This was brought to my attention by a client here: https://dev.taiga.sh/ips/Indisposable/issues/4
Last reply by KT Walrus, -
- 1 follower
- 1 reply
- 290 views
When creating a new IncommingEmail extension in development mode, you get the following error screen: The extension is still created and the error screen is temporary, just an issue parsing the example extension since it doesn't parse properly. (Was told by @Rhett to submit bug reports here and just reference ticket #1032985 if needed)
Last reply by Daniel F, -
- 1 reply
- 326 views
Hi, When implicating a new OAuth 2.0 based login handler, I get some problems, as tokenEndpoint returns string not json data. For example, in Facebook GET https://graph.facebook.com/v3.2/oauth/access_token? client_id={app-id} &redirect_uri={redirect-uri} &client_secret={app-secret} &code={code-parameter} will return { "access_token": {access-token}, "token_type": {type}, "expires_in": {seconds-til-expiration} } But in this case, it returns access_token={access-token}&token_type={type}&expires_in={seconds-til-expiration} I have no idea how to support this handler, could anyone help?
Last reply by bfarber, -
- 1 follower
- 2 replies
- 293 views
Hi there, Small question 🙂 In the followed items section (URL /followed), we have the list of the followed items. However, when a Content Item is followable (is subclass of \IPS\Content\Followable), this followed items section automatically display the Node the Content Item belongs to, in the left menu of the page. This is because of the following code, in /core/modules/front/system/followed.php, line 47: if ( isset( $class::$containerNodeClass ) ) { $types[ $class::$application . '_' . $class::$module ][ mb_strtolower( str_replace( '\\', '_', mb_substr( $class::$containerNodeClass, 4 ) ) ) ] = $class::$containerNodeClass; } It means tha…
Last reply by LaCollision, -
- 2 followers
- 3 replies
- 299 views
Hi, In my app, I've created Content Items that don't have a container (it's something possible, like the Status updates that don't belong to a container). My Content Items are followable, so they implement IPS\Content\Followable. However, I'm facing a bug with the "followed" section, available at the address "/followed". In the file core/modules/front/system/followed.php, at line 96, there is a call to a new \IPS\core\Followed\Table(). And in this object, the construct() method calls the $className::$containerNodeClass property… which fires an exception 😭 => Could it be possible, in this constructor, to check the presence of the $co…
Last reply by LaCollision, -
- 1 follower
- 2 replies
- 324 views
Hi, In the 4.4.1 third-party developers notes, there is this info: … however, I can't see what changes have been made to the FileStorage skeleton. Do you know what has been changed? Thank you!
Last reply by Martin A., -
- 2 followers
- 1 reply
- 289 views
I am not sure why this happens, as it only appears to happen to mac users and i am not even sure if it happens to other developers. however i get a PM once or twice a week from mac user that goes to extract the zip of my apps, and it will extract the contents of the tar file inside the zip as well. so they end up without having a "tar". It made sense in 3.x to zip up the apps, but it doesn't really make that much sense here. most of the time, i just include a "how to install" text with the zips, and even then it is usually just "this installs just like any other IPS app, no additional requirements". I would much rather there be a section, like for support info,…
Last reply by Stuart Silvester, -
- 2 replies
- 352 views
I'm building a new plugin with a setup install.php script. I cannot find any documentation regarding how to run my install.php script to verify it's working.
Last reply by Dave Macaulay, -
- 1 follower
- 7 replies
- 373 views
I'm testing a couple of plugins in 4.3.0 and the members fields shows up like that: This is the field. $form->add( new \IPS\Helpers\Form\Member( 'followers_member', NULL, FALSE ) ); If I set it to be required, it shows "open". I believe this is happening due to the changes made on TAGs, which uses same classes somehow (JS, etc). Obviously this is not the intended behaviour for the MEMBER field as my field cannot be required. Can you confirm this is right or wrong? I mean, it will be this way now? Testing a bit more, it seems that it had some change. I mean, even I choose GROUP above and submit the form, it won't stop even MEMBER being re…
Last reply by bfarber, -
- 2 replies
- 409 views
Widget skeleton still shows up in the previous format: public function configuration( &$form=null ) { if ( $form === null ) { $form = new \IPS\Helpers\Form; }
Last reply by Adriano Faria,