PK's MovieDB Release.V3.0 (Dynamic PHP View)
My little modification: http://cconradd.dvd.pl/
What do you think?
What do you think?
It's still not working.
I have
The subtitels are , seperated but not seperated to click on it.
I have
Code: Select all
<div class='languages'><b>$LANG[LANGUAGES]: </b><a href='$MOVIE[LANGUAGES_HREF]'>$MOVIE[LANGUAGES]</a></div>
<div class='subtitles'><b>$LANG[SUBTITLES]: </b><a href='$MOVIE[SUBTITLES_HREF]'>$MOVIE[SUBTITLES]</a></div>
little change, it should beJ.P. wrote:It's still not working.
I haveThe subtitels are , seperated but not seperated to click on it.Code: Select all
<div class='languages'><b>$LANG[LANGUAGES]: </b><a href='$MOVIE[LANGUAGES_HREF]'>$MOVIE[LANGUAGES]</a></div> <div class='subtitles'><b>$LANG[SUBTITLES]: </b><a href='$MOVIE[SUBTITLES_HREF]'>$MOVIE[SUBTITLES]</a></div>
Code: Select all
<div class='subtitles'><b>$LANG[SUBTITLES]: </b>
{SUBTITLES;, }<a href='$SUBTITLE[HREF]'>$SUBTITLE[TEXT]</a>{/SUBTITLES}</div>
infact all the fields that are in the $this->config['options']['comma_seperated'] field can have the above done.
eg.. let pic country it would be
Code: Select all
<div class='country'><b>$LANG[country]: </b>
{COUNTRYS;, }<a href='$COUNTRY[HREF]'>$COUNTRY[TEXT]</a>{/COUNTRYS}</div>
next you use $COUNTRY or $SUBTITLE is now an array, HREF being the URL, and TEXT being the displayed field.
Kaz.
Ok thanks, it's works...kazgor wrote:little change, it should beJ.P. wrote:It's still not working.
I haveThe subtitels are , seperated but not seperated to click on it.Code: Select all
<div class='languages'><b>$LANG[LANGUAGES]: </b><a href='$MOVIE[LANGUAGES_HREF]'>$MOVIE[LANGUAGES]</a></div> <div class='subtitles'><b>$LANG[SUBTITLES]: </b><a href='$MOVIE[SUBTITLES_HREF]'>$MOVIE[SUBTITLES]</a></div>
the magic is done by the {SUBTITLES;, } bit.Code: Select all
<div class='subtitles'><b>$LANG[SUBTITLES]: </b> {SUBTITLES;, }<a href='$SUBTITLE[HREF]'>$SUBTITLE[TEXT]</a>{/SUBTITLES}</div>
infact all the fields that are in the $this->config['options']['comma_seperated'] field can have the above done.
eg.. let pic country it would be
from the code, it takes the field name eg SUBTITLES, removes the last S if its there.. and then puts an S at the end. this is what you then use inside the { }, so for SUBTITLES it stayes the same, but from COUNTRY it becomes COUNTRYSCode: Select all
<div class='country'><b>$LANG[country]: </b> {COUNTRYS;, }<a href='$COUNTRY[HREF]'>$COUNTRY[TEXT]</a>{/COUNTRYS}</div>
next you use $COUNTRY or $SUBTITLE is now an array, HREF being the URL, and TEXT being the displayed field.
Kaz.
What is the differense between $SUBTITLE[TEXT] and $ACTOR[NAME], i mean the NAME and TEXT
$ACTORS are treated differently to say $SUBTITLES/$COUNTRY, ACTORS are sent through some additional filtering/splitting up routine.check out inJ.P. wrote:Ok thanks, it's works...
What is the differense between $SUBTITLE[TEXT] and $ACTOR[NAME], i mean the NAME and TEXT
mdb_movie.inc --> _parse_names($dbfield)
I LOVE IT!My little modification: http://cconradd.dvd.pl/ grin
What do you think? grin
------------------------
An Update:
I haven't forgotten about ya'll, just trying to focus on my GRE studies.
My Website is down. I didn't do this very smoothly, but I am moving everything to a new server. I am thinking about putting this code on Google Projects or something similar, then I don't need to worry about it not being available ever.
DOWNLOAD VERSION 3.0.3 HERE:
http://pkwebstudio.com/tmp
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.
Version 4 will again be quite different. I did a lot of experimenting with the code thats currently released, and in the end, Im not very happy with the current state of the code. I want more object based, a better dividing line between code and templates. I was planning to adopt the MVC framework, or possibly mold my own.
A few things I have been pondering for V4.
+ Ability to star movies you like (It would be session or cookie based, you would be able to save a list to your local machine or something when your done.
+ Better template support with PHP ability. What I did in V3 is a lot of code and in the end, loss of functionality. Simple is better, stronger, faster (like cheetah!)
+ Page caching, an end to long load times.. these pages aren't changing unless there is a database update.. why keep calculating and using CPU time.
+ Allow admin to make minor database changes, like who's borrowing a movie, or custom movie ratings, comments. These would need to be kept in separate fields or even a separate table to not interfere with ANT's database. This is probably the feature that's farthest out, it would require a login/user system as well.
Hi Mike.. nice to hear from you again
I like the ideas you have for V4. Esp the PHP code in Templates, as you can see if you've read back a few posts, we've added quite a few little extras. In the mods i've added, i've needed to update some of the core php files that if you were to release a new version i would have to remember what i've updated/changed.
ps.. can you outline the bug fixes you made in 3.0.4 to do with
searching whilst on page 2 onwards
good look with the exams matey.. and roll on V4
I like the ideas you have for V4. Esp the PHP code in Templates, as you can see if you've read back a few posts, we've added quite a few little extras. In the mods i've added, i've needed to update some of the core php files that if you were to release a new version i would have to remember what i've updated/changed.
ps.. can you outline the bug fixes you made in 3.0.4 to do with
searching whilst on page 2 onwards
good look with the exams matey.. and roll on V4
-
- Posts: 9
- Joined: 2007-07-09 15:26:06
Bonjour tout le monde,
Je viens de tester ce template rapidement au boulot et c'est franchement sympa. Seul problème, dans quel répertoire uploader les images de film? En effet le script ne trouve pas d'image :
http://dvdlist.funkybearz.com/moviesdb/
(Oui oui, c'est vraiment une base de test )
Merci beaucoup!
Sinon j'ai une tout autre question, lorsque je met à jour ma base AMC (lorsque j'ajoute un nouveau film par exemple), je devrais ré-exporter toute la base de donnée en .SQL et la ré-importer entièrement sur la base de donnée de mon site? Ou il y a un autre moyen?
Merci
/**************************/
Hi everyone,
I was just testing this template at work and it's really nice. But I have one problem, in which directory need I to upload the movies' images? See, the script didn't display the images :
http://dvdlist.funkybearz.com/moviesdb/
(Yes yes, it's really a test base )
Thank you so much!
I have a other question, if I update my AMC Base (if I add a new movie for an example), must I export all the base again and import it entierly again on my database? Or maybe there is an other way?
Thank's !
Je viens de tester ce template rapidement au boulot et c'est franchement sympa. Seul problème, dans quel répertoire uploader les images de film? En effet le script ne trouve pas d'image :
http://dvdlist.funkybearz.com/moviesdb/
(Oui oui, c'est vraiment une base de test )
Merci beaucoup!
Sinon j'ai une tout autre question, lorsque je met à jour ma base AMC (lorsque j'ajoute un nouveau film par exemple), je devrais ré-exporter toute la base de donnée en .SQL et la ré-importer entièrement sur la base de donnée de mon site? Ou il y a un autre moyen?
Merci
/**************************/
Hi everyone,
I was just testing this template at work and it's really nice. But I have one problem, in which directory need I to upload the movies' images? See, the script didn't display the images :
http://dvdlist.funkybearz.com/moviesdb/
(Yes yes, it's really a test base )
Thank you so much!
I have a other question, if I update my AMC Base (if I add a new movie for an example), must I export all the base again and import it entierly again on my database? Or maybe there is an other way?
Thank's !
-
- Posts: 9
- Joined: 2007-07-09 15:26:06
Yeah, it work. Thank you !kazgor wrote:Images should go into the antexport directory.
from your page that looks like its httpdocs/moviesdb/antexport/
and your images are called - moviesdb_1.jpg,
And what about my second question?
Thank's !I have a other question, if I update my AMC Base (if I add a new movie for an example), must I export all the base again and import it entierly again on my database? Or maybe there is an other way?
-
- Posts: 58
- Joined: 2006-12-08 18:19:18
- Location: The Land Down Under
No need to re-import all movies again
When you are exporting from AMC, make sure to have the movies you have added or updated selected first, then chose export to SQL. On this export screen there is a tick box to "Update instead of Insert", tick this and make sure that down the bottom "Movies to include" has the "Selected ()" radio button chosen. Can't recall for sure but you may have to also make sure the Number field is in the list to export (I have a feeling it isn't by default - can't check at the moment sorry).
One caveat here - don't do this sort of update if you've renumbered your movies as your MySQL database can get all mixed up.
Then all you need to do is upload the resulting nice and small sql file and any new images to your web server's antexport directory as normal.
Cheers.......Thermal
Thermal's Movie & TV Series db
When you are exporting from AMC, make sure to have the movies you have added or updated selected first, then chose export to SQL. On this export screen there is a tick box to "Update instead of Insert", tick this and make sure that down the bottom "Movies to include" has the "Selected ()" radio button chosen. Can't recall for sure but you may have to also make sure the Number field is in the list to export (I have a feeling it isn't by default - can't check at the moment sorry).
One caveat here - don't do this sort of update if you've renumbered your movies as your MySQL database can get all mixed up.
Then all you need to do is upload the resulting nice and small sql file and any new images to your web server's antexport directory as normal.
Cheers.......Thermal
Thermal's Movie & TV Series db
-
- Posts: 9
- Joined: 2007-07-09 15:26:06
Yes, it work! thank you a lot!Thermal Ions wrote:No need to re-import all movies again
When you are exporting from AMC, make sure to have the movies you have added or updated selected first, then chose export to SQL. On this export screen there is a tick box to "Update instead of Insert", tick this and make sure that down the bottom "Movies to include" has the "Selected ()" radio button chosen. Can't recall for sure but you may have to also make sure the Number field is in the list to export (I have a feeling it isn't by default - can't check at the moment sorry).
One caveat here - don't do this sort of update if you've renumbered your movies as your MySQL database can get all mixed up.
Then all you need to do is upload the resulting nice and small sql file and any new images to your web server's antexport directory as normal.
Cheers.......Thermal
Thermal's Movie & TV Series db
My last question... for the moment
When I export SQL & put on the template, all the special character like "é" "à" ... are missing and the rest of the text is missing too.
For example : "Il est méchant" is giving up : "Il est m"
How can I fix it?
Thankssssss!
/****************************/
Une derniere question!
Quand j'exporte via SQL et que j'importe dans le template, tous les caractères spéciaux comme "é", "à" etc... disparaissent et le reste du texte aussi.
Par exemple : "Il est méchant" donnera "Il est m"
Comment puis-je y remédier?
Merci!
-
- Posts: 9
- Joined: 2007-07-09 15:26:06
-
- Posts: 96
- Joined: 2006-03-12 01:07:41
Could you help me please ?
This template is very good !
I took a look and I want mine
But I don't have any PHP or MySQL knowledge...
I only know HTML...
I installed PHP and did the setup in my web server (Abyss) folowing a tutorial.
I installed MySQL 4.1.22 with typical installation.
I created a folder on my server httpdocs\moviesdb
I extracted moviedb_v3.0.3.zip to this folder.
I have edited mdb_config.inc with this info:
$this->config['mysql']['server'] = "localhost";
$this->config['mysql']['username'] = "";
$this->config['mysql']['password'] = "";
$this->config['mysql']['database'] = "films";
$this->config['mysql']['table'] = "movies";
I have exported my movies database in SQL to the antexport folder.
The table name is movies and the file name is films.sql
When I try to open index.php in the httpdocs\moviesdb folder I get this:
DROP TABLE IF EXISTS movies;
Invalid Query: No database selected
If I try a second time I get this:
SELECT SOURCE,count(*) FROM ``.`movies` GROUP BY SOURCE ORDER BY SOURCE
Invalid Query: Incorrect table name 'movies'
What am I doing wrong ?
Can someone give me a little tutorial please ?
Or tell me what I am missing.
Thnaks !!!
This template is very good !
I took a look and I want mine
But I don't have any PHP or MySQL knowledge...
I only know HTML...
I installed PHP and did the setup in my web server (Abyss) folowing a tutorial.
I installed MySQL 4.1.22 with typical installation.
I created a folder on my server httpdocs\moviesdb
I extracted moviedb_v3.0.3.zip to this folder.
I have edited mdb_config.inc with this info:
$this->config['mysql']['server'] = "localhost";
$this->config['mysql']['username'] = "";
$this->config['mysql']['password'] = "";
$this->config['mysql']['database'] = "films";
$this->config['mysql']['table'] = "movies";
I have exported my movies database in SQL to the antexport folder.
The table name is movies and the file name is films.sql
When I try to open index.php in the httpdocs\moviesdb folder I get this:
DROP TABLE IF EXISTS movies;
Invalid Query: No database selected
If I try a second time I get this:
SELECT SOURCE,count(*) FROM ``.`movies` GROUP BY SOURCE ORDER BY SOURCE
Invalid Query: Incorrect table name 'movies'
What am I doing wrong ?
Can someone give me a little tutorial please ?
Or tell me what I am missing.
Thnaks !!!
Sam you need to create a database/schema
---
I find that adding pictures in AMC to be time consuming. So I have a folder with covers of the movies by their names eg. FightClub.jpg.
So I modified a tiny part of your script PK to find the image.
Here is code if anyone is interested:
Find the resize.php in the templates/default/images folder,
and copy and paste it as a new file image.php.
Now editing the image.php file
Near the start replace the code where it says:
With this:
After that replace any referral to $_GET['img'] later in the code with
$img.
Then you need to edit a small part of the mdb_movie.inc in the initial folder
Replace the function template code with this. Note only a few lines have been changed. It introduces a webtitle attribute which can be used to remove apostrophes in movie titles.
Also on the pages where you want to use you need to replace the links
eg. The Detailed View template the detail_view.tpl file in your templates\Default folder
with
---
I find that adding pictures in AMC to be time consuming. So I have a folder with covers of the movies by their names eg. FightClub.jpg.
So I modified a tiny part of your script PK to find the image.
Here is code if anyone is interested:
Find the resize.php in the templates/default/images folder,
and copy and paste it as a new file image.php.
Now editing the image.php file
Near the start replace the code where it says:
Code: Select all
// Check the file exists, if not use the default
Code: Select all
$picdir = '../../../../pics/'; // location of your images folder
// Check the file exists, if not use the default
// yes I know this replaced can be made to look neater
$img = $_GET['img'];
$img = str_replace("The ", " ", $img);
$img = str_replace(", The", "", $img);
$img = str_replace("/", "", $img);
$img = str_replace(":", "", $img);
$img = str_replace(" ", "", $img);
$img = $img.".jpg";
$img = $picdir.$img;
$img.
Then you need to edit a small part of the mdb_movie.inc in the initial folder
Replace the function template code with this. Note only a few lines have been changed. It introduces a webtitle attribute which can be used to remove apostrophes in movie titles.
Code: Select all
function template() {
$tpl = new Template($this);
# Create a list of easy to convert variables.
$easyvars = array('NUM', 'CHECKED', 'MEDIA', 'MEDIATYPE', 'SOURCE', 'BORROWER', 'RATING',
'ORIGINALTITLE', 'FORMATTEDTITLE', 'COUNTRY', 'CATEGORY', 'YEAR', 'LENGTH', 'URL', 'COMMENTS',
'VIDEOFORMAT', 'VIDEOBITRATE', 'AUDIOFORMAT', 'AUDIOBITRATE', 'RESOLUTION', 'FRAMERATE', 'LANGUAGES',
'SUBTITLES', 'FILESIZE', 'DISKS', 'PICTURENAME');
# Loop through all the easyvars
foreach($easyvars as $dbfield) {
$tpl->add_var("\$MOVIE[$dbfield]", $this->data[$dbfield]);
$tpl->add_var("\$MOVIE[".$dbfield."_HREF]", $this->_href($this->data[$dbfield], $dbfield));
if (in_array($dbfield, $this->mdb->config['options']['comma_seperated'])) {
# Remove any ending 'S' in the variable name.
$varname = ((substr($dbfield, -1) != "S") ? $dbfield : substr($dbfield, 0, -1));
$tplname = $varname."S";
$subtpls = $this->_templates_comma_seperated($dbfield, $varname);
$tpl->add_subtpl($tplname, $subtpls);
}
}
$date_added = date($this->mdb->config['options']['date_format'], strtotime($this->data['DATEADD']));
// my code
$webtitle = $this->data['FORMATTEDTITLE'];
$webtitle = str_replace("'", "", $webtitle); //remove apostrophe
$tpl->add_var("\$MOVIE[WEBTITLE]", $webtitle);
//end of my code
$tpl->add_var("\$MOVIE[DATEADD]", $date_added);
$tpl->add_var("\$MOVIE[HREF]", $this->mdb->get_link(array("NUM" => $this->data['NUM'])));
$tpl->add_callback("\$MOVIE[DESCRIPTION]", "_callback_description", 1);
$tpl->add_subtpl("TRANSLATEDTITLES", $this->_templates_translatedtitles());
$tpl->add_subtpl("ACTORS", $this->_templates_names("ACTORS", "ACTOR", $this->actors));
$tpl->add_subtpl("DIRECTORS", $this->_templates_names("DIRECTORS", "DIRECTOR", $this->directors));
$tpl->add_subtpl("PRODUCERS", $this->_templates_names("PRODUCERS", "PRODUCER", $this->producers));
return $tpl;
}
eg. The Detailed View template the detail_view.tpl file in your templates\Default folder
Code: Select all
src='$TEMPLATEDIR/images/resize.php?img=$UNIXDIR$COVERSDIR$MOVIE[PICTURENAME]&w=160'
Code: Select all
src='$TEMPLATEDIR/images/image.php?img=$MOVIE[WEBTITLE]&w=160'
-
- Posts: 58
- Joined: 2006-12-08 18:19:18
- Location: The Land Down Under
Which is strange as the database IS being accessed as the movie details are all appearing. This php and sql rookie (or is that overrating myself) wonders if it's throwing an error there due to some unsupported function not compatible with the php or sql version the webserver is running.
Cheers.......Thermal
Thermal's Movie & TV Series db
Cheers.......Thermal
Thermal's Movie & TV Series db