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
sandmanweb
Posts: 96
Joined: 2006-03-12 01:07:41

Post by sandmanweb »

the preview is really slow to load...
blue334
Posts: 11
Joined: 2007-02-08 18:08:48

Post by blue334 »

This template won't load in IE8 standards mode (the default mode). I've found the search box is the culprit. Some small changes in details_view.tpl fixes the problem to a certain degree (trial and error solution, a proper fix by someone who knows what they're doing would be welcome)

Replace existing code with this if you need this fix now:

Code: Select all

  # --- SEARCH and TITLE ----------------
  <div class='mainheader'>
		<form name="mdb_search" action="$SEARCH_HREF">	
		<div class='searchbox'>
        <input class='searchbox' type='text' name='search' value='$SEARCH_TEXT'/>
		</div>
        $HIDDEN_SEARCHINPUTS
		<div class='searchbox'>
        <a href='$CLEARSEARCH_HREF'><img src="$TEMPLATEDIR/images/search-right.gif" border="0" alt='$LANG[CLEARSEARCH]' title='$LANG[CLEARSEARCH]' /></a>
		</div>
	  </form>
    <h3><a href='$HTTPPATH'><span>$TITLE</span></a></h3>
  </div>

Some smaller problem remain in standards mode, but these could also be caused by bugs in IE8 (page renders correctly in IE8 Compatibility mode, IE7, FF, Chrome, Opera)

Remaining problems shown here:
ImageImage
sandmanweb
Posts: 96
Joined: 2006-03-12 01:07:41

Post by sandmanweb »

Can someone give me an hint about this ?

I want to add page selection in this template.
So someone can click on page 2,3,4,5,6 directly.

Does someone knows how this could be done ?
sandmanweb
Posts: 96
Joined: 2006-03-12 01:07:41

Post by sandmanweb »

I would also like to see my comments and ratings modification integrated in the main MoviePK template.


I don't really know how to do this...


For the pages links I tought about this:

There is a variable in MoviePK that displays the total number of pages.

We could use this number to generate the link.

Since each page is chosen by the GET variable "?page=" in the URL, we could generate links with variables: ?page=1, ?page=2, ?page=3, etc until max number of pages.

I tought about a pull down menu that could be displayed just below the page selection (prev. next) and on the right of Num/Page pull down menu.

I hope someone can help me with this.

This forum seems inactive in the previous months...


Je peux en parler en français aussi ;)
ziom :]
Posts: 1
Joined: 2008-12-22 15:16:20

Post by ziom :] »

Hi.
What I should do in details.tpl to use function include? When I use that in normal way its get ignore, and its not displaying.
baton1
Posts: 1
Joined: 2008-12-25 17:28:33

charset

Post by baton1 »

I have a problem with polish letters. I succesfully upload mysql to phpmyadmin (i see there all polish letters), but when accessing it as normal website i see some strange things in place of polish letters. I tried to change charset to iso 8859-2, windows 1250, utf8 (always with apropriate codeing in database) and it doesn't work. What should i do? Is there any changes needed in some file (i changed only index.php). The template is great but it seems as some problem to me. Please help

[edit]
I found out that adding this:
SET CHARACTER SET latin2;
SET collation_connection = latin2_general_ci;
should help with this problem but i don't have any idea where should it be?
ToastSavy
Posts: 6
Joined: 2006-10-23 10:18:54

Where to download the latest version

Post by ToastSavy »

Hi all,

I am really interested in using this template but so much work seems to have been since the original version that I was hoping that one of you could tell me where I can download an up-to-date version with all these great fixes/extra features?

Thanks,
Toasty
darkemi20
Posts: 9
Joined: 2008-03-21 16:59:13

Post by darkemi20 »

Hola estoy trabajando en una mejora.... La idea es que tome... Las fechas de AGREGADA las peliculas para tildar valor de MES+AÑO
ejemplo:
AGREGADA el DIA 05 del MES 06 del AÑO 2007 ponga el valor JUNIO 2007 y asi hacer un panel que llame las novedades por MES.... SE ENTIENDE ¿?

