Giter Site home page Giter Site logo

jreklund / php4dvd Goto Github PK

View Code? Open in Web Editor NEW
82.0 23.0 44.0 6.63 MB

php4dvd is an open source php/mysql powered movie database. Catalog your video collection with ease. Automatic update of information and images.

License: GNU General Public License v3.0

PHP 89.98% Smarty 0.22% CSS 4.71% HTML 3.94% JavaScript 1.15%
movie-collection php mysql imdb

php4dvd's Introduction

php4dvd 3.X

php4dvd is a small yet powerful, php/mysql powered movie database.

Features

  • Add movie information from IMDb.com
    • (directors, actors, poster, language...)
  • Keeps track on what movies you watched, bought or loaned out to a friend
  • Add covers/posters to your movies
  • What do you think about a movie? Write it down in personal notes
  • Search function (title, year, plot)
    • Age rating: filter by age (Parental Guidance/MPAA)
    • Filter by: categories, format, movie, tv, seen, own, favourite
    • Sort it by: name, year, rating, format, added, loaned out
    • Results: limit amount of movies shown
    • Layouts: choose between five different display layouts
  • Multi-user (admin, editor, guest)
  • Multiple languages
  • Very configurable, easy to use
  • Editable templates using Smarty (no PHP knowledge is required)
  • SEO Friendly URL
  • Automatic YouTube trailers

Requirements (supported versions)

  • PHP 7.4 / PHP 8.0 / PHP 8.1
  • MySQL 5.7 / MySQL 8.0 / MariaDB 10.6
  • GD2 library to be able to upload (and resize) covers
  • PDO library
    • PDO driver for MySQL/MariaDB
  • cURL

Installation

  1. Download and unzip php4dvd package if you haven't already.
  2. Create a database for php4dvd on your web server, as well as a MySQL (or MariaDB) user who has all privileges for accessing and modifying it.
  3. Upload the php4dvd files to the desired location on your web server:
  4. Run the php4dvd installation script by accessing the URL in a web browser.
  5. Manually remove the install/ directory.
  6. Log into php4dvd using the username: admin, password: admin.

Upgrade

Delete all files and folders except:

