Developer Connection
Use this forum to interact with our development team on technical issues, suggestions and official best practices advice.
1,679 topics in this forum
-
- 2 followers
- 4 replies
- 324 views
Hello, a client contact me for a simple fix for tapatalk uploads/attachments I have fixed with following code, but why not add proxy images into lightbox images group? <script type="text/javascript"> ;( function($, _, undefined){ "use strict"; ips.controller.mixin('tapatalkAttach', 'core.front.core.lightboxedImages', true, function () { this._initializeImages = function () { var self = this; var images = this.scope.find('img'); if( !images.length ){ return; } this.scope.imagesLoaded( function (imagesLoaded) { if( !imagesLoaded.images.length ){ return; } _.each( imagesLoaded.images, function (image, i) { var…
Last reply by BomAle, -
- 1 follower
- 4 replies
- 323 views
The variable documentation seems a little lacklustre, and I can't seem to find any reference to how these variables are actually passed to the templates. For example if I wanted to pass a variable i called $balance to a particular template file, how would i do so? I know that I can add it to the list of variables in the tempalte editor, but where do those variables actually get sent from?
Last reply by bfarber, -
- 1 follower
- 1 reply
- 236 views
$table->joins = array( array( 'select' => 'othertable.*', 'from' => array( 'myapp_othertable', 'othertable'), 'where' => "myapp_firsttable.id=othertable.other_id" ) ); How can I access to othertable fields on template row? My table is generated with: $table = new \IPS\Helpers\Table\Content... but If I debug the object in template row I can't see "othertable" fields.
Last reply by Adriano Faria, -
- 1 follower
- 0 replies
- 179 views
I've run into this far too often, trying to have a theme and app developed at the same time, and the two clash with each other. The problem is this, the structure for IN_DEV and Designer mode are different from each other, which forces at least 3 sub-repo (css/html/resources) along with the theme's repo and the app's repo. then this becomes increasing ludicrous, when there is more than one app is being developed. you'd end up having at least 9 repo's ( 6 for the css/html/resources, 2 app repo's, 1 theme). We could also just have 1 repo, where we just push everything to it (including IPS files), but this has its own set of problems. It is time consuming as it is to h…
Last reply by CodingJungle, -
- 2 replies
- 192 views
I have a plugin which takes RSS input and displays the images Now I am no more adding images- so output remains same... I want to showcase random 10 images So is it possible to have such RSS feed
Last reply by Saurabh Jain, -
- 1 follower
- 1 reply
- 224 views
I would suggest changing as follow the js controller of navBar improve condition to check if add a menu item into more menu, outerwidth only if navMore contain a child, this way more menu is counted only if has child <script type='text/javascript'> ;( function($, _, undefined){ "use strict"; ips.controller.mixin('test', 'core.front.core.navBar', true, function () { this.lengthMore = function (bar) { if( bar.is('[data-role="primaryNavBar"]') ){ if( this._usingSubBars ){ return bar.find('> [data-role="navMore"] > [data-role="secondaryNavBar"] > li').length; } else { return this.scope.find('#elNavigationMore_dropdown_menu &g…
Last reply by bfarber, -
- 1 follower
- 43 replies
- 691 views
Any tips on my upgrade routine? In 3.x I did not use a built in file upload system, I uploaded them with my own code, and so I need to know the easiest way of updating those AND also I guess I need to go through updating titles to the custom lang bits, right? Any easy built in way to do that in mass without me writing something? I'm finished as a fresh install, and I just tested my memberSync and moving files to resources/ (had them elsewhere…) and all is great, so upgrade routine, then done. (also had already thoroughly tested and got bugs ironed out everywhere.)
Last reply by Midnight Modding, -
- 3 followers
- 5 replies
- 777 views
The IPS AdminCP infers that I can use Google Fonts or @font-face to use a custom font not available in IPS natively; however, I am unable to determine if the custom font can be injected into the software in a seamless way (i.e., added to the list of available fonts shown below?): I see that @font-face is in injected via css according to these choices and understand that 'default' will use the font as defined in the native css (i.e., HelveticaNeue), but I cannot see the stylesheets so assume that is all in the DB. How should I inject my custom font installed locally on the server using @font-face css? I can load my custom css by editing the global template …
Last reply by Pete T, -
- 2 followers
- 23 replies
- 564 views
So, it's been a while for me since i've done some plugins, now i'm trying getting back to it.. I've created plugin, for this plugin i've created a hook file, and no matter what i put inside of it, every time it throws error that's how my hook file looks like: //<?php /* To prevent PHP errors (extending class does not exist) revealing path */ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) ) { exit; } class hook28 extends _HOOK_CLASS_ { $variable = "value"; }
Last reply by CodePixel, -
- 1 follower
- 3 replies
- 209 views
This feels very much like a bug, but the IPS core code appears to deliberately work around it. If you delete a task in the dev center, it removes the task on the dev install (including the task's PHP file), and removes it from the tasks.json file so it isn't installed on any new installs. However, when the app is updated on an existing install it only updates existing tasks and adds new ones - it doesn't delete the tasks that are no longer required. For a traditional setup, this results in the task continuing to be run, because the old PHP file won't be deleted. I deploy most of my stuff through git, so for me and some other large sites this results in the task faili…
Last reply by bfarber, -
- 1 follower
- 2 replies
- 290 views
How do I add an icon to my application?
Last reply by LZDigital, -
- 1 follower
- 3 replies
- 247 views
Hello, I wanted to suggest changing this: /* Protected Groups */ if ( $owner->inGroup( explode( ',', \IPS\Settings::i()->reputation_protected_groups ) ) ) { return FALSE; } into a better way to check if there is a group (primary or secondary) authorized to receive reaction.
Last reply by BomAle, -
- 9 replies
- 546 views
For some reason, while running a task its unable to find the class '\IPS\avovix\Request' when running a foreach loop with an ActiveRecordIterator namespace IPS\avovix; /* To prevent PHP errors (extending class does not exist) revealing path */ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) ) { header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' ); exit; } class _Request extends \IPS\Patterns\ActiveRecord { const STATUS_PENDING = 'pend'; const STATUS_COMPLETED = 'comp'; const STATUS_FAILED = 'fail'; /** * @brief Multiton Store */ protected static $multitons; /** * @brief Database Table */ public…
Last reply by newbie LAC, -
- 1 reply
- 190 views
Hello, Please add the ability to specify multiple venues as you did for $calendar /** * Retrieve events to show based on a provided start and end date, optionally filtering by a supplied calendar * * @param \IPS\calendar\Date $startDate Date to start from * @param \IPS\calendar\Date|NULL $endDate Cut off date for events. NULL accepted as a possible value only if $formatEvents is set to FALSE. * @param \IPS\calendar\Calendar|NULL|array $calendar Calendar to filter by * @param int|null $limit Maximum number of events to return (only supported when not formatting events) * @param bool $formatEvents Whether or not to f…
Last reply by bfarber, -
- 8 replies
- 270 views
Through testing, in my app, there was an "incorrect string value" exception. I glanced in the database and noticed that my own apps' tables are not the same collation as the IPB ones. Mine say utf8, and the ones IPS updated for 4.x say utfmb4_. Since I already have my schema all set up and am basically done with this app, what is the best way for me to update my tables since they weren't the right collation when I imported them into db schema? And can you tell me exactly the steps in me doing this? I assume these was indeed what would cause that error I mentioned? It was when trying to save editor data with emoticons in my table. And I guess I should d…
Last reply by Midnight Modding, -
- 1 reply
- 202 views
Hi, I was wondering if it's possible to split payment with the IP Commerce (programming or via the settings tab https://developer.paypal.com/docs/classic/adaptive-payments/integration-guide/APIntro/) and my other question is how would I go about adding custom onpay functions for some of the products? (I wanna keep using the original onpay function for the other products) Thanks
Last reply by bfarber, -
- 1 follower
- 6 replies
- 332 views
Is there a class/function I can use to create a new member programmatically? So, I pass in the necessary parameters, such as display name, email, password, etc. And it creates an account?
Last reply by Tom S., -
- 1 reply
- 284 views
In the vein of this: And in the train of thought of avoiding doing this: Can the hunk of code that actually 'follows' and 'unfollows' things in IPS\core\modules\front\system\notifications be abstracted out to actually be on the item/node object, or anywhere it could actually be reused? The above reason is not the first time I have needed to control follow status dynamically, and currently such strays extremely close to a direct copy-past of a large chunk of code that is not desired to be maintained by me, and falls foul of the license agreement.
Last reply by bfarber, -
- 3 followers
- 1 reply
- 238 views
Hi, I've created plugin, which should ONLY connect to external database (i've accomplished that) and now i want to use this connection in second plugin. I'm using this plugin as "core" and some kind of protection (when somehow anyone gets my plugins, they can't use it without it) I will be gratefull for any answers! 🙂
Last reply by bfarber, -
- 2 replies
- 210 views
When looking through the MySQL slow query log I saw a lot of references to "IteratorIterator::rewind::xxx" in the query comment. Those aren't exactly helpful when trying to identify a slow query. My proposal here is to add that class to the list of ignored classes in \IPS\Db::preparedQuery. Thanks.
Last reply by bfarber, -
- 1 follower
- 1 reply
- 258 views
Hello, is it possible to add image on Subcategories in news?
Last reply by opentype, -
- 2 followers
- 25 replies
- 550 views
When doing a tab bar using the ajax method, I noticed some odd behavior when testing something. I had 2 tabs. Each tab had a Table\Db table in it. Tab 1 had 1 result. Tab 2 had 0 results and said "nothing to show", or something like that. Well, for some reason, if I click one tab then the other, back and forth between them several times, suddenly the row from Tab 1 shows up in tab 2. Tab 2 still has all of tab 2's proper column headers, but instead of saying nothing to show, the actual row from tab 1 shows under tab 2's column headers. Also, I am pretty sure that on other pages where I have tabs using the ajax, they don't have to reload every time I click …
Last reply by Midnight Modding, -
- 2 replies
- 242 views
Hello, system/Content/Content.php /** * @brief [Content\Item] Include this content type in user profiles */ public static $includeInUserProfiles = TRUE; How this should work? I think this should hide a tab in user profile and exclude items or comments or reviews from activity. But this works with items only. Partly. Hide all tabs only. Example I created new event, added comment and review I want to hide Event Comments tab and exclude event comments. I added in applications/calendar/sources/Event/Comment.php /** * @brief [Content\Item] Include this content type in user profiles */ public static $includeInUserProfil…
Last reply by newbie LAC, -
- 4 followers
- 8 replies
- 633 views
Hey all, I am displaying multiple Db/Tables on the same page which causes them to no work properly. I am assuming this is because the javascript functions are trying to be called on each table etc. How do I differentiate the tables so that the javascript only works on one table at a time and does not call the other one? Do I need to create separate table controllers for each of them? Thanks!
Last reply by Midnight Modding, -
- 1 follower
- 1 reply
- 205 views
Hi, On exporting a plugin I experience that it exports it with a double try/catch-block <?php public function commentFormElements() { try { try { // My code } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return call_user_func_array( 'parent::' . __FUNCTION__, func_get_args() ); } else { throw $e; } } } catch ( \RuntimeException $e ) { if ( method_exists( get_parent_class(), __FUNCTION__ ) ) { return call_user_func_array( 'parent::' . __FUNCTION__, func_get_args() ); } else { throw $e; } } } How to avoid this? …
Last reply by bfarber,