Thread Rating:
  • 6 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
(2014-10-19, 04:53:26)shawn_a Wrote: maybe output "<!-- no posts -->" when 0 ?

?? could you please explain this, please?
Reply
thats for carlos
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
@skabadip
Have you enabled GSCANONICAL in gsconfig? (that setting is not compatible with News Manager and many other plugins)
Reply
Hello Carlos,

there is one more question around your News Manager plugin:

I tried to post an image, which seems to work well.

But is there a simple way to get a thumbnail of the posted image automatically in the blog overview page next to the excerpt of the post? Without adding something manually?

I would create the thumbnail in the normal way after uploading the image in GS, with a standard size of 100 x 100 px.
Reply
Do you mean images inserted in the body of the post, or selected in the Post Image field?
Reply
(2014-10-19, 06:10:40)Carlos Wrote: @skabadip
Have you enabled GSCANONICAL in gsconfig? (that setting is not compatible with News Manager and many other plugins)


?*/grrr..¡¡!??AngryAngryAngry

Znx Carlos, you're my hero!!!!! Superman maybe???

Thank you
Reply
(2014-10-20, 03:31:50)Carlos Wrote: Do you mean images inserted in the body of the post, or selected in the Post Image field?

Hello Carlos,

I mean I would like to create a thumbnail pic in the normal GS way, use the big picture on the post page and automatically show the thumbnail of the pic in the blog overview. Is that possible?

And now I have one more question: Google says my site has double title tags, since the blog overview page has the title "Blog" and all the tag overview pages have the same title "Blog".

Is it possible to give the tag overview pages an individual title like "Tag: tag1 - blog - site" or something like that?

Thank you for your help!
Reply
(2014-11-09, 02:49:27)Hypertexter Wrote: I mean I would like to create a thumbnail pic in the normal GS way, use the big picture on the post page and automatically show the thumbnail of the pic in the blog overview. Is that possible?

Currently you must select an image (normal or GS thumbnail) in the post image field.

What you are able to do is displaying images with different custom sizes depending of the news page type.

For example, to show them in the main news page using the width/height as defined in settings, but only 90x90 in archive pages, and full size in single post view, enter this in Custom Settings:
Code:
single imageSize full
archive imageSize 90,90

See an example in this demo site:
http://webs.org.es/newsmanagerdemo/news/

(2014-11-09, 02:49:27)Hypertexter Wrote: And now I have one more question: Google says my site has double title tags, since the blog overview page has the title "Blog" and all the tag overview pages have the same title "Blog".

Is it possible to give the tag overview pages an individual title like "Tag: tag1 - blog - site" or something like that?

Thank you for your help!

Yes, I have the tag title issue in my to-do list. I'll fix this for NM 3.1
In the meantime, you can insert something like this in your template, just after the <title> opening tag (and before get_page_clean_title or whatever you have there):
Code:
<?php if(nm_is_tag()) echo 'Tag: '.htmlspecialchars(rawurldecode($_GET[NMPARAMTAG])).' - '; ?>

If you have a custom title code (I18N or other plugins) and need a different setup, let me know. I can post an alternative code snippet.
Reply
Hello Carlos,

for the images I use the custom settings now with 100px and they are shown like that in the main news page.

And with "single imageSize full" I get them in full size on the single post page. This is not bad, thank you!

But couldn't there be a way for the main news page to use the thumbnail pics instead that I can generate in GS by standard (with a defined snippet of the image)?

title:
Thank you for your kind offer. Since I use the Custom title plugin I don't know if I can use your proposal.

My entry in the header at the moment is:
Code:
<title><?php nm_post_title(); ?><?php echo(get_custom_title_tag()); ?></title>
Reply
(2014-11-10, 19:17:28)Hypertexter Wrote: But couldn't there be a way for the main news page to use the thumbnail pics instead that I can generate in GS by standard (with a defined snippet of the image)?

I'll look into it.

(2014-11-10, 19:17:28)Hypertexter Wrote: title:
Thank you for your kind offer. Since I use the Custom title plugin I don't know if I can use your proposal.

