Thread Rating:
  • 6 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager (updated)
(2022-12-30, 08:23:42)Carlos Wrote:
(2022-12-22, 06:39:53)tomkow Wrote: Carlos still not working 'Post options > Select file' and go to any subfolder to pick a picture - no display!
I solved to modify 'filebrowser.php' and put (array) in several places.

Actually it is a bug in GetSimple.

It can be fixed by editing admin/inc/basic.php, and at the end of function subval_sort (around line 200), change:
Code:
        return $c;
    }
}
by:
Code:
        return $c;
    } else {
        return array();
    }
}

Alternatively, if you prefer to patch News Manager with a workaround, edit news_manager/inc/browser/filebrowser.php and change every occurrence of:
subval_sort by (array)subval_sort (there are 4).

Thank you!
Reply
Hello Carlos,

when running the newest News Manager plugin (3.6.1) under PHP 8.1, I get an error message on Single Post pages:


Quote:
Quote:Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /home/user/public_html/plugins/news_manager/inc/site.php:916 Stack trace: #0 /home/user/public_html/plugins/news_manager/inc/site.php(916): implode() #1 /home/user/public_html/plugins/news_manager.php(168): nm_update_meta_keywords() #2 /home/user/public_html/admin/inc/plugin_functions.php(293): nm_frontend_init() #3 /home/user/public_html/index.php(130): exec_action() #4 {main} thrown in /home/user/public_html/plugins/news_manager/inc/site.php on line 916


Also see http://get-simple.info/forums/showthread...5#pid73495

All other page types (tag pages and snippets with a component) seem to work fine.
Reply
@Hypertexter

I guess you have custom setting metakeywordstags enabled.

Please replace site.php (in news_manager/inc/) with the one attached and let me know if it fixes this issue.


Attached Files
.zip   nm-3.6.1-site.php-patched.zip (Size: 7.56 KB / Downloads: 7)
Reply
(2023-01-20, 05:43:37)Carlos Wrote: @Hypertexter

I guess you have custom setting metakeywordstags enabled.

Please replace site.php (in news_manager/inc/) with the one attached and let me know if it fixes this issue.

Yes I have a user-defined "metaKeywordsTags 1".
Yes it does!
YES!!! Thank you!

Will this lead to an official new version?
Reply
One more thing, Carlos,

I got one additional bug notification from PHP 8.1 in a context with News Manager plugin:


Quote:[19-Jan-2023 10:19:16 Europe/Amsterdam] PHP Deprecated:  Function strftime() is deprecated in /home/user/public_html/plugins/news_manager/inc/functions.php on line 152
[19-Jan-2023 10:19:16 Europe/Amsterdam] PHP Deprecated:  Function strftime() is deprecated in /home/user/public_html/plugins/news_manager/inc/functions.php on line 152
[19-Jan-2023 10:19:16 Europe/Amsterdam] PHP Deprecated:  Function strftime() is deprecated in /home/user/public_html/plugins/news_manager/inc/functions.php on line 152
[19-Jan-2023 10:19:16 Europe/Amsterdam] PHP Deprecated:  Function strftime() is deprecated in /home/user/public_html/plugins/news_manager/inc/functions.php on line 152
[19-Jan-2023 10:19:16 Europe/Amsterdam] PHP Deprecated:  Function strftime() is deprecated in /home/user/public_html/plugins/news_manager/inc/functions.php on line 152
[19-Jan-2023 10:19:16 Europe/Amsterdam] PHP Deprecated:  Function strftime() is deprecated in /home/user/public_html/plugins/news_manager/inc/functions.php on line 152


It is only deprecated. And I am not sure if it comes from the plugin. I use that function manually on my site.

