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
ty3001
Posts: 10
Joined: 2007-07-15 05:51:24

Post by ty3001 »

Sorry been busy lately. I haven't had time to neatly incorporate this script with PK's functions.

1. First you need to create a column in your movies table called PERIOD. I haven't had time to add this into the PHP code below. I created the column using the GUI editor which comes with MySQL administrator.

2. Here is the code for the PHP page which will go through all the movies and categorise them by period. Save the file in the same folder as your index.php and call it processPeriodForMovies.php

In the PHP code below you need to initialise the details of the database access, these are the ones at the top of the mdb_config.inc file. When you open the page in your browser it should run.

Code: Select all

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

<body>
  <?php processPeriodForMovies(); ?>   


</body>
</html>

<?php

function processPeriodForMovies()
{


/* initialise the database details */
$user = "yourusername";
$pass = "youruserpassword";
$db = "dbname";
$tablename = "tablename";

	

$link = mysql_pconnect( "localhost", $user, $pass );

if ( ! $link )

die( "Couldn't connect to MySQL" );



mysql_select_db( $db, $link )

or die ( "Couldn't open $db: ".mysql_error() );

//SELECT * FROM movies LIMIT 0, 200"

$result = mysql_query( "SELECT * FROM $tablename " )  or die(mysql_error()); 

	 while ( $a_row = mysql_fetch_array( $result ) )

	 {

		$period='';
		$y = $a_row[YEAR];

		if ($y == 2007) {
		    $period="2007.";
		}
		elseif ($y == 2006) {
		    $period="2006.";
		}
		elseif ($y == 2005) {
		    $period="2005.";
		}
		elseif ( $y >= 2000 ) {
		    $period="2000-04";
		}
		elseif ( $y >= 1990 ) {
		    $period="1990s";
		}
		elseif ( $y >= 1990 ) {
		    $period="1990s";
		}
		elseif ( $y >= 1980 ) {
		    $period="1980s";
		}        
		elseif ( $y >= 1970 ) {
		    $period="1970s";
		}        
		elseif ( $y >= 1960 ) {
		    $period="1960s";
		}        
		elseif ( $y >= 1950 ) {
		    $period="1950s";
		} 
		elseif ( $y >= 1940 ) {
		    $period="1940s";
		}        
		elseif ( $y >= 1930 ) {
		    $period="1930s";
		}   
		elseif ( $y >= 1920 ) {
		    $period="1920s";
		}        
		elseif ( $y >= 1910 ) {
		    $period="1910s";
		}          
        
		else{
		    $period="unknown";
		}

 	$lsSQL = "UPDATE $tablename SET Period='$period' WHERE NUM=$a_row[NUM]";
	

	 print "$a_row[ORIGINALTITLE] - $y  - $period <br/>\n $lsSQL <br>";
		 $updateresult = mysql_query($lsSQL);

	print  $updateresult."<br>";



	 }

}
?>
As you can see I am using the "." after some of the years because without it is not sorting properly.

3. Then edit the the mdb_config.inc file and
these lines at the bottom

Code: Select all

//----
$this->config['panels'][9]['dbfield'] = "PERIOD";
$this->config['panels'][9]['display'] = TRUE;
$this->config['panels'][9]['minimum'] = 4;


4. Edit the language file in
languages\english.inc (which ever language you are using)
add this line above the # PLURALS LINE

Code: Select all

$this->lang['PERIOD']      	= "Period"; 
I have a bad memory so I might have missed a step, so if you have any problems post here. Hopefully when I find time I can incorporate this script better with PKs code.

I am using 3.03 version.
Nicolas R
Posts: 21
Joined: 2007-07-28 16:53:13
Location: IDF

Post by Nicolas R »

THANK YOU Ty001 ! it just perfectly works ! However, like you said, we'll need to implement it in a smoother way. Because if we want to use this great optimization we still have to:

- First, manually add the PERIOD column to the database
- Then, manually launch the php page "processPeriodForMovies"
- Finally, edit the mdbconfig.inc to add the panel


Do you know how can we implement all or part of those steps directly into the code ? When i've add the column, my SQL GUI reported my actions like this:

