Sourcefabric Manuals

 English |  Español |  Français |  Italiano |  Português |  Русский |  Shqip

Newscoop 4.2 Cookbook

Image

The image object is usually initialized inside a list of article images or a list of images. It is not initialized at the beginning of the template and can not be initialized by another Newscoop function. The image object has the following properties:

  • number: the image identifier in the images archive
  • photographer: the name of the photographer that took the picture
  • place: a short text containing the place where the picture was taken
  • description: short description of the picture
  • caption: displays the image caption field
  • <date_attribute>: image creation date field (year, month, day etc.)
  • date: image creation date; you can customize the date display format by using the filter camp_date_format (see the chapter "Date and e-mail formatting" )
  • last_update: displays the time the image was updated
  • article_index: returns the index of the current image inside the article defined in the environment; if the image wasn't defined in the environment, the article was not defined or the image didn't belong to the article, returns null
  • imageurl: returns the URL of the current image
  • thumbnailurl: returns the URL of the current image's thumbnail
  • type: the subtype from the mimetype field; e.g.: png, jpeg, gif etc.
  • is_local: 1 if the image was stored locally, 0 if external
  • defined: boolean value (true/false) - true if the image was set in the current environment; false otherwise

<date_attribute> may be one of the following:

  • year: year as a number (four digits)
  • mon: month as a number (1..12)
  • mday: day of the month as a number (1..31)
  • yday: day of the year (1..366)
  • wday: day of the week as a number (0=Sunday..6=Saturday)
  • hour: hour (0..23)
  • min: minute (two digits)
  • sec: seconds (two digits)
  • mon_name: name of the month
  • wday_name: day of the week

There has been error in communication with Booktype server. Not sure right now where is the problem.

You should refresh this page.