Thank you for purchasing MTDb! This app is built on top of laravel framework which means it is 100% OOP oriented, follows MVC pattern and best coding practises. Great, why do I care you ask? Well, because of all the above, besides this documentation you have a massive amount of online documentation for laravel which you almost always can apply to this app. So if you want to do some advanced modification/extension to MTDb, or just want to understand better how it works under the hood, take a look at Laravel Docs, Laracasts, or just google for dozens of other tutorial/help sites on laravel.
If you have any problems or questions, click the orange button bellow to send me an email, I will respond as soon as possible.
All MTDb updates will have 2 folders in the zip file: 1.* - full and 1.* - update, if you are updating from previous version, for example - from 1.6.1 to 1.6.2, you will want to use 1.* - update folder, if you are doing fresh installation or you skipped some versions you will want to use 1.* - full folder.
For the actual updating part, simply copy/paste the files from update folder to your server root. If you are making a fresh install,follow one of the installation guides in the installation section of this documentation.
If you are on shared hosting and can't create virtual hosts/symlinks use 1.5 - full folderand follow these instructions.
Step 1 - Create a new mysql database with utf-8 charset and preferably innoDB engine, note that while the install will attempt to create your tables using InnoDB engine, if your host doesn't support it you might run into key size problems. Most likely your host will be running phpMyAdmin as mysql manager, if that's the case you can create database like so, login to your control panel, find and click phpMyAdmin link: Login, click on the database tab in the top menu, enter any name you like and click create.
Step 2 - Navigate to app/config.
Step 3 - Open up database.php with text editor and enter your mysql database details where indicated, don't change anything else.
Step 4 - Upload 1.3 - Shared Hosting Folder contents or 1.4 - full folder contentsto your server root. You can upload files via your hosting providers control panel or via 3rd party programs like Filezilla
Step 5 - Finally open up http://example.com/install (where example is your domain) in your browser and just follow onscreen instructions. Note that before going to your home page you must visit install page and follow trough a simple install procedure, otherwise you will get an error saying that a table doesn't exist
Step 6 (Optional) open app/config/app.php with text editor and change
'debug' => true,to
'debug' => false,
If you can create virtual hosts/symlinks use these instructions.
Now, if you're using VPS I'm assuming, you have a pretty good knowledge of hosting apps already, because teaching git and what have you, really is beyond the scope of this documentation and the deployment between various hosts differs wildly.
Step 1 - Create your mysql database, or have the info your host provided ready.
Step 2 - Enter you mysql information in mtdb/app/config/database.php
Step 4 - Drop/push the mtdb folder wherever.
Step 5 - Point your virtual host to the folder that contains index.php
Step 6 (Optional) open app/config/app.php with text editor and change
'debug' => true,to
'debug' => false,
If you're still lost you can watch this for indepth screencast on deploying on fortrabbit or just use google, there's plenty of tutorials for deploying to live with laravel.
So, you've installed mtdb, but you have no idea what to do next, no problem! Just read on.
The first thing you should know is that there are 3 ways MTDb can fetch data about movies/series, you can change the currently active one at any time by going to Dashboard, clicking on options and choosing the primary data provider from dropdown list.
There are 3 search providers avalaible, same as data providers. The way search works is, when user searches for a movie/series on your site MTDb will take their search query(movie title) and use it to query the search provider you choose:
Then it will display the matches found using the search provider you choose, it will also cache these queries and insert all the matches into the database so they can be used to make movie suggestions in the search form.
Now that you chose your providers and you know how search works, you might want to edit some details about a movie/series. You can do this from dashboard or directly from movie series page:
To edit images you'll need to navigate to the page of movie/series you want edit and select images from edit dropdown.
To edit movies/series cast, navigate to the page of the movie that you want to edit and click edit above the cast column or select edit cast from drop down depending on your theme.
This will bring you to the movie/series cast edit page. Here you can:
To add a new season to series or edit existing ones, navigate to the series you want and click new in the jumbotron or select it from dropdown depending on your theme. The edit seasons page is very similar to the cast one, click trash or pencil icon to delete/edit existing seasons information, or fill in the fields at the top of page and click create to create a new season.
First, navigate to a series you want and select the season you want in the jumbotron.
This will list all the episodes of a season, to add a new one click create new episode button under the jumbotron. This will take you to the episode creation page, same as above, just fill in the fields and click create.
To Edit or Delete an episode, click on appropriate buttons, the edit button will open a popup, just edit the details you want and click update.
Now that we've covered data/search providers and editing movie/series info, you might be wandering about news or featured trailers. Here's what you need to know:
All of the above will update automaticly News - every 5 hours, Trailers - every day, Movies in theaters - every 2 days. Ofcourse you can update them manually by clicking:
or from dashboard (as explainded in dashboard section of this documentation).
Ofcourse you can create news and movies manually from dashboard or by clicking:
Clicking this will take you to the dedicated news creation page where you can create news items with an integrated WYSIWYG editor.
To make a movie/series featured or now playing in theaters simply select appropriate choice from dropdown when creating them (as explained in movie/series creation section), however note that only 8 featured trailers and 10 movies now in theaters will be displayed so you should first unfeature one of the older movies to make the new ones appear.
To create a new actor manually simply click on people in the menu and the click create new in the top right corner, this will take you to actor creation page where you can create a new actor.
We've covered attaching/detaching actors to and from movies Here, but what if you want to edit actor information like biography, birthdate, awards etc or make actor known for a specific movie?, to accomplish this you will need to navigate to actors page via actors menu item or by clicking actors image in the movie that he/she appears. Once you're at the actors main page you can click:
Once you click this button, you will be taken to actor edit page, here you can update or add any information about actor you want. To edit actors filmography including making him known for specific movies click on either of these:
This will take you to actor filmography edit page, here you can click on dropdown to select whether actor is known for this movie/series or not, click trash icon to remove movie/series from actors filmography (not delete just detach from that particular actor) or click pencil icon to get to that movies edit page.
MTDb comments are powered by disqus, in order for comments to appear you will have to register for disqus here and enter your application shortname in dashboard options page as explained here.
To change genral app settings like timezone, secret key(You should always change this when you install mtdb for the first time) and current locale(language) open up mtdb/app/config/app.php with text editor and change the settings you want, they all are well documented. For example, if you want to change your timezone from EET (default) to GTM, replace
with
Do not modify aliases and service provider arrays unless you know what you are doing.
If you wish to require user activation via email (can set this in dashboard) or need to have a functional contact us page you will have to configure mail. Open up mtdb/app/config/mail.php and enter your mail server details (host, from, username and password are required). I recommend you use gmail, if you already have an gmail account all you need to do is enter your email adress and password. For example:
To translate the application follow these simple steps (translating, movie, series, users etc words will translate urls automaticlly):
Step 1 - Open up mtdb/app/lang folder
Step 2 - Copy and paste the en folder (to same diretory)
Step 3 - Rename en folder to whatever language you will be translating to, for example 'de'.
Step 4 - Open the files in the folder you just renamed and start translating. So for example, if you want to translate the brand and meta descriptions open mtdb/app/lang/*your lang*/main.php and replace:
With:
same goes for every other file and words, left of => is the key, leave that intact, right of => is the translation, this is there you put your translation.
Step 5 - Once you are done translating follow Step 2.1 and simply change your locale to whatever you named your translation folder, 'de' in this examples case.
In the main dashboard page you can:
Now, you are probably wandering what fully scrape means. So, basically to optimize the performance this app only saves part of movie data (general information like title, poster, release date, plot etc) and then fetches the rest of the data (actors, writers, reviews, images etc) only when it is needed (when user navigates to the specific movie page), what fully scrape button does is lets you automate this process, so movie pages load faster (or for whatever other reason you want to do it).
Using advanced imdb search scraper you can easily and rapidly scrape general movies/series information (as disscused above) by your specified parameters from imdb. Simply select the query parameters that you want and the app will do the rest for you.
Note that because the app needs to download images from imdb as they block hotlinking, scraping can take a varying amount of time depending on your internet speed and how much movies you requested to be scraped. Also, 100 movies are scraped per one request so if you enter 8 movies or 100 it will take the same amount of time.
TMDb discover scraper is very similar to imdb one, except for these differences:
This is mostly for testing and development, once you click the button in will truncate all your database tables (leaves the structure, but deletes data) except for user table and options table, so you dont have to reinstall the app, aswell as clear all cache and imdb images.
These pages give you full control of the data in your database, you can:
Sort the data by clicking on:
Filter by various params - release date, rating, language etc, you can find all the movies that the actor/director/writer has appeared in and so forth:
Create movies, news, series, people by clicking on create new button and entering the information you want:
Edit movies, news, series, people by clicking anywhere inside their row.
It's mostly the same as other data pages except for permissions, you can refer to available privilegies below, you should format them like so (json)
{"titles.create":1, "titles.delete":1, "news.delete":1} etc...
Groups a are...Well groups, that can have specific privilegies like create titles, delete titles, update news, delete actors and so on. You can assign these groups to users you want to give them access to do specific things on your website, for example, create titles but not delete them, update news but not create them etc. This access is called privilegies.
Currently avalaible privilegies are these:
Create a group the same way as you would movie or a person, refer to user page documentation on how to format permissions.
This is where you can specify various options for your site. Lets discuss each in detail:
Here you can change the image backgrounds for most of the app pages that have them.
to change these simply upload a new background to public_html/assets/images and in dashboard enter only your new backgrounds name and extenstion.
Here you can modify how your site looks.
Here you can simply enter your ad codes and they will appear in the specified places, you can enter the same code in multimple places.
Social Login
To make social login work you will need to register for an application on google, twitter and facebook and enter your application details in app/config/hybridauth.php instead of '**************' like so:
You can register for facebook app Here by clicking on create new app.
You will find your app id and secret in the main page of your facebook app dashboard, you will also need to enter your site url by clicking on settings
You can register for twitter app Here, just fill in the required information, for website and callback url put in your site homepage url, you'll find your key and secret here:
You can register for google app Here, you will need to click on edit settings and under authorized redirect uri enter http://yoursiteurl/social/auth?hauth.done=Google, you may need to set some extra information if you get any errors, like email adress in consent tab.
Troubleshooting
If you are having errors or other problems, please review this section before contacting me. Thank you.
Im getting Whoops something went wrong... when trying to access my site url.
First, open up mtdb/app/config/app.php with text editor and change
to
This will allow you to see what kind of errors you are getting exactly.
Im getting Swiftmail exception when trying to use contact form/registration.
Double check your mail server details in app/config/mail.php
I'm getting 404 error when trying to visit any url besides homepage.
First, check if yoursite.com/index.php/movies is working, if it is then the problem is with .htaccess file, possible solutions:
If you have access to appache installation try this:
Im getting image not writible exception
This is most likely caused by not writable images, avatars or imdb folder, giving these folders and all the sub-folders 777 permissions should solve the issue.
Im getting PDO/Mysql state exception when trying to access my site.
Please double check your mysql details in mtdb/app/config/database.php
Im not getting any errors just white screen when trying to access my site.
Make sure that mtdb/app/storage and mtdb/app/storage/logs are writible. If that doesn't help add the following lines at the top of index.php file(after ?php) to see what kind of error you are getting
Im getting Call to undefined function Lib\Services\Scraping\curl_init() when trying to access my site.
Make sure that curl php extension is enabled.
Im getting Catchable fatal error: Argument 1 passed to Illuminate\Container\Container::share() must be an instance of Closure, unknown given when trying to access my site.
Either downgrade to lower php version or disable eaccelerator php extension.
I'm getting open_basedir in effect error.
Either get your host to disable open_basedir or go to options page of dashboard and disable caching.
I'm getting php incompatible hasher error.
Go to mtdb\app\config\packages\cartalyst\sentry open up config.php and change 'hasher' => 'native', to 'hasher' => 'bcrypt', or other supported formats outlined in that file.
After update my menu items got messed up, main.movies-menu, main.series-menu etc
Replace your app/lang/en/main.php file with the one in 1.6.* - full folder.