PK's MovieDB Release.V3.0 (Dynamic PHP View)

If you made a template for printing or HTML export, you can offer it to the others here. You can also ask here for help about these templates
Post Reply
blue334
Posts: 11
Joined: 2007-02-08 18:08:48

Post by blue334 »

To answer my own question above, it seems I get a behavior more the way (I think) it should be if I simplify the _href function in mdb_movie.inc.

This way each link generated is a proper link for that sort option, it doesn't make huge "other" groups. The only slight adverse effect I can spot is the "Other" group isn't highlighted in the side panels either, even if selected sort parameter places in that group (though I'm sure someone who actually knows how to code php could fix that)

Code: Select all

    /** -------------------------------------------------------------------------------------------
     * Checks the dbfield to see if there is a category enabled. A valid HREF is returned.
     * @access private
     * ------------------------------------------------------------------------------------------*/
    function _href($value, $dbfield) {
        $href_changes = array();
        $href_changes['NUM'] = 0;
        # Check we need quotes
          if (strpos($value, " ") !== FALSE) { 
            $value = '"'.$value.'"'; 
            $href_changes['SEARCH'] = $value;
          } else {
            $href_changes[$dbfield] = $value;
          }
        $href = $this->mdb->get_link($href_changes);
        return $href;
    }
Thermal Ions
Posts: 58
Joined: 2006-12-08 18:19:18
Location: The Land Down Under

Post by Thermal Ions »

J.P. wrote:yes

Code: Select all

$this->config['mysql']['server']    = "localhost";
$this->config['mysql']['username']  = "pal...";
$this->config['mysql']['password']  = "........";
$this->config['mysql']['database']  = "pal...";
$this->config['mysql']['table']     = "movies";
The old 2.2 i used localhost
That must be here the same?
The version 2.2 was

Code: Select all

$db = new mysql_db("localhost", "pal...", "......");
$moviedb = new Moviedb($db, "pal...", "movies");
Maybe i do something else wrong...
Must i change somthing on index.php

I have only upload the file and change mdb_config.inc.
From your post it looks like you are saying that your username "pal..." is the same as the name of your database "pal...". Is this correct?

If version 2.2 could access the database then version 3.0 should also be able to as long as the detail in mdb_config.inc is entered correctly.

Are you using the same database and table you had for version 2.2 or have you set up a new one (with maybe different database or table name)?

It should just be a case of uploading to your server the zip file contents and editing the mdb_config.inc file. You shouldn't need to make any changes to other files (I didn't have to on local server or www server).

Regards.................Thermal
bobrap
Posts: 4
Joined: 2007-01-23 17:10:38

Post by bobrap »

bobrap wrote:
kazgor wrote:what hosting site are u both using.. i could probably knock something up for AWARDSPACE.com.. not sure about screenshots but a general overview.
I'm using 1and1. I had been using dvdprofiler and the phpdvdprofiler. Got that to work, but I just can't get this. When importing the database with dvdprofiler, I remember using a schema.sql. Maybe I'm just not importing correctly. Any help is really appreciated. :grinking:

p.s. REALLY like your movie site. Any chance of doing one for me? Is there a feature for just a list and then jump to the page with the cover? Smack me if I ask too much. :D
*bump*
screach
Posts: 25
Joined: 2006-08-07 00:21:50

Category - Alphabetical

Post by screach »

xyncro wrote:nice template, i must say.. :wink:

i have some questions thoo..

would it be possible to replace country box on the left side
with a box of letters instead? - how?

