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
- 200 views
I'm trying to detect if a user is singed in to the IPS Suite from within the same domain but outside the suite folder. for example: mysite.com/ips vs mysite.com/other So I tried using the following code in the "other" area: /* Require the init.php file from the Community Suite root directory */ require '/path/to/suite/init.php'; /* Initiate the session to verify who this user is */ \IPS\Session\Front::i(); /* Print the user's name */ print \IPS\Member::loggedIn()->name; The account I am testing this with is logged in, but instead of the display name being shown it prints the following: c825n13ac6d715005ab4933d371239e6 And every time I refresh …
Last reply by Tom S., -
- 2 followers
- 8 replies
- 335 views
I have a customized signup form where the user can enter a unique key that will give them to access to certain parts of the site. I intend to implement this through the primary member group as the distinction between the various access levels should be immediately obvious in the forum. In order to achieve this I have added a hook to \IPS\core\modules\front\system\register, extending the _createMember() method. My method looks vaguely like this: public static function _createMember($values, $profileFields) { $member = parent::_createMember($values, $profileFields); $accessData = SomeClass::checkAccessCode($values['access_code']); switch ($accessData->typ…
Last reply by HebRech GmbH & Co. KG, -
- 6 replies
- 395 views
Hello! Any ideas how i can check exist member or not? I can get member by ID, but if i want do it from another resource i have only name. /core/members generated a lot of pages (~20 000). Maybe you can add in REST API function to get member by name?
Last reply by bfarber, -
- 3 replies
- 219 views
I have a couple of questions on the $chart feature How do I set the default view? anytime I try it is always on the AreaChart view, even if I remove it from the $chart->availableTypes If I put it to show in the front end then when I change the view it always gives a url with &type[e7e453]=BarChart&noheader=1 and it takes away the date filter and the view filters, if i remove the no from noheader it's all there, Although in the admin panel it all works fine
Last reply by TheJackal84, -
- 1 follower
- 1 reply
- 198 views
Into core.global.core.table the _handleStateChanges not call _updateSort because of: (the state seem be the same of current) if( ( !_.isUndefined( state.data.sortby ) && !_.isUndefined( state.data.sortdirection ) ) && ( state.data.sortby != this._urlParams.sortby || state.data.sortdirection != this._urlParams.sortdirection ) ){ this._updateSort( { by: state.data.sortby, order: state.data.sortdirection }); } With core.global.core.generictable there is some other event that call _updateSort but are not present into core.global.core.table How i solve this:
Last reply by bfarber, -
- 1 follower
- 1 reply
- 199 views
when i set up 2 factor authentication, i enabled google and then enabled i for the admin group. when i signed in, i used my ipad (since it was the one i had with me) to setup the app. later when i wanted to sign back in, i had my phone with me. I had to go the database, view my member record to get the key for the google app to add it to my phone. could you add this to the ACP profile, to show the key so if we need to add it to another device, it is a bit easier and less of a hassle?
Last reply by bfarber, -
- 6 replies
- 368 views
After update to 4.2.2 I have a problem with building applications in dev mode. When I try to build any app I got error (attachment) without any details. I check my apache's logs and they are clear. Any ideas?
Last reply by Daniel F, -
- 2 followers
- 8 replies
- 411 views
Hello I've wrote a new Login Handler, and everything is working beside the part of checking if member exist or not anytime i do $charID = $userData['CharacterID']; $member = \IPS\Member::load( "{$charID}", "eveonline_id" ); which is being returned from a SSO call i get the following error that column is in my database and be populated as well. I'm not sure what is going on here. i running latest version of IPS 4.2.2 InvalidArgumentException: (0) #0 C:\wamp64\www\ips\system\Member\Member.php(190): IPS\Patterns\_ActiveRecord::load('91537743', 'eveonline_id', NULL) #1 C:\wamp64\www\ips\system\Login\EVEOnline.php(112): IPS\_Member::load('91…
Last reply by Ryan Ashbrook, -
- 2 followers
- 6 replies
- 257 views
ON \IPS\Content\Search\Index::indexData /* Or if this *is* the first comment, add the title and replace the tags */ $title = $object->mapped('title'); $isForItem = FALSE; if ( $object instanceof \IPS\Content\Comment ) { $itemClass = $class::$itemClass; if ( $itemClass::$firstCommentRequired and $object->isFirst() ) { $title = $object->item()->mapped('title'); $tags = ( $object->item() instanceof \IPS\Content\Tags and \IPS\Settings::i()->tags_enabled ) ? implode( ',', array_filter( $object->item()->tags() ) ) : NULL; $prefix = ( $object->item() instanceof \IPS\Content\Tags and \IPS\Settings::i()->tags_enabled ) ? $object->item(…
Last reply by HeadStand, -
- 2 followers
- 2 replies
- 240 views
In 3.4.7 I was able to use this function to get a database record URL. $this->registry->ccsFunctions->returnDatabaseUrl(**Database ID**, 0, **Record ID**) Is there anything like this in the new version? It definitely made my life easy with this.
Last reply by IndianaJoe, -
- 1 reply
- 224 views
In the file system/Content/Search/Mysql/Index.php: public function index( \IPS\Content\Searchable $object ) { /* Get the index data */ $indexData = $this->indexData( $object ); An OutOfRangeException can be thrown since the search index may be corrupt due to tasks timing out and such, this is a problem for large forums several GB in size. Since the code below checks if the variable is not null anyway a fix is easy as changing that last line to: try { $indexData = $this->indexData( $object ); } catch (\OutOfRangeException $e) { $indexData = null; }
Last reply by bfarber, -
- 1 reply
- 202 views
Since you removed your bug tracker I'll post it here. When "Has poll" but "Does not have poll" options are ticked for the forum archive setting it builds the query component: array(1) { [0]=> string(34) "poll_state=0 or poll_state IS NULL" } However when this gets compiled to SQL it becomes: ["clause"]=> string(216) "topic_archive_status=? AND approved=? AND poll_state=0 or poll_state IS NULL AND posts<? AND last_post<? AND pinned=? AND forum_id IN(6,21,31,36,378) AND starter_id NOT IN(1,83091,1690153,28665,209765) AND featured=?" ["binds"]=> array(6) { As you can see the or condition is not gated with a parenthesis, it sho…
Last reply by bfarber, -
- 2 followers
- 2 replies
- 274 views
I'm fairly new to IPS and I don't have a terribly firm grasp of the API yet so here are a few questions that hopefully boil down to something fundamental. I need to implement functionality that works similarly to classified ads. It works like this: Users can enter data sets with title, content and a bunch of metadata. Visitors can look at a list of these data sets (showing a subset of the entered data) and click on each entry to get to a detail page. The data sets are easy enough to implement; they're just an \IPS\Content\Item implementation. After that, though, it gets more complicated. The documentation seems to imply that a node controller would be the way to…
Last reply by HebRech GmbH & Co. KG, -
- 1 follower
- 4 replies
- 322 views
I am working on an application which is supposed to modify the store layout. Unfortunately I wasn't able to remove the sidebar by just using theme hooks, hence I need to find another way so that I can modify the whole store layout. I thought about creating a new page and replacing the original store FURL with my own one. However that didn't work off as the menu would replace the "Store" url with the non FURL. What would you recommend so that I can replace the whole store frontend layout with my own phtml template?
Last reply by HeadStand, -
- 4 replies
- 217 views
Is there a code hook that runs after IPS has finished loading but before any headers are sent?
Last reply by Chatwee, -
- 1 follower
- 3 replies
- 210 views
<?php require_once './init.php'; $where = array ( 'pid IN(57,58)', 'poll_closed=1' ); $select = \IPS\Db::i()->select( 'COUNT(*) as cnt', 'core_polls', $where ); var_dump($select->query);exit; it print: D:\Programmi\Ampps\www\ips4\test.php:10:string 'SELECT COUNT(*) as cnt FROM `core_polls` WHERE pid IN(57,58)' (length=60) where is poll_closed go? Can anyone test this for 4.2.2 or lastest? @bfarber
Last reply by BomAle, -
- 4 replies
- 269 views
Using https://invisioncommunity.com/developers/rest-api?endpoint=core/members/POSTindex I only see 5 parameters I need to be able to set the user's verify status (to trigger a verification email), set their registration IP with a value I have, an autodetected timezone, a photoUrl. Is this possible in a sane way?
Last reply by bfarber, -
- 1 follower
- 2 replies
- 218 views
Hello, Your comment controls menu currently has the following check: {{if $comment->canEdit() || $comment->canSplit() || $comment->canHide()}} If we want to add something to this menu it means we have to overload one of these methods or rely on one of them to be true, which is not ideal. Could you add a more generic function for checking whether a comment should have this control menu appear? I also want the control menu to be possible to have on the first post in a topic, so if you could make that a possibillity as well I would appreciate it.
Last reply by TSP, -
- 2 followers
- 1 reply
- 190 views
I have items in the store for sale. Each Item has an email notification attached to it so I know if someone purchases it. PROBLEM: When someone purchases 5 of something I get 5 emails. So imagine if 50 people purchased 5 items. My email box would be overwhelmed! Is there a way that the system can send me a copy of just the Invoice from that customer. Then I get one email with all the items someone has purchased. I have spend hours looking all over the CP for a way to do this and can not figure one out. I did think about using only the notice I get from Stripe but that would not tell me if someone used an account credit. All the best a…
Last reply by opentype, -
- 12 replies
- 617 views
Hello, After several attempts and a search on the forum, I have not found a solution. I created a new application, set an admin module with a default controller but I have no menu that appears for my application. Did I forget a step? Thank you for your clarification.
Last reply by bfarber, -
- 2 replies
- 234 views
Hi, Are there any ips:template documentations? Thanks
Last reply by bfarber, -
- 1 follower
- 2 replies
- 251 views
I had this code in 4.1 that worked perfectly: $form->add( new \IPS\Helpers\Form\Ftp( 'directory_ftp', $this->ftp, true, array( 'validate' => false ), function( $val ){ if( empty( $val ) ) { $val = \IPS\Request::i()->directory_ftp; } $conn_id = ftp_connect( $val['server'], $val['port'] ); $login_result = ftp_login( $conn_id, $val['un'], $val['pw'] ); if( !$conn_id || !$login_result ) { throw new \InvalidArgumentException( 'FTP Connection Failed' ); } ftp_pasv( $conn_id, true ); if( !ftp…
Last reply by HeadStand, -
- 1 reply
- 208 views
Hello, "Complete My Profile" header block generate a lot of sql queries. Steps to reproduce - Enable query log - Create first step and add custom field - On front-end you can see 2 queries - Add new field in the step - On front-end you can see 3 queries - Add new field in the step - On front-end you can see 4 queries - Add new step with 1 custom field - On front-end you can see 6 queries - etc.
Last reply by bfarber, -
- 2 followers
- 4 replies
- 304 views
A few of my apps utilize the built in custom profile fields to manage user data. In 3.x, the unique key ensured we got data from one field, and one field only. In 4.x, there is no unique key for custom profile fields. There is no way to ensure the field you're calling is the one with the data you're expecting. Custom fields are a great functionality, however there is no way to limit the client from creating more than one field of your custom type. So while custom fields help a great deal, there is still no guarantee that it is unique. Is there any way we can get a unique key re-added for profile fields to simplify the process of locating a custom field with th…
Last reply by bfarber, -
- 6 replies
- 293 views
Hey, If the IPS on a "clean" installation, can restore files to the forum? Or would it be in this case, easier to install and build the pages again because it is not yet a big forum. Thank you!
Last reply by Tracy Perry,