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
- 11 replies
- 435 views
Hello there, We want to add images in created album. We know we can change the image in created album but we want a functionality or any way so that we can allow admin of that album to add images in the album. Can someone help me with that ? TIA.
Last reply by Maulik, -
- 1 reply
- 290 views
Resolved, used a for loop instead of str_repeat()
Last reply by Aetherdan, -
- 1 follower
- 3 replies
- 344 views
Hi, Is there a way to add a condition in theme hook? This doesn't work: array ( 'selector' => 'li.ipsDataItem.ipsDataItem_responsivePhoto', 'type' => 'add_attribute', 'attributes_add' => array ( 0 => array ( 'key' => 'data-pinned', 'value' => '{{if $row->mapped(\'pinned\') === 1}}pinned{{endif}}', ), ), ), ParseError: syntax error, unexpected '&' (0) Thanks.
Last reply by teraßyte, -
- 1 follower
- 2 replies
- 298 views
Hi, Is there a way to encapsulate an element with theme hook? This doesn't work: array ( 0 => array ( 'selector' => 'li.ipsDataItem.ipsDataItem_responsivePhoto', 'type' => 'add_before', 'content' => '{{if $row->mapped(\'pinned\') === 1}}<div class="pinned">{{endif}}', ), 1 => array ( 'selector' => 'li.ipsDataItem.ipsDataItem_responsivePhoto', 'type' => 'add_after', 'content' => '{{if $row->mapped(\'pinned\') === 1}}</div>{{endif}}', ), The first hook create auto two tags at the beggining instead of one : <div class="pinned"></div>. Than…
Last reply by DreamOn, -
- 10 replies
- 533 views
Hello, We want to move profile sidebar widget called "PERSONAL INFORMATION" in the right side area. Currently it's coming to the left area in sidebar. [reference : We have found the following code in the file called "profile", but when we tried to move that code in "profileTabs" file, the "$sidebarFields" variable is empty. Would you please help with that ? Check the code below : {{foreach $sidebarFields as $group => $fields}} <div class='ipsWidget ipsWidget_vertical cProfileSidebarBlock ipsBox ipsSpacer_bottom'> {{if $group != 'core_pfieldgroups_0'}} …
Last reply by newbie LAC, -
- 2 replies
- 311 views
Hello guys, I'm stuck when I try to edit a member group according to this instructions: https://invisioncommunity.com/developers/rest-api?endpoint=core/members/POSTitem I see the request in inside IPS with Response Code 200 OK, but the member group is not changing, Here is the Log: POST core/members/45783 REQUEST DATA [] RESPONSE { "id": 45783, Here is my PHP code $data = array("group" => 12); $data_string = json_encode($data); $ch = curl_init($this->communityUrl.'/core/members/'.$memberId); …
Last reply by MediaDiGi, -
- 4 replies
- 332 views
I noticed with the group form settings there are ways to not show the admin and guests groups from being selected, So say I do a form setting with guests disabled from being picked and they can only pick user groups, the statement would have to be {{ if \IPS\Settings::i()->My_Setting == 'all' AND \IPS\Member::loggedIn()->member_id OR \IPS\Member::loggedIn()->inGroup( explode(',', \IPS\Settings::i()->My_Setting AND \IPS\Member::loggedIn()->member_id ) ) }} is there not a way for the setting to know that guests are already excluded from viewing / using and we can just use the statement as the setting already knows groups are excluded as they can't be p…
Last reply by TheJackal84, -
- 1 follower
- 6 replies
- 559 views
Hello We are trying to add some caching for our widget that shows the users that are online on rocket.chat. There are features in \IPS\Widget to allow caching but it seems the minimal time is 300 seconds - and we would like some cache but a shorter period. So we read the cache docs and looked at other widget and got it almost working. The cache seems to work fine, but only upon refresh the "lang" template parts are properly replaced: {lang="block_tfRocketChatWhosOnline"} When the cache is expired and the content is refreshed: When another refresh is done and the cache is hit: The sources / logic for the cache is here: https://gi…
Last reply by ossipetz, -
- 1 reply
- 371 views
Hey, right now I am using IPS v4.2.6, it would be greate if there is function for \IPS\Helpers\Table\DB like there is in \IPS\Patterns\ActiveRecord called db(). It would so much easier to work on external databases. What I did to make that work: I declared static function called db() like in ActiveRecord and replaced every occurence of \IPS\Db::i() to self::db() in function getRows() in my extended class. It is working fine, but it will be better to overwrite one function of class instead of two of them. Cheers, Kajetan
Last reply by bfarber, -
- 19 replies
- 732 views
Hi, How can I populate a select box in my plugin settings page with i.e. all the forums? I now have a field where one would put the forum ID in, but it would be nicer for the user to be able to select the forum from a dropdown box and then saves the ID as setting. Chris
Last reply by ChrisVanMeer, -
- 1 reply
- 256 views
Pardon me if this is a bad question or has an obvious answer... I'm new to working with IPS. I did try searching, to no avail. I'm attempting to write a plugin that will send data to my SaaS app whenever a new post is made in an IP.Board forum (using the plugin, of course). I've read a lot of the documentation and spent a lot of time digging through the source code, but I'm pretty well stumped as to how to go about this. Can anyone point me in the right direction? Happy to clarify if what I've written doesn't make sense.
Last reply by Adriano Faria, -
- 1 follower
- 7 replies
- 404 views
Hello, How to override / delete (using hook) USE operator in a third-party application?
Last reply by Cheshir, -
- 1 follower
- 1 reply
- 799 views
Dear Community, I'm writing here if is possible to add new text "Fonts" into IPS. How can I add in the CKEditor list of available fonts the "Open Sans" font or the "EB Garamond" font? Thanks in advance!
Last reply by Joy Rex, -
- 3 replies
- 370 views
I'm trying to add group color to the userLink template <a> tag. How can I pass in a variable into the template? It's in core->front->global. Sorry, I'm new to this framework and don't quite know my way around. Is what I'm trying to do a reasonable thing or should I just use {{ }} tags and write my PHP in the template?
Last reply by newbie LAC, -
- 2 followers
- 4 replies
- 388 views
It appears the current REST API does not provide the ability to authenticate users (via HTTP auth or similar). I've found an OAuth plugin (https://github.com/wohali/ips4-oauth2-server) but would prefer to provide a more native authentication experience into my app. I have an iOS and Android app and would ultimately like to be able to authenticate a user without going through OAuth. Are there any recommended approaches to this? Or am I stuck trying to replicate the sequence of HTTP requests in order to mimic the OAuth workflow?
Last reply by HeadStand, -
- 1 follower
- 5 replies
- 416 views
Hello, You have a method on the Item-class named comments that returns the comments: <?php public function comments( $limit=NULL, $offset=NULL, $order='date', $orderDirection='asc', $member=NULL, $includeHiddenComments=NULL, $cutoff=NULL, $extraWhereClause=NULL, $bypassCache=FALSE, $includeDeleted=FALSE ) You give us the option here to provide various params that can affect how many results you'll get from it: $member, $includeHiddenComments, $cutoff, $extraWhereClause and $includeDeleted. However, if this method is to be useful to me, then I need to know how many results there are in total. But I can't find any commentCount-method on the Ite…
Last reply by TSP, -
- 7 replies
- 428 views
Hello, I have customized the header of our website and it comes same in all the topic, profile etc pages of forum. But when I tried to login in the website with wrong username /password, it brings to default login page say for example : https://invisioncommunity.com/login/ You can see that https://invisioncommunity.com has the same header as it's login page. But in our case, header get changed. Home page : http://prntscr.com/hhp62d Sign in error page : http://prntscr.com/hhp6pr We're not getting what's wrong with the sign in page. Note : We have attached 2 files here for reference. Please help ! TIA. globalTemplate.txt logo.txt
Last reply by Maulik, -
- 2 followers
- 3 replies
- 345 views
Hello, IPBTeam, Our IPB forum deals with many pictures posted only temporarily on various websites. I need to help users attach those (public) pics to their threads as easily as possible (i.e. without saving them on their computers first). How can they do that using the (temporarily available) pic URLs? As things look now, the URL pic posting is just a rendering of the image. If the pic disappears from the original website, it will disappear from ours, as well. Thanks, Adrian
Last reply by opentype, -
- 4 replies
- 706 views
Hi there, Just noticed, after a user report, that one of my apps has no ACP restrictions: Althougt everyhing is there, it doesn't appear. Example: Model: protected static $restrictions = array( 'app' => 'tutorials', 'module' => 'tutorials', 'prefix' => 'categories_' ); Controller: /** * Execute * * @return void */ public function execute() { \IPS\Dispatcher::i()->checkAcpPermission( 'categories_manage' ); parent::execute(); } ACP menu: Editing a menu: acprestrictions.json: { "tutorials": { "categories": { "categories_manage": "categories_manag…
Last reply by Adriano Faria, -
- 1 follower
- 0 replies
- 362 views
The below code produces a dynamic menu which sorts my content dynamically (without a page load). I'm trying to move this menu into a series of buttons, but not matter what I try, I can't figure out how to do it. Here is what the existing menu looks like: Here is the existing code for the menu: <ul class="ipsButtonRow ipsPos_right ipsClearfix"> {{if isset( $table->sortOptions ) and !empty( $table->sortOptions )}} <li> <a href="#elSortByMenu_menu" id="elSortByMenu_{$table->uniqueId}" data-role='sortButton' data-ipsMenu data-ipsMenu-activeClass="ipsButtonRow_active" data-ipsMenu-selectable="radio">{lang…
Last reply by Bluto, -
- 1 follower
- 4 replies
- 370 views
I am try to override the template located on database > display > record (without custom edits or uploads a new template...) I am stopped because \IPS\cms\Theme::i()->getTemplate(...) don't call compileTemplates() when IN_DEV and then I cannot use developer center tried with theme hook( \IPS\Theme\class_cms_database_display ) with editing file \system\Plugin\Hook.php devTable() : foreach ( \IPS\Theme::load( \IPS\Theme::defaultTheme() )->getRawTemplates( null, null, null, \IPS\Theme::RETURN_ALL_NO_CONTENT ) as $app => $locations ) { foreach ( $locations as $location => $_groups ) { foreach ( $_groups as $group => $data…
Last reply by bfarber, -
- 2 followers
- 4 replies
- 423 views
I'm having some trouble displaying member-specific information on a page. I thought that a theme hook would be appropriate but since those are cached that won't work very well. I'll describe the problem I'm trying to solve: Groups in my community are tied to external software licenses. I have a (queue-based) task that will regularly check all members' licenses and adjust their groups as appropriate. Members without a valid license are put into a group with limited rights. If that happens I need to inform them about what happened and it was decided to show them banner with an explanation and a link to a page where they can update their licensing info. Since the b…
Last reply by bfarber, -
- 2 followers
- 4 replies
- 354 views
I've read through the docs, as well as system/Plugin/Plugin.php, and it looks like there's no way to have a plugin perform its own uninstallation actions on delete. Have I missed something? This seems rather a large oversight, given that the official docs mention modifying the core tables multiple times (including in the official example!) without a way to undo these changes when deleting the plugin.
Last reply by bfarber, -
- 2 followers
- 5 replies
- 398 views
I am working on an app that requests information from an API. The response is a JSON file which is then decoded. On my Dev forum and Live Forum, the cURL request is made without a hitch. I generate the URL needed, pass it on to \IPS\Http\URL, and it pulls whatever number of users I ask it to get. Now, I installed it for someone to test how it was going to work, and everything ran smoothly. Installation ran and everything was fine. The cURL request goes through, but the information on the JSON is incorrect. If I'm asking for multiple users in the URL, it only shows me one user. I checked at the URL generated, and it is correct. My question is that if the first 2…
Last reply by bfarber, -
- 2 followers
- 16 replies
- 647 views
As stated. Just curious if you are making the move with 4.3 or not or keepin on keeping on with PHP 5x support.
Last reply by CodingJungle,