Usando el script de PERIODO, logre que funcione pero mal... ME y a ver si me ayudan... Lo que hace es pone Primero el que aparece a todos...
EJEMPLO:
TENGO UNA DE dia 05 mes 06 año 2007 y otra de dia 09 mes 06 año 2008
PONE EN AMBAS JUNIO 2007

Aca va el script a ver si me ayudan....

_______________________________________________________

Hi I'm working on an improvement .... The idea is to take ... Add the dates for films tick value + MONTH YEAR
example:
Add DAY 05 of the 06-MONTH YEAR 2007 JUNE 2007 put the value and thus make a new panel to call for the MONTH .... ARE?

Using PERIODO script, make it work ... but wrong ME and help me to see if ... What it does is put the first appearing at all ...
EXAMPLE:
HAVE A day 05 months of 2007 and another 06 years of day 09 months 06 years 2008
BOTH PUT IN JUNE 2007

Here is the script to see if they help me ....

________________________________________________________

Code: Select all

<?

require_once(dirname(__FILE__).'/mysql_db.inc');

$processMensual = new processMensual();

?>

<html>
<head> <title>Process Mensual For Movies</title>
</head>

<body>
  <?php $processMensual->process(); ?>   


</body>
</html>

<?php

class processMensual {
   
   function processMensual()
   {
      //constructor
      
   }
   
   function process()
   {
      
      $this->_load_configuration();
      
      //print $this->checkIfColumnExists();
      
      if ($this->checkIfColumnExists())
      {
         
         //print "Column found.";
      
      }
      else
      {
         $this->createColumn();
         $this->processMensualForMovies();
         
         print "<br>Mensual processed for all movies.";
      }
      
   }
   
   
   
    
   
function _load_configuration() {

        # Load the Main Configuration; Set the MySQL variables.

        require_once(dirname(__FILE__)."/mdb_config.inc");

        $this->template_path = dirname(__FILE__)."/templates/".$this->config['options']['template'];

        $this->db = new mysql_db($this->config['mysql']['server'], $this->config['mysql']['username'], $this->config['mysql']['password']);

        $this->mysql_table = "`".$this->config['mysql']['database']."`.`".$this->config['mysql']['table']."`";

        # Load the Language and Template Configurations

        //require_once(dirname(__FILE__)."/languages/".$this->config['options']['language'].".inc");

        //require_once($this->template_path."/config.inc");

    }
   
function checkIfColumnExists()
{
   
   $query = "SHOW columns FROM $this->mysql_table ";
   
   $result = $this->db->query($query);
   
   while ( $row = $result->fetch_array() )
   {
      //print "<br>$row[0]";
      if ($row[0]=='MENSUAL'){
         print "<br>Columns Found ";
               
         
         return true;
      }
   }
   
   print "<br>Column not Found!";
      
   return false;
      
   
}

function createColumn()
{
   $lsSQL = "ALTER TABLE $this->mysql_table ADD MENSUAL VARCHAR(15)";
   
   $updateresult = $this->db->query($lsSQL);
   
   print "<br>Column MENSUAL created!";
   
}
   

function processMensualForMovies()
{


   $query = "SELECT NUM, DATE_FORMAT(dateadd,'%M %Y') 'mensual' FROM $this->mysql_table";
      
   $result = $this->db->query($query);
   

   
   while ( $row = $result->fetch_assoc() )

    {

      $mensual='';
      $y = $row[mensual];


          if ($y = 'December 2007') {
          $mensual="December 2007";
      }
	  elseif ($y = 'December 2008') {
          $mensual="December 2008";
      }
      elseif ( $y >= 'November 2007' ) {
          $mensual="November 2007";
      }       
      elseif ( $y >= 'Octuber 2007' ) {
          $mensual="Octuber 2007";
      }       
      elseif ( $y >= 'September 2007' ) {
          $mensual="September 2007";
      }       
      elseif ( $y >= 'August 2007' ) {
          $mensual="August 2007";
      }       
      elseif ( $y >= 'July 2007' ) {
          $mensual="July 2007";
      }       
      elseif ( $y >= 'June 2007' ) {
          $mensual="June 2007";
      }       
      elseif ( $y >= 'May 2007' ) {
          $mensual="May 2007";
      }
      elseif ( $y >= 'May 2007' ) {
          $mensual="May 2007";
      }       
      elseif ( $y >= 'April 2007' ) {
          $mensual="April 2007";
      }   
      elseif ( $y >= 'March 2007' ) {
          $mensual="March 2007";
      }    
      elseif ( $y >= 'February 2007' ) {
          $mensual="February 2007";
      }    
      elseif ( $y >= 'January 2007' ) {
          $mensual="January 2007";
      }
      elseif ($y >= 'December 2008') {
          $mensual="December 2008";
      }
      elseif ( $y >= 'November 2008' ) {
          $mensual="November 2008";
      }       
      elseif ( $y >= 'Octuber 2008' ) {
          $mensual="Octuber 2008";
      }       
      elseif ( $y >= 'September 2008' ) {
          $mensual="September 2008";
      }       
      elseif ( $y >= 'August 2008' ) {
          $mensual="August 2008";
      }       
      elseif ( $y >= 'July 2008' ) {
          $mensual="July 2008";
      }       
      elseif ( $y >= 'June 2008' ) {
          $mensual="June 2008";
      }       
      elseif ( $y >= 'May 2008' ) {
          $mensual="May 2008";
      }
      elseif ( $y >= 'May 2008' ) {
          $mensual="May 2008";
      }       
      elseif ( $y >= 'April 2008' ) {
          $mensual="April 2008";
      }   
      elseif ( $y >= 'March 2008' ) {
          $mensual="March 2008";
      }    
      elseif ( $y >= 'February 2008' ) {
          $mensual="February 2008";
      }    
      elseif ( $y >= 'January 2008' ) {
          $mensual="January 2008";
      }
      else{
          $mensual="Otro";
      }

       
   $lsSQL = "UPDATE $this->mysql_table SET MENSUAL='$mensual' WHERE NUM=$row[NUM]";
   
   $updateresult = $this->db->query($lsSQL);

   }

}

} //class
?>
sandmanweb
Posts: 96
Joined: 2006-03-12 01:07:41