ALTER TABLE `movies` ADD `PERIOD` INT( 11 ) DEFAULT NULL AFTER `PICTURENAME` ;

or

$sql = 'ALTER TABLE `movies` ADD `PERIOD` INT(11) DEFAULT NULL AFTER `PICTURENAME`';


If its an sql request, i guess we probably can insert it in the code at the right place, just dont know where ! I hope it wont be too difficult to do, because we have to build the column PERIOD before the SQL base is loaded if we dont want it to crash because of the presence of this column in the left panels.

A really small detail: By implementing the code you gave, i wasn't able to get the "s" at the end of the years in the pediods panel. it mean, i would get "1970" but no "1970s". If you could help me to arrange this out too :D

Thank you again for this improvement, i really enjoy it ! I guess it can be usefull to lots of people ;)
ty3001
Posts: 10
Joined: 2007-07-15 05:51:24

Post by ty3001 »

The PERIOD IS A TEXT field not an Integer i.e. Int (11). That is why it is missing the 'S'.

It is possible to ADD colums through PHP I just have to read up on it.

Maybe to avoid having to open the page "processPeriodForMovies.php" (which I don't think is a big deal because I only import it once a month) after you have imported the Ant database, I can modify the index.php so it first checks if there is a Period column in the database if not it runs the function processPeriodForMovie() and then returns control to the main function in index.php. This would be seamless.

As for the editing of the mdbconfig.inc this only has to be done once, so it shouldn't be a problem.
Nicolas R
Posts: 21
Joined: 2007-07-28 16:53:13
Location: IDF

Post by Nicolas R »

Ok, i corrected my column and it displays the right symbols now.

Problem is that as long as the column period is not existing, we can't even launch the usual kit because its mdb_config.inc needs this colum. We have to modify it, then edit it again ... Automatically add the column would already be a great improvement in order to give the modified kit to absolute newbies !

I've made some researches and it appears that something like @mysql_query("ALTER TABLE `movies` ADD `PERIOD` TEXT'; could add this column, but i guess we have to introduce a boolean in order to not build and rebuild again the column when its allready created. I still don't know how, and where precisely insert the right code.

I would appreciate insertion of the function processPeriodForMovie() to the main deployment of the kit too. But i agree with ou, its secondary. Even if i'm really motivated, I dont feel like doing it myself because of my almost null knowledge in php :-( ...

So, if you have a moment to implement what you can do in the main kit on of those days ... You'll make me and my team really happy !

Have a nice day,
ty3001
Posts: 10
Joined: 2007-07-15 05:51:24

Post by ty3001 »

This weekend I might have a go at it.

As for updating the panels, I am new here so considering the last PK update was two months ago, it is not much of an issue.
Paprika
Posts: 2
Joined: 2007-08-04 12:30:20

Post by Paprika »

Thanks ty3001 ! I'm waiting for it too :grinking:
ty3001
Posts: 10
Joined: 2007-07-15 05:51:24

Post by ty3001 »

Here is the code, you will need to open this page when you have updated your database from AMC.
It will check for the Period column if it does not exist it will create it and then run the function that will assign a period for the movie.

You don't need to edit anything with the DB details because it uses PK's config files.
Just cut and paste the following contents into a file called processPeriod.php, in the same folder as "index.php".

I chose not include this in the index.php because it would be a waste to perform it on every page load. But it is simple to incorporate index.php.

Code: Select all

<?

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

$processPeriod = new processPeriod();

?>

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

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


</body>
</html>

<?php

class processPeriod {
	
	function processPeriod()
	{
		//constructor
		
	}
	
	function process()
	{
		
		$this->_load_configuration();
		
		//print $this->checkIfColumnExists();
		
		if ($this->checkIfColumnExists())
		{
			
			//print "Column found.";
		
		}
		else 
		{
			$this->createColumn();
			$this->processPeriodForMovies();
			
			print "<br>Period 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]=='PERIOD'){
			print "<br>Columns Found ";
					
			
			return true;
		}
	}
	
	print "<br>Column not Found!";
		
	return false;
		
	
}

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

function processPeriodForMovies()
{


	$query = "SELECT NUM, YEAR FROM $this->mysql_table ";
		
	$result = $this->db->query($query);
	

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

	 {

		$period='';
		$y = $row[YEAR];

		if ($y == 2007) {
		    $period="2007.";
		}
		elseif ($y == 2006) {
		    $period="2006.";
		}
		elseif ($y == 2005) {
		    $period="2005.";
		}
		elseif ( $y >= 2000 ) {
		    $period="2000-04";
		}
		elseif ( $y >= 1990 ) {
		    $period="1990s";
		}
		elseif ( $y >= 1990 ) {
		    $period="1990s";
		}
		elseif ( $y >= 1980 ) {
		    $period="1980s";
		}        
		elseif ( $y >= 1970 ) {
		    $period="1970s";
		}        
		elseif ( $y >= 1960 ) {
		    $period="1960s";
		}        
		elseif ( $y >= 1950 ) {
		    $period="1950s";
		} 
		elseif ( $y >= 1940 ) {
		    $period="1940s";
		}        
		elseif ( $y >= 1930 ) {
		    $period="1930s";
		}   
		elseif ( $y >= 1920 ) {
		    $period="1920s";
		}        
		elseif ( $y >= 1910 ) {
		    $period="1910s";
		}          
        else{
		    $period="unknown";
		}

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

	}

}

} //class
?>

