Thread Rating:
  • 6 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
I intend to add support for full custom post rendering in NM 3.7. With this, you will be able to define the post layout in template files or GS components, using HTML and some PHP functions.

A simple example:

Code:
<div class="myPost">
    <h3><?php nm_render_title(); ?></h3>
    <i><?php nm_render_date(); ?></i>
    <p>Tags: <?php nm_render_tags(); ?></p>
    <?php nm_render_content(); ?>
</div>

I have it more-or-less ready, though I haven't committed these changes to GitHub yet.
I will do and post a beta version here, after I've done some tests. Anyway if anyone is interested in testing this soon, let me know.
Reply
I'm ready Smile
Reply
Me too :-)
Reply
Thank you both for your interest. I'm preparing some draft docs so that you know what you can play with. I'll release a first beta shortly.
Reply
Excited about the new features. Well done Carlos
Reply
I look forward to custom rendering, just what I have wanted. Thanks for all your good work to date.
Reply
NM 3.7 beta
http://get-simple.info/forums/showthread...0#pid62400
If you test it, please report, ask, etc. in that thread.
Reply
Hi, Carlos, I've been testing your plugin on version 3.3.13 and 3.4, everything is cool, the templates just work great, I'd have to make a template for the paginator Smile
the author of the post can not see
Reply
Thanks for testing NM with GS 3.4 alpha.
Of course I've also done some tests myself. Everything works, though there are some small issues. I'll fix them.

---

Post authors are available since NM 3.0, but are disabled by default.
To enable storing usernames in post files you have to add this to your gsconfig.php:
Code:
define('NMSAVEAUTHOR', true);

To display authors in your site, use custom setting showAuthor 1,
and/or defaultAuthor "My Name" (for posts that have no author, that is, those that were created before enabling NMSAVEAUTHOR)

I know it's not very intuitive - I might add some normal setting for all this in some next version. I haven't done it yet because I might restructure NM settings but haven't decided how.
Reply
Thank you, Carlos, everything works.
Reply
Sad 
Subject: New blog posts are not displaying on the main page

Hi Carlos, I'm a new user of Get-Simple, and NewsManager. Everything was fine with my first blog post, but now that I've published my second, I've noticed that the main page has not updated. It still shows only one post, though I can access the second post with a direct URL (and this post is NOT set to private). 

I've refreshed my browser and checked my site from a different device, so I don't think it's a cache issue. What else could be the problem? Thanks in advance.
Reply
Plugin version? Any special settings in gsconfig, or in NM Settings? Any changes to your site after the first post?
It could be some server cache (?), or that the post index file (data/other/news_manager/posts.xml) was not updated for some strange reason.
Try updating any of the 2 posts (just edit and save, no need to change anything - that should update the index) and check again. If it doesn't work, check your errorlog or enable debug mode and see if you get any errors.

If it's a public site, PM me the URL so that I can take a look...
Reply
Good day! The site has 2 plugins: News Manager and nanoGALLERY4GS. Work individually excellent, together, i.e. plug-in nanoGALLERY4GS prints photos on the pages, BUT on the news page does not display photos. Tell me how you can solve this problem.
Reply
Can anyone explani me how to use this plugin in a multilanguage site?
I use i18n on plugin setting i can only choose 1 language, so the result is the same post in one lang, even in the other page i have 1 lang, IT and EN.
Thank you!
Reply
(2018-05-30, 23:12:20)lakaroth Wrote: Can anyone explani me how to use this plugin in a multilanguage site?
I use i18n on plugin setting i can only choose 1 language, so the result is the same post in one lang, even in the other page i have 1 lang, IT and EN.
Thank you!

Sorry for the delay.

I've tried to make News Manager somewhat compatible with the I18N plugin, in the sense that at least works (so that it doesn't generate broken URLs, for example).
But that's all. It doesn't support multiple variants (languages) for each post, as I18N does for GS pages.
It's in the to-do list, but currently I have no time for that (and I haven't decided the way I would implement this).

