Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager
why these lines are loaded from a file en_US, and the date from file en_US
Code:
"FOUND"               =>  "Следующие сообщения были найдены:",
"NOT_FOUND"           =>  "К сожалению поиск не дал результатов.",
"NOT_EXIST"           =>  "Запрашиваемое сообщение не существует",
"NO_POSTS"            =>  "Нет сопубликованых сообщений.",
"PUBLISHED"           =>  "Опубликовано",
"TAGS"                =>  "Теги",
"OLDER_POSTS"         =>  "Предыдущие сообщения",
"NEWER_POSTS"         =>  "Следующие сообщения",
"SEARCH"              =>  "Поиск",
"GO_BACK"             =>  "Назад"
Reply
This plugin uses the DATE_FORMAT as defined in your global GS language (the one you've set in the GS settings page). So, about your question, maybe you have set the en_US language globally and ru_RU only for the News Manager plugin?
Reply
No, I have a file ru_RU global GS language
Reply
Are DATE_FORMAT an DATE_TIME_FORMAT defined in your global ru_RU language file?
Reply
yes, defined in y global ru_RU language file
and that with these lines? I transferred them to a file ru_RU
Code:
# front-end/site
"FOUND"               =>  "The following posts have been found:",
"NOT_FOUND"           =>  "Sorry, your search returned no hits.",
"NOT_EXIST"           =>  "The requested post does not exist.",
"NO_POSTS"            =>  "No posts have been published yet.",
"PUBLISHED"           =>  "Published on",
"TAGS"                =>  "Tags",
"OLDER_POSTS"         =>  "Older Posts",
"NEWER_POSTS"         =>  "Newer Posts",
"SEARCH"              =>  "Search",
"GO_BACK"             =>  "Go back to the previous page"
http://chaga-mushroom.com/blog/
with the plugin guestbook is the same story
Reply
I saw that the link at the bottom of individual news posts uses javascript:history.back() to get us back to the previous page. This makes sense to me if the user originally arrived from the news page, but not if the user was given a direct link via chat, e-mail, newsfeed or other web page.

What if the back link pointed to the news page? This should cover more cases than history.back(). No matter where the user came from, he will get to the overview. Yeah, if the user came from another web page, it wouldn't bring them back to their previous page, but I guess that's what the browser's back button is for? Coming from other sources like I mentioned above, the current approach wouldn't work so the backlink would be useless.

What's your opinion on that, roog, others?
Reply
roog Wrote:
Rene Wrote:Unfortunately the sidebar is not working for me ;(
With DEBUG on nm_sidebar_function() is throwing next error ...

Code:
Fatal error: Call to undefined function nm_sidebar_function() in C:\www\admin\inc\theme_functions.php (583) : eval()'d code on line 2

I think you misunderstood the instructions on the demo page. First, with theme template I meant the template files in your current theme path and not /admin/inc/theme_functions.php. For example, if you were to use the Innovation theme, then you'll find those template files in /theme/Innovation/. Second, nm_sidebar_function() is not an existing sidebar function, it is just an example. You should replace it with one of the actually implemented functions such as nm_list_recent() or nm_list_archives(). I'll update the description on the demo site to make it clearer.

Rene Wrote:And why does the News items suppressing the page content of the page To Display Posts iso adding News items to the page?

That seemed like the most logical thing to me, that is: having a seperate (empty) page on which you display all your articles.


@roog: You're so right, I fully misread the instructions on the demo page. Have new version working, fancy URL support is great!

About my 'suppressing page content remark': it's was only for putting an introduction text above the news items, but hey, who wants to Wink

Great plugin & explanation.
Reply
@polyfragmented: this "go back" link is a problematic thing. I added it because several people requested it, but there's no clean and concise way to implement it.

Ideally, you only want to see this link beneath a post when you came from a sub-, archive-, tag- or search page, no? But what then if you were viewing such a page, but actually used a sidebar link to get to the post you're viewing right now (meaning you not necessarily want to go back)?

So that's why I chose for the simple solution of javascript:history.back(), as it suits most people's needs. Your suggestion makes sense too, but I think the majority prefers to just go back (to their search results/archive- or tag-page) instead of being taken to the main news page.

To be honest, I don't really see the need for such a back link anyway because that's where your browser's go back button is for, isn't it? Ah well, maybe I'll think of some smart way to implement this feature the way I think it should work. And if anyone has a good suggestion, let me hear it!

@rene: I'm glad it worked out fine. About this content being replaced, I might add an option later such that you can choose to either replace the content or append to it. We'll see.
Reply
Roog,

you're right, coming from an archive/tag/news page the history.back makes sense.
Reply
I noticed that some strings are still in en_US (like Oleg) even when they are translated in german,

"PUBLISH" is not "veröffentlicht am" but still "Published"

also the blogarchive shows "May 2011"

the date is defined in the general german language file in /admin/lang/de_DE.php like the following:


Code:
*/
"DATE_FORMAT"            =>    "d.M Y",
"DATE_AND_TIME_FORMAT"    =>    "d.m.Y - H:i", //Datum und Zeitangaben
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
Yeah, you're right.

It took me some time to figure out why, but now I understand. The $LANG variable can only be altered in the admin section and is stored in the current user's settings file. The front-end of your site knows nothing about users and thus the language always defaults to en_US, unless you define it explicitly.

So I've created an extra option in the News Manager settings panel where you can choose a language for the front-end part of your site. Note that this doesn't affect the language for the admin section of this plugin, that still follows the global setting.

A few extra strings have been added to the News Manager language files, including a date format. For some of the language files those new strings still have to be translated.
Reply
roog Wrote:Yeah, you're right.

It took me some time to figure out why, but now I understand. The $LANG variable can only be altered in the admin section and is stored in the current user's settings file. The front-end of your site knows nothing about users and thus the language always defaults to en_US, unless you define it explicitly.

I have added this as feature request, as it does not make sense, if each plugin has a separate language setting.
$LANG was available in GS 2.03, but because of multi user capabilities is not set any more for the front end in GS 3.0.

I suggest to ask users to set the language in the gsconfig.php in the mean time:
Code:
$LANG = 'de_DE';
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
Yes I certainly agree, it really should be possible to set a front-end language. I hope it will be included soon.
Reply
Thanks, the text was in Russian, it remains to learn how to change the date. :-)
Reply
Just change the value of "DATE_FORMAT" (last entry) in your language file located in /plugins/news_manager/lang/.
Reply
Thanks, it works
Reply
it's not completely correct ;=)

In gsconfig.php:
Code:
# Set PHP locale
# http://php.net/manual/en/function.setlocale.php
setlocale(LC_ALL, 'de_DE');
$LANG = 'de_DE';

in plugins/newsmanager/lang/de_DE.php:
Code:
# date settings
"DATE_FORMAT"         =>  "d.M Y"

the result?

the month's are still in english, we celebrate MAI and not MAY ... ;=(

by the way, I updated the german language file a little bit to have better texts ;=)
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
Connie Wrote:it's not completely correct ;=)
Code:
"DATE_FORMAT"         =>  "d.M Y"
the month's are still in english, we celebrate MAI and not MAY ... ;=(