Nicolas R
Posts: 21
Joined: 2007-07-28 16:53:13
Location: IDF

Post by Nicolas R »

Thanks ty3001 !

It just perfectly works for me. I now dont really mind about a modification of index.php, considering the easyness to use of processperiod.php . Even if updates are very closes, its still really fast to do this way.

You did a great job, i dont know how to say you THANKS in other words ! Here is my list where i use your modification : www.tarilenwe-films.tk

I'm now trying to finish with great care ... i don't know if you can find a solution for this, but do you know why the php search cant find entries with the symbol " - " ? For exemple, when i click on the actor's name " jean-paul belmondo" for a research, it cant find any occurrence ...

Have a niiiice day !
Nicolas
-=[WeBsEcReTa]=-
Posts: 37
Joined: 2002-10-02 23:46:56
Location: Santiado de Chile
Contact:

Post by -=[WeBsEcReTa]=- »

Nicolas R wrote:Thanks ty3001 !

It just perfectly works for me. I now dont really mind about a modification of index.php, considering the easyness to use of processperiod.php . Even if updates are very closes, its still really fast to do this way.

You did a great job, i dont know how to say you THANKS in other words ! Here is my list where i use your modification : www.tarilenwe-films.tk

I'm now trying to finish with great care ... i don't know if you can find a solution for this, but do you know why the php search cant find entries with the symbol " - " ? For exemple, when i click on the actor's name " jean-paul belmondo" for a research, it cant find any occurrence ...

Have a niiiice day !
Nicolas
Nice template, you can post this??
Nicolas R
Posts: 21
Joined: 2007-07-28 16:53:13
Location: IDF

Post by Nicolas R »

of course i can ! Wait just a little moment, time for me to pack it all and produce the little explanations needed.
sexus6
Posts: 5
Joined: 2005-05-10 21:17:36

Post by sexus6 »

Hi
I try this script but something is wrong for me.
I get this error:

Warning: MDB3::require_once(/var/www/pelis/languages/english.inc) [function.MDB3-require-once]: failed to open stream: Permission denied in /var/www/pelis/mdb3.php on line 244

Fatal error: MDB3::require_once() [function.require]: Failed opening required '/var/www/pelis/languages/english.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/pelis/mdb3.php on line 244

I use a mysql+apache+php installation in ubuntu linux. The conflict file : english.inc exists and has all permisions open (chmod 777, read write execute) and there is a problem open this. I open this file with a text editor...and I see a normal file.

What's wrong?
Nicolas R
Posts: 21
Joined: 2007-07-28 16:53:13
Location: IDF

Post by Nicolas R »

Hi -=[WeBsEcReTa]=- !

Here is the link for the total template including ty3001 modification and my improves. Instructions are exactly the same, except for a little new step to make ty3001 optimization (and the total kit ...) to work:

