News Manager blog

News Manager 2.5 beta 13

(those using betas 10, 11 or 12 please read this)

New functions (or template tags) for use in templates or components
- nm_post_slug() - echo/return current post slug
- nm_post_url() - echo/return current post permalink
- nm_is_site() - returns true if current page is the news page

New "Custom settings" input box in the backend settings
You can specify advanced options and customize text strings, date format, etc., this way:
- One setting per line. Option name and value separated by one or more spaces. String values can be enclosed in single or double quotes
- Empty lines and comments (beginning with # or //) are ignored.
- If the setting is prefixed by single, main, archive, tag or search, it will be applied only to that specific news page type (overriding defaults)

Example:

# general
imagetitle 1
imagedefault my-default-image.jpg

# specific page-type settings
single imagewidth 500
single imageheight 200
single imagecrop 0
archive showimages 0

# texts
ELLIPSIS "... "
READ_MORE "continuar llegint"
DATE_FORMAT "%d.%m.%Y"

Here we enable the title attribute for all post images; set a default image (for posts without it); a different post image size for full/single post pages; images are disabled in archives. Also, some frontend texts ("...", "read more") and the date format are customized (overriding the language file defaults)

These are the available custom settings/options:

  • excerpt - 0 = full post, 1 = excerpt, readmore = display "read more" link, forcereadmore = always display it (default: selection in settings)
  • titlelink  - 1 = link to post in post titles, 0 = no link
  • gobacklink - 0 = no link, 1 = back to previous page, main = main news page
  • showimages - 1 = enable displaying post images, 0 = disable (default: selection in settings)
  • imagetitle - 1 = insert title attribute in <img> tag, 0 = don't insert it (default)
  • imageexternal - allow displaying external post images: 1 = allow, 0 = disallow (default)
  • imagedefault - string: filename of image to show for posts with no image defined
  • imagesizeattr - 1 = insert width and height attributes in <img> tag, 0 =don't insert them (default)
  • imagewidth - maximum width in pixels, 0 = full (default: selection in settings)
  • imageheight - maximum height in pixels, 0 = full (default: selection in settings)
  • imagecrop - 1 = enable image cropping to fit dimensions, 0 = don't crop (default: selection in settings)
  • imagealt - 1 = enable img alt attribute with post title, 0 = disable (default: selection in settings)
  • imagelink - 1 = make images link to posts, 0 = no links in images (default: selection in settings)
  • showauthor - 1 = display authors in posts, 0 = don't display (default)
  • defaultauthor - string - the name to display if the post has no author (and showauthor is enabled)

(Most of them are enabled with value 1 and disabled with 0, though several accept other values, or some text.)

These are the frontend text strings you can redefine:

  •     PUBLISHED
  •     AUTHOR
  •     TAGS
  •     ELLIPSIS
  •     READ_MORE
  •     GO_BACK
  •     OLDER_POSTS
  •     NEWER_POSTS
  •     SEARCH
  •     FOUND
  •     NOT_FOUND
  •     NOT_EXIST
  •     NO_POSTS


A new "experimental" option: support for post authors. By default it is disabled. To enable storing usernames in post files you have to add this to your gsconfig.php:

define('NMSAVEAUTHOR', true);

To display authors in your site, use custom settings showauthor and/or defaultauthor (see above)

« Back to News Manager blog

blog comments powered by Disqus