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
- 1 reply
- 369 views
I'm moving the search box to be on the same line as the top breadcrumb. When doing so I noticed a difference in the HTML markup between the list items that were already there and added by javascript when you click "More options…" When you open the search on this community, the first item is: <li> <span class="ipsSideMenu_item ipsSideMenu_itemActive" data-ipsmenuvalue="all"> <input type="radio" name="type" value="all" checked="" id="elQuickSearchRadio_type_all"> <label for="elQuickSearchRadio_type_all" id="elQuickSearchRadio_type_all_label">Everywhere</label> </span> </li> And the Topics-item has the same HT…
Last reply by bfarber, -
- 1 follower
- 5 replies
- 1.4k views
Hello, Does IPS suite have any preferred built-in classes and methods to allow plugins and apps to communicate with third party service REST API endpoints? Thank you.
Last reply by The Old Man, -
- 1 follower
- 3 replies
- 422 views
Hello, Please can you confirm from a newbie perspective whether it is possible to use a 3rd party PHP SDK such as Amazon SDK within a Marketplace acceptable plug-in? If so, if you have multiple plugins or apps that use it, does it get stored in one 'shared place' to avoid unnecessary duplicates? Or would namespacing it be advisable. What would be the preferred best practice? Many thanks.
Last reply by bfarber, -
- 1 follower
- 3 replies
- 364 views
I'm updating one of my apps, and it has a ton of ajax request, and i've done this in the execute method of my controllers: if( Request::i()->requestMethod() !== 'GET'){ Session::i()->csrfCheck(); } as all my POSTs are for state changes and my GETs aren't (so basically any http request that isn't a GET will hit the csrfCheck). from my testing, it appears to be effective, or should i be putting the csrfCheck into each method of the controller that needs to check it?
Last reply by CodingJungle, -
- 1 follower
- 1 reply
- 364 views
I've had a custom widget where the code for the configuration-method contains a header. This works in 4.4, but in 4.5 it fails (at least when IN_DEV is active). <? public function configuration( &$form=null ) { if ( $form === null ) { $form = new \IPS\Helpers\Form; } $form->add( … ) … $form->addHeader('livefeed_forumsettings'); $form->add( … ); … return $form; } The error is: Trying to get property 'name' of non-object And is caused by the logic in applications/core/dev/html/front/widgets/formTemplate.phtml: {{if $input->name and \mb_substr( $input->name, 0, 12 ) != 'widget_adv__' and ! \in_array( $inpu…
Last reply by bfarber, -
- 0 replies
- 1.7k views
Deprecation of the interface directory In order to ensure Invision Community is compatible with modern cloud infrastructures we are deprecating the use of the interface directory in favour of a proper front loader system. We're working on a new solution which will allow HTTP requests to the interface directory. This means, any JS, HTML, GIF files uploaded there will work, even PHP will work, BUT you'll have no access to the IPS framework there. Last months common submission issues: All in all the quality increased, but there are still 2 common issues which are worth to be mentioned. Versions (again) 😉 Please try to pay more attentio…
Last reply by Daniel F, -
- 2 followers
- 10 replies
- 811 views
I have some question to CMS templates included into app: 1. Is it intentional that CMS templates delivered with the application are not removed if application is uninstalled? 2. If it is supposed that deleting must be handled in Uninstall extension manually, how do I know what templates belong to the app? I can see the field template_app in cms_templates table. However there is no value in it for any template. Is there any mapping table or function to get all templates that belong to the app? 3. If the application is uninstalled and the templates are still there and I try to install the application again, I get the error: The error persists until I…
Last reply by bfarber, -
- 1 follower
- 4 replies
- 497 views
I am beginning to think I am unlucky here. So far, just about every IPB install has gone the way of the dinosaur while in development mode. With errors like: [[Template core/admin/global/globalTemplate is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]] There is either missing css or missing template files when in developer mode. So far, I have had to reinstall my localhost developer build 5 times and it has just happened again. I didn't even get to the stage of installing my applications or plugins, installed, turned on dev mode and I got the above error. I have downloaded the I…
Last reply by bfarber, -
- 1 follower
- 3 replies
- 475 views
I'm going to use this thread for reporting minor API bugs (still using the forums as my support area is still bugged and I can't submit or reply to support tickets.) POST /api/core/members/{id}/follows :: Does not update the front-facing following counter for content items when a member is added through the API datetime fields do not accept timestamp inputs >>> $r = $api->system()->members()->addWarning(49, ['moderator' => 1, 'reason' => 'For <strong>science</strong>', 'points' => 2, 'memberNote' => 'you food', 'moderatorNote' => 'they food', 'modQueue' => -1, 'expire' => 1601742513]) InvisionApi/E…
Last reply by bfarber, -
- 1 follower
- 1 reply
- 362 views
It is possible to send variables to templates using this exemple code: {template="includeCSS" app="core" group="global" location="global" params="VARIABLES"} Is it possible to send variables to a raw php Pages block? {block="my_block_key" params="VARIABLES"}
Last reply by bfarber, -
- 5 replies
- 400 views
4.5.3 You do not account for all screenshot image copies; specifically you do not move the original not-watermarked screenshot images when those files are watermarked. record_no_watermark is not accounted for during the move process End result is record_location and record_thumb files are moved, but record_no_watermark, the only copy of the screenshot not watermarked, is left behind. If the actual OLD file storage location is still valid, that record_no_watermark file will still be retrieved as the file and url remain valid since they were not moved. Obviously nothing ideal happening here though.
Last reply by bfarber, -
- 1 follower
- 1 reply
- 490 views
The "hide" option when deleting a member via the API does not seem to work as intended. Posts are left visible and unhidden even when specifying this parameter. The delete action works as intended, however.
Last reply by bfarber, -
- 1 follower
- 4 replies
- 431 views
From within a plugin, I want to establish the status of a file storage setting. Is it possible to check what or if a Storage Setting Configuration is set to either local or remote S3 storage for a specific file category (say custom emoji, reactions, or theme resources etc)? If so how can I do this? Many thanks.
Last reply by The Old Man, -
- 5 followers
- 1 reply
- 438 views
XRegExp is 135KB when minified as part of root_library.js (that whole bundle is only 383KB, so it's a significant chunk), but it's only used in two places: In ipsautolink/plugin.js, it's just used to evaluate a native JS regex, which I believe is totally unnecessary (use this.urlRegex.test(text) instead!) In ips.search.results.js, where it's just used to replace using a native JS regex (use $(this).text().replace(new RegExp(...), '...') instead, as you do for each subsequent replacement in that chain) (while you're at it, why does that code replace with HTML, HTML escape everything, then selectively unescape the content you just added?!) Removing those two…
Last reply by bfarber, -
- 1 follower
- 9 replies
- 643 views
I have 2 PHP scripts, One i made to display a table with Variables from a table in MySQL. its just to display, no comments, no ad-dons, no adding, nothing special like that, as the system itself takes changes straight from GitLabs and just posts the changes to our website database. The problem I am having is, i want to be able to display these entries on my site, I got the admin able to remove the entries, but when i try doing the front end (Just to show the values) i keep getting errors cant see database, and such. I am not new to PHP but newer to developing IPBoard Applications, so please bare with me. I have 2 options on my side. Opt…
Last reply by sobrenome, -
- 1 follower
- 3 replies
- 412 views
<?php /** * @brief Notification Options * @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a> * @copyright (c) Invision Power Services, Inc. * @license https://www.invisioncommunity.com/legal/standards/ * @package Invision Community {subpackage} * @since {date} */ namespace IPS\{app}\extensions\core\Notifications; /* To prevent PHP errors (extending class does not exist) revealing path */ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) ) { header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' ); exit; } /** * Notification Options */ class _{class} { /** …
Last reply by bfarber, -
- 2 replies
- 399 views
Hello, when developing my custom Invision applications, useful IDE features (like code completion/navigation) are really hampered by the monkey patching as my IDE can't resolve \IPS\Member to the relevant "_Member" class. Do the internal IPS team (or anyone) have a solution to this? I use the PHPStorm IDE and couldn't find a way to manually configure it to look for these class names. It's quite frustrating when you're used to these IDE features that speed up development... so thought I'd reach out to see if anyone has a solution, or uses a different IDE that can handle this scenario. Thanks!
Last reply by CTRoss, -
- 5 replies
- 526 views
I'm working on a plugin with a CSS file, and some of the values in this file comes from the plugin settings. What I need is a way to rebuild the CSS files (custom.css?) when the plugin settings are changed. With my current code I'll have to edit my theme and save custom.css (without making any changes) for the new values to show up. There must be a better way?
Last reply by bfarber, -
- 1 follower
- 9 replies
- 559 views
Hey IPS, What is the best way to grab the location of a forum visitor? This is what we are trying to come up with. So we have products in the Store on our forum. The only payment method to buy these products are via PayPal. Some of these products have recurring charges, so the package gets renewed every 30 days, 90 days, or 180 days. However, if the individual lives in Germany, they have PayPal restrictions that prevent them from purchasing recurring products. So I want to grab the location of the user, if they are in Germany then I want to display a message on the store index stating the PayPal restrictions and to only buy the non-recurring products. What is the bes…
Last reply by sobrenome, -
- 1 reply
- 382 views
That's a plugin I just created, nothing on it: No version: Not exactly a bug but can lead us to confusion and export a plugin without version so if the plugin has new table or columns, it won't add without a version.
Last reply by bfarber, -
- 0 replies
- 1.5k views
Folks, please try to pay more attention to the version numbers you're using for your customisations! There's just another upset client who can't upgrade his file via the ACP - Marketplace because the system doesn't recognise the new upgrade release as "upgrade" because the recent version has long version 2800 while the old long version is 24344. I hope everybody here sees the issue?! The newer version is lower than the last version. Another common concern confusing clients and our backend is that some developers started going back with version numbers for their 4.5 releases. So from 1.4.2 ( 104020 ) they went back to 1.0.0 ( 100000 ) Personally, I would sug…
Last reply by Daniel F, -
- 2 followers
- 2 replies
- 536 views
How to filter by additional fields in a template? I cannot understand how to filter by additional fields in the "Featured Records (First page when viewing a database set to show featured articles)" template? Filtering (sorting) is available in the "Categories" template, but I can't do it in the news list ... Prompt or push on the right idea. Thanks in advance.
Last reply by Andrey S, -
- 1 follower
- 2 replies
- 411 views
Firstly, this was in the Tracker but it has been locked for us, so I'm going to post here as I'm not sure it will be addressed as a bug there. Anything I tried to add, in any place of the report template (\IPS\Theme\class_core_front_modcp::report), breaks the layout. Even a single letter or number, anywhere! See: Using: CSS Selector: #elReportSidebar Acition: Insert content inside the chosen element(s), at the start. Now a single letter in the beginning of the template: Basically, doesn't matter where I try to add my content, it always break the layout, reposition the sidebar boxes after the content. Correct view: …
Last reply by Gabriel Torres, -
- 1 reply
- 372 views
/** * Save translatable language strings * * @param string|int|\IPS\Application|\IPS\Plugin $appOrPlugin Application key or Plugin ID So alright, string or int. For plugins hitting the settings method or the uninstall routines will give us the plugin_id via the request var. \IPS\Lang::saveCustom( \IPS\Request::i()->id, 'muh_word', $values['muh_word_setting'] ); If you do that, you're setting things up for a bad time down the road. That will set both the word_app AND word_plugin entries, together, to the plugin_id value instead of NULL, plugin_id respectively. if ( $appOrPlugin instanceof \IPS\Application ) { $appOrPlugin = $appO…
Last reply by bfarber, -
- 1 follower
- 1 reply
- 396 views
I deleted a plugin's hook in the dev center, but it wasn't removed from hooks.json. It was caught by CI for me, but it's obviously not great.
Last reply by Daniel F,