Thread Rating:
  • 6 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
carlos, check out some stuff I posted here
https://github.com/GetSimpleCMS/GetSimpleCMS/issues/655
Would love input on what might be useful for this in core.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
Hello,

there is one thing I miss in News Manager: a preview of posts before publishing them. As long as the post is marked as private, even the logged in user cannot see a preview of the page.
Reply
(2014-10-09, 23:44:30)Hypertexter Wrote: there is one thing I miss in News Manager: a preview of posts before publishing them. As long as the post is marked as private, even the logged in user cannot see a preview of the page.

I'll change it to make private posts available to logged-in users.

In the meantime you can patch the plugin by changing news_manager/inc/site.php line 313 (NM 3.0):
Code:
if (!empty($post) && $post->private != 'Y') {
to:
Code:
if (!empty($post) && ($post->private != 'Y' || ($single && is_logged_in()))) { // patch

(note: only for GS 3.2 or newer)
Reply
Hello Carlos,

it seems to work. But there is no button to open the new post page. I must write the url by hand.

And there is no entry for the private posts in the blog overview page, when I am logged in.
Reply
Ah yes.
There's a view link ('#') in the list of posts (on the right)

But if you want to have it also in the edit post screen, edit news_manager/template/edit_post.php line 59 (NM 3.0) and change:
Code:
if (!empty($NMPAGEURL) && $NMPAGEURL != '' && !$newpost && $private == '') {
to:
Code:
if (!empty($NMPAGEURL) && $NMPAGEURL != '' && !$newpost) { // patched
Reply
Yes we all love GetSimple.
But sometimes it is not the best for blogging...
Surely News Manager helps a lot...
...but there is a lack of integration between the pages and the news.
Simple things to do with Wordpress ...
...That's why many people prefer Wordpress to GetSimple!

But this simple line to add to your template will help you a lot.

PHP Code:
<?php
get_page_content
();
nm_show_tag(stripslashes(html_entity_decode($data_index->urlENT_QUOTES'UTF-8')));
?>

So, If you create a page named "test", you can merge to it all the news (created with NM) with the tag "test" automatically. If it's useful for you, just take it.

Truthful, your Ivan aka Doctor Oh! (D.O.)
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
@Carlos

I'm sorry, but it doesn't work.

With my standard fancy url structure %parent%/%slug%
both ways (# and the button) lead to a url like:
www.domain.xx/blog?lang=de/post/postslug

And that page shows the blog overview page without a link to the private post.

They should produce a link like www.domain.xx/blog/post/postslug
(which really shows the content of the private post after the patch)
Reply
@Hypertexter

I see.
This is not really related to this private post patch, it also happens with any other posts: 'view' links in NM backend are not properly generated for your permalink structure if the I18N plugin is enabled. It's the same issue we had with the Sitemap.

Some time ago I made some changes to make NM a bit more I18N-aware, but it seems these fixes only work for some permalink structures, but not with %parent%/%slug% (or %slug%, both without trailing slash).
I'll look into this again.

In the meantime, if you don't use I18N for multilanguage (if your site only uses one language), a way to fix this is adding this to gsconfig:
Code:
define('I18N_SINGLE_LANGUAGE', true);
Reply
Quote:define('I18N_SINGLE_LANGUAGE', true);

works fine, thank you!

Will there be versions of i18n and/or News Manager which work together?

I ask myself if I really need I18N. I think it's only used for the navigation and breadcrumbs on my site and it should work without that...
Reply
(2014-10-14, 00:05:02)Hypertexter Wrote:
Quote:define('I18N_SINGLE_LANGUAGE', true);

works fine, thank you!

Nice to know. The patch for the Sitemap I posted should also work now with that setting.

(2014-10-14, 00:05:02)Hypertexter Wrote: Will there be versions of i18n and/or News Manager which work together?

I18N is widely used, so I tried to make NM work in sites that use mvlcek's plugin (even if NM doesn't support multilanguage). As you've found out, I failed to support it properly for some permalink structures, but I'll try to fix this issue.
Reply
Great! Now it has a preview button, it shows private posts in preview, the sitemap is updated and the urls are fancy! Thank you!

But I really hope you will manage to integrate these patches into the plugin itself... I mistrust my memory when one day I need to reconstruct them all Rolleyes

Thank you very much!
Reply
Hm.

I still have problems with the sitemap.

The post entries are generated, but not actualized, when the post page changes. "lastmod" stays on the first date. For normal pages, it is updated.

And I cannot manage to ping the sitemap to search engines. I disabled the "gsdonotping" entry in the gsconfig.php, but when creating a sitemap it says "Sitemap Created, however there was an error pinging one or more of the search engines", in RED! (With donotping I get it in green).
Reply
(2014-10-14, 03:00:39)Hypertexter Wrote: Hm.

I still have problems with the sitemap.

The post entries are generated, but not actualized, when the post page changes. "lastmod" stays on the first date. For normal pages, it is updated.

Yes, I have that in the to-do list. NM doesn't currently have a lastmod field (which would be used for the Sitemap), but only the publication date one.

(2014-10-14, 03:00:39)Hypertexter Wrote: And I cannot manage to ping the sitemap to search engines. I disabled the "gsdonotping" entry in the gsconfig.php, but when creating a sitemap it says "Sitemap Created, however there was an error pinging one or more of the search engines", in RED! (With donotping I get it in green).

I think it may be an issue with the I18N plugin (related thread), nothing to do with NM.
Reply
Hello,

I wanted to integrate the News Manager function
<?php nm_list_recent(); ?>
into one of my pages, but I failed.

First I installed the Dynpages plugin which says it can integrate php code into the body with a call like
{% componentname %}

So I created a component with the content:
<?php nm_list_recent(); ?>

and tried to integrate it in the page body with {% componentname %}.
But nothing happens.

I want to have the recent posts in a normal page body since I do not use a sidebar...
Reply
Works for me.

What do you mean by "nothing happens"? Do you see the string {% componentname %}, or nothing at all?

Are you sure the component name is exactly the same in both places?
Reply
Hello Carlos,

I really mean nothing at all.

I tried a component with the content "text" and it displayed "text", so I think the call {% componentname %} was right...

but the component that shall call the recent function, shows nothing on the page.

Do I have to import your functions into my template in some way or are the available automatically?
Reply
Oh, not completely nothing.

In the source code of the page html I can see:
Quote:<ul class="nm_recent">
</ul>
Reply
Are there any non-private posts?
Reply
OMG, I'm sorry...
in the News Manager options the number of last posts for the "sidebar" was on Zero Big Grin
Reply
Hadn't thought about that possibility :-)
Reply
You really don't need to... once I turned them to zero since I did not use that function. Thank you.

One more question:
Is it possible to give the hyperlinks in the recent list a "target=_blank" to open them in a new tab?
Reply
(2014-10-18, 00:38:53)Hypertexter Wrote: Is it possible to give the hyperlinks in the recent list a "target=_blank" to open them in a new tab?

News Manager Addons plugin: download page - docs - support thread
Reply
Wow, it's like Christmas! Smile
Reply
Hello everybody,

I wonder if you could please help me.

I'm a newby whit this plugin, and i can't get this working fine.

I have a page call blog, where the post are displayed. This works fine. But when i click in the link of a single post, it always is redirecting me to the page blog. The url of the title post link's points right, but ...

Getsimple is in a subdirectory.

.htaccess
# News Manager:
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/post/([^/.]+)/?$ index.php?id=blog&post=$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]
Reply
maybe output "<!-- no posts -->" when 0 ?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 5 Guest(s)