Developer Connection
Use this forum to interact with our development team on technical issues, suggestions and official best practices advice.
1,734 topics in this forum
-
- 3 followers
- 5 replies
- 944 views
Hello, I uploaded all newest files into FTP and then trying run upgrader (admin/upgrade) I'm getting this error: Mon, 27 Sep 2021 10:04:48 +0000 SELECT * FROM `ips_core_applications` AS `core_applications` ORDER BY app_position IPS\Db\Exception: Table 'xxx.ips_core_applications' doesn't exist (1146) #0xxx/public_html/system/Db/Select.php(383): IPS\_Db->preparedQuery() #1xxx/public_html/system/Db/Select.php(441): IPS\Db\_Select->runQuery() #2 [internal function]: IPS\Db\_Select->rewind() #3xxx/public_html/system/Application/Application.php(176): iterator_to_array() #4xxx/public_html/system/Application/Application.php(145): IPS\_Application::getStore() #5x…
Last reply by Stuart Silvester, -
- 2 followers
- 1 reply
- 625 views
Here's the steps to replicate the issue here on the IPS forum: Go to this page: https://invisioncommunity.com/forums/forum/492-community/ Enter a term in the quick search field. Let's use question for this example. Select Search In This Forum and search. You'll get a page with 3118 results and 125 pages with this url: https://invisioncommunity.com/search/?q=question&quick=1&type=forums_topic&nodes=492 Here's a couple of problems: #1 === Now look at the url for page 2 in the pagination area and you'll see it's: https://invisioncommunity.com/search/?q=question&type=forums_topic&nodes=492&update…
Last reply by Stuart Silvester, -
- 1 reply
- 677 views
Hi. Is it programmatically possible to count the total number of reactions of a member and display it under his profil pic ? Thank you.
Last reply by Yous You, -
- 3 followers
- 4 replies
- 946 views
Error after creating table. How to reproduce: Open developer center on any application. Click on the tab Database Tables. Create a new table Change to the tab Default Inserts to see the error: Additionally, when Inserts are created and there are many columns, the control buttons (edit/delete) are out of view.
Last reply by Stuart Silvester, -
- 2 followers
- 7 replies
- 1.2k views
I'm trying to assign an achievements via API to a user, manually. the badge is ID 17 and the user is ID 1. to try here's the code: $client = new Client(); $response = $client->request('POST','https://domain.it/api/core/members/1/achievements/17/awardbadge?key=***'); $headers = $response->getHeaders(); $body = $response->getBody(); var_dump($headers, $body); or $url = 'https://**/api/core/members/1/achievements/17/awardbadge?key=***'; $endpoint = $url; $options = [ 'form_params' => [ '$badgeId' => 17 ] ]; $client = new Client(); $request = $client->post($endpoint, $options); when I run it, without everything being ignored, eve…
Last reply by Stuart Silvester, -
- 3 followers
- 0 replies
- 429 views
I want to change a pre-defined template in ips.core.template (fileitem). How can I overwrite it? Are there some practical examples in the default IPS applications? Which JS or controller is used to handle the uploaded file(s)? thanks
Last reply by ReyDev, -
- 1 reply
- 677 views
In \applications\downloads\modules\front\downloads\view.php around lines 1023-1028 there's a duplicate $existingThumbnails = array(); line (3rd and 6th): $existingRecords = array(); $existingScreenshots = array(); $existingThumbnails = array(); $existingLinks = array(); $existingScreenshotLinks = array(); $existingThumbnails = array();
Last reply by Daniel F, -
- 1 follower
- 2 replies
- 965 views
Hello! Is it allowed to create a new table using \IPS\Db::i()->createTable() when installing a plugin and remove it using \IPS\Db::i()->removeTable() when uninstalling? I need only several fields and I do not want to switch to application just because of it.
Last reply by Daniel F, -
- 1 follower
- 4 replies
- 453 views
I want to show a custom block on Blog App only. what is the correct way to select Blog app ? All I need to add a fluid block/template just below the header of Blog App. For pages I used this {{if $home = \IPS\cms\Pages\Page::$currentPage->id == 5}} {block="custblock1"} {{else}} {{endif}}
Last reply by Pushpendra Singh Chauhan, -
- 2 followers
- 9 replies
- 1.2k views
My website, dragonmount.com, is slow to load. There's an initial long delay of about 6-12 seconds, and then the entire site rushes and loads quickly. This has been driving me crazy because I can't figure out where the delay is coming from. The IPS application is installed onto a local server. The MySQL database is installed on a different server. The two servers (app + db) are connected to the same switch. Easy networking. Fast ping times. At this point, I wonder if the initial delay described above is due to the server making a request to the DB. Could that be it? How do I track it down? Does IPS make a single, persistent connection or does it us…
Last reply by rfcontreras, -
- 1 follower
- 6 replies
- 1k views
Hello, I have developed an app that places topics on a scheduled list to be posted at a later time. On my end everything works fine, but I have gotten a message from the MP moderator that it is throwing the following error: INSERT INTO `core_attachments_map` ( `attachment_id`, `location_key`, `id1`, `id2`, `id3`, `temp`, `lang` ) VALUES ( 1, 'scheduledtopics_scheduledtopics', NULL, 'scheduledtopics', NULL, array ( 0 => NULL, 1 => 'scheduledtopics', ), NULL ) ON DUPLICATE KEY UPDATE `attachment_id`=VALUES(`attachment_id`), `location_key`=VALUES(`location_key`), `id1`=VALUES(`id1`), `id2`=VALUES(`id2`), `id3`=VALUES(`id3`), `temp`=VALUES(`temp`), `lang`=VALUES…
Last reply by Miss_B, -
- 1 follower
- 6 replies
- 1k views
I want to fetch followers and following members for a specific user. how can i do it?
Last reply by ReyDev, -
- 1 follower
- 6 replies
- 1.4k views
Question 1: How would I check if a user is in a Moderator group? I understand that the below exists: \IPS\Member::loggedIn()->isAdmin() Is there an equivalent for Moderator? What is it? - I understand I could just check all Group IDs that I know are Moderators but that means hardcoding and it isn't very elegant, I put an example below of that: {{if \IPS\Member::loggedIn()->inGroup( array( 28, 15, 6 ) )}} Groups 28, 15 and 6 can view this. (All of which are Moderator groups) {{endif}} But... I don't really want to do this. I would much rather something like an "isMod" check that would update itself, rather than needing me to put IDs every time a modera…
Last reply by IPCommerceFan, -
- 1 follower
- 1 reply
- 717 views
Hello guys, im here to ask you 1 simple question How can i use the \IPS\Db::i()->select in a template ? I mean i know i have this example : $select = \IPS\Db::i()->select( '*', 'some_table', array( 'field=?', 1 ), 'some_column DESC', array( 0, 10 ) ); But i dont understand the logic, i want to extract for example with that method all the names from core_members Can you help me with that?
Last reply by Matt, -
- 0 replies
- 381 views
I've got my own app (a Nuxtjs based magazine site) on the same domain as IPS & I'm trying to check from Nuxt if the user is logged in to IPS & get their ID so I can use it to make sure they only submit a form (a vote) once. The cookie that holds the ID is HttpOnly so I can't get it from Javascript, the cookie will be passed to the Nuxt app because it's on the same domain, just in different folders. Is there another call I can make on the API that returns any info about the logged in user? I don't really want to have to add oath because then they'd have to log in to the same app twice which would be a pain. Any ideas?
Last reply by brfcs, -
- 1 follower
- 0 replies
- 428 views
Invision Community v4.6.5.1 In our news cms that also uses a version of CKeditor, media is embedded in such a way that if the tweet is deleted, all that is left behind is like a quote, it also displays the quote if people are blocking the Twitter javascript from firing but it seems liike in forum posts if the Tweet is deleted, then you are left with a massive blank space. I think this is a bug, as I also confirmed this behavior in IPB Default theme. The tweet https://twitter.com/AP/status/1431370344342904839 (which is funny because now it defaults to an URL because the tweet can't be found)
Last reply by Redmak, -
- 1 follower
- 14 replies
- 1.3k views
I have an app that changes the navigation but i want to disable it for specific theme. how can i do it ?
Last reply by Daniel F, -
- 1 follower
- 2 replies
- 484 views
Hi, Is there a timestamp available in IPS somewhere or perhaps a background task timestamp for when the theme's files (js/css) were last rebuilt/cached? Basically I need to compare it to another timestamp inside a plugin background task to decide whether to trigger a cache rebuild. I don't want to reinvent the wheel if IPS already stores the timestamp or age somewhere already. Many thanks!
Last reply by The Old Man, -
- 1 follower
- 18 replies
- 2k views
Hello, \IPS\Helpers\Form\Translatable doesn't respect - the toggles POC $form = new \IPS\Helpers\Form; $form->add( new \IPS\Helpers\Form\YesNo( 'test', 0, FALSE, array( 'togglesOn' => array( 'form_test2' ) ) ) ); $form->add( new \IPS\Helpers\Form\Translatable( 'test2', NULL, TRUE, array( 'maxLength' => 5 ) ) ); if ( $values = $form->values() ) { $form->addMessage( 'Ok', 'ipsMessage ipsMessage_info' ); } Result - the validation POC Pay attention on 'maxLength' => 5 Result
Last reply by IPCommerceFan, -
- 1 follower
- 2 replies
- 969 views
I have 2 custom fields created for my downloads files, i see that the database is saving the records in the 'downloads_ccontent' table. Using the API is there way to post new values for these fields when creating a new download through the REST API? I have tried a few variations of passing extra fields in the post data, and they do not seem to work. IE: the "Fields" array below $curl_post_data = array( 'category' => 2, 'author' => 1, 'title' => 'Test File Upload', 'description' => $file_desc, 'files' => array( $filename => urlencode(file_get_contents($file_url)), $filename2 => urlencode(file…
Last reply by Mike Mc, -
- 1 follower
- 2 replies
- 454 views
I use ajax for accessing data, it worked well before but in IPS 4.6 ( I guess) it doesn't work in IN_DEV = TRUE but works in production mode. and i got this error : Failed to load resource: the server responded with a status of 403 (Forbidden)
Last reply by ReyDev, -
- 1 follower
- 1 reply
- 462 views
protected static function constructLoadQuery( $id, $idField, $extraWhereClause ) { return parent::constructLoadQuery( $id, $idField, $extraWhereClause )->join( 'nexus_donate_addon_goals', 'nexus_donate_addon_goals.d_did=nexus_donate_goals.d_id' ); } \IPS\nexus\Donation\Goal::roots() Can someone tell me if roots method works with or uses constructLoadQuery? When I use \IPS\nexus\Donation\Goal::roots(), the joined fields are not included. Is there something else required to get this to work?
Last reply by Daniel F, -
- 1 follower
- 3 replies
- 935 views
Followed the instructions of adding an item to the ModCP: class _adminignores { /** * Returns the primary tab key for the navigation bar * * @return string|null */ public function getTab() { return 'adminignores'; } /** * Manage * * @return void */ public function manage() { return 'Test'; } } I also added the 'modcp_' language definition: $lang = array ( 'modcp_adminignores' => 'Admin Ignores', }; However, I am getting the following error: IPS\Http\Url\Exception: INVALID_SEO_TEMPLATE (0) #0 E:\wamp64\www\***.6\init.php(902) : eval()'d code(169): IPS\Http\Url\_Friendly::buildFriendlyUrlComponentFromData('app=core&…
Last reply by Daniel F, -
- 2 followers
- 6 replies
- 1.2k views
I have an application that uses only $reviewClass and NO $commentClass which throws an error after upgrading to 4.6. This happens because loading the reviews then goes on to call the function _comments() from system\Content\Item::reviews() to load the data. The error is because of this code added in system\Content\Item::_comments() to handle solved contents, statistics, and recognized content (lines 4349-4400): /* Solved count */ $commentClass = static::$commentClass; $showSolvedStats = FALSE; if ( method_exists( $this, 'isQuestion' ) and $this->isQuestion() ) { $showSolvedStats = TRUE; } else if ( \IPS\IPS::classUsesTrait( $this, 'IPS\…
Last reply by Daniel F, -
- 2 replies
- 456 views
What's the best way to request new registrations or unvalidated accounts in php? Adding &validating=true/false to /core/members api doesnt seem to work. Can't seem to change the default user group on registration although that could be more of a pain than checking elseware. Any ideas? thanks
Last reply by Kinzer,