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
Thermal Ions
Posts: 58
Joined: 2006-12-08 18:19:18
Location: The Land Down Under

Post by Thermal Ions »

1. Number of thumbnails

in the cover_view.tpl file add in some extra table cells so you end up with 6 movies instead of 4:

Code: Select all

          # --- RESULTS MOVIES --------------------------
          <div class='movies IMGVIEW curvy1 num_$SHOWING_TOTAL'>
              <div class="bl"><div class="br"><div class="tl"><div class="tr">
                <table cellspacing='0' border='0'>
                {MOVIES}
                  <tr><td>
                    # --- Movie 1 of 4 in row ---
                    <a class='cover' href='$MOVIE[HREF]'>
                      <img src='$TEMPLATEDIR/images/resize.php?img=$UNIXDIR$COVERSDIR$MOVIE[PICTURENAME]&w=75' alt='$MOVIE[FORMATTEDTITLE]' title='$MOVIE[FORMATTEDTITLE]' />
                    </a>
                    
                  </td><td>
                    # --- Movie 2 of 4 in row ---
                    $NEXT_MOVIE
                    <a class='cover' href='$MOVIE[HREF]'>
                      <img src='$TEMPLATEDIR/images/resize.php?img=$UNIXDIR$COVERSDIR$MOVIE[PICTURENAME]&w=75' alt='$MOVIE[FORMATTEDTITLE]' title='$MOVIE[FORMATTEDTITLE]' />
                    </a>
                  </td><td>
                    # --- Movie 3 of 4 in row ---
                    $NEXT_MOVIE
                    <a class='cover' href='$MOVIE[HREF]'>
                      <img src='$TEMPLATEDIR/images/resize.php?img=$UNIXDIR$COVERSDIR$MOVIE[PICTURENAME]&w=75' alt='$MOVIE[FORMATTEDTITLE]' title='$MOVIE[FORMATTEDTITLE]' />
                    </a>
                  </td><td>
                    # --- Movie 4 of 4 in row ---
                    $NEXT_MOVIE
                    <a class='cover' href='$MOVIE[HREF]'>
                      <img src='$TEMPLATEDIR/images/resize.php?img=$UNIXDIR$COVERSDIR$MOVIE[PICTURENAME]&w=75' alt='$MOVIE[FORMATTEDTITLE]' title='$MOVIE[FORMATTEDTITLE]' />
                    </a>
                  </td><td>
                    # --- Movie 5 of 4 in row ---
                    $NEXT_MOVIE
                    <a class='cover' href='$MOVIE[HREF]'>
                      <img src='$TEMPLATEDIR/images/resize.php?img=$UNIXDIR$COVERSDIR$MOVIE[PICTURENAME]&w=75' alt='$MOVIE[FORMATTEDTITLE]' title='$MOVIE[FORMATTEDTITLE]' />
                    </a>
                  </td><td>
                    # --- Movie 6 of 4 in row ---
                    $NEXT_MOVIE
                    <a class='cover' href='$MOVIE[HREF]'>
                      <img src='$TEMPLATEDIR/images/resize.php?img=$UNIXDIR$COVERSDIR$MOVIE[PICTURENAME]&w=75' alt='$MOVIE[FORMATTEDTITLE]' title='$MOVIE[FORMATTEDTITLE]' />
                    </a>
                  </td></tr>
                {/MOVIES}
                </table>
                <div class='err err_$SHOWING_TOTAL'>No movies found with selected criteria.</div>
              </div></div></div></div>
              <div class="iefix"> </div>
          </div>
or better still use the replacement code posted above by kazgor which will auto adjust the number displayed to the available width.

2. Change possible number of thumbnails

posted above by kazgor - change config.inc that appears in your template folder to read:

Code: Select all

$this->template['views']['IMGVIEW']['title']          = "Covers"; 
$this->template['views']['IMGVIEW']['filename']       = "cover_view.tpl"; 
$this->template['views']['IMGVIEW']['npps']           = array(24, 36, 48); 
$this->template['views']['IMGVIEW']['default_npp']    = 36; 
3. Get cover view to open by default

change config.inc that appears in your template folder from:

Code: Select all

$this->template['options']['main_tpl']   = "MAINVIEW";
to

Code: Select all

$this->template['options']['main_tpl']   = "IMGVIEW";
Cheers...........Thermal
http://thermal-ions.net/
Thermal Ions
Posts: 58
Joined: 2006-12-08 18:19:18
Location: The Land Down Under

Post by Thermal Ions »

OK, who's playing funny buggers with me - the questions I just finished answering have disappeared now :cry:
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