Post by sandmanweb »

darkemi20
Posts: 9
Joined: 2008-03-21 16:59:13

Post by darkemi20 »

Bueno termine el trabajo... Comparto con uds...

En "mdb_config.inc" agregar estas lineas:

Code: Select all

//----
$this->config['panels'][11]['dbfield'] = "MENSUAL"; 
$this->config['panels'][11]['display'] = TRUE; 
$this->config['panels'][11]['minimum'] = 1; 
//----
Script Mensual

Code: Select all

<?

require_once(dirname(__FILE__).'/mysql_db.inc');

$processMensual = new processMensual();

//Creditos darkemi20

?>

<html>
<head> <title>Proceso Mensual Movies</title>
</head>

<body>
  <?php $processMensual->process(); ?>   


</body>
</html>

<?php

class processMensual {
   
   function processMensual()
   {
      //constructor
      
   }
   
   function process()
   {
      
      $this->_load_configuration();
      
      //print $this->checkIfColumnExists();
      
      if ($this->checkIfColumnExists())
      {
         
         //print "Column found.";
      
      }
      else
      {
         $this->createColumn();
         $this->processMensualForMovies();
         
         print "<br>Mensual processed for all movies.";
      }
      
   }
   
   
   
    
   
function _load_configuration() {

        # Load the Main Configuration; Set the MySQL variables.

        require_once(dirname(__FILE__)."/mdb_config.inc");

        $this->template_path = dirname(__FILE__)."/templates/".$this->config['options']['template'];

        $this->db = new mysql_db($this->config['mysql']['server'], $this->config['mysql']['username'], $this->config['mysql']['password']);

        $this->mysql_table = "`".$this->config['mysql']['database']."`.`".$this->config['mysql']['table']."`";

        # Load the Language and Template Configurations

        //require_once(dirname(__FILE__)."/languages/".$this->config['options']['language'].".inc");

        //require_once($this->template_path."/config.inc");

    }
   
function checkIfColumnExists()
{
   
   $query = "SHOW columns FROM $this->mysql_table ";
   
   $result = $this->db->query($query);
   
   while ( $row = $result->fetch_array() )
   {
      //print "<br>$row[0]";
      if ($row[0]=='MENSUAL'){
         print "<br>Columns Found ";
               
         
         return true;
      }
   }
   
   print "<br>Column not Found!";
      
   return false;
      
   
}

function createColumn()
{
   $lsSQL = "ALTER TABLE $this->mysql_table ADD MENSUAL VARCHAR(15)";
   
   $updateresult = $this->db->query($lsSQL);
   
   print "<br>Column MENSUAL created!";
   
}
   

function processMensualForMovies()
{


$query = "SELECT NUM, dateadd FROM $this->mysql_table"; 
$result = $this->db->query($query);  
 
while ( $row = $result->fetch_assoc() ) 
{ 
   $array_fecha = explode('-',$row['dateadd']); 
 
   switch ($array_fecha[1]) 
   { 
      case 1: $mensual = "01 Enero "; break; 
      case 2: $mensual = "02 Febrero "; break; 
      case 3: $mensual = "03 Marzo "; break; 
      case 4: $mensual = "04 Abril "; break; 
      case 5: $mensual = "05 Mayo "; break; 
      case 6: $mensual = "06 Junio "; break; 
      case 7: $mensual = "07 Julio "; break; 
      case 8: $mensual = "08 Agosto "; break; 
      case 9: $mensual = "09 Septiembre "; break; 
      case 10: $mensual = "10 Octubre "; break; 
      case 11: $mensual = "11 Noviembre "; break; 
      case 12: $mensual = "12 Diciembre "; break; 
   } 
 
   $mensual .= $array_fecha[0]; 
 
   $lsSQL = "UPDATE $this->mysql_table SET MENSUAL='$mensual' WHERE NUM= {$row['NUM']}"; 
   $this->db->query($lsSQL);  
}

}
} //class
?>
Queda perfecto.-
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

