Closed softmanro closed 3 years ago
Thank you for the review - I think the code looks much better now after the latest changes. Let me know if you need any other updates.
hey @softmanro ; I seem to have completely forgotten about this? :-/ if you're still interested we could pick this up again; could you have a look at the conflicts that arose after my more recent commits ?
No problem, Frank. I got these sorted, please have a look when you can and let me know if seems right to you. I've gave this a trial run into one of my projects and seems to be work properly.
Have you got the chance to review this?
i tested your fork, but got PHP errors from lyteCache.php and the images don't show @softmanro ?
[Thu Jun 17 14:58:50.280195 2021] [php7:error] [pid 131686] [client 127.0.0.1:53638] PHP Fatal error: require_once(): Failed opening required '/var/www/html/wordpress/wp-content/plugins/wp-youtube-lyte-softmanro/../../../lyteCache-config.php' (include_path='.:/usr/share/php') in /var/www/html/wordpress/wp-content/plugins/wp-youtube-lyte-softmanro/lyteCache.php on line 18, referer: http://localhost/wordpress/first/2021/06/17/lyte-pr-test/
i tested your fork, but got PHP errors from lyteCache.php and the images don't show @softmanro ?
[Thu Jun 17 14:58:50.280195 2021] [php7:error] [pid 131686] [client 127.0.0.1:53638] PHP Fatal error: require_once(): Failed opening required '/var/www/html/wordpress/wp-content/plugins/wp-youtube-lyte-softmanro/../../../lyteCache-config.php' (include_path='.:/usr/share/php') in /var/www/html/wordpress/wp-content/plugins/wp-youtube-lyte-softmanro/lyteCache.php on line 18, referer: http://localhost/wordpress/first/2021/06/17/lyte-pr-test/
There was a bad check for the existence of the custom config. On my system the config was there so I did not notice the error, sorry about it. It's fixed with the latest commit.
thanks, I'll retest! Do you have this running somewhere and if so can you share the URL so I can see it on a live site @softmanro ? :)
Yes, sure - you can see it live on https://icansewthis.com/heart-christmas-ornaments/ or pretty much any other post which includes Youtube links on that site.
great!
another question: what would typically go in lyteCache-config.php
? the contants for LYTE_CACHE_CHILD_DIR
and LYTE_CACHE_DIR
? anything else?
At this point nothing else, unless you would want to include some other named constants used by the plugin.
Actually right now it only makes sense to define LYTE_CACHE_DIR, since the LYTE_CACHE_CHILD_DIR is used just once in lyteCache.php, solely if LYTE_CACHE_DIR is not already defined.
thanks for the work on this @softmanro , much appreciated! :-)
My pleasure, Frank.
Add logic in order to be able to use lazy loading (using internal shipped loader or an already existing one from another plugin) for video thumbnails loaded as background images.
Also change the fallback HTTP redirect code in lyteCache.php to temporary instead of permanent.