AMCphp - 1.0 released (bugfix + history report)
1st of all: thanks for this GREAT template
then... i'm having some little problems:
1. I cannot list my movies with the TranslatedTitle instead of the OriginalTitle. I've changed this on settings.php
to
but it displays the original title on the main page, instead of the translated one
2. Multi genre is not working (i've activated it in the settings.php). I understand Multi Genre as an option to agrupate movies with more than one genre (ie Drama, comedy, mistery will display as Drama) tell me if i'm wrong.
3. Sorting the list by movie title is case sensitive. Movies in low case are in the end of the list. Also those wich start with an accent, as À bout de souffle (and this one has a special problem, is not listed on the "A" list.
thanks again for all your work and effort
KABECi
check my PHP list: http://cinevideo.tz4.com
then... i'm having some little problems:
1. I cannot list my movies with the TranslatedTitle instead of the OriginalTitle. I've changed this on settings.php
Code: Select all
$_SESSION['usedTitle'] = 'OriginalTitle'
Code: Select all
$_SESSION['usedTitle'] = 'TranslatedTitle'
2. Multi genre is not working (i've activated it in the settings.php). I understand Multi Genre as an option to agrupate movies with more than one genre (ie Drama, comedy, mistery will display as Drama) tell me if i'm wrong.
3. Sorting the list by movie title is case sensitive. Movies in low case are in the end of the list. Also those wich start with an accent, as À bout de souffle (and this one has a special problem, is not listed on the "A" list.
thanks again for all your work and effort
KABECi
check my PHP list: http://cinevideo.tz4.com
Hi there I´m trying this great script, but I´m having a bit truble, first of all, the images where not shown, after a quick look at the code it was because the images were not at the same folder as the script so I fixed it adding the correct path in main.php where the image is loaded, maibe a variable could be added to set the path of the catalog, the lots notice problem sometimes can be solved by adding this: ini_set("display_errors","0"); before the session_start(); ( if the server php configuration allows ini_set() ), and now I have another little trouble, I can't see the category list It keeps on refreshing forever.
Maybe for future releases a borrow feature can be added?
Anyone can help me?
Thanks in advance and sorry for my poor english.
Maybe for future releases a borrow feature can be added?
Anyone can help me?
Thanks in advance and sorry for my poor english.
Back again still in trouble with the category list, and one new, the report gnerator for actor, directors and history don´t work for me I get:
actors: 0 res_ACTORSINLIST
directors :0 res_ACTORSINLIST
history: 0 res_YEARSINLIST
it seems that the language variable is not replaced, maybe I changed something that make it didn´t work as espected, don´t know.
More...
When I select an order different from the settings, i.e. if the order in the settings is number and you click on director, when I press the next button the order is back in number, is it a normal behaviour?
I´ve translated to spanish some strings and updated some, I´ll be pleased if you use it.
Well thanks again, I´ll keep on looking for troubles .
actors: 0 res_ACTORSINLIST
directors :0 res_ACTORSINLIST
history: 0 res_YEARSINLIST
it seems that the language variable is not replaced, maybe I changed something that make it didn´t work as espected, don´t know.
More...
When I select an order different from the settings, i.e. if the order in the settings is number and you click on director, when I press the next button the order is back in number, is it a normal behaviour?
I´ve translated to spanish some strings and updated some, I´ll be pleased if you use it.
Code: Select all
<?php
// PHP debug mode ON(1)/OFF(0)
ini_set("display_errors","0");
session_start();
/**
* language_spanish.php
*
* secuencias predefinidas para la tradución española
*
* changes:
* - 07 Aug 03: initial version
*/
define ("res_SEARCH", "Buscar");
define ("res_SEARCH_ACTORS_DIRECTORS_AND_TITLES", "Buscar por actores, directores o título");
define ("res_LOADING", "Cargando");
define ("res_CATEGORIES", "Categorías");
define ("res_MOVIES", "Películas");
define ("res_ALL", "Todas");
define ("res_PAGE", "Página");
define ("res_LIST", "Lista");
define ("res_SEARCH_RESULTS", "Resultados");
define ("res_DETAILS", "Detalles");
define ("res_STATISTICS", "Estadístícas");
define ("res_OPTIONS", "Opciones");
define ("res_TITLE", "Título");
define ("res_DIRECTOR", "Director");
define ("res_COUNTRY", "País");
define ("res_CATEGORY", "Categoría");
define ("res_YEAR", "Año");
define ("res_LENGTH", "Duración");
define ("res_RATING", "Calificación");
define ("res_DIRECTEDBY", "Dirigida por");
define ("res_CAST", "Reparto");
define ("res_COMMENTS", "Comentarios");
define ("res_DESCRIPTION", "Descripción");
define ("res_TECHNICALINFORMATION", "Información Técnica");
define ("res_LANGUAGE", "Lenguaje");
define ("res_SUBS", "Subtítulos");
define ("res_ADDED", "Agregada");
define ("res_STATUS", "Estado");
define ("res_LENT", "Duración");
define ("res_NA", "n/a");
define ("res_COMPLETERUNTIME", "Tiempo pasado completo");
define ("res_AVERAGERUNTIME", "Tiempo pasado medio");
define ("res_PERCENTAGE", "Porcentaje");
define ("res_GENERATEACTORSREPORT", "Generar estadísticas por actores");
define ("res_GENERATEDIRECTORSREPORT", "Generar estadísticas por directores");
define ("res_GENERATEHISTORYREPORT", "Generar estadísticas por años");
define ("res_ACTORSINLIST", "actores en la lista");
define ("res_DIRECTORSINLIST", "directores en la lista");
define ("res_YEARSINLIST", "años en la lista");
define ("res_ROWSPERPAGE", "Filas por página");
define ("res_UPDATE", "Actualizar");
define ("res_MULTIPLEGENREACTIVE","Soporte para múltiples géneros activos");
define ("res_NOSEARCHRESULTS", "No hubo resultados para su búsqueda");
define ("res_RESULTSFOUND", "resultado(s) para la búsqueda");
define ("res_NOMOVIESELECTED", "Por favor, seleccione una película de la lista primero.");
define ("res_CLICKTOCHANGESORT", "Click para cambiar el orden");
?>
sorry there was some misstakes:
new one:
sorry.
new one:
Code: Select all
<?php
// PHP debug mode ON(1)/OFF(0)
ini_set("display_errors","0");
session_start();
/**
* language_spanish.php
*
* secuencias predefinidas para la tradución española
*
* changes:
* - 07 Aug 03: initial version
*/
define ("res_SEARCH", "Buscar");
define ("res_SEARCH_ACTORS_DIRECTORS_AND_TITLES", "Buscar por actores, directores o título");
define ("res_LOADING", "Cargando");
define ("res_CATEGORIES", "Categorías");
define ("res_MOVIES", "Películas");
define ("res_ALL", "Todas");
define ("res_PAGE", "Página");
define ("res_LIST", "Lista");
define ("res_SEARCH_RESULTS", "Resultados");
define ("res_DETAILS", "Detalles");
define ("res_STATISTICS", "Estadísticas");
define ("res_OPTIONS", "Opciones");
define ("res_TITLE", "Título");
define ("res_DIRECTOR", "Director");
define ("res_COUNTRY", "País");
define ("res_CATEGORY", "Categoría");
define ("res_YEAR", "Año");
define ("res_LENGTH", "Duración");
define ("res_RATING", "Calificación");
define ("res_DIRECTEDBY", "Dirigida por");
define ("res_CAST", "Reparto");
define ("res_COMMENTS", "Comentarios");
define ("res_DESCRIPTION", "Descripción");
define ("res_TECHNICALINFORMATION", "Información Técnica");
define ("res_LANGUAGE", "Lenguaje");
define ("res_SUBS", "Subtítulos");
define ("res_ADDED", "Agregada");
define ("res_STATUS", "Estado");
define ("res_LENT", "Duración");
define ("res_NA", "n/a");
define ("res_COMPLETERUNTIME", "Duración total");
define ("res_AVERAGERUNTIME", "Duración media");
define ("res_PERCENTAGE", "Porcentaje");
define ("res_GENERATEACTORSREPORT", "Generar estadísticas por actores");
define ("res_GENERATEDIRECTORSREPORT", "Generar estadísticas por directores");
define ("res_GENERATEHISTORYREPORT", "Generar estadísticas por historial);
define ("res_ACTORSINLIST", "actores en la lista");
define ("res_DIRECTORSINLIST", "directores en la lista");
define ("res_YEARSINLIST", "años en la lista");
define ("res_ROWSPERPAGE", "Filas por página");
define ("res_UPDATE", "Actualizar");
define ("res_MULTIPLEGENREACTIVE","Soporte para múltiples géneros activos");
define ("res_NOSEARCHRESULTS", "No hubo resultados para su búsqueda");
define ("res_RESULTSFOUND", "resultado(s) para la búsqueda");
define ("res_NOMOVIESELECTED", "Por favor, seleccione una película de la lista primero.");
define ("res_CLICKTOCHANGESORT", "Click para cambiar el orden");
?>
Images, how
I just need to know two simple things, where do I put the images and what should they be called? I have changed nothing from the default, my XML is therefore called MovieCatalog.xml. Thanks.
-
- Posts: 25
- Joined: 2004-07-16 09:12:26
- Location: Moscow, Russia
- Contact:
I've made an extremely Russian-localized version of AMCphp 1.0 for our intranet 1TB Movie Server, containing 850 movies on hard disks, and called it AMCphp Russian Edition.
Demo Site:
http://musicvideos.ru/videodb/ - default language is English, but you can change it in "Options" (languages besides English & Russian just partially supported). Your browser must support win1251-codepage to view Cyrillic letters!
There are only local links to AVI-files, so don't try to download movies from this Demo-Site
ScreenShots: (with Russian interface)
http://musicvideos.ru/videodb/_screenshots/videodb1.jpg
http://musicvideos.ru/videodb/_screenshots/videodb2.jpg
http://musicvideos.ru/videodb/_screenshots/videodb3.jpg
http://musicvideos.ru/videodb/_screenshots/videodb4.jpg
Downloads:
AMCphp 1.0 Russian Edition Source code [30 KB]
Sample Video-Catalog [400 KB] (XML file only)
Pictures for Sample Video-Catalog [4,5 MB]
Unpack Sample Video Catalog and Pictures (optional) into the "data"-subdirectory. Note, that all movie descriptions and people names are in Russian! But if you want to make Russian Video-Catalog, feel free to use it as a template for your base.
Main changes since original AMCphp 1.0:
- Changed design: new appearance and more compact conception
- Added Russian interface (language_russian.php)
- Added 12 new language strings to the end of files "language_russian.php" and "language_english.php" (add & translate these strings to other language files, if you use them)
- Added Russian letters to the fast access panel by initial letters - linked them with "TranslatedTitles"
- Added Directory setting, where XML-file and all pictures placed (variable $xmlDir in "parser.php")
- Fixed errors in Java Scripts, lead before to non-working in IE with enabled "script debugging" (JS console appeared). String highlighting in movie list now working much faster - not slow even in tables with more than 800 movies (functions.js)
- Disabled all error reporting directly from PHP-scripts - now working well even on Web-servers with "error_reporring=E_ALL" in PHP settings
(added string "ini_set('display_errors','0');" before "session_start()")
- Changed types of columns in Movie List (Number, TranslatedTitle, OriginalTitle, Category, Country, Year)
- Changed to the common style fields "Runtime", "Category" and "Country" in Detailed View
- Changed presentation of field "Technical Information" in Detailed View
- Added search by "TranslatedTitle"
- Added links to Catalog filtering by the same "Country" and "Year" in Detailed View
- Added links to Detailed View of movies in Reports by Actors, Directors and Years (*_report.php)
- Treated field "Movie Rating" as "Movie Quality" (i.e. audio- & video-quality, determined manually)
- Treated field "Website" as "URL" of File-Server's corresponding directory, containing movie's AVI-file instead of default movie description
- Number of all movies in base is showed near the link "All" in category list
- Added category "New", implemented Catalog's reverse sort by movie numbers
- Some files link to local BBClone's PHP-Counter (particularly to http://musicvideos.ru/bbclone/ ), but you may leave this part of code as is, even if you don't need them - no errors will appear.
- Total size of source code is increased by 13 KB
Scripts may not work in configurations differing from my default, so change file "settings.php" carefully!
About speed...
As I said, my Video-Catalog contains 850 movies (size of XML-file >1 MB). Of course, AMCphp is working very slowly with it. Even after optimization of Web-Server's PHP-module with Zend PHP Optimizer, AMCphp loads in 15 seconds, and all next operations takes about 5 seconds. Server's CPU is PIII-1133MHz, but even upgrade to P4-3GHz won't completely solve this problem, because we have about 100 new movies every month!
So I'm looking for other optimize methods (SQL-support, caching, dividing base to several files, etc) or even other (faster) AMC PHP-template...
Demo Site:
http://musicvideos.ru/videodb/ - default language is English, but you can change it in "Options" (languages besides English & Russian just partially supported). Your browser must support win1251-codepage to view Cyrillic letters!
There are only local links to AVI-files, so don't try to download movies from this Demo-Site
ScreenShots: (with Russian interface)
http://musicvideos.ru/videodb/_screenshots/videodb1.jpg
http://musicvideos.ru/videodb/_screenshots/videodb2.jpg
http://musicvideos.ru/videodb/_screenshots/videodb3.jpg
http://musicvideos.ru/videodb/_screenshots/videodb4.jpg
Downloads:
AMCphp 1.0 Russian Edition Source code [30 KB]
Sample Video-Catalog [400 KB] (XML file only)
Pictures for Sample Video-Catalog [4,5 MB]
Unpack Sample Video Catalog and Pictures (optional) into the "data"-subdirectory. Note, that all movie descriptions and people names are in Russian! But if you want to make Russian Video-Catalog, feel free to use it as a template for your base.
Main changes since original AMCphp 1.0:
- Changed design: new appearance and more compact conception
- Added Russian interface (language_russian.php)
- Added 12 new language strings to the end of files "language_russian.php" and "language_english.php" (add & translate these strings to other language files, if you use them)
- Added Russian letters to the fast access panel by initial letters - linked them with "TranslatedTitles"
- Added Directory setting, where XML-file and all pictures placed (variable $xmlDir in "parser.php")
- Fixed errors in Java Scripts, lead before to non-working in IE with enabled "script debugging" (JS console appeared). String highlighting in movie list now working much faster - not slow even in tables with more than 800 movies (functions.js)
- Disabled all error reporting directly from PHP-scripts - now working well even on Web-servers with "error_reporring=E_ALL" in PHP settings
(added string "ini_set('display_errors','0');" before "session_start()")
- Changed types of columns in Movie List (Number, TranslatedTitle, OriginalTitle, Category, Country, Year)
- Changed to the common style fields "Runtime", "Category" and "Country" in Detailed View
- Changed presentation of field "Technical Information" in Detailed View
- Added search by "TranslatedTitle"
- Added links to Catalog filtering by the same "Country" and "Year" in Detailed View
- Added links to Detailed View of movies in Reports by Actors, Directors and Years (*_report.php)
- Treated field "Movie Rating" as "Movie Quality" (i.e. audio- & video-quality, determined manually)
- Treated field "Website" as "URL" of File-Server's corresponding directory, containing movie's AVI-file instead of default movie description
- Number of all movies in base is showed near the link "All" in category list
- Added category "New", implemented Catalog's reverse sort by movie numbers
- Some files link to local BBClone's PHP-Counter (particularly to http://musicvideos.ru/bbclone/ ), but you may leave this part of code as is, even if you don't need them - no errors will appear.
- Total size of source code is increased by 13 KB
Scripts may not work in configurations differing from my default, so change file "settings.php" carefully!
About speed...
As I said, my Video-Catalog contains 850 movies (size of XML-file >1 MB). Of course, AMCphp is working very slowly with it. Even after optimization of Web-Server's PHP-module with Zend PHP Optimizer, AMCphp loads in 15 seconds, and all next operations takes about 5 seconds. Server's CPU is PIII-1133MHz, but even upgrade to P4-3GHz won't completely solve this problem, because we have about 100 new movies every month!
So I'm looking for other optimize methods (SQL-support, caching, dividing base to several files, etc) or even other (faster) AMC PHP-template...
Last edited by Alexey Petrov on 2005-11-21 09:55:42, edited 2 times in total.
otchen chorocho! (It's been a while since I last spoke russian, and I can't really write it without cyrillic letters )
You might consider moving to the recently released PHP5 and rewrite the xml handling. I've heard the new xml parser is much faster. Also, keeping the parsed xml as an session variable array probably isn't the smartest idea I've ever had
Btw. I was just about to work on AMCphp again (support for switching between multiple xml and making the lists highly configurable). I hope you don't mind, if I borrow a few lines from your code?
edit: Made up my mind, I will add php5 support myself (keeping php4 compatibility though...)
You might consider moving to the recently released PHP5 and rewrite the xml handling. I've heard the new xml parser is much faster. Also, keeping the parsed xml as an session variable array probably isn't the smartest idea I've ever had
Btw. I was just about to work on AMCphp again (support for switching between multiple xml and making the lists highly configurable). I hope you don't mind, if I borrow a few lines from your code?
edit: Made up my mind, I will add php5 support myself (keeping php4 compatibility though...)
-
- Posts: 25
- Joined: 2004-07-16 09:12:26
- Location: Moscow, Russia
- Contact:
You may freely use my code. Though some parts are not mine: e.g. file "functions.js" I borrowed from project PHPMyAdmin.
I've tested Free51's PHP Template with my large VideoBase... and it works about 10 times faster! Because it doesn't use XML-parsing at all - just simple operations with text file, not storing anything in session variables. Unfortunately it badly works with Opera, was written in French and has awful English translation... but I'm going to translate it in Russian too.
You was planning to create Flash version of AMCphp. Is there some results at this branch?
I've tested Free51's PHP Template with my large VideoBase... and it works about 10 times faster! Because it doesn't use XML-parsing at all - just simple operations with text file, not storing anything in session variables. Unfortunately it badly works with Opera, was written in French and has awful English translation... but I'm going to translate it in Russian too.
You was planning to create Flash version of AMCphp. Is there some results at this branch?
AMCflash: Not yet, had a system crash
About speed: As I've said, processing the complete xml at startup is a somewhat stupid idea. But php4's xml processing is so bad, it's a major pain to do it on request... But I've considered changing it anyway. I might have to branch a php5 version though, which would mean you have to reinsert your changes
About speed: As I've said, processing the complete xml at startup is a somewhat stupid idea. But php4's xml processing is so bad, it's a major pain to do it on request... But I've considered changing it anyway. I might have to branch a php5 version though, which would mean you have to reinsert your changes
-
- Posts: 25
- Joined: 2004-07-16 09:12:26
- Location: Moscow, Russia
- Contact:
Try to implement in your future PHP5 Template version useful (for everybody) changes from my release and I will reinsert all the rest after that.
List of my implemented features, that could be useful in AMCphp official version: (IMHO)
- (4) New design (or simple themes support?)
- (2) More extensive content linking (by Country, Year & from Reports)
- (0) Support of Russian interface (language_russian.php)
- (3) Optional second string in "FirstLetters Bar" (English & Translated letters, customizable in one array from language-file)
- (1) Directory setting, where XML-file and all pictures placed
- (2) Faster Java Scripts
- (1) Disable all error reporting directly from PHP-scripts
- (5) Customizable types and widthes of columns in Movie List (it's well implemented in Free51's PHP Template)
- (1) Add search by "TranslatedTitle" (optional?)
- (1) Show number of all movies in base near the link "All" in category list
- (1) Category "New", implementing Catalog's reverse sort by movie numbers (optional?)
(In brackets I placed 5-mark rating of assumed implementation complexity for every feature)
Also you wrote somewhen:
The best results, I could get, was at hosting, where Internet-mirror of my Demo site is placed: http://musicvideos.ru/videodb - There is something about P4-2GHz/1024MB/SCSI (not heavily overloaded by other sites), and it parses 1MB XML-file with 850 movies (at session starting) for about 10 seconds!
Possibly, multigenre support or some other AMCphp 1.0 features significantly slow down XML-parsing?
Can you give me your 1 MB videobase and "settings.php"-file, which you have tested?
PS: More about embedded search... I'm writing now File Searcher in PHP and can implement its Search Engine in AMCphp.
Supported features:
1. Query "Harry Potter" will found "Harry Potter: Sudden Death" & "New Harry Super Potter 2"
2. Alternative *-masks: "Harry Potter" = "Harry*Potter" = "*HARRY*POTTER*"
3. Text highlighting of concurred parts: "Harry Potter: Sudden Death" & "New Harry Super Potter 2"
it uses PHP's native regexp functions for search and works very fast
List of my implemented features, that could be useful in AMCphp official version: (IMHO)
- (4) New design (or simple themes support?)
- (2) More extensive content linking (by Country, Year & from Reports)
- (0) Support of Russian interface (language_russian.php)
- (3) Optional second string in "FirstLetters Bar" (English & Translated letters, customizable in one array from language-file)
- (1) Directory setting, where XML-file and all pictures placed
- (2) Faster Java Scripts
- (1) Disable all error reporting directly from PHP-scripts
- (5) Customizable types and widthes of columns in Movie List (it's well implemented in Free51's PHP Template)
- (1) Add search by "TranslatedTitle" (optional?)
- (1) Show number of all movies in base near the link "All" in category list
- (1) Category "New", implementing Catalog's reverse sort by movie numbers (optional?)
(In brackets I placed 5-mark rating of assumed implementation complexity for every feature)
Also you wrote somewhen:
I wonder: what server configuration and AMCphp settings was there?Though I've tested AMCphp on various servers with xml over 1MB and encountered no problem at all. Reading and parsing the xml usually takes less than 3 secs.
The best results, I could get, was at hosting, where Internet-mirror of my Demo site is placed: http://musicvideos.ru/videodb - There is something about P4-2GHz/1024MB/SCSI (not heavily overloaded by other sites), and it parses 1MB XML-file with 850 movies (at session starting) for about 10 seconds!
Possibly, multigenre support or some other AMCphp 1.0 features significantly slow down XML-parsing?
Can you give me your 1 MB videobase and "settings.php"-file, which you have tested?
PS: More about embedded search... I'm writing now File Searcher in PHP and can implement its Search Engine in AMCphp.
Supported features:
1. Query "Harry Potter" will found "Harry Potter: Sudden Death" & "New Harry Super Potter 2"
2. Alternative *-masks: "Harry Potter" = "Harry*Potter" = "*HARRY*POTTER*"
3. Text highlighting of concurred parts: "Harry Potter: Sudden Death" & "New Harry Super Potter 2"
it uses PHP's native regexp functions for search and works very fast
I just had a look at our new Flash MX 2k4. Not bad... Finally some forms components and decent XML handling. I played around with it and easily managed to read an AMC xml into a Grid. Performance was a little slow though. But that might just be my overloaded development system I'll try to make a basic AMCflash to toy around.
Alexey, could you please mail me your 1MB catalog xml? Would be nice for testing...
ormus7577@go.com
ormus7577@go.com
-
- Posts: 25
- Joined: 2004-07-16 09:12:26
- Location: Moscow, Russia
- Contact:
I have already written links to my catalog earlier:
Please, send me also your video-catalog to petrov@bisinter.ruSample Video-Catalog [400 KB] (XML file only)
Pictures for Sample Video-Catalog [4,5 MB]
Unpack Sample Video Catalog and Pictures (optional) into the "data"-subdirectory. Note, that all movie descriptions and people names are in Russian! But if you want to make Russian Video-Catalog, feel free to use it as a template for your base.
ups, mea culpa
the new xml handling of php5 seems to be a major performance boost. I've started a php5 rewrite of AMCphp (including many of your changes and new features like free selection of columns to show). The category list of your xml file is built in under 1 second on my localhost Haven't rewritten the main list yet, I'll keep you informed on the performance...
the new xml handling of php5 seems to be a major performance boost. I've started a php5 rewrite of AMCphp (including many of your changes and new features like free selection of columns to show). The category list of your xml file is built in under 1 second on my localhost Haven't rewritten the main list yet, I'll keep you informed on the performance...
-
- Posts: 25
- Joined: 2004-07-16 09:12:26
- Location: Moscow, Russia
- Contact: