GetSimple Support Forum
News Manager (updated) - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: News Manager (updated) (/showthread.php?tid=3972)



RE: News Manager (updated) - flanders - 2017-01-12

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?


RE: News Manager (updated) - Carlos - 2017-01-12

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.php?tid=3972&pid=47765#pid47765


RE: News Manager (updated) - flanders - 2017-01-12

(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.php?tid=3972&pid=47765#pid47765

Thank you very much.
It seems ok now.


RE: News Manager (updated) - Carlos - 2017-01-13

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.


RE: News Manager (updated) - egorka2 - 2017-01-15

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


RE: News Manager (updated) - Carlos - 2017-01-15

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?


RE: News Manager (updated) - egorka2 - 2017-01-15

(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/


RE: News Manager (updated) - egorka2 - 2017-01-15

(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?


RE: News Manager (updated) - Carlos - 2017-01-16

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.


RE: News Manager (updated) - egorka2 - 2017-01-16

How i can edit a standart get_page_content(); template?


RE: News Manager (updated) - Carlos - 2017-01-17

I don't understand.


RE: News Manager (updated) - egorka2 - 2017-01-17

(2017-01-17, 01:31:34)Carlos Wrote: I don't understand.

I need to edit internal code of get_page_content()


RE: News Manager (updated) - Xzerod - 2017-01-21

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?


RE: News Manager (updated) - Carlos - 2017-01-21

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.


RE: News Manager (updated) - smsHH - 2017-02-15

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



RE: News Manager (updated) - islander - 2017-02-15

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?


RE: News Manager (updated) - Carlos - 2017-02-16

(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()); ?>



RE: News Manager (updated) - islander - 2017-02-16

That was quick, thank you Carlos.


RE: News Manager (updated) - islander - 2017-02-16

(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?


RE: News Manager (updated) - Carlos - 2017-02-16

Works for me...


RE: News Manager (updated) - Artur - 2017-02-18

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?


RE: News Manager (updated) - morvy - 2017-02-18

I'm using skel.io too, quickest solution was to use different template files with own html structure defined in them


RE: News Manager (updated) - Carlos - 2017-02-18

(2017-02-18, 02:39:52)Artur Wrote: 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?

Download this zip and replace news_manager/inc/site.php with the patched version inside the file.
Characters !, %, $, ( and ) will be allowed now.
(Valid for NM 3.4 and 3.4.1)


RE: News Manager (updated) - islander - 2017-02-19

Hello @Carlos,

I am trying to understand how templates work for the blog.
I understand that you can add classes etc., and create templates for Main and Single posts, but this over-rides the complete page template.

Is it possible to just use a Post chunk that includes place holders for the posts data?
For example:


Code:
<section class="pb0 bg-secondary">
    <div class="container">
        <div class="feed-item mb96 mb-xs-48">
            <div class="row mb16 mb-xs-0">
                <div class="col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1 text-center">
                    <h3>{{PAGE-TITLE}}</h3>
                    <h6 class="uppercase mb16 mb-xs-8"><i class="icon fa fa-calendar"></i> {{DATE}} <i class="icon fa fa-thumb-tack" style="padding-left:30px;"></i> {{TAGS}} </h6>
                </div>
            </div>
            <div class="row mb32 mb-xs-16">
                <div class="col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1">
                    {{CONTENT}}
                </div>
            </div>
        </div>
    </div>
</section>


So that each post would be in this format.

Is this beyond the scope of this plugin or is there an alternative method for doing something like this?


RE: News Manager (updated) - Carlos - 2017-02-21

NM 3.5 will have support for custom post rendering.
I'll post a beta in this other thread when it's more or less ready.