1) Type adress http://www.mywebsite.com/index.php in your browser to activate the database ... Can be a bit long at first loading, considering its mounting the database ! You will have a PHP error, but don't worry
2) Then, type adress http://www.mywebsite.com/processPeriod.php in your browser to get a success PHP column created message.
3) You can lauch again your index.php, it should work !

N.B: My template of PK MovieDB launches itself in french according to the choice of "french.inc" in my template. Just modify it to "english.inc" to use it in English.

Modified Kit PK MovieDB 3.0.3 NicolasR

To sexus:

Code: Select all

        # Load the Language and Template Configurations
     require_once(dirname(__FILE__)."/languages/".$this->config['options']['language'].".inc");
require_once($this->template_path."/config.inc");
Are you sure languages files are in the right place ? This is quite strange ... I'm absolutly not a PHp addict, but the following line is quite suspect ...

Code: Select all

(include_path='.:/usr/share/php:/usr/share/pear')
mbrusl
Posts: 1
Joined: 2007-08-31 23:35:38

Database and pictures not syncronizing

Post by mbrusl »

I've looked all over this thread and have not found any reference how to fix the catalog and pictures to be sync'd. If you have a look at http://www.spacequad.com/movie-list You ill notice that the catalog and the movies pictures are off by one or more selections. How can I fix this problem? They appear in the actual Ant Catalog as correct. Even when I add new movies they are correct in the catalog, but on the website they are off by a few.

Michael
screach
Posts: 25
Joined: 2006-08-07 00:21:50

Default Vew - Covers

Post by screach »

Can anyone tell me what program to change the View from the default Details to Covers?
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Re: Default Vew - Covers

Post by kazgor »

screach wrote:Can anyone tell me what program to change the View from the default Details to Covers?
edit the config.inc file thats in the template folder you are using, and change the following line.

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

to

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

that should do the trick :)
korzen
Posts: 1
Joined: 2007-09-04 19:26:50

Post by korzen »

Can you add view elements to global translation (Details/List/Covers).

Second problem is charset of languages (for example polish language require iso-8859-2 but in this charset sign << is different (<< - link to first page, >> - link to last page). You can consider using < < and > >) - and where i find this in sources??

Third is size of "Sort by" dropdown for polish language is too small :) (80px is good), and "View" dropdown (66px)

I know that size or dropdown lists are in template and translation of details/list/cover but i think it will by easier to find them in global translation.



Polsh translation if somebody want

Code: Select all

<?
/** ===============================================================================================
 * POLISH Language file for MovieDB by PK-Designs.com
 * @author: Lukasz Korzeniewski
 *=============================================================================================== */
# Misc. words that people will find useful
$this->lang['APPNAME']          = "MDB3";           # Name of this application
$this->lang['ALL_MOVIES']       = "Wszystkie filmy";     # All Movies
$this->lang['MORE']             = "więcej";           # More (when needed for cuting description)
$this->lang['UNKNOWN']          = "b.d.";             # Unknown (Not Available)
$this->lang['ROLE']             = "Rola";           # Actor / Actress Role
$this->lang['MINUTES']          = "min.";           # When displaying the length
$this->lang['FIRST']            = "Pierwszy";          # When linking to the First Page
$this->lang['LAST']             = "Ostatni";           # When linking to the Last page

