Thread Rating:
  • 6 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
No, I didn't enable anything like that, I only changed order of posts' elements, defined NMIMAGEDIR and set my own "Read more" text. Every other links are okay.

I'll test that script, but I'll be waiting for that feature in next NM version.
Glowczynski.pl - webmaster, graphic designer, translator.
For any job offers contact me via artur@glowczynski.pl.
Reply
Another problem I can see is with tags. Check http://glowczynski.pl/post/start-start It's my post, below the content are listed tags. I understand that link has /posty/ in it, because main page I chose for posts is Posty, but why /index/?
Glowczynski.pl - webmaster, graphic designer, translator.
For any job offers contact me via artur@glowczynski.pl.
Reply
It seems you're doing changes on the site. I just checked and see no tags.

I suppose your page 'posty' is a subpage of index, so the links are generated as /index/posty/... (unless you define a custom permalink structure without %parent% )
Reply
By the way, a similar layout to the one you posted for NM Addons, can be currently generated by NM, with custom settings:
Code:
showFields image,title,date,content
classPost col-md-6
classPostImage news-image
classPostDate post-date
classPostContent post-content
markupPostTitle h2
PUBLISHED ""
Reply
(2016-12-04, 00:55:13)Carlos Wrote: By the way, a similar layout to the one you posted for NM Addons, can be currently generated by NM, with custom settings:
Code:
showFields image,title,date,content
classPost col-md-6
classPostImage news-image
classPostDate post-date
classPostContent post-content
markupPostTitle h2
PUBLISHED ""
Nice to know that, but after clicking "Read more", post is also showed in grid, not in "normal" full-width.
Glowczynski.pl - webmaster, graphic designer, translator.
For any job offers contact me via artur@glowczynski.pl.
Reply
Add this at the end:
Code:
single classPost ""
to make an exception for single/full post pages.

Or change the classPost col-md-6 line by:
Code:
main classPost col-md-6
so that the grid layout is only used in the main news page (but not for single post, archives, tag pages...)
Reply
(2016-12-04, 07:36:11)Carlos Wrote: Add this at the end:
Code:
single classPost ""
to make an exception for single/full post pages.

Or change the classPost col-md-6 line by:
Code:
main classPost col-md-6
so that the grid layout is only used in the main news page (but not for single post, archives, tag pages...)

Thanks, it works! I didn't even know I am able to do so many just using custom settings. Is there any cheatsheet on your website with that "commands" I can use? I've been looking for them and haven't found yet.
Glowczynski.pl - webmaster, graphic designer, translator.
For any job offers contact me via artur@glowczynski.pl.
Reply
Another question? Is it possible to define my very own "news" build, like with nm_display_recent? I mean, I'd like to have featured image and title in one div.
Glowczynski.pl - webmaster, graphic designer, translator.
For any job offers contact me via artur@glowczynski.pl.
Reply
Sorry but all info for custom settings etc is scattered across the documentation for versions 3.0, 3.1, 3.2 ...

As for your last question, it will be possible when custom post rendering is available (for 3.5 I hope)
Reply
Hello Carlos, I've been tinkering with this and the addon plugin for the past week or so and I can't for the life of me get the Fancy URLs to work correctly. Hate to bug you but I've read every post on this message board several times and dug through your documentation website over and over... My main blog page looks OK and the single post URLs are OK but the archives, tags and pagination ( < 1 2 3 4 >) do not work. I get "The requested post does not exist".

1) My Custom Permalink Structure is as follows. I would prefer to use  %parents%/%slug%/ but I see you don't support that yet, can I up-vote that for a future release, please?):
Code:
%parent%/%slug%/

2) I enabled NMNOPARAMPOST in gsconfig.php to remove /post/ from the urls:
Code:
define('NMNOPARAMPOST',true);

