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
-
- 4 followers
- 4 replies
- 415 views
In an app I'm developing I have the need to do a number range filtering on search results, for showing items where the price is between 100 and 200, for instance. Due to the insanely improved relevancy sorting you get by using Elastic over MySQL, we have to use Elastic. But how can I add my own data to the index? Looking at IPS\Content\Search\Elastic\Index::init(), that (as with the rest of the search classes) method does not offer an easy way to modify, only way is to duplicate the whole method in a hook. May I suggest two new indexes there? "index_extra_number" and "index_extra_string". Both for cases where 3rd party apps have a need to index additional data. …
Last reply by bfarber, -
- 2 replies
- 400 views
Hi, I'm in the process of finally migrating our custom 3.x apps to 4.x and have a form helper related question. We've got a few scenarios where we currently use a GET form for list filtering in order to retain params in the URL. From what I can see the Form Helper hard sets the method to POST for all forms. Digging through the code I noted that the in the Advanced Search feature (IPS\core\modules\front\search) a pseudo GET approach is taken by appending the relevant params and redirecting back to the form. I've followed the Advanced Search example, but am stuck on an issue.... The page receives the initial POST, appends the params and redirects as expected, …
Last reply by BikeHub, -
- 2 followers
- 5 replies
- 424 views
When an application is being uninstalled, all the admin gets is a prompt "Are you sure you want to delete?" While this is sufficient for many applications, there are use cases where Admins won't fully understand the implications of uninstall. Some may uninstall while performing diagnostics thinking their data is still safe. The specific example, I'm adding a login handler to my application. When uninstalling, I should technically remove the login handler from the DB, and delete all linked logins. That has the potential to KILL user engagement by effectively stopping all users, that created their account using the handler, from logging in. All those accounts would be…
Last reply by Aiwa, -
- 2 followers
- 4 replies
- 402 views
So, I reported this Dev doc, but I'm going to put the information here so others may benefit until the docs get updated. The getTitle() method, and the language key that it returns, is not actually used as the title of the login handler, I had plenty of WTF moments over the last day about this. Instead it's only the base for the _info, etc tags. What I've found is that you have to programmatically generate a login_method_{$id} language key right after you insert your login handler into the core_login_methods table. Keep track of the $id after doing your insert so you can create your language key. Then make the getTitle() function to do what the name implie…
Last reply by Stuart Silvester, -
- 8 replies
- 365 views
A lot of html just doesn't show up in mobile modes, etc.... despite me having no "hide" ie "show" options in. For instance, a sidebar with links.... In mobile mode, down below the rest of the page, it has the title of the sidebar, then nothing below it, ie no links showing up. There must be more to showing and hiding content in 4.x than those class options?
Last reply by Midnight Modding, -
- 2 followers
- 3 replies
- 369 views
Hi, Is there a way to stop users from reacting to content and then removing it. We recently started using this addon: And we use the reactions to unlock the issue is we have users who like the content, unlock the content grab w/e the content is and then remove the reaction. Is there a default way of disabling this in IPS 4? Is there any addons that stop this type of behavior? - TIA
Last reply by hankii, -
- 1 follower
- 5 replies
- 801 views
I'm trying to edit some templates using hooks, so I can change how the name of a member gets displayed, if he is in a certain group, so I'm using in a fair amount of templates, successfully, something like this: {{if $row->inGroup( $group = \IPS\app\Whatever::getGroup() }} Whatever {{else}} Actual primary group {{endif}} However, there is this specific template, with which I've been at it for hours now, and can't have it working: \applications\core\dev\html\front\widgets\activeUsers.phtml div.ipsWidget_inner.ipsPad > ul.ipsList_inline.ipsList_csv.ipsList_noSpacing.ipsType_normal as soon as I use something to "search" (inGroup(), in_array(), s…
Last reply by VectorPlexus, -
- 2 followers
- 6 replies
- 358 views
Does it only works only in ACP? This: <a href="{url="app=advmedit&module=display&controller=display&do=messenger&id={$member->member_id}"}" class="ipsPos_right ipsType_medium" data-confirm data-confirmType="verify" data-confirmIcon="question" data-confirmMessage="{lang="admin_disable_messenger"}" data-confirmSubMessage="{lang="admin_disable_messenger_confirm"}" data-confirmButtons='{expression="json_encode( array( 'yes' => \IPS\Member::loggedIn()->language()->addToStack('no'), 'no' => \IPS\Member::loggedIn()->language()->addToStack('yes'), 'cancel' => \IPS\Member::loggedIn()->language()->addToStack('cancel')…
Last reply by Adriano Faria, -
- 4 replies
- 317 views
At least since the upgrade to Invision Community v. 4.3.2 I experience problems with the menu manager. Though I can add a new item, I am not able to activate certain settings as the window right of the menu list does not show anything I could activate. Further, the live preview does not work, too. I tried it using the browsers Firefox, Internet Explorer, Microsoft Edge and Google Chrome. Has this already been reported as bug? And, if so, are you already working on this problem?
Last reply by Nobiliana, -
- 1 follower
- 0 replies
- 274 views
with the lovely GDRP(sp?) going into effect at the end of the month, and the MP API no longer will be sending push notifications with any identifiable info other than the user ID/username. now i have my babble chat application, it is a SAAS, its annoying to sale on the market here, cause 1 i don't have many "purchase options" and 2, i have to manually generate the license. this could have a delay of a few minutes to a few days (depends if it is a weekend, my schedule, etc). I had been planning on using the purchase api to handle this programmatically for me, but around the same time talk of how sacred an email address had become in 2017 and that the EU was movin…
Last reply by CodingJungle, -
- 1 reply
- 287 views
Recently I found myself using $ipsMember->acpUrl() to retrieve a url to the users profile in the acp, this works as one would expect, it returns some internal routing link to the users profile, atleast in theory. It produced a URL like this for example, but something wasn't working when I click the link from a page on my site, it was redirecting me to the members list in the adminCP, rather than the actual member profile in the adminCP : https://www.site.net/index.php?app=core&module=system&controller=redirect&do=admin&_data=YXBwPWNvcmUmbW9kdWxlPW1lbWJlcnMmY29udHJvbGxlcj1tZW1iZXJzJmRvPXZpZXcmaWQ9NjIwMw== Doing a little investigative wor…
Last reply by bfarber, -
- 3 replies
- 374 views
Hello guys! Any ideas, how i can hook in applications/nexus/sources/Subscription/Package.php? Is it even possible? Yes, i know, that i can edit directly in file, but every update will return to default.
Last reply by Daniel F, -
- 1 follower
- 2 replies
- 324 views
Hello, when try to show a template into Customization > themes module > forums > front > topics > topic I see: instead on development of plugin theme hook \IPS\Theme\class_forums_front_topics Note: the selector cTopic is broken when try to select it, it is not selectable. I have send a ticket about but them suggest me to ask here ? Anyone have same issue on developer mode enabled? PS: the image was taken on 4.1.18.2 but i have tested it on 4.3.1 yesterday EDIT: check also called template like: applications/core/dev/html/admin/applications/themeHookEditorTree.phtml and method like: \I…
Last reply by BomAle, -
- 3 followers
- 9 replies
- 437 views
I was wondering if anyone could help me understand how to properly create a new transaction/invoice without use of a custom payment gateway. I basically want to, through php, create a transaction for a product on my site and mark it as paid. This transaction should function as normal and I guess should have a invoice and purchase for it in the database. I would like to have this transaction also function as normal as it should expire in x days. I've so far been able to create the invoice but my understanding is I have to add an item to the invoice to actually link a product in my store to it. I'm not sure what class to use from nexus\items. Edit : (…
Last reply by HeadStand, -
- 1 follower
- 1 reply
- 314 views
I have no idea where to post bugs these days so... Found this bug in the responsive data-list.css on line 9 .ipsDataItem_lastPoster li:first-child { display: none; } when you shrink in fluid view to 1200px or less it remove the lastposter but not the time. You either need to remove the date and time also or keep the last poster line. I assume the plan was to remove the date also though.
Last reply by newbie LAC, -
- 2 followers
- 1 reply
- 298 views
// Create a URL object $url = \IPS\Http\Url::external( $API_URL ); // Now fetch it try { $response = $url->request()->get(); } catch( \IPS\Http\Request\Exception $e ) { return FALSE; } catch( \RuntimeException $e ) { return FALSE; } if ($response->httpResponseCode == 200) { return TRUE; } else { return FALSE: } Is this the correct way to validate that a url request is successful?
Last reply by bfarber, -
- 1 follower
- 2 replies
- 360 views
Hi, after the update to 4.3 the class \IPS\core\extensions\core\MemberForm\Profile got removed. What class can replace it? I tried using \IPS\core\extensions\core\MemberACPProfileBlocks\ProfileData and it doesnt show on the profile page.
Last reply by newbie LAC, -
- 1 follower
- 2 replies
- 444 views
Can someone please tell me how to update and/or customize the default cover photo used for blogs, profiles, etc?
Last reply by PrettyPixels, -
- 1 follower
- 7 replies
- 347 views
Any suggestions on the best way to use the table helper and have its rows include form elements within a form created with the form helper? I can't think of a good way to use both helpers together and the only way I see any form integration in the first party phtml files is where they just create the form themselves without the helper. Am I best off just doing my own form html like that? All I am even adding is what would be a Number field, so that's not so horrible to just do myself, but ti's so nice having all the validating built in by using the helper. lol. While thinking about it I half way come up with ideas, but then think of a problem making it work, suc…
Last reply by Midnight Modding, -
- 7 replies
- 330 views
Is there a way to use them for Table\Db? If not, what is my best alternative when I am using joins and needing to create active records involving the resulting data? And see in one case I am joining the same table twice and so without multidimensional joins I would have to alias them and then when creating active records it would be messy. I don't think there is a way to get multidimensional joins in... Although I did create my own table class extending Table\Db, so maybe I could somehow do it? I havent looked closely yet, but I "think" since the select is buried within a big method within Db.php, I can't really affect multidimensional joins.
Last reply by Midnight Modding, -
- 1 reply
- 322 views
I would like to be able to add an item to a users cart programmatically. Is there a built in function that can add a specific store item to the cart session? $_SESSION['cart'] For example, so I could create my own 'Add to cart' button outside of the product store page.
Last reply by Adriano Faria, -
- 3 followers
- 10 replies
- 466 views
I would like the ability to generate an invoice manually using my own script. something along the lines of: IPS\nexus\Invoice::generate($nexus_product_id, $currency_code, etc...) The invoice would be for guests so it wouldn't need to be attached to a particular member. Is something like this possible?
Last reply by SJ77, -
- 2 replies
- 317 views
Anything I need to know when I am at the point of actually ready to build the app? Don't want to assume and then do something out of order or skip something and mess it up. Also, what is the best way of handling past versions' upgrade routines? I don't have to go through the dev center one by one adding in old queries, do I? I kind of doubt IPS went through individually adding thousands of old queries for past versions that way. edit: also, if I build the app without the upograde routines at first, how would I go about putting them in later, since the dev center would be considering it a totally different version by then and the upgrades from past versions needs…
Last reply by Midnight Modding, -
- 1 follower
- 1 reply
- 296 views
When I try to create automatic club features everything is fine except for the node downloads. public function _saveClubForm( \IPS\Member\Club $club, $values ) { foreach ( array( 'allowss', 'reqss', 'comments', 'reviews' ) as $k ) { $this->bitoptions[ $k ] = $values[ 'cbitoptions_' . $k ]; } $this->types = implode( ',', $values['ctypes'] ); I got invalid arguments passed on implode (last line of the above code. is it a bad idea to add an isset() check?
Last reply by bfarber, -
- 1 follower
- 0 replies
- 292 views
I would suggest improvements for ips.ui.alert: - create a instance programmatically like for dialog: var dialog = ips.ui.dialog.create( object options ); dialog.show(true);//initonly - get a instance like ips.ui.dialog.getObj; - alert id how dialog.dialogID do; - update content inside alert (like ips.ui.dialog.updateContent);
Last reply by BomAle,