config/config.php
config/version.inc.php
movies/*
movies/covers/*

v3.1.1 or older: You will need to change your $settings["defaultlanguage"] inside config.php

$settings["defaultlanguage"] = "en"; // English
$settings["defaultlanguage"] = "nl"; // Nederlands
$settings["defaultlanguage"] = "sv"; // Swedish
$settings["defaultlanguage"] = "pl"; // Polish
  1. Download and unzip php4dvd package if you haven't already.
  2. Upload the php4dvd files to the desired location on your web server:
  3. Run the php4dvd installation script by accessing the URL in a web browser.
  4. Manually remove the install/ directory.
  5. Log into php4dvd using your username/password.
  6. Empty your browser's cache or force refresh with CTRL+F5 (Win), Ctrl+Shift+R (Win/Linux) or Command+Shift+R (Mac).

Screenshots

Login Movie collection Search Movie Movie trailer Add movies Search from IMDb Users

Configuration / FAQ

You will find all configurable options inside config/config.default.php, all of which can be set in your config/config.php file. By default, guest users can't view your movie collection. If you want guest users to view your collection, set the guestview variable to true in config/config.php after installation or upgrade.

SEO Friendly URL (pretty_url)

Activate inside config/config.default.php or config/config.php and read the instructions inside .htaccess.

Age rating / Parental Guidance / MPAA

Activate inside config/parental.guidance.php or config/config.php and read the instructions inside config/parental.guidance.php.

Configure languages

Tell IMDb which is the preferred language (e.g. en-US, de-DE, pt-BR)

Sometimes IMDb gets unsure that the specified language are correct, if you only specify your unique language and territory code (de-DE). In the example below, you can find that we have chosen to include de-DE (German, Germany), de (German) and en (English). If IMDb can’t find anything matching German, Germany, you will get German results instead or English if there are no German translation.

$settings["imdbphp"]["language"] = 'de-DE,de,en';

Please use The Unicode Consortium Langugage-Territory Information database for finding your unique language and territory code.

Language Code Territory Code
German de Germany {O} DE

After you have found your unique language and territory code you will need to combine them. Start with language code (de), add a separator (-) and at last your territory code (DE); de-DE. Now include your language code (de); de-DE,de. And the last step add English (en); de-DE,de,en.

Change geolocation

Sometimes your server aren't located in your preferred area (language), so you can use another ip address (e.g. a public proxy), for tricking IMDb geolocation system. There are some movies/TV Series that have the English translation in "World-wide" and the only way to retrieve them is an US/UK IP-address.

$settings["imdbphp"]["ip_address"] = '';

Keyboard shortcuts

  • CTRL+F, CMD+F or F3
    • Focus search field
  • DELETE (in search field)
    • Removes text in search field
  • END (in search field)
    • Reset everything (except: sort by, results per page and layout)

Internal Server Error

Try to run the website, but if the site failes opening with a Internal Server Error, adjust the .htaccess file in the root of the site. Try to remove the Options line by placing a # at the beginning of the line. Otherwise remove the <Files> section. These settings might fail because of the permissions of your webserver.

SSL certificate problem: unable to get local issuer certificate

Visible as ERROR 500 in your browser when adding movie/tv posters from IMDb.

Windows

  1. Download cacert.pem.
  2. Store it somewhere on your server.
    C:\php\extras\ssl\cacert.pem
  3. Open your php.ini and add the following under [curl].
    curl.cainfo = "C:\php\extras\ssl\cacert.pem"
  4. Restart your web server.

Linux

I recommend that you update your local ca-bundle.crt or ca-certificates.crt file for your whole system.
There are different best practices depending on OS. Google is your best bet, for finding the safest way.

You can also use a local cacert.pem like in Windows.

/etc/ssl/certs/cacert.pem
curl.cainfo = "/etc/ssl/certs/cacert.pem"

Templates

You can customize your site by adding your own template. Take a look at the tpl/default/ directory and copy this directory to your own tpl directory. Now you can adjust the config/config.php to your new template. Check all template files and try to adjust them to your own whishes.

If you just want to change the color, please check config/config.defaults.php for available skins.

Thanks to

Thanks to cyberolf. He originally created php4dvd.

Thanks to morphias0. He wrote the first automatic installer/upgrade script and came up with some extra features.

Thanks to Izzy from IzzySoft. He wrote the imdbphp class to be able to search for movies at IMDb.com. Big shoutout to Tom for continuing his work.

Libraries

HTML/CSS/JavaScript

PHP

License

This file is part of php4dvd.

php4dvd is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

php4dvd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with php4dvd. If not, see http://www.gnu.org/licenses/.

php4dvd's People

Contributors

ajtak avatar bloodsoul avatar cnovoa avatar jakub96124124 avatar jreklund avatar kkayacan avatar pajaura avatar polakosz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php4dvd's Issues

Change language on movie titles

I really like php4dvd. but I have a problem with it. my server that I installed php4dvd on it is located in Germany. so when I search for a movie or update a movie it replaces English title with German title. but I don't know German and I'd like to have titles in English.

How can I fix it ?

How to process genres in comma separated list instead of new line?

I need help, there is a code, it takes all the data from their database, but makes them ALL in one line, how to make it split them into each element (Before) (If they were added to the database separated by commas (In line), and not on everyone on the new line)
{assign var=genres value=$movie->getList('genres')}
{foreach $genres as $g}{if !$g@first}, {/if}{$g}{/foreach}

Netsted Formats

Sometimes it could be handy to have a specific hierarchy for formats to filter by.
As a small example, there are the formats "DVD", "Blu-ray" and "Blu-ray 3D". One could select to filter for Blu-rays only, but he does not see the 3D Blu-rays, because it is a format by itself.

Maybe this can be done in one of the following ways:

1 Text Input:
The format could be separated by a divide symbol (";" for example).
Movie A: "Blu-rays;Blu-ray 3D"
Movie B: "Blu-rays;Blu-ray"
This would result in the following format filters:

  • All formats
  • Blu-rays
    • Blu-ray
    • Blu-ray 3D

The first Movie would be displayed, when "Blu-rays" or "Blu-ray 3D" is selected, the second will be displayed when "Blu-rays" or "Blu-ray" is selected.
The disadvantage is, that this isn't clearly readable and it is more complicated to deal with the different levels when editing a movie.

2 Nested Array in Settings:
Maybe it would be more easy to define a type and the possible formats in the configuration.
Example:

$settings["formats"] = array(
    "Blu-rays" => array(
        "Blu-ray",
        "Blu-ray 3D",
    ),
    "DVD"
);

This would need changing the text input to a drop-down of what is configured.
It would unfortunately force some headache when updating to this I assume. :(
For new installations it could come preset for "DVD" and "Blu-ray" without the nested array maybe.

Play trailers from your local computer

First thanks for the great project. Was asking or rather suggesting whether it would be possible for the url for trailer to be modified so as it could be able to fetch for the trailers in the local machine

Markdown support in personal notes area

Since the personal notes area does not support html or any kind of text formatting, I believe it would be useful to have this field to support Markdown syntax and get formatted automatically in display mode, in order to feature hyperlinks and other formatting options.

There are some nice libraries that could make the work easier.

If you can point the code where notes area is displayed, I would love to work on this.

Notes field undefined in movies templates

When I try to access $movies[m]->notes in tpl//movies/movies/.html, I get this error message: Undefined property: Movie::$notes.
For some reasone the notes property is not defined in the Movie object. It seems it is imported from the DB, but why is it then undefined in the lists?

View Filmdetails in same Window

Hi, is it possible to implement to view the informations of a film in same window like the collection/search window when clicking on a specific film? so not a new window is opening and the left sidebar always is shown?

i think it will increase the usability.

greetz dOpesen

Change the date format

Hello. I would like to change the format of the dates displayed (for example, those of loans) from the current YYYY-MM-DD to DD-MM-YYYY. I tried to change some parameters in the code but I was not successful. How can I do? TY

Collection icons: Toggle Own/Seen - Need confirmation

I for myself add new movies to the database once I order them. When they arrive, I often have to switch some movies at once to "owned".

Maybe this could be done by clicking on the star icon in the top right corner of a movie to speed up this process a little? To avoid clicking it by mistake, there could also be a small confirmation for this action.

Additionally, this could also apply for the switch from "not seen" to "seen".

https://prnt.sc/hba8ot

user registration

If guest mode is disabled site is restricted and need to login.
Can you make registration for users ?

ERROR 500 when adding movie/tv without adding a cover

Hi! When I trying to add information from IMDB, without adding a cover, I get an error, did someone encounter this? If you add the cover art manually, then everything is fine. https://i.imgbox.com/mZ1K6ov2.gif

Hi @Solmier, please see the FAQ regarding "SSL certificate problem: unable to get local issuer certificate". Your sever can't validate IMDb SSL certificate and a fatal error is encountered.

In the future, please open an issue instead of commenting on a commit.

New Select

How to add a menu similar to the category, but only with the year?

Some more features in nevigation bar

I just want to add more features in navigation bar. i have already add some navigation list option like( dual audio movie, hollywod movie, bollywood movie). Now help me to written the code scripts related to this added features.
Thanks
Atul
1588164925252870272138132761548

Filter movies by rating exactly pg-0

Currently, the default values for pgMin and pgMax within the search are 0. If their value is 0, they are not included in the database query.
Thus, it is currently not possible to filter by a rating of exactly zero.

Since the most rating systems won't have a rating 1, it can be worked around from users by setting the slider to 0:1. But one might be confused, that a slider of 0:0 results in displaying all the movies.

Filter and/or sort by content rating

Suggestion: It would be nice to filter and/or sort movies by their content rating.

Since there are many different content ratings out there, and someone could have foreign movies with another content rating, this maybe should be configurable. Maybe with a corresponding image of the content rating label on the details page of a movie.

Can I import a CSV file?

Hi. At first glance, it is not possible to import a csv file, is this facility available? I already have thousands of DVDs and BluRays in csv format. Many thanks, the software looks great!

Can't log in after fresh install

Hi,

I've installed v3.7.0 and deleted theinstall/ directory. That all went smoothly and I can now view php4dvd but when I try to log in I get error 500. I enabled all the debugging and now get the following:

SELECT `users`.* FROM `users` WHERE username = 'admin' LIMIT 1 -- keep-cache
resultset: 1 rows

I understand this is something to do with SQL but I have no clue how to fix it. What does this message mean?

I'm using lighttpd instead of Apache. Could that be a problem? I've installed the rest of packages in the Requirements section. Could I still be missing a package (I'm running OpenWRT CC on a Zsun WiFi card reader so my environment is quite stripped down)?

Thanks :)

Favorites for an individual user

Hi, I need help, I wanted to create a page with selected films so that an individual user can add films to his collection (I registered it), but I can't implement the code "Add to collection" and "Remove from collection", can you help me with this question?

User ratings?

Can You implement user ratings? This function is useful.

Progress

Hi, would you like to know how things are progressing for version 4?

Remove all filters at once

If you select filters and write a movie title, you get a filtered list for the selected filters. If you reload the site or are willing to reset it to display all, it is necessary to remove all the filters manually one by one.

A little link or a button to remove all the filters would be nice to have.

contact

hello, how can i contact you ?

add multiple

Is there a option to add multiple movies in once ?

Lock movie specific values to not being updated automatically

Sometimes IMDb delivers data, which one will specifically decide to overwrite it with own data or leave blank. When automatically updating the movie collection from IMDb, that movie specific data should not be updated.

As an example, there are some (mostly older) movies, that have more than one or two names in a single language. The fetched name is correct, but maybe one will decide to use an other name he recognizes the most.
This could also help with foreign movies where the title is written in non-latin characters.

When updating a specific movie manually, maybe there is a possibility to display a diff-like view, where the user could decide which data to keep.

cover is not stored at hard disc

Hi,

The issue happens as follows:

  1. I open an already imported movie in edit mode (see my installation)
  2. click refresh
  3. cover and also IMDB data is successfully fetched (cover is visible at the left)
  4. click on store or store and next movie
  5. IMDB data is stored successfully in database
  6. cover is not stored at hard disc
  7. reloading movie details in view mode or search result view does not reveal a cover.

The issue does not happen for new added movies. Here cover is fetched from source and is stored as a jpg-file below movies directory.

My installation of php4dvd is as follow:

  • same code base as git master from 2018-10-04.
  • php7 + php-gd + php-curl and other dependencies fulfilled
  • import process succeeded successfully like described by #34 (comment)
  • no errors in error log of apache2 or in development mode

My relevant configuration options:
$settings["photo"]["movies"] = "./movies/";
$settings["photo"]["covers"] = $settings["photo"]["movies"]."covers/";

current access rights of movies and covers (access with all rwx rights does also run in this issue)
/var/www/php4dvd# ls -al movies/
drwxr-xr-x 3 www-data www-data 4096 Okt 4 08:28 .
drwxr-xr-x 12 www-data www-data 4096 Okt 3 17:41 ..
drwxr-xr-x 2 www-data www-data 4096 Okt 3 16:48 covers
-rw-r--r-- 1 www-data www-data 33 Okt 3 16:48 index.php

What may I do to fix it?

Costum pages, news, imdb rating

I see very future proof in that project. Love to see some new cool future's...
I'm huge movies and tv show's fan, before i had custom made movies collection script, but it needed a lot off work to make it modern version, bootstrap, new software (php, mysql) etc.

So have some ideas:

Add Custom pages and a little news corner, nothing special, just title, when added, content, category, source link.

IMDB Rating, Fetching from imdb id.

I'm already working those requested futures in my personal project.

One thing where i struggle is how show some info like movie Type, show that output as a little icon.
Example When adding movie, in field Movie Type and have 3 choose Digital, DVD, Blu-Ray

If i selected ex Blu-ray it show that selections in movie as a Blu-ray icon image.

Anyway this project looks very cool, love to see more updates and futures :)

Custom fields

As discussed in #35; add the ability to add customized fields:

  • Text
  • Textarea

Maybe:

  • Radio (Yes / No)
  • Checkbox

New field: IMDb Number of Votes

I like sorting movies by number of votes on IMDb so a new sortable field would be great. I believe imdphp library already supports this data. If you advise where to look, I can try to add this.

  /**
   * Return number of votes for this movie
   * @method votes
   * @return int
   * @see IMDB page / (TitlePage)
   */
  public function votes() {
    if ($this->main_votes == -1) $this->rate_vote();
    return $this->main_votes;
  }

Movies starting with special characters get removed from the database

I got some issue with movies, that start with special characters such as dots, quotation marks or brackets.

It seems that updating all movies or the update process to 3.6.1 has removed all movies starting with one of them from the database. I try to figure out if I can reproduce it, when I manage to re-add them. They are still in the cache directory.

Index Number for private libraries?

Good Day. A great script for personal video collection. Is it possible to have a small field for library number?

For example, I already have my DVDs and BluRays in CSV format with unique identifier to help me find it on the shelf. A field with 6 VARCHAR would be great to reference the ID of the physical unit.

Many thanks.

Gund

How to reset your category selection?

Hello. Need help in the script. The problem is this: when you select one of the categories and then click on the main page, it does not go to the main page, but remains on the category page. How can I fix this?

"Plots" formatting

Same as the original project, the plots are formatted with an ordered list with a number, which makes them have a new number every time there is a line break in the information that comes over from IMDB.

php4dvd issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.