kazgor wrote: weird... do you know what "short Open Tag" actually does? (may haveto look it up myself)
short open tag: "<?" followed by PHP code is allowed
if that "option" is not enabled, you have to used "<?php" before the PHP code
blue334
Posts: 11
Joined: 2007-02-08 18:08:48

Post by blue334 »

Svampen wrote:Awarspace doesn't like this template anymore :( If you go to 'next' page, it just throws you to awardspace.com.
Awardspace is fine, they just updated their word filter. If a page rendered with this template contains a filtered word, it throws you to awardspace.com.

Remove or replace instances of the word "porn" in your catalog, chances are it will work fine after that (there are other filtered words of course, but they are less likely to occur in movie descriptions/titles)
bbdoc
Posts: 93
Joined: 2003-10-01 20:49:23

Post by bbdoc »

Hi,

One more question... Is it possible to manage multiple DBs with this script (change from one DB to another, without having to build 2 different websites) ?

From what I can see, this shouldn't be very complicated, it's just changing the table name in the mdb_config.inc file (have the user choose the table name instead of having it in the config). Both tables could even be in the same Mysql DB!, but I don't know ig this has been done...

Thanks
rpm
Posts: 7
Joined: 2007-05-15 20:05:10

Year LIst

Post by rpm »

in the blocks of the left columns i have one fill it by years of the movies, the thing is that only shows up to the last 10 years, and the rest don't show.

Any ideas on how to fix this ?

Thanks
gandalf
Posts: 6
Joined: 2007-04-12 13:36:07

Post by gandalf »

year groups are not shown if they contain less than a prefixed number of movies (default should be 4 or 6, but you can change this).
Maybe you don't have so many movies older than 10 years?
rpm
Posts: 7
Joined: 2007-05-15 20:05:10

Post by rpm »

i have movies that have more than 10 years, for example....i have this list of movie's years shown in the block

1994
1995
1998
1999
2001
2002
2003
2004
2005
2006

when in fact i have movies older than 1994. How can i change to PKMovie show all the years...?

Thanks
gandalf
Posts: 6
Joined: 2007-04-12 13:36:07

Post by gandalf »

the list should be

2006
2005
2004
.
.
.
1994
Other

"Other" contains all other movies which have a year of production which is not listed because you have to few movies of that year.

You can change the threshold in config.inc

Code: Select all

$this->config['panels'][5]['dbfield'] = "YEAR";
$this->config['panels'][5]['display'] = TRUE;
$this->config['panels'][5]['minimum'] = 4; 
change the minimum value "4" to what you want. If you set it to 1, there would be a year entry in the list even if you have just one movie for a particualr year.
rpm
Posts: 7
Joined: 2007-05-15 20:05:10

Post by rpm »

thanks !!!!

it worked !!

It was so easy...damn....

Thanks for everthing....

Cheers
blue334
Posts: 11
Joined: 2007-02-08 18:08:48

Post by blue334 »

I brushed up my db with a custom color scheme. If anyone wants the stylesheet and gifs, pm me (I didn't update the imdb images though, I don't use them)

http://blue334.awardspace.com
rpm
Posts: 7
Joined: 2007-05-15 20:05:10

Post by rpm »

i like the thing you do with the imdb logo, can you send me how you do it?

thanks...
dragon1981
Posts: 2
Joined: 2007-06-02 16:02:17

Post by dragon1981 »

xbirdtrip wrote:
lestatou wrote:Thanks xbirdtrip

If I choose this view

http://lestatou.awardspace.com/index.php?view=LISTVIEW

it shows original title. I suppose that I can change it at files tpl... I'll take a look after launch, tranks again.

PD: i have no idea about php, jeje
In list_view.tpl

Line 111 replace

Code: Select all

<th class='title'>$LANG[ORIGINALTITLE]</th>
By

Code: Select all

<th class='title'>$LANG[TRANSLATEDTITLE]</th>
Line 119 replace

Code: Select all

<td class='title'><a href='$MOVIE[HREF]'>$MOVIE[ORIGINALTITLE]</a></td>
By

Code: Select all

<td class='title'><a href='$MOVIE[HREF]'>{TRANSLATEDTITLES;3}$TRANSLATEDTITLE[TITLE] $TRANSLATEDTITLE[PAREN]{/TRANSLATEDTITLES}</a></td>
Line 125 replace

Code: Select all

<td class='title'><a href='$MOVIE[HREF]'>$MOVIE[ORIGINALTITLE]</a></td>
By

Code: Select all

<td class='title'><a href='$MOVIE[HREF]'>{TRANSLATEDTITLES;3}$TRANSLATEDTITLE[TITLE] $TRANSLATEDTITLE[PAREN]{/TRANSLATEDTITLES}</a></td>
And read your PM please ;)
Hi, this solution work fine and it's great for me. How can I change also the Originaltitle/Translatedtitle for detail_view.tpl?
xbirdtrip
Posts: 38
Joined: 2003-05-01 19:00:04
Contact:

