Thread Rating:
  • 6 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
(2013-09-10, 01:45:02)Carlos Wrote: News Manager 2.5 beta 11 attached to this post

Ahh, was waiting for this. I've just gone through the documentation and didn't find just one little thing I was looking for, the rest is great.

The classes and IDs of HTML elements of the full post are still the same, so I still can't style it differently, right? I don't fully understand if there's any chance to wrap the full post using some component, but I don't think so.

A little bonus - If I understand right, I can include dynamic FaceBook like button and comments in the "after" component of the full post. One of them require page slug and the other full post's URL and I think that I can handle that easily. I have to try practically.

Looking forward to trying it tomorrow when I have more time Smile

Just a question - is this way of settings a long-term one or will it change again with NM 2.5?

Either way - thanks for your work, Carlos.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
No rush, bro. Yes, it works and fine.
Tho it has no sense to use it for now because it doesn't show the "older posts" key.

Quote:No. You still have to patch it.
Would that solution (just limit number of posts displayed) work for you?
Pagination for tag pages is in the to-do list for now.
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
(2013-09-10, 07:07:42)TeeJay Wrote: The classes and IDs of HTML elements of the full post are still the same, so I still can't style it differently, right? I don't fully understand if there's any chance to wrap the full post using some component, but I don't think so.

With beta 11 you could wrap it with nm-top-single (<div id="...">) and nm-top-bottom (</div>), but I think I'm going to add id "nm_single", like:
Code:
<div id="nm_post nm_single">
(I had already thought about this but I forgot, thanks for reminding me.)

(2013-09-10, 07:07:42)TeeJay Wrote: A little bonus - If I understand right, I can include dynamic FaceBook like button and comments in the "after" component of the full post. One of them require page slug and the other full post's URL and I think that I can handle that easily. I have to try practically.

Yes, that's the idea. You could use nm-bottom-single to insert your FaceBook scripts, etc. (or using RobA's external commenting plugin).
Right now you'd have to use $_GET['post'] or something, but I'll add some tags/functions for echoing post slugs and URLs to make it easier.

(2013-09-10, 07:07:42)TeeJay Wrote: Just a question - is this way of settings a long-term one or will it change again with NM 2.5?

In principle it's long-term. I think I won't change these new function names and options, or if I do, I'll support the previous ones.

What I'm not totally sure about is the layout blocks/component names, e.g. does nm-top-single sound funny? (maybe like something about music or quantum mechanics) You know I'm not a native English speaker, so... Suggestions and opinions are welcome (before I release 2.5 stable, please)
Reply
(2013-09-11, 00:03:28)Carlos Wrote: With beta 11 you could wrap it with nm-top-single (<div id="...">) and nm-top-bottom (</div>), but I think I'm going to add id "nm_single", like:
Code:
<div id="nm_post nm_single">
(I had already thought about this but I forgot, thanks for reminding me.)

Thank you, I'll be happy to wait for this. It's gonna be another long step forward Smile
The reason why this is so important to me is that I have to put a border / box-shadow or both to the posts in the main news page to make it look nice. However, the border / box-shadow is not really essential at the full post page, you know - I want my websites to be consistent, meaning that the full post page should look the same as another pages created without NM (those don't have any border - no reason).

(2013-09-11, 00:03:28)Carlos Wrote: Yes, that's the idea. You could use nm-bottom-single to insert your FaceBook scripts, etc. (or using RobA's external commenting plugin).
Right now you'd have to use $_GET['post'] or something, but I'll add some tags/functions for echoing post slugs and URLs to make it easier.

Functions like get_post_slug() and get_post_url() seem really fine. Ok, I'll also wait for them Smile

(2013-09-11, 00:03:28)Carlos Wrote: In principle it's long-term. I think I won't change these new function names and options, or if I do, I'll support the previous ones.

Ok, good to know. I have to admit that the current way of settings is a little a bit more difficult than the one in GSConfig. It's not difficult at all, but I guess there are still some people that want to install and be ready to use without any settings. Without any settings, the NM is hardly half as good as it is with them (pictures, read more...)
What I personally don't like the most is that some settings have to be set in the administration, some in the gsconfig.php ($NMIMAGEINPUT = true; $NMIMAGEINPUT = 2Wink and some in components.
It would be awesome if everything could be set in the administration by clicks only, but I understand that it's a bit more difficult as some settings are conditional. Some settings like "Allow post images", "Allow links in post images", "Automatically add alt attribute to post images", "Auto resizing and cropping post images", "Post images default dimensions" would be possible, though.

