Thread Rating:
  • 4 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
@Carlos
Thank you!
Thank you.

Big Grin
Reply
(2016-08-24, 01:25:21)Riianna Wrote: No luck. When i click event title (link) in front page it doesnt "take" the event template, just goes to "news page" like id=news&post=eventtitle-something-somewhere

Yes, that's how it (currently) works - all single posts belong to the same news page.

A solution could be using I18N Special Pages, Item Manager or other plugin for your events.

But if you want to stick with NM for this, you can create several instances with NM clones
Reply
Hi,

is there a way to add time information to
Code:
<?php nm_post_date('%Y-%m-%d'); ?>

?

Google understands JSON markup including time information like
datePublished: 2015-10-14T12:10:00+02:00

so I would like to add this to the header.inc.php...

Thanks
Hypertexter
Reply
it uses strftime, so check documentation for it: http://php.net/manual/en/function.strftime.php
Reply
Now I tried
Code:
<?php nm_post_date('%c'); ?>

what seems to work.

Funny, in the html of the post page I get a date like "Do 12 Feb 2004 15:19:21 CEST",
but Google Structured Data Testing Tool understands "2004-02-12T15:19:21+01:00" what would comply with ISO 8601.

Hypertexter
Reply
Edit news_manager/inc/functions.php, find this (line 101 or so):