I'll be honest and say i have no idea what that mod is doing, or how useful it is.. although i dont speach spanish so probably why i dont get it.

how about a more details example of what this does.. for example.. list 5 files and there added dates, and then show us what the new panel would look like.

Probably others might find its worth adding.

thanks for posting though. :)
darkemi20
Posts: 9
Joined: 2008-03-21 16:59:13

Post by darkemi20 »

Spanish

Code: Select all

Ok... Lo que hace es... Por medio del campo de la base de datos MYSQL "DATEADD" 
Ej. 2008-11-06
Año 2008
Mes 11 = Noviembre
Día 06 (NO importa el día, dado a que toma mes y año)
Saca las novedades... O peliculas agregadas por mes y año... Es muy util... Por eso lo hize...

Dejo una captura...
English

Code: Select all

Ok ... What you do is ... Through the field of database MYSQL "DateAdd"
Ex 2008-11-06
2008
November 11 Month =
Day 06 (no matter the day, since it takes months and years)
Get the news ... Or movies added each month and year ... It is very useful ... So what did ...

I let a catch ...
Image
Dazel
Posts: 9
Joined: 2008-10-17 13:10:12

Limiter la liste des acteurs

Post by Dazel »

Bonjour à tous

Je suis toujours en train de personnaliser ce template.

Je cherche à effectuer une modification.

Quand on clique sur une fiche de film, la liste des acteurs s'affiche.

Pour certains films elle est très longue et oblige de dérouler la page.

J'aimerais pouvoir limiter cette liste à 10 acteurs.

Je ne sais pas ou faire cette modification.

Merci d'avance pour votre aide.

Dazel

--------------------------
(Try of english version)

Hello

I try to modify this template.

When you click on a film, the list of actors appears.

And it can be a very long list.

I wish i could limit this list for 10 actors.

How can I do this change ??

Thanks for your help

---------------------------
sandmanweb
Posts: 96
Joined: 2006-03-12 01:07:41

Post by sandmanweb »

Modifier manuellement la liste des acteurs dans AMC.

Changer la valeur maximale de chaîne de caractère que SQL accepte pour cette variable... mais ça risque de donner de drôles de choses.

Sinon, je ne sais pas comment faire. Mais je ne suis pas un pro là dedans ;)
Dazel
Posts: 9
Joined: 2008-10-17 13:10:12

Post by Dazel »

Merci Sandmanweb pour ta réponse.


En fait en regardant le code dans le dossier template, j'ai vu que dans list_view.tpl , la liste des acteurs est limitée à 3 noms.

