Radek Matej
Forum Replies Created
-
Forum: Plugins
In reply to: [React Webcam] ReactCam with WordPress 5.5I’m glad it worked after the update. 👍
Forum: Plugins
In reply to: [React Webcam] Only manually refreshing worksHi,
open Chrome DevTools as I advised and check for errors. Let me know if you find something there.
Radek
Forum: Plugins
In reply to: [React Webcam] Only manually refreshing worksHi,
I’m not sure why it does not work. Files are timestamped and the location is correct. The only cause I can think of is a conflicting JS plugin with a different React library version.
Try opening Chrome DevTools and check if there are any errors logged in the console for your WordPress website.
Radek
Forum: Plugins
In reply to: [React Webcam] Gutenberg will break react-webcamI’m sorry I wasn’t much an help. I should have updated the plugin to newer React version months ago, but I had other priorities.
I’m glad the problem was resolved after all.
Forum: Plugins
In reply to: [React Webcam] FTP upload locationThanks for sharing your solution.
Forum: Plugins
In reply to: [React Webcam] FTP upload locationThanks for the kind words about the plugin. I don’t want any money, this is open source and I’m not able to provide any extensive support.
The problem is not in React but in the PHP code that is searching for image files. Currently, it cannot search subdirectories:
foreach (array_filter(glob($webcam_dir . '*'), 'is_file') as $path) { $last_filename = basename($path); } return $last_filename;But you can modify the above code right in the installed plugin so that it searches recursively.
I can’t help you more with that, sorry. If you are not capable of changing it on your own, get help from some PHP developer.
Forum: Plugins
In reply to: [React Webcam] Direct Plugin to different FolderThe reason why there is no WP admin for this plugin is to keep it as simple as possible. First, webcam that cannot upload images elsewhere is pretty lame. Second, operating within
wp-content/uploadsdirectory is a good practice when dealing with files in WordPress plugin.Thanks for the words of praise. 🙂 It’s great to hear that this simple plugin actually helps somebody.
Forum: Plugins
In reply to: [React Webcam] Direct Plugin to different FolderHi Haukur,
Having webcam images on another website is not possible with this plugin. It is a WordPress plugin, it operates only with files on filesystem available to WordPress.
In your case, I recommend finding a hosting, that provides sftp or ssh to securely sync images with a webcam or another server.
Radek
Forum: Plugins
In reply to: [React Webcam] Direct Plugin to different FolderHi,
your tweak couldn’t really work because
$upoad_dirshould really containwp_upload_dir(). On one of the next lines, I’m gettingbaseurlfrom the array returned bywp_upload_dirfunction. That’s probably the reason for the strange character.Why have you decided not to put your webcam images to the
/wp-content/uploads/webcam/directory? What’s the motivation? If there is a solid motivation, you need to further modify the source code.Radek
Forum: Plugins
In reply to: [React Webcam] use as widgetHi Alex,
Thank you for the feedback.
I have never experimented with shortcodes with widgets but supposedly there is a simple way how to make it work.
Radek
Forum: Plugins
In reply to: [React Webcam] Direct Plugin to different FolderHi Thomas,
I don’t have time to fully investigate your code and suggest a proper solution. But after a quick review, it seems that in
get_last_filenameyou use URL instead of filesystem path soglobfunction that operates with files cannot work.Radek
Forum: Plugins
In reply to: [React Webcam] Clickable Larger Size Image?Hi Mat,
This is unfortunately not easy. To achieve that you need to modify plugin code – change markup in both
react-webcam.phpandActualImage.jsfiles. Or customize the lightbox plugin to use the same image URL instead of the link.Radek
Forum: Plugins
In reply to: [React Webcam] How do I change the dimensions of the image?I’m afraid I cannot help you with that. Your theme is probably broken in some way and as the result styling doesn’t work in IE. Ask someone with front-end development skills to investigate.
The plugin just adds an image to the page. That works in all browsers for sure. If image is not displayed properly, WordPress theme is to blame.
Forum: Plugins
In reply to: [React Webcam] How do I change the dimensions of the image?Hi Chanta,
Webcam image is not styled by default. That is WordPress theme responsibility. To change appearance, change the CSS styles.
For example this sets image width:
.react-webcam img { width: 400px; }Radek
Forum: Reviews
In reply to: [React Webcam] Solves a problemThank you for the positive feedback! I’m glad it helped.