My entry in the header at the moment is:
Code:
<title><?php nm_post_title(); ?><?php echo(get_custom_title_tag()); ?></title>

Simply insert the code snippet between <title> and <?php nm_post_title...

By the way, I suggest you use nm_post_title(""," - "); (or similar) so that the post title and page title are separated.
Reply
Hello Carlos,

this is great, thank you! It makes titles like "Tag: tag1 - Blogpagetitle..." which is exactly what I wanted.

I tried to use it to give single post pages a "-" between post title and blogpagetitle, but I failed:

Code:
<?php if(nm_is_single()) echo ' '.htmlspecialchars(rawurldecode($_GET[NMPARAMTAG])).' - '; ?>

Could you tell me what I did wrong? I think the way with
Code:
nm_post_title(""," - ");
won't help me since I do not show the page title in the blog page...
Reply
I mean this:
Code:
<title><?php if(nm_is_tag()) echo 'Tag: '.htmlspecialchars(rawurldecode($_GET[NMPARAMTAG])).' - '; ?><?php nm_post_title('',' - '); ?><?php echo(get_custom_title_tag()); ?></title>

Same but shorter:
Code:
<title><?php if(nm_is_tag()) echo 'Tag: '.htmlspecialchars(rawurldecode($_GET[NMPARAMTAG])).' - '; nm_post_title('',' - '); echo get_custom_title_tag(); ?></title>
Reply
Thank you, Carlos! It really works.

Seems I do not have the slightest idea how PHP works Undecided
My trial always made things like "- posttitle", with a dash as the first letter...

Rolleyes
Reply
I've been trying to figure out a .htaccess solution for setting the homepage/index as the News Manager page (with FancyURLs on, without custom permalink structure) and couldn't find out how. I think that many people already use it so but I always used NM on a subpage.
In my case, after clicking onto any post, I'm redirected to /404/ and get the Post not found message.

The default .htaccess for NM is
Code:
RewriteRule ^newspageslug/tag/([^/.]+)/?$ index.php?id=newspageslug&tag=$1 [L]
RewriteRule ^newspageslug/([^/.]+)/?$ index.php?id=newspageslug&post=$1 [L]
RewriteRule ^newspageslug/page/([^/.]+)/?$ index.php?id=newspageslug&page=$1 [L]
RewriteRule ^newspageslug/archive/([^/.]+)/?$ index.php?id=newspageslug&archive=$1 [L]

In my case, the "newspageslug" is "index", but replacing the "newspageslug" with "index" isn't sufficient.

I managed to make it work by removing the first "newspageslug/" and replacing the "newspageslug" with "index" in the GET part...
Code:
RewriteRule ^tag/([^/.]+)/?$ index.php?id=index&tag=$1 [L]
RewriteRule ^([^/.]+)/?$ index.php?id=index&post=$1 [L]
RewriteRule ^page/([^/.]+)/?$ index.php?id=index&page=$1 [L]
RewriteRule ^archive/([^/.]+)/?$ index.php?id=index&archive=$1 [L]
... but in this case, all other GS pages were though as they were "404 News Manager posts", instead of normal GS pages.

If you wanted to ask about the generated .htaccess after changing NM settings, I'm getting "Failed to generate a .htaccess sample for the current site settings " message.
I have read this post of yours
(2014-10-04, 18:32:51)Carlos Wrote: You get that "error" (or notice) if you use:
- a non-standard GS permalink structure (e.g. with %language%, %nondefaultlanguage%, ...)
or
- NM custom URL parameters/prefixes (e.g. NMNOPARAMPOST, NMPARAMPOST, etc)
but I guess I'm not any of these cases, permalink structure is default (the text field is empty) and I'm not aware of any custom NM URL parameters either.

Thanks for any help.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
The first htaccess snippet you've posted is not the default one - it looks like it's for use with NMNOPARAMPOST