Post by xbirdtrip »

dragon1981 wrote:Hi, this solution work fine and it's great for me. How can I change also the Originaltitle/Translatedtitle for detail_view.tpl?
Look here : viewtopic.php?p=22246#22246
My modifications are originally made for detail_view.tpl ;)
dragon1981
Posts: 2
Joined: 2007-06-02 16:02:17

Post by dragon1981 »

I had not seen. Thank you very much! :)
Caveman
Posts: 7
Joined: 2005-03-14 08:38:06

Post by Caveman »

I know this is a template for more experianced users but it looks so good... ;) I can't get it to work, i tried to follow the instructions but i think i got lost somewhere. I asumed that you only have to fill in the following lines in mdb_config.inc

Code: Select all

$this->config['mysql']['server']    = "[b]<server>[/b]";
$this->config['mysql']['username']  = "[b]<username>[/b]";
$this->config['mysql']['password']  = "[b]<password>[/b]";
$this->config['mysql']['database']  = "[b]<dbname>[/b]";
$this->config['mysql']['table']     = "[b]<tbname>[/b]";
and then copy everything to your webserver, (i've got php and mysql running) and then open "myhost"/mdb3.php and everything with that sql thingies would go automaticly ?

But i got the following message when i open my webpage:

Code: Select all

SELECT SOURCE,count(*) FROM `movies.sql`.`movies` GROUP BY SOURCE ORDER BY SOURCE

Invalid Query: Incorrect table name 'movies'
I'm sure that the table in the sql file is called "movies". I even took a look with notepad and this the beginning:

Code: Select all

DROP TABLE IF EXISTS movies;
CREATE TABLE movies (NUM IN
I hope somebody can help me, i took a look at all 13 pages of this topic but i'm absolutly not a "wizkid" and got lost in all the codes written :??:
Thermal Ions
Posts: 58
Joined: 2006-12-08 18:19:18
Location: The Land Down Under

Post by Thermal Ions »

@Caveman
Are you hosting it on your local PC, or thru a hosting site on the web, if so which one?

A couple of things to check:

- Do you have the server name correct? Depending upon the setup it may have to be "localhost".
- Does your webhost add a prefix to the username and database name you entered during setup?
- If you manually import the movies.sql file into your database first and then open index.php does it work? This would indicate it can access the database ok and the issue is only with the auto import part - had this problem on a server I was using once.

Cheers.......Thermal
Thermal's Movie & TV Series db
Caveman
Posts: 7
Joined: 2005-03-14 08:38:06

Post by Caveman »

Thermal Ions@Caveman
Are you hosting it on your local PC, or thru a hosting site on the web, if so which one?
Well i'm hosting it tru my Freecom Storage Gateway (witch should give full php and sql support)
A couple of things to check:

- Do you have the server name correct? Depending upon the setup it may have to be "localhost".
Yes servername is correct.
- Does your webhost add a prefix to the username and database name you entered during setup?
No
- If you manually import the movies.sql file into your database first and then open index.php does it work? This would indicate it can access the database ok and the issue is only with the auto import part - had this problem on a server I was using once.
Well, i was trying to avoid that, i've absolute no experiance with mysql. But after some reading, i tried to give it a go.
I managed to create a new database and all i had to do is import sql file that AMC created. That didn't went very well, in fact it didn't import anything. After some more reading and throwing some stuff around in my room, it seemed that the import limit is 2 MB :angry: I made a selection of my data of AMC (about a 100 movies) and that went very well, in fact the whole thing is running now. :)

I still have to figure out if i can import my complete database of AMC into mysql, maybe i have to do it in parts. I hope that the limit of the whole database isn't 2MB for mysql, otherwise i've got a problem.

THX Thermal !
J.P.
Posts: 64
Joined: 2006-09-20 09:55:52

Post by J.P. »

Can someone tell what to change so that the subtitels are seperated when i click on it.
I want it like the actors.
Lool on www.palmans.net/dvdlijst and you see what i mean.
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

J.P. wrote:Can someone tell what to change so that the subtitels are seperated when i click on it.
I want it like the actors.
Lool on www.palmans.net/dvdlijst and you see what i mean.
Hi J.P.

i would have said is this field in MDB_CONFIG.INC

$this->config['options']['comma_seperated']

ie mine looks like

$this->config['options']['comma_seperated'] = array("COUNTRY", "TRANSLATEDTITLE", "DIRECTOR", "PRODUCER", "CATEGORY", "ACTORS", "LANGUAGES", "SUBTITLES");

so i'd expect subtitles that have commas inthem to be seperated like the Actors are.

can't test this though at the moment.
Post Reply