GSADMIN
gsconfig setting is now supportedmore 1
custom setting (@Gooos)nm_is_single
did not always work properlyPrivate posts are now visible to logged-in users (instead of displaying a "post not found" error), just like GetSimple private pages
The file browser used for selecting post images has been enhanced:
NMIMAGESORT
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, 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 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
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
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
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"
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)
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
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'
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 <
(<
), &
(&
), ...
This was already possible with the NM Custom Authors plugin, but now adding support for this in NM itself.
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: ', ' -'); ?>
GSCANONICAL
enabled (may help detecting issues)