Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager
#26
Hello!

While I do have a very basic understanding of PHP, some things used here are at the moment too complex and I need some help figuring something out.

My problem is that I on my website would like to have an easy system for managing several posts on one page. GetSimple doesn't seem to have this kind of feature, but this plugin does. However, with this plugin, the same news appear on every page. What I would need is for every different page to have different news. It could perhaps be achieved by having a drop-down menu in the news editing plugin choosing on which page it should go, and then only loading the xml-files that belong to that page (for example by saving the page name in the xml-file or in the xml-filename), and if this was a simple system I made myself I could do that, but in this more professional system it's too complex for me.

Another solution, even though not as pretty, would be just editing all pages in the normal CKE-editor and have all news in one big text with headers in between, but then there's another problem, how would you enable someone to insert headers in the current CKE-editor? I don't want to force the users to go into source mode and for example add h1-tags around their headers.

I'd be thankful if someone could help me come up with a solution to this problem.

EDIT: Found a temporary solution by finding the option to change the WYSIWYG Editor toolbar to advanced. This will work until I get the news plugin to work as I want, currently trying to make a function that will simply return all the pages.
Reply
#27
I see what you mean, and a solution would be to use categories. At the moment I'm not really interested in implementing this, as I intended this plugin to be basic and simple, but it shouldn't be much work so if anyone wants to extend the plugin, feel free to do so.
Reply
#28
Any chance of pagination and and extra news page, like
On the main site it shows 3 latest news and for example alltimenews page shows news all time?
Reply
#29
Yes, I just added this :-)

To get what you want you should create 2 templates/pages: one that has the line

Code:
<?php show_articles(3); ?>

and one with

Code:
<?php show_articles(); ?>

