Forums / All Other Contributions/Addons / News Box Manager v3.0.0 [Support Thread]

News Box Manager v3.0.0 [Support Thread]

Views: 31,831

Results 41 to 60 of 164
4 Mar 2020, 7:14 PM
#41
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

News Box Manager v3.0.0 [Support Thread]

lat9:

v3.0.3 has been submitted to the Zen Cart moderators for review; I'll post back here once it's available for download.
It's now available: https://www.zen-cart.com/downloads.php?do=file&id=2264

6 Mar 2020, 12:28 PM
#42
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

Re: News Box Manager v3.0.0 [Support Thread]

Hi lat9,
I'm writing up my script for installing/reinstalling the plugin, and notice that the documentation and the actual files still do not match: one of the intended files is not included in the documentation (JScript file), and three other files do not have matching names.
I suspect the init files should have an init_, and the documentation for the template_default files should probably have the _default that the actual file has.

  1. /includes/classes/observers/auto.news_box_manager_metatags.php (Added in v2.2.0)
  2. /includes/extra_datafiles/news_box_file_database_names.php
  3. /includes/languages/english/all_articles.php
  4. /includes/languages/english/article.php
  5. /includes/languages/english/extra_definitions/news_box_manager_defines.php
  6. /includes/modules/news_box_format.php
  7. /includes/modules/pages/all_articles/header_php.php
  8. /includes/modules/pages/article/header_php.php
  9. /includes/modules/pages/more_news/header_php.php
  10. /includes/modules/pages/news_archive/header_php.php
  11. /includes/modules/sideboxes/news_box_sidebox.php
  12. /includes/modules/sideboxes/news_box_sidebox2.php
  13. /includes/templates/template_default/sideboxes/tpl_news_box_sidebox.php
  14. /includes/templates/template_default/templates/tpl_modules_news_box_format.php
  15. /includes/templates/template_default/templates/tpl_all_articles_default.php
  16. /includes/templates/template_default/templates/tpl_article.php -> Actual file: tpl_article_default.php
  17. /includes/templates/YOUR_TEMPLATE/css/stylesheet_news_box_manager.css
  18. Not described: /includes/templates/YOUR_TEMPLATE/jscript/jscript_slidebox_slider.js
  19. Optional, see above: /includes/templates/YOUR_TEMPLATE/templates/tpl_index_default.php
  20. /YOUR_ADMIN/news_box_manager.php
  21. /YOUR_ADMIN/news_box_manager1.php
  22. /YOUR_ADMIN/news_box_manager2.php
  23. /YOUR_ADMIN/news_box_manager3.php
  24. /YOUR_ADMIN/news_box_manager4.php
  25. /YOUR_ADMIN/includes/auto_loaders/config.news_box_manager.php
  26. /YOUR_ADMIN/includes/classes/observers/NewsBoxManagerAdminObserver.php
  27. /YOUR_ADMIN/includes/extra_datafiles/news_box_manager_file_database_names.php
  28. /YOUR_ADMIN/includes/extra_datafiles/news_box_manager_sanitization.php (Added in v2.1.1)
  29. /YOUR_ADMIN/includes/functions/news_box_manager_functions.php
  30. /YOUR_ADMIN/includes/init_includes/init_news_box_manager_admin.php
  31. /YOUR_ADMIN/includes/init_includes/init_news_box_manager_install.php -> Actual file: news_box_manager_install.php
  32. /YOUR_ADMIN/includes/init_includes/init_news_box_manager_update.php**-> Actual file: news_box_manager_update.php**
  33. /YOUR_ADMIN/includes/languages/english/news_box_manager.php
  34. /YOUR_ADMIN/includes/languages/english/extra_definitions/news_box_manager_menu_name.php

Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

6 Mar 2020, 2:09 PM
#43
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: News Box Manager v3.0.0 [Support Thread]

@gernot, thanks (again) for the review. I'll get that documentation and the file-set to match ... real-soon-now!

