Due to the blocking of access to the TMDB database by the service itself of all IP addresses from Russia and Belarus, importing movies and TV shows and displaying pictures in the popular DooPlay theme from DooThemes, which takes data from this service, stopped working.
Let's fix this together.
We fix the import of movies and series
Step 1
Open the file /dooplay/inc/core/dbmvs/init.php and find the following piece of code in it:
1 2 3 4 5 6 7 8 | // Defined Constantsdefine('DBMOVIES_VERSION','3.5.1');define('DBMOVIES_OPTIONS','_dbmovies_settings');define('DBMOVIES_OPTIMDB','_dbmovies_imdbdata');define('DBMOVIES_TMDBKEY','05902896074695709d7763505bb88b4d'); |
Step 2
We replace it with this snippet, in which we add the constant DBMOVIES_BYPASS. If its value is true, then we will take the data for import not from the original blocked themoviedb.org server, but from the dbmovies.org proxy server :
01 02 03 04 05 06 07 08 09 10 eleven | // Dbmovies Bypassdefine('DBMOVIES_BYPASS', true );// Defined Constantsdefine('DBMOVIES_VERSION','3.5.1');define('DBMOVIES_OPTIONS','_dbmovies_settings');define('DBMOVIES_OPTIMDB','_dbmovies_imdbdata');define('DBMOVIES_TMDBAPI', DBMOVIES_BYPASS ? 'https://data.dbmovies.org' : 'https://api.themoviedb.org/3');define('DBMOVIES_TMDBIMG', DBMOVIES_BYPASS ? 'https://images.dbmovies.org' : 'https://image.tmdb.org');define('DBMOVIES_TMDBKEY','05902896074695709d7763505bb88b4d'); |
Step 3
We also replace these two files of the main theme (they, unfortunately, cannot be overridden in a child theme):
- /dooplay/inc/core/dbmvs/classes/importers.php
- /dooplay/inc/core/dbmvs/classes/updater.php
On files from this archive . There I made all the necessary changes.
Step 4
We are trying to search and import movies or series to your site with the DooPlay theme.
Fixing the display of pictures
In this topic, after blocking, almost all pictures on the site also cease to be displayed (covers of films and series, gallery of frames, actors), since the blocked domain image.tmdb.org is hardcoded in the paths to them .
Step 1
Our main task is to find all occurrences of the given string and replace it with the constant DBMOVIES_TMDBIMG, which we also defined above, which will refer to the DBMV proxy.
I went through the entire topic and compiled the following list of files where this host is mentioned:
- /wp-content/themes/dooplay/inc/core/dbmvs/functions.php
- /wp-content/themes/ dooplay /inc/core/dbmvs/classes/epsemboxes.php
- /wp-content/themes/dooplay/inc/doo_init.php
Step 2
We take the files I modified from this archive and replace them with the original theme files.
Step 3
We open the site and again enjoy the working images.