(2013-09-11, 00:03:28)Carlos Wrote: What I'm not totally sure about is the layout blocks/component names, e.g. does nm-top-single sound funny? (maybe like something about music or quantum mechanics) You know I'm not a native English speaker, so... Suggestions and opinions are welcome (before I release 2.5 stable, please)

I haven't seen this association with music at all until you said it. I think you just can't think like that - see: "nm_is_single()? Really? Finally a chance to go out with him... but nm_is_archive(). Oh no, I'm not gonna go out with any old man..." Big Grin If you're gonna think like this, you can write a story with your functions Smile

And here's a piece of code I would suggest using

In nm-init component...
Code:
<?php if(nm_is_main()) {
nm_set_image_option('link');
} ?>
... and in nm-top-single component
Code:
<?php
nm_set_option('titlelink',false);
?>

These two short codes come with themselves hand in hand and it's really essential to use them. It's more than stupid linking to a page you're already on (when you keep the link in the title or the post image on the full/single post view).

Just one more word - thanks for the update.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
Talking about <DIV> tag, according to me it's better if you change
Code:
<p class="nm_post_image">.....</p>
...in...
Quote:<div class="nm_post_image">......</div>
Much better for CSS questions![/quote]
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
(2013-09-12, 00:41:16)D.O. Wrote: Talking about <DIV> tag, according to me it's better if you change
Code:
<p class="nm_post_image">.....</p>
...in...
Quote:<div class="nm_post_image">......</div>
Much better for CSS questions!

This is one of the things you can change on your own in /news_manager/inc/site.php line 185 if you like.

Nonetheless - very good suggestion, also semantically.
And as I like this idea, I changed it on my site.

Btw, when you're talking about these changes, I'm also doing some after every update - Adding an empty div with clear:both right before </div> of <div class="nm_post">. But this cannot be recommended generally as it might cause you some troubles with your non-floating wrappers.

I also change the <h3 class="nm_post_title"> into <h1 class="nm_post_title"> as every post's title (on the full/single post's view) has to be H1 for SEO purposes. And the original H1 that was the title of the main news page (like News or something) - I deleted it in the special template I use for the main news page.

Check my site to see the code.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
@TeeJay: Thanks for reminding me that I have a notepad and fingers to type in it. lol
Yes - of course - I already modifed it, in fact I was just telling to Carlos to apply this change to the next NM version.

As you already noticed, lines like "<p class="nm_post_image"><img (...) </p>" aren't really correct according to CSS rules.
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
Don't know why I started using <p> ... My initial idea was using <div> ... I'll change that.
Reply
Added class (not id as I said) "nm_post_single" to single posts.
If you wish, replace 2.5 beta 11's inc/site.php file:
https://raw.github.com/cnb/News_Manager-...c/site.php
(also includes the <div class="nm_post_image"> change).
Reply
No problema Hermano, <p> or <div> you make a great work with this plugin. Ok I am gonna test it.
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
(2013-09-12, 04:55:03)Carlos Wrote: Added class (not id as I said) "nm_post_single" to single posts.
If you wish, replace 2.5 beta 11's inc/site.php file:
https://raw.github.com/cnb/News_Manager-...c/site.php
(also includes the <div class="nm_post_image"> change).

Works like a charm. Thank you, that was needed.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
@Carlos: Perfect, the change of TAG works fine.
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
News Manager 2.4.4 available in Extend

Just a maintenance release. No new features since 2.4.3

Changelog:
- fixed jQuery validation in Settings
- fix for dates in Windows hosts (@MaxShy)

Note: If you are using NM 2.5 beta, ignore this one.
Reply
Hi guyz,

I juste come to suscribe on the forum.

First, great thanks for your work, it runs very fine on my raspberry pi ! Smile

I just installed GetSimple with Lighttpd, I I can't activate fancy url yet but I will see it later.

