Developer Connection
Use this forum to interact with our development team on technical issues, suggestions and official best practices advice.
1,736 topics in this forum
-
- 1 follower
- 2 replies
- 661 views
A lazy ask since I haven't done enough research yet. My community is acting as IDP. My custom web-application, henceforth PoCApp, successfully navigates the OAuth flow to authenticate the user against Invision. Now PoCApp makes API calls to PoCAPI. PoCAPI is separate from Invision. PoCAPI should leverage the bearer token to authenticate and authorize the user for the API call. Is there a standard approach for PoCAPI to communicate with Invision to validate the authentication? I'm suspecting I need to write an addon API (introspection endpoint) to Invision that PoCAPI will call to do the validation but am curious if there is something hiding or some overloadin…
Last reply by HarpGamer, -
- 1 follower
- 1 reply
- 703 views
On PHP 8 the opacity option for the HexToRGB plugin is failing: if ( isset( \IPS\Theme::i()->settings[ $opacity ] ) ) { $opacity = \IPS\Theme::i()->settings[ $opacity ]; } /* If a regular setting key has been passed in, then use that as the opacity */ if ( isset( \IPS\Settings::i()->$opacity ) ) { $opacity = \IPS\Settings::i()->$opacity; } If you pass through a standard setting (not theme setting), on the theme setting check you'll get crashes with an undeclared constant: Undefined constant "IPS\Theme\my_transparency_setting" This may, or may not, have been happening IN_DEV for years, but it's now in production on PHP 8 as well…
Last reply by Stuart Silvester, -
- 1 follower
- 2 replies
- 1.1k views
I am using the API to create topics successfully. However, I cannot seem to be able to add a poll to a topic via the API . Here is what I'm using as my post fields that is sent to the API via curl. Note, everything below the /* poll variables below */ comment is what I'm trying to post as the poll data to the topic. The topic still gets posted, but the poll does not get created in the topic. What am I doing wrong? $post_fields = array( 'key' => urlencode($apiKey) // the topic id ,'forum' => urlencode(IPBFORUM_ID) // the forum id ,'title' => urlencode('T…
Last reply by NAWAC, -
- 2 followers
- 10 replies
- 1.4k views
I'm working on implementing an app where the Items can be mapped to multiple Containers using a Map table to map Item ColumnId to Container ColumnId. To do this, I'm using an INNER JOIN of the Map table in getItemsWithPermission() passing \IPS\Db::SELECT_DISTINCT flag. This is mostly working, but sometimes getItemsWithPermission() is being called to get a COUNT instead of the actual Items. Here is an example of the wrong SQL being built for the COUNT query: SELECT DISTINCT COUNT(*) as cnt FROM `puce_topics` INNER JOIN `puce_forum_topic_map` ON puce_topics.tid=puce_forum_topic_map.topic_id AND ( puce_forum_topic_map.forum_id IN(1510000,1516600) ) WHERE …
Last reply by KT Walrus, -
- 2 followers
- 1 reply
- 668 views
Last reply by Stuart Silvester, -
- 1 follower
- 0 replies
- 381 views
Hi, I noticed Normalize is 4.6.8 is fairly old, v6 from 2017. Most recent version is v8.0.1, albeit it's from 2018. Worth updating or removing now that old browsers are no longer supported? Just FYI, there is also a new modern simpler one out, https://elad2412.github.io/the-new-css-reset/ which is discussed in a recent interview on CSS Tricks. You can use it with (after) Normalise apparently. I've been using Modern Normalize for a while on my non-IPS sites. 🙂
Last reply by The Old Man, -
- 1 follower
- 1 reply
- 415 views
I want to bring back the latest Events and Topics, but only the ones that a given user is Authorized to see. For both of these endpoints, the only way to do this is to use an oAuth access token. I don't actually have a third party service that I want to integrate with, the script simply needs to run on my server. I want to get a token to impersonate the user, so I can get this information back. What's the easiest way to generate one of these tokens?
Last reply by Stuart Silvester, -
- 1 follower
- 1 reply
- 766 views
We have an hook that injects some HTML at the bottom of the emails to add some buttons. After upgrading from 4.4.10 to 4.6.7 we noticed that these buttons are showing twice. After some investigation I found this is an IPS bug. Here's the steps to replicate it on a fresh install: Make a fresh install of 4.6.7 Add a new user from ACP Now send a PM to this new user The notification email sent out will have a duplicate wrapper. By inspecting the email source you can immediately see duplicate HTML/HEAD/BODY elements, and the first parsed wrapper also has an empty TITLE element. From a quick look at the issue it seems to first parse the conten…
Last reply by Stuart Silvester, -
- 2 followers
- 2 replies
- 823 views
If an email has Our Picks items included there are unreplaced {dir} attributes because the emailWrapper HTML is not formatted properly: {{if $count == 2}} </tr> <tr height='30'> <td colspan='3' dir='{dir}' class='hidePhone' style='border-bottom: 1px solid #e0e0e0;'> <img src='{setting="base_url"}applications/core/interface/email/spacer.png' width='1' height='1' alt=''> </td> </tr> <tr height='30'> <td colspan='3' dir='{dir}' class='hidePhone'> <img src='{setting="base_url"}applications/core/interface/email/spacer.png' width='1' height='1' alt=''> </td> </tr> <tr> {{endif}} <t…
Last reply by Stuart Silvester, -
- 2 followers
- 2 replies
- 412 views
While IN_DEV, when I edit a club node I get the exception:
Last reply by Stuart Silvester, -
- 1 follower
- 1 reply
- 483 views
When you're working a new version of your app and you add a table via Add Table -> Import From Database, it doesn't add the table to the Versions -> Version currently being developed just like it does when you manually create the table. You need to add the new table via Add SQL Query (or manually adding the table to the .json). Thank you.
Last reply by Stuart Silvester, -
- 3 followers
- 1 reply
- 451 views
I'm using \IPS\Helpers\Form\CheckboxSet in a form to show a list of options for the user to check/enable. The first 2 options should always be checked. I want to disable these 2 checkboxes so the user can't uncheck them. When I disable the first 2 checked options, the None link at the bottom toggles off ALL the checkboxes including the first 2 disabled ones. Once unchecked, there is no way for the user to change them back to checked. I think this is a bug. The All / None buttons should not change disabled checkboxes.
Last reply by Stuart Silvester, -
- 1 follower
- 6 replies
- 1.1k views
A bit of API testing first to know it's working: \IPS\Member::load('some_username', 'name'); //works as expected, I get the user \IPS\Member::load($member_id, 'member_id'); //works as expected, I get the user Authenticating a user via the API: $session = \IPS\Session\Front::i(); $session->setMember($member); $member = \IPS\Member::load('username', 'name'); $device = \IPS\Member\Device::loadOrCreate($member); $device->anonymous = false; $device->updateAfterAuthentication($rememberMe, null); $member->memberSync('onLogin'); $member->profileSync(); At this point, if I visit the forum, I see that I am logged in as the user so …
Last reply by Stuart Silvester, -
- 2 followers
- 2 replies
- 571 views
How come even though I put a url to mask the AWS S3 address, when I download a product from Downloads, it serves it to me on the S3 link? It also does this with attachments to download in posts, while images are correctly served on the custom url set to Storage
Last reply by Stuart Silvester, -
- 1 follower
- 1 reply
- 625 views
Hi, In the auth function I have this... However for some reason it seems like fraud rules that I put up with MaxMind is completely ignored. Is there something I am missing? I want it to perform a MaxMind check on the auth, or after they paid.
Last reply by Stuart Silvester, -
- 2 followers
- 2 replies
- 587 views
I have a hook for \IPS\Member\Club::nodes(). This hook works as desired in all parts. Except of clubrebuild task: /** * clubrebuild Task */ class _clubrebuild extends \IPS\Task { /** * Execute * * If ran successfully, should return anything worth logging. Only log something * worth mentioning (don't log "task ran successfully"). Return NULL (actual NULL, not '' or 0) to not log (which will be most cases). * If an error occurs which means the task could not finish running, throw an \IPS\Task\Exception - do not log an error as a normal log. * Tasks should execute within the time of a normal HTTP request. * * @return mixed Message to log or NULL * @th…
Last reply by Stuart Silvester, -
- 1 follower
- 2 replies
- 400 views
Hi! I receive this error when try to edit or add physical package item in invoice in ACP. Edit or add comissions, and other items are ok. Error only when adding/editing package item. Problem and in version 4.6.7, and in version 4.6.8. Where can I look to solve this problem? Thanks Error: Access to undeclared static property: IPS\nexus\extensions\nexus\Item\ShippingCharge::$arent (0) #0 /var/www/u1463182/data/www/fashionproduct.ru/test/applications/nexus/sources/Invoice/Item/Item.php(375): IPS\nexus\Invoice\_Item->__get('arent') #1 /var/www/u1463182/data/www/fashionproduct.ru/test/applications/nexus/extensions/nexus/Item/Package.php(516): IP…
Last reply by Stuart Silvester, -
- 1 follower
- 1 reply
- 414 views
4.6.7 All 3rd party apps/plugins disabled Issue: "Too many redirects" blank page when attempting to manage a purchase with a 'YesNo' field type that has the 'Used to identify purchases?' option set. (you're not supposed to be able to set this option for a 'YesNo' type) Repro: Create a nexus custom field with Field Type of Text, and specify 'Used to identify purchases?' Assign the field to a package, and generate a purchase with said package in it. Go to Manage Purchases, confirm the purchase can be managed. Change the field type to 'YesNo' (or some other type that doesn't use the 'Used to identify Purchases' toggle) Attempt to ma…
Last reply by Stuart Silvester, -
- 1 follower
- 7 replies
- 962 views
Does anyone know how I could hook into the 'Approve' button in Transactions? So when I click approve, it would also send a request to my payment api to approve it if set in review. Was hoping there would be an alternative to public function refund( \IPS\nexus\Transaction $transaction, $amount = NULL ) but for approval
Last reply by IPCommerceFan, -
- 2 replies
- 453 views
I am trying to use the /core/search Endpoint and want to search for things starting after a certain date. To do this, I think I should be using the start_after parameter. But the type of data passed in the documentation is just documented as string which is not very helpful at all. What format is this expecting?
Last reply by IPCommerceFan, -
- 4 replies
- 1k views
Is there any endpoint in the REST API to get clubs for a specific members? The other way around is mighty inefficient with lots of members per club…
Last reply by Roboko, -
- 3 replies
- 754 views
I own a license for IPS and have it installed on a Production Server. I wanted to try my hand at some plugin development, so I want to install a copy of IPS locally in development mode. So I installed XAMPP on my computer and put in a copy of IPS, added the development tools files and added my constants.php defining IN_DEV true. The installer requests my license key, which I enter, but then tells me an installation is already activated. I think it's a reasonable expectation that I should not need to purchase another license just to do some plugin development - Is there something I am missing here?
Last reply by Roboko, -
- 1 follower
- 1 reply
- 390 views
When viewing a nexus invoice on the front end for a physical product, Pending shipping items show the nexus pfield ID instead of the name: If we change this in nexus -> front -> clients -> invoice (line 220): <span class="ipsType_light"> {{foreach $item['details'] as $k => $v}} {lang="$k"}: {$v}<br> {{endforeach}} </span> To this: <span class="ipsType_light"> {{foreach $item['details'] as $k => $v}} {lang="nexus_pfield_$k"}: {$v}<br><br> {{endforeach}} </span> We get this: Thanks!
Last reply by Stuart Silvester, -
- 4 followers
- 14 replies
- 2.1k views
Hello, I'm trying my hand at setting up google tag manager and I wish to return as many useful values as possible. I had success with this code to determine member group by putting this {expression="\IPS\Member::loggedIn()->member_group_id"} I tried looking in templates for other things to gather using this way but I was only able to find rank score. That's it. Does anyone know any other values like rank title. Registration date and similar? using {expression="\IPS\Member::loggedIn()->some_value"} I'd take these variables that are returned and put them as variables in the dataLayer part of google tag manager script.
Last reply by Maxxius, -
- 6 replies
- 862 views
Hi all, I've been trying to make my own plugin that creates threads automatically when a new gallery image or album is posted for the last few days but I am stuck on the form for each category. For whatever reason that data does not load the data back onto the form but it does save onto the database. This is what I have for formatFormValues: public function formatFormValues( $values ) { $values = parent::formatFormValues( $values ); if ( $this->id ) { $save = array( 'threadgen_gallery_forum_on' => (int)$values['threadgen_gallery_forum_on'], 'threadgen_gallery_category_id' => $this->id, 'threadgen_gallery_forum_id' => $v…
Last reply by flashpoint,