Thread Rating:
  • 6 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
(2016-12-23, 20:11:47)Timbow Wrote: Most GetSimple themes have <body id="slug"> so you can style a single page and News Manager outputs with classes begining .nm_ so that is done for you already.

The css you put wherever you normally put your css, so in an existing css file, or a new one, or in the <head> if you need to.

Thanks... i figured it out but i appreciate the help... i didn't use the slug but I 'm gonna use it anyway to avoid problems in other pages
Reply
Background:
I was looking for a leightweight CMS Tool (not that oversized Mainstream Solutions) and came across this Site. This SimplyCMS fits almost perfect for my project - Thanks to the Project - Team!

Progress:
With your wiki tutorials, i've finished a onepage/bs - theme, where every Site Content is a section and everything works well

Now i'm trying to integrate your well done News Manager Plugin to my site. I've downloaded the latest version, installed it with your guide and made some 'Lorem Ipsum' - News. In Settings i selected a content site to display the news but nothing happens.

Maybe the problem comes with my template customisations so i have to ask you honestly to give me some advice or example code. Unfortunately i don't understand how to use the 'nm_' codes this way.

The Sites are loeaded to template like this:
<?php foreach (menu_data() as $page) { ?>
<div id="<?php echo $page['slug']; ?>">
<?php getPageContent($page['slug']); ?>
</div>
<?php } ?>

thanks
Reply
Unless you're using a "special" permalink structure, you should be able to display the news page by clicking on the "#" link of that page in the page management section.

If you need to display a list of recent posts or something in your one-page, I can think of a couple ways to do it.
Reply
hi,

I have news manager installed from 1 year. it works fine.

Now I installed the I18N and with this plugin I can't got the blog in the sitemap. If I disabled this plugin it generates normally all pages.

in my htaccess i have this:

Code:
# News Manager:
RewriteRule ^articoli/([^/.]+)/?$ index.php?id=articoli&post=$1 [L]
RewriteRule ^articoli/tag/([^/.]+)/archive/([^/.]+)/?$ index.php?id=articoli&tag=$1&archivio=$2 [L]
RewriteRule ^articoli/tag/([^/.]+)/page/([^/.]+)/?$ index.php?id=articoli&tag=$1&page=$2 [L]
RewriteRule ^articoli/tag/([^/.]+)/?$ index.php?id=articoli&tag=$1 [L]
RewriteRule ^articoli/post/([^/.]+)/?$ index.php?id=articoli&post=$1 [L]
RewriteRule ^articoli/page/([^/.]+)/?$ index.php?id=articoli&page=$1 [L]
RewriteRule ^articoli/archivio/([^/.]+)/?$ index.php?id=articoli&archivio=$1 [L]
# end News Manager

How I can solve it please?
Reply
The I18N plugin uses its own method to generate the Sitemap, and it doesn't let other plugins (like NM) add or remove items to it.

Try this workaround:
http://get-simple.info/forums/showthread...5#pid47765
Reply
(2017-01-12, 04:29:41)Carlos Wrote: The I18N plugin uses its own method to generate the Sitemap, and it doesn't let other plugins (like NM) add or remove items to it.

Try this workaround:
http://get-simple.info/forums/showthread...5#pid47765

Thank you very much.
It seems ok now.
Reply
News Manager 3.4.1 available for download in Extend

There are no important fixes in this version, so it's not necessary to upgrade from 3.4 (unless you need any of the changes):

- Now compatible with custom permalink structures having I18N's %parents% placeholder for multilevel URLs (*)
- Duplicate tags (if any) are removed when saving a post
- Slovak language completed (@bokor.pavol)

(*) It should work if the news page is top- or second-level, but not deeper.
Reply
Exclamation 
Hi all. I try to disable /post/ tag for single post. I added
Code:
define('NMNOPARAMPOST',true);
in config and 
Code:
RewriteRule ^news/([^/.]+)/?$ index.php?id=news&post=$1 [L]

