caemor
Forum Replies Created
-
Forum: Plugins
In reply to: [GR Progress Widget] Cache goodreads asset on server?Well I am having the same problem as this person here: https://www.ads-software.com/support/topic/sync-of-book-covers-for-privacy-laws-in-europe/
For the solution: No I didn’t have the time yet to test it and I am not this proficient with php and even more with wordpress plugins ??
Once more for clarification what I am trying to do:
At the moment when you visit a site with this plugin installed you also connect to the gr-assets.com server and therefore give them your IP (which according to the gpdr is already protectable data ?? ), which makes this plugin sadly a bit more difficult to use for european users (you would need to get a data protection agreement with goodreads).Now a possible solution would be adding an option to this great plugin, where the imagedata is redirected through the wordpress server and therefore is no longer external (and gr-assets only sees the servers ip).
If I found it correctly https://github.com/cmeeren/gr-progress/blob/master/src/gr-progress/includes/gr_progress_cvdm_backend.php#L200 is where this option would need to do its work. Instead of the current line there would need to be sth like:
echo "<div class='coverImage'><img alt='Book cover' src='<strong>{$optional_redirect_url}</strong>{$book->getCoverURL()}' /></div>";
Where the optional_redirect_url would be the optional path to the php file from above which just redirects the cover image through your server. (
https://link-to-your-php-skript.com/img.php?
)The drawback of this option is that your server has a slightly higher workload of redirecting an additional 3-10 (depending on the amout of book covers one chooses to show) images.
Forum: Plugins
In reply to: [GR Progress Widget] Cache goodreads asset on server?So I found the same solution multiple times where the image wouldn’t need to be cached. One needs to have an extra php file which does the following below. The img url would now be:
<img src="https://link-to-your-php-skript.com/img.php?url={external-goodreads-url}" />
And the code in that php file:
<?php $url = $_GET['url']; if(strpos($url,".jpg")) { header("Content-Type: image/jpg"); } if(strpos($url,".gif")) { header("Content-Type: image/gif"); } if(strpos($url,".png")) { header("Content-Type: image/png"); } readfile($url); ?>