PK's MovieDB Release.V3.0 (Dynamic PHP View)
@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
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
I have corrected my code:
but doesn't works!!
This is the result:
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; }
This is the result:
-
- Posts: 2
- Joined: 2008-08-25 13:32:49
-
- Posts: 2
- Joined: 2008-08-25 13:32:49
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, 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
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
with
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();
}
}
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();
}
}
}
@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
after the comments in corner.php and refresh the link above to see what error php reports.
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);
Hi Azer, what is this link?? It doesn't works.....azer wrote:@Axelv
try http://insertyoursitehere.com/templates ... &oc=d8cbaa
pm'd you the correct link for your site.axelv wrote:Hi Azer, what is this link?? It doesn't works.....azer wrote:@Axelv
try http://insertyoursitehere.com/templates ... &oc=d8cbaa
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.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.
Thanks!!
Excuse me AZER, I'm newbe in php. Where I must insert that code in corner.php exactly??azer wrote:@Axelv
if you still get black corners you could try to insertCode: Select all
ini_set("display_errors", 1); error_reporting(E_ALL);
Sorry for my english
as i said after the comments in corner.phpaxelv wrote:Excuse me AZER, I'm newbe in php. Where I must insert that code in corner.php exactly??azer wrote:@Axelv
if you still get black corners you could try to insertCode: Select all
ini_set("display_errors", 1); error_reporting(E_ALL);
Sorry for my english
that would be before
Code: Select all
$caching = TRUE;
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.
You made a small mistake when editing, the red text above should have been #88806Baxelv 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!!