Note the value 3 added as an argument in the upper line of code.
Reply
#30
Yesterday I installed the Disqus Plugin, and now when you click on the link Create New ARTICLE I send
Code:
http://neowebtime.ru/01/admin/load.php?id=external_comments&edit
Reply
#31
You're right, it's fixed now. Thanks for pointing that out!
Reply
#32
Is there anyway to implement this script perhaps on the index content page, instead of having to place it within the theme files. It's a great on the fly news manager, and very easy for like a 1 liner updates, but if you don't want your news content on every page, any idea how you guys. I tried putting it in the actual data xml, but it automatically just gets commented out.
Reply
#33
If you don't want your news articles on every page of your website, then create a seperate theme template (a copy of template.php for example) that links to the news plugin and choose that particular template when creating a new page.
Reply
#34
You can also use the DynPages plugin (http://get-simple.info/extend/plugin/dynpages/81/).
Just put the code to show the news, e.g.

Code:
<?php show_articles(); ?>

in a component named "news" and put the following place holder on any page where you want to show news:

Code:
{% news %}

This way you could include content before and after the news, for example:

Code:
<p>Some text...</p>
<p>And now the news:</p>
<p>{% news %}</p>
<p>An now back to other topics...</p>
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#35
mvlcek: awesome man! I got it all lined up @ http://www.shoutinginfrench.com on the homepage.
Reply
#36
Why don't work "Enable the HTML editor" option?
I disable HTML editor in GetSimple settings, but in News Manager it's enabled

p.s. News Manager 1.1.1
Reply
#37
Somebody does title=link to full news on single page?
Reply
#38
Eugene, the plugin now honors the HTML editor option. As for your title=link request, I might do that later.
Reply
#39
Hello,
I have an error in 3.0B with exec-php in debug mod :
(testing with version 1.1.2)
Code:
Warning: Missing argument 1 for show_articles(), called in
D:\ZMWS\_web.zmwsc\GetSimple_3.0Beta_r307\plugins\zzzz_exec-php.php(30) : eval()'d code on line 2 and defined in
D:\ZMWS\_web.zmwsc\GetSimple_3.0Beta_r307\plugins\news_manager.php on line 222

Thanks
Reply
#40
madvic Wrote:Hello,
I have an error in 3.0B with exec-php in debug mod :
(testing with version 1.1.2)
Code:
Warning: Missing argument 1 for show_articles(), called in
D:\ZMWS\_web.zmwsc\GetSimple_3.0Beta_r307\plugins\zzzz_exec-php.php(30) : eval()'d code on line 2 and defined in
D:\ZMWS\_web.zmwsc\GetSimple_3.0Beta_r307\plugins\news_manager.php on line 222

Thanks

I correct with :
Code:
<?php show_articles(0); ?>

and an another error :
Code:
Notice: Undefined variable: index in
D:\ZMWS\_web.zmwsc\GetSimple_3.0Beta_r307\plugins\news_manager.php on line 234

Notice: Undefined variable: pages in
D:\ZMWS\_web.zmwsc\GetSimple_3.0Beta_r307\plugins\news_manager.php on line 234


Thanks
Reply
#41
When I do this :
Code:
<?php show_articles(1); ?>

I have this error in debug mod :
Code:
Notice: Undefined index: QUERY_STRING in
D:\ZMWS\_web.zmwsc\GetSimple_3.0Beta_r307\plugins\news_manager.php on line 267

Thanks
Reply
#42
Madvic, I've addressed the first two issues, they should be solved now. About the third one, afaik $_SERVER['QUERY_STRING'] is a valid php variable so I don't understand why you are having this error.
Reply
#43
OK, Thanks for issues.
Definition :
'QUERY_STRING'
The query string, if any, via which the page was accessed.

But if query string not exist ? -> error.
Reply
#44
really impossible to make a short news item and follow a link to the full article?
http://neowebtime.ru/01/news-2
Reply
#45
roog Wrote:Note that this plugin won't work with fancy urls unless you write your own mod_rewrite rules!

Has anyone been successful with generating rewrite rule to access older articles with fancy urls ?
I'm not even 100% sure if this option works as supposed, because even with furls disabled, clicking on "older articles" doesn't lead to them. At least not with gs2.04b.

ps. you could make use of function located in basic.php to create furls
Addons: blue business theme, Online Visitors, Notepad
Reply
#46
Oleg06 Wrote:really impossible to make a short news item and follow a link to the full article?
http://neowebtime.ru/01/news-2
Олег, в 19 посте выложена моя версия с превьюшками новостей, которые ведут на полную новость - не подойдёт? А тут - русифицированная
Reply
#47
сделай пожалуйста разбивку по страницам, чтобы можно было хотя бы в коде регулировать количество статей на странице и цены не будет твоему плагину
http://neowebtime.ru/00/www
Reply
#48
madvic Wrote:OK, Thanks for issues.
Definition :
'QUERY_STRING'
The query string, if any, via which the page was accessed.

But if query string not exist ? -> error.

The correction :

/*******************************************************
* @function show_articles
* @action runs the news plugin on the theme/site page
*/
function show_articles($n = NULL) {
$articles = get_articles();
if (isset($n) && $n > 0) {
$index = (isset($_GET['page'])) ? $_GET['page'] : 0;
$pages = array_chunk($articles, $n);
if (count($pages) > 0){
$articles = $pages[$index];
}
}
foreach ($articles as $article) {
$id = basename($article, ".xml");
show_single($id);
}
if (isset($n) && $n > 0)
show_navigation($index, sizeof($pages));
}


/*******************************************************
* @function show_navigation
* @action provides links to navigate between article pages
*/
function show_navigation($index, $pages) {
$queryString = "";
if (isset($_SERVER['QUERY_STRING'])){
$queryString = $_SERVER['QUERY_STRING'];
}
$query_string = preg_replace('/&?page=-?\d+/', '', $queryString);
if (strlen($query_string) == 0) {
$url = $_SERVER['PHP_SELF'];
$delimiter = '?';
} else {
$url = $_SERVER['PHP_SELF'] . '?' . $query_string;
$delimiter = '&';
}
....
Reply
#49
I am testing the plugins for Get-Simple and I run into poor documented plugins

why should we read a long forum thread to get information how to use the plugin?
This is discouraging ;=)

maybe you write a short step by step instruction, show this at the extend-page and add it to the download zip?

It makes me sad to read such a lot of php-discussions and complaints when I want to find out how to get this to work

Edit:

I noticed that the pagination does not work ("older articles") at the footer of a page which shows 3 Articles:

The page is:

http://www.urbanistan.de/getsimple/news-...-der-seite

the link to older articles is:

http://www.urbanistan.de/getsimple/index...ite&page=1


I added this line to .htaccess:

Code:
RewriteRule ^news/([^/]*)\.html$ /index.php?article=$1 [L]

with no result
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#50
anyone can make a normal plug-in news that on every news created a separate page in the directory pages, as in the I18N Search, to a pagination of pages, to can add pictures, so you can individually write a short news text, a separate full news
Sorry, Google translate
Reply




Users browsing this thread: 6 Guest(s)