# TITLES - Title refrences for the cooresponding database field
$this->lang['NUM']              = "Nr";
$this->lang['CHECKED']          = "Zaznaczone";
$this->lang['MEDIA']            = "Etykieta filmu";
$this->lang['MEDIATYPE']        = "Rodzaj nośnika";
$this->lang['SOURCE']           = "Źródło";
$this->lang['DATEADD']          = "Data dodania";
$this->lang['BORROWER']         = "Pożyczający";
$this->lang['RATING']           = "Ocena";
$this->lang['ORIGINALTITLE']    = "Tytuł";
$this->lang['TRANSLATEDTITLE']  = "Tytuł polski";
$this->lang['FORMATTEDTITLE']   = "Tytuł sformatowany";
$this->lang['DIRECTOR']         = "Reżyser";
$this->lang['PRODUCER']         = "Producent";
$this->lang['COUNTRY']          = "Kraj";
$this->lang['CATEGORY']         = "Gatunek";
$this->lang['YEAR']             = "Rok";
$this->lang['LENGTH']           = "Czas trwania";
$this->lang['ACTORS']           = "Obsada";
$this->lang['URL']              = "strona WWW";
$this->lang['DESCRIPTION']      = "Opis filmu";
$this->lang['COMMENTS']         = "Komentarze";
$this->lang['VIDEOFORMAT']      = "Format video";
$this->lang['VIDEOBITRATE']     = "Video Bitrate";
$this->lang['AUDIOFORMAT']      = "Format audio";
$this->lang['AUDIOBITRATE']     = "Audio Bitrate";
$this->lang['RESOLUTION']       = "Rozdzielczość";
$this->lang['FRAMERATE']        = "Framerate";
$this->lang['LANGUAGES']        = "Język";
$this->lang['SUBTITLES']        = "Napisy";
$this->lang['FILESIZE']         = "Rozmiar filmu";
$this->lang['DISKS']            = "Ilość płyt";
$this->lang['PICTURENAME']      = "Okładka";

# PLURALS - A few dbfields need plurar definitions (Example: Other Contries)
$this->lang['_OTHER']            = "Inne";
$this->lang['MEDIATYPES']        = "Rodzaje nośników";
$this->lang['SOURCES']           = "Źródła";
$this->lang['BORROWERS']         = "Pożyczający";
$this->lang['COUNTRYS']          = "Kraje";
$this->lang['CATEGORYS']         = "Kategorie";
$this->lang['YEARS']             = "Lata";
$this->lang['VIDEOFORMATS']      = "Formaty video";
$this->lang['AUDIOFORMATS']      = "Formaty audio";

# PANELS - These words are used for the panels
$this->lang['JUMPTO']           = "Skocz do";
$this->lang['SEARCH']           = "Szukaj";
$this->lang['CLEARSEARCH']      = "Wyczyść wyszukiwanie";
$this->lang['SUBMIT']           = "Dodaj";
$this->lang['CLEAR']            = "Wyczyść";
$this->lang['VIEW']             = "Widok";
$this->lang['_ALL']             = "Wszystkie";
$this->lang['_BLANK']           = "Nieznany";
$this->lang['_OTHER']           = "Inne";

# PAGES - Useful words for the page displays
$this->lang['PAGE']             = "Strona";
$this->lang['NUMPERPAGE']       = "Ilość na stronie";
$this->lang['PREVIOUS']         = "Poprzedni";
$this->lang['NEXT']             = "Następna";
$this->lang['GOTOPAGE']         = "Idź do strony";
$this->lang['SHOWING']          = "Wyświetlono";
$this->lang['OF']               = "z";

# SORT OPTIONS - (already defined RATING, YEAR, LENGTH)
$this->lang['SORT']             = "Sortuj według";
$this->lang['TITLE']            = "Tytuł";
$this->lang['MOST_RECENT']      = "Ostatnio dodane";






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

Post by kazgor »

korzen wrote:Can you add view elements to global translation (Details/List/Covers).
Pretty sure you can from what i've seen how the script works, although i haven't tried it myself.
Second problem is charset of languages (for example polish language require iso-8859-2 but in this charset sign << is different (<< - link to first page, >> - link to last page). You can consider using < < and > >) - and where i find this in sources??
yes, like you say these are in the Template folders, and are the all files ending .tpl

eg the code to look for.

Code: Select all

                <span class='item prev $PREV_INACTIVE'><a href='$FIRST_HREF'>«</a>..<a href='$PREV_HREF'>$LANG[PREVIOUS]</a></span>
                <span class='label'> $LANG[PAGE]: </span>$PAGENUM $LANG[OF] $TOTAL_PAGES
                <span class='item next $NEXT_INACTIVE'><a href='$NEXT_HREF'>$LANG[NEXT]</a>..<a href='$LAST_HREF'>»</a></span>
Third is size of "Sort by" dropdown for polish language is too small :) (80px is good), and "View" dropdown (66px)

I know that size or dropdown lists are in template and translation of details/list/cover but i think it will by easier to find them in global translation.
Edit style.css in the template folder, and tweak the following CSS style to get the size you want.

Code: Select all