Thank you again!
Reply
I tested the plugin on PHP 8 and saw only such errors.
Code:
Deprecated: Function strftime() is deprecated in D:\OSPanel\domains\gsphp8.ia\plugins\news_manager\inc\functions.php on line 150
Deprecated: Function strftime() is deprecated in D:\OSPanel\domains\gsphp8.ia\plugins\news_manager\inc\functions.php on line 156
Deprecated: Function strftime() is deprecated in D:\OSPanel\domains\gsphp8.ia\plugins\news_manager\inc\functions.php on line 158

Also, this code in the gsconfig.php file leads to a link to the 404 page.
Code:
define('NMNOPARAMPOST',true);

This code on the link leads to a blank page.

Code:
<?php nm_list_archives(array( 'tag'=>'mytag' )); ?>
Reply
It would be nice to post comments in the news.
Reply
(2023-01-21, 01:13:17)Oleg06 Wrote: Also, this code in the gsconfig.php file leads to a link to the 404 page.
Code:
define('NMNOPARAMPOST',true);

You have to adjust your .htaccess for this to work. See Single post URLs without prefix.

(2023-01-21, 01:13:17)Oleg06 Wrote: This code on the link leads to a blank page.

Code:
<?php nm_list_archives(array( 'tag'=>'mytag' )); ?>

You need to use custom setting tagArchives d (or tagArchives f). See Archives by tag.

(These are not related to PHP8, by the way)

@Oleg06, @Hypertexter
strftime-related messages are not errors, but deprecated notices. It will be a problem with PHP 9, but not now - they are only visible with gsdebug mode on. I'll check this when I have the time.

@Hypertexter
Yes I will release NM 3.6.2
Reply
Quote:It will be a problem with PHP 9

There's been no discussion about it and there are currently no plans for PHP 9 any time soon.

From what I know about it here:  https://externals.io/
Reply
Carlos, hi. I want to use a slider in the header on the main page, and regular headings in the posts. How can i do this?
Reply
(2023-01-31, 01:48:58)Oleg06 Wrote: Carlos, hi. I want to use a slider in the header on the main page, and regular headings in the posts. How can i do this?

In your template:

Code:
<?php if (nm_is_home()) { ?>
... slider ...
<?php } ?>

(Conditional functions)
Reply
(2023-01-31, 04:16:29)Carlos Wrote:
(2023-01-31, 01:48:58)Oleg06 Wrote: Carlos, hi. I want to use a slider in the header on the main page, and regular headings in the posts. How can i do this?

In your template:

Code:
<?php if (nm_is_home()) { ?>
... slider ...
<?php } ?>

(Conditional functions)

Thank you for your support, which has not changed over the years.
Reply
php 8
After enabling author in custom settings.
Code:
Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /plugins/news_manager/inc/site.php on line 916
Reply
@Oleg06
Please try this patch: http://get-simple.info/forums/showthread...8#pid73498
Reply
(2023-02-01, 20:40:56)Carlos Wrote: @Oleg06
Please try this patch: http://get-simple.info/forums/showthread...8#pid73498

Now everything is working well. Thanks, sorry for not following the development of your plugin.
Reply
Is it possible to post posts in reverse order on the site? For example, if a person has written a book, it will not be convenient to start reading it from the end.
Reply
I'm using the Calendar plugin in the sidebar above to show the latest posts. When you go to the page with calendar posts, these posts are displayed in the sidebar instead of the latest posts. It seems that there were similar problems with the sidebar search plugin a long time ago, but he wrote some kind of condition and everything started working. Could you help me with this problem?
https://skr.sh/sIDmqpXMGXC
Reply
(2023-02-03, 16:09:26)Oleg06 Wrote: I'm using the Calendar plugin in the sidebar above to show the latest posts. When you go to the page with calendar posts, these posts are displayed in the sidebar instead of the latest posts. It seems that there were similar problems with the sidebar search plugin a long time ago, but he wrote some kind of condition and everything started working. Could you help me with this problem?
https://skr.sh/sIDmqpXMGXC

