Developer Connection
Use this forum to interact with our development team on technical issues, suggestions and official best practices advice.
1,680 topics in this forum
-
- 1 follower
- 9 replies
- 499 views
Hi, I'm trying to create an OAuth2 plugin for a third party application to use IPS 4.5 as an authentication server via OAuth2. I'm following this guide: https://invisioncommunity.com/developers/rest-api It's a bit unclear what the request to call api/core/me should look like and my attempts so far have not been successful. After agreeing to login using IPS, clicking continue, I'm redirected to the third-party application, which returns an error: invalid_client. This is generic and I'm not sure coming from IPS. There is nothing logged within the REST/API log in the ACP. After getting redirected to the third party app, I'm sending a request to https://&l…
Last reply by CoffeeCake, -
- 1 follower
- 1 reply
- 336 views
I realized i made a mistake after uploading a new version of my application that I need to correct. How can i cancel the "review" process so that i can upload the proper file?
Last reply by Daniel F, -
- 2 followers
- 10 replies
- 330 views
When you have a database, you can set the listing template, however if you use categories, the category "listing" template will override this setting. so if you have a database and want the whole database to use a new listing template, you'd have to go set each and every category to use the new template, instead of it using the one for the db. this is backwards. the category should have a setting in it to override the database setting instead. most of the time if i am changing a listing template group for a client, its not going to be for 1 category, it will be for the entire database. under the current system, i have to go in and change each and every category to us…
Last reply by bfarber, -
- 2 followers
- 1 reply
- 331 views
Can you please add a 'lang' parameter to the Pixabay API request? And add it as class property, so we can overwrite it using hook.
Last reply by bfarber, -
- 1 follower
- 1 reply
- 347 views
Hello, I'm trying to create an "Edit in ACP" button on the user profile headers. This is the template code I have so far: {{if \IPS\Member::loggedIn()->isAdmin() }} <li> <a href='{url="app=core&module=members&controller=members&do=view&id={$member->member_id}" base="admin"}' class='ipsButton ipsButton_overlaid'> <i class='fa fa-pencil'></i> <span class='ipsResponsive_hidePhone ipsResponsive_inline'> Edit in ACP</span> </a> </li> {{endif}} However after following the link and being…
Last reply by bfarber, -
- 2 followers
- 1 reply
- 276 views
I noticed that in a few places you're hacking around support for lower case (http2) headers, and there are a bunch of places where you don't handle them correctly. Is there a reason that you're not lowercasing all headers when storing the headers (and also storing the originals for back compat)? eg there are a bunch of places where you test for $response->httpHeaders['Location'] || $response->httpHeaders['location'], but if you standardise them then you can just test one. You already standardise location, but you may as well do it for everything then deprecate the upper case ones.
Last reply by bfarber, -
- 4 followers
- 13 replies
- 3.5k views
We have removed the session id from the ACP urls, meaning that you have to make sure to use CSRF protections in all your methods which change a state! We also advice to use \IPS\Request::i()->confirmedDelete() in all your methods where you're deleting data! One of the few examples from the MP reviews is this code: protected function approve() { if ( !\IPS\Request::i()->id ) { \IPS\Output::i()->error( 'node_error', '2myApp', 404, '' ); } $a = \IPS\myApp\Item::load( \IPS\Request::i()->id ); $a->open = 1; $a->save(); /* Log History */ \IPS\myApp\History…
Last reply by Mark, -
- 6 replies
- 648 views
Hello, I'm working on a oauth application, where I'm trying to retrieve information about the user that has logged in: https://invisioncommunity.com/developers/rest-api?endpoint=core/me/GETindex Currently, I get the information without they key icon in front of it. When I hover over the key icon, it says: "Only available when the request was made using an API key, or an oAuth Access Token obtained with the Client Credentials grant type" So I assumed I had to enable the option "Client Credentials" under "Available Grant Types", which I did. So what I do now is the following: 1. I send the user to: https://www.host.com/oauth/authorize/?response_ty…
Last reply by Kappa0xc0035fd6, -
- 3 followers
- 3 replies
- 369 views
I want to check my code into git, and be able to get started on a new install fairly easily by just cloning it. This lends itself well to collaborative environments, being able to easily recover from scrapping and restarting development environment, and potentially even CI workflows. I also currently deploy my code using git. For apps, it's great. I just clone my repo, click an install button in ACP, and I'm good to go. For plugins though, it really sucks: Hook information isn't stored in a file anywhere, so in order to check in enough information to reinstall the plugin I would need to download the xml, copy it back to my plugin dir, then commit that too …
Last reply by Colonel_mortis, -
- 2 replies
- 293 views
Hi all. It will sound strange to you but, even if I know how to developp with standard langage like C++, QT and so one, I can't even make a if working fine on my theme.... I tried a basic thing that did not work : {{if {$value} == 'yes'}} <b> OK! </b> {{endif}} (to only show something if a checkbox is selected) And it did not work at all 🙂 So I am looking for some kind of documentation to allow me to stop bothering you at each problem I have 🙂 Thanks in advance. Florian
Last reply by bfarber, -
- 2 followers
- 8 replies
- 369 views
Hi, In a Plugin Settings form, I can add text, with HTML formatting etc by using: $form->addMessage('mymessage'); and a language string: 'mymessage' => "<p>Thinking bout burgers.</p> <p>I wish I had one, right now. I'd eat it all up. With onion rings of course.</p>" This works, but if I try to insert tags for a hyperlink to open in a new tab/window such as for example: <a href="https://www.w3schools.com" target="_blank" title="Visit W3Schools (in a new tab/window).">Visit W3Schools</a> ... it refuses to display the form. I recall HTML is filtered automatically, so entering raw is okay. What is th…
Last reply by The Old Man, -
- 1 follower
- 1 reply
- 406 views
I remember there used to be a list of devs that were for-hire on this website. Where did it go? And if it doesn't exist does anyone know of any good theme designers for hire?
Last reply by Sonya*, -
- 4 replies
- 266 views
I’ve tried passing the purchases template from nexus in a block but with no luck . I want to display purchases displayed in the my purchases page Which is shown on the url My site.com/clients im guessing it’s because the page controller is missing (cms rather than nexus) and the $purchases variable is not passed . Is there an easier way of doing this ?
Last reply by Mark Round, -
- 5 replies
- 299 views
Hi all. I'd loved to put some private fields in my Our Picks preview. I found the right place to do it : <div class='cPromotedWidgetItem_contentInner'> {{if $text = $item->getText('internal', true)}} <div class="ipsType_richText ipsType_medium ipsSpacer_both ipsSpacer_half">Note : {$item->customFieldDisplayByKey('my_key', 'display')|raw}</div> <div class="ipsType_richText ipsType_medium ipsSpacer_both ipsSpacer_half" data-ipsTruncate data-ipsTruncate-type='remove' data-ipsTruncate-size='4 lines'>{$text|raw}</div> {{e…
Last reply by Poseidon2, -
- 1 reply
- 234 views
Is: /** * @brief Cache Expiration * @note We allow this cache to be valid for XX hours */ public $cacheExpiration = XXXXX; still valid? I see it was removed from Calendar Upcoming Events widget. I also use it in one of my resources.
Last reply by Ryan Ashbrook, -
- 3 replies
- 267 views
Can you please add: /** * @brief Has been CSRF-protected */ public static $csrfProtected = TRUE; to the files "templates" in applications/core/data/defaults: ControllerBlank.txt ControllerList.txt ControllerNode.txt when the location is admin. Thank you.
Last reply by Adriano Faria, -
- 1 follower
- 3 replies
- 314 views
I have code in topicRow: {{if \count( $row->reactBlurb() ) and theme.fluent_forums_reaction}} <div class="ipsDataItem_generic ipsReactOverview ipsReactOverview_small ipsType_light"> <ul> <li class="ipsReactOverview_repCount"> {expression="\count( $row->reactions() )"} </li> {{foreach $row->reactBlurb() AS $key => $count}} <li> {$key} {{$reaction = \IPS\Content\Reaction::load( $key );}} <a href='{$row->url('showReactions')->setQueryString( 'reaction', $reaction->id )}' data-ipsDialog data-ipsDia…
Last reply by Adriano Faria, -
- 3 replies
- 422 views
Hello, When I run this line: ($tab has the value of 'comments') $record->commentReviews( $tab ); I get the following error: My guess is it throws the error when it hits this line in Records.php: return \IPS\cms\Theme::i()->getTemplate( static::database()->template_display, 'cms', 'database' )->comments( $this ); Can't figure out why this is happening though. Am I missing a step? I do run init.php already beforehand.
Last reply by bfarber, -
- 4 replies
- 267 views
Hello, How to add new actions in the comment multimod actions menu? You have /** * Actions to show in comment multi-mod * * @param \IPS\Member $member Member (NULL for currently logged in member) * @return array */ public function commentMultimodActions( \IPS\Member $member = NULL ) { Looks like I can use this. \applications\forums\dev\html\front\topics\post.phtml {{if \count( $item->commentMultimodActions() ) and !$comment->mapped('first')}} <li class='cPost_moderator'><span class='ipsCustomInput'> <input type="checkbox" name="multimod[{$comment->$idField}]" value="1" data-role="moderation"…
Last reply by bfarber, -
- 8 replies
- 350 views
Are their any guides or tutorials on use of the Links Directory? I'm fairly new to the IPS system so everything is a mystery to me. I'm not sure how to: 1) Add the Links Directory to my site 2) Add links to the page As an alternative to the links directory, I'm wondering if there is a "news" plugin of some kind that I could use to link to news stories relevant to my site's subject (college sports recruiting). And if there was such a plugin, I probably wouldn't know how to install it or place it on the site, lol. Any guidance would be greatly appreciated! - Pat
Last reply by Admin 1, -
- 3 followers
- 17 replies
- 591 views
It seems that I have a lot of duplicate translation strings in my database. The following queries on the database with two languages returns 815 entries. SELECT word_key, COUNT(word_key) FROM `core_sys_lang_words` GROUP BY word_key HAVING (COUNT(word_key) != 2) Some strings exist only in one language (lang_id = 2), another are doubled, tripled and even more like "by": 4 I assume that this has happened because the translation has been started some versions ago. Unused strings have been never deleted and have been imported again and again while uploading a language file. This causes issues with translation, as strings with word_keys that are used multiple t…
Last reply by bfarber, -
- 2 followers
- 6 replies
- 1.3k views
Hi guys! I'm currently making a GameMode for one of GTA5 multiplayer platform (RageMP) And i'm trying to make an authorization with the same credentials as on IPS forum. It means that all credentials must be validated & checked on the servers side witch means it must be a C# method of some sort. Is there anyway to create that validation? Or is there other way around it? Thanks in advance!
Last reply by bfarber, -
- 2 replies
- 332 views
Hello, I'm trying to get a CMS record in a custom PHP script using: \IPS\cms\Records::loadFromSlug($id, false); But I am getting the following error: The problem seems to be when this gets executed: $this->container()->forum_override I don't know what the issue could be. Any ideas?
Last reply by Tom S., -
- 2 replies
- 332 views
Hello, I'm trying to create an extension following this guide: It says: But I don't fully understand it (maybe providing a quick example of setting one up might help 🙂 ). Am I suppose to create an extension as part of a plugin? And if so does that mean I have to create it as a hook? But I thought those are different so I'm confused. I want to create an extension for MemberSync so that I can run custom code when a user is created/deleted etc. Any guidance would be appreciated, thanks!
Last reply by Miss_B, -
- 2 followers
- 2 replies
- 327 views
\IPS\Lang : 654 if ( \in_array( $k, array_keys( $this->words ) ) ) Maybe it is better to use \array_key_exists? if ( \array_key_exists( $k, $this->words ) ) I get this error when using CheckboxSet with multiple = true and member groups as options:
Last reply by Ilya Hoilik,