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 follower
- 0 replies
- 2.2k views
Hi and welcome to our new series of updates for our contributors. We'll highlight the most common mistakes, ways to resolve them and also generic improvement suggestions once a month here:) As first, I want to apologies that some files took really long to get approved, but we really expected that new submissions and upgrades would have a better quality, but unfortunately >60% of the submissions ( 90% in the first week) were still not following the new marketplace guidelines, which resulted in a devils circle. Let's recap the last months issues resulting in rejections🙂 Core Database changes. Version details not changed. Us…
Last reply by Daniel F, -
- 1 follower
- 6 replies
- 1k views
I use `\IPS\Node\Model` to manage some things in my application, yet any time I save the form I get a CSRF error. I looked into the Security Considerations documentation and it only mentions that calling `$form->values()` will automatically handle CSRF, but it also only explains how to use CSRF for URLs, which aren't used with `\IPS\Node\Model` subclasses. The nodes example also doesn't mention anything about CSRF.
Last reply by MrFisc, -
- 3 followers
- 6 replies
- 452 views
I ran into probably a very "use" case scenario here, but here are the details. I was updating my app names 2 avatar, since we aren't allowed to append columns to the core tables any longer, i decided to move the columns i was appending to core tables to their own table, and then do a join onto that table for \IPS\Members\Clubs, \IPS\downloads\File and \IPS\Member. however this is where i ran into my problem. Since i had already had hooked these 3 classes in previous version of the app, the hooks were active at the time of an upgrade. however with how the hooking system works, the hook is eval'ed from the contents of the files found in applications/myapp/hooks/*…
Last reply by bfarber, -
- 1 follower
- 2 replies
- 632 views
All of the following testing was done on a production style ICS installation without `IN_DEV=true` or the developer toolset installed. It was just a naked ICS 4.5 installation with only my application installed as a third party application. The hook in question: //<?php /* To prevent PHP errors (extending class does not exist) revealing path */ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) ) { exit; } class ts3integration_hook_AppLogo extends _HOOK_CLASS_ { /* !Hook Data - DO NOT REMOVE */ public static function hookData() { return array_merge_recursive( array ( 'appmenu' => array ( 0 => array ( 'selector' => '#acpAppList', '…
Last reply by Ryan Ashbrook, -
- 1 follower
- 9 replies
- 701 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
- 439 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
- 421 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
- 443 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
- 425 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
- 372 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.9k 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
- 942 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
- 481 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
- 389 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
- 479 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
- 505 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
- 339 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
- 384 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
- 336 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
- 353 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
- 402 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
- 544 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
- 339 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
- 458 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
- 737 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,