3) The fancy URLs are as follows in my .htaccess:
Code:
<IfModule mod_rewrite.c>
    RewriteEngine on

    # Usually RewriteBase is just '/', but
    # replace it with your subdirectory path
    RewriteBase /
    
    # News Manager
    RewriteRule ^blog/([^/.]+)/?$ index.php?id=blog&post=$1 [L]
    RewriteRule ^blog/tag/([^/.]+)/archive/([^/.]+)/?$ index.php?id=blog&tag=$1&archive=$2 [L]
    RewriteRule ^blog/tag/([^/.]+)/page/([^/.]+)/?$ index.php?id=blog&tag=$1&page=$2 [L]
    RewriteRule ^blog/tag/([^/.]+)/?$ index.php?id=blog&tag=$1 [L]
    RewriteRule ^blog/page/([^/.]+)/?$ index.php?id=blog&page=$1 [L]
    RewriteRule ^blog/archive/([^/.]+)/?$ index.php?id=blog&archive=$1 [L]
    # end News Manager

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
</IfModule>

4) I have checked the box for "Use Fancy URLs for posts, archives, etc." in NM. The auto-generated .htaccess option doesn't work for me, it says, "Failed to generate a .htaccess sample for the current site settings".
Reply
Try moving the first rewriterule in the News Manager block, to the end of the block.
Reply
(2016-12-13, 17:15:53)Carlos Wrote: Try moving the first rewriterule in the News Manager block, to the end of the block.

OK I did that (see below) but I still get this notification on page 2 of my blog when using the < 1 2 3 4 > pagination: The requested post does not exist.
Code:
# News Manager
RewriteRule ^blog/tag/([^/.]+)/archive/([^/.]+)/?$ index.php?id=blog&tag=$1&archive=$2 [L]
RewriteRule ^blog/tag/([^/.]+)/page/([^/.]+)/?$ index.php?id=blog&tag=$1&page=$2 [L]
RewriteRule ^blog/tag/([^/.]+)/?$ index.php?id=blog&tag=$1 [L]
RewriteRule ^blog/page/([^/.]+)/?$ index.php?id=blog&page=$1 [L]
RewriteRule ^blog/archive/([^/.]+)/?$ index.php?id=blog&archive=$1 [L]
RewriteRule ^blog/([^/.]+)/?$ index.php?id=blog&post=$1 [L]
# end News Manager
Reply
I only have this in .htaccess file and it works fine for me:


Code:
# News Manager:
    RewriteRule ^blog/tag/([^/.]+)/?$ index.php?id=blog&tag=$1 [L]
    RewriteRule ^blog/page/([^/.]+)/?$ index.php?id=blog&page=$1 [L]
    RewriteRule ^blog/archive/([^/.]+)/?$ index.php?id=blog&archive=$1 [L]
    RewriteRule ^blog/([^/.]+)/?$ index.php?id=blog&post=$1 [L]
    RewriteRule ^blog/post/(.+)?$ /blog/$1 [R=301,L]
# end News Manager
Reply
@bensayers
You only get the error page with page 2, 3..., but not with archive and tag pages?

If it fails with all but single posts, I don't know what could be happening. Can you make sure you updated the .htaccess, didn't rename it, didn't change permissions or something...?

@morvy
The two extra rewriterules were added in recent versions - actually required only if you enable tag pagination and tag archives.
Reply
(2016-12-14, 09:03:24)Carlos Wrote: You only get the error page with page 2, 3..., but not with archive and tag pages?

If it fails with all but single posts, I don't know what could be happening. Can you make sure you updated the .htaccess, didn't rename it, didn't change permissions or something...?

No, I get it with anything that isn't the main blog page or a single blog post. I am updating the .htaccess file in the root of the site, haven't changed the name or permissions. Having this exact same issue with two sites I'm currently in development with.
Reply
Are you using any other NM gsconfig settings like NMPARAMPAGE, besides NMNOPARAMPOST?

What are URLs for secondary pages (2, 3, ...) like?
Reply
(2016-12-14, 16:49:10)Carlos Wrote: Are you using any other NM gsconfig settings like NMPARAMPAGE, besides NMNOPARAMPOST?

What are URLs for secondary pages (2, 3, ...) like?

None of these URLs work for me: 
Example URL for pagination: http://domain-name.com/blog/2/
Example URL for tag: http://domain-name.com/blog/test%20tag/
Example URL for archive: http://domain-name.com/blog/201612/

But these work just fine:
Main blog page: http://domain-name.com/blog/
Single post page: http://domain-name.com/blog/test-post/

Here are my NM custom settings for one of the sites: 
Code:
templateFile template_blog.php
single templateFile template_blog_detail.php
single imagesize full
markupTitle h3
single markupTitle h2
autometad 1
metaKeywordsTags 1
defaultAuthor John
imageClass img-responsive
ELLIPSIS "..."
tagpagination f

