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
Vinch
Posts: 2
Joined: 2007-10-02 09:58:51

Post by Vinch »

Tout d'abord un grand merci pour ton aide.

J'ai supprimé tout les fichiers de mon ftp pour reprendre le tout a 0 et malgré ca je me retrouve avec le meme probleme ( les images ne s'affichent toujours pas :cry: ).

La connexion a la base sql ainsi que l'importation des données se passe bien le fichiers "processPeriod.php" me retourne bien un message positif mais aucune cover affiché. ( http://vinch-movie.ifrance.com/index.php )

Si tu as un peu de temps a me consacrer voici mon adresse msn : chichouz@msn.com" et sinon je reste disponible via le forum.

Merci d'avance

Vinch
Last edited by Vinch on 2007-10-04 14:36:56, edited 1 time in total.
pheonix
Posts: 9
Joined: 2006-07-12 08:46:28

Post by pheonix »

un grand merci pour votre aide mais pas moyen d'y arriver peut ton nous faire un tuto en francais et du depart merci bien a vous :grinking:
pollewops
Posts: 52
Joined: 2006-04-05 19:51:38

Post by pollewops »

Please please make your replies in ENGLISH !!!!!
lestatou
Posts: 25
Joined: 2006-10-28 20:45:45

Post by lestatou »

Delete this post, I can't.

Sorry
Last edited by lestatou on 2007-10-25 17:23:19, edited 1 time in total.
lestatou
Posts: 25
Joined: 2006-10-28 20:45:45

Post by lestatou »

Hi, I have modified my php v3 with several changes made by ty3001, NicolasR, and others...

Now I have some problems:

My List: http://lestatou.awardspace.com/



1- I modified details.tpl to include image of imdb/rating. But I want to see above the cover, centered, is possible?

Here is the code of details.tpl

Code: Select all

# --- RESULTS MOVIES --------------------------
    <div class='movies DETAILS'>
      {MOVIES}
        <div class='movie num_$MOVIE[NUM] curvy1'>
          <div class="bl"><div class="br"><div class="tl"><div class="tr content">
            <table cellpadding='0' cellspacing='0' border='0'><tr><td class='images' valign='top'>
              <img src='$TEMPLATEDIR/images/resize.php?img=$UNIXDIR$COVERSDIR$MOVIE[PICTURENAME]&w=180' alt='$MOVIE[FORMATTEDTITLE]' title='$MOVIE[FORMATTEDTITLE]'/></a>
	    <div class='imdb'><a class='rating_$MOVIE[RATING]' href='$MOVIE[URL]'><span>$MOVIE[RATING]</span></div>

            </td><td class='details' valign='top' width='100%'>

              <div class='num'>$MOVIE[NUM]</div>
		 
	      			  <div class='title'>{TRANSLATEDTITLES;3}$TRANSLATEDTITLE[TITLE] $TRANSLATEDTITLE[PAREN]{/TRANSLATEDTITLES}</div>
              <div class='translated'>$MOVIE[ORIGINALTITLE]</div>
              <div class='description'>$MOVIE[DESCRIPTION](100000)</div>
              <table cellspacing='0' border='0' class='alignementgauche' >

                </tr>


2- In mode list view it shows original title. I suposse that it is determined by list_view.tpl, but if I change ORIGINALTITLE for TRANSLATEDTITLE, it doesn't runs correctlyl.


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



Here is the code on list_view.tpl:

Code: Select all

