[VUFIND-360] bookcover.php: dieWithFailImage(): configurable image Created: 20/Dec/10  Updated: 21/Dec/10  Resolved: 21/Dec/10

Status: Resolved
Project: VuFind®
Components: Record
Affects versions: 1.1
Fix versions: 1.1

Type: New Feature Priority: Trivial
Reporter: Thomas Schwaerzler Assignee: Demian Katz
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: File bookcover.php.patch     File bookcover.php.patch    

 Description   
i just had a look at bookcover.php and found the method
dieWithFailImage, which seems always to be called if displaying a cover
image fails:


function dieWithFailImage()
{
    header('Content-type: image/gif');
    echo readfile('images/noCover2.gif');
    exit();
}


so far that's ok, but i would like to have 2 things:

1) it would be nice if the image name would be configurable somewhere.
eg in web/conf/config.ini. or a similar place.

2) it would also be nice if there where the option to not display an
image at all.



 Comments   
Comment by Thomas Schwaerzler [ 20/Dec/10 ]
i have created this patch now.
to see an effect there has to be an image set in web/conf/config.ini:

[Content]
; set image to appear if no bookcover is available. the path is relative to web in vufind install directory:
noCoverAvailableImage = images/noCover2.gif
Comment by Thomas Schwaerzler [ 21/Dec/10 ]
here the updated patch without deprecated function mime_content_type. it uses file extensions instead.
Comment by Demian Katz [ 21/Dec/10 ]
Committed in r3357.
Generated at Fri Apr 19 01:29:58 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100250-rev:7d7a15ad2155d2374514ceddec416eca16a0ab65.