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
- 1 reply
- 205 views
As per title. The code box does not have support for JSON specifically. Is it possible to add it? Well, right after posting I figured out that selecting Javascript does support it. Instead of "adding support for it", can you change the language string to list it after the name with parenthesis? Kinda like you do already for C Language. And related to the code box, I am actually wondering why every time I open it I get that loading image for a while before I can finally use it. Is there any need for it when loading an empty code box?
Last reply by bfarber, -
- 3 replies
- 235 views
A while back I added like 20 or 30 rows to a table via a for loop. I just looked in the db and noticed SOME of them don't have their friendly titles stored! They're all in the same table, all were created at the same time via the same for loop, all of them have their titles stored, yet around 5 or 10 do not have the friendly version saved! What in the world??? And all of the titles were generated automatically such as dummy1, dummy2, dummy3, etc... so I can think of no reason at all why this would be happening.
Last reply by Midnight Modding, -
- 0 replies
- 193 views
On the same page I have several Table\Db tables. I need to know the count of rows in each one in the template I am showing "all" of them in. What is a good way of going about this, without wasting a duplicate query that would already be used in getRows()? (actually I don't need to know the exact count, I just need to know yes or no does it have at least 1 row in it) If it were just one table, easy.... in that one table's template check count( $rows ). But when each table has its own template and I need to know the counts in the master template... I'm drawing a blank. What I had been doing is checking if( trim( $table ) ) for each table in the template, but that …
Last reply by Midnight Modding, -
- 1 follower
- 34 replies
- 668 views
What's the deal with a form not working in the acp, due to a db exception saying "no default value" for a text column, then in db schema we can't even "put" a default value for a text column? Even changing it to allow null doesn't change default to null.
Last reply by Midnight Modding, -
- 4 followers
- 8 replies
- 378 views
I noticed that in 4.3, Codepen was removed from \IPS\Text\Parser::_oembedServices. Was this intentional? And if so, can you please provide the reason? I have a client that uses codepen extensively, so if there was a valid reason for its removal, I'd like to know so that I can be aware of the "consequences" of putting it back in. Thanks.
Last reply by bfarber, -
- 8 replies
- 336 views
I don't know if this is a bug or supposed to happen, But if I create a css with a plugin and then someone edits the css file, When they update the plugin the css sheet stays the same (their modified version and not the updated ones), Surely the updated version should override and replace the css sheet no?, The only way to get the newest css is to click revert, This could bring a lot of people thinking the plugin updates are broke when, its not its just not updated their css sheet and a lot of unnecessary support saying you have to click revert etc
Last reply by Tom S., -
- 5 followers
- 9 replies
- 436 views
I've been meaning to ask this for a while since it's a constant issue with my customers, but is the "Upload new version" (UNV) feature working correctly? Ever since 4.0.0, I've been inundated with random bug reports which have been caused by using the UNV feature. My standard reply is "Do a fresh installation of the theme instead of using the UNV feature and it'll work fine". The major issue with this is forum member's need to re-select the freshly installed theme since their choice is reverted to Default. Put simply, can one of the IPS dev's please explain in laymen's terms how this feature works, and why it may potentially cause issues when actually being used? I i…
Last reply by orp, -
- 11 replies
- 284 views
Just a couple more. ? 1. where is the method for displaying moderator permissions for our app in the acp? I was going to see if it's set up in a way where I can easily change which options show up for my app because for 1 content item I have all of the "can" methods return FALSE as it uses a dummy container and then my other content item only uses featuring and unfeaturing basically... and really even then I may just not want mod permissions even for that. For editing/deleting I do my own checks because they're to be done in a different place than moderator panel. 2. Is the built in featuring/unfeaturing only to change the db column, but it's up to us to actuall…
Last reply by Midnight Modding, -
- 4 replies
- 259 views
Should I be doing a flood control check for all forms? While glancing through IPS ones, so far I only see it done in relation to editor inputs and I noticed of course some check related to searching. I assume for searching, it will automatically take care of that for us. In past versions, I set up my own flood control and I think I generally used it on some forms and searching, myself. The only actual flood control method I see, so far, though, specifically checks last post, so it obviously wouldn't be relevant to other apps if used exactly as it is now. We can't really use member_last_post ourselves, for this purpose, can we? Isn't that tied to stats related sp…
Last reply by Midnight Modding, -
- 2 followers
- 3 replies
- 273 views
I can't find the bug tracker so trying here instead. Has the dev folder location changed for css files in IPB 4.3 at all? With a fresh install of an app my /dev/css/admin/form.css file is being added and appears in the browser source code. That same css file will not be added if I perform an application upgrade with the only change being a new css file. Edit: This appears to be the same on IPB 4.2 as well. App install adds admin css just fine, app upgrade doesn't.
Last reply by Daniel F, -
- 1 follower
- 1 reply
- 272 views
I'm working to a bulk importer, I've a field that store Price(2): title,desc,price Hello world,This is an example,44 In the db table the price is stored as: {"USD":{"amount":"44","currency":"USD"}} I need to recreate manually this json using \IPS\nexus\Money object? that with Simply json_encode give: {"amount":"44","currency":"USD"} I recreate the json with: $item->price = '{"'.\IPS\nexus\Customer::loggedIn()->defaultCurrency().'":'.json_encode($price).'}'; But I suspect that there are a better way.
Last reply by teraßyte, -
- 10 replies
- 354 views
Eh, I've had my notification extensions done for ages, but just noticed in notification settings there is nothing there related to my app at all. Did I forget something or it won't show them until the app is actually built? Most eevrything else works in_dev before the app is actually officially built, so I don't know why this would be any different... Hmm... ALso, personally, I wish the notifications settings page would be improved because having all settings one after another, rather than in tabs, is going to get messy. This app I am working on is so huge it has a ton of necessary notification types. So it will be a long list even on its own. I thought about combini…
Last reply by Midnight Modding, -
- 1 follower
- 3 replies
- 231 views
Is there a way to easily differentiate between an invoice generated by a customer and an invoice generated by an Admin in the ACP? I can't seem to find an easy way to figure this out, short of looping through the customer history table. If there isn't a way, can there be one (perhaps for 4.4)? I have more than one customer who is asking for ACP-generated invoices to be treated differently than regular invoices. In most cases, an invoice generated by an Admin is usually to handle a special case where the customer (for whatever reason) is either not purchasing from the standard commerce packages or cannot pay via those means. When this happens, you may not want the inv…
Last reply by Mark, -
- 1 follower
- 3 replies
- 217 views
I wanted to implement the feature "Recommended Replies" in one of my applications, but after looking at the code I discovered that it works only for the comments class and not for reviews too. Can you consider extending this feature to reviews? I don't think I'm the only one that would like to recommend reviews too, especially good ones... ? Or did I miss a way to implement it for reviews?
Last reply by Midnight Modding, -
- 3 followers
- 26 replies
- 623 views
Is any of the following required for any features in particular, for content items? 'author', 'updated', 'ip_address' in $databaseColumnMap. I see if updated is set, it updates the time and when author is used, it can use it for built in generic edit permission checks, but anything I am not thinking of that would need those? And ip address, I haven't noticed an issue from not storing that, at this point, but was thinking I saw somewhere that it was required for something...
Last reply by Midnight Modding, -
- 4 replies
- 241 views
I don't understand what couldEdit() is even used for. In the normal edit methods in ip.suite it already checks canEdit(), anyway, and couldEdit() is checked within canEdit(), but then when the form is submitted, it specifically checks couldEdit() again, even though it would be checking it within canEdit() later in the method, anyway. And, also, the same moderator permission check is done in both couldEdit() and canEdit(). What confuses me the most is I did not even set up anything to do with moderator permissions or set an author field for my content item, but for some reason I pass the couldEdit() check and someone else in the acp does NOT pass it! Is moderator…
Last reply by Midnight Modding, -
- 2 followers
- 6 replies
- 367 views
Hi I'm trying to find a cookie notice plugin, ive found 2 on the market place, one hasnt been updated since 2015 so not sure if it works. The other gives me an error when activated. Error given by the one on the bottom is I dont know how to fix that. Are there any other alternatives ?
Last reply by Steve Bullman, -
- 8 replies
- 310 views
1. a way to get html into an error_message? 2. when I use lang="" in the template to display a translatable lang bit, it's not parsing break tags from the editor. Why? I don't see first party translatable lang bits having anything done to them other than the lang="". Actually I think I figured out #2. I think someone just pasted directly into the editor with break tags... I went and replaced a couple with actual line breaks and it displays properly.
Last reply by Midnight Modding, -
- 2 followers
- 2 replies
- 242 views
I would suggest to improve following code: #system/Task/Task.php:64-79 /* Task completed successfully and a new offset was returned - store the value and then return it */ /*....*/ $newData = json_encode( $json ); /* Did it change?? */ if ( $newData !== $json ) { $queueData['data'] = $newData; \IPS\Db::i()->update( 'core_queue', array( 'data' => $newData ), array( 'id=?', $queueData['id'] ) ); } FIX: $newData !== $queueData['data'] tested with 4.3.1
Last reply by BomAle, -
- 4 followers
- 4 replies
- 318 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, -
- 1 follower
- 2 replies
- 308 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, -
- 3 followers
- 5 replies
- 337 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, -
- 3 followers
- 4 replies
- 314 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
- 271 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
- 288 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,