I have a problem with News Manager, my sitemap.xml does not acquire my news when it generates it.

And second problem, (maybe due to lighttpd), I can't generate a sitemap. I tried any solutions like add

Code:
global $xml, $page;
in template_functions.php in sitemap function

and comment define('GSDONOTPING', 1); without result :/

I give you a screenshot, tell me if you can help me. As you will see, I do not have any generate sitemap button.

Thanks for your help ! See you.


Attached Files Thumbnail(s)
   
Reply
(2013-09-18, 07:43:02)manubz Wrote: Hi guyz,

I juste come to suscribe on the forum.

First, great thanks for your work, it runs very fine on my raspberry pi ! Smile

I just installed GetSimple with Lighttpd, I I can't activate fancy url yet but I will see it later.

I have a problem with News Manager, my sitemap.xml does not acquire my news when it generates it.

And second problem, (maybe due to lighttpd), I can't generate a sitemap. I tried any solutions like add

Code:
global $xml, $page;
in template_functions.php in sitemap function

and comment define('GSDONOTPING', 1); without result :/

I give you a screenshot, tell me if you can help me. As you will see, I do not have any generate sitemap button.

Thanks for your help ! See you.

About the first problem -as the news written in the News Manager are dynamic pages, they are not included in the sitemap. I have the same problem but I have decided to come over it so far.

About the second one - try using I18N plugin, you don't have to use all the parts of it. But what is also does is that it generates sitemap which is ok I think. See the sitemap on my personal website http://tomasjanecek.cz/mapa-webu/. But as you say, no news are included - only the main news page with a list of them.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
Thumbs Up 
Hi Manubz,
Just a formality, check your write permissions
and then take a look at here:
http://get-simple.info/wiki/lighttpd_permalinks
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
(2013-09-18, 15:42:42)D.O. Wrote: Hi Manubz,
Just a formality, check your write permissions
and then take a look at here:
http://get-simple.info/wiki/lighttpd_permalinks

Hi, thanks for your reply all.

My problem start to be solved..

So, yesterday I followed your link and tried to enable fancy urls on my lighttpd webserver. For all my pages, it runs very well but I can't still run Fancy Urls for news manager posts.

My website url are like that : http://mywebsite.fr

So for pages, Fancy Urls runs like that and runs very fine Smile :

Code:
"/([A-Za-z0-9_-]+)/?$" => "/?id=$1",

But for news manager articles, default urls are

Code:
http://mywebsite.fr/index.php?id=projets&post=POSTNAME

So I tried some things like without success
Code:
"/([A-Za-z0-9_-]+)/&post$" => "/?id=$1"

After many many tries, I could not find a good combination for News Manager :/

Thanks for your replie.
Reply
(2013-09-18, 17:15:24)manubz Wrote: Hi, thanks for your reply all.
My problem start to be solved..
So, yesterday I followed your link and tried to enable fancy urls on my lighttpd webserver. For all my pages, it runs very well but I can't still run Fancy Urls for news manager posts.
My website url are like that : http://mywebsite.fr
So for pages, Fancy Urls runs like that and runs very fine Smile :
Code:
"/([A-Za-z0-9_-]+)/?$" => "/?id=$1",
But for news manager articles, default urls are
Code:
http://mywebsite.fr/index.php?id=projets&post=POSTNAME
So I tried some things like without success
Code:
"/([A-Za-z0-9_-]+)/&post$" => "/?id=$1"
After many many tries, I could not find a good combination for News Manager :/
Thanks for your replie.

This is the code I use for my personal GetSimple website and it works fine. You can try it.

The first two options are quite important, you should include them as long as your site has no problem with "FollowSymLinks". Turning on the RewriteEngine and setting RewriteBase is a must, just don't forget to put there the whole path to your site in case you have your site in a deeper folder structure.

Then the second "paragraph" is especially for News Manager on a single-language site. You have to replace the word "clanky" for the slug of you main news page (like "news" or whatever) in order to make it work.

The third paragraph is for GetSimple FancyURLs.

Code:
# Necessarities
Options +FollowSymLinks
RewriteEngine on
RewriteBase /

