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
-
- 2 replies
- 338 views
Found a bug, running version 4.1.19.1; to recreate: Open Edge browser With new account or an account that has not submitted a profile photo or make any setting changes to the profile photo option, click your account name -> Profile Click on image to change your profile photo Select upload photo, and try to choose single file. Nothing shows up in edge browser. Tested in IE, FireFox, and Chrome. All those three worked. The workaround: Choose "No Photo" from options Save Try to upload photo again
Last reply by bfarber, -
- 17 replies
- 936 views
Hi, we're trying to update a custom bank/shop app from 3.4.7 to work with 4.1.18 after we upgrade and are having a hard time working out how to connect to the database - especially pre-existing tables created for the 3.4.7 app. Current example, using this query: $userMoney = iterator_to_array(\IPS\Db::i()->select('*','ssb_bankacc')); it only displays '1' with print_r() which, to my understanding, means the array is empty. But the table is not empty. But if I replace 'ssb_bankacc' with 'core_groups', I do get back data from the table that displays with print_r() Has anyone had issues with added database tables when using the \IPS\Db::i() function…
Last reply by AuntyNem, -
- 1 follower
- 2 replies
- 306 views
@Rikki @Mark can you or others show me a example to got updated serialized input for javascript ckeditor and codemirror? I don't see any example here: https://invisionpower.com/4guides/themes-and-customizations/javascript-framework/using-utility-modules/ but I have found some example from streams controller like: this._formData = ips.utils.form.serializeAsObject( this.scope.find('form'), this._serializeConfig ); where this._serializeConfig = { 'stream_date_range[start]': this._serializeDate, 'stream_date_range[end]': this._serializeDate }; /** * A function which will be passed into the serializeAsObject function so that * we can format dates con…
Last reply by BomAle, -
- 1 follower
- 2 replies
- 337 views
I'm looking for an overview of all the basic styling classes available within the default theme that can be reused everywhere. For example any special padding classes, button classes, etc. Is there a list or any documentation available somewhere or do I have to dig through the stylesheets manually?
Last reply by Jacques Corby-Tuech, -
- 9 replies
- 757 views
Hi, I am writing a plugin for the marketplace here which will display a different store layout/listing. Apparently I am not completely understanding how Node Models work. It's basically about these lines which I have commented: <!-- Get all packages which the member is allowed to view --> {{$packages = \IPS\nexus\Package::roots();}} {{foreach \IPS\nexus\Package\Group::roots() as $group}} <!-- Check if this group has packages and if member is allowed to view at least one package --> {{if $group->hasPackages()}} Show package {{endif}} {{endforeach}} What I have expected to happen is described in the above comments, but what ac…
Last reply by inkredible, -
- 0 replies
- 298 views
Hallo, has anyone already implemented a login/autologin in a mobile app or from external website? I need to login/register and save that data on the phone. Are there some examples, where to start?
Last reply by Batnik, -
- 2 followers
- 8 replies
- 725 views
Hello, I am facing the issue that my application's javascript is being cached for approx. 5 minutes, so I need to wait 5 minutes everytime to check my javascript changes. It is not locally cached (I have made this sure by hard refreshing + trying to load the page in a new incognitow instance). I think the caching happens because IPS merges all javascript files into one file. I think it makes sense to reload the javascript more frequently if the forum is set to the dev mode.
Last reply by BomAle, -
- 3 replies
- 315 views
$response = \IPS\Http\Url::external( "http://somewebsite.com/rss/" )->request()->get()->decodeXml(); if ( !( $response instanceof \IPS\Xml\Rss ) and !( $response instanceof \IPS\Xml\Atom ) ) { throw new \IPS\Task\Exception( $this, 'Error updating feed' ); } After upgrade to 4.1.6 such condition returns TRUE on valid RSS feeds. Is it a bug? How to fix it?
Last reply by bfarber, -
- 1 reply
- 289 views
I want to build a dynamic URL inside of template, which looks similiar to this: <a href='{url="app=botuserpanel&module=userpanel&controller=userpanel{{if $tab->area}}&area={$tab->area}{{endif}}"}'></a> Because of my if expression it won't build the URL correctly, the result looks like: <a href="{url="app=botuserpanel&module=userpanel&controller=userpanel&area=sessions"}"></a> . Is there a way to build the URL correctly with my IF expression? For example is it possible to build the URL string upfront (but still inside of my template), pass that to {url=} so that it will work?
Last reply by bfarber, -
- 1 reply
- 295 views
Hi There, I encountered a bug causing the run function in '/applications/core/extensions/core/Queue/RecountMemberContent.php' to be called in an endless loop. Solution: Line 61: $last = null; or Line 77: if($last === 0) Greetings
Last reply by bfarber, -
- 5 replies
- 334 views
Hello, I have already tried my luck in the development assistance area but I haven't got a response. I hope it is allowed to ask for help here though, as the documentation about Permissions is very short as well. I've got a frontend tabmenu which looks like this: I created a permissions page in my admincp which should allow admins to setup permissions for each tab (for example debug and administration tab should only be visible for groups who are allowed to see these tabs). In the table core_permission_index I can see one entry each tab and now I wonder how I can check if the loggedin user is allowed to see each tab. Questions: 1. Ho…
Last reply by bfarber, -
- 2 replies
- 399 views
Reference: When doing an array targeting packages, are you able to have more than 1 hook targeting the same package? Like if I target Package 1 in example1.php and target the same package in example2.php will that work or shouldn't do that?
Last reply by MADMAN32395, -
- 2 followers
- 9 replies
- 351 views
/** * Return either NULL for no restrictions, or a list of container IDs we cannot search in because of app specific permissions and configuration * You do not need to check for 'view' permissions against the logged in member here. The Query search class does this for you. * This method is intended for more complex set up items, like needing to have X posts to see a forum, etc. * This is used for search and the activity stream. * We return a list of IDs and not node objects for memory efficiency. * * return null|array */ public static function unsearchableNodeIds() This function is useful but it don't cover parents permissions at this time. I am …
Last reply by BomAle, -
- 2 replies
- 287 views
Can you move the lang bit cf_topic from Downloads to Core, as already happens with pf_format lang bit? if ( \IPS\Application::appIsEnabled( 'forums' ) ) { $form->addHeader('quizzes_category_forums_integration'); $form->add( new \IPS\Helpers\Form\YesNo( 'cf_topic', $this->topic ) ); $form->add( new \IPS\Helpers\Form\TextArea( 'pf_format', $this->id ? $this->topic_format : '', FALSE, array( 'placeholder' => "<strong>{title}:</strong> {content}" ) ) ); } The way it isnow we need to rename the cf_topic field in all apps we use extra fields and add a lang bit; we don't need to do that with pf_format because the lang bit is…
Last reply by Adriano Faria, -
- 3 replies
- 332 views
Hey, I've got just a report on one of my recent plugins which resulted into an error, with the following info: SELECT tid FROM `ipb_forums_topics` AS `forums_topics` WHERE MONTH(FROM_UNIXTIME(start_date)) = MONTH(NOW()) AND tid IN (SELECT item_id FROM core_reputation_index WHERE app='forums' GROUP BY item_id ORDER BY COUNT(item_id) DESC) AND ( forum_id IN(X) ) LIMIT 5 IPS\Db\Exception: Table 'core_reputation_index' doesn't exist (1146) #0 /system/Db/Select.php(356): IPS\_Db->preparedQuery('SELECT tid FROM...', Array, true) #1 /system/Db/Select.php(418): IPS\Db\_Select->runQuery() I've no idea, as I have 2 test forums and my dev forum where this table…
Last reply by GriefCode, -
- 1 follower
- 15 replies
- 935 views
Hello, I want to create a list from a given MySQL table, but I am facing an exception and I am not sure what the reason is. 1. This is the code inside of my controller which is supposed to load the template: protected function _sessions() { /* Create the table */ $table = new \IPS\Helpers\Table\Db( 'chat_log_archive', \IPS\Http\Url::internal( 'app=botuserpanel&module=userpanel&controller=userpanel&area=sessions' )); $include[] = 'log_user'; $include[] = 'log_message'; $include[] = 'log_time'; $table->include = $include; $table->mainColumn = 'log_user'; /* Custom parser for unix timestamp */ $par…
Last reply by bfarber, -
- 7 replies
- 497 views
IPS v.4.1.18.2 Do not take effect changes to settings. Settings are saved, but their effect is not working. If the plugin update by using an xml file, the previously saved settings are applied. What could be the reason?
Last reply by Cheshir, -
- 2 followers
- 5 replies
- 916 views
Hello, I am new to IPS Framework and I barely know how to use it. I want to ask you if there's a way I can find all the details like the post that @bfarber made regarding working with members. I can't really find something useful so I can learn with it's base code. Also I am using XAMPP on my MacBook Pro, is there a faster way to test all my stuff and if yes how? And how can I configure phpStorm on my MacBook so it runs through a localhost (in phpStorm not XAMPP). Also how can I use the namespace? I'm not really familiar with OOP PHP but trying to learn slowly. How can I use my .php files? For example: I have a fetch.php th…
Last reply by Daniel F, -
- 1 reply
- 283 views
Hey, since today i got an error when compiling my application: Overall it does compile successful, i can download it after and deploy it without any issues. No error logs, no apache error logs. Does anyone has an idea what is causing this? The response from the server is exactly what is visible on the image. Greetings
Last reply by GriefCode, -
- 4 replies
- 396 views
Hello, Dear colleagues, In file /system/Theme/Dev/Template.php (line 88) (version 4.1.18.2) may be more informative \BadMethodCallException message is: throw new \BadMethodCallException( 'NO_TEMPLATE_FILE - ' . $file . '; BIT - ' . $bit ); Very hard to debug with message: Thank you.
Last reply by Daniel F, -
- 2 replies
- 310 views
Hey, I've created today a new structure for my menu and encountered a lot of issues getting through it. The basic issue was the doubled dropdown menu items. Once I added it I got into this screen: After some reloadings i got a clear structure, however in this broken state sometimes the sub dropdown got fully deleted, but I actually deleted an item below it. I could not find anything close reported and marked as fixed for 4.1.19 so i hope there is no duplication anywhere. Greetings
Last reply by GriefCode, -
- 2 followers
- 10 replies
- 560 views
Hello, guys, I think that I found a small problem with system/Helpers/Table/Db.php: /* Count results (for pagination) */ $count = \IPS\Db::i()->select( 'count(*)', $this->table, $where ); and... $count = $count->first(); This method of counting lines not works properly when we use "GROUP BY" clause. May be better: $count = \IPS\Db::i()->select( 'count(*)', $this->table, $where, NULL, NULL, $this->group ); //... $count = $count->count(); Thank you in advance.
Last reply by Aiwa, -
- 1 follower
- 1 reply
- 285 views
Hey, I've just noted today that on a plain application the admin menu items are no longer created. Steps to reproduce: Create new application Create Admin Module Create Admin Controller No new admin cp node was created within the admin menu. Creating more controller will also not add any item to the acpmenu.json file. After adding manually the code for the menu to the acpmenu.json other controllers are added as well. Is it any error on my side or is it on the current suite version? Regards
Last reply by CodingJungle, -
- 5 replies
- 621 views
Hi, I saw that IPS stores the "ips4_member_id" and "ips4_pass_hash" in the user's cookie. The value looks for my test account looks like this: 61f2a3256147800655e3d38df57db645 , however the members_pass_hash in the core_members table looks completely different (like this: $2a$13$A5WevLFUT2VxECdDeK8AbOYjltYRg0.PvKuRTG3oi[...]E). I wonder how I can use the cookie value in order to make sure the user is valid (and not faking a cookie with a desired member_id)? I noticed that everything before the dot stored in my member's pass hash is 1. The BlowFish crypt method and it's cost parameter and 2. the salt. However everything behind the key is completely different tha…
Last reply by bfarber, -
- 1 follower
- 5 replies
- 372 views
Hey, I have included the class in the title in my code. However, the filters appear not to work with ajax calles. They are always rendering a new page, probably then the chart without any header as it also sets 'noHeader=1'. My Code: /** * @return void */ protected function manage() { $chart = new \IPS\sharedstats\DbIntegration\DynamicChart( \IPS\Http\Url::internal( 'app=sharedstats&module=stats&controller=dashboard' ), 'stats_games', 'datetime', '', array( 'isStacked' => TRUE ), 'LineChart', 'daily' ); $chart->addSeries( \IPS\Member::loggedIn()->language()->addToStack('games'), 'number', 'COUNT(*)' ); $cha…
Last reply by HeadStand,