VuFind
  1. VuFind
  2. VUFIND-360

bookcover.php: dieWithFailImage(): configurable image

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.1
    • Component/s: Record
    • Labels:
      None

      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.

      1. bookcover.php.patch
        2 kB
        Thomas Schwaerzler
      2. bookcover.php.patch
        2 kB
        Thomas Schwaerzler

        Activity

        Hide
        Thomas Schwaerzler added a comment -
        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
        Show
        Thomas Schwaerzler added a comment - 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
        Hide
        Thomas Schwaerzler added a comment -
        here the updated patch without deprecated function mime_content_type. it uses file extensions instead.
        Show
        Thomas Schwaerzler added a comment - here the updated patch without deprecated function mime_content_type. it uses file extensions instead.
        Hide
        Demian Katz added a comment -
        Committed in r3357.
        Show
        Demian Katz added a comment - Committed in r3357.

          People

          • Assignee:
            Demian Katz
            Reporter:
            Thomas Schwaerzler
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: