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
-
- 3 replies
- 322 views
Hello, In api controllers you have /** * Class */ protected $class = 'IPS\forums\Forum'; but in some places you use $class = static::$class; Examples - applications/forums/api/forums.php method POSTitem - applications/calendar/api/calendars.php method POSTitem - applications/downloads/api/categories.php method POSTitem
Last reply by bfarber, -
- 1 follower
- 2 replies
- 340 views
If anyone of you have an .editorconfig-file that you use for your Invision Community-repo, could you please share it here?
Last reply by TSP, -
- 1 follower
- 2 replies
- 376 views
Hi, I wrote a theme hook to add info in topic theme and then I edited the corresponding hook file as follows to add $my_content in the theme: class covers_hook_topics_header extends _HOOK_CLASS_ { /* !Hook Data - DO NOT REMOVE */ public static function hookData() { // CODE TO produce $my_content HERE return array_merge_recursive( array ( 'topic' => array ( 0 => array ( 'selector' => '#elClubContainer > div.ipsColumns > div.ipsColumn.ipsColumn_fluid > div.ipsPageHeader.ipsClearfix', 'type' => 'add_inside_start', 'content' => $my_content ), ), ), parent::hookData() ); } Although this works, …
Last reply by Valtasar, -
- 2 followers
- 3 replies
- 369 views
Hello! I have two databases: Movies Actors There is also a set of fields: Movies (database) Actors (database) Actor name (Template Key="actor_name") Actor Age (Template Key="actor_age") In addition, I created a field type "database relation" to specify what actors star in the movie. And now the question: As for the movie page to display the cards of the actors who starred in it? Do not understand. Help, please.
Last reply by DReffects2, -
- 7 replies
- 941 views
So I am trying to add a $table->quickSearch function to a table on the front end but it don't show, I have tried loads of different ways but can't get it there, The filters / sort and advanced search are all working it's just the quickSearch that isn't, It works fine on the admin panel though, Is it not made for the front end of am I missing something obvious right in front of me?, I have decompiled loads of IPS files and only really found the $table->quickSearch on the admin panel files
Last reply by bfarber, -
- 1 follower
- 2 replies
- 319 views
I am trying to add member(s) to the bulk mail being sent out, but users that arent in that group. I am building the extension, but the query join still limits the query to the users in the selected group. I am trying to find a good way to do this without having to rewrite the query on every email and wondering if anyone has already done this? Thanks
Last reply by FNDN Admin, -
- 2 followers
- 4 replies
- 402 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
- 508 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
- 331 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
- 572 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
- 434 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
- 490 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
- 429 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
- 312 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
- 727 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
- 1.1k 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 reply
- 542 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
- 396 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
- 357 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
- 324 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
- 298 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
- 357 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
- 311 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
- 266 views
Any chance to add customer email in the push API? Thanks.
Last reply by InvisionHQ, -
- 2 followers
- 0 replies
- 347 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,