#mdb .sort .menu                { width: 76px; }
Being in the stylesheet this will mean that Details/Code
sexus6
Posts: 5
Joined: 2005-05-10 21:17:36

Post by sexus6 »

Nicolas R wrote:
To sexus:

Code: Select all

        # Load the Language and Template Configurations
     require_once(dirname(__FILE__)."/languages/".$this->config['options']['language'].".inc");
require_once($this->template_path."/config.inc");
Are you sure languages files are in the right place ? This is quite strange ... I'm absolutly not a PHp addict, but the following line is quite suspect ...

Code: Select all

(include_path='.:/usr/share/php:/usr/share/pear')
Yes, I'm sure that /var/www/pelis/languages/english.inc exists and has 777, all permisions open.

I haven't idea about this second line that you say:

Code: Select all

(include_path='.:/usr/share/php:/usr/share/pear')
[/quote]
Vinch
Posts: 2
Joined: 2007-10-02 09:58:51

Post by Vinch »

Hello all

I post here because i've some trouble with the template "Modified Kit PK MovieDB 3.0.3 NicolasR"

first my url : http://vinch-movie.ifrance.com/test1/index.php

I don't know why my images are not posted correctly. I exported my data base under the name catalogue.sql so all my images is called catalogue_x.jpg and it is well in the repertory antexport/

Thanks a lot for your help

ps: Excuse me for my bad english :(
Nicolas R
Posts: 21
Joined: 2007-07-28 16:53:13
Location: IDF

Post by Nicolas R »

Bonjour Vinch,

Voici l'extrait d'un tutoriel que j'ai publié pour accompagner la release du template sur un board privé. Desolé pour la mise en page, c'est un peu fait à l'arrachée et ce n'est peut-être pas parfait ! Recommence depuis le début, et suis METICULEUSEMENT toutes les étapes.

*******************************************************

2.9. Présenter sa liste sur une page internet interactive et modulable

Voici l’une des principales raisons de tenir une liste avec un logiciel dédié: La présentation facilitée de cette collection de films à d’autres personnes. Internet permet l’affichage de nos collections en HTML mais aussi en faisant recours à d’autres langages comme le PHP au rendu largement supérieur à ce qu’un simple export au format HTML peut vous offrir ! Clairement plus complexes à coder que les Templates que nous avons vus dans la partie « Présenter sa liste sur une page HTML simple», ils demanderont de véritables talents de codage PHP et de CSS. Heureusement pour nous, de talentueux codeurs s’y sont déjà attelés et vous n’aurez pratiquement rien à faire vous-même. Nous nous servirons ici du kit très convainquant PKMovie DB v3.0.3. Je conseille néanmoins d’utiliser ma version de ce kit remodelée en plusieurs points et disponible dans la partie téléchargements. Voici les principaux changements apportés :
  • Remodelage complet de la fenêtre de visualisation des fiches individuelles pour une meilleure occupation et stabilisation de l’espace
  • Remodelage partiel de la vue en liste détaillée
  • Thème général plus éclairci et mettant en avant les zones interactives pour les plus profanes de vos visiteurs
  • Amélioration de la traduction
  • Années groupées
  • Seule possibilité de suivre en détails ce guide …
  • … Et énormément de détails.
Page de garde en mode « cover » sur le kit basique.

Image


Page de garde en mode « cover » sur le kit modifié.


Image


Page individuelle de film sur le kit basique.


Image


Page individuelle de film sur le kit modifié.


Image

Je me permets de reprendre certaines des explications faites sur le très bon tutorial d’Aboulafia. Comme dit, vous devrez composer avec les points suivants :
  1. Avoir ouvert un espace personnel chez votre FAI ou un provider tiers
  2. Avoir activé la possibilité d’utiliser une base PHP/MySQL sur cet espace
  3. Exporter votre collection de films au format SQL à l’aide d’AMC
  4. Renseigner quelques informations dans le kit
  5. Mettre en ligne le tout avec un client FTP comme FileZilla configuré pour uploader sur ce compte
Seuls les trois derniers points concernant notre tutorial, c’est sur ceux-là que nous allons plancher sans plus attendre.
  1. Cliquez sur l’icône 5 de la barre jaune dans AMC
  2. Sélectionnez l’onglet « SQL » dans le menu du pop-up qui vient d’apparaitre

    Image
  3. La zone « champs disponibles » contient tous les champs que vous souhaitez intégrer à la base que vous allez exporter. Il est donc crucial de bien exporter tous les champs qui seront affichés par notre kit. Dans le cas de ma version modifiée, il s’agit de tous les champs déplacés dans les « champs à exporter ». Intégrer ces champs ne veut pas dire qu’ils devront être présentés sur le site internet final, mais qu’il sera néanmoins capable de recourir à ces informations. Laissez bien toutes les options de droite identiques à celles de la capture.
  4. Une fois votre configuration effectuée, pressez donc le bouton « Exporter » en bas à droite du pop-up. Lorsqu’il vous demande où exporter la liste et sous quel nom, choisissez de l’appeler « film.sql » et le dossier « antexport » du kit que vous avez téléchargé.
Ne croyez pas pour autant que c’est fini, puisque vous allez maintenant devoir mettre les mains dans le cambouis ! Aucune inquiétude à avoir cependant, puisque vous les actions à effectuer vous seront dictées sur toute la ligne.

Ouvrez le fichier « mdb_config.in » dans le bloc note. Trouvez les lignes 15 à 18 qui recèlent les mots ADRESSEDUSERVEURSQL, IDENTIFIANTDUFTP, MOTDEPASSEDUFTP et NOMREELDELABASESQL. Vous devez modifier ces mots selon les règles suivantes, et en prenant garde à ne pas toucher aux guillemets et aux points virgules qui les suivent :
  1. ADRESSEDUSERVEURSQL attend d’être remplacé par l’adresse réelle de votre serveur SQL. Dans le cas d’une page perso free, il s’agit par exemple de « sql.free.fr ».
  2. IDENTIFIANTDUFTP attend d’être remplacé par le nom (identifiant) de votre espace perso.
  3. MOTDEPASSEDUFTP attend d’être remplacé par le mot de passe de votre espace perso.
  4. NOMREELDELABASESQL attend d’être remplacé par le nom REEL de votre base de données une fois mise en ligne. Ne vous faites pas avoir, il ne s’agit pas du nom du fichier SQL exporté, à savoir « films ». Dans le cadre d’un compte personnel FREE, le nom qui sera octroyé à la base est le même que l’identifiant du FTP ! Si vous n’avez pas de compte FREE, alors entrez l’adresse serveur SQL dans votre navigateur et entrez y pour voir le nom donné à votre base.
  5. Enregistrez et fermer le document sans changer son extension.
Ouvrez ensuite le fichier « mdb3.php » dans le bloc note. Trouvez la ligne 608 qui recèle le mot « monspeudo » que vous devez remplacer par ce que vous voulez pour que le copyright soit mis à jour sur toutes les pages. Enregistrez puis fermez le document. Les retouches sont maintenant finies, vous pouvez mettre le tout en ligne à l’aide de votre logiciel FTP !

Notez que la première ouverture sera longuette puisque le kit "déploie" la base SQL. En effet, grâce à
l'une de ses possiblités, le kit n'a pas besoin que vous hébergiez votre base de données vous-mêmes, mais
saura la placer lui-même ou il en aura besoin. Une fois ce "placement" effectué, il se peut que vous
retrouviez un fichier "nomdevotrebase.bak" sur votre FTP: Le kit a generé une copie de sauvegarde de votre
base au cas ou vous souhaiteriez la récuperer après qu'elle ait été mise en place, et donc supprimée. Votre liste
vous retourne pour le moment une erreur: Vous avez encore une dernière petite manipulation à faire pour initier le
regroupements des années !
  1. Tapez l'adresse http://www.monsite.com/processPeriod.php dans votre navigateur.
  2. Vous obtenez un message de succès. Si ce n'est pas le cas, alors votre base de données est inaccessible ...
Ca y est, vous pouvez contempler votre liste intéractive! Ne vous inquiétez pas si vous avez trouvé la procédure
un peu longuette: Une fois mise à jour deux ou trois fois, cela ne vous prendra guerre plus qu'une grosse minute !
Post Reply