# --- RESULTS MOVIES --------------------------
          <div class='movies LISTVIEW curvy2 num_$SHOWING_TOTAL'>
            <div class="bl"><div class="br"><div class="tl"><div class="tr contents">
              <table cellspacing='0' border='0'>
                <tr>
                  <th class='num'>$LANG[NUM]</th>
                  <th class='title'>$LANG[TRANSLATEDTITLE]</th>
                  <th class='country'>$LANG[CATEGORY]</th>
                  <th class='year'>$LANG[YEAR]</th>
                  <th class='rating'>$LANG[COUNTRY]</th>
                </tr>
                {MOVIES}
                  <tr class='movie odd'>
                    <td class='num'>$MOVIE[NUM]</td>
    		    <td class='title'><a href='$MOVIE[HREF]'>$MOVIE[ORIGINALTITLE]</a></td>
                    <td class='category'><a href='$MOVIE[COUNTRY_HREF]'>$MOVIE[CATEGORY]</a></td>
                    <td class='year'><a href='$MOVIE[YEAR_HREF]'>$MOVIE[YEAR]</a></td>
                    <td class='country'><a href='$MOVIE[COUNTRY_HREF]'>$MOVIE[COUNTRY]</a></td>
                  </tr><tr class='movie even'>$NEXT_MOVIE
                    <td class='num'>$MOVIE[NUM]</td>
                    <td class='title'><a href='$MOVIE[HREF]'>$MOVIE[ORIGINALTITLE]</a></td>
                    <td class='category'><a href='$MOVIE[COUNTRY_HREF]'>$MOVIE[CATEGORY]</a></td>
                    <td class='year'><a href='$MOVIE[YEAR_HREF]'>$MOVIE[YEAR]</a></td>
                    <td class='country'><a href='$MOVIE[COUNTRY_HREF]'>$MOVIE[COUNTRY]</a></td>
                  </tr>
                {/MOVIES}
              </table>
              <div class='err err_$SHOWING_TOTAL'>Aucun film trouvé avec les critères selectionnés : Vérifier les catégories croisées !.</div>
            </div></div></div></div>
            <div class="iefix"> </div>
          </div>
I also want to align to left "Ficha técnica" and "actors", but I don't know the command to do this.

Code: Select all

<table cellspacing='0' border='0' class='alignementgauche' >
</tr>
<th>Ficha Técnica</td>
                  <th>                             </td>
                </tr>
                <tr>
Role is not important for me

Code: Select all

<table cellspacing='0' border='0' class='alignementdroite'>
                 <tr>
                  <th>$LANG[ACTORS]</td>
    #   <th>$LANG[ROLE]</td>
                </tr>
              {ACTORS}
                <tr>
                  <td valign='top' class='actorname'><a href='$ACTOR[HREF]'>$ACTOR[NAME]</a></td>
                  <td valign='top' class='actorrole'> $ACTOR[PARENTXT]</td>
                </tr>
              {/ACTORS}
              </table>
            </td></tr></table>

THANK YOU VERY MUCH.

GREAT JOB FRIENDS.
MJL
Posts: 4
Joined: 2007-11-07 14:57:27

Post by MJL »

have a little problem..