Code: Select all

<div class='actors'><b>$LANG[ACTORS]: </b>{ACTORS;3;, }<a href='$ACTOR[HREF]'>$ACTOR[NAME]</a>{/ACTORS}</div>


Je me demande si on ne peut pas adapter ce code pour details.tpl pour n'afficher que 3 noms à ce niveau du code :

Code: Select all

 <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'>as $ACTOR[PARENTXT]</td>
                </tr>
              {/ACTORS}
Je ne sais pas trop comment l'adapter. Si Sandmanweb (ou quelqu'un d'autre) a une piste n'hésitez pas !

A++
Dazel
Posts: 9
Joined: 2008-10-17 13:10:12

Post by Dazel »

C'est ok j'ai trouvé ! effectivement je me suis aidée de la méthode utilisée dans l'autre template.

Il faut indiquer le nombre d'acteurs souhaités dans la balise {ACTORS} en ajoutant ";" et le nombre d'acteurs.



Code: Select all

 <th>$LANG[ACTORS]</td>
                  <th>$LANG[ROLE]</td>
                </tr>
              {ACTORS;10}
                <tr>
                  <td valign='top' class='actorname'><a href='$ACTOR[HREF]'>$ACTOR[NAME]</a></td>
                  <td valign='top' class='actorrole'>as $ACTOR[PARENTXT]</td>
                </tr>
              {/ACTORS}
Dazel
Posts: 9
Joined: 2008-10-17 13:10:12

Post by Dazel »

A Sandmanweb :
Avec les modifications que tu as faites sur le template, pour afficher sur la page principale (celle qui liste tous les films) tes étoiles en fonction des avis laissés sur le site (et non celles d'allociné ou issues des scripts) comment ferais tu ??

Je coince sur cette modification

Si tu as une piste je veux bien. je continue à chercher de mon coté aussi.

a++
sandmanweb
Posts: 96
Joined: 2006-03-12 01:07:41

Post by sandmanweb »

je vais poster une version de Pk movie incluant mes modifications bientot sur le forum.

Reviens voir bientôt ;)
sandmanweb
Posts: 96
Joined: 2006-03-12 01:07:41

Post by sandmanweb »

Voici ma contribution ;)

Je vous donne le lien de ma version modifiée de PKmovie.

Elle inclue:

PKmovie 3.03

Modifications par Surflife
- Affichage de 5 pochettes au hasard dans le haut de la page
- Classement par périodes

Mes modifications personnelles
- Ajout de notes (étoiles) par les visiteurs
- Ajout de commentaires par les visiteurs
- Automatisé la création des tables SQL pour ma modification
- Amélioration de l'affichage des étoiles imdb (elles s'affichent toujours maintenant)
- Agrandissement de l'image lorsqu'on clique sur l'image d'une pochette
- Bouton pour afficher une page d'informations
- Changement du fichier langue de AMC


Lisez le fichier Lisez moi.txt pour les informations sur la configuration.

Dites moi ce que vous en pensez et faites moi signe si vous avez besoin d'aide.

Téléchargez-le ici:
http://www.mediafire.com/?rkungezbmrz


Bien sûr, le logo ne sera pas le même que sur ces images ;)


Il vous faudra aussi le fichier de langue pour Ant Movie Calalogue afin qu'il corresponde aux changements que j'ai apporté à ce template.

Téléchargez-le ici:
http://www.mediafire.com/?ynjinyznmiq


Si vous voulez seulement la modification pour les notes et commentaires, téléchargez ceci:
http://www.mediafire.com/?w1mwlwgurir


Image


Image



Edit: j'avais oublié d'ajouté le fichier de langue et quelques autres détails...
Dazel
Posts: 9
Joined: 2008-10-17 13:10:12

Post by Dazel »

Merci à toi sandmanweb pour avoir posté aussi clairement tes modifs

Une question pour faire évoluer tes modifs :

Comment ferais tu pour faire apparaitre sur detail_view.tpl les étoiles correspondant aux notes que les visiteurs laissent ???

Pour le moment ne sont affichées que les étoiles qui correspondent à la note imdb

Si tu as une idée je te remercie
Post Reply