Here are my gsconfig.php definitions for NM for the same site:
Code:
define('NMNOPARAMPOST',true);
define('NMSAVEAUTHOR', true);
define('NMPARAMPAGE',true);
define('NMPARAMTAG',true);
define('NMLOWERCASETAGS', true);
define('NMPARAMARCHIVE',true);
define('NMIMAGEDIR', 'blog/post-images');
define('NMIMAGEINPUT', 3);
define('NMTAB', true);
$nm_i18n['NEWS_TAB'] = "Blog";
$nm_i18n['NEW_POST'] = "Add New Post";
Reply
Remove those definitions for NMPARAMTAG, NMPARAMPAGE and NMPARAMARCHIVE and it should work ok (with the last rewriterules you posted).

However, the urls will be example.com/blog/tag/this-is-a-tag , example.com/blog/page/2 , example.com/blog/archive/201612 ...

You can remove the prefix for single posts, but not for the other news page views.
Those NMPARAM* definitions let you use different prefixes (e.g. "label" instead of "tag", etc.) but should not remove them.
I will fix the plugin so that it doesn't allow setting them to true, empty string or things like that.

I had thought about adding a NMNOPARAMTAG definition so that you can remove the "tag" prefix, but it couldn't be used if NMNOPARAMPOST was enabled.
This is not possible because the plugin couldn't know if example.com/blog/whatsthis refers to a post with slug 'whatsthis' or to a 'whatsthis' tag.
Reply
(2016-12-15, 01:52:51)Carlos Wrote: Remove those definitions for NMPARAMTAG, NMPARAMPAGE and NMPARAMARCHIVE and it should work ok (with the last rewriterules you posted).

Yes, that worked! Thank you for all of your help and the additional information about the plugin. I'm still learning how it works so I'm sure I'll have more questions but at least I can finish these sites now =)

I'm definitely looking forward to your future releases, most importantly the template options. Thanks Carlos!
Reply
(2016-12-13, 11:48:05)bensayers Wrote: I would prefer to use  %parents%/%slug%/ but I see you don't support that yet, can I up-vote that for a future release, please?):

Please try this patch. Edit news_manager/inc/functions.php, find this line (191 in version 3.4):
Code:
$url = find_url($NMPAGEURL, nm_get_parent());
and just below, insert this:
Code:
$url = str_replace('%parents%/', '', $url);
Reply
(2016-12-19, 22:24:58)Carlos Wrote:
(2016-12-13, 11:48:05)bensayers Wrote: I would prefer to use  %parents%/%slug%/ but I see you don't support that yet, can I up-vote that for a future release, please?):

Please try this patch. Edit news_manager/inc/functions.php, find this line (191 in version 3.4):
Code:
 $url = find_url($NMPAGEURL, nm_get_parent());
and just below, insert this:
Code:
 $url = str_replace('%parents%/', '', $url);

Thanks Carlos, that seems to do the trick.
Reply
I've got another question. I would like to be able to edit post template in news manager (for example to change order of items - to have tags before date and after titile, to add some external widgets to posts and so on) - how can I do so?

I'll be very grateful for your answer.
Reply
You can currently reorder the fields with custom setting showFields (see docs for NM 3.0).

Custom post templating (probably with GS components) should be available in NM 3.5. I'll post a beta in this thread when I have something working.
Reply
(2016-06-20, 09:51:12)Timbow Wrote:
(2016-06-20, 09:33:04)Inugami Wrote: Hi
I'm trying to change the order of the elements in the post but I can't find the file. First, i think it was in the template folder but apparently it wasn't. By default, all the elements are one below the other; what I want is put the image to the side (left or right) of the content of the post. Like GRILL TEMPLATE

It's just done with css. If you are talking about this page: http://timbowgs.bplaced.net/grill/index.php?id=blog
Code:
#blog .nm_post_image img {
   width: 40%;
   height: auto;
   float: right;
   margin: 0 0 10px 10px;
}
The #blog selector may not apply on your site. It's because the page has the slug 'blog'

and where should i put this class???? in which file must add it?????
Reply
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.
Reply




Users browsing this thread: 18 Guest(s)