15 Mar 2020, 11:59 AM
#44
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: News Box Manager v3.0.0 [Support Thread]

lat9:

@gernot, thanks (again) for the review. I'll get that documentation and the file-set to match ... real-soon-now!
I've created a v3.0.3a version on GitHub only (since it's just documentation and a file removal): https://github.com/lat9/news_box_manager_v3/releases

28 Mar 2020, 6:12 PM
#45
owen26 avatar

owen26

New Zenner

Join Date:
Feb 2010
Posts:
12
Plugin Contributions:
0

Re: News Box Manager v3.0.0 [Support Thread]

I tried installing version 3.03 of this plugin today on Zen Cart version 1.56c with the bootstrap theme on PHP 7.1.

After the installation attempt, the site functions, but I am locked out of my Admin with the blank white page and text error:
"WARNING: An Error occurred, please refresh the page and try again..."

Here is my debug log:

[28-Mar-2020 17:43:01 UTC] Request URI: /zencartfolder/adminfolder/index.php, IP address: 
#1  trigger_error() called at [/home/sitefolder/public_html/zencartfolder/includes/classes/db/mysql/query_factory.php:171]
#2  queryFactory->show_error() called at [/home/sitefolder/public_html/zencartfolder/includes/classes/db/mysql/query_factory.php:143]
#3  queryFactory->set_error() called at [/home/sitefolder/public_html/zencartfolder/includes/classes/db/mysql/query_factory.php:270]
#4  queryFactory->Execute() called at [/home/sitefolder/public_html/zencartfolder/adminfolder/includes/init_includes/news_box_manager_update.php:30]
#5  require(/home/sitefolder/public_html/zencartfolder/adminfolder/includes/init_includes/news_box_manager_update.php) called at [/home/sitefolder/public_html/zencartfolder/adminfolder/includes/init_includes/init_news_box_manager_admin.php:62]
#6  require(/home/sitefolder/public_html/zencartfolder/adminfolder/includes/init_includes/init_news_box_manager_admin.php) called at [/home/sitefolder/public_html/zencartfolder/includes/autoload_func.php:48]
#7  require(/home/sitefolder/public_html/zencartfolder/includes/autoload_func.php) called at [/home/sitefolder/public_html/zencartfolder/adminfolder/includes/application_top.php:171]
#8  require(/home/sitefolder/public_html/zencartfolder/adminfolder/includes/application_top.php) called at [/home/sitefolder/public_html/zencartfolder/adminfolder/index.php:10]
--> PHP Fatal error: 1292:Incorrect datetime value: '0000-00-00 00:00:00' for column 'news_added_date' at row 1 :: UPDATE box_news
            SET `news_added_date` = '0001-01-01 00:00:00'
          WHERE `news_added_date` = '0000-00-00 00:00:00' ==> (as called by) /home/sitefolder/public_html/zencartfolder/adminfolder/includes/init_includes/news_box_manager_update.php on line 30 <== in /home/sitefolder/public_html/zencartfolder/includes/classes/db/mysql/query_factory.php on line 171.

Any thoughts to help fix this?

28 Mar 2020, 6:25 PM
#46
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: News Box Manager v3.0.0 [Support Thread]

