Developer Connection
Use this forum to interact with our development team on technical issues, suggestions and official best practices advice.
1,736 topics in this forum
-
- 1 follower
- 5 replies
- 633 views
I am not a PHP dev, however, i am familiar with Python and would like to create my IPS application out of python. Does anyone have any experience in doing this, some tips? Is there a standard way to couple PHP and Python? I know i can use exec and call a script file, but the core application is going to be pretty complex. What im doing is uploading a file and parsing the information inside to display in a post. Most of these files are compressed and have to be decompressed and bit shifted before it can be read. Then i get the info and place in a database with additional information coming from IPS such as post author etc... I don't want a hackish solution. If i …
Last reply by Daniel F, -
- 3 followers
- 14 replies
- 454 views
[edited] Hi all, many thanks for this supercool service! This is the behavior that I'd want to have: Someone posts a Comment, that contains a reference to an external image (url) BEFORE to save the comment, i want to check the url through a php function (in order to check the image compliance) IF the check is ok, then save the comment as is on the DB IF not, change the url with a marker What i am asking you, is to know if and where in the invision src code I can find the place in which i can put my control? sorry for my not deep knowledge in the ipb src
Last reply by J1897, -
- 1 reply
- 327 views
Im just trying to get my head around the namespaces and how to use them. How would I go about loading the post comment object? Am I close? $post = \IPS\Content\Item::load( pid ); pid is obviously being the post id. Also is there any documentation for seeking the namespace classes and what methods are available to each of them?
Last reply by newbie LAC, -
- 1 follower
- 2 replies
- 339 views
One of my clients makes heavy use of the Custom package option to create special packages for some of their customers. One of the things we're having trouble with is editing the package once it's been created. I don't see anywhere in the code where we can edit these properties. Does that exist? If not, can it? Thanks.
Last reply by Mark, -
- 3 replies
- 312 views
Hi, I am using the REST-API to create members on demand. It is kind of a data-transfer from another community-database. Everything is working fine, until I get an user with a special char in it's name - let's say "Gérome". The API creates a user called "G", everything starting from the special char is truncated. If I understood correctly, the function "http_build_query" should encode the data accordingly. Manually creating an user with this name works as expected. Anyone having an idea what is missing here? $querydata = array( 'name' => 'Gérome', 'password' => 'test123', ); $curl = curl_init( $communityUrl . 'api' . $endpoint ); …
Last reply by bfarber, -
- 3 followers
- 0 replies
- 326 views
Alright, we all love pages, well, mostly. I have clients that use pages heavily, almost ungodly so, and they are always like "we want to use pages to do this really really complicated thing". they love the custom building of the form, that is like the biggest thing they love about it, but they are always wanting a little more than pages can offer. so on some of their complex things, they have to either have me make hooks for them or actually build an app. so here are my glorious suggestions for pages: Adding a Pseudo Hook system: when creating/editing a database, if i am using categories or turn on reviews/comments, have a tab appear where i can ove…
Last reply by CodingJungle, -
- 2 replies
- 294 views
My app adds a field in registration screen ( \IPS\core\modules\front\system\register\buildRegistrationForm() ) $form->add( new \IPS\Helpers\Form\Text( 'invite_code_req', NULL, TRUE, array( 'maxLength' => 32 ) ), 'password_confirm' ); It should appear AFTER the Confirm Password field. But it doesn't: So I installed a plugin that I've made a quite while ago and it works fine IF my app is disabled: If I enable my app, then: I already removed and made my hook from the scratch but it's enough my app to be enabled and the positions aren't respected. Where else, apart from the hook file itself, can I check to see what is happen…
Last reply by Adriano Faria, -
- 2 followers
- 4 replies
- 413 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
- 491 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
- 341 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
- 246 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
- 271 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
- 330 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
- 856 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
- 1.1k 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
- 752 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 szalik.dev, -
- 1 follower
- 3 replies
- 288 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
- 385 views
How do I add an icon to my application?
Last reply by LZDigital, -
- 1 follower
- 3 replies
- 352 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
- 807 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
- 263 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
- 375 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
- 298 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
- 427 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
- 361 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,