Thread Rating:
  • 6 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
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
The example in the wiki was missing a comma. Try with this one:

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']");

(I've just corrected that in the wiki.)

I don't know why this affects NM but not GS. I have to check that.
Reply
How about adding youtube video field to post options?. Same way like now we can add image to post from post options, but adding youtube video. And on demand, like video loads only when youtube video image is clicket.
Now im using this labanol.org hassle Big Grin.

Also, is there a way to get post image?. I mean if i add image to news text and dont use post option add images?.
Reply
I've enabled Fancy URLs on News Manager and edited the HTACCESS file. Browser wise, it is working, however when I'm checking Google Webmaster Tools, it's showing up 404 errors for posts, tags, search, archives. Once I disabled Fancy URLs for News Manager the errors are gone.

I have Fancy URLs on for the website, no problems there, no 404 errors.

Anyone having this issue?
Reply




Users browsing this thread: 7 Guest(s)