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
-
- 1 follower
- 1 reply
- 323 views
As per title, can you please add one and also pass back all the parent values that have actually changed? I always need to run some code when the parent ID changes, previously I was extending _afterSave() in my own module, but I noticed that it didn't work when I re-order the nodes in the tree by dragging them. Right now we have an _afterSave() function we can extend/overload when saving a node in ACP, however, there is no way to extend the reorder() function unless we extend it first and copy/paste almost the same code. My goal was to add my own code AFTER the function runs but I can't because there is a redirect/sendOutput at the end of it. I have worked aroun…
Last reply by bfarber, -
- 2 followers
- 14 replies
- 938 views
I have a few suggestions, One i've made before, but i thought i'd dust it off. 1. can we have the "id" of the forms, if not set, bet set to the helpers name, with "_js" appended to it? Form helpers are used ALOT by us developers, it would be nice not to have to fill in 6 parameters, that all have different different default values, just to set the ID just so we can use "togglesOn" or "togglesOff" (or variant there of). the option would still be there in case we want to override the "default" id of name with "_js" appended. this would make the code a lot easier to read, especially if we are just using it for the toggles options. 2. if the field is disabled, have…
Last reply by CodingJungle, -
- 2 followers
- 10 replies
- 662 views
When using the REST API, a GET request is quite easy as long as .htaccess based SEO URLs are activated, this URL string would work: /api/forums/topics?sortBy=date&sortDir=desc But with deactivated SEO friendly URLs, this string would work: /api/index.php?/forums/topics but this one not: /api/index.php?/forums/topics?sortBy=date&sortDir=desc So how should I add the extra GET variables without generating an 3S290/4 INVALID_CONTROLLER error?
Last reply by IPBWI.com Matthias Reuter, -
- 1 reply
- 429 views
I (others...) noticed that the jquery-ui you provide with the core app doesn't include everything that jquery-ui normally includes. Any particular reason? If developers want to code with that and your included version is missing what is needed, that's an extra (and coliliding load) of jqueryui that could/should be avoided on such a baseline library. Also, the core version provider is legacy now, new version (marked for jquery 1.7) is 1.12.1; IPS included version is 1.11.4 DEFAULT: /*! jQuery UI - v1.11.4 - 2015-03-11 * http://jqueryui.com * Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dial…
Last reply by Mark, -
- 2 followers
- 6 replies
- 382 views
When using the _Node form helper there is NO way to pass an option to disable the $autoPopulate value in order to not show the children of the root categories. Since I have quite a few children nodes in the app I want to show only the root ones initially to the user but this is not possible right now: /* Display */ return \IPS\Theme::i()->getTemplate( 'forms', 'core', 'global' )->node( $this->name, $selected, $this->options['multiple'], $this->options['url'], $nodeClass::$nodeTitle, $nodes, $this->options['zeroVal'], $noJS, $permCheck, $this->options['subnodes'], $this->options['togglePerm'], $this->options['toggleIds'], $disabledCallbac…
Last reply by teraßyte, -
- 3 replies
- 326 views
Right now the tag is limited. Granted, it makes things a tiny bit cleaner but it doesn't actually solve the problem of allowing a user to adjust the opacity of an element through theme (or plugin) settings. You aren't allowing the opacity option to carry through a setting - it must be hard coded. So, as is, if I want users to adjust the opacity of a color element I still have to do a bunch of hacky crap of if then statements and then hard code in a bunch of opacity options myself. And of course, I can;t jsut use a plain opacity css call with a theme setting as that will effect the entire element opacity and not the color element opacity specifically. Lowest of h…
Last reply by bfarber, -
- 3 followers
- 12 replies
- 968 views
can you make it where addresses that resolve to "localhost" like lan address. the most common are 10.0.0.* and 192.168.1.* or 192.168.0.*, are exempt like localhost is. there are times where i will want to test/debug on a localhost on my ipad/android. I can't easily alter my host file for non jailbroken/non-rooted devices, so i have to alter the base url in my conf_global.php to my computers internal network address so i can access the install from my ipad/android. However, I've already burnt up my test site "usage" on like 2 of my license cause of this (due to upgrading/installing, without realizing i was still on the internal network address). I do think this…
Last reply by Lindy, -
- 1 follower
- 2 replies
- 293 views
would it be possible to add in a feature when an app gets upgrade, it notifies the user that that templates/css has changed, in case they have made changes. either offer up a diffs to show them the changes or "merge" them in. There has been many times where i've seen them made slight changes to a css, even after "reverting it", it still doesn't get upgraded cause it is still seen as "changed". would be great help to us developers if the end user is notified of these changes via the upgrader, as there have been times i've been buried in support request and this has been the problem.
Last reply by CodingJungle, -
- 1 follower
- 2 replies
- 327 views
Why aren't hooks added to hooks.json when they are created? I've always found this one weird as it effects portability (I work from my laptop and desktop and switch between the two frequently and i use a remote git repo to keep the two synced to each other). There have been times, where i have forgotten to run "build" before i push to git, and the hook file gets pushed, but the hooks.json is lacking the "install". I have a plugin installed that handles this for me, but I would prefer this to be baked into the framework (not my plugin, but the hooks being added too hooks.json when they are created) or a rational reason why this is a bad thing?
Last reply by CodingJungle, -
- 4 replies
- 325 views
A lot of unhookable if statements abound. The one that is pretty much a stone wall is this: {{if $category->can('add')}} <ul class="ipsToolList ipsToolList_horizontal ipsClearfix ipsSpacer_bottom ipsResponsive_hidePhone"> {template="categoryButtons" group="browse" params="$category->can('add'), $category, NULL"} </ul> {{endif}} That is the only call to display the button controls on category view in Gallery and it's trapped inside of a canAdd check. Any attempt at hooking and adding a button of my own there is doomed to fail unless the individual viewing the page has the ability to add in that category. Of course, I could just hook the en…
Last reply by bfarber, -
- 2 followers
- 3 replies
- 344 views
Can you please change the method \IPS\Content\Controller::edit() to allow the use of custom templates to display the edit form? Right now the code is this: /* Build the form */ $form = $item->buildEditForm(); if ( $values = $form->values() ) { /* [...] */ } $this->_setBreadcrumbAndTitle( $item ); \IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'forms', 'core' )->editContentForm( \IPS\Member::loggedIn()->language()->addToStack( 'edit_title', FALSE, array( 'sprintf' => array( \IPS\Member::loggedIn()->language()->addToStack( $item::$title ) ) ) ), $form ); You allow us to add/change fields in th…
Last reply by bfarber, -
- 2 followers
- 4 replies
- 454 views
SNIP /* Clean HTML */ if ( $value and $this->htmlPurifier ) { $value = $this->htmlPurifier->purify( $value ); } /* BBCode, Profanity, etc. */ if ( $value ) { $value = $this->_parseContent( $value ); } /* Clean HTML */ if ( $value and $this->htmlPurifier ) { $value = $this->htmlPurifier->purify( $value ); } SNIP Am I missing something or is this just a mistake? Seems inefficient... 4.1.13.2
Last reply by bfarber, -
- 1 reply
- 279 views
Took a cursory look at the code and I'm pretty sure I know the answer already but still worth an ask. When you pull in jQuery/JS resources from plugins/apps you aren't checking for any matching file names and only loading one of them are you? My two second look says no. So if one app author includes derp.min.js in an app and then a user grabs a plugin that coincidentally also uses and loads in derp.min.js they are both loaded right? We're just about two years in now and I'm thinking eventually there are going to be collisions like this if there haven't been already. I know @Kevin Carwile released a js library thingy early on but adoption and such will alway…
Last reply by bfarber, -
- 2 replies
- 322 views
Is there anyway to make text field to accept templates and logics ? for example i have a text field in my theme setting in this field im using a Pages block key inside a <li> tag the out put is only {block="articles"} it works fine if i use the block keys in html templates but not if it comes form a text field Help appreciated
Last reply by TAMAN, -
- 5 followers
- 5 replies
- 476 views
if your code for whatever reason throws an exception when editing a content item, you get this error: which is fine for a live site, but for a developer, its a rabbit hole. so in system/Content/Controller.php in the edit method's main catch, can we have something like: if( \IPS\IN_DEV ){ throw $e; } else { \IPS\Output::i()->error( 'edit_no_perm_err', '2S136/E', 404, '' ); } or possible it being logged to the logs? something more than a error message that says "you can't edit this any longer"? I just want this for in_dev mode, it would make things a lot easier than have to each version, go into and editing a core file for my dev environment in…
Last reply by bfarber, -
- 1 follower
- 1 reply
- 304 views
From what I can see there is no way to pass along CSS classes to add to a form field. For example I wanted to add some space below a TEXT field and I can't, for I simply had to add a custom CSS rule targeted to that field. Being able to pass ipsSpacer_bottom directly would have saved me the trouble though. And in case a custom theme has a different spacing compared to the default skin the change would automatically apply passing the CSS class, in my case I'll have to update my CSS rule for that theme instead. That's just an example with padding/margins, but it applies to anything really.
Last reply by bfarber, -
- 1 follower
- 5 replies
- 481 views
When trying to load ipsRegistry class and initiating it with the following code within an application's API file define( 'IPB_THIS_SCRIPT', 'public' ); require_once( realpath(dirname(__FILE__) . '/../../../').'/initdata.php' ); require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' ); require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' ); \ipsRegistry::init(); I get the following error: file_put_contents(/var/www-test/ipb4/cache/skin_cache/system/emailWrapper.php): failed to open stream: No such file or directory backtrace log: #0 [internal function]: IPS\IPS::errorHandler(2, 'file_put_conten...', '/var/www-…
Last reply by IPBWI.com Matthias Reuter, -
- 2 followers
- 8 replies
- 490 views
How do we alert IPS support/devs that there is either a client installation problem that needs actual support or a problem with the IPS core itself when a plugin is involved without getting into a forever circular dance between the support desk tossing things out due to the word "plugin" and plugin authors unable to get traction in the bug tracker as it is un-replicatable on stock installs? I'm on my second right now. The first can get bent, regardless that there is something going on, as he/she has some pirated junk on his install. The second is puzzling, nothing to do with my work, but if escalated to support will get the usual heave ho. I'll throw out the cas…
Last reply by Flitterkill, -
Hello, I am trying to setup a mibbit page for on my forums. I know how to do it, but is there a way I can put it in an Ajax page, so people don't have to reconnect when they surf on forums? Thank you Best regards Hassan
Last reply by Mark, -
- 1 reply
- 341 views
I ran into a problem recently that took me some time to figure out. Basically, we show a CAPTCHA to users to protect against automated downloads. Recently, we added a system where they only have to do this every 30 minutes (and we set a $_SESSION['download_captcha_last_completed'] variable). This didn't seem to work for me randomly, and upon long investigation, I realized I had my PC was also on the website. I suspect what was happening is that my PC was making requests for notifications, which would cause my laptop's session to be wiped out. It isn't noticeable to users (I guess they get logged in via pass hash or something else?) but the $_SESSION array seem…
Last reply by Mark, -
- 1 follower
- 1 reply
- 336 views
if(in_array( 'IPS\Content\Permissions', class_implements( $class ) ) AND isset($class::$containerNodeClass) and isset($class::$databaseColumnMap['container'])) { $nodeClass = $class::$containerNodeClass; $join[] = array(\IPS\Db::i()->select( array($class::$databasePrefix . $class::$databaseColumnId, $class::$databasePrefix . $class::$databaseColumnMap['poll']), $class::$databaseTable, \IPS\Db::i()->findInSet( "perm_{$nodeClass::$permissionMap['read']}", \IPS\Member::loggedIn()->groups ) . ' OR ' . "perm_".$nodeClass::$permissionMap['read']."='*'",NULL,NULL,NULL,NULL,0)->join( 'core_permission_index', array( "core_permission_index.app='".$nodeClass::$permApp.…
Last reply by BomAle, -
- 1 follower
- 2 replies
- 376 views
Hello. There is several screenshots with descriptions: I've created an ACP page with table: Every row has an Edit button which launching this dialog: You on first launch OK. All fields are filled with content from DB. But if I close this dialog w/o saving and open another dialog, I see this: Added by field is empty. But content exist in DB. Then I close this dialog and open first dialog again: There is appeared new member badge O.o. Only page refresh fixes this. After refreshing page secon dialog displays normal result: This is code of edit() function: I've tri…
Last reply by White Miku, -
- 1 follower
- 6 replies
- 364 views
I'm working with a 3rd party data set, bf4stats.com to be specific. Their API returns paths to the appropriate files in their image pack. The image pack is quite large. I'm able to pair it down to about 17M, but I need all 17M of those images. The app I'm writing is starting with BF4, but more games will be added that will have image packs just as large. So when the app supports 3 games, that'll be roughly 51M worth of image resources. Servers simply aren't going to be able to handle importing that, and the practice of using the /resource folder is not going to be sustainable. CiC doesn't offer FTP, so as far as I'm concerned, that's off the table. The …
Last reply by Aiwa, -
- 2 followers
- 5 replies
- 337 views
is it possible to have different templates on how a product is displayed based on product ID? or product name also how would one hard code custom fields for nexus
Last reply by bfarber, -
- 2 followers
- 1 reply
- 329 views
I am finding into a way to access on where property (without extend class) but i have not found any way. $query = \IPS\Content\Search\Query::init()->setOrder( \IPS\Content\Search\Query::ORDER_NEWEST_UPDATED ); foreach ( \IPS\Application::allExtensions( 'core', 'ContentRouter', FALSE ) as $object ) { foreach ( $object->classes as $class ) { if ( in_array('IPS\Content\Polls',class_implements($class)) ) { $filters[] = \IPS\Content\Search\ContentFilter::init( $class, TRUE, FALSE, FALSE ); } } } $results = $query->filterByContent($filters)->search(); var_dump($results);exit; I would: $this->where[] = $class::$databaseTable . '.' . $class::…
Last reply by BomAle,