Code:
function nm_get_date($format, $timestamp) {

Just below that line, insert this:

Code:
if (strpos($format, '%') === false) {
    global $TIMEZONE;
    if ($TIMEZONE != '') {
      if (function_exists('date_default_timezone_set')) {
        date_default_timezone_set($TIMEZONE);
      }
    }
    return date($format, $timestamp);
  }

Now you can optionally use the date format instead of strftime, so for ISO 8601 date you can use:

Code:
<?php nm_post_date("c"); ?>

(This will be added to NM 3.4, so you won't need to edit the plugin again when you upgrade.)
Reply
Hello Carlos,

very cool, thank you!

After adding the lines, it works just with
PHP Code:
"<?php nm_post_date('c'); ?>" 

Hypertexter

And by the way: this makes a correct ISO 8601 date-time even on my WAMP server. The strftime %c only made a kind of date without time on WAMP. You remember my still existing problem with no date information on WAMP:
http://get-simple.info/forums/showthread...1#pid57191
Reply
I´m still using news manager addons plugin, do i need that anymore?. ;D
Reply
It depends on whether you are using its functions or not.
Reply
(2016-09-02, 23:23:16)Carlos Wrote: It depends on whether you are using its functions or not.

Yes "im using" it in friend site. Is there image cropping snippet for new manager addons like 3.0 etc has this nm_post_image_url(115,115,1) for the sidebar thumbnails. It doesnt work if i use addons plugin.
Reply
Oops, it seems it's not in the (poor) docs.

Before the display function, insert this:
Code:
<?php nm_set_image_size(115,115,1); ?>

[edit] Or if you prefer you can use NM Addons' own function instead:
Code:
<?php nm_set_custom_image(115,115,1); ?>
Reply
(2016-09-04, 07:10:02)Carlos Wrote: Oops, it seems it's not in the (poor) docs.

Before the display function, insert this:
Code:
<?php nm_set_image_size(115,115,1); ?>

[edit] Or if you prefer you can use NM Addons' own function instead:
Code:
<?php nm_set_custom_image(115,115,1); ?>

That works, tnx. Testing in my playground.
Reply
Hi,

thanks to continue this plugin.

Sorry for that but i don't read all topic pages but i have only one question.

How can i add meta description for each blog's post in header of my template ?
Reply
(2016-09-05, 23:18:13)jeckyl Wrote: How can i add meta description for each blog's post in header of my template ?

For automatic generation of meta description (as a post content excerpt), enable NM Custom Settings and enter:
Code:
autometad 1

(It works the same as GetSimple's GSAUTOMETAD gsconfig setting, but for posts.)

Custom per-post meta description is not currently possible.
Reply
Thanks
Reply
Hi guys. I'm amazed by this whole community and GS in general... I have a question about Newsmanager that I've spent hours searching for among the files but for some reason it completely evades me:

If I want to move the published date in single post view, what file do I alter and what code do I rearrange?

Currently it looks like this:
TITLE
DATE
IMAGE
CONTENT
TAGS
BACK

I'd like to move the date below tags:
TITLE
IMAGE
CONTENT
TAGS
DATE
BACK

Any hints are appreciated. I'm usually pretty good about hunting around in code, but this one of all things has me stumped.

Thanks
Reply
(2016-09-11, 09:23:23)gsfan702 Wrote: Hi guys. I'm amazed by this whole community and GS in general... I have a question about Newsmanager that I've spent hours searching for among the files but for some reason it completely evades me:

If I want to move the published date in single post view, what file do I alter and what code do I rearrange?

Currently it looks like this:
TITLE
DATE
IMAGE
CONTENT
TAGS
BACK

I'd like to move the date below tags:
TITLE
IMAGE
CONTENT
TAGS
DATE
BACK

Any hints are appreciated. I'm usually pretty good about hunting around in code, but this one of all things has me stumped.

Thanks

In NM Settings, enable Custom Settings and enter:
Code:
showFields title,image,content,tags,date
Reply
Perfect, thanks!

Ok, 2 last things... I want to be able to assign each element it's own css class. Mainly because I want to have the image float left and the content to the right, the tags below, etc.

What is the proper format and name for each element in single post view?

.title
.content

or whatever.

I'd like to insert a | pipe symbol in between each tag to separate them a little for big fingers on small screens. How or at least where do I do that?

Thanks so much for your time...
Reply
See custom class selectors (classPostTitle, classPostTitleLink, classPostContent, etc.) here.
Reply
As for the second question, enter:
Code:
tagSeparator " | "
Reply
That's what I needed. Thank you for the quick replies and all you do with the GS community. Cool
Reply
We can make custom excerpt with nm_set_custom_excerpt, but is there snippet for the post title length, so we can cut too long titles a bit shorter in sidebar Rolleyes .
Reply
Greetings Simpletons,

Trying to use this plugin and I don't know where to add content, I can type in a heading, but can't find a field for content. Can somebody please tell me what I am doing wrong? I'm old and my brain is fried so things don't always "compute".

Thanks for reading, and thanks in advance for any help.  Big Grin
Reply
(2016-09-14, 23:50:44)bobbiescap Wrote: Trying to use this plugin and I don't know where to add content, I can type in a heading, but can't find a field for content. Can somebody please tell me what I am doing wrong? I'm old and my brain is fried so things don't always "compute".

GS version? NM version?
Does the editor appear on normal pages?
Does this happen if you try with a different browser?
Any custom ckeditor toolbar, etc. in gsconfig.php?
Reply
Apologies Carlos, I had a break from the computer today and have only just seen your reply.

In answer to your questions:
  • GS version: 3.3.11
  • NM version: 3.3.1
  • The editor does appear on normal pages.
  • I have tried Firefox and Web (formally Epiphany) and it is the same in both.
  • I changed the ckeditor toolbar configuration to one that was on the GS website with extra options.
Code:
define('GSEDITORTOOL',"['Source','Save','Cut','Copy','Paste','PasteFromWord','-','Undo','Redo','Find','Replace','-','SelectAll','-','RemoveFormat','-','Outdent','Indent','-','Blockquote','CreateDiv'],['Bold', 'Italic', 'Underline','Strike','Subscript','Superscript', 'NumberedList','BulletedList','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock', 'Table', 'TextColor', 'BGColor', 'Link','Unlink', 'Image'],'/'['Styles','Format','Font','FontSize','Flash','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe','Maximize','ShowBlocks','-','About']");


Thanks for your fast response, and the work you do for the GS community. 
Reply




Users browsing this thread: 1 Guest(s)