in my htaccess file. 
But when i open site.com/news/mypostname i get Oops! Page not found!. Pls help.
All posts still open with /post/ tag (site.com/news/post/mypostname)  Huh
Reply
Are you sure you edited the .htaccess file? (prefixed with a dot, no extension)
Did you place that rule just after the other News Manager rules?
Is 'news' the slug of the page you selected in News Manager settings?
Reply
(2017-01-15, 19:03:34)Carlos Wrote: Are you sure you edited the .htaccess file? (prefixed with a dot, no extension)
Did you place that rule just after the other News Manager rules?
Is 'news' the slug of the page you selected in News Manager settings?

- Yes
- Yes
- No. I just write in setting site url:
https://site.com/news/
Reply
(2017-01-15, 19:03:34)Carlos Wrote: Are you sure you edited the .htaccess file? (prefixed with a dot, no extension)
Did you place that rule just after the other News Manager rules?
Is 'news' the slug of the page you selected in News Manager settings?

All works for me with  
Code:
RewriteRule ^([^/.]+)/?$ index.php?post=$1 [L]
It's okay?
Reply
I assume the page you selected in NM Settings is 'index'...
I see, it seems it works. However that way you cannot have (view) normal pages in your site, only news posts.
Reply
How i can edit a standart get_page_content(); template?
Reply
I don't understand.
Reply
(2017-01-17, 01:31:34)Carlos Wrote: I don't understand.

I need to edit internal code of get_page_content()
Reply
I have to ask for a second time because i'm not firm in your codelines and there are not so many options to customize the output.
i've build following function:
PHP Code:
function nm_count_news() {
    
$posts nm_get_posts_default();   
    
$items count($posts); // 6 entries


what i'd like to do now is a simple for - loop


PHP Code:
for($count 1$count $items$count++)
{
 echo 'the single post like nm_show_post($count)';


is there already a built function i haven't found in your plugin or is the only way to get each single post the $slug variable?
Reply
I'm not sure I understand what you want to do.

This would display all (non-private) posts, using internal functions:
Code:
<?php
foreach (nm_get_posts_default() as $post) {
  nm_show_post($post->slug);
}
?>

Or if you want to customize the posts' layout (and currently available NM Custom Settings are not enough for you), check the NM Addons plugin.
Reply
Hi Carlos,

thank you again for your great plugin.

Will it be possible in a future version to sort the news in the backend via drag & drop, so that the order of the news will be reflected in the frontend ?

That would be great :-)

Sorry for that stupid question, the news will be sorted already. Was too late yesterday...

Rolleyes
Reply
I am sure that this is a redundant question, but I cant seem to find the answer to it:

Is it possible to have the blog display on the home page without it replacing the content and just have it display below?


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


Reply
(2017-02-15, 23:13:11)islander Wrote: Is it possible to have the blog display on the home page without it replacing the content and just have it display below?

In your template, just before (or after) <?php get_page_content(); ?>, insert this:
Code:
<?php if (nm_is_home()) getPageContent(return_page_slug()); ?>
Reply
Wink 
That was quick, thank you Carlos.


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


Reply
(2017-02-16, 00:13:43)Carlos Wrote: In your template, just before (or after) <?php get_page_content(); ?>, insert this:
Code:
<?php if (nm_is_home()) getPageContent(return_page_slug()); ?>

Even though I am placing the code after <?php get_page_content(); ?>, it still appears above it?
Can it be made to come after the pages content?


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


Reply
Works for me...
Reply
One more question. In grid which I use the classes look like "6u 12u$(small)" - and I cannot put it into the NM classes in custom setting, it shows "6u 12usmall" without other symbols. How can I fix it?
Glowczynski.pl - webmaster, graphic designer, translator.
For any job offers contact me via artur@glowczynski.pl.
Reply
I'm using skel.io too, quickest solution was to use different template files with own html structure defined in them
Reply




Users browsing this thread: 4 Guest(s)