In the past some people have reported to have done NM multilang sites using tags, but honestly I don't think it's a good solution, and also this has some limitations.

So, as Oleg suggests in another thread (and I usually do), you'd better use I18N + I18N Search + (optionally) I18N Special Pages.
Reply
(2018-05-27, 00:15:59)lyubaev.dima Wrote: Good day! The site has 2 plugins: News Manager and nanoGALLERY4GS. Work individually excellent, together, i.e. plug-in nanoGALLERY4GS prints photos on the pages, BUT on the news page does not display photos. Tell me how you can solve this problem.

Sorry for the delay.

I suppose you mean inserting galleries in posts.
I took a quick look at that plugin and I couldn't find and easy way to make it work with NM posts (which are not like pages). It works with I18N Gallery (because it checks if the (% ... %) token in a different way), but not with nanoGallery4GS.
Reply
@carlos I just found your 3.7b2 and am freaking out!
The new template feature is what I have been waiting for.
Not sure how to style the pagination yet, but as far as I can tell, everything else works awesome.
Thank you for all your work!


GS Community Edition with php8.x compatibility, new features and much more!  Support Me


Reply
(2018-06-09, 02:48:18)islander Wrote: @carlos I just found your 3.7b2 and am freaking out!
The new template feature is what I have been waiting for.
Not sure how to style the pagination yet, but as far as I can tell, everything else works awesome.
Thank you for all your work!
there is still an opportunity to use the components Smile
Reply
(2018-06-09, 02:48:18)islander Wrote: @carlos I just found your 3.7b2 and am freaking out!
The new template feature is what I have been waiting for.
Not sure how to style the pagination yet, but as far as I can tell, everything else works awesome.
Thank you for all your work!

Post (or link to) an example of the pagination's html structure you need and will try to tell you how.
Reply
So, I thought I had this figured out, but apparently I have no idea what I am doing.

I would like to display the <?php nm_list_recent(); ?> on the home page only, but with more formatting and info.
Is it possible to have a template for recent?
If not, can date and possibly image thumbnail be added?

The pagination I am guessing is just css, will look later.


GS Community Edition with php8.x compatibility, new features and much more!  Support Me


Reply
Currently, the usual solution for this is using the News Manager Addons plugin. It has a different way of templating, a string with {{...}} placeholders.

As for the page navigator, you can either style the default one with css, or customize markup (e.g. turn it into an unordered list) and classes with some NM Custom Settings.
Reply
Thanks Carlos, that did it.
I had installed the addon, but didnt view the forum explaining the placeholders.


GS Community Edition with php8.x compatibility, new features and much more!  Support Me


Reply
A previous web developer we hired to build a site for a client used this plugin for the sites news section. However the sites archive functionality suddenly doesn't work anymore and i'm not sure whats going on. As far as i can tell its setup properly but the site is always displaying the full list of news articles rather than the archive like it should. Here is an example of a page that should be showing the archives from the year 2016 but its not working.
http://mbmg-media.com/index.php?id=news-...#newsmedia

Make sure to include the #newsmedia hash at the end of the url.

Anybody have an idea of what might be happening? My boss wants this fixed today but i've been unable to find a fix after looking into the code and documentation for about 4 hours. I have version 3.6 installed..
Reply
That's a very non-standard site. (one-page, ajax...)
If everything else is working, I suspect that the original developer made his own customized version of the plugin and his/her changes were overwritten when upgrading it.

I suggest you restore the plugin files (news_manager.php and the whole news_manager folder) from a backup.
Reply
Hi Carlos,

thank you for giving Newsmanager an editable description field!

One question: on my pages I generate metadata for twitter, where I still have the old description content from

Code:
<meta property="og:description" content="<?php nm_post_excerpt...


Could you please tell me the correct "php nm_..." for the header.inc.php to have the same description in twitter as in page itself?

Thank you.
Hypertexter
Reply




Users browsing this thread: 5 Guest(s)