# For News Manager
RewriteRule ^clanky/tag/([^/.]+)/?$ index.php?id=clanky&tag=$1 [L]
RewriteRule ^clanky/post/([^/.]+)/?$ index.php?id=clanky&post=$1 [L]
RewriteRule ^clanky/page/([^/.]+)/?$ index.php?id=clanky&page=$1 [L]
RewriteRule ^clanky/archive/([^/.]+)/?$ index.php?id=clanky&archive=$1 [L]

# For GetSimple Fancy URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
No Thanks needed, Manubz.
I am glad I helped you to resolve the first part of your problem.
For the second part, follow what the other mate suggests.
And if It won't work, I am sure we will find a solution with the help of Carlos. Cheers
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
I tried others things this morning, without any success :/

I use Lighttpd, so TeeJay, your configuration is for Apache right ?

I tried somethings like that, tell me what you think about

Code:
url.rewrite = (
"/([A-Za-z0-9_-]+)/?$" => "/?id=$1",
"/projets/post/?$" => "index.php?id=projets&post=$1",
)

- First rewrite URL for pages and works fine
- Second would be for News managers articles who are configured to be under /projets/ folder.
Reply
(2013-09-18, 20:14:10)manubz Wrote: I tried others things this morning, without any success :/

I use Lighttpd, so TeeJay, your configuration is for Apache right ?

I tried somethings like that, tell me what you think about

Code:
url.rewrite = (
"/([A-Za-z0-9_-]+)/?$" => "/?id=$1",
"/projets/post/?$" => "index.php?id=projets&post=$1",
)

- First rewrite URL for pages and works fine
- Second would be for News managers articles who are configured to be under /projets/ folder.

Ah, sorry - didn't realize that you're not on Apache. I don't know the syntax of mod_rewrite for lighttpd, but your code looks very similar. Just try Smile
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
Manubz, be careful!
Following the instructions at
http://get-simple.info/wiki/lighttpd_permalinks titled "Getting Permalinks to work with News Manager"
you should use "url.rewrite-once" and NOT "url.rewrite" as you do here...

PHP Code:
url.rewrite = (
"/([A-Za-z0-9_-]+)/?$" => "/?id=$1",


and then for NM

PHP Code:
url.rewrite-once = (
"/projets/post/?$" => "index.php?id=projets&post=$1"

My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
Re,

So I configured like that :

Code:
url.rewrite = (
  "/([A-Za-z0-9_-]+)/?$" => "/?id=$1",
  "/(admin)/?(.*)" => "$0",
)

url.rewrite-once = (
  "/page/(.*)" => "/index.php?id=$1",
)

All runs fine too but not for News manager :/

I still have http://mywebsite.fr/projets/?post=postname in my rewrited url :/
Reply
Found it !!

So, here I will try to explain how I have done it.

My website is configured like that : http://mywebsite.fr
On my site, I have a webpage in wich I post news with plugin News Manager, these page is /projets/
So when you go on these page you are on http://mywebsite.fr/projets/
And when you read a news, you are on http://mywebsite.fr/projets/newsnumber1

So, I made two differentes configurations, one for others pages, and one for projets page.

My configuration is for all pages except projets
Code:
url.rewrite = (
"/([A-Za-z0-9_-]+)/?$" => "/?id=$1",
)

The configuration for projets page is
Code:
url.rewrite-once = (
"/projets/post/(.*)" => "/?id=projets&post=$1",
)

And I did not forget to enable Fancy Url with News Manager of course.

That's all. Thanks for your great help guyz !

Just a last question, I do not remember if I have even do it. Would you know how to integrate news provided by news manager in sitemap.xml for google and others search engine indexation ?

See you.
Reply
(2013-09-19, 02:49:58)manubz Wrote: That's all. Thanks for your great help guyz !

Just a last question, I do not remember if I have even do it. Would you know how to integrate news provided by news manager in sitemap.xml for google and others search engine indexation ?

See you.

I guess I haven't helped you much but still you're welcome.

I would also be very interested in the second point. As for now - I'm adding every post I write into the Google index via my account in the developer tools. If you don't have an account for your website, you can add your site (or concrete page) to the Google index using the form in this link.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply




Users browsing this thread: 4 Guest(s)