-
News Box Manager v3.0.0 [Support Thread]
Download: https://www.zen-cart.com/downloads.php?do=file&id=2264
v3.0.0 (and later) of News Box Manager builds on the previous versions of the plugin, adding the following features for Zen Cart 1.5.6 and later:
- Enables the creation of up to four (4) different types of 'news', each separately manageable.
- Separate admin tools for each type, enables different admin profiles to manage each news type.
- An additional tool enables the management of all news types.
- Two (2) storefront sideboxes are now provided, enabling different news types to be displayed in different locations.
- Uses the zc156 admin's bootstrap support for its admin-tool displays.
- Adds search and sort controls to the admin-level tools, making it easier to manage your news articles.
- Adds controls to the admin's article-listing, enabling you to make a copy of an article and/or to move an article to a different news-type.
- Changes the storefront news_archive and more_news pages to be all_articles and article, respectively.
- Previous pages' header-processing remains to redirect access to those pages (permanently) to their new homes!
- Watches for admin-level language-addition and -removal actions, adjusting the articles' news-content accordingly.
Additional changes:
- An article must have non-blank title and content in all the store's languages (previously only one language was required).
- On installation, any article found to have a blank title or content in any of the store's languages is disabled.
- Due to the significant changes to the various language files, the German language files have been removed from the distribution.
Early adopters can view pre-release versions of the plugin's documentation and files on its GitHub repository: https://github.com/lat9/news_box_manager_v3
-
Re: News Box Manager v3.0.0 [Support Thread]
Thank you - I'm going to try this out with the Westminster_New template :-)
-
Re: News Box Manager v3.0.0 [Support Thread]
I've just submitted v3.0.1 to the Zen Cart moderators for review and will post back here when it's available for download.
This release contains changes associated with the following GitHub issues:
#9: Correct PHP error on 'news_archive' redirect. Already included in the initial v3.0.0 download.
#10: Correct MySQL error on initial install.
-
Re: News Box Manager v3.0.0 [Support Thread]
Great, perfecto! Thanks a lot. No, it wasn't partial installation. I had only set of files connected to an old database, just updated the file and uploded those two missing ones, matter of minutes, press the button, and voila. What means "non-blank "News Title" and "News Content" in ALL of your store's languages". Do I obliged to publish news in all of my 3 languages? Hire translator? They are all busy these days reading "Transcript".:D
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
I've just submitted v3.0.1 to the Zen Cart moderators for review and will post back here when it's available for download.
This release contains changes associated with the following GitHub issues:
#9: Correct PHP error on 'news_archive' redirect. Already included in the initial Zen Cart v3.0.0 download.
#10: Correct MySQL error on initial install.
Now available for download (thanks to the Zen Cart moderators for the quick acceptance).
-
Re: News Box Manager v3.0.0 [Support Thread]
Hi Cindy - I just love this plugin - many thanks for creating it!!
just a couple of things;
1. article title doesn't show as bold (see image below) - on hover it does go blue for link - .css indicates it should be bold - how to adjust?
2. in includes/languages/english/extra_definitions/news_box_manager_defines.php ..... can I replace the BOX_HEADING_NEWS_BOX', 'Latest News' text with an image? I have created the image but not sure how to make it render - tried replacing the text with a link to the image but it wouldn't work for me, likely wrong code.
I also tried adding a row in the stylesheet_news_box_manager.css with a background image in lieu of the above - but again it didn't render
Code:
#newsscrollbox ol { margin: 0; padding: 0; list-style-position: inside; }
#moreNewsDefault .news_header { font-weight: bold; padding-right: 0.3em; }
#moreNewsDefault .newsContent { padding: 0.3em 0; }
#news-table { display: table; border-collapse: collapse; width: 100%; margin: 0.8em 0; }
.image-row { display: table-row; border: 1px solid #00BFFF; background-image: url(/images/latestnews.png); background-repeat: no-repeat; width: 100%; height: 75px; }
.news-row { display: table-row; border: 1px solid #00BFFF; }
.news-heading { font-weight: bold; }
.news-cell { display: table-cell; padding: 0.5em; border: 1px solid #00BFFF; }
If you can assist that would be great - if I should be posting this in another thread for assistance then please say so :smile:
cheers, Mike
Attachment 18760
-
Re: News Box Manager v3.0.0 [Support Thread]
Mike, a link to the site (via PM if you desire) would help me help you for these styling/page-layout type questions.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
Mike, a link to the site (via PM if you desire) would help me help you for these styling/page-layout type questions.
Hi Cindy, thanks for your quick reply - here is the site https://www.dazzlerscliponearrings.com.au - ideally adding a blank full length table row above the existing top row, so an integral part of the table, into which the existing heading of 'Latest News' would be placed instead of consuming (more) space on the page and such that an image can be inserted in lieu of the text .... so it makes a single element when loaded on the page, in lieu of 2 lines of text (and resultant 2 rows of white space) plus table. The to view all articles click view all text could be incorporated in the same row block as the article title (this part I have been able to do).
Maybe to make that result less 'blocky' possibly have top and side borders of the 'new' top row have their own css lines so that the borders could be #FFFFFF
cheers, Mike
-
Re: News Box Manager v3.0.0 [Support Thread]
Mike, for the article title showing in bold, try updating the css to include
Code:
.news-cell > a:first-child { font-weight: bold; }
The title is the very first anchor directly present in a news-cell class element.
I'm still looking at the other styling question.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
Mike, for the article title showing in bold, try updating the css to include
Code:
.news-cell > a:first-child { font-weight: bold; }
The title is the very first anchor directly present in a news-cell class element.
I'm still looking at the other styling question.
Many thanks Cindy - worked a treat.
cheers, Mike
-
Re: News Box Manager v3.0.0 [Support Thread]
In which directory is that latestnews.png file (noting that it should be present in the template's /images sub-directory for use by the CSS)?
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
In which directory is that latestnews.png file (noting that it should be present in the template's /images sub-directory for use by the CSS)?
Hi Cindy - it is in /images folder - so I move it to my_template/images folder ........ then in includes/languages/english/extra_definitions/news_box_manager_defines.php I replaced the text 'Latest News' with <img src="includes/templates/westminster_new/images/latestnews.png" alt="latest news"> .... and all is good! So thank you.
I am now going to try to insert a smaller image in the NEWS_BOX_HEADING_TITLE row .... wish me luck :smile:
many thanks,
Mike
cheers,
Mike
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
shags38
Hi Cindy - it is in /images folder - so I move it to my_template/images folder ........ then in includes/languages/english/extra_definitions/news_box_manager_defines.php I replaced the text 'Latest News' with <img src="includes/templates/westminster_new/images/latestnews.png" alt="latest news"> .... and all is good! So thank you.
I am now going to try to insert a smaller image in the NEWS_BOX_HEADING_TITLE row .... wish me luck :smile:
many thanks,
Mike
cheers,
Mike
Hi Cindy - inserting an image in that row was easy enough (once I had the image in the right folder :smile:)
So I do not expect you to spend time on re-styling the layout of your plugin for me - putting me in the right direction will be helpful so that I can attempt to make some modifications myself (note that I said 'attempt') - it will help me to learn. So to that end if I want to negate the 'article dates' column altogether and instead include a date block within the article title row/line what files should I be looking at to make such modifications? essentially where can I modify the table layout?
again many thanks for your assistance,
cheers Mike
-
Re: News Box Manager v3.0.0 [Support Thread]
Mike, the common formatting is provided by /includes/templates/template_default/template/tpl_modules_news_box_format.php, so you can make a template-override copy and make your changes there.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
Mike, the common formatting is provided by /includes/templates/template_default/template/tpl_modules_news_box_format.php, so you can make a template-override copy and make your changes there.
Many thanks for that Cindy - haven't played with it yet but will soon.
One more quick one - side box heading for news box shows [MORE] and when using Inspect Element [MORE] is the link anchor text in <h3 class="leftBoxHeading" id="newsboxsideboxHeading"><a href="https://www.dazzlerscliponearrings.com.au/index.php?main_page=news_archive"> [more]</a></h3> .... I have tried admin/tools/developer and gone through all files associated with the plugin and I cannot find where to change that anchor text (looks a bit strange as a heading in the sidebox).
A belated Merry Christmas to you and yours and Happy New Year also- hope 2020 is a good one for you.
cheers,
Mike
-
Re: News Box Manager v3.0.0 [Support Thread]
Those definitions are present in /includes/languages/english/extra_definitions/news_box_manager_defines.php.
Thanks for your kind wishes, but it wasn't my holiday. Have a safe and happy new year.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
Those definitions are present in /includes/languages/english/extra_definitions/news_box_manager_defines.php.
Thanks for your kind wishes, but it wasn't my holiday. Have a safe and happy new year.
Thanks Cindy - I was remiss in not providing more detail in my previous post - any entries in BOX_HEADING_NEWS_BOX or TEXT_ALL_NEWS or TEXT_NEWS_BOX_INFO render as headings on the home page as well as altering the sidebox heading - I don't want any headings on the page however I would like to have the heading in the sidebox be something different to [MORE]. I even changed TEXT_LINK_MORE from 'More …' to 'Latest News' but that hasn't changed anything. (hence why I was trying to specifically find this in developer <h3 class="leftBoxHeading" id="newsboxsideboxHeading"><a href="https://www.dazzlerscliponearrings.com.au/index.php?main_page=news_archive"> [more]</a></h3>)
I appreciate your help with this - there is no rush on this 'minor' aesthetic adjustment - when, and only when, you get a free moment :smile:
Below is my current /includes/languages/english/extra_definitions/news_box_manager_defines.php and images showing news box on home page and then the sidebox;
Code:
define ('BOX_HEADING_NEWS_BOX', '');
define ('TEXT_LINK_MORE', 'Latest News');
define ('TEXT_TRAIL_STR', '…');
define ('TEXT_ALL_NEWS', '');
define ('NEWS_DATE_SEPARATOR', ' - ');
define ('NEWS_BOX_HEADING_TITLE', '<img src="includes/templates/westminster_new/images/latestupdates.png"> ... for more news click <a href="https://www.dazzlerscliponearrings.com.au/index.php?main_page=news_archive"><i><u>View All</i></u></a>');
define ('NEWS_BOX_HEADING_DATES', 'Article Date(s)');
define ('TEXT_NEWS_BOX_INFO', '');
Attachment 18777
Attachment 18776
cheers,
Mike
p.s. my apologies for my assumption re the holiday - no offence intended
-
Re: News Box Manager v3.0.0 [Support Thread]
Mike, I'll need to rethink the sidebox vs. customized centerbox configuration that you're looking for.
-
Re: News Box Manager v3.0.0 [Support Thread]
I've just submitted v3.0.2 of News Box Manager - v3 to the Zen Cart moderators for review and will post back here when it's available for download.
This release contains changes associated with the following GitHub issue:
#11: Correct PHP warning on all_articles page.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
I've just submitted v3.0.2 of News Box Manager - v3 to the Zen Cart moderators for review and will post back here when it's available for download.
This release contains changes associated with the following GitHub issue:
#11: Correct PHP warning on all_articles page.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2264
-
Re: News Box Manager v3.0.0 [Support Thread]
Hello,
I've tried to install this add-on, v3.0.2, for the first time on my test site, hopefully according to the instructions (I did not have a tpl_index_default.php file yet, so all the files in the add-on could be copied as-is, I merely ensured they had correct ownership and permissions on my linux system).
The problem is that the DB initialization did not seem to work, so although the Admin menus for the add-on all appear fine, and I have the ability to create articles, which I did: a single Type 1 article in both English and Japanese (my two site languages). Unfortunately, when I activate the sidebox for New Type 1 in order to actually display on storefront, I get a "An error appeared, please refresh page" type of error in the location where the sidebox should appear.
Interestingly, no debug log is produced. However, when I set strict debugging, the on-page warning turns into the very clear indication that the DB tables were not created as expected:
Code:
1146 Table 'zencartshoptest.TABLE_BOX_NEWS_CONTENT' doesn't exist
in:
[SELECT nc.news_title, nc.news_content, n.* FROM TABLE_BOX_NEWS_CONTENT nc INNER JOIN TABLE_BOX_NEWS n ON n.box_news_id = nc.box_news_id AND nc.languages_id = 3 WHERE n.news_status = 1 AND now() >= n.news_start_date AND (n.news_end_date IS NULL OR now() <= n.news_end_date) ORDER BY n.news_start_date DESC, n.box_news_id DESC LIMIT 5]
Obviously, something went wrong, but I am unsure what best to do to fix the situation.
I also noticed that there was a file in the add-on not listed in the HTML instructions:
Code:
YOUR_ADMIN/includes/classes/observers/NewsBoxManagerAdminObserver.php
and that there was no observer in my ADMIN/classes directory yet, so that meant the new addition of a directory in my ADMIN folder.
Any other information required, please ask. I will wait before uninstalling and trying to re-install.
-
Re: News Box Manager v3.0.0 [Support Thread]
Hi lat9,
I did a comparison of the files described in the docs folder of the add-on for News Box Manager v3.0.2, and what files are actually included.
I think the main problem might be an incorrectly-named definition file? Not sure about the mismatch of the various files, so will wait for confirmation.
As listed in docs
(I marked as OK if the described files were actually there)
OK: /includes/classes/observers/auto.news_box_manager_metatags.php
Does not exist---wrong Name?: /includes/extra_datafiles/news_box_manager_file_database_names.php
OK: /includes/languages/english/all_articles.php
OK: /includes/languages/english/article.php
OK: /includes/languages/english/extra_definitions/news_box_manager_defines.php
OK: /includes/modules/news_box_format.php
OK: /includes/modules/pages/all_articles/header_php.php
OK: /includes/modules/pages/article/header_php.php
OK: /includes/modules/pages/more_news/header_php.php
OK: /includes/modules/pages/news_archive/header_php.php
OK: /includes/modules/sideboxes/news_box_sidebox.php
OK: /includes/templates/template_default/sideboxes/tpl_news_box_sidebox.php
Does not exist: /includes/templates/template_default/sideboxes/tpl_news_box_sidebox2.php
OK: /includes/templates/template_default/templates/tpl_modules_news_box_format.php
OK: /includes/templates/template_default/templates/tpl_all_articles_default.php
OK: /includes/templates/template_default/templates/tpl_article.php
OK: /includes/templates/YOUR_TEMPLATE/css/stylesheet_news_box_manager.css
OK: /includes/templates/YOUR_TEMPLATE/templates/tpl_index_default.php
OK: /YOUR_ADMIN/news_box_manager.php
OK: /YOUR_ADMIN/includes/auto_loaders/config.news_box_manager.php
OK: /YOUR_ADMIN/includes/extra_datafiles/news_box_manager_file_database_names.php
OK: /YOUR_ADMIN/includes/extra_datafiles/news_box_manager_sanitization.php
OK: /YOUR_ADMIN/includes/init_includes/init_news_box_manager_admin.php
OK: /YOUR_ADMIN/includes/languages/english/news_box_manager.php
OK: /YOUR_ADMIN/includes/languages/english/extra_definitions/news_box_manager_menu_name.php
Files existing but not described in docs:
/YOUR_ADMIN/news_box_manager1.php
/YOUR_ADMIN/news_box_manager2.php
/YOUR_ADMIN/news_box_manager3.php
/YOUR_ADMIN/news_box_manager4.php
/YOUR_ADMIN/includes/classes/observers/NewsBoxManagerAdminObserver.php
/YOUR_ADMIN/includes/functions/news_box_manager_functions.php
/YOUR_ADMIN/includes/init_includes/init_news_box_manager_install.pph
/YOUR_ADMIN/includes/init_includes/init_news_box_manager_update.php
Possibly wrong name?: /includes/extra_datafiles/news_box_file_database_names.php
/includes/modules/sideboxes/news_box_sidebox2.php
/includes/templates/YOUR_TEMPLATE/jscript/jscript_sidebox_slider.js
-
Re: News Box Manager v3.0.0 [Support Thread]
@gernot, thanks for pointing out the issues with the documentation. I'll be getting that updated.
Since there are no core-file overwrites in the plugin, you can safely copy all the files from the plugin's distribution to apply those updates.
That TABLE_BOX_NEWS_CONTENT value is defined in the admin's /extra_datafiles module.
-
Re: News Box Manager v3.0.0 [Support Thread]
Hi lat9,
Can you confirm whether the extra_datafiles file has a name issue? As I wrote, I did copy all the files that were in the plugin, but the DB was not properly initialized, and I wonder if that might be caused by the file name not having the word "manager" in its name?
-
Re: News Box Manager v3.0.0 [Support Thread]
Hi,
Thank you for the mod, I updated from v2 to v3:smile:
I got error log as below.
PHP Warning: constant(): Couldn't find constant BOX_NEWS_NAME_TYPE in /home/****/www/***admin***/news_box_manager.php on line 719.
news_box_manager.php line719
Code:
<div class="col-sm-2"><?php echo constant("BOX_NEWS_NAME_TYPE$news_content_type"); ?></div>
It will be used in a preview page, if I update or add a news from [All Types], it's OK.
But if I do from [Type1] or [Type2] ,[Type*] menu, it shows nothing in the "News Type:" column.
-
Re: News Box Manager v3.0.0 [Support Thread]
Those BOX_NEWS_NAME_TYPE[1-4] constants are provided in the distribution's storefront /includes/languages/english/extra_definitions/news_box_manager_defines.php. That file (or your template's version thereof) is used in both the admin and storefront processing.
Check to see if you have an older version of that file present in /includes/languages/english/extra_definitions/YOUR_TEMPLATE that doesn't have those additional defines.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
gernot
Hi lat9,
Can you confirm whether the extra_datafiles file has a name issue? As I wrote, I did copy all the files that were in the plugin, but the DB was not properly initialized, and I wonder if that might be caused by the file name not having the word "manager" in its name?
It has nothing to do with the filenames, just their locations. Were there any logs generated?
-
2 Attachment(s)
Re: News Box Manager v3.0.0 [Support Thread]
Thank you for your reply.
My explanation was not enough.
I have removed all v2 files when I update for my test website.
I haven't changed the definition in the "news_box_manager_defines.php" yet, but I think it works because I can see the word Type1 not BOX_NEWS_NAME_TYPE1.
If I insert a news from Tools -> News Box Manager[All Types] -> Insert -> Preview, "News Type:" shows its type.
Attachment 18884
And if I insert a news from Tools -> News Box Manager[Type1(or 2,3,4)] -> Insert -> Preview, "News Type:" shows nothing and I get error log.
Attachment 18885
PHP Warning: constant(): Couldn't find constant BOX_NEWS_NAME_TYPE in /home/****/www/***admin***/news_box_manager.php on line 719.
I'm right in the middle of learning PHP, so if you have any suggestions please let me know.
Thank you,
-
Re: News Box Manager v3.0.0 [Support Thread]
Hi lat9,
No, no logs were generated, which I thought was a bit strange, but strict error checking enabled shows up the error on the screen, as I pasted in my initial post.
I have the file in the admin extra datafiles places as instructed:
Code:
test-admin# cat includes/extra_datafiles/news_box_manager_file_database_names.php
<?php
// -----
// Part of the News Box Manager plugin, re-structured for Zen Cart v1.5.6 and later by lat9.
// Copyright (C) 2015-2019, Vinos de Frutas Tropicales
//
// +----------------------------------------------------------------------+
// | Do Not Remove: Coded for Zen-Cart by geeks4u.com |
// | Dedicated to Memory of Amelita "Emmy" Abordo Gelarderes |
// +----------------------------------------------------------------------+
//
define('TABLE_BOX_NEWS', DB_PREFIX . 'box_news');
define('TABLE_BOX_NEWS_CONTENT', DB_PREFIX . 'box_news_content');
define('FILENAME_NEWS_BOX_MANAGER', 'news_box_manager');
define('FILENAME_NEWS_BOX_MANAGER1', 'news_box_manager1');
define('FILENAME_NEWS_BOX_MANAGER2', 'news_box_manager2');
define('FILENAME_NEWS_BOX_MANAGER3', 'news_box_manager3');
define('FILENAME_NEWS_BOX_MANAGER4', 'news_box_manager4');
Both the box_news and box_news_content tables do exist apparently:
Code:
MariaDB [zencartshoptest]> desc box_news;
+--------------------+------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+------------+------+-----+---------------------+----------------+
| box_news_id | int(11) | NO | PRI | NULL | auto_increment |
| news_added_date | datetime | YES | | 0001-01-01 00:00:00 | |
| news_modified_date | datetime | YES | | NULL | |
| news_start_date | datetime | YES | | NULL | |
| news_end_date | datetime | YES | | NULL | |
| news_status | tinyint(1) | YES | | 0 | |
| news_content_type | tinyint(1) | NO | | 1 | |
+--------------------+------------+------+-----+---------------------+----------------+
7 rows in set (0.014 sec)
MariaDB [zencartshoptest]> desc box_news_content;
+---------------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------------------+--------------+------+-----+---------+-------+
| box_news_id | int(11) | NO | PRI | 0 | |
| languages_id | int(11) | NO | PRI | 1 | |
| news_title | varchar(255) | NO | | | |
| news_content | text | NO | | NULL | |
| news_metatags_title | varchar(255) | NO | | | |
| news_metatags_keywords | text | YES | | NULL | |
| news_metatags_description | text | YES | | NULL | |
+---------------------------+--------------+------+-----+---------+-------+
7 rows in set (0.001 sec)
-
Re: News Box Manager v3.0.0 [Support Thread]
lat9,
It's official: I am retarded. After you asked about logs again, I did look again, and just for, you know, dumb*ss checking, I looked at my production shop logs, and there I see error logs related to my test shop!
So of course I realize I screwed up something... turns out in the storefront includes/configure.php I had the DIR_FS_CATALOG set to my production shop.
All other defines were fine in the storefront configure, just that one was wrong. Ouch! The admin configure file was completely fine.
That explains why the admin side worked but the display did not.
So sorry for the hassle.
Remaining questions:
Are there missing files in the plugin, for sideboxes? Or is it merely the documentation that needs updating?
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
gernot
lat9,
It's official: I am retarded. After you asked about logs again, I did look again, and just for, you know, dumb*ss checking, I looked at my production shop logs, and there I see error logs related to my test shop!
So of course I realize I screwed up something... turns out in the storefront includes/configure.php I had the DIR_FS_CATALOG set to my production shop.
All other defines were fine in the storefront configure, just that one was wrong. Ouch! The admin configure file was completely fine.
That explains why the admin side worked but the display did not.
So sorry for the hassle.
Remaining questions:
Are there missing files in the plugin, for sideboxes? Or is it merely the documentation that needs updating?
It's the documentation that's incorrect; I've updated the version provided on my website. Thanks again for pointing out those omissions and "misspellings"!
-
Re: News Box Manager v3.0.0 [Support Thread]
Thanks lat9,
Glad some good came out of all my confusion! Happily adding the plugin to my production cart tonight.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
K1979
Thank you for your reply.
My explanation was not enough.
I have removed all v2 files when I update for my test website.
I haven't changed the definition in the "news_box_manager_defines.php" yet, but I think it works because I can see the word Type1 not BOX_NEWS_NAME_TYPE1.
If I insert a news from
Tools -> News Box Manager[All Types] -> Insert -> Preview, "News Type:" shows its type.
Attachment 18884
And if I insert a news from
Tools -> News Box Manager[Type1(or 2,3,4)] -> Insert -> Preview, "News Type:" shows nothing and I get error log.
Attachment 18885
PHP Warning: constant(): Couldn't find constant BOX_NEWS_NAME_TYPE in /home/****/www/***admin***/news_box_manager.php on line 719.
I'm right in the middle of learning PHP, so if you have any suggestions please let me know.
Thank you,
I will correct the post, when I insert a news, it's OK.
But If I modify a news from "News Box Manager[Type1(or 2,3,4)]", I got the error.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
K1979
I will correct the post, when I insert a news, it's OK.
But If I modify a news from "News Box Manager[Type1(or 2,3,4)]", I got the error.
Ah, thanks for that! I've replicated on my local test site and should have a correction real-soon-now.
-
Re: News Box Manager v3.0.0 [Support Thread]
@K1979, you can correct that issue by editing your /YOUR_ADMIN/news_box_manager.php, locating this code section (starting at line 537):
Code:
// -----
// Editing an existing article or inserting a new one ... noting that we can also come back here
// from an article's insert/update "Preview" to make changes prior to saving in the database.
//
if ($action == 'modify' || $action == 'updateedit' || $action == 'new' || $action == 'newedit') {
if ($action == 'modify' || $action == 'updateedit') {
$form_action = 'updatepreview' . "&nID=$nID";
$hidden_field = zen_draw_hidden_field('nID', $nID);
$cancel_link = zen_href_link($news_box_script_name, $page_get_params . "nID=$nID");
} else {
and adding the highlighted line:
Code:
// -----
// Editing an existing article or inserting a new one ... noting that we can also come back here
// from an article's insert/update "Preview" to make changes prior to saving in the database.
//
if ($action == 'modify' || $action == 'updateedit' || $action == 'new' || $action == 'newedit') {
if ($action == 'modify' || $action == 'updateedit') {
$form_action = 'updatepreview' . "&nID=$nID";
$hidden_field = zen_draw_hidden_field('nID', $nID);
$hidden_field .= ($all_news_types) ? '' : zen_draw_hidden_field('news_content_type', $news_box_type);
$cancel_link = zen_href_link($news_box_script_name, $page_get_params . "nID=$nID");
} else {
I'll be getting v3.0.3 of News Box Manager released, containing this change as well as the documentation updates identified by @gernot.
-
Re: News Box Manager v3.0.0 [Support Thread]
v3.0.3 has been submitted to the Zen Cart moderators for review; I'll post back here once it's available for download.
-
Re: News Box Manager v3.0.0 [Support Thread]
Thank you for your very quick reply and work!
It does work well:smile:
-
Re: News Box Manager v3.0.0 [Support Thread]
Hello again,
I test some cases.
Case1
Sidebox #1: Category to Show -> 1
Sidebox #2: Category to Show -> 2
Home Page: Display Mode -> Categories
The home-page news(index page) shows category 2 only.
Case2
Sidebox #1: Category to Show -> All
Sidebox #2: Category to Show -> 2
Home Page: Display Mode -> Categories
The home-page news(index page) shows category 2 only.
Case3(changed sidebox order by "Tools->Layout Boxes Controller")
Sidebox #2: Category to Show -> 2
Sidebox #1: Category to Show -> All
Home Page: Display Mode -> Categories
The home-page news(index page) shows all categories.
I will reconfirm by vanilla files later.
I have already customized some codes, so that might cause this.
-
Re: News Box Manager v3.0.0 [Support Thread]
More informational as we had a cpanel crash during the upgrade of NBM to 3.0.2. Not sure what version was loaded.
Got the can't connect error and no connect to admin.
Log had
Code:
PHP Fatal error: 1054:Unknown column 'news_content_type' in 'where clause' :: UPDATE box_news SET news_content_type = 1
WHERE news_content_type = 0 ==> (as called by) /home/roiweji/public_html/kSJbdgf/includes/init_includes/news_box_manager_update.php on line 258 <== in /home/russradi/public_html/includes/classes/db/mysql/query_factory.php on line 171.
not real user or admin.
Added news_contnent_type to news_box as tinyint 1 and all works.
Sorry for brevity. Late for appointment
-
Re: News Box Manager v3.0.0 [Support Thread]
More info:
Was an upgrade from 2.0
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
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
-
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.
- /includes/classes/observers/auto.news_box_manager_metatags.php (Added in v2.2.0)
- /includes/extra_datafiles/news_box_file_database_names.php
- /includes/languages/english/all_articles.php
- /includes/languages/english/article.php
- /includes/languages/english/extra_definitions/news_box_manager_defines.php
- /includes/modules/news_box_format.php
- /includes/modules/pages/all_articles/header_php.php
- /includes/modules/pages/article/header_php.php
- /includes/modules/pages/more_news/header_php.php
- /includes/modules/pages/news_archive/header_php.php
- /includes/modules/sideboxes/news_box_sidebox.php
- /includes/modules/sideboxes/news_box_sidebox2.php
- /includes/templates/template_default/sideboxes/tpl_news_box_sidebox.php
- /includes/templates/template_default/templates/tpl_modules_news_box_format.php
- /includes/templates/template_default/templates/tpl_all_articles_default.php
- /includes/templates/template_default/templates/tpl_article.php -> Actual file: tpl_article_default.php
- /includes/templates/YOUR_TEMPLATE/css/stylesheet_news_box_manager.css
- Not described: /includes/templates/YOUR_TEMPLATE/jscript/jscript_slidebox_slider.js
- Optional, see above: /includes/templates/YOUR_TEMPLATE/templates/tpl_index_default.php
- /YOUR_ADMIN/news_box_manager.php
- /YOUR_ADMIN/news_box_manager1.php
- /YOUR_ADMIN/news_box_manager2.php
- /YOUR_ADMIN/news_box_manager3.php
- /YOUR_ADMIN/news_box_manager4.php
- /YOUR_ADMIN/includes/auto_loaders/config.news_box_manager.php
- /YOUR_ADMIN/includes/classes/observers/NewsBoxManagerAdminObserver.php
- /YOUR_ADMIN/includes/extra_datafiles/news_box_manager_file_database_names.php
- /YOUR_ADMIN/includes/extra_datafiles/news_box_manager_sanitization.php (Added in v2.1.1)
- /YOUR_ADMIN/includes/functions/news_box_manager_functions.php
- /YOUR_ADMIN/includes/init_includes/init_news_box_manager_admin.php
- /YOUR_ADMIN/includes/init_includes/init_news_box_manager_install.php -> Actual file: news_box_manager_install.php
- /YOUR_ADMIN/includes/init_includes/init_news_box_manager_update.php-> Actual file: news_box_manager_update.php
- /YOUR_ADMIN/includes/languages/english/news_box_manager.php
- /YOUR_ADMIN/includes/languages/english/extra_definitions/news_box_manager_menu_name.php
-
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!
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
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
-
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:
Code:
[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?
-
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:
Code:
<?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.
-
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?
-
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:
Code:
$db->Execute(
"UPDATE " . TABLE_BOX_NEWS . "
SET `news_added_date` = '0001-01-01 00:00:00'
WHERE CAST(`news_added_date` AS CHAR(20)) = '0000-00-00 00:00:00'"
);
$db->Execute(
"UPDATE " . TABLE_BOX_NEWS . "
SET `news_end_date` = NULL
WHERE CAST(`news_end_date` AS CHAR(20)) = '0000-00-00 00:00:00'"
);
-
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.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
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.
-
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.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
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!
-
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!
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
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.
-
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....63#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.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
Nick1973
Cindy, this was resolved as I'd installed a previous version. See:
https://www.zen-cart.com/showthread....63#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 Code:
<?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.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
Nick, for the first request, create a file named /includes/modules/pages/article/header_php_add_news_category.php containing:
PHP Code:
<?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/...e=all_articles or from the homepage.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
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/...e=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.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
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?
-
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.
-
2 Attachment(s)
Re: News Box Manager v3.0.0 [Support Thread]
Attachment 19066Attachment 19067
Quote:
Originally Posted by
Nick1973
Cindy do you have the version of the module you are installing please? Just in case something is different.
Hi Cindy, I have done a clean install of 1.5.6c locally on my Macbook Pro and I am still getting the same issue after installing newsbox manager.
The news title isn't following the articles title. See attached using responsive classic.
You can see Test 1 has the correct title. And Test 2 has the title for Test 1.
-
2 Attachment(s)
Re: News Box Manager v3.0.0 [Support Thread]
Attachment 19068Attachment 19069
Quote:
Originally Posted by
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.
I've also installed it on 1.5.7 and get the same issue.
The news title isn't following the articles title. See attached using responsive classic.
You can see 1.5.7 Test 1 has the correct title. And 1.5.7 Test 2 has the title for 1.5.7 Test 1.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
Nick1973
Attachment 19068Attachment 19069
I've also installed it on 1.5.7 and get the same issue.
The news title isn't following the articles title. See attached using responsive classic.
You can see 1.5.7 Test 1 has the correct title. And 1.5.7 Test 2 has the title for 1.5.7 Test 1.
That screenshot helped a bunch, Nick.
The issue is that the same variable names are being used for both the sidebox and page-content rendering, so the selected article's name was being overwritten by that left-side sidebox. I've opened this (https://github.com/lat9/news_box_manager_v3/issues/23) issue on the plugin's GitHub repository to track to change required.
Note that the change is to /includes/templates/template_default/sideboxes/tpl_news_box_sidebox.php, so if you've made a template-override version you'll need to merge your changes with the subsequent update.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
That screenshot helped a
bunch, Nick.
The issue is that the same variable names are being used for both the sidebox and page-content rendering, so the selected article's name was being overwritten by that left-side sidebox. I've opened this (
https://github.com/lat9/news_box_manager_v3/issues/23) issue on the plugin's GitHub repository to track to change required.
Note that the change is to /includes/templates/template_default/sideboxes/tpl_news_box_sidebox.php, so if you've made a template-override version you'll need to merge your changes with the subsequent update.
Cool. All seems to be working correctly now. Thank you very much Cindy :-)
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
Nick1973
Cool. All seems to be working correctly now. Thank you very much Cindy :-)
Thanks for the confirmation, Nick. That correction will be part of the forthcoming v3.0.5 of News Box Manager v3.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
Thanks for the confirmation, Nick. That correction will be part of the forthcoming v3.0.5 of News Box Manager v3.
Cool. In the meantime I can start blogging with Zen Cart now instead of having to use a separate blogging platform. I can see this module in particular having massive potential for store owners that blog to drive traffic through to their stores.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
Nick1973
Cool. In the meantime I can start blogging with Zen Cart now instead of having to use a separate blogging platform. I can see this module in particular having massive potential for store owners that blog to drive traffic through to their stores.
Yep, a combination of this and the Zen Product Tags (https://www.zen-cart.com/showthread....upport-Thread) plugin can make a Zen Cart independent of a separate blogging platform.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
Even cooler :D
I'm just adding this to my site now. This also creates huge benefits for SEO as search engines can then follow each tag, which can of course be a researched keyword or search term.
-
Re: News Box Manager v3.0.0 [Support Thread]
I've just submitted v3.0.5 of News Box Manager (v3) for the Zen Cart moderators' review; I'll post back here when it's available for download.
This release contains changes associated with the following GitHub issues:
#20: zc157, missing admin's $template_dir.
#21: Correct admin duplicate-constant notice.
#22: zc157, admin-tool 'action' icons don't display correctly.
#23: Individual-article title overwritten if left-sidebox is enabled.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
I've just submitted v3.0.5 of News Box Manager (v3) for the Zen Cart moderators' review; I'll post back here when it's available for download.
This release contains changes associated with the following GitHub issues:
#20: zc157, missing admin's $template_dir.
#21: Correct admin duplicate-constant notice.
#22: zc157, admin-tool 'action' icons don't display correctly.
#23: Individual-article title overwritten if left-sidebox is enabled.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2264
-
Re: News Box Manager v3.0.0 [Support Thread]
Hi Cindy,
I've upgraded from 1.5.5f to 1.5.7b and need to install your version 3.0.5 - my new database contains the tables box_news and box_news_content, with data, from your version 2.3.6, transferred from the 1.5.5.f data base. So that I can keep those articles what would be the best approach for the new install??
I'd really appreciate your assistance.
cheers,
Mike
-
Re: News Box Manager v3.0.0 [Support Thread]
News Box Manager went from 2.2.1 to 3.0.0 with no in between. Make sure you are talking the correct mod. If you still are sure it's NBM and are concerned about the installation of the DB, check the readme.html in the Docs folder under installation.
It will tell you how to wipe out the old database. Removing other files would involve determining the exact version, downloading it, and using it as a guideline in old file removal.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
dbltoe
News Box Manager went from 2.2.1 to 3.0.0 with no in between. Make sure you are talking the correct mod. If you still are sure it's NBM and are concerned about the installation of the DB, check the readme.html in the Docs folder under installation.
It will tell you how to wipe out the old database. Removing other files would involve determining the exact version, downloading it, and using it as a guideline in old file removal.
G'day dbltoe, yep should have been 2.2.1 to 3.0.5, my error. There is no information in the readme that I can find that covers what I am specifically looking for. v2.2.1 is not installed on the site so it is just the database tables that I'd like to preserve, or more accurately the data in those tables.
My take on it would be to install the plugin and after install delete the two tables, then upload the saved copy of those tables - the saved copy is of the same zc version, i.e. they came from the v1.5.5f site but existed in 1.5.7b version before database upgrade was performed hence exist already in the upgraded 1.5.7b database. The database table names are the same as v2.2.1 according to admin/includes/extra_data_files/news_box_manager_file_database_names.php from version 3.0.5
If there are any issues I then do another full reinstall so it is a virgin install, with no data in the tables, and ready to use. Then look to try something else - like putting the old v1.5.5f site in a folder of the 1.5.7b site and then open that old site live and simply copy the typed text of pages giving me a copy of the articles I can then copy and paste into the new site version.
I was hoping there may have been an easier way (e.g. not upload certain files in the install for example, hence not overriding the existing tables) but it is what it is.
cheers,
Mike
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
shags38
G'day dbltoe, yep should have been 2.2.1 to 3.0.5, my error. There is no information in the readme that I can find that covers what I am specifically looking for. v2.2.1 is not installed on the site so it is just the database tables that I'd like to preserve, or more accurately the data in those tables.
My take on it would be to install the plugin and after install delete the two tables, then upload the saved copy of those tables - the saved copy is of the same zc version, i.e. they came from the v1.5.5f site but existed in 1.5.7b version before database upgrade was performed hence exist already in the upgraded 1.5.7b database. The database table names are the same as v2.2.1 according to admin/includes/extra_data_files/news_box_manager_file_database_names.php from version 3.0.5
If there are any issues I then do another full reinstall so it is a virgin install, with no data in the tables, and ready to use. Then look to try something else - like putting the old v1.5.5f site in a folder of the 1.5.7b site and then open that old site live and simply copy the typed text of pages giving me a copy of the articles I can then copy and paste into the new site version.
I was hoping there may have been an easier way (e.g. not upload certain files in the install for example, hence not overriding the existing tables) but it is what it is.
cheers,
Mike
Mike, as you noted, there's been no database "schema" changes (i.e. no database layout changes) going from News Box Manager v2 to v3.
I'll suggest simply exporting the box_news and box_news_content tables via your site's phpMyAdmin from the v155f site's database and then importing into your v157b database.
-
Re: News Box Manager v3.0.0 [Support Thread]
I've just submitted v3.1.0 of News Box Manager (v3) for the Zen Cart moderators' review; I'll post back here when it's available for download.
This version enables integration with SiteMapXML, so that your site's sitemap can also 'point to' your site's news articles.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
Mike, as you noted, there's been no database "schema" changes (i.e. no database layout changes) going from News Box Manager v2 to v3.
I'll suggest simply exporting the box_news and box_news_content tables via your site's phpMyAdmin from the v155f site's database and then importing into your v157b database.
Thanks for getting back to me Cindy - so I did the install of 3.0.5 and it actually 'upgraded' v2 and maintained the data - all my articles are intact. Absolutely MARVELLOUS ... so I had nothing to worry about afterall :cool: (albeit better to be sure than sorry).
thanks again,
Mike
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
I've just submitted v3.1.0 of News Box Manager (v3) for the Zen Cart moderators' review; I'll post back here when it's available for download.
This version enables integration with SiteMapXML, so that your site's sitemap can also 'point to' your site's news articles.
I look froward to that SiteMapXML integration Cindy :smile: - no doubt will help keep the articles in front of Google.
cheers,
Mike
-
Re: News Box Manager v3.0.0 [Support Thread]
Hi Cindy,
in admin/tools/layout boxes controller when I activate the news_box_sidebox.php it shows as it should but the content also shows on mobile directly under the logo as two boxes with article title, before anything else on the site. So I cannot see how to obviate that. Side box layout configure is as it should be, left/right>on, single column>off and zero. news_box_sidebox2.php does the same thing - something appears to be telling it to show in the header in mobile?
I cannot see anything in configuration that selects that on/off.
cheers,
Mike
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
shags38
Hi Cindy,
in admin/tools/layout boxes controller when I activate the news_box_sidebox.php it shows as it should but the content also shows on mobile directly under the logo as two boxes with article title, before anything else on the site. So I cannot see how to obviate that. Side box layout configure is as it should be, left/right>on, single column>off and zero. news_box_sidebox2.php does the same thing - something appears to be telling it to show in the header in mobile?
I cannot see anything in configuration that selects that on/off.
cheers,
Mike
What template is in use, Mike?
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
What template is in use, Mike?
Responsive Classic
-
Re: News Box Manager v3.0.0 [Support Thread]
Just checking, you've got those sideboxes configured via the Layout Boxes Controller with Single Column Status set to OFF?
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
Just checking, you've got those sideboxes configured via the Layout Boxes Controller with Single Column Status set to OFF?
Yes :smile:
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
shags38
Yes :smile:
Weird, that's how I've got those set on My website and those sideboxes don't display.
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
Weird, that's how I've got those set on My website and those sideboxes don't display.
I agree, it is wierd. Now I need to consider whether I've inadvertently created the problem, albeit I can't figure how? So I have the sidebox configured to GridTitleDateDesc - I actually like the way each article is displyed in the sidebox with a neat border around each.
I have one other issue with sideboxes layout controller - when turning search/header to on the search/sidebox also appears. The only way to get rid of the sidebox search is to turn off the header search. The sidebox search can be turned on independently when header search is off ... weird.
cheers, Mike
-
2 Attachment(s)
Re: News Box Manager v3.0.0 [Support Thread]
these images are small (from Lighthouse report) but still show with and without news side box on then off - I even disabled news on home page to see if that made a difference but alas not.
Attachment 19395
Attachment 19396
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
I've just submitted v3.1.0 of News Box Manager (v3) for the Zen Cart moderators' review; I'll post back here when it's available for download.
This version enables integration with SiteMapXML, so that your site's sitemap can also 'point to' your site's news articles.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2264
-
Re: News Box Manager v3.0.0 [Support Thread]
Fantastic job as usual, Cindy - thank you.
Suggestion: Article page allows date display in box with rounded corners. Would be good to do this on the All Articles page as well.
Also, includes/modules/pages/all_articles/header_php.php references the GET variable 't', which doesn't seem to be set - did you intend to add a dropdown to the all articles page at the top to permit filtering by article type?
I will be adding this contribution to the list of suggestions on FAQ on adding pages to your site.
https://docs.zen-cart.com/user/customizing/add_pages/
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
swguy
Fantastic job as usual, Cindy - thank you.
Suggestion: Article page allows date display in box with rounded corners. Would be good to do this on the All Articles page as well.
Also, includes/modules/pages/all_articles/header_php.php references the GET variable 't', which doesn't seem to be set - did you intend to add a dropdown to the all articles page at the top to permit filtering by article type?
I will be adding this contribution to the list of suggestions on FAQ on adding pages to your site.
https://docs.zen-cart.com/user/customizing/add_pages/
Thanks for the compliment, Scott.
The "All Articles" page does display the date with rounded-corners (if configured), as on my website: https://vinosdefrutastropicales.com/...l_articles&t=1
The $_GET['t'] is set by the type-specific sidebox display, when you click the associated "View All" link.
-
Re: News Box Manager v3.0.0 [Support Thread]
Should have been more clear: in Table format (All Articles: Display Mode = Table) it does not show the date in a rounded box, but in Listing it does, as you noted.
-
1 Attachment(s)
Re: News Box Manager v3.0.0 [Support Thread]
ZC 1.5.7c
News Box Mgr v3.1.0
Lovely plugin! I have two active News Box Manager blog posts. The sidebox (class="nb-grid-inner nb-t1") repeats only one news_content (class="nb-content") beneath each correct blog post link heading (class="nb-t1") and date (class="nb-dates").
The visible news_content changes depending on which story was last viewed; either way, both blog entry sidebox news_content summaries always contain the same data. Content is fine everywhere else. How may I resolve this please?
Attachment 19541
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
RoseStar
ZC 1.5.7c
News Box Mgr v3.1.0
Lovely plugin! I have two active News Box Manager blog posts. The sidebox (class="nb-grid-inner nb-t1") repeats only one news_content (class="nb-content") beneath each correct blog post link heading (class="nb-t1") and date (class="nb-dates").
The visible news_content changes depending on which story was last viewed; either way, both blog entry sidebox news_content summaries always contain the same data. Content is fine everywhere else. How may I resolve this please?
Attachment 19541
My old eyes can't make out what the setting is for the two Sidebox/Category to Show values. Are they, perchance, the same?
-
1 Attachment(s)
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
My old eyes can't make out what the setting is for the two Sidebox/Category to Show values. Are they, perchance, the same?
They are the same.
Attachment 19544
-
Re: News Box Manager v3.0.0 [Support Thread]
That would explain it! Set those Category values to be different to get the sideboxes to display different content.
-
1 Attachment(s)
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
That would explain it! Set those Category values to be different to get the sideboxes to display different content.
I set the Category values to different displays and realized I wasn't clear. Apologies! The repeated news-content data under each post's correct heading in sideboxes occurs within the same sidebox. The issue persists.
The same content is always populated by the last viewed article:
Attachment 19545
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
RoseStar
I set the Category values to different displays and realized I wasn't clear. Apologies! The repeated news-content data under each post's correct heading in sideboxes occurs within the same sidebox. The issue persists.
The same content is always populated by the last viewed article:
Attachment 19545
A link to the site would certainly help, as I'm not able to replicate your issue locally. If you don't want to post it on the forums, you can send it to me via PM.
-
1 Attachment(s)
Re: News Box Manager v3.0.0 [Support Thread]
v1.5.7b PHP 7.3 responsive classic template news box manager v3.1.0 dazzlers clip on earrings
Hi Cindy,
please refer to the screenshot - when news_box_sidebox.php is activated the content also appears on the home page in mobile, at the top of the page before the <h1> tag.
Configuration settings for sidebox are left/right >ON, Left selected, single column status set to OFF.
It is consitent on Chrome, Firefox and I.E - this same problem was posted here https://www.zen-cart.com/showthread....40#post1377140 a while back and because it persisted I deleted News Box Manager plugin and only re-installed yesterday. All other aspects of the function of News Box are fine, no other problems. I reported originally that the content was in the header but it may actually be in the home page - (using 'inspect' in Google Chrome responsive it shows that it is in navCatTabsWrapper ?? - the grey background behind 'Latest News (view all) is consistent with my categories tabs background in the header (in desktop view)
I've checked template files that I thought would have a bearing on placement on the home page (tpl_index_default, tpl_home_page and tpl_categories_index_default, tpl_header) but am not seeing any stray code.
Any thoughts on this??
cheers,
Mike
Attachment 19552
-
Re: News Box Manager v3.0.0 [Support Thread]
Mike, you'll need to edit your RC-template clone's version of /jscript/jscript_responsive_framework.php, adding the News Box Manager's sidebox(es) to the list of hidden elements:
Code:
$('#documentcategories').css({'display': 'none', 'visibility': 'hidden' });
$('#categories').css({ 'display': 'none', 'visibility': 'hidden' });
$('#whatsnew').css({ 'display': 'none', 'visibility': 'hidden' });
$('#manufacturers').css({'display': 'none', 'visibility': 'hidden' });
$('#reviews').css({ 'display': 'none', 'visibility': 'hidden' });
$('#featured').css({ 'display': 'none', 'visibility': 'hidden' });
$('#information').css({ 'display': 'none', 'visibility': 'hidden' });
$('#moreinformation').css({ 'display': 'none', 'visibility': 'hidden' });
$('#bannerbox').css({ 'display': 'none', 'visibility': 'hidden' });
$('#ezpages').css({ 'display': 'none', 'visibility': 'hidden' });
$('#recordcompanies').css({ 'display': 'none', 'visibility': 'hidden' });
$('#musicgenres').css({ 'display': 'none', 'visibility': 'hidden' });
$('#bannerboxall').css({ 'display': 'none', 'visibility': 'hidden' });
$('#search').css({ 'display': 'none', 'visibility': 'hidden' });
$('#bannerbox2').css({ 'display': 'none', 'visibility': 'hidden' });
$('#bestsellers').css({ 'display': 'none', 'visibility': 'hidden' });
$('#specials').css({'display': 'none', 'visibility': 'hidden' });
$('#whosonline').css({ 'display': 'none', 'visibility': 'hidden' });
$('#orderhistory').css({ 'display': 'none', 'visibility': 'hidden' });
$('#manufacturerinfo').css({ 'display': 'none', 'visibility': 'hidden' });
$('#productnotifications').css({ 'display': 'none', 'visibility': 'hidden' });
$('#currencies').css({ 'display': 'none', 'visibility': 'hidden' });
$('#languages').css({ 'display': 'none', 'visibility': 'hidden' });
$('#shoppingcart').css({ 'display': 'none', 'visibility': 'hidden' });
$('#newsboxsidebox').css({ 'display': 'none', 'visibility': 'hidden' });
-
Re: News Box Manager v3.0.0 [Support Thread]
Quote:
Originally Posted by
lat9
Mike, you'll need to edit your RC-template clone's version of /jscript/jscript_responsive_framework.php, adding the News Box Manager's sidebox(es) to the list of hidden elements:
Code:
$('#documentcategories').css({'display': 'none', 'visibility': 'hidden' });
$('#categories').css({ 'display': 'none', 'visibility': 'hidden' });
$('#whatsnew').css({ 'display': 'none', 'visibility': 'hidden' });
$('#manufacturers').css({'display': 'none', 'visibility': 'hidden' });
$('#reviews').css({ 'display': 'none', 'visibility': 'hidden' });
$('#featured').css({ 'display': 'none', 'visibility': 'hidden' });
$('#information').css({ 'display': 'none', 'visibility': 'hidden' });
$('#moreinformation').css({ 'display': 'none', 'visibility': 'hidden' });
$('#bannerbox').css({ 'display': 'none', 'visibility': 'hidden' });
$('#ezpages').css({ 'display': 'none', 'visibility': 'hidden' });
$('#recordcompanies').css({ 'display': 'none', 'visibility': 'hidden' });
$('#musicgenres').css({ 'display': 'none', 'visibility': 'hidden' });
$('#bannerboxall').css({ 'display': 'none', 'visibility': 'hidden' });
$('#search').css({ 'display': 'none', 'visibility': 'hidden' });
$('#bannerbox2').css({ 'display': 'none', 'visibility': 'hidden' });
$('#bestsellers').css({ 'display': 'none', 'visibility': 'hidden' });
$('#specials').css({'display': 'none', 'visibility': 'hidden' });
$('#whosonline').css({ 'display': 'none', 'visibility': 'hidden' });
$('#orderhistory').css({ 'display': 'none', 'visibility': 'hidden' });
$('#manufacturerinfo').css({ 'display': 'none', 'visibility': 'hidden' });
$('#productnotifications').css({ 'display': 'none', 'visibility': 'hidden' });
$('#currencies').css({ 'display': 'none', 'visibility': 'hidden' });
$('#languages').css({ 'display': 'none', 'visibility': 'hidden' });
$('#shoppingcart').css({ 'display': 'none', 'visibility': 'hidden' });
$('#newsboxsidebox').css({ 'display': 'none', 'visibility': 'hidden' });
Thanks a bunch Cindy - worked a treat :smile:
cheers,
Mike
-
1 Attachment(s)
Re: News Box Manager v3.0.0 [Support Thread]
I'm not seeing anything in the code or news box tables; I've since turned off the 2nd sidebox as it's not needed yet. Here's a screenshot (same at link) to see my current settings and two different problems:
Attachment 19588
https://rosestarstudio.com/gallery/n...2021-05-23.png
Problem 1:
nb-t1 is populated correctly
nb-dates is populated correctly
nb-content is not populated correctly
Nothing stands out in the code for populating nb-content with
Code:
$news_sidebox_content = zen_trunc_string($news_content);
in tpl_news_box_sidebox.php
Problem 2:
Truncated news_content shows even though I have both sideboxes set to GridTitleDate only (instead of GridTitleDateDesc). I’m unable to temporarily mask problem #1 while still showing post dates.
-
Re: News Box Manager v3.0.0 [Support Thread]
Two file changes needed to provide the required variable clean-up for the multi-use formatting scripts:
1. /includes/modules/news_box_format. Change line 80 to read
Code:
unset($news_info, $news_and_clause, $max_news_items);
2. /includes/sideboxes/news_box_sidebox.php. Change line 83 to read
Code:
unset($news_sidebox_num, $news_and_clause, $max_news_items);