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
-
- 2 followers
- 4 replies
- 300 views
Hello! What's a reason to convert \IPS\Helpers\Table to a string? In some places I see something like this: \IPS\Output::i()->output = (string) $table; /* or */ \IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'group' )->template( (string) $table ); Can you please avoid converting to a string? It will allow us to hook into a method and change something in the table without touching original code. So, for example, let's test this code: When you convert $table to a string we can do nothing with it: When you don't convert it, then we can easy change something we need: In the second case we stay original code …
Last reply by Ilya Hoilik, -
- 2 followers
- 15 replies
- 405 views
When someone uses an UPLOAD extra field type in my app, they get a 1S160/2 message error and can't download the file. So debugging here and there I noticed that the method isValidFile from the Extra Field File storage extension is always returning FALSE because it can't find the file due to this: As you can see, using Downloads as an example, it saves only the file path, while it saves the full path in my app. Comparing Field model from Downloads and my app, I don't see any difference in the way it is done. So the question is: where do I change that?
Last reply by Adriano Faria, -
- 1 follower
- 2 replies
- 257 views
/** * Check if a value is okay to be stored in a non-utf8mb4 database * * @param mixed $value The value * @return bool */ protected static function utf8mb4Check( $value ) { if ( is_array( $value ) ) { foreach ( $value as $_value ) { if ( !static::utf8mb4Check( $_value ) ) { return FALSE; } } } elseif ( is_string( $value ) ) { return (bool) !preg_match( '/[\x{10000}-\x{10FFFF}]/u', $value ); } return TRUE; } could we get this method mad public or moved to another class where it has public access? i've been meaning to ask this for quite awhile now, but keeps slipping my mind it would be useful if it was like in Lan…
Last reply by CodingJungle, -
- 1 follower
- 6 replies
- 348 views
could you enable the use of "add messages" for contributors in the market place? there are times it would come in handy to have, to notify of a big change that needs special attention or something. as a lot of folks don't read the "changelog" and there have been times where i get flooded with PM's and support, and the cause/fix/solution/whatever has been in the changelog. so it being more "visible" would be a big boost imho. thanks.
Last reply by CodingJungle, -
- 9 replies
- 342 views
I'm trying to create training plugin which will add custom field to forum configuration (forum edit form). My field will be YesNo type and I want it to show only when user selects forum type "Redirect" I created install.php step1: public function step1() { $columnName = "flt_newWindow"; $columnExist = \IPS\Db::i()->checkForColumn("forum_forums", $columnName); if(!$columnExist){ \IPS\Db::i()->addColumn("forum_forums", array( 'name' => $columnName, 'type' => 'BOOLEAN', 'null' => FALSE, 'default' => FALSE, 'comment' => 'ForumLinkTarget plugin column')); } return TRUE; } and now I'm trying to add class…
Last reply by bfarber, -
- 2 followers
- 9 replies
- 392 views
Our forums feature long, sometimes complex, posts that can take an hour or more to write. In IPS 3's versions of the community suite software, there was an automatic Save function that many members of my board relied on; if there was a lost connection, for example, or the software froze, reloading and going to the post, and selecting More Reply Options offered to restore the last saved version of whatever one was posting. Has that feature been deleted in v.4? As the board admin, if this feature still exists, how can I activate it? TIA.
Last reply by omgenghis, -
- 1 follower
- 9 replies
- 297 views
I have a member setting to allow the choice of multiple member selections $form->add( new \IPS\Helpers\Form\Member( 'mySetting', NULL, TRUE, array('multiple' => 10) ) ); How would I add the member_id values to the database? When multiple IS NOT selected or just set to 1 I can do it via \IPS\Db::i()->insert( 'my_table', array( 'MyDatabase' => $values['mySetting']->member_id ) ); But IF multiple is enabled it throws a error
Last reply by Adriano Faria, -
- 1 follower
- 0 replies
- 203 views
Could you please log the IP address of the visitor triggering the error, in the table core_log, in it's own column. This will make it easier to find that visitor in other logs on the server, for example access logs, which can help in figuring out an issue. Or it could make us see an pattern like "Only guests from this IP address seems to encounter the issue". Thanks for the consideration.
Last reply by TSP, -
- 1 follower
- 4 replies
- 533 views
If I get a array of member id's how would I create the {{if}} statement for it?, for example {{if \IPS\Member::loggedIn()->member_id in_array ?????????????????????????}} and so on
Last reply by TheJackal84, -
- 2 followers
- 20 replies
- 921 views
In the {template} template tags, it would help massively if you could specify the app except where there is a specific reason not to, so that the templates can be reused in other apps. The one that's bothering me specifically at the moment is on line 2 of core/html/front/system/settings.phtml, where you include the pageHeader without specifying that it needs to be in core. This means that, without requiring everyone who will use my app to modify that template to add the app in there, there is no way to reuse that template in my own app. The reason I want this is that I am adding a new item to the settings page (which is a painful experience btw), but I need the URLs to be…
Last reply by bfarber, -
- 1 follower
- 1 reply
- 360 views
I would like to use the REST API so that I can access some data in JSON format for use by another program. My community is running at https://benefitslink.com/boards/index.php -- all pages on the site served via https:// phpinfo shows my Server API as "Apache 2.0 Handler" I have used the AdminCP to create an API key for the /core/hello endpoint: 3cf4f10cf064294489aa2b32471afd68 I set the endpoint permissions for that key so that System -> Hello has both checkboxes checked: Access and Log. I had trouble determining, from the REST API documentation at https://invisioncommunity.com/developers/rest-api , how to successfully call this endpoint. …
Last reply by bfarber, -
- 1 follower
- 2 replies
- 311 views
I noted that redirect after login doesn't work. Board redirects me to main page. I am using facebook login method and when I checked how login link looks like there was a ref property: &ref=aHR0cDovL2xvY2FsaG9zdC9pbmRleC5waHA/L2xvZ2luLw== what is (in base64): http://localhost/index.php?/login/ Wherever I am he looks still the same. How can I fix it?
Last reply by Nigel Moore, -
- 1 follower
- 1 reply
- 241 views
Hi! I'm making a small plugin which adds buttons to every post in the topic: <li data-controller="plugins.coolAction"> <button data-action="someAction" data-name="{$comment->author_name}">Make an action</button> </li> In the coolAction.js I'm catching a click event: ;(function($, _, undefined){ "use strict"; ips.controller.register('plugins.coolAction', { initialize: function () { this.on( document, 'click', '[data-action="someAction"]', this.mention ); }, mention: function (e) { e.preventDefault(); alert($( e.currentTarget ).attr('data-name')); } }); }(jQuery, _)); But this actio…
Last reply by BomAle, -
- 2 followers
- 1 reply
- 241 views
Hi, I try to use \IPS\Helpers\Table\Content, but I encounter this error when trying to do so with joinComments set to true. SELECT forums_topics.tid FROM `b5dev_forums_topics` AS `forums_topics` LEFT JOIN `b5dev_forums_forums` AS `forums_forums` ON ( forums_forums.password IS NULL OR ( FIND_IN_SET(4,forums_forums.password_override) ) ) AND forums_forums.min_posts_view<=3 AND forums_topics.forum_id=forums_forums.id LEFT JOIN `b5dev_forums_posts` AS `forums_posts` ON forums_posts.topic_id=forums_topics.tid WHERE forums_posts.author_id=1 AND forums_topics.last_post > 1473811200 AND forums_topics.approved < 2 AND forums_topics.approved!=-2 AND ( NULLIF(f…
Last reply by bfarber, -
- 1 follower
- 1 reply
- 214 views
Ok, so I have quite a few requests on what I would like to be able to do with the Rest API. Could you please consider extending it? It feels quite lacking: Extend existing endpoints to let us provide the following information POST core/members: Let us provide an IP address the member should be registered with POST core/members: Let us set whether account should be in a validated state GET core/members: Let us search for members by other fields, like displayname, email or any other database column on the core_members-table. We don't necessarily know the member ID. POST core/members: We have an unique column on the core_members-table that corr…
Last reply by bfarber, -
- 1 reply
- 284 views
Where can I find documentation on functions such as $category->hasChildren() ...or.. {{$count = $RecordsClass::contentCount( $category, FALSE );}} When I google for, say, "IPS Community contentCount", I get very little. What documentation do I need to read to understand what functions are available? I'd like to, for example, get all articles for a given category, but I can't figure out how to do so. Thanks, Bret
Last reply by bfarber, -
- 3 replies
- 227 views
There are two columns I would like to understand better. joined appears to be a long number, how does it convert to actual joined date? ANS: Just realised its the unix time stamp. members_day_posts appears to have a rather long number in there with a comma. How does this work? It appears to be {#},{Joined Date} What is the #? Posts today? or Posts average? ANS: Just worked it out, its posts made today followed by the join date.
Last reply by Martin A., -
- 1 follower
- 0 replies
- 170 views
Any chance to add customer email in the push API? Thanks.
Last reply by InvisionHQ, -
- 2 followers
- 0 replies
- 248 views
Please refer to: This is exactly the issue that happened on Account Settings and this is not a bug in any 3rd-party resource, as the IPS reply seems to indicate. IPS will have to change the template to accommodate more tabs or maike it unavailable, if we can't hook in it.
Last reply by Adriano Faria, -
- 1 reply
- 193 views
How does one create the form helper code for that?
Last reply by Adriano Faria, -
- 2 replies
- 238 views
So basically I have a SaaS website that handles purchases through the commerce app and I would like to know how I would be able to extend the time of a customer's subscription. Sometimes I have issues with my software being unavailable so I would need to compensate my customers for downtime. Would it just be a simple MySql query to extend the timestamp stored in ps_expire in nexus_purchases? I also have issues with removing the time from the user's subscription since ps_active seems to still be set even though I set the expiration date to be a date in the past.
Last reply by Derek Ta, -
- 2 followers
- 11 replies
- 399 views
I would like to extend the "purchase notifications" in the commerce application so that it will send the product's custom field which I have setup in that email as well. In my oppinion it should be a native feature but I need that feature as soon as possible. Can you point me in the right direction what to do therefore?
Last reply by inkredible, -
- 1 reply
- 293 views
Hi Everyone, I was wanting to learn how to create a new endpoint for the API, in particular, to pull the data from the leaderboard that comes with IPS. Is there any documentation or resources available to do such a thing? I am familiar with PHP, but no expert.
Last reply by bfarber, -
- 4 replies
- 253 views
I've been working my way through the Plugin documentation, but it's not very comprehensive. Can someone offer some advice/tips about how to approach creating a Plugin that allows for Admin users to upload their custom icons into some sort of a library, and then for users to be able to assign one of the icons to a specific thread? As I understand it, I need to: Create Theme Hooks (front: forums): One for where the icon is chosen by the thread starter, and another for where the chosen icon will appear. Create a Setting to allow admin to upload new icons. Then create database columns to store the icon and topic IDs. Finally create a Code Hook to read…
Last reply by Adriano Faria, -
- 2 followers
- 6 replies
- 264 views
I have a couple of apps that uses questions/answers. Currently I'm using textarea, which has no issue but a user requested to change it to textarea for formatting purposes. It shows fine in another template: But it shows like that in the form: Is it possible to parse HTML in forms?
Last reply by Adriano Faria,