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
MCVampire
Posts: 30
Joined: 2006-04-05 02:26:01

Post by MCVampire »

@axelv

I'm french so I will try to explain it in english.

... I't seem that you have changed the outter color of your corners. These corners are called by corner.php and you can change color via style.css ... ;

Open style.css.
Go to the /* MovieDB CURVY CORNERS section ... (around lines 12 to 27).
Curvy1 = big corner / Curvy2 = small corner / ic = inner corner / oc = outter corner.
Now find the curvy1 area (It's the first one) and change the oc value.

Look at these lines carefully;
#mdb .curvy1 .bl { background: url('images/corner.php?cn=bl&d=8&ic=******&oc=******') 0 100% no-repeat; background-color: #******; }
#mdb .curvy1 .br { background: url('images/corner.php?cn=br&d=8&ic=******&oc=******') 100% 100% no-repeat; }
#mdb .curvy1 .tl { background: url('images/corner.php?cn=tl&d=8&ic=******&oc=******') 0 0 no-repeat; }
#mdb .curvy1 .tr { background: url('images/corner.php?cn=tr&d=8&ic=******&oc=******') 100% 0 no-repeat; }

You have to change the sixth digit that I put the bold stars by the color of your background. Default are D8CBAA

Hope that help you.
Regards MCVampire
axelv
Posts: 19
Joined: 2008-04-08 22:28:18

Post by axelv »

I have corrected my code:

Code: Select all

#mdb .curvy1 .bl { background: url('images/corner.php?cn=bl&d=8&ic=B8AD91&oc=d8cbaa') 0 100% no-repeat; background-color: #b8ad91; }
#mdb .curvy1 .br { background: url('images/corner.php?cn=br&d=8&ic=B8AD91&oc=d8cbaa') 100% 100% no-repeat; }
#mdb .curvy1 .tl { background: url('images/corner.php?cn=tl&d=8&ic=B8AD91&oc=d8cbaa') 0 0 no-repeat; }
#mdb .curvy1 .tr { background: url('images/corner.php?cn=tr&d=8&ic=B8AD91&oc=d8cbaa') 100% 0 no-repeat; }
#mdb .curvy1 .iefix { font-size: 1px; height: 1px }

#mdb .curvy2 .bl { background: url('images/corner.php?cn=bl&d=3&ic=88806B&oc=d8cbaa') 0 100% no-repeat; background-color: #b8ad91; }
#mdb .curvy2 .br { background: url('images/corner.php?cn=br&d=3&ic=88806B&oc=d8cbaa') 100% 100% no-repeat; }
#mdb .curvy2 .tl { background: url('images/corner.php?cn=tl&d=3&ic=88806B&oc=d8cbaa') 0 0 no-repeat; }
#mdb .curvy2 .tr { background: url('images/corner.php?cn=tr&d=3&ic=88806B&oc=d8cbaa') 100% 0 no-repeat; }
but doesn't works!!
This is the result:
Image
MCVampire
Posts: 30
Joined: 2006-04-05 02:26:01

Post by MCVampire »

Hmmm :/
Try to empty your cache folder in ...templates\default\cache

Then go on the web page and make a refresh ...
If it's doesn't work, I can't help you anymore because it work for me ... it's maybe something else.


Regards MCVampire
axelv
Posts: 19
Joined: 2008-04-08 22:28:18

Post by axelv »

I had already tried to empty the cache. :(
giallo tulipano
Posts: 2
Joined: 2008-08-25 13:32:49

Post by giallo tulipano »

Great template thanks to everyone who worked on it!
I'm looking forward to Prikichi's and Kazgor's latest modifications.
Any news yet?
axelv
Posts: 19
Joined: 2008-04-08 22:28:18

Post by axelv »

Giallo Tulipano, sei italiano??
Mica mi sapresti aiutare sul problema postato sopra??? Non ne vengo a capo!! :(
giallo tulipano
Posts: 2
Joined: 2008-08-25 13:32:49

Post by giallo tulipano »

Sorry Axelv, I'm not Italian but Dutch. Just a big fan of Italian "Gialli".
Can't help you with your problem though, but it does seem cache related.
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

hi all.. im back from my Hols so just got a few bits to catch up with and i'll promise to upload my modded version for those that like it.

@Axelv, do you have a link to your site? just so i can see the corner colour problem in action. Can you confirm you did not make any changes to any CSS files or to corner.php#

Cheers
axelv
Posts: 19
Joined: 2008-04-08 22:28:18

Post by axelv »

Hi kazgor. I didn't make any changes to any CSS files or to corner.php.
I send you my web address by PM. ;)
azer
Posts: 12
Joined: 2007-04-14 15:17:33

Post by azer »

There is a bug in resize.php, if you have your images named by movie number.
If you rearrange the movie numbers or you change one of the pictures and if the image has previously been cached the wrong image will show up on the page.

This is because the script only crates a unique hashed name out of the GET command that is sent to resize.php

Here is a fix that will lessen the problem, it appends the filesize in bytes of the current file to the front of the file, if a file with same hash but another filesize exists, it's removed. You should empty your cache after applying this fix to avoid duplicates.

exchange

Code: Select all

// If chaching is ON, check to see we already created this file.
if ($caching == TRUE) {
    $cachename = md5(print_r($_GET, TRUE)).".png";
    $cachefile = $cachedir.$cachename;
    if (file_exists($cachefile)) {
        // Output our cached file, that was easy.
        header("Content-Type: image/png");
        header("Expires: ".gmdate("D, d M Y H:i:s",time()+24*60*60));
        imagepng(imagecreatefrompng($cachefile));
        exit();
    }
}
with

Code: Select all

//get image size
$img_size = filesize($_GET['img']);

// If chaching is ON, check to see we already created this file.
if ($caching == TRUE) {
    $cachename = md5(print_r($_GET, TRUE)).".png";
    $cachefile = $cachedir.$img_size."_".$cachename;
    $cachewild = $cachedir."*_".$cachename;
    foreach(glob($cachewild) as $fn) { 
        if (!($fn == $cachefile)){
            unlink($fn);
        }
    } 
    if (file_exists($cachefile)) {
        // Output our cached file, that was easy.
        header("Content-Type: image/png");
        header("Expires: ".gmdate("D, d M Y H:i:s",time()+24*60*60));
        if(imagepng(imagecreatefrompng($cachefile))){
            exit();
        }
    } 		
}
azer
Posts: 12
Joined: 2007-04-14 15:17:33

Post by azer »

@Axelv
You can try to narrow the error down by running the link for the corner image directly
try http://insertyoursitehere.com/templates ... &oc=d8cbaa
and you'll get a big version of the bottom left corner.
If you get a 500 error your version of php propably doesn't have imageGD

if you still get black corners you could try to insert

Code: Select all

ini_set("display_errors", 1);
	error_reporting(E_ALL);
after the comments in corner.php and refresh the link above to see what error php reports.
axelv
Posts: 19
Joined: 2008-04-08 22:28:18

Post by axelv »

Hi Azer, what is this link?? It doesn't works.....
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

axelv wrote:
Hi Azer, what is this link?? It doesn't works.....
pm'd you the correct link for your site.
kazgor
Posts: 175
Joined: 2006-05-08 13:13:52
Contact:

Post by kazgor »

azer wrote:There is a bug in resize.php, if you have your images named by movie number.
If you rearrange the movie numbers or you change one of the pictures and if the image has previously been cached the wrong image will show up on the page.
Just wanted to say i like the fixes you been posting, esp this one as i use movie numbers for my pictures and i get this exact problem when i sometimes change/delete stuff in the database.

Thanks!!
axelv
Posts: 19
Joined: 2008-04-08 22:28:18

Post by axelv »

azer wrote:@Axelv
if you still get black corners you could try to insert

Code: Select all

ini_set("display_errors", 1);
	error_reporting(E_ALL);
Excuse me AZER, I'm newbe in php. Where I must insert that code in corner.php exactly??

Sorry for my english
axelv
Posts: 19
Joined: 2008-04-08 22:28:18

Post by axelv »

I tried to change host. Now, I'm with altervista.org.
The site works fine, but now there aren't the corners!
Why???
azer
Posts: 12
Joined: 2007-04-14 15:17:33

Post by azer »

axelv wrote:
azer wrote:@Axelv
if you still get black corners you could try to insert

Code: Select all

ini_set("display_errors", 1);
	error_reporting(E_ALL);
Excuse me AZER, I'm newbe in php. Where I must insert that code in corner.php exactly??

Sorry for my english
as i said after the comments in corner.php
that would be before

Code: Select all

$caching = TRUE;
almost at the top
But don't do this if it works on the new site.

But what do you mean by 'there aren't the corners'.
If the site looks like on kazgor's site http://www.brunesmedia.co.uk/movies
then it's the way it's supposed to be.
The main purpose of corners.php is to round the corners. If you don't want to have corners you need to set the ci/co values in the styles.css file to the same value
Last edited by azer on 2008-09-08 19:58:24, edited 1 time in total.
axelv
Posts: 19
Joined: 2008-04-08 22:28:18

Post by axelv »

Ok. I've solved the problem. Now there are the corners, but what's happened at the small corner?!?!!?

Image
azer
Posts: 12
Joined: 2007-04-14 15:17:33

Post by azer »

axelv wrote:I have corrected my code:

Code:
#mdb .curvy1 .bl { background: url('images/corner.php?cn=bl&d=8&ic=B8AD91&oc=d8cbaa') 0 100% no-repeat; background-color: #b8ad91; }
#mdb .curvy1 .br { background: url('images/corner.php?cn=br&d=8&ic=B8AD91&oc=d8cbaa') 100% 100% no-repeat; }
#mdb .curvy1 .tl { background: url('images/corner.php?cn=tl&d=8&ic=B8AD91&oc=d8cbaa') 0 0 no-repeat; }
#mdb .curvy1 .tr { background: url('images/corner.php?cn=tr&d=8&ic=B8AD91&oc=d8cbaa') 100% 0 no-repeat; }
#mdb .curvy1 .iefix { font-size: 1px; height: 1px }

#mdb .curvy2 .bl { background: url('images/corner.php?cn=bl&d=3&ic=88806B&oc=d8cbaa') 0 100% no-repeat; background-color: #b8ad91; }
#mdb .curvy2 .br { background: url('images/corner.php?cn=br&d=3&ic=88806B&oc=d8cbaa') 100% 100% no-repeat; }
#mdb .curvy2 .tl { background: url('images/corner.php?cn=tl&d=3&ic=88806B&oc=d8cbaa') 0 0 no-repeat; }
#mdb .curvy2 .tr { background: url('images/corner.php?cn=tr&d=3&ic=88806B&oc=d8cbaa') 100% 0 no-repeat; }

but doesn't works!!
You made a small mistake when editing, the red text above should have been #88806B
axelv
Posts: 19
Joined: 2008-04-08 22:28:18

Post by axelv »

Now it works fine, thanks!! ;)
Post Reply