-
Posts
687 -
Joined
-
Last visited
-
Days Won
4
Everything posted by matjazp
-
Crowdfunded Tinypng Integration Module
matjazp replied to OllieMackJames's topic in Module/Plugin Development
@OllieMackJames: I would love to have that module. I can help with testing/debugging as I'm not that good at programming. @Horst: I know ProcessImageMinimize.pw, but it is not free (although they have free plan). ProcessImageMinimize is not supported on PW3 (I asked Marvin Scharle at Conclurer). I tested it and couldn't make it work (running on Windows with IIS - maybe this is the culprit). And probably there will be no more support for it. Module JpegOptimImage is using exec, some sites do not allow that. Most of my users doesn't know anything about images so they upload just what they have, even if those are big images (like 5-10 Mb) and large sizes. I just go after them, resize if needed (yes, I have max/min width set in ImageField) and then optimize with jpegmini. -
Installing ProcessWire on Synology NAS DS716+
matjazp replied to mhamurray's topic in Getting Started
I can confirm that PW is working with MariaDB. Did you add user to the MariaDB? Sometimes you have to specify host as localhost or 127.0.0.1 or even ::1. But from the error response it looks like username is not sent to the DB. As LostKobrakai said, there is "plugin" column in mysql table and in my case it is empty (for all users). -
I've written the issue on GitHub to hear Ryan's thoughts. I'm not good enough in PHP or PW internals and don't know when ajax upload is used. In "ajax mode" uploaded file is read from php://input and then created at the $config->$uploadTmpDir (if set) folder. In "nonajax mode" $config->$uploadTmpDir is not used - files are uploaded to the folder set up by upload_tmp_dir directive in php.ini It would be ideal if "nonajax upload" would store files in $config->$uploadTmpDir to... Is this possible? Sorry for dumb questions...
-
PHP stores the uploaded file in the folder determined by upload_tmp_dir directive in php.ini. By default this is C:\Windows\Temp directory. After the uploaded file is stored to the upload_tmp_dir, ProcessWire will then move/rename the file to the final destination directory and that doesn’t inherit destination directory’s permissions. There are multiple options on how to make it work: a.) Change the permissions on the windows temp folder giving IUSR and IIS_IUSRS write/modify b.) Change the path of the upload_tmp_dir in the php.ini file to a folder with appropriate permissions c.) Change the way WireUpload works so that it copy the file, not rename/move it. I didn't have upload problems in admin, because I used $config->$uploadTmpDir pointing to the /site/assets/uploads folder (created by me). This folder is used in WireUpload.php with ajax uploading (using $_SERVER['HTTP_X_FILENAME']). Since /site/assets/uploads folder inherits /site/assets folder permissions, moving/renaming the file is not the problem. When uploading using PHP's $_FILES global variable, $config->$uploadTmpDir is not used and files are uploaded to the folder set up by upload_tmp_dir directive. As copying in slower than renaming, I'm not sure if this is the right solution (file WireUpload.php in function saveUpload): $success = move_uploaded_file($tmp_name, $destination); to: $success = is_uploaded_file($tmp_name); if($success) $success = @copy($tmp_name, $destination); if(is_file($tmp_name)) @unlink($tmp_name);
-
Testing again on IIS with PW3. After upload I don't have access to uploaded files. I get HTTP 500.50 error along with 0x80070005 and that is (from my experience) permission issue. I'm assuming (didn't look at your sources) that files are uploaded to temp directory (PHP's upload_tmp_dir?) and then moved/renamed to the final destination at /site/assets/files/jqfu/files. In the process of moving the files, permissions of the files are inherited from the temp directory and those are not sufficient for the web server. Would you consider using $config->$uploadTmpDir instead of PHP's upload_tmp_dir? Edit: I see you are using WireUpload class so I'll have to take a closer look into WireUpload.php...
-
I finally made it to work on frontend - didn't notice 'disableUploads' => true in the example ... should read more carefully
-
Also comment this line: this.$timeObj[0].setSelectionRange(sPos, ePos); in jquery-ui-timepicker-addon.js to avoid focus bug (#1528).
-
I replaced $timeFormatJS = str_replace('h24', 'h', $timeFormatJS); with $timeFormatJS = str_replace('hh24', 'HH', $timeFormatJS); in InputfieldDateTime.module (line 160).
-
Switching to old timepicker.js solves the problem, at least with slider
-
It also happens with select mode.
-
How about replacing PW logo with my company's logo (branding) without modifying the admin theme?
-
I welcome 2016 roadmap but I also think that open github issues should be fixed/closed first (cleaning the desk)...
-
Title changes only on the first edit attempt eg. "edit->change title->save" title change is visible in BCE, then again "edit->change title->save" this time the title stays unchanged
-
In BCE, clicking on edit icon, modal opens, now change the title, save, modal is closed, but title name change is not reflected in BCE. FEEL also have an option to hide tabs (I know, there is the module for that), among other features. I like elbax's idea.
-
I (client) might want to display news posts from remote site on his site. I could connect to remote mysql and use db queries (hmm...no). I could parse rss feed (then you have it all and not just what client needs). I know PW 3 runs in its own namespace, but believed something similar might be possible with current PW. Pages Web Service will do the job, will use it if client expresses a wish. Thanks to really smart friendly people here ;-)
-
I would like to have access to another site running PW on the same server from my templates (and modules). I would like to use PW APIs, from both "servers", something like: $pages->find(some_selector) would find pages in "local" PW $pages_remote->find(some_selector) would find pages in "remote" PW Is it possible?
-
Great to see FEEL as a module, thank you. - FrontEndEditLightbox.css.min is missing. - Maybe you should add the checkbox (unchecked by default) in the module config to add JqueryCore.js in case someone is not yet using it? - This is not working (should be name instead of text): echo $page->feel("text" => "Edit page"); - I would like to have popup opened 100% width. How can I override: .mfp-feel .mfp-content { background: #fff; max-width: 90%; max-height: 90%; } - How can I style edit button other than using positional classes? Ok, I can use exesting css and ad my styling, but would be nice if you could provide a simple textarea in config, where I could enter css? - Idea: how about automatically adding feel button to pages?
-
Update: I think I found solution. In InputFieldFile.js replaced xhr.setRequestHeader("X-FILENAME", unescape(encodeURIComponent(file.name))); to xhr.setRequestHeader("X-FILENAME", encodeURIComponent(file.name)); and then in WireUpload.php (line 134) replaced if(!$filename = $_SERVER['HTTP_X_FILENAME']) return false; with if(!$filename = rawurldecode($_SERVER['HTTP_X_FILENAME'])) return false;
-
Update: found it! It's unescape() function in the InputFieldFile.js: xhr.setRequestHeader("X-FILENAME", unescape(encodeURIComponent(file.name))); If you omit the encodeURIComponent, IE behaves as Chrome and FF: xhr.setRequestHeader("X-FILENAME", unescape(file.name));
-
I have strange problem uploading files with international names in Internet Explorer. I have a file č.txt Name: Latin Small Letter C With Caron Unicode Code Point: U+010D Unicode Character: č Decimal NCRs: č Hexadecimal NCRs: č UTF-8 Code: C4 8D Escaped Unicode: \u010D Category: Latin Extended-A When file is uploaded in Chrome or FF, letter č is sanitized to c, that is expected result. When I upload the file in IE, č is "sanitized" to a. So, I enabled tracing and also echoed the values coming into validateFilename function in WireUpload.php. This is what I found. In FF or Chrome "č.txt" is 196, 141, 46, 116, 120, 116. 46 = ".", 116 = "t", 120 = "x". 196 and 141 are C4 and 8D hex, that is UTF-8 encoding. This is expected result. In tracelog: X-FILENAME: %C4%8D.txt In IE "č.txt" is 195, 132, 194, 141, 46, 116, 120, 116. Again 46 = ".", 116 = "t", 120 = "x". But where did 195 (C3), 132 (84), 194 (C2), 141 (8D) come from? In tracelog: X-FILENAME: %C3%84%C2%8D.txt So IE is sending file name in different encoding or what?
-
Yes, it's working, thank you. Would be good to reflect this behaviour in modules directory (and github).
-
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
matjazp replied to ryan's topic in Modules/Plugins
Feature request: - recognize https://youtu.be/xyz... - recognize urls in links (<a href...) (it's actually good it is not catching urls in a tags) -
Feature request: I would like to have an option to specify template(s) where the field(s) to search for video URLs. Example: search for video URL in body 'field' in templates 'gallery-item' and 'albums-item'.