Jump to content

phpony

Members
  • Posts

    448
  • Joined

  • Last visited

  • Days Won

    1

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Everything posted by phpony

  1. Hmmm. Maybe this is specific to this Russian language pack here: Russian language for Invision Community - Translations - Invision Community I'll look further.
  2. The progress bar for multiple image uploader accepts only integer values, otherwise it displays NaN instead of current progress and scale is always at 0%. But gallery upload script returns float value as current step. If you upload 4 pics, everything will be fine - 25%, 50%, 75%, 100%. But if you upload 3 pics: 33.3333% => NaN, 66.6666% => NaN, 100%. To fix this I've changed a line it \applications\gallery\modules\front\gallery\submit.php line 877: return array( ++$offset, \IPS\Member::loggedIn()->language()->addToStack('processing'), 100 / ( \IPS\Request::i()->totalImages ?: $offset ) * $offset ); To: return array( ++$offset, \IPS\Member::loggedIn()->language()->addToStack('processing'), intval(100 / ( \IPS\Request::i()->totalImages ?: $offset ) * $offset) ); And now uploader shows correct progress for any number of pics.
  3. Hi fellow developers and members of community. I'm here with a small quality of life suggestion that can slightly improve the usability of forum software in some cases. The forum software I'm supporting is installed on server without direct internet access. Yes, that's weird, I know. And there's nothing I can do about. But there's a proxy server on internal network that may and should be used for all external connections. As for now I'm bound to implement a hardcode fix after each system's upgrade. All I do is editing the file system\Http\Request\Curl.php around lines 139-145 from this: curl_setopt_array( $this->curl, array( CURLOPT_HEADER => TRUE, // Specifies that we want the headers CURLOPT_HTTP_VERSION => $httpVersion, // Sets the HTTP version CURLOPT_RETURNTRANSFER => TRUE, // Specifies that we want the response ... To this: curl_setopt_array( $this->curl, array( CURLOPT_PROXY => "10.0.0.33", CURLOPT_PROXYPORT => "1080", CURLOPT_PROXYTYPE => CURLPROXY_SOCKS5, CURLOPT_PROXYUSERPWD => "forum:password", CURLOPT_HEADER => TRUE, // Specifies that we want the headers CURLOPT_HTTP_VERSION => $httpVersion, // Sets the HTTP version CURLOPT_RETURNTRANSFER => TRUE, // Specifies that we want the response ... After this change everything works as intended - oembed codes, updates check, marketplace, etc. So I'm here with a suggestion - I understand that I may be a single one user with such a problem, but maybe developers would find it useful to make their system a bit better by creating a group of system settings named "Proxy" with "Use a proxy for external connections" checkbox and "Proxy IP", "Proxy port", "Proxy type", "Proxy login", "Proxy password" strings, that could be passed into curl settings right there? That wouldn't break anything for existing customers but will provide additional opportunities for others in cost of few additional code lines and one `if` check. Thanks in advance!
  4. Was it implemented? As much as I can see, in last 1 year & 3 month that "new version" is not out still :)
  5. Could you provide an example unreadable string from your database? The most common case of that problem is having data in DB already encoded in utf8, but named as other charset. In this case you can just make a copy of your database backup, open it in any editor more powerful than notepad, replace string "YOUR_CURRENT_CHARSET" with "UTF8" and then upload it back. After that just run this script again to fix collations where needed and that's all...
×
×
  • Create New...