-
Posts
248 -
Joined
-
Last visited
Content Type
Downloads
Release Notes
IPS4 Guides
IPS4 Developer Documentation
Invision Community Blog
Development Blog
Deprecation Tracker
Providers Directory
Projects
Forums
Events
Store
Gallery
Posts posted by desti
-
-
-
Tried to make a hook on the \IPS\core\modules\front\members\profile, add button before "Edit profile".
Add button code <li>...<a href='{url="app=core&module=members&controller=profile&do=testform&id=...}" ...</li>, with seo template (defined in furlDefinition()), but get broken link, looks like %7Burl=?
Ok, replace <li>.. </li> with {template='myProfileButton' group="plugins" location="global" app="core" params='$member'} , move button code to myProfileButton - everything is fine, correct link.
I can't use {url=""} template in theme hook?
clean IPS 4.6.0
-
// $where[] = array( 'member_id=?', $this->member->member_id ); // $where[] = array( 'visibility_type=1 OR (visibility_type=2 and member_id=?)',\IPS\Member::loggedIn()->member_id ) ; $where[] = array( 'member_id=?', $this->member->member_id ); $where[] = array( 'visibility_type=1 OR visibility_type=2' ) ;
I don't want see my own bookmarks in other users' profiles! Or did I get something wrong?
1.6.1
-
/* Are ratings allowed? */ if(0) // AND !$topic->isArchived() AND $topic->container()->forum_allow_rating AND $topic->averageRating() ) { \IPS\Output::i()->jsonLd['topic']['aggregateRating'] = array( '@type' => 'AggregateRating', 'ratingValue' => $topic->averageRating(), 'ratingCount' => $topic->numberOfRatings(), ); }
-
Oh, my God, it happened! :) Thanks!
-
After attach pdf to post we see attach block:
In english all ok
In russian - problem
Fast solution:
in file system/Lang/Lang.php replace
$replacement = mb_substr( json_encode( $replacement ), 1, -1 );
to
$replacement = mb_substr( json_encode( $replacement, JSON_UNESCAPED_UNICODE ), 1, -1 );
now all fine
-
Yep, already clone \IPS\Db and IPS\Select, add db selection to IPS\ActiveRecord, move table to another server and it works! :) This will be sufficient to keep the copy up to date and will give the provider the opportunity to honestly answer the question "Are there requests to the database from Germany?".
But as the bfarber correctly noted, the ips code has a huge number of direct calls and joins to this table, so the question can be considered closed, this is impossible.
Ilia, only one option: create the illusion of working with remote tables, so I will follow the path you proposed.
1 hour ago, Ilya Hoilik said:But anyway you should consult with your lawyer and Roskomnadzor before doing this.
Are you kidding? :) I'm too small for both lawyers and rkn. And certainly I'm not going to let rkn know about my plans.
Thank you all for your advice.
-
I understand that there is no out of the box solution, i'd like to understand how to correctly solve this problem. For example, in IPS\ActiveRecord\select a database connection based on the table name and add a new structure to IPS\Db for the second connection? I need your clue, you better understand the architecture of the system.
-
There is a requirement (in Russia) to store personal user information on a server that is located in Russia. My server is in Germany, would like to understand the best way to solve this problem. And is that even possible?
-
Morrigan, yep! Really not exactly correct formulated, sorry.
-
compare red lined emails letter by letter
-
Problem is that my.name@ and m.yname@ - the same email for google, it does not use points in the name. But for the forum these are different emails.
-
-
5 minutes ago, Mac1 said:
js( 'ips.shop.js', 'appTest', 'front' ) )
'front_shop.js'.
-
49 minutes ago, Mac1 said:
appTest>dev>front>somthing.js
appTest>dev>js>front>controllers>folder>ips.folder.function.js
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'front_folder.js', 'appTest', 'front' ) );
// corrected
-
Have you forgotten to compile JS?
-
Tested with external image, sorry.
-
Use \IPS\Widget instead of \IPS\Content\Widget - completely rewrite widget.
-
Image inserts as <img></img> with correct src, it's expected behavior.
20 minutes ago, Stefan Werner said:Image is now a valid attachment
Nope, it's not attachment to PM, image will be deleted by cleanup task.
-
My users ask me to make widgets visibility control ( ips widgets topicFeed, imageFeed, etc ).
I tried to do it in system/content/widget.php, but, apparently, everything is cached there and even the condition (if member_id = = 1) die; does not work. Any idea or is that impossible?
-
Yep... copy-paste from function __toString() :)
-
Helpers - Form - function CustomTemplate() (part)
foreach ( $this->elements as $tab => $elements ) { $html[ $tab ] = ''; foreach ( $elements as $k => $element ) { if ( $element instanceof Form\Matrix ) { $html[ $tab ] .= \IPS\Theme::i()->getTemplate( 'forms', 'core' )->emptyRow( $element->nested(), $k ); continue; } if ( !\is_string( $element ) and $element->error ) { $errorTabs[] = $tab; } $html[ $tab ] .= ( $element instanceof \IPS\Helpers\Form\FormAbstract ) ? $element->rowHtml( $this ) : (string) $element; } } $templateArguments = array_merge( $args, array( $this->id, $this->action, $this->elements, $this->hiddenValues, $this->actionButtons, $this->uploadField, $this->class, $this->attributes, $this->sidebar, $this, $errorTabs ) ); return $template( ...$templateArguments ); }
Variable $html don't use later.
-
Yes, the real script shows the complex vue widget (fetch data from server, dynamic form render, send data back to server). Scanty "ips form helper" cannot do this without dark rituals and human sacrifice.
-
Perhaps will be useful.
JS file
;( function($, _, undefined){ "use strict"; ips.controller.register('app.front.folder.vuemodal', { _vueapp: null, initialize: function () { var jsToGet = [ 'https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.min.js', 'https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.js', ]; ips.loader.get(jsToGet).then( function () { this.setup(); }.bind(this)); $('head').append( "<link rel='stylesheet' type='text/css' media='all' href='https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css' />", "<link rel='stylesheet' type='text/css' media='all' href='https://cdn.jsdelivr.net/npm/@mdi/font@4.x/css/materialdesignicons.min.css'/>" ); }, setup: function() { Vue.component('my-tooltip', { props: ['message'], template: ` <v-tooltip left :open-on-hover="false"> <template #activator="{ on }"> <v-btn icon @click="on.click" @blur="on.blur" retain-focus-on-click> <v-icon color="grey lighten-1"> mdi-help-circle-outline </v-icon> </v-btn> </template> <div v-html="message"></div> </v-tooltip> ` }); this._vueapp = new Vue({ el: '#vuemodal', vuetify: new Vuetify(), template: ` <v-app> <v-row justify="center"> <v-dialog v-model="showModal" max-width="600"> <template v-slot:activator="{ on, attrs }"> <v-btn color="primary" dark v-bind="attrs" v-on="on">Open Dialog</v-btn> </template> <v-card class="pa-4 indigo lighten-5"> <v-card class="pa-2"> <v-toolbar dense color="blue darken-4" dark> <v-toolbar-title class="headline">Popup header</v-toolbar-title> <v-spacer></v-spacer> <my-tooltip message="Help message"></my-tooltip> </v-toolbar> <v-card-title class="pa-2">Useful Content</v-card-title> <v-form> <v-text-field class="ma-1" dense label="Enter your name"></v-text-field> <v-divider></v-divider> <v-card-actions class="pa-2 ma-0"> <v-spacer></v-spacer> <v-btn small bottom color="success" @click="submit()">Submit</v-btn> </v-card-actions> </v-form> </v-card> </v-card> </v-dialog> </v-row> </v-app> `, data: { showModal: false }, methods: { submit() { this.showModal = false} } }); } }); }(jQuery, _));
add to template
<div data-controller="app.front.folder.vuemodal" style='height:36px !important; overflow: hidden !important;'> <div id='vuemodal'></div> </div>
add to custom css (ips styles break vuetify styles)
.v-text-field input { border:none!important; box-shadow:none!important; max-width:100%!important; }
lang issue
in Developer Connection
Posted
4.6.X - which is equal to X, at least approximately?