News Manager 3.1 - what's new

News Manager 3.1 - What's new

FIXES

  • image filebrowser was broken if custom admin folder. GSADMIN gsconfig setting is now supported
  • Custom Settings label/textarea was not rendered properly with GSSTYLE wide (@Gooos)
  • post options adjusted - prepared for responsive admin styles (GS 3.4), also better for navigation with keyboard (tab)
  • sets "URL" as default link type in CKEditor
  • better support for I18N-based multilanguage sites (prevent broken links in backend with some permalink structures)
  • bug with read more link and Full Text setting when using more 1 custom setting (@Gooos)
  • several filebrowser issues (@johnnyb, @bensayers)
  • added security on pic script. Better parameter validation
  • function nm_is_single did not always work properly
  • Language file was loaded twice in frontend
  • Entities were decoded in Custom Settings when saving settings
  • Quotes were escaped in Custom Settings if magic_quotes_gpc enabled
  • Direct links to full-size post images (instead of passing them to the resizing script)
  • Several other slight fixes

CHANGES

Private posts, visible to site users

Private posts are now visible to logged-in users (instead of displaying a "post not found" error), just like GetSimple private pages

Image/file browser improvements

The file browser used for selecting post images has been enhanced:

  • by default, images are default sorted by date (reverse: newer first). This can be changed with gsconfig setting NMIMAGESORT
  • sortable columns (filename, date, size)

Tag pages' title tag

For better SEO, the tag name is inserted in the <title> tag when in tag page view (/tag/NAME, /?tag=NAME, ...)

This can be disabled with this custom setting:

tag titleTag 0

Tag pages included in Sitemap

Tag pages, like single/full post pages, are now included in the Sitemap.

There's a new gsconfig setting NMSITEMAPEXCLUDETAGS to disable it, like this:

define('NMSITEMAPEXCLUDETAGS', true);

NEW SETTINGS/OPTIONS

Custom Settings

Auto-generated post meta description

New custom setting autometad for automatic generation of meta description (as a content excerpt) in single post pages (like GetSimple GSAUTOMETAD gsconfig setting).
Usage:

autometad 1

Using post Tags as meta keywords

If metaKeyWordsTags is enabled, single/full post pages will use the post tags for the page meta keywords (instead of the news GS page's tags). Usage:

metaKeywordsTags 1

Custom image thumbnails

GS generates an automatic thumbnail for every image you upload - example: /data/thumbs/thumbnail.image.jpg for /data/uploads/image.jpg

But you can also customize that thumbnail, e.g. you can select a defined snippet of the image (in File Management -> Image Control Panel -> Create thumbnail)

If you enter imageThumbnail 1 in Custom settings, News Manager will check if the thumbnail exists and use it instead of the normal image.

This can be useful if you want to have the snippet in all news pages except full/single posts, where you'll probably want to have the original image.

Custom settings could be:

imageThumbnail 1  
single imagesize full

If you're not using full-size images in your single posts (but a scaled image as defined in width/height fields), then it could be:

imageThumbnail 1  
single imageThumbnail 0

Custom CSS class selectors (post layout, etc.)

These custom settings for custom CSS classes for styling the layout. This can be helpful if you use a CSS framework (like Bootstrap, Skeleton...)

  • classPost
  • classPostTitle
  • classPostTitleLink
  • classPostDate
  • classPostAuthor
  • classPostImage
  • classPostContent
  • classReadmore
  • classReadmoreLink
  • classPostTagsclassGoBack
  • classGoBackLink
  • classNav

The parameter given (which can be enclosed between quotes) will be appended to the default class of the element (if it has one).

Example using Bootstrap's classes to style "read more" link as a button:

classReadmore "center-block text-right"  
classReadmoreLink "btn btn-primary"

Custom HTML markup (post layout elements)

3.0 already had markupPost and markupTitle settings. In 3.1 there are some more settings for customizing the post layout:

  • markupPostDate - default is p
  • markupPostContent - default is div
  • markupPostTags - default is p
  • markupPostAuthor - default is p
  • markupPostImage - default is div
  • markupGoBack - default is p

Also note: markupTitle has been renamed to markupPostTitle (with 3.0 backwards compatibility)

Customizable page navigation (custom markup and classes)

Custom settings to allow customizing the markup and classes of the page navigation, numbered or older/newer type. This is useful if you use a CSS framework (see examples for Bootstrap).

Markup:

  • markupNavContainer - optional wrapper, default "" (empty)
  • markupNav - default div
  • markupNavItem - default span

Classes:

  • classNavContainer - default "" (empty)
  • classNavItemDisabled - default disabled
  • classNavItemCurrent - default current
  • classNavItemPrev - default previous
  • classNavItemNext - default next
  • classNavItemOld - default left
  • classNavItemNew - default right

Note: these custom classes replace the default values (unlike classNav, where they're appended)

Examples:

Bootstrap pagination component (for numbered page navigation)

classNav pagination  
markupNavContainer nav  
markupNav ul  
markupNavItem li  
classNavItemCurrent active  
classNavItemPrev ""  
classNavItemNext ""

(if you want the previous/next links always visible, add navPrevNext a)
 

Bootstrap pager component (for older/newer navigation)

navOldNew 1  
classNav pager  
markupNavContainer nav  
markupNav ul  
markupNavItem li  
classNavItemOld ""  
classNavItemNew ""

Bootstrap pager component (older/newer) aligned to sides instead of centered

navOldNew 1 
classNav pager  
markupNavContainer nav  
markupNav ul  
markupNavItem li  
classNavItemOld previous  
classNavItemNew next

 

gsconfig settings

Image sorting (filebrowser)

New NMIMAGESORT setting lets you set the default order of images in the filebrowser (default by date in 3.1).

Insert this in your gsconfig.php file:

define('NMIMAGESORT','name'); // 'date', 'name' or 'size'

Custom authors (public names)

In order to avoid exposing usernames (if you enable displaying post authors), you can define a user-author array in gsconfig:

$NMAUTHOR['username'] = 'Public Author Name';
$NMAUTHOR['admin'] = 'Administrator';
// etc ...

or

$NMAUTHOR = array(  
  'username' => 'Public Author Name',  
  'admin' => 'Administrator',
// etc...  
);

HTML is allowed in the public name (to allow e.g. linking to an author profile page), so entities must be used for < (&lt), & (&amp;), ...

This was already possible with the NM Custom Authors plugin, but now adding support for this in NM itself.

Template tag/function to display/return current tag

The new function nm_single_tag_title() is similar to nm_post_title() but for tag pages. It displays or returns the current tag name. It displays nothing or returns false if not a tag page. It can accept and use prefix and suffix strings, and optionally return instead of echo.

nm_single_tag_title($prefix, $suffix, $echo)

It can be used in your template/component for e.g.: customizing the <title> tag, displaying the tag name before the content...

Example:

<?php nm_single_tag_title('Tag: ', ' -'); ?>

OTHER

  • added Finnish language (@naavis)
  • backend warning if GSCANONICAL enabled (may help detecting issues)