Thread Rating:
  • 4 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
(2016-06-27, 16:26:55)Oleg06 Wrote: at the bottom of your code looks like this

Code:
       <script src="http://boundary.idgenweb.org/theme/Grill-Boundary/js/vendor/jquery-1.11.0.min.js"></script>
       <script src="http://boundary.idgenweb.org/theme/Grill-Boundary/js/plugins.js"></script>
       <script src="http://boundary.idgenweb.org/theme/Grill-Boundary/js/main.js"></script>

   </body>
</html>jquery-1.11.0.min.js"></script>
       <script src="http://boundary.idgenweb.org/theme/Grill-Boundary/js/plugins.js"></script>
       <script src="http://boundary.idgenweb.org/theme/Grill-Boundary/js/main.js"></script>

   </body>
</html>

Yuk, thanks Oleg06, I guess I don't look far enough down the page when proofreading, at first glance it seems to only be on that template.
Reply
(2016-06-27, 08:51:49)RandyC Wrote: I am very happy with your great plugin, but of course I got questions.

I am creating tag  pages and of course the posts are listed by the date of publication, but in my application they really want to be alphabetized - http://boundary.idgenweb.org/obituary-index/ (edited link)

This page is created with this code:
<?php nmclone1_list_recent_by_tag('obits-a', 999); ?>

Is is possible to run the posts thru a loop or something to sort them alphabetically?

Thanks in advance for any help

