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
- 216 views
i don't usually do "default inserts" when i add a table, but i added a table in one of my apps which had default inserts. however when the upgrader ran and added the table, queries.json doesn't contain the default inserts, which caused an error when users were trying to use the app after the upgrade. so could queries.json also include default inserts if they are added to a table?
Last reply by bfarber, -
- 1 follower
- 4 replies
- 269 views
I have this code $table = new \IPS\Helpers\Table\Db( 'core_sys_lang_words', $baseUrl, $where ); $table->tableTemplate = array( \IPS\Theme::i()->getTemplate( 'tables', 'core', 'admin'), 'table' ); $table->rowsTemplate = array( \IPS\Theme::i()->getTemplate( 'tables', 'core', 'admin' ), 'rows' ); $table->advancedSearch = array( 'word_app' => array( \IPS\Helpers\Table\SEARCH_NODE, array( 'class'=> 'IPS\Application', 'subnodes' => false, 'permissionCheck' => function( $app ) { …
Last reply by bfarber, -
- 1 follower
- 1 reply
- 217 views
foreach( $this->value as $k => $v ) { $class = new $classType( $this->name .'_validate', $v, FALSE, $this->options, $this->customValidationCode, $this->prefix, $this->suffix); $class->validate(); } parent::validate(); Has new change refer to \IPS\Helpers\Form\Stack::validate ? this code take same $this->customValidationCode closure for each $this->value and \IPS\Helpers\Form\_FormAbstract::validate if( $this->customValidationCode !== NULL ) { call_user_func( $this->customValidationCode, $this->value ); } Why this? how I can manage for a function same closure (into secure purpose, one is Stack::validate array…
Last reply by bfarber, -
- 1 follower
- 1 reply
- 258 views
I have some difficult to understand why doing on 4.2: \IPS\Output::i()->output = $output; if( \IPS\Dispatcher::i()->application->directory == 'cms' ) { \IPS\cms\Databases\Dispatcher::i()->output = \IPS\Output::i()->output; } on 4.1.19 the code working fine like \IPS\Output::i()->output = $output; For example when a member reach the url /articles.html/articles/test-r1/?do=getPoll it seem I must assign also for cms Dispatcher instance the output value, it don't autopopulate the subclass? EDIT: The "issue" happen also when try to run via AJAX ?do=edit a record of articles EDIT 2: /** * @brief Singleton Instance (So we do…
Last reply by bfarber, -
- 1 follower
- 2 replies
- 281 views
I am wanting to add a horizontal row of 2 or 3 ads at the bottom of my pages. I can see how to do this and have them appear underneath each other but I want them to appear side by side. Is this best done by adding a table and placing the ad keys within each cell? If so can someone show a novice the step by step way of doing this in the Themes If there is a better way then please let me know. Thanks, Wade
Last reply by Wade Nash, -
- 2 replies
- 228 views
Hello, 1. Any reason why you use duplicate code in appmenu template? applications/core/dev/html/admin/global/appmenu.phtml {{if count( $item ) > 1}} <li data-menuKey='{$appAndModule}'> <h3>{lang="menu__{$appAndModule}"}</h3> <ul class='ipsList_reset'> {{foreach $item as $key => $url}} <li> {{$badgeNumber = NULL; try { $badgeNumber = \IPS\Application::load( mb_substr( $appAndModule, 0, mb_strpos( $appAndModule, '_' ) ) )->acpMenuNumber( $url ); } catch( \Exception $ex ){ } }} {{if $badgeNumber}} <a href='{url="$url"}'> {lang="menu_…
Last reply by bfarber, -
- 1 follower
- 0 replies
- 160 views
I might be missing something, is there a way in nexus on a license key invoice, to change the usage data? if not, is this a feature we will be seeing in the future?
Last reply by CodingJungle, -
- 1 follower
- 3 replies
- 185 views
I need to strips html tags from the $content in a plain text email template. I try to use strip_tags but I got a syntax error, unexpected '$return' (T_VARIABLE)
Last reply by bfarber, -
- 2 replies
- 210 views
Hi All, I would like to display on top of each forum, the forum moderators, but only the current forum moderators. Can someone redirect me to the right direction? Thanks in advance
Last reply by Dor Zuberi, -
- 1 follower
- 4 replies
- 242 views
Is it possible to post to the search form from a third party site? In other words, the keyword field and search submit button would be on a different site, then it would forward the user to the community site with the search results. So it would need to accept the POST fields. The problem I'm having is the search form uses some kind of csrfKey (hidden input) to validify that the search came from the site. Any way around this?
Last reply by bfarber, -
- 1 follower
- 4 replies
- 362 views
Hello, I am trying to pass data from my PHP controller to a JavaScript controller. The data could be either a number or a JSON object. The best thing I can think of right now is to get the ID from the URL that the page loads the JS controller on and then use Ajax to retrieve the JSON object but if there is a better way, please let me know. Thanks
Last reply by FNDN Admin, -
- 1 follower
- 5 replies
- 480 views
Here is what I would like to do. Hope someone can tell me how to accomplish. I have created 4 side bar advertising locations. I have placed them at the bottom of my side bar. They are called LowerAD, LowerAD1, LowerAD2 and so on. So I understand the basic (very basic) process. I would like to create a banner location that is specific to pages. For example. I would like to create a custom banner location that appears on all the Index pages. I would like a custom placement for the Index Headder and the Index Footer. I would like to create a custom banner location that appears on the Forum pages. I would like a custom placement for the Forum Heade…
Last reply by Mark Round, -
- 1 reply
- 232 views
I'm developing an application that heavily relies on manipulating tables on remote databases. ActiveRecord is compatible with this no problem, because of its db() function. But Nodes, not so much \IPS\Node\Model and \IPS\Node\Controller would be a lot more compatible with situations like this if they called the ActiveRecord::db() function for queries, instead of \IPS\Db::i()
Last reply by GriefCode, -
- 2 followers
- 2 replies
- 170 views
Hello, I would know if is possible to assign a item into multiple categories without edit all method for urls / langs bit / related. I am thinking to use tags because it is ready to use but I don't checked already if it provide some permissions per groups. Thanks for any helps
Last reply by HeadStand, -
- 1 follower
- 11 replies
- 470 views
I having issue when try to join 3+ \IPS\Db\Select to a subquery... $join[] = [ \IPS\Db::i()->select( ... ), \IPS\Poll\Vote::$databaseTable .'.'. \IPS\Poll\Vote::$databasePrefix . 'poll=core_polls.pid'] ; $join[] = array(\IPS\Db::i()->select( ... ), $class::$databaseTable . '.' . $class::$databasePrefix . $class::$databaseColumnMap['poll'] . '=core_polls.pid'); $join[] = array(\IPS\Db::i()->select( ... ), $class::$databaseTable . '.' . $class::$databasePrefix . $class::$databaseColumnMap['poll'] . '=core_polls.pid'); $subquery = \IPS\Db::i()->select( $select, 'core_polls',$where); foreach ( $join as $j ) { $subquery->join( $j[0], $j[1]); } $query = \IPS…
Last reply by BomAle, -
- 4 replies
- 239 views
Hello We use 3.2.2 and currently use IP Board "login name" and "password" for a membership area on another website. (ie. they can login to the website using their IP Board Login name and current password) Can anyone tell me ---- if we upgrade to 4, will that membership area still work on the other website as it currently is, or will some code adjustments be required? If adjustments would be required, any specifics on what would need to be adjusted code-wise would be most helpful. Thank you very much
Last reply by dacho, -
- 1 follower
- 14 replies
- 453 views
I would extend $databaseColumnMap adding "poll" => "poll_state" but I don't know how. Currently I have a hook on __construct() Records.php but when i try to call statically the class like \IPS\cms\Records1::$databaseColumnMap["poll"] it is not called yet... I see \IPS\cms\Application have a autoload, how I can interact when class is evalued/initialized? $multitons could help me here? anyone use another spl_autoload_register to permise it?
Last reply by BomAle, -
- 1 reply
- 232 views
Hey, I am building a JavaScript mixin to load with a controller and I am having trouble loading it in IPS version 4.1.19.4. The problem is when I try to load the script, I get two forward slashes in the URL which leads to it being not found: http://172.18.15.11/<domain>//applications/<appname>/... I looked in the system/Output/Output.php and on line 231, there is a comment: /* @see http://community.invisionpower.com/4bugtrack/some-js-files-get-loaded-with-a-double-in-the-url-r3558/ */ but the link http://community.invisionpower.com/4bugtrack/some-js-files-get-loaded-with-a-double-in-the-url-r3558/ leads to an error. The problem seemed to be…
Last reply by bfarber, -
- 1 follower
- 4 replies
- 255 views
The code here could be improved call buildEditForm instead of: $form = new \IPS\Helpers\Form( 'form', isset( \IPS\Member::loggedIn()->language()->words[ $recordClass::$formLangPrefix . '_save' ] ) ? $recordClass::$formLangPrefix . '_save' : 'save' ); $form->class = 'ipsForm_vertical'; foreach( $formElements as $name => $field ) { $form->add( $field ); } this permise developers to add for example new tab @Matt some details into mp (remove $collection)
Last reply by bfarber, -
using ajax
by teez- 1 follower
- 1 reply
- 294 views
Hi! Where can i find some details about using ajax in apps? I have added pagination (now just reloads whole page) I have some buttons in post container which call to my apps, it makes something and after all return to post and I want to get ride of this reload.
Last reply by bfarber, -
- 3 followers
- 2 replies
- 254 views
Currently, if a hook has a compile error, such as not reflecting the parameters of the method that it overrides (particularly an issue with the backwards-incompatible changes in 4.2), the error is discarded silently, even when IN_DEV. This obviously isn't ideal. Can we kill two birds with one stone and get better exceptions for hooks too, by replacing the monkey patch code with $contents = "namespace {$namespace}; ". str_replace( '_HOOK_CLASS_', $realClass, file_get_contents( ROOT_PATH . '/' . $data['file'] ) ); if (\IPS\IN_DEV) { $filename = tempnam(\IPS\TEMP_DIRECTORY, "HOOK_{$namespace}\\{$finalClass}_{$data['file']}"); $fullContents = "<?p…
Last reply by Andy Millne, -
- 6 replies
- 304 views
Is it possible to have 2 domains using and running the same script of IPS? The only difference might be a logo change (if possible) depending on the incoming domain.
Last reply by BomAle, -
- 1 follower
- 7 replies
- 344 views
Hi, Is it possible to get other fields than the title from a Database Relationship field in Pages. For example, I would like to return the related field thumbnail image in the listings recordrow template. Thanks!
Last reply by TDBF, -
- 2 replies
- 196 views
So I am hooking into \IPS\core\modules\front\members\profile and trying to make a setting what a member will obviously edit but when I use the editor it throws a error Here's the setting $form->add( new \IPS\Helpers\Form\Editor( 'My_Setting', $this->member->My_Setting, FALSE, array( ) ) ); I have to use TextArea for it to work, $form->add( new \IPS\Helpers\Form\TextArea( 'My_Setting', $this->member->My_Setting, FALSE, array( ) ) ); is it because you can't use the editor in there, or is it something I am doing?, the error it gives is Undefined index: autoSaveKey
Last reply by TheJackal84, -
- 3 replies
- 188 views
Is there a way to make the first post in a topic a post you can pin? I also want to make that post show on every page but not have that post refresh. What I'm looking to do is embed a live video in the first post (sports for example) and have it where that post always shows at the top of the screen even if the user scrolls down. I want my users to be able to watch the game and discuss with other members without having to refresh the video each page.
Last reply by mwcboard,