Posts: 2
Threads: 0
Joined: Jan 2011
Raffee Wrote:Connie Wrote:I tested Version 1.2.4 with GS 3.0
I managed somehow to create an article without title. This article still exists in the list of articles, but I cannot edit it anymore, I can only delete it.
On the other hand the article is not in the news-output, but an error message: "The requested article does not exist."
So I have to delete that article and rewrite it, but I never get it in the original sequence
PS: in the meantime, I have 3 articles without titles, which are not listed and cannot be edited
I've got the same, but I made some investigation and realized that it's up to localization/encoding/entities in the plugin. Whenever I've put non-ascii character, for example Polish 'ó' (oacute), into the title - article title completely disappeared. The XML file stayed here, but with the <title> tag empty. When I edit the physical file and put the title without non-english chars - article shows again and can be edited from admin panel.
I'm using GS 3.0,
News Manager v.1.2.4,
i18n plugin v.1.1.1 with Polish language files (pl_PL.php)
and Polish GS language file
with pl.js file for CKEditor.
Finally here's my current news_manager.php code (excerpts):
* in function article_overview()
Code: $title = htmlspecialchars_decode($data->title, ENT_QUOTES);
instead of
Code: $title = html_entity_decode($data->title, ENT_QUOTES, 'UTF-8');
* in function edit_article($id) in CKEDITOR.replace parameters
instead of
* in function save_article()
Code: $title = htmlspecialchars($_POST['post-title'], ENT_QUOTES, 'UTF-8', false);
$content = htmlspecialchars($_POST['post-content'], ENT_QUOTES, 'UTF-8', false);
$excerpt = htmlspecialchars($_POST['post-excerpt'], ENT_QUOTES, 'UTF-8', false);
instead of
Code: $title = htmlentities($_POST['post-title'], ENT_QUOTES, 'UTF-8');
$content = htmlentities($_POST['post-content'], ENT_QUOTES, 'UTF-8');
$excerpt = htmlentities($_POST['post-excerpt'], ENT_QUOTES, 'UTF-8');
My GSCONFIG.PHP file got
Code: # WYSIWYG editor language (default en)
define('GSEDITORLANG', 'pl');
and
Code: # Set PHP locale
# [url]http://php.net/manual/en/function.setlocale.php[/url]
setlocale(LC_ALL, 'pl_PL');
but I'm not sure if it does matters
Now my news_manager plugin works as I wanted.
I'm pretty new in GetSimple and PHP (especially with security risk) so tell me if I am wrong with this changes.
Thanks for this tips! I have copy/pasted that code into the news-plugin, and it finally shows the post with special characters in the admin-site. But I still have some strange problems. When I am uploading this plugin to my site, the whole site get an internal error (500). When I delete the file from the webserver, the site is back up and running again instantly. I am running GetSimple 3, I updated just a couple of hours ago.
Another strange thing is that to test this, I installed GetSimple 3 on one of my other webservers, and uploaded the same confiruged file. No internal error this time, but the page where I am supposed to show the news doesnt show me other then the title, and when I press "Save/Update article", all text/photos in "Content" and in "Excerpt" disappear.
Any thougts on this? All help is very much appreciated.
Posts: 1,204
Threads: 30
Joined: Jun 2010
chberge: try with version I posted on earlier page.
It has a bit different approach, and whole plug is translated to polish language.
Don't forget to delete all news file before you install this version for test purposes.
Addons: blue business theme, Online Visitors, Notepad
Posts: 2
Threads: 0
Joined: Jan 2011
yojoe Wrote:chberge: try with version I posted on earlier page.
It has a bit different approach, and whole plug is translated to polish language.
Don't forget to delete all news file before you install this version for test purposes.
Thank you for your answear. I fixed my problem with deleting the whole site, downloading and uploading GetSimple 3.0, and installed News Manager again. Then the script over worked perfectly! So no I am running Get Simple 3.0 and with News Manager that works perfect
Posts: 1
Threads: 0
Joined: Apr 2011
2011-05-01, 02:40:10
(This post was last modified: 2011-05-01, 04:16:50 by steviez.)
Here's an updated fix for the problem with special chars (swedish chars: åäö, polish chars and so on). It's inspired from Raffee's fix (thanks!) but with the advantage that it also to store the XML the exakt same way as GetSimple does (with CDATA, safe_slash_html and so on). I borrowed most of it from the GetSimple core code.
Simply replace the function save_article with the following:
Code: /*******************************************************
* @function save_article
* @action write $_POST data to a file
*/
function save_article() {
$id = $_POST['id'];
$file = ARTICLEDATA . $id . '.xml';
if(isset($_POST['post-title'])) { $title = safe_slash_html($_POST['post-title']); }
if(isset($_POST['post-content'])) { $content = safe_slash_html($_POST['post-content']); }
if(isset($_POST['post-excerpt'])) { $excerpt = safe_slash_html($_POST['post-excerpt']); }
if (!file_exists($file)) {
$date = date('j M Y');
} else {
$data = @getXML($file);
$date = $data->date;
}
$xml = new SimpleXMLExtended('<?xml version="1.0" encoding="UTF-8"?><item></item>');
$note = $xml->addChild('title');
$note->addCData(empty($title) ? '(no title)' : $title);
$note = $xml->addChild('date');
$note->addCData($date);
$note = $xml->addChild('content');
$note->addCData($content);
$note = $xml->addChild('excerpt');
$note->addCData($excerpt);
exec_action('changedata-save');
XMLsave($xml, $file);
if (!is_writable($file))
echo '<div class="error">Unable to write article data to file</div>';
else
echo '<div class="updated">The article has been succesfully saved</div>';
article_overview();
}
Note: If you add this patch, your old news will probably be unreadable since this format the XML in another way. You will have to resubmit them.
Posts: 93
Threads: 7
Joined: Oct 2010
Hello all,
It's been a while since I last worked on this plugin. Until now :-).
I've fixed some of the most important bugs and released version 1.2.5. This release mainly addresses the localisation issues (special characters) and also makes this plugin GS 3.0 compliant.
That's not all however: I'm also working on a new major release, which should be due somewhere in the near future. I try to implement as much of the requests here in the forum as possible, plus some new ideas of my own. So, you can expect lots of new functionality! Stay tuned...
Posts: 2,928
Threads: 195
Joined: Feb 2011
roog Wrote:So, you can expect lots of new functionality! Stay tuned...
Roog,
this is good news, I am waiting (impatiently) as I need this functionality
Cheers, Connie
Posts: 1
Threads: 0
Joined: May 2011
Hello All.
Dear roog,
could You add function show_articleslist() with and without parameter that will be display article list - title as link to article.
Thanks for advance.
Posts: 661
Threads: 52
Joined: Feb 2011
It would be great if you can add an archive of the articles (by month/year).
If you want I can give you coding to accomplish this.
Posts: 5
Threads: 0
Joined: Apr 2011
2011-05-10, 00:12:19
(This post was last modified: 2011-05-10, 16:01:17 by hinducute.)
can i use news manager plugin for two different pages, because i intend to make 2 language in this site, anyone can help me?
Posts: 2,928
Threads: 195
Joined: Feb 2011
renovera Wrote:can i use this plugin for two different pages, because i intend to make 2 language in this site, anyone can help me?
You mean you want to use this plugin in connection with the multilanguage-plugin?
Why not check it out?
Posts: 5
Threads: 0
Joined: Apr 2011
2011-05-10, 13:40:29
(This post was last modified: 2011-05-10, 16:03:49 by hinducute.)
Connie Wrote:renovera Wrote:can i use news manager plugin for two different pages, because i intend to make 2 language in this site, anyone can help me?
You mean you want to use this plugin in connection with the multilanguage-plugin?
Why not check it out?
i have 2 languages in my site which mean i must have 2 news pages, main language and second language, but i don't use multiple language plugin, can news manager do that?, i pretty desperate on this...
Posts: 1,204
Threads: 30
Joined: Jun 2010
renovera Wrote:i have 2 languages in my site which mean i must have 2 news pages, main language and second language, but i don't use multiple language plugin, can news manager do that?, i pretty desperate on this... You'd have to duplicate this plugin and change some variables and paths in duplicated instance.
For multiple languages use Mvlcek's search plugin, as it offers also a news functionality, although it's a bit advanced.
Refer to his website for manuals.
Addons: blue business theme, Online Visitors, Notepad
Posts: 5
Threads: 0
Joined: Apr 2011
2011-05-11, 03:07:23
(This post was last modified: 2011-05-11, 03:08:40 by hinducute.)
yojoe Wrote:renovera Wrote:i have 2 languages in my site which mean i must have 2 news pages, main language and second language, but i don't use multiple language plugin, can news manager do that?, i pretty desperate on this... You'd have to duplicate this plugin and change some variables and paths in duplicated instance.
For multiple languages use Mvlcek's search plugin, as it offers also a news functionality, although it's a bit advanced.
Refer to his website for manuals.
i tried to duplicate the plugin and change some variables, but when i refreshed the page it's blank, no error messages just white spaces page,
Posts: 15
Threads: 3
Joined: May 2011
Hi
I know this question is kind of stupid, but anyway...
How I can put those news only one page? Now those news showing every page.
Posts: 2,928
Threads: 195
Joined: Feb 2011
artzii Wrote:Hi
I know this question is kind of stupid, but anyway...
How I can put those news only one page? Now those news showing every page.
Use a special template for that, which you set for only one page
so all other pages use the standard template and one page with special template shows the news as well
Posts: 3,491
Threads: 106
Joined: Mar 2010
artzii Wrote:How I can put those news only one page? Now those news showing every page.
Another way: insert the function call (in your template) like this:
Code: <?php if (return_page_slug() == 'newspageslug') { show_articleslist();} ?>
(Change newspageslug to your news page's slug ;-))
And another way could be using the DynPages plugin: you create a new component with <?php show_articleslist(); ?>, then call it in your news page body. This has the advantage that it works even if you change your theme.
Posts: 5
Threads: 0
Joined: May 2011
hi guys i wanna ask something, do you know how i can showing the news separately..
example: i have 2 pages, the A page showing all about the A news, and B page showing only B news.
thanks.
Regards,
SaYNo.Inc
Posts: 2,928
Threads: 195
Joined: Feb 2011
I never met a company posting in a forum thread ;=)
well, you want categories.
This is not supported.
Posts: 2,094
Threads: 54
Joined: Jan 2011
SaYNo.Inc Wrote:hi guys i wanna ask something, do you know how i can showing the news separately..
example: i have 2 pages, the A page showing all about the A news, and B page showing only B news.
Instead of the News Manager plugin you can use the I18N Search plugin to display news as described here. Just give each news item tags/keywords "news, A" or "news, B" and then display the search results using
Code: (% searchresults tags:news,A numWords:-1 %)
(or news,B)
Posts: 84
Threads: 17
Joined: Mar 2010
2011-05-11, 21:32:47
(This post was last modified: 2011-05-11, 21:34:10 by apelsinas.)
I have a problem with news manager on xtreemhost hosting,when i click on create new article the editor doesn't appear.What is the cause?
P.S: on others hosting it works normally
Posts: 5
Threads: 0
Joined: May 2011
Connie Wrote:I never met a company posting in a forum thread ;=)
well, you want categories.
This is not supported. LOL. this is my username in all forums
mvlcek Wrote:SaYNo.Inc Wrote:hi guys i wanna ask something, do you know how i can showing the news separately..
example: i have 2 pages, the A page showing all about the A news, and B page showing only B news.
Instead of the News Manager plugin you can use the I18N Search plugin to display news as described here. Just give each news item tags/keywords "news, A" or "news, B" and then display the search results using
Code: (% searchresults tags:news,A numWords:-1 %)
(or news,B)
thanks mvlcek, great plugin you've there
i have a question for you in your support thread
Posts: 29
Threads: 5
Joined: Jan 2011
2011-05-15, 21:57:09
(This post was last modified: 2011-05-15, 21:59:36 by karenweber8.)
Hello,
I have a little problem with this plugin... I write a news and I save it. I'm redirected on this page :
And the news is not saved.
I use GS 2.03.1 (and I can't upgrade) and "articles" directory is writable.
Thanks for help
Posts: 2,928
Threads: 195
Joined: Feb 2011
gimx Wrote:I use GS 2.03.1 (and I can't upgrade) and "articles" directory is writable.
Thanks for help
well, I strongly suggest the upgrade. Why can't you?
Read the WIKI how to upgrade: http://get-simple.info/wiki/installation:upgrade
Posts: 29
Threads: 5
Joined: Jan 2011
Because it's not my site, I have helped a friend and he want keep GS 2.
Connie, any idea to resolve my problem ?
Posts: 93
Threads: 7
Joined: Oct 2010
2011-05-16, 07:57:31
(This post was last modified: 2011-05-26, 02:31:18 by ljgww.)
Well then, version 2.0 is out.
I rewrote most of the code and added a lot more functionality, hence the bump to 2.0. The list of new features and changes is quite long but the most noteworthy are:
- Settings can now be easily configured, you no longer have to tweak the code
- Multilanguage support
- Automatically generated excerpts
- Private posts (similar to pages)
- Tags
- Archives
- Keyword search
- Several sidebar functions, such as recent articles, archives and a tag cloud
- Human readable post id's (1, 2, ...)
- CKEditor now follows global settings
You can see a demo on this page.
I have done my best to make version 2.0 backwards compatible, so you should be able to migrate your previous articles although it will require manual intervention. To do so, copy your /data/aricles folder to /data/posts, retaining permissions (since this plugin is moving towards a blog, I decided to rename articles to posts). Starting from version 2.0, post id's are now in a human readable format (1, 2, ... instead of "4d774dfa37a1d") so the best thing would be to rename your old articles, although it should also work without renaming them. You can run the following python script from within your posts/articles folder to rename your previous articles:
Code: #!/usr/bin/python
import os, glob
posts = sorted(glob.glob('*.xml'))
for i, post in enumerate(posts):
os.rename(post, '%d.xml' % (i+1))
The one request I haven't been able to fix yet is fancy url compatibility. I'm not very familiar with mod_rewrite rules and I have managed to create some rules that for instance rewrite http://yoursite.com/post/1/ to http://yoursite.com/index.php?post=1, but they break other parts of GS. An example of the rule I have just described is:
Code: RewriteRule ^post/([^/.]+)/?$ index.php?post=$1 [L]
So, if anyone can help me out here, it is much appreciated!
Also, since this plugin now has i18n support, you can create your own language files by translating the existing ones in /plugins/news_manager/lang. And if you do, please let me know so that I can include your translation in the next release.
I expect that there will be new bugs introduced with this new version. Let me know when you find any and I'll try to fix them asap.
Cheers,
roog
PS) For those interested, the legacy 1.x version (last release is 1.2.6) of this plugin is still available here.
|