Looks like I asked this in the wrong thread, so I am going reword the question on the News Manager Addons forum (http://get-simple.info/forums/showthread.php?tid=4339)
Reply
I had no plugins, and then I uploaded the News Manager plugin. Then I tried to go to the plugins page and it took a long long time to load (like more than a minute).

Then when I clicked to Activate the plugin it took a long time to activate. The animated circle kept spinning for at least a minute or two. During (some of) this time my browser's status bar said "Read c.go-mpulse.net"

So my question is, does this plugin, or GS, do something with c.go-mpulse.net? Apparently this is some kind of user tracking thing?
Reply
(2016-07-08, 01:53:59)ferby Wrote: I had no plugins, and then I uploaded the News Manager plugin. Then I tried to go to the plugins page and it took a long long time to load (like more than a minute).

Then when I clicked to Activate the plugin it took a long time to activate. The animated circle kept spinning for at least a minute or two. During (some of) this time my browser's status bar said "Read c.go-mpulse.net"

So my question is, does this plugin, or GS, do something with c.go-mpulse.net? Apparently this is some kind of user tracking thing?

It may be something (malware?) in your browser, computer, or host. Neither GS nor News Manager do anything like that.
Reply
Ok, thanks. I didn't think it did, just wanted to confirm.

Yeah... I am using a free web host, and they apparently use some kind of technique I never knew about where they have some kind of invisible iframe or something during page load (??) that collects info about all the visitors to any of the sites they host. It's weird because when you view source after the page has loaded, there's nothing there, nothing injected. So I don't even know how this tech works, but I guess the user is requesting pages from their host so they can do whatever they want in that process.
Reply
My Page To Display Posts is "index". On the front page of my site I want to show a block of text (a component) above the blog posts. But on the actual Post pages or Archive page, I don't want that component to show.

I'm trying to use if (return_page_slug()=='index') for this, but the Post pages and the Archive page have the same slug as my home page so it doesn't work. How do I achieve this?
Reply
if (nm_is_home()) ...
Reply
(2016-07-10, 04:47:32)Carlos Wrote: if (nm_is_home()) ...

Thanks. Sorry yeah, I looked for the documentation a few times and kept skipping past the links because I thought they were change logs, not docs. But now I see they are under the heading "Documentation", so I should have realized.
Reply
Hello,
I have a problem with the templateFiles in the newsmanager.
I wrote the following codes in the settings and save this.

templateFile temp-news.php
single templateFile temp-post.php

I save this two files under my /theme/ directory.

So when I open the news page it doesn't show me the custom template code, that I have been coded before. It's only blank!
But when I open a post of the news page it shows me the template code correctly!
What's wrong? Can anybody help me?

In my templateFiles "temp-news.php" and "temp-post.php" are the same codes:

<?php nm_post_date(); ?>
<a href="<?php nm_post_url(); ?>"><img src="<?php nm_post_image_url(); ?>" alt=""></a>

It seems, that the variables nm_post_date() doesn't work in the temp-news file.
What are the right variables? Can anybody post / upload a custom template file for the news page?

Thank you for your fast help.

Best regards,
Manuel
Reply
Functions nm_post_url(), nm_post_date(), etc. only work for the single post view.

Currently there are no functions for custom post templating -- it's in the to-do list (#29)

Right now the only way to do something like what you need (besides patching the plguin) is using NM Custom Settings like showFields and classPost..., markupPost... . If you wish, give me an example of the html you need, perhaps it can be done with some of these custom settings.
Reply
Hello Carlos,
thank you for your fast answer. Perfekt.

Best regards,
Manuel
Reply
Hello,
is there any way to reduce the number of pagination links?
I mean pagination looks like "1 2 3 ... 9 10 11" instead of "1 2 3 4 5 6 7 8 9 10 11"
[Image: pagination.jpg]
Thanks.
Reply
That will be possible in 3.4. Check the latest beta:
http://get-simple.info/forums/showthread...2#pid55722
Reply
(2016-08-05, 05:03:16)Carlos Wrote: That will be possible in 3.4. Check the latest beta:
http://get-simple.info/forums/showthread...2#pid55722

Thanks a lot.
Reply
Hello,

now I saw Google supports an easier way to semantic markup, JSON/LD.

Would it be possible to have a code block like this have automatically filled in with the information that News Manager blog entries already have? This could easily tag blog posts with semantic information.

Code:
<script type="application/ld+json">
   {
     "@context": "http://schema.org",
     "@type": "PublicationIssue",
     // "name": "My Blog",
     // "ispartof": "...",
     // "mainEntity": "...",
     "headline": "Headline",
     "description": "Description",
     // "image": "...",
     // "editor": "...",
     // "accountablePerson": "...",
     "dateCreated": "2015-01-01",
     "datepublished": "2015-01-02",
      "dateModified": "2016-01-01",
     "copyrightHolder":{
             "@type": "Person",
             "name": "me"},
     "author":{
             "@type": "Person",
              "name": "me"},
     "url": "www.thisblog.blog025..."
   }
   </script>
Reply
You could do something like this:
PHP Code:
<?php if (nm_is_single()) { ?>
<script type="application/ld+json">
   {
     "@context": "http://schema.org",
     "@type": "PublicationIssue",
     // "name": "My Blog",
     // "ispartof": "...",
     // "mainEntity": "...",
     "headline": "<?php nm_post_title(); ?>",
     "description": "<?php nm_post_excerpt(150'...'); ?>",
     // "image": "...",
     // "editor": "...",
     // "accountablePerson": "...",
     "dateCreated": "<?php nm_post_date('%Y-%m-%d'); ?>",
     "datepublished": "<?php nm_post_date('%Y-%m-%d'); ?>",
     "dateModified": "<?php nm_post_date('%Y-%m-%d'); ?>",
     "copyrightHolder":{
             "@type": "Person",
             "name": "me"},
     "author":{
             "@type": "Person",
              "name": "me"},
     "url": "<?php nm_post_url(); ?>"
   }
   </script>
<?php ?>

- Note that the post author is not inserted - currently NM has no template tag for this.
- Also note that the dateModified field contains the post date, not the lastmod date (same reason)
Reply
OK!

- Do I add this code to the standard header.php?
- Could I use the standard site's get_page_date as the lastmod date?

Thank you,

Hypertexter
Reply
I think you can insert it in your <head> or <body> section in your template.

I don't think it's a good idea to use the page date as lastmod date. I'd rather remove that field, which I think is optional.
Reply
It works perfectly! Thank you very much!
(I try to use
Code:
"dateModified": "<?php get_page_date('Y-m-d'); ?>",


without the %'s, seems to work...)

Thanks,
Hypertexter
Reply
(2016-08-18, 01:57:40)Hypertexter Wrote: It works perfectly! Thank you very much!
(I try to use
Code:
"dateModified": "<?php get_page_date('Y-m-d'); ?>",

without the %'s, seems to work...)

Yeah, as of GS 3.3.x get_page_date doesn't support the strftime format.

Anyway, note that if you do it that way, all your posts will have the same value in their dateModified field: the (lastmod) date of the page you selected in NM settings.
Also, unless you update your news page after creating every post, that date would be older than the post's date.

I think it's better to use nm_post_date (as in my example), or simply not have that field in your json-ld code.

(Just my 2 cents)
Reply
I have News and Events categories (tag), how to separate them, like how to show all Events in different page then News?. Now they all show in same page. I made template for both page.
Reply
In your template, after the <?php get_page_content(); ?> line, insert this:

Code:
<?php if (return_page_slug() == "events-page") nm_show_tag("event-tag"); ?>

(Replace events-page and event-tag by your page slug and tag name.)
Reply
@Carlos:
Blush Thank you for the advice. You are absolutely right... And I have the same problem, even visible, in the footer of single post pages:


PHP Code:
Zuletzt geändert: <?php echo strftime("%A, %e. %B %Y",get_page_date('U',false)); ?>

(which means: last change: ...)

Is there anything similar to
Code:
<?php if (nm_is_single()) { ?>

but for if nm is NOT single (to suppress this information for single pages footer)?

Hypertexter
Reply
(2016-08-24, 00:43:50)Hypertexter Wrote: Is there anything similar to
Code:
<?php if (nm_is_single()) { ?>

but for if nm is NOT single (to suppress this information for single pages footer)?

Code:
<?php if (!nm_is_single()) { ?>

(! = not in PHP)
Reply
(2016-08-24, 00:28:11)Carlos Wrote: In your template, after the <?php get_page_content(); ?> line, insert this:

Code:
<?php if (return_page_slug() == "events-page") nm_show_tag("event-tag"); ?>

(Replace events-page and event-tag by your page slug and tag name.)

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
Reply




Users browsing this thread: 4 Guest(s)