Maybe this: http://get-simple.info/forums/showthread...6#pid49086
Reply
(2023-02-03, 16:39:40)Carlos Wrote:
(2023-02-03, 16:09:26)Oleg06 Wrote: I'm using the Calendar plugin in the sidebar above to show the latest posts. When you go to the page with calendar posts, these posts are displayed in the sidebar instead of the latest posts. It seems that there were similar problems with the sidebar search plugin a long time ago, but he wrote some kind of condition and everything started working. Could you help me with this problem?
https://skr.sh/sIDmqpXMGXC

Maybe this: http://get-simple.info/forums/showthread...6#pid49086

Yes, thank you very much, again you helped me out.
What about changing the order in which the news is displayed?
Reply
(2023-02-02, 04:13:26)Oleg06 Wrote: Is it possible to post posts in reverse order on the site? For example, if a person has written a book, it will not be convenient to start reading it from the end.

Try this: edit news_manager/inc/functions.php, and in function nm_get_posts, insert this:
Code:
$posts = array_reverse($posts);
just before this:
Code:
return $posts;
(line 28 or so)
Reply
(2023-02-04, 00:09:22)Carlos Wrote:
(2023-02-02, 04:13:26)Oleg06 Wrote: Is it possible to post posts in reverse order on the site? For example, if a person has written a book, it will not be convenient to start reading it from the end.

Try this: edit news_manager/inc/functions.php, and in function nm_get_posts, insert this:
Code:
$posts = array_reverse($posts);
just before this:
Code:
return $posts;
(line 28 or so)

Thanks, this helped.
Reply
(2023-02-04, 00:52:35)Oleg06 Wrote:
(2023-02-04, 00:09:22)Carlos Wrote:
(2023-02-02, 04:13:26)Oleg06 Wrote: Is it possible to post posts in reverse order on the site? For example, if a person has written a book, it will not be convenient to start reading it from the end.
[...]

Thanks, this helped.

The problem is that of course you'll have to patch the file again when the plugin is updated.

Do you intend to use this in a production site? Or was it just for curiosity, or experimenting?

(BTW I think that Special Pages could be better for this job...)
Reply
(2023-02-08, 22:48:53)Carlos Wrote:
(2023-02-04, 00:52:35)Oleg06 Wrote:
(2023-02-04, 00:09:22)Carlos Wrote:
(2023-02-02, 04:13:26)Oleg06 Wrote: Is it possible to post posts in reverse order on the site? For example, if a person has written a book, it will not be convenient to start reading it from the end.
[...]

Thanks, this helped.

The problem is that of course you'll have to patch the file again when the plugin is updated.

Do you intend to use this in a production site? Or was it just for curiosity, or experimenting?

(BTW I think that Special Pages could be better for this job...)

I added a checkbox to toggle. I also added a checkbox to enable/disable the author. I work with the UIkit framework, so I prepare all the plugins just for it. The I18N Special Pages plugin is a good plugin, but it's complicated for people not familiar with it. I'm doing this out of curiosity for now, but I have some ideas. Thank you very much for your support.
Reply
Question 
I have installed the plugin, but the information is too unstructured, so I can't understand how to do my basic settings. Now on the site news are printed, but news titles not.
Reply
Hello, 

Recently my host upgraded PHP from 7.4 to 8.1 and the creation of new posts broke, so I upgraded News Manager from 2.something to 3.6

Now when adding a new entry, I get the admin page header with an empty block withouth further info. 

This is the error thrown:
Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in /home/distortiongirl/distortiongirl.com/admin/inc/basic.php:689 Stack trace: #0 /home/distortiongirl/distortiongirl.com/plugins/news_manager/inc/posts.php(87): safe_slash_html('test') #1 /home/distortiongirl/distortiongirl.com/plugins/news_manager.php(87): nm_save_post() #2 /home/distortiongirl/distortiongirl.com/admin/load.php(39): nm_admin() #3 {main} thrown in /home/distortiongirl/distortiongirl.com/admin/inc/basic.php on line 689
Reply




Users browsing this thread: 10 Guest(s)