It's not currently possible to remove the /post/ prefix if you select index as newspage. (However you can change that prefix to something shorter like /p/ by using NMPARAMPOST)
Reply
I can see it now. I already forgot what NMNOPARAMPOST was, so you're right, I had it allowed.
So I disabled it, let NM generate a new .htaccess, took its NM part, added to my .htaccess, defined custom NMPARAMPOST ('akce', a 'sale' in English) and edited it according to your docs, thank you.

Just in case anyone got into the same trouble, here's the solution.

Added to gsconfig.php
Code:
define('NMPARAMPOST','akce');
Edited .htaccess like this
Code:
RewriteRule ^tag/([^/.]+)/page/([^/.]+)/?$ index.php?tag=$1&page=$2 [L]
RewriteRule ^tag/([^/.]+)/?$ index.php?tag=$1 [L]
RewriteRule ^akce/([^/.]+)/?$ index.php?akce=$1 [L]
RewriteRule ^page/([^/.]+)/?$ index.php?page=$1 [L]
RewriteRule ^archive/([^/.]+)/?$ index.php?archive=$1 [L]
(if you didn't set NMPARAMPOST, instead of "akce" there will be the word "post")
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
RewriteRule in NewsManager has become a very interesting item, maybe because a linear URL is always better than a complicated one...
Well, I'm sooo glad that skabadip and TJ found out a solution to their problems, maybe because I prefer other ones don't suffer like me lol (joke)
I really can't understand the reason why even if FancyURLs is actived on GetSimple and NewsManager and the lines in my .htaccess are these ones...

Code:
RewriteRule events-news/tag/([^/.]+)/page/([^/.]+)/?$ index.php?id=events-news&tag=$1&page=$2 [L]
RewriteRule events-news/tag/([^/.]+)/?$ index.php?id=events-news&tag=$1 [L]
RewriteRule events-news/([^/.]+)/?$ index.php?id=events-news&post=$1 [L]
RewriteRule events-news/page/([^/.]+)/?$ index.php?id=events-news&page=$1 [L]
RewriteRule events-news/archive/([^/.]+)/?$ index.php?id=events-news&archive=$1 [L]

...the result - weirdly - is this url www.mysite/index/events-news/post-title
Yes, a subfolder called 'index' comes out from nowhere
Of course, in my 'gsconfig.php file' NMNOPARAMPOST is 'true' and no GSCANONICAL actived

Any suggestion ? It could improve my headache :-P
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
is it in your siteurl in settings?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
Is event-news a child/subpage of index?
Reply
First of all, thanks for your quick replies.
@ shawn_a and Carlos:
Yes, exactly the NewsManager page ("event-news") is subpage of index..
Is it the problem?
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
Yes. Your news page is http://www.example.com/index/events-news/ then.
Reply
No the url of my newsmanager page is
http://www.example.com/events-news/
the problem is when I click on the posts
so it shows that "index"

with the normal pages i have no problems...
e.g. http://www.example.com/contact/

I think the problem could be that my newsmanager page is a subpage of index...

amd even tried something like Tj... but nothing.
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
Okay I tested it and
if my NewsManager Page is no more a subpage of index, then URL becomes perfect:
e.g.
http://www.example.com/events-news/post-title
Most probably it should be a bug...
Any news?
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply
(sorry for the delay)
I don't get it. If you set a page's parent as index, then its URL will be like SITE/index/page/ , not SITE/page/
Not a bug, it's how GS has always worked (unless you patch it)
Reply
and there is a way to avoid the show it?
at the moment index is showed only by NM
eg: if page1 e page2 are Children of index (home)
is there a way to modify the URL in SITE/page1 or SITE/page2
via fancy urls?

(2014-12-06, 01:27:46)Carlos Wrote: (sorry for the delay)
I don't get it. If you set a page's parent as index, then its URL will be like SITE/index/page/ , not SITE/page/
Not a bug, it's how GS has always worked (unless you patch it)
My website made with GetSimple CMS is

Arte & Società
www.artesocieta.eu

An indipendent website about Italian Contemporary Visual Arts
Reply




Users browsing this thread: 11 Guest(s)