I have my database in Czech language but on my page with this program it shows bad letters do I need only to change in index.php that charset=iso-8859-1 to my language (which I dont know:( or there is problem that I imported my database with word check option utf8 ?
antp
Site Admin
Posts: 9629
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

You have to use iso-8859-2, I think
But this depends on what kind of "bad letters" you have
If you have 2 characters instead of each accentuated one, it is a problem due to UTF8
MJL
Posts: 4
Joined: 2007-11-07 14:57:27

Post by MJL »

I used option iso-8859-2 but no result
then I tried windows 1250 and was some success but there are still some (not many but still) question marks where should be some cz words...

check my site and pls try to help

http://prcino.uvadi.cz/

also I tried to load sql database in windows 1250 too and in phpadmin I see all czech like it has to be... SO it REALLY seems to be problem of this PHP script to not show exactly what is in database even with correct charset in index.php which is windows-1250

so on page even with that windows 1250 character set in mozzila enabled I cant seee it all CZ :(

and some more problems.. search cant find anything and menu on left with categories like action horror etc doesnt work too.. it shows right numbers but when I click it it will say no results found :(
MJL
Posts: 4
Joined: 2007-11-07 14:57:27

Post by MJL »

some1 gave me a hint to insert into your php program every time after database will be open

mysql_query("SET NAMES 'cp1250'") or die('Could not set names');

any chance guys u know where exactly this to put to have correct character set on my pages ?

would be coll add this option to config.inc to set charset I want to use...

pls I am glad for any help
MJL
Posts: 4
Joined: 2007-11-07 14:57:27

Post by MJL »

ok I just removed all diacritics from my page so it runs as it suppose to...

but have 1 problem that still bothering me...


search working only if I match capital letter I want it to work to words wihtout capital match...

and if I have some actor who is like carrie-ann moss it will never find her or sort because of that "-" in the name. I triedl load SQL db in many fromats starting from UTF and tested all formats and still this dont work :(

PLS HELP
Antuan
Posts: 4
Joined: 2007-10-06 12:07:01

Post by Antuan »

mjs7231 wrote:Sometime I will get my new website up an running. I am dropping client work for a while too, which means as soon as I take this GRE, I will have all sorts of free time to make Version 4.
Will be the PK version 4.x a gift to this next Christmas? :rolleyes:
to all great work, thanks.
SilverDream
Posts: 15
Joined: 2007-12-03 19:17:25

Post by SilverDream »

Bonjour et merci pour ce superbe template... (and sorry, but my english is not well enough to write in english)


Je l'ai installé et testé sur mon compte free et tout va bien sauf...

...sauf la mise à jour de ma liste via la fonction "update à la place de insert".


J'ai bien coché uniquement le nouveau film à ajouté, et lorsque je fait un update et que j'exporte en sql, le fichier est créé, je l'upload par ftp sur mon compte free et quand je vais voir ma liste, le film n'a pas été rajouté...

C'est à n'y rien comprendre, j'ai absoluement tout testé et là je deviens presque fou, car j'ai réussi à modifié pas mal de chose dans le template, mais là je bloque et je ne sais plus quoi faire...

Est-ce que quelqu'un peut me donner la marche à suivre très précise ou un lien vers un tuto pour ce template svp ??

Merci d'avance...
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

MJL wrote:if I have some actor who is like carrie-ann moss it will never find her or sort because of that "-" in the name. I triedl load SQL db in many fromats starting from UTF and tested all formats and still this dont work :(

PLS HELP
Little late but the quicky fix is to trick the search routine so that it adds a space infront of the - sign, so inyour example

searching for Carrie-ann will be found, but Carrie -ann will find all movies with Carrie in it and that does not contain Ann.

edit MDB3.PHP and find function _subwhere_search($sql, $ignore_field)

edit the following line

$ignorechars = array("+", "-");

just stick a space infront of the - sign, eg

$ignorechars = array("+", " -");

hope that helps, this function could be tweaked further but that will get you going for now
DerWolf
Posts: 2
Joined: 2007-12-20 20:11:08

Problem with IMDB pictures

Post by DerWolf »

Hi all,

on my site (http://filmdb.yourftp.de/index.php) the pictures of the imdb ratings are only displayed, if the movie has a rating with ,0

Could you please help me?

Thanks in advance
fl0yd
Posts: 6
Joined: 2008-01-03 18:12:58

Post by fl0yd »

First of all thank you very much for this great template and for all the contributions and modifications. :grinking:

I made my own changes and included many of the ideas posted in this thread.
You can grab a copy of my version at http://people.freenet.de/fl0yd/moviedb_ ... 080103.zip


Changes in detail:
  • mdb_movie.inc: 'Rating1' patch
    Added additional template variable MOVIE[RATING1] which holds the rounded value of "RATING". This variable is used in detail_view.tpl and details.tpl to display the stars for the IMDB rating.
    Your rating can therefore be floating point numbers and you still get the stars.


    mdb_movie.inc: 'Translatedtitle' patch
    I also added MOVIE[TRANSLATEDTITLE] as template variable which holds the complete translated title in the same way the oritinal title is stored. detail_view.tpl and details.tpl use this variable to display the translated titel as subtitle.


    mdb_panel.inc: 'Empty categories' patch (Thanks kazgor)
    The function blank_categories() removes empty categories from the panels. The new configuration option "empty_categories" must be set to "FALSE" for this feature to work.


    mdb3.php: '5 Random Movies' patch (Thanks kazgor)
    The function _random_films() randomly picks 5 movies from the database and stores it in the template RNDFILMS. The movies are shown in detail_view.tpl.
    Note: I used mt_rand() instead of rand().


    mdb3.php: 'Period' patch (Thanks ty3001 and Nicolas R)
    If also included the period patch which enables to categorize the movies by time period and not only by date. The necessary functions are now included in mdb3.php and run from the function _auto_import_ant_export(). Everytime a new sql file is imported into the database (given the auto import option is enabled) the period colum will also be updated.
    No need to manually run a script anymore.


    style.css:
    The colors and design is almost the same as in mjs7231's fantastic original version except for:
    * Removed blue border from images
    * Reduced thickness of visible border around images
    * Removed hover effect fro images in details_view
    * Moved quickinfo to the right
    * Moved IMDB stars to the left
    * Added additional styles for random movies box


    config.inc, cover_view.tpl:
    The cover view displays now 5 instead of 4 images. I stayed with the original implementation as the simplified version suggested by kazgor caused problems with Firefox.


    detail_view.tpl:
    As stated above the detail_view.tpl includes the Random Movie feature. Here I also implemented the original way of posting multiple images as the simplified version again caused problems with Firefox.


    Language files:
    I included all language file posted in this thread which are (beside english.inc):
    * french.inc (from Nicolas R)
    * german.inc
    * italian.inc
    * spanish.inc
    * polish.inc
    Each language file includes two new variables "RANDOMMOVIES" and "PERIOD" (but they are mostly not translated). These variables are needed for the Random Movies patch and the Period patch.


    index.php:
    The layout is almost the same, except the width was changed from 650px to 690px


    IMDB Images:
    I replaced the IMDB images with J.P.'s version, thanks for that.
Have fun!
Feedback appreciated.

PS: I would really like to see v3.0.4 with the page-number patch ...
fl0yd
Posts: 6
Joined: 2008-01-03 18:12:58

Post by fl0yd »

http://people.freenet.de/fl0yd/moviedb_ ... 080105.zip
  • - Random Movies should now be unique
    - Random Movies will also be shown if search result is empty
    - Added favicon.ico
    - Tweaked details.tpl a little bit
    - Fixed error in german language file
Update: Version is buggy, see below...
Last edited by fl0yd on 2008-01-06 20:52:27, edited 1 time in total.
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

Hi Floyd,

Nice work pulling in some of the mods from this huge thread.. we sure enjoyed (well i have) modding this excellent script.

Like the presentation, very clear and neat how you've explained what you've added.

I'd say the only thing i dont like and it more my own preference is the single pixel border around the film covers... and the on hover not working in detail_view but working on the Random films. but thats just me.

I've been meaning to figure a nice way to make the random film not repeat and your way is very elegant and simple. :-) i'll be adding that to my own page soon.

I never use Firefox, but i did do and see what u mean about the Random films going all screwy in it.. grr (hate the thing).. but it was easily solved by puttting the Div inside a Table cell. Still need to do the same for the Full Covers view which should get rid of the need to just limit to 5 films per row.

Advantage being is you can increase the width of the main page and the films covers will adjust to fit.

I did make once change to Floyd's mdb_config.inc file.. i added the COUNTRY field to the "comma_seperated" array.

For those wanted to see Floyd Mod its Here

Here's my current site with all the mods i've done --> Here

still a few bits and pieces i'd like to tweak, including the list view which i just find ugly.

Kz.
fl0yd
Posts: 6
Joined: 2008-01-03 18:12:58

Post by fl0yd »

Very, very nice to see both versions side by side.

I was torn to remove the hover effect or let it in .. so I did both ;) .
But this can easily be changed in the style.css.
The code for the detail_view is only commented out (just remove the /* and */).

Code: Select all

/*#mdb .movies A.cover:hover      { border: 2px solid #446476; padding: 2px; }*/
The border and padding directives are responsible for the thickness of the frame.
I just didn't like the one pixel space between the bottom of the image and the frame (which not appears with Firefox) so I changed the thickness of the frame.

But I'm not satisfied with my details template, yours looks much better ...

One other thing I'm thinking of is to change the language on the fly. Would probably be nice for foreign visitors.
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

fl0yd wrote:I just didn't like the one pixel space between the bottom of the image and the frame (which not appears with Firefox) so I changed the thickness of the frame.

One other thing I'm thinking of is to change the language on the fly. Would probably be nice for foreign visitors.
Thats one thing that does annoy me that blank spacing at the bottom, oddly its doesn't happen in the detail view, so must be something to do with the size or not..lol..

On the Fly language change and maybe even Colour scheme is really the next big change the template needs to make give it that extra little spark.. have to say so far im useless at doing this..


Incidently, remind me of that search bug problem, i fancy having a look at it and see if i can figure it out :)
fl0yd
Posts: 6
Joined: 2008-01-03 18:12:58

Post by fl0yd »

Unfortunately the version from yesterday has a nasty and dumb bug. If you have less then 5 movies in the database the scripts loops indefinitely. :badidea:


While debugging this I learned that the index numbers of the movies are not necessarily sequentially from 1 to $number_of_movies, so I fixed this too (but the displayed movies are still unique).

The number of random movies to display is now an option in mdb_config.inc called

Code: Select all

$this->config['options']['random_movies'] = 5;
I also could simplify the layout for the random movies in detail_view.tpl.

One other change: The functions _checkIfColumnExists() and _createColumn() have been renamed and moved to mysql_db.inc (where they belong).

There is still one problem, if you display like only 4 random movies the border around the images scales with the table .. must be somewhere in the css definition. :/


Get the latest version here: http://people.freenet.de/fl0yd/moviedb_ ... 080106.zip
Post Reply