It seems that the plugin uses the date function to display dates and will thus always show english names.

To display internationalized dates, use the strftime function. I have created a new how-to in the Wiki.
The I18N Search plugin already uses this method.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
Great Info, thanks!

I am waiting for the next version of the newsmanager for testing ;=)

Cheers, Connie
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
Thanks to Connie for pointing this out, and mvlcek for the howto. It's fixed now.
Reply
Roog,

That's what I love with GetSimple and the developers: it's such a good cooperation and bugs are fixed fast, suggestions are discussed and realized ..

I immediately downloaded the new version and tested, and it works "partially" ...

the publishing date works correct now (unless I had to edit the german language file as we use blanks between day and month's name)

Quote:Veröffentlicht am 19. Mai 2011
see here:

[Image: screen_newsmanager1.jpg]

but the archive-list in the sidebar still shows the english month:

see here:
[Image: screen_newsmanager2.jpg]

I added the corrected language file here

Cheers, Connie
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
I immediately downloaded the new version and set language to Dutch. And for me it's not displaying the date ...

The date in XML file
<date><![CDATA[Mon, 23 May 2011 13:55:40 +0200]]></date>

Settings in nl_NL.php
# date settings
"DATE_FORMAT" => "%e %b %Y"

Output ..
[Image: news.jpg]
Reply
New version (2.1.3) is out, which features:
  • Editable post slugs
  • Editable post publication dates

@Connie: Date formatting in the archive list should now function properly.

@Rene: I don't know why the date is not being displayed. Even with an incorrect date format or publication date you should still see some output. Check the function nm_get_date() in /plugins/news_manager/inc/functions.php and try to figure out what's going wrong.
Reply
roog Wrote:
  • Editable post slugs
  • Editable post publication dates
Very cool additions!

Archive list dates are indeed fixed here, thanks.
Reply
roog Wrote:New version (2.1.3) is out, which features:
  • Editable post slugs
  • Editable post publication dates

Anyone has idea why list of news articles in admin panel doesn't show one (and only one) title out of 24 others?
On the news front page (both list & indyvidual article page) there's no problem with displaying it.

I've changed slug for every article and I can't figure any weird things in this one XML file.
Reply




Users browsing this thread: 5 Guest(s)