Developer Connection
Use this forum to interact with our development team on technical issues, suggestions and official best practices advice.
1,679 topics in this forum
-
- 1 follower
- 4 replies
- 288 views
I've created a custom static method in \IPS\Member: static function hello() { $hello = "something"; return $hello; } Now I need to retrieve it in a template: {{$hello = \IPS\Member::hello();}} but forums/topicRow template, where I'm working, start with a foreach and I can't hook before it to assign passing $hello. I've found a dirty workaround but what is the best way to do it?
Last reply by bfarber, -
- 2 replies
- 199 views
getConfiguration() has a null $member object in the acp notification listings. is that the only place it would be null, thus I can have it skip checks if it's null? Otherwise it's a mess because if you have a condition around whether or not a notification shows, it can't fail in the acp or else it automatically disables te choices for that key on the front end! I am almost positive I have seen conditions for notifications in first party apps. I don't see how those would work because it could then fail outside of the front end form and disable it. Bottom line... I had a notification show only to member id 1. Since $member is null in the acp, it did NOT show …
Last reply by Midnight Modding, -
- 2 replies
- 227 views
Hi, What class do I need to use for the hook? I'm trying to fix an old plugin that worked on version 4.1
Last reply by Gil Ronen, -
- 3 followers
- 6 replies
- 251 views
Hi everybody, Hope you're all good 🤗 I'm calling for help for a problem that could open new horizons ^^ I have developed an app that allows members to create their own mini-website (it is something like the Invision Blog app). One of the main request from my members is the ability to use their own custom domain name to be used on their mini-website. For instance, instead of having their website homepage like: https://www.myinvisioninstallation.com/website/{title}-{id} … it would be: https://www.the-member-domain-name.com … pointing to the Invision installation. It's not such an easy task with Invision, and I'm a bit…
Last reply by bfarber, -
- 5 followers
- 15 replies
- 888 views
Playing around with Elasticsearch, I've noticed some things that could potentially use improvement. First, let's start with a basic query, Ignore the gibberish. It's lorem ipsum text, but it works well for demonstration. So, what's my problem with these results? Well, further down, on page 3, there is a post that contains this exact phrase in the content body, There doesn't seem to be an issue with prioritizing exact matches when it comes to thread titles that I can see, it's only content bodies that aren't given proper priority. Alright, now before we go further, let's look at the Elasticsearch query for that, { "query": { …
Last reply by RevengeFNF, -
- 3 replies
- 240 views
Hello, i am currently working on an imprint application, so i have to make sure that the imprint page is always available no matter if the player is not verified, banned or anything else. I only found 2 approaches (which are both not really good): Hook into Application::allowOfflineAccess & Application::allowGuestAccess Page is not available if: Member and/or IP is banned Member must confirm e-mail / be confirmed by admin Member must confirm privacy policy/terms of use IPS is updated (not so important) Hook into Front::init and implement an own display system for my own application and r…
Last reply by bfarber, -
- 1 reply
- 339 views
Hello, Url http://localhost/443/index.php?/search/&q=hello&type=forums_topic&nodes=2&search_and_or=or&sortby=relevancy I select posts/topics from forum with ID 2 But the queries looks like SELECT main.*, ((MATCH(index_title) AGAINST ('hello' IN BOOLEAN MODE)*5)+(MATCH(index_content,index_title) AGAINST ('hello' IN BOOLEAN MODE)))/POWER(( ( UNIX_TIMESTAMP( NOW() ) - ( CASE WHEN index_date_updated <= UNIX_TIMESTAMP( NOW() ) THEN index_date_updated ELSE 0 END )) / 3600 ) + 2,1.5) AS calcscore FROM `core_search_index` AS `main` WHERE ( ( index_class IN('IPS\\core\\Statuses\\Status','IPS\\core\\Statuses\\Reply') ) OR index_class='I…
Last reply by bfarber, -
- 1 follower
- 2 replies
- 226 views
Hi, Just discovered that there is a call in IPS\cms\modules\front\database\records::manage.php(237) where you fetch the record image in order to get the image dimensions, This method call alone wastes more than 500ms on every article request that have a record image, which is all of them. We went from ~1.2s to ~550ms by removing this. We're storing our images in an S3 bucket, with CloudFlare as a CDN layer on top of that. getImageDimensions() ignores the CDN layer, and goes straight to the source, and that can cause an issue when the distance between the web server and S3 is far. Even the fact that the server needs to make an external request is enough to cause …
Last reply by Daniel F, -
- 1 follower
- 1 reply
- 177 views
Steps to reproduce: Set a daily posting limit for any member group Exceed this posting limit by any means Create a support ticket Attempt to reply to said support ticket You will be able to create support requests even if you've exceeded the daily post limit, but you can not reply to support requests.
Last reply by bfarber, -
- 4 replies
- 275 views
Hey quick question, How would I go about connecting an mysql database and formatting a datatable within the suite theme? For example: Is there any templates or tutorials on something like this? Thanks!
Last reply by LewisP, -
- 2 followers
- 1 reply
- 221 views
Issue demonstrated here: lazy_acp.mp4 Essentially just try and use any remote image in a members profile field in the ACP with lazy loading enabled. It breaks the images, and also breaks lazy loading links further. Images still work on the front-end even if the edits break the fields in the ACP, so not a big issue.
Last reply by bfarber, -
- 7 replies
- 320 views
I tried to use the Table helper (\IPS\Helpers\Table) in the settings page for plugin, but I can’t find a way to combine it with the way settings.php work (where everything is a form?). Is there a better way to build and display a table than lots of $form->addHtml()?
Last reply by bfarber, -
- 1 reply
- 187 views
I got a ton of log entries for an out of date application: It shouldn't "search" or try to run an app that is even installed/folder not present in file system. Should I report this as a bug? ----------------------------------------------------------- Ticket: #1034607
Last reply by bfarber, -
- 2 followers
- 2 replies
- 433 views
Hi, Is there an option or a plugin available that lets me manage the rights of certain forums to allow only users that have been a member for over x days to see and participate in those forums? I now have a restriction for the subforum to be visible after 15 posts, but I want the user to also be a member for at least a week AND a minimum of 15 posts before they can see the forum. I hope someone can help me. I tried searching on the Marketplace, but couldn't find the right plugin. Regards, Chris
Last reply by ChrisVanMeer, -
- 1 follower
- 7 replies
- 262 views
When trying to add something like the following to a form in the Wizard helper, $form->add( new \IPS\Helpers\Form\Codemirror( 'some_advancedEditor', '<strong>Hello world</strong>', TRUE, [ 'tags'=> [ '{foo}' => '', '{bar}' => '' ] ] ) ); You get this, Similarly, if you try and use TextArea with tags, the tags just don't work. Clicking on them does nothing. This only happens when trying to use the two in the Wizard helper. When using TextArea, clicking on tags logs "TypeError: textField.getSelection is not a function" in the console. In CodeMirror, nothing of interest logged in the javascript console or anythi…
Last reply by bfarber, -
- 1 follower
- 1 reply
- 177 views
http -a 41ca0a2c7a3e0f11f5dc7a20314dfa62: get http://172.21.191.132/api/core/hello HTTP/1.1 200 OK 'X-Powered-By: PHP/7.2.15 ZendServer/2018.0.3' Cache-Control: no-store, no-cache, must-revalidate Connection: close Content-Encoding: gzip Content-Length: 107 Content-Type: application/json;charset=UTF-8 Date: Thu, 04 Apr 2019 02:15:10 GMT Expires: Thu, 19 Nov 1981 08:52:00 GMT Pragma: no-cache Server: Apache/2.4.25 (Debian) Set-Cookie: ZDEDebuggerPresent=php,phtml,php3; path=/ZendServer Set-Cookie: PHPSESSID=iu00r1pt2ve20f419j818eb9tu; path=/ Vary: cookie,Accept-Encoding X-IPS-LoggedIn: 0 X-Powered-By: PHP/7.2.15 ZRay-ID: 12@74297@1554343299@0 { "communityName": "Invis…
Last reply by bfarber, -
- 1 follower
- 0 replies
- 172 views
The leaderboard is a great feature in IPS 4.x, and I'd love to see an API endpoint added for this so third-party applications can easily pull a list of top members to display elsewhere.
Last reply by Makoto, -
- 1 follower
- 2 replies
- 248 views
Posting here instead of going via the potential support black hole 😄 I've made use of a manageable matrix a number of times now, and each time I do there is something else about it that ends up winding me up 😄 Attaching a sample plugin with settings that use a manageable matrix - notice the Yes/No field? I reported this a while back (in 4.2.x, I think) and it did get fixed if I remember correctly. Also....the color picker doesn't work on a newly added line. All of these items work brilliantly on an already defined unmanageable matrix, but going manageable and you've got these issues - the Yes/No can be overcome by using a checkbox or a select field instead,…
Last reply by bfarber, -
- 2 followers
- 5 replies
- 240 views
Hello, Most times I've encountered an error message during upgrade, they are not really helpful. Could you please at least provide information about the current upgrade step and non-human-version. As a bonus, also the file path to the current upgrade file it's processing. I threw something very quick together for myself, but I would like to see this implemented in future versions. (Of course in a better looking way) If you feel this is too advanced information to throw at everyone, hide it in a modal that opens when you click a button, a slightly hidden icon or something.
Last reply by bfarber, -
- 1 follower
- 3 replies
- 245 views
IPB is telling me I have the infamous dangerous functions enabled although when looking at my PHP configuration, it's clear I have them disabled. However, when looking at the PHP settings through IPB's support tool, it says they are NOT disabled. How come the difference? http://community.deschutesdesigngroup.com/phpinfo.php
Last reply by Jon Erickson, -
- 2 followers
- 13 replies
- 313 views
On communities that make use of IP.Downloads and have both paid and free files, if a user purchases a paid file and has exceeded their download quota for that day, they will not see a download button appear. If they go into their client area, then go to managed purchases and try and download the file that way, they will get an error stating they have exceeded their (daily/weekly/monthly) download limit. This is not desirable. There should, at the very least, be an option to allow paid files to ignore download limitations, so users who pay for files aren't forced to wait in order to download what they paid for.
Last reply by Makoto, -
- 1 reply
- 333 views
I'm not sure why, but when developing, ergo IN_DEV = true, the 'log in as' feature lasts not even 2 minutes. This results in a ridiculous amount of time waste when one needs to develop against and test a multitude of access levels and configurations. Is there a constant I can set to a member id to make 'log in as' stay put long term while IN_DEV?
Last reply by Marcher Technologies, -
- 1 follower
- 4 replies
- 272 views
Looks like v4.4.2 was just recently released. I was running the beta version on my dev installation when I got a notification for it, as well as a second "blank" NewVersion notification that causes the AdminCP to crash when in development mode, Not sure if it's just a glitch from running the beta or if other users might start seeing a new release of IPS from 1969 or not, so just thought I'd let you know.
Last reply by bfarber, -
- 1 follower
- 4 replies
- 236 views
Settings with this form helper won't work as usual and it doesn't summon colorpallet. Is this a bug? Edit: I'm using this way for a while. $form->add( new \IPS\Helpers\Form\Color( 'setting_key', \IPS\Settings::i()->setting_key ) );
Last reply by shahed, -
- 1 follower
- 1 reply
- 243 views
This is a minor annoyance since we generally don't need to call it often, but the simple task of creating language strings takes such a long method call \IPS\Member::loggedIn()->language()->addToStack('') I actually have a live template set up for this, but that's a static method call and two consecutive method calls for a common task. It makes sense that we would, under most sane circumstances, always want to add a language string from the current logged in members set language, so defining this method in \IPS\Lang itself seems like a non-issue to me. i.e., \IPS\Lang::addToStack('') This is much easier to read and type.
Last reply by TheJackal84,