While I look for a "better" solution, you can create a file in your admin (/admin/includes/extra_datafiles/mysql_mode_control.php, where /admin is replaced by your site's admin-directory name) containing:

<?php
/**
 * @package install
 * @copyright Copyright 2003-2018 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: Drbyte Sun Jan 7 22:37:45 2018 -0500 Modified in v1.5.6 $
 *
 */

/**
 * Optionally set a MySQL mode during installation
 * Ref: https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html
 */
define('DB_MYSQL_MODE', 'TRADITIONAL');
//define('DB_MYSQL_MODE', 'STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY,NO_AUTO_VALUE_ON_ZERO');

Once that file's present, refresh your admin to allow those '0000-00-00 00:00:00' dates to be corrected; then you can remove that file. Note that, like the original News Box Manager, some older plugins made use of that (now disallowed) 0-valued dates, so you might have other issues, too.

28 Mar 2020, 6:56 PM
#47
owen26 avatar

owen26

New Zenner

Join Date:
Feb 2010
Posts:
12
Plugin Contributions:
0

Re: News Box Manager v3.0.0 [Support Thread]

No, sorry. Adding that file had no effect. Still getting the same admin login error, and same PHP fatal error as before in the log file.

I'll also add that my site runs on MySQL version 5.7.29 along with PHP 7.1.
I have added no previous plugins to this site with admin edits, other than the bootstrap template.
This is my first attempt at the News Box Manager install. There were no previous versions installed.

I am familiar with editing tables in phpMyAdmin through cPanel, if that offers options.
Or, is there another way to uninstall the plugin if I don't have Zen Cart admin access?

28 Mar 2020, 7:37 PM
#48
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: News Box Manager v3.0.0 [Support Thread]

OK, try editing /admin/includes/init_includes/news_box_manager_update.php, starting at line 29 to read, changing the **highlighted **lines:

    $db->Execute(
        "UPDATE " . TABLE_BOX_NEWS . "
            SET `news_added_date` = '0001-01-01 00:00:00'
          [B]WHERE CAST(`news_added_date` AS CHAR(20)) = '0000-00-00 00:00:00'"[/B]
    );
    $db->Execute(
        "UPDATE " . TABLE_BOX_NEWS . "
            SET `news_end_date` = NULL
          [B]WHERE CAST(`news_end_date` AS CHAR(20)) = '0000-00-00 00:00:00'"[/B]
    );
28 Mar 2020, 8:08 PM
#49
owen26 avatar

owen26

New Zenner

Join Date:
Feb 2010
Posts:
12
Plugin Contributions:
0

Re: News Box Manager v3.0.0 [Support Thread]

OK. The last fix in post #57 resolved my issue. I now have admin access again. Thank you so much!

Also, I did delete the file in post #55.

This plugin seems to be what I've wanted for awhile. I can essentially use it as a blog tool on my site, it seems?

I'm looking forward to giving this a try.

29 Mar 2020, 10:57 AM
#50
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: News Box Manager v3.0.0 [Support Thread]

owen26:

OK. The last fix in post #57 resolved my issue. I now have admin access again. Thank you so much!

Also, I did delete the file in post #55.

This plugin seems to be what I've wanted for awhile. I can essentially use it as a blog tool on my site, it seems?

I'm looking forward to giving this a try.
Thanks for the update that the 'patch' corrected your issue; I'll get that rolled into the next version. FWIW, I'm using this plugin as a blog tool on my website.

29 Mar 2020, 12:18 PM
#51
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: News Box Manager v3.0.0 [Support Thread]

I've just submitted v3.0.4 of News Box Manager, v3 to the Zen Cart moderators for review; I'll post back here when it's available for download.

30 Mar 2020, 12:22 PM
#52
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: News Box Manager v3.0.0 [Support Thread]

lat9:

I've just submitted v3.0.4 of News Box Manager, v3 to the Zen Cart moderators for review; I'll post back here when it's available for download.
... and it is (https://www.zen-cart.com/downloads.php?do=file&id=2264). Thanks to @owen26 for identifying the issue and helping to validate the solution!

10 Apr 2020, 5:03 PM
#53
owen26 avatar

owen26

New Zenner

Join Date:
Feb 2010
Posts:
12
Plugin Contributions:
0

Re: News Box Manager v3.0.0 [Support Thread]

This plugin is working exactly as I want, it seems like the perfect blog tool I have been looking for.

The instructions on the GitHub page have really been useful. I really like the layout of the "All Articles" page, and particularly the Display Mode > "Listing" style as seen on lat9's own web site.

If I had a wish list for the future of this plugin, it would be:

Request #1: Add a "sort by subject" option to the All Articles page. As the list of articles added to this page grows, sorting by subject would be useful. So, let's say my store and blog is about automotive parts, I could sort the All Articles page list by Ford, Chevy, GMC, etc.

Request #2: Add an image to the All Articles list. While it is easy to add an image to the news article itself with basic HTML, an image added to the All Articles list would add some visual appeal and reference for readers. <ALT> text tags for the image would be friendly to search engines. I'm not sure if other modern tags like <picture> or <figure> offer any benefits with search engines.

Request #3: Integration of text content with Zen Cart's search engine. I know this is a whole other tangled scenario unto itself, but content is content, and it would be nice for site visitors to be able to easily search article listings, not just store products.

Thanks again so much for this plugin!

10 Apr 2020, 6:02 PM
#54
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: News Box Manager v3.0.0 [Support Thread]

owen26:

This plugin is working exactly as I want, it seems like the perfect blog tool I have been looking for.

The instructions on the GitHub page have really been useful. I really like the layout of the "All Articles" page, and particularly the Display Mode > "Listing" style as seen on lat9's own web site.

If I had a wish list for the future of this plugin, it would be:

Request #1: Add a "sort by subject" option to the All Articles page. As the list of articles added to this page grows, sorting by subject would be useful. So, let's say my store and blog is about automotive parts, I could sort the All Articles page list by Ford, Chevy, GMC, etc.

Request #2: Add an image to the All Articles list. While it is easy to add an image to the news article itself with basic HTML, an image added to the All Articles list would add some visual appeal and reference for readers. <ALT> text tags for the image would be friendly to search engines. I'm not sure if other modern tags like <picture> or <figure> offer any benefits with search engines.

Request #3: Integration of text content with Zen Cart's search engine. I know this is a whole other tangled scenario unto itself, but content is content, and it would be nice for site visitors to be able to easily search article listings, not just store products.

Thanks again so much for this plugin!
... and thank you for the kind words! I've opened change-requests on News Box Manager's GitHub repository to track your requests.

27 Jun 2020, 2:19 PM
#55
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: News Box Manager v3.0.0 [Support Thread]

Cindy, this was resolved as I'd installed a previous version. See: https://www.zen-cart.com/showthread.php?216422-News-Box-Manager-v2-0-0-Support-Thread&p=1370063#post1370063 I installed an earlier version in error and now have it working on your latest version 3 which can be downloaded from Git Hub.

Here's a few questions for you though:The module has the ability to create categories. How would I display the category name of the news post on the news article page please?

There are four custom categories already created in the module, how would I add more than four?

Is it possible for you to add auto posting to social media platforms such as facebook, twitter, linkedin etc in the future?

And lastly, ideally the module needs structured data. I think you are onto this already though.

I noted another person had asked about CEON Seo Urls with this module. It would be good to have something already available to link in with CEON SEO URL's.

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

27 Jun 2020, 3:17 PM
#56
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: News Box Manager v3.0.0 [Support Thread]

Nick1973:

Cindy, this was resolved as I'd installed a previous version. See: https://www.zen-cart.com/showthread.php?216422-News-Box-Manager-v2-0-0-Support-Thread&p=1370063#post1370063 I installed an earlier version in error and now have it working on your latest version 3 which can be downloaded from Git Hub.

Here's a few questions for you though:The module has the ability to create categories. How would I display the category name of the news post on the news article page please?

There are four custom categories already created in the module, how would I add more than four?

Is it possible for you to add auto posting to social media platforms such as facebook, twitter, linkedin etc in the future?

And lastly, ideally the module needs structured data. I think you are onto this already though.

I noted another person had asked about CEON Seo Urls with this module. It would be good to have something already available to link in with CEON SEO URL's.
Nick, for the first request, create a file named /includes/modules/pages/article/header_php_add_news_category.php containing:

<?php
// -----
// Pre-pend the news-category name to the article title.
//
$news_content_type = $news_box_query->fields['news_content_type'];
switch ($news_content_type) {
    case '1':
    case '2':
    case '3':
    case '4':
        $news_box_name_define = "BOX_NEWS_NAME_TYPE" . $news_content_type;
        $news_type_name = (defined($news_box_name_define)) ? constant($news_box_name_define) : "Unknown [$news_content_type]";
        break;
    default:
        $news_type_name = "Unknown [$news_content_type]";
        break;
}
$news_title = $news_type_name . ': ' . $news_title;
  1. Expanding the number of categories is doable, but there are a bunch of places that use a switch control (similar to the above) to process a specific news type. That said, it's not for the faint of heart.

  2. Auto-posting to various social media spots. Not likely in the near future, but I've created a GitHub issue to track (https://github.com/lat9/news_box_manager_v3/issues/19).

  3. Adding structured data. Again, not likely in the near future, but this (https://github.com/lat9/news_box_manager_v3/issues/18) GitHub issue's there to track any subsequent change.

  4. Adding integration with Ceon URI Mapping v5, also not likely in the near future. I'd suggest a request to that plugin to incorporate as I'm not particularly familiar with its operations.

29 Jun 2020, 12:21 PM
#57
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: News Box Manager v3.0.0 [Support Thread]

lat9:

Nick, for the first request, create a file named /includes/modules/pages/article/header_php_add_news_category.php containing:

<?php // ----- // Pre-pend the news-category name to the article title. // $news_content_type = $news_box_query->fields['news_content_type']; switch ($news_content_type) { case '1': case '2': case '3': case '4': $news_box_name_define = "BOX_NEWS_NAME_TYPE" . $news_content_type; $news_type_name = (defined($news_box_name_define)) ? constant($news_box_name_define) : "Unknown [$news_content_type]"; break; default: $news_type_name = "Unknown [$news_content_type]"; break; } $news_title = $news_type_name . ': ' . $news_title; ``` > > > 2. Expanding the number of categories is doable, but there are a bunch of places that use a switch control (similar to the above) to process a specific news type. That said, it's not for the faint of heart. > > 3. Auto-posting to various social media spots. Not likely in the near future, but I've created a GitHub issue to track (<https://github.com/lat9/news_box_manager_v3/issues/19>). > > 4. Adding structured data. Again, not likely in the near future, but this (<https://github.com/lat9/news_box_manager_v3/issues/18>) GitHub issue's there to track any subsequent change. > > 5. Adding integration with Ceon URI Mapping v5, also not likely in the near future. I'd suggest a request to that plugin to incorporate as I'm not particularly familiar with its operations. Hi Cindy I have just put your code on my site to display the category name (**News Type)** but it doesn't do anything. Also I have just noticed, with or without your code, the title is the same for every article when you click on the article from <https://venturedesignandprint.co.uk/index.php?main_page=all_articles> or from the homepage.

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

29 Jun 2020, 12:36 PM
#58
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,119
Plugin Contributions:
56

Re: News Box Manager v3.0.0 [Support Thread]

Nick1973:

Hi Cindy I have just put your code on my site to display the category name (News Type)
but it doesn't do anything. Also I have just noticed, with or without your code, the title is the same for every article when you click on the article from https://venturedesignandprint.co.uk/index.php?main_page=all_articles or from the homepage.
Nick, I can't explain either of these two issues. I've applied the code that I posted to my local version of my website with no issue. Ditto on the $news_title not following an article's title.

30 Jun 2020, 10:56 PM
#59
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: News Box Manager v3.0.0 [Support Thread]

lat9:

Nick, I can't explain either of these two issues. I've applied the code that I posted to my local version of my website with no issue. Ditto on the $news_title not following an article's title.

hi cindy still getting the same even on a clean install. The news title isn't following the articles title. See my site https://venturedesignandprint.co.uk

you will see test 1 and test 2. When i click on test 2 it has the title for test 1. That is from a clean module installation as well. I will try on a squeaky clean 1.5.6c install tomorrow as well. Was this designed for any particular version of php?

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk

30 Jun 2020, 11:02 PM
#60
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: News Box Manager v3.0.0 [Support Thread]

Cindy do you have the version of the module you are installing please? Just in case something is different.

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk