PK's MovieDB Release.V2.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
Post Reply
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

Hi Svampen,

sorry you dont like my Media type mods.. actually to be honest i'm kinda shying away from it too.. i have a load of Xvids movies but haven't the time to add them.

Incidently you can always turn of the Media Type box by making sure this is set in your config.inc file

$moviedb->set_show_media_format(0);


anyway.. the block of code you've highlighted is the correct bit of code.

Couple of things to note here.

1. RESET will only show up only if the Search field is not blank.
2. the RESET text is pulled from the Language file, should be a field on there called RESET
3. a CLEAR is defined in the moviedb.css file ie (#mdb_search DIV.clear)

The block of code you need is

Code: Select all

if ($this->mdb_search != "")  {$html .= "<div class='clear'><a href='".$this->THISPAGE."?mdb_cat=".$this->mdb_cat."&mdb_npp=".$this->mdb_npp."&mdb_order=".$this->mdb_order."'>".$this->lang['reset']."</a></div>";}
I can't see anything else to mod has long has the above has been copied through correctly.

Hope it helps.
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

@mjs7231

Glad to hear you're still playing/modding this excellent template, please don't let any of my changes effect where you want to take your own script. :)

thanks for the kind offer of hosting, for now that awardspace is doing me fine.. but was very nice to have been asked :)


@Corey

Sorry not been around to offer any help, but glad to see you were able to learn something and solve your problem.. That the way i learned and still learning.
Corey
Posts: 17
Joined: 2006-08-13 13:03:30

Post by Corey »

@kazgor

You don't have to say sorry for anything :) It only motivated me to do some research by my own and it suprisingly worked just fine :>

But maybe you can help me with one thing: Is there some master command for entire script, that will make script to use defined encoding? For now I have placed the mysql_query("set names latin2; into every function. It would be nice to just type it only on the beggining and only once. If you could help me with that, I would be gratefull.
Svampen
Posts: 10
Joined: 2006-05-17 19:11:55

Post by Svampen »

Lord have mercy, I made it work :). For the record, I had to comment out this stuff (and switch the closing ')' to the place where it has to be):

Code: Select all

if ($this->mdb_search != "") {
            if ($this->mdb_cat != "") { $query .= " AND"; }
            if (($this->mdb_cat == "") and ($this->mdb_med !=""))  { $query .= " AND"; }
            $query .= " (ORIGINALTITLE LIKE '%".$this->mdb_search."%')";
       //     $query .= " OR MEDIATYPE LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR SOURCE LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR ORIGINALTITLE LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR TRANSLATEDTITLE LIKE '%".$this->mdb_search."%'";
       //    $query .= " OR DIRECTOR LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR PRODUCER LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR COUNTRY LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR CATEGORY LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR YEAR LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR ACTORS LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR DESCRIPTION LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR COMMENTS LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR VIDEOFORMAT LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR VIDEOBITRATE LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR AUDIOFORMAT LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR AUDIOBITRATE LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR RESOLUTION LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR FRAMERATE LIKE '%".$this->mdb_search."%'";
       //     $query .= " OR LANGUAGES LIKE '%".$this->mdb_search."%')";
        }
And change this default get variable to have ORIGINALTITLE instead of DATEADD

Code: Select all

$this->mdb_order    = (isset($_GET['mdb_order']) ? $_GET['mdb_order'] : "ORIGINALTITLE");
Otherwise it wouldn't work!!!

Thanks for the input and encouragement. And I still don't know how to code :) I have to use shamanic intuition or something to work this beast. I would've moved to ritual sacrifices for the god SQL next..
DeXeS
Posts: 1
Joined: 2006-09-06 13:18:29

Post by DeXeS »

I think if found a bug: when you press the sort function "most recent", the first movie you will see is the first movie you added instead of the most recent first..
TerraWan
Posts: 1
Joined: 2006-09-09 18:32:04

Post by TerraWan »

http://www.tew-hir.be/movies/
is my list, however it does not display my pictures correct

pictures are in http://www.tew-hir.be/movies/images/
and that path is filled in the config file

anybody an idea why it does not work?
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

@terrawan.

I think at some point you have unticked the `copy images to the same folder than the export file` and uploaded that SQL file to your website. and if you've done this in combo with DROPT TABLE & CREATE TABLE ticked then you effective you not told it what images filename are called.

I recommend you re-export and makesure PICTURENAME field is in the SQL file.


@DeXes.

Sorry seems fine with me, although if you look at TerraWan list you see it doing it there but thats an illussion, just his most recent film starts with a number so when sorted by Title it will still be first.

What do you have you DATE ADDED field set on yours? as its this field that MOST RECENT uses to sort the list by.
J.P.
Posts: 64
Joined: 2006-09-20 09:55:52

How to install

Post by J.P. »

Can someone tell me easy how to install this one in my database.
I have a database en have ant movie catalog export a sql file (map) and i have download moviedb_v2.2.
Please help me with this.
shadowbikes
Posts: 11
Joined: 2006-09-19 10:47:25
Contact:

Post by shadowbikes »

Hi,

if made a dutch language file

see ya Rene

Code: Select all

<?
/** ===============================================================================================
 * DUTCH Language file for MovieDB by PK-Designs.com
 * @author: M. Shepanski
 *=============================================================================================== */
$this->lang['categories']     = "Categoriën";
$this->lang['category']       = "Categorie";
$this->lang['comments']       = "Commentaar";
$this->lang['country']        = "Land";
$this->lang['description']    = "Beschrijving";
$this->lang['director']       = "Regiseur";
$this->lang['jump_to']        = "Ga naar";
$this->lang['length']         = "Lengte";
$this->lang['more']           = "meer";
$this->lang['most_recent']    = "Meest recente";
$this->lang['next']           = "volgende";
$this->lang['of']             = "van de";
$this->lang['page']           = "Pagina";
$this->lang['previous']       = "Vorige";
$this->lang['rating']         = "Waardering";
$this->lang['search']         = "Zoek";
$this->lang['showing']        = "gevonden";
$this->lang['sort_by']        = "Sorteer";
$this->lang['starring']       = "Acteurs";
$this->lang['title']          = "Titel";
$this->lang['year']           = "Jaar";
J.P.
Posts: 64
Joined: 2006-09-20 09:55:52

Post by J.P. »

maybe can you tell me how to install it, shadowbikes
J.P.
Posts: 64
Joined: 2006-09-20 09:55:52

Post by J.P. »

Multible names in director field were are now seperated.
How can i do this for the subtitels and language...

On the top of the page is the name of the movie, i want on the same rule on the right the MEDIA, how can i do this...
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

J.P could you post an example of what you mean?

The Subtitles and Languages fields would need to be programmed in the same manner that the Director field is done so that they can be seperated.
Last edited by kazgor on 2006-10-09 14:39:08, edited 1 time in total.
J.P.
Posts: 64
Joined: 2006-09-20 09:55:52

Post by J.P. »

My movie's are on http://www.palmans.net/dvdlijst
You see there Box nummer:
I wanted that on the same high as the movie name but on the right.
I wanted also that Ondertitels: Dutch, English is clickabel so that they can look for dutch or englisch subtitel and the same for language...
J.P.
Posts: 64
Joined: 2006-09-20 09:55:52

Post by J.P. »

An other 2 quetion...

Is there a way that when i click on the clear button that it's also go's to All Categories?

What must i change for Show 5/10/20 films per page.
I only find the whole page but not only the change...
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

Ok.. This is how you make the Language field clickable, hopefully you can figure out how to do the subtitles from this. I cheated and based this on the Director link.

in get_short_description_html($movieinfo) do

Code: Select all

$languages_string = "";

# Turn the directors list into links
$languages = $this->get_actors($movieinfo['LANGUAGES'], 0);
foreach($languages  as $languages  => $role) {
     if ($languages_string != "") { $languages_string .= ", "; }
     $languages_string .= "<a href='".$this->THISPAGE."?mdb_page=1&mdb_npp=".$this->mdb_npp."&mdb_order=".$this->mdb_order."&mdb_search=".$languages.$non_mdb_gets."'>".$languages."</a>";
}

now slightly further down in this section you will be printing those links eg for the director it will look like

Code: Select all

$html .= "      <br /><span>".$this->lang['director'].": </span>\n".$directors_string."\n";
so now add the language one so it looks similar eg

Code: Select all

$html .= "      <br /><span>".$this->lang['language'].": </span>".$languages_string."\n";
That should do the trick.. now you just repeat this for Subtitles, you will also need to do this to in the function get_full_detail_html($num) section.

Hope you can see what i've done there. :)
shadowbikes
Posts: 11
Joined: 2006-09-19 10:47:25
Contact:

Post by shadowbikes »

Hi there,

i removed the short description and put a list instead.
See on my webpage.

http://www.movie.xail.net/MD

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

Post by kazgor »

When you click on RESET to clear the search result you will have something like

Code: Select all

if ($this->mdb_search != "")  {$html .= "<div class='clear'><a href='".$this->THISPAGE."?mdb_cat=".$this->mdb_cat."&mdb_npp=".$this->mdb_npp."&mdb_order=".$this->mdb_order."'>".$this->lang['reset']."</a></div>";}
remove the .$this->mdb_cat from the above eg

Code: Select all

if ($this->mdb_search != "")  {$html .= "<div class='clear'><a href='".$this->THISPAGE."?mdb_cat="."&mdb_npp=".$this->mdb_npp."&mdb_order=".$this->mdb_order."'>".$this->lang['reset']."</a></div>";}
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

Adding Num/Page 5, 10, 20 you need to do a few things.

add the following to the CSS file.

Code: Select all

#mdb_filter_header DIV.num_per_page,
#mdb_filter_footer DIV.num_per_page {
	float: right;
	text-align: right;
	display: inline;
}
This needs ( maybe) go just after this code

Code: Select all

#mdb_filter_header SPAN,
#mdb_filter_footer SPAN {
	font-weight: bold;
} 
Edit your Language file in Resources and add

Code: Select all

$this->lang['num_per_page']   = "Num/Page";

Finally in the moviedb.inc in function get_filter_header_html($footer=FALSE) Just after the if (!$footer) {

add this block of code.. I haven't test to see if anything else is needed ie fields being initialised first.

Code: Select all

 	    $npp_options = array(5, 10, 20);
	    $html .= "  <div class='num_per_page'>\n";
            $html .= "    <span>".$this->lang['num_per_page'].": </span>\n";
            $npptext = "";
            foreach($npp_options as $npp) {
                if ($npptext != "") { $npptext .= " |\n"; }
                $classtext = (($npp == $this->mdb_npp) ? "class='selected' " : "");
                $npptext .= "    <a ".$classtext."href='".$this->THISPAGE."?mdb_cat=".$this->mdb_cat."&mdb_npp=".$npp."&mdb_search=".$this->mdb_search."&mdb_order=".$this->mdb_order.$non_mdb_gets."'>".$npp."</a>";
            }
            $html .= $npptext;
            $html .= "  </div>\n";
I think that should be about it ;)
J.P.
Posts: 64
Joined: 2006-09-20 09:55:52

Post by J.P. »

Thanks it's all working now only i must try the subtitels...
J.P.
Posts: 64
Joined: 2006-09-20 09:55:52

Post by J.P. »

Can you help me with the question abouth how to get the box nummer: on the right of the moviename?
Post Reply