Developer Connection
Use this forum to interact with our development team on technical issues, suggestions and official best practices advice.
1,678 topics in this forum
-
- 1 follower
- 3 replies
- 191 views
Can anybody tell me the {{ if }} statement for if a certain app is installed
Last reply by TheJackal84, -
- 6 replies
- 386 views
Im trying to upload files via the REST Api but the file gets corrupt. Code: $handle = fopen("/home/test/test.pdf", "r"); $contents = fread($handle, filesize("/home/test/test.pdf")); fclose($handle); $post = array( 'category' => 4, 'author' => 2, 'title' => 'Test', 'description' => 'Test', 'files' => array('test.pdf' => $contents), ); $target_url = 'https://example.com/api/downloads/files'; $ch = curl_init(); curl_setopt($ch, CURLOPT_TIMEOUT, 86400); curl_setopt($ch, CURLOPT_URL,$target_url); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post)); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_seto…
Last reply by felix21, -
- 1 follower
- 7 replies
- 293 views
The title sounds hysterical, actually. It's screaming for snarky responses. Please don't give me snarky responses. I have a button that opens a dialog with a small form for the users to fill out. <a href="{$project->url()->setQueryString( array( 'do' => 'export', 'export' => 'fasta' ) )}" data-ipsDialog data-ipsDialog-title="{lang="project_export_fasta"}" data-ipsDialog-size="medium">{lang="project_export_fasta"}</a> When the user fills out the form and presses Save, the application generates a text file and downloads it. Now... how do I get the dialog to close after that file is downloaded? It just sits there and keeps spinning. …
Last reply by BomAle, -
- 1 follower
- 6 replies
- 325 views
Hi, I have a database "ingredients" which is linked to a number of times from my other databases. For some strange reason, I am absolutely not able to list reciprocalitems on the display page. I have tried multiple times to changes templates to see if that had any effect but nothing is happening. The code in my template is: <div class='ipsPageHeader ipsClearfix ipsPad'> <div class='ipsPos_right ipsResponsive_noFloat ipsResponsive_hidePhone'> {template="follow" app="core" group="global" params="'cms', 'records'.$record::$customDatabaseId, $record->primary_id_field, $record->followers()->count( TRUE )"} </div> <h1 c…
Last reply by Jacques Corby-Tuech, -
- 1 follower
- 2 replies
- 248 views
Hey, I am running a mobile game forums and some popular streamers offered to do advertisements during their streams. Hence we expect very large peaks where a lot users will register and/or authenticate. I know that the password hashing procedure (login or register) takes a lot CPU and we've measured that our dedicated server (4c / 8t) can perform 10 hashes per second which is not enough for our case. However the server is able to handle ~2k concurrent users. Because of this scenario I wonder if it's possible to add an external server which is primarily busy with creating the hashs to compare/insert them against the Database. Maybe you've got better suggestions t…
Last reply by bfarber, -
- 1 follower
- 3 replies
- 325 views
I am seeing: Sorry, there is a problem The page you requested does not exist Error code: 1S160/2 when my script (essentially copy/pasted from the LinkedIn auth.php) does: if (isset(\IPS\Request::i()->error) and \IPS\Request::i()->error) { \IPS\Dispatcher\Front::i(); if (\IPS\Request::i()->error == 'access_denied') { \IPS\Output::i()->error(htmlentities(\IPS\Request::i()->error_description, ENT_QUOTES | \IPS\HTMLENTITIES, 'UTF-8', false), 'E400', 403); } else { \IPS\Output::i()->error(htmlentities(\IPS\Request::i()->error_description, ENT_QUOTES | \IPS\HTMLENT…
Last reply by HeadStand, -
- 2 followers
- 5 replies
- 274 views
I'm not quite sure where to post this, so I'm dumping it here. Is it possible to please pay closer attention to the PHPDoc on methods? Particularly the return type. If the return type is not correct, it makes it really confusing in an IDE. Example: From \IPS\Content\Search\Query /** * Create new query * * @param \IPS\Member $member The member performing the search (NULL for currently logged in member) * @return \IPS\Content\Search */ public static function init( \IPS\Member $member = NULL ) { return new \IPS\Content\Search\Mysql\Query( $member ?: \IPS\Member::loggedIn() ); } Return type there should be \IPS\Content\Search\Query, not \IPS\Content\Sea…
Last reply by HeadStand, -
- 1 reply
- 263 views
In the Downloads application, is it possible to hook to provide screenshots automatically, based on the uploaded file? The files I am receiving are in a format that a screenshot could potentially be generated from. Thanks!
Last reply by bfarber, -
- 1 follower
- 8 replies
- 252 views
Last reply by newbie LAC, -
- 1 follower
- 6 replies
- 415 views
So I have noticed on my test site when I hook into \IPS\nexus\Package , using $purchase->id returns the wrong number. From what I understand its supposed to be t_id from nexus_transactions but isn't. 1274 is the actual number, but returns 964 when called. I have tried to bring this up in a ticket but was shrugged off by support. Edit: when targeting invoice->id that returns the correct invoice number.
Last reply by HeadStand, -
- 1 follower
- 1 reply
- 282 views
I am loading a created form with multiple tabs (each tab contain some form inputs) via Ajax. Unfortunately all the content is visible (instead of being inside in each tab). I assume this is happening because the Javascript for the tabmenu is not loaded on the page from where I am doing this Ajax request. How can I make sure all required Javascript files for the generated form elements will be loaded as well? I tried to figure out what JavaScript files are missing for my tabmenu but I failed. There are so many javascript controllers/files loaded it's hard to find the missing ones. Maybe anyone can provide a proper solution for my problem?
Last reply by BomAle, -
- 6 replies
- 561 views
I am afraid this is a very specific question, but I am stuck with this problem. I am building a tab based page, which is very similiar to the userpanel: I am also a function for each area (sessions, statistics, ...) and I return a template each function which will be inserted into the content area (if it's an ajax request). As you can see in this screenshot I am building a "\IPS\Helpers\Table\Custom". The problem is: Every time I click the sessions tab a second time it will trigger a full page reload. I don't experience this behaviour with other tabs, I expected that it doesn't reload/request anything at all after the tab content has been initially loaded. …
Last reply by bfarber, -
- 3 replies
- 250 views
Ok so I am creating a plugin for the user info panel on the topics and its basically a social info block, I have gone for adding the custom fields via the database on installing the plugin as it is the only way I have figured out how to add custom fields without having the user have to go into admin settings and manually add the custom fields to the members profile. Here's part of the install code public function step1() { \IPS\Db::i()->insert( 'core_pfields_groups', array( 'pf_group_id' => 998, 'pf_group_order' => 998, ) ); \IPS\Db::i()->insert( 'core_pfields_data', array( 'pf_id' => 9995, 'pf_content' => '[]', …
Last reply by bfarber, -
- 1 follower
- 3 replies
- 205 views
When try to add new version if the last version is not that format n.n.n like 1.0.2 Beta 1 the code throw a expection. to fix I have edited: $defaults['human'] = "{$exploded[0]}.{$exploded[1]}." . ( $exploded[2] + 1 ); into $defaults['human'] = "{$exploded[0]}.{$exploded[1]}." . ( intval( $exploded[2] ) + 1 );
Last reply by bfarber, -
- 1 follower
- 4 replies
- 247 views
How do I remove calendar events from the feed "all activities"?
Last reply by bfarber, -
- 1 reply
- 176 views
So if I were to sync username from a service for a login handler (like a xbox live gamertag ; which is changeable) what would I be looking for and is it possible to save the name change?
Last reply by newbie LAC, -
- 3 replies
- 357 views
So, it appears I am missing a template when trying to view a container node: BadMethodCallException: NO_TEMPLATE_FILE - /Users/ryan/Code/Sites/thegaminglist/applications/core/dev/html/front/trees/row.phtml (0) This file does not exist in the developer sdk for 4.1.19.1 (latest). Am I missing something?
Last reply by Adriano Faria, -
- 1 reply
- 236 views
Hello, Widget settings validation doesn't work. Code public function configuration( &$form=null ) { if ($form === null) { $form = new \IPS\Helpers\Form; } $form->add( new \IPS\Helpers\Form\Text( 'custom_validate', isset($this->configuration['custom_validate']) ? $this->configuration['custom_validate'] : null, false, array(), function($val) { if ($val == 'bad') { throw new \InvalidArgumentException('form_bad_value'); } } ) ); $form->add( new \IPS\Helpers\Form\Text( 'required_field', isset($this->configuration['required_field']) ? $this->configuration['required_field'] : nu…
Last reply by bfarber, -
- 1 follower
- 3 replies
- 220 views
Hello. Hiding in data-ipsTruncate widget is not working with ipsContained class. For example: <div class="ipsType_medium ipsType_textBlock ipsType_richText ipsContained" data-ipstruncate="" data-ipstruncate-type="hide" data-ipstruncate-size="6 lines"> <p>Some VERY long text...</p> </div> And as a result I got this: So, I have selected 'truncate up to 6 lines', but the result is different. When I click 'Read more' the button just disappear. @Rikki is it a bug? If not, then how to get around this problem?
Last reply by Kirill Gromov, -
- 2 replies
- 230 views
Found a bug, running version 4.1.19.1; to recreate: Open Edge browser With new account or an account that has not submitted a profile photo or make any setting changes to the profile photo option, click your account name -> Profile Click on image to change your profile photo Select upload photo, and try to choose single file. Nothing shows up in edge browser. Tested in IE, FireFox, and Chrome. All those three worked. The workaround: Choose "No Photo" from options Save Try to upload photo again
Last reply by bfarber, -
- 17 replies
- 687 views
Hi, we're trying to update a custom bank/shop app from 3.4.7 to work with 4.1.18 after we upgrade and are having a hard time working out how to connect to the database - especially pre-existing tables created for the 3.4.7 app. Current example, using this query: $userMoney = iterator_to_array(\IPS\Db::i()->select('*','ssb_bankacc')); it only displays '1' with print_r() which, to my understanding, means the array is empty. But the table is not empty. But if I replace 'ssb_bankacc' with 'core_groups', I do get back data from the table that displays with print_r() Has anyone had issues with added database tables when using the \IPS\Db::i() function…
Last reply by AuntyNem, -
- 1 follower
- 2 replies
- 219 views
@Rikki @Mark can you or others show me a example to got updated serialized input for javascript ckeditor and codemirror? I don't see any example here: https://invisionpower.com/4guides/themes-and-customizations/javascript-framework/using-utility-modules/ but I have found some example from streams controller like: this._formData = ips.utils.form.serializeAsObject( this.scope.find('form'), this._serializeConfig ); where this._serializeConfig = { 'stream_date_range[start]': this._serializeDate, 'stream_date_range[end]': this._serializeDate }; /** * A function which will be passed into the serializeAsObject function so that * we can format dates con…
Last reply by BomAle, -
- 1 follower
- 2 replies
- 225 views
I'm looking for an overview of all the basic styling classes available within the default theme that can be reused everywhere. For example any special padding classes, button classes, etc. Is there a list or any documentation available somewhere or do I have to dig through the stylesheets manually?
Last reply by Jacques Corby-Tuech, -
- 9 replies
- 519 views
Hi, I am writing a plugin for the marketplace here which will display a different store layout/listing. Apparently I am not completely understanding how Node Models work. It's basically about these lines which I have commented: <!-- Get all packages which the member is allowed to view --> {{$packages = \IPS\nexus\Package::roots();}} {{foreach \IPS\nexus\Package\Group::roots() as $group}} <!-- Check if this group has packages and if member is allowed to view at least one package --> {{if $group->hasPackages()}} Show package {{endif}} {{endforeach}} What I have expected to happen is described in the above comments, but what ac…
Last reply by inkredible, -
- 0 replies
- 200 views
Hallo, has anyone already implemented a login/autologin in a mobile app or from external website? I need to login/register and save that data on the phone. Are there some examples, where to start?
Last reply by Batnik,