how do i change where the boxes are located?
i would like to have it like this instead..
[Category]
[Letter] - (# | A-Z | Å | Ä | Ö)
[Year]
[Language]

thx..

Hi XYNCRO,

I'm not able to help, since Catergory|Letter is not available but am curious as to how you got it wokring using Category|Letter? Could you share this code with us?

Sorry, misread your message. You are asking how. My first read was how to change the sequence only.
Thermal Ions
Posts: 58
Joined: 2006-12-08 18:19:18
Location: The Land Down Under

Post by Thermal Ions »

I'd previously noticed that there was a "default_cover.jpg" file in the \templates\default\images directory, and had assumed (yeah I know ...) that the template would use this if a cover was not available. Having only just had this situation occur, I have however found this is not the case. Should it work like I was thinking? It's possible that I've broken it fiddling around trying to get my second online db up and running.

Cheers.......Thermal
Thermal's Movie db / TV Series db
Last edited by Thermal Ions on 2007-03-02 16:45:16, edited 1 time in total.
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

Thermal Ions wrote:I'd previously noticed that there was a "default_cover.jpg" file in the \templates\default\images directory, and had assumed (yeah I know ...) that the template would use this if a cover was not available. Having only just had this situation occur, I have however found this is not the case. Should it work like I was thinking? It's possible that I've broken it fiddling around trying to get my second online db up and running.

Cheers.......Thermal
Thermal's Movie db / TV Series db
I've noticed that too and it does work for me either so you've not broken anything :).. nice to see you got yourself onto 110mb.. :)
Thermal Ions
Posts: 58
Joined: 2006-12-08 18:19:18
Location: The Land Down Under

Post by Thermal Ions »

110mb is ok, except that the 50 simultaneous ftp connections gets very annoying at times. :(

I've ended up just saving a little sql script to run each time after uploading that updates the picturename field in the database to point to a copy of the default_cover.jpg I placed into the antexport directory

Code: Select all

update <tablename> set picturename = 'default_cover.jpg' where picturename ='';
Cheers.......Thermal
Thermal's Movie db / TV Series db
Last edited by Thermal Ions on 2007-03-02 16:45:51, edited 1 time in total.
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

Thermal Ions wrote:110mb is ok, except that the 50 simultaneous ftp connections gets very annoying at times. :(

I've ended up just saving a little sql script to run each time after uploading that updates the picturename field in the database to point to a copy of the default_cover.jpg I placed into the antexport directory

Code: Select all

update <tablename> set picturename = 'default_cover.jpg' where picturename ='';
Cheers.......Thermal
Thermal's Movie db / TV Series db
Neat.. i'll have to make use of that one :)

i've done some tweaking to the template.. :)

http://brunesmedia.110mb.com/moviedb3/index.php

Click on a film, i've added the IMDB Trivia
Thermal Ions
Posts: 58
Joined: 2006-12-08 18:19:18
Location: The Land Down Under

Post by Thermal Ions »

Very neat - you're going to make me want to update my db to capture that now :hihi: - I've never thought about importing the Trivia.

Cheers.......Thermal
Thermal's Movie db / TV Series db
Last edited by Thermal Ions on 2007-03-02 16:46:18, edited 1 time in total.
screach
Posts: 25
Joined: 2006-08-07 00:21:50

Post by screach »

kazgor wrote:
Thermal Ions wrote:110mb is ok, except that the 50 simultaneous ftp connections gets very annoying at times. :(

I've ended up just saving a little sql script to run each time after uploading that updates the picturename field in the database to point to a copy of the default_cover.jpg I placed into the antexport directory

Code: Select all

update <tablename> set picturename = 'default_cover.jpg' where picturename ='';
Cheers.......Thermal
Thermal's Movie db / TV Series db
Neat.. i'll have to make use of that one :)

i've done some tweaking to the template.. :)

http://brunesmedia.110mb.com/moviedb3/index.php

Click on a film, i've added the IMDB Trivia
Thank you Kazgor for the new detailed template. I have used your upgrades but am having difficulty with the sub heading #1 (re Comments) as in 'IMDB TRIVIA FOR A SCANNER DARKLY (2006)'. I can't get the sub header to show up.

The other sub header #2 (Actors) 'Starring Roles' works ok, except mine are centered so I'm thinking something to do with css i must be missing to left justify and possibly to create sub header #1, Comments.

Can u point me in some direction. So close yet so far!

Thanks for everything,
John
Thermal Ions
Posts: 58
Joined: 2006-12-08 18:19:18
Location: The Land Down Under

Post by Thermal Ions »

I was wanting to turn
Image
and came across the following option in mdb_config.inc
# EMPTY_CATEGORIES : Boolean : Show or Hide the zero value categories of the Panel.
so changed it to false
$this->config['options']['empty_categories'] = FALSE;
but this made no difference to the output.

I went searching but couldn't actually find where the option is actually implemented in the code or template. Anyone else tried this option and finding the same (non-)effect. I guess it might me that it's there for future implementation or that I've misinterpreted what it's intended to do.

Is mjs around, and able to comment quickly?

Cheers.......Thermal
Thermal's Movie db / TV Series db
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

hi Thermal, looks like thats not been coded yet.

anyway here how you can do it, probably not the best way to do it, just the best way i can think of it from what i can see the code doing.

Edit mbd_panel.inc and in the function recount_categories() near the bottom change it so its looks like.

Code: Select all

        # Finish Up.. Save the Categories
        if ($this->mdb->config['options']['empty_categories'] == FALSE) {
                $categories = $this->empty_categories($categories);
        }
        $this->categories = $categories;
now add the following new function a few lines down.

Code: Select all

    function empty_categories($categories) {
        foreach ($categories as $value => $count ) {
            if (($value != "_ALL") and ($count == 0)  ) {
                unset($categories[$value]);
            }
        }
        return $categories;
    }
that should do the trick, you can switch it on/off via empty_categoties flag... False means hide the zero cats, true=show... well thats how i read the comments to be.
Thermal Ions
Posts: 58
Joined: 2006-12-08 18:19:18
Location: The Land Down Under

Post by Thermal Ions »

Thanks very much kazgor :grinking: Appreciate the quick response. :)

That works beautifully, and gives me a nice clean filtering effect on my TV Series database. I recently changed it to use the Source field to store the Series Name, with the Category field storing the Season Number or 'Movie' for movie spinoff (lifted idea from discussions here). So I now select the Series I'm interested in the top panel box and the second panel box is effectively filtered to show only the seasons available for that series.

This looks a lot cleaner than when I had series and season combined in the one field - the panel box was growing far too long and ugly.

BTW, did you end up looking further afield for free PHP5.x hosting sites (or only as far as 110mb)?

Cheers.......Thermal
Thermal's Movie db / TV Series db
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

have to agree it does look much better hiding all the zero subcats :)

as for other free php5 hosts, check out 8888mb.com they more disk space & bandwidth + 3 databases. had problem trying to load MDB3 onto it though but i was having similar probs with 110mb at the time but never got round to looking at it further.. I think they also have a little 8888mb link at the bottom of your page.

Give it a go and if you get it working let me know :)
fredriksk
Posts: 10
Joined: 2007-03-18 14:17:41

can't se any covers

Post by fredriksk »

I've just installed 3.0 version everything workes except for covers. I'm using the dafault template and antexport param is set like this:

$this->config['options']['cover_dir'] = "antexport/";

If I look in this folder I can find all the jpg files exported from ANT. What can be wrong?
fredriksk
Posts: 10
Joined: 2007-03-18 14:17:41

Post by fredriksk »

oh... just noticed that I'm running 3.0.3 version. Still no images though
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

fredriksk wrote:oh... just noticed that I'm running 3.0.3 version. Still no images though
Hi and welcome, when you right click on the image what does its say in the Path for it?
fredriksk
Posts: 10
Joined: 2007-03-18 14:17:41

Post by fredriksk »

kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

i could be wrong but do did you need to create that WWW directory?

Try this (it might work)

$this->config['options']['cover_dir'] = "www/antexport/";

obviously making sure that the covers are in the antexport directory.
fredriksk
Posts: 10
Joined: 2007-03-18 14:17:41

Post by fredriksk »

Well. I run this on my own Linux server. I did create the www dir and all php script files for pk's moviedatabase is located in this file.

I tried youre suggestion but it didn't work.

Can there be something wrong with the gd lib?

heres some output from phpinfo()

------------ 8< -----------
PHP Version 5.0.4

System Linux andromeda 2.6.13-1.1526_FC4 #1 Wed Sep 28 19:15:10 EDT 2005 i686
Build Date Nov 8 2005 08:28:03
Configure Command './configure' '--build=i386-redhat-linux' '--host=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-pear=/usr/share/pear' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/etc/httpd/conf/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba'
Server API Apache 2.0 Handler
Post Reply