Jump to content

Community

Numbered

+Clients
  • Posts

    310
  • Joined

  • Last visited

  • Days Won

    1

 Content Type 

Profiles

Downloads

IPS4 Providers

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Forums

Store

Everything posted by Numbered

  1. @newbie LAC, agree. I was wrong with the idea of same members updates. This part might exclude from attention. I knew about selects, but something broke in my mind when I tried to systematize all needs in this queue task. Feel shame. Thanks for correct me. Agree about performance. Same offset+limit performance degrees I got in upgrade scripts (for members table too) - it was changed well.
  2. Hello. Background task queue 'RecountMemberReputation' must be improved. This background queue can start only from two places: Button to recount ALL reputation in ACP - good When 'somebody' removes given reputation - bad. It's bad from two sides: Logic If you have a big amount of users and their activity it is too heavy to recount reputation for ALL users when just one of them get his reaction back. This call located in \system\Member\Member.php line 3507. Please, make it smarter and stop recount all users. Method This background queue calls with that code: \IPS\Task::queue( 'core', 'RecountMemberReputation', array(), 4 ); We haven't fifth parameter here, which should prevent multiplying this task. So for every canceled reaction, this code creates a new one background queue, which starts recounting your millions of users. No matter finished previous one or not. No matter how much the same task already doing. RecountMemberReputation queue (\applications\core\extensions\core\Queue\RecountMemberReputation.php) should be smarter too. Let's see 'run' function. All looks good, but you miss situation for forums, which using member_id as not incremental id. We have an external account database and the special login service. When new user entering the forum and authenticate in this server - this login method create not a clean member. It creates a new member with a special member_id (which are the same as member id in an external database), which nickname, email, and other data. So for the situation, where the difference (or spaces) between two member_id's maybe thousands (for example it enough), we obtain that situation: \IPS\Db::i()->select(... get a 50 members (for example their id's: 1,178,257,258,259...536,718) They reputation rebuilt successfully 'run' return ($offset + $this->rebuild): (in first run it return 0 + 50 = 50) Second 'run' start with a select and offset 50. So in our select, we get... 178,257,258,259...536,718. Very bad, right? Our members recount the second time... 'run' return ($offset + $this->rebuild): (in second run it return 50 + 50 = 100).... What? The third stage runs with a 100... and will rebuild same member_id's 178,257,258,259...536,718. The fourth stage will rebuild the same members 178,257,258,259...536,718... And on the fifth stage, we just obtain new member_id after 718.. something like 1678. The obvious possible solution is returning the last member_id as offset instead of increment by 50. And of course, in the progress, we see the wrong number. Count number will always be lower than $offset. Change the priority for RecountMemberReputation from current 4 to 5 (as much lower as possible). This task is very heavy for large communities. And it totally blocks other queues with 5 priority. For example, indexing new comment item, which tries to start with a five. The result that we can't index any new comment items before completing this RecountMemberReputation. With multiple RecountMemberReputation queues, it totally blocks all other lower priority tasks. I hope you understand my bad English and agree for improve that points. Thanks!
  3. Two questions: Can you add an option to stop auto animating gifs? If somebody wants to see - he can click for watch it. Like videos. When you create an ability to load heavy content (images, gifs, etc) inside spoiler only after it opened? We still have users who have limited internet traffic. They very hate other people, who posted big pictures and those gifs. And they hate us because we didn't block autoloading heavy content inside spoilers. I think these two features are better than one more simple integration. Looks like a plugin, no more. I'm sorry. Just want to make attention to the more real communities pain connected to the current announcement.
  4. And one more request. Don't make keys like 'Search In'. 'class'...? really?
  5. yep) it's too deeper)) I think this is the main reason in most part of the web for using 'user', 'person', 'author' and other gender-neutral impersonal words) But! Facebook solves this gender depending words (not exactly correct, but not bad)! I think IPS should solve this too! Because they compared In BD topic themselves with FB, YouTube, and other giants...)
  6. In my example, I mean 'posted' should change depend on the second '%s' content type. Not on a containing number. And one more note about replacements. If we imagine a clear understanding the type of content in '%s' (forum comment, for example) in some languages we need to change the word before replacement ('posted' in the example) which should change for 1 item or more than 1 item. Any way to do it? Anyway. l10n & l18n is the deep rabbit hole. IPS can't resolve all these problems. I just want to make some easy rules, which can help us to make changes easier. For example, not include any localization strings inside other localization strings. Better to create many of the same strings, than create one, which generated one from another.
  7. Actually, this file contains a lot of strange positions, like that: and that:
  8. Done. #1016546. Firstly I wasn't sure about them :)
  9. I found the place, which doing this wrong stuff: \system\Theme\Theme.php, line 4563: else { $replace = "\nCONTENT;\n\$return .= htmlspecialchars( \$" . $var[1] . ", ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );\n\$return .= <<<CONTENT\n"; } If I modify them to something like that it starts working right: else { $rep1 = htmlspecialchars( $var[1], ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE ); $replace = "\nCONTENT;\n\$return .= $rep1\n\$return .= <<<CONTENT\n"; } The result: So. IPS, fix it please
  10. Hello friends. I create a custom tab with a color setting. Filled it. If i use it in theme CSS as background: {theme="my_var"}; - all is fine, it compiled to background: #1D3746; But if I using background: {hextorgb="my_var" opacity="0.6"}; than it compiled in css to: background: htmlspecialchars( 'my_var', ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE ); This issue worked only for custom variables. Default theme vars worked well. Maybe I forget doing something? Thanks
  11. Hi @Meddysong. Thanks for summoning -) Yep. We have a lot of points where we can't just translate using variables. In that cases, we need to expand some key to 10+ keys for providing a right translation. Some examples: email_new_content_unapproved_guest - %s (Guest) has posted %s requiring approval, - 'posted %s' may contain very different content types and word 'posted' should know what is %s stream_blurb_in_containers - %s in %s - same story. 'in' should depend on the type of the second param So in that examples, I mean the problem about using 'meta'-keys - keys, which includes other keys. If you can create 20 same strings (for English) for each type of content contain - it will be much better than your current savings. All languages are very different. So you just need to make keys as much simpler as possible to make localization easier (and thanks for ordering ability). We made high-quality translations from native speakers with specialized education to this languages: cs_CS, de_DE, en_EN, es_ES, fr_FR, it_IT, ja_JP, ko_KO, pl_PL, ru_RU, th_TH, tr_TR, zh_TW_CHT, zu_ZU. Some issues I understand very hard, like that (and moreover - I don't know English well): So, I can ask our Loc&Doc Department for creating a full list of problems with current l10n work, if you want to herd it and their work wouldn't ignore.
  12. All of that is the cool features! Seriously. But all of them focused to improve user activity when he is 'one'. Actually, it's pretty good. But I want to choose another point of view - when forums/etc is the one side and the users are the opposite another side. In that case, users completely not enough options to make the connection between staff and them. I mean some options for filter activity stream authors by user group (to track staff posts, for example), abilities to moving inside a big topic (hundred pages) from first staff post to next, improved voting system for easier create simple public reports like charts, bars with/o showing voted members. Some simple survey system is a highly anticipated feature too. Scheduler for topic publication is very wanted feature too. Some parts for multilanguage forums - where users can set preferred languages in their profile and then filter content in discovery, widgets which they not understand. I think you understand what I mean. Maybe this requests is too far from this post. Sorry if this is so.
  13. Moreover, if somebody creates a topic without any images, then somebody replies to this topic with an image -> then widget will show the replied image. And the topic starter cant changes this image to his one with editing his owned post and embed a right image. This is because widget logic searches an image with a sorting by attached image id, not by the ids of topic posts.
  14. Actually, the right answer already sent. But, guys... this field should be the little bit smarter. I mean... okay we hide our visiting. But if we post something this post with current date shows in our profile activity with the right date. I think last visit field should change on the content adding action. It looks very strange and unclear without this logic.
  15. I think your web server not configured right. Can you put here your .conf file? It should something like this: upstream php7 { server php:9000; } server { ... some defines index index.php index.html; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { ... some fastcgi params fastcgi_index index.php; fastcgi_pass php7; } } This wrong configured directives may provide your result. Check them or put your full conf file here
  16. I need to update some number on the landing. This number is the database counter. On the page open this counter loaded well. Then for the live update, I created a simple controller JS, which get ajax front public url to get a new number. Obviously, it's very stupid way. Smarter and modern way is using special technology like a WebSockets (or long pooling). For WebSockets, we need a special daemonized service (for example, written in Python or PHP Daemon framework). But it looks too hard and monstrous for this task. As I see IPS used long pooling for notifications. Can somebody advise me how to use this internal ready system for clean and simple resolve needed task? Create a new inline notification and redefine it - looks ok, but get a lot of pains. First, of them - my system should work for guests too and other things. So... I'll be happy by any proposals) Thanks!
  17. Thanks for the answer. But actually, it didn't work all times when I tried them. I am fearful of my mistake. So I created a test application 'appinstallcheck'. I put to that app some resources (fonts and few images) and proceed to install them. It installed successfully, nothing wrong IPS said to me. Ok. I went to SQL instruments (easier way to check) and wrote that query: SELECT * FROM core_theme_resources where resource_app = 'appinstallcheck'; And I get only 4 files - LICENCE.txt, RobotoCondensed-Regular.eot, RobotoCondensed-Regular.svg and 6.png... One more potential important moment - I have 8 installed styles. max_execution_time is 30. Checked in VMWare virtual server (PHP 7.0.24) and local docker container (PHP 7.1.7). I don't know why install process didn't move me to step/page. Just install some part and said 'Install successful'. Test app attached. appinstallcheck.tar
  18. ,Hello. Today I got a very strange issue. I install my app update on the pre-production instance for checks and see that my fonts, placed in <my_app>/dev/resources/front/something/fonts/ not saved in storage. I went to research them and found the mistake. It located in file /system/Applications/Applications.php, line 2361: if( $maxExecution = @ini_get( 'max_execution_time' ) ) { /* If max_execution_time is set to "no limit" we should add a hard limit to prevent browser timeouts */ if ( $maxExecution == -1 ) { $maxExecution = 30; } $cutOff = time() + ( $maxExecution * .5 ); } and inside XML reading we have the check of that variable if( $cutOff !== null AND time() >= $cutOff ) { break; } Really? If some application contains the huge number of resources (or not powerful storage) - then... just keep what we have in time for? And never try to do the full job by steps or something. Moreover, we tried to save our resources in HALF of max_execution_time. So if you have 20 then 10 seconds is enough. I checked this file in 4.3.4 - same code. IPS, please fix that! Make steps or background resources import - any way is better than just break import. And browser timeout error (but with finish job in the background) much better than deceiving 'all is fine. app installed successfully'.
  19. As error said - some bad value in topics row. I think support ticket will best choice for investigating your personal or platform problem. Clean error message. Right exception. In your trace we can see - task tried to set -1 to the topics column with is wrong by SQL schema. If we want to find where (and how it working) we can proceed to \system\Content\Item.php file, method delete As we see - these lines don't check value (just for NULL) before decrement. So your current 0 changes to -1, which can't be stored into the database. I think need to recount this values, but I don't find UI method for them. PHP script way can do this simply, but it's not a solution for others) If you extremely need to fix it ASAP, you can change line 2122 from current: if ( $this->container()->_items !== NULL ) to: if ( $this->container()->_items !== NULL && $this->container()->_items > 1) This change will prevent decreasing to the negative value.
  20. You right. Globally IPS doesn't need to include big monstrous FA5 (or any else). But with last Rikki answer, I hope they'll create some build tool for an ability to include custom font build with icons which are actually needed. In my humble opinion, this way will be an amazing solution, which may be named as a really good new improvement. Let's wait and see
  21. UP topic. FA5 has a lot of icons, which are very like to have from the box.
  22. In method _exchangeAuthorizationCodeForAccessToken we have just throw new \IPS\Login\Exception( 'generic_error', \IPS\Login\Exception::INTERNAL_ERROR ); if something happened with $response. Now I implement Sony Playstation Network OAuth2 and got non-standard answer at this responce in HTML, not json. So decodeJson() on the response returned NULL and nothing logged in $responce checks. Will be much better, if this method will check \RuntimeException throwing on the $response and log plain response if it not json. For example, it might look like that: protected function _exchangeAuthorizationCodeForAccessToken($code) { /* Make the request */ $data = $this->_authenticatedRequest($this->tokenEndpoint(), array( 'grant_type' => 'authorization_code', 'code' => $code, 'redirect_uri' => (string)$this->redirectionEndpoint(), )); try { $response = $data->decodeJson(); } catch (\RuntimeException $e) { \IPS\Log::log(print_r($data, true), 'oauth'); throw new \IPS\Login\Exception('BAD_JSON', \IPS\Login\Exception::INTERNAL_ERROR); } // other code not changed... } Thanks. Something went wrong. Empty error log. <= tags for search if somebody catches the same problem.
  23. Thanks for support my assumption. Already start doing in this way
  24. Example: $form->add( new \IPS\Helpers\Form\Radio('something', null, true, [ 'options' => [ 'opt1' => 'val1', 'opt2' => 'val2', ], 'toggles' => [ 'opt1' => ['text_container'], 'opt2' => ['text_container'] ] ]) ); $form->add(new \IPS\Helpers\Form\Text('text_input_id', null, true, [ 'placeholder' => \IPS\Member::loggedIn()->language()->get('text_input_placeholder'), 'minLength' => 1, 'maxLength' => 14, ], function ($val) { // not interesting }, null, null, 'text_container')); Can i set different placeholder on text input depending on current radio option selected? Or i can do it only with javascript way? Thanks!
×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy