Re: Ezpages Footer Columns support
Hi Glen,
It's just on a local home test server at the moment so I can't give you a URL. I will be installing it up on the host in a test environment in a day or so. We did try carefully merging things after the initial install made the Ezpages Improved Menus graphics go away, but had to back it out.
We went ahead and installed Flexible Footer Menus and have that working now. I'd still like to understand what happened for future use because I have a couple of other sites that will be getting spruced up. Also, perhaps others on the forums wanting to use both plugins could benefit.
Happy Holidays! Debbie
Re: Ezpages Footer Columns support
Hi Glen,
Here's more info from my husband who did the install...We had the Ezpages Improved Menu plugin installed and working. When he installed the Ezpages Footer Columns plugin, some of the file names were the same and it apparently overlaid them, thus causing the Improved Menu stuff to go away. He backed it out and tried merging some of the code but it still didn't work right. That's when we just decided to try the Flexible Footer Menu plugins and that seems to work ok with it. Not sure if this helps or not. Let me know if you need more specific info.
Thanks, Debbie
Re: Ezpages Footer Columns support
I bave found the issue: I had updated and improved both EZ-Pages Footer Columns and EZ-Pages Improved Menus last December, but I did not finish testing and packaging and upload the Menus mod. The new versions of both are compatible, as are the old versions of both, but old and new are not. So I will put the EZ-Pages Improved Menus update back on the front burner and get it uploaded (after the holidays, can't concentrate on it now).
Re: Ezpages Footer Columns support
Sounds great! Thanks. I'm sure that must have been our issue, trying to mix old & new.
Happy Holidays to you and yours!
Debbie
Re: Ezpages Footer Columns support
That is a very nice addon. Thank you. But there is PHP warning after installation as follows.
PHP Warning: Division by zero in .....includes/functions/extra_functions/str_replace_int_functions.php on line 22
How to fix the issue?
Many thanks!!!
1 Attachment(s)
Re: Ezpages Footer Columns support
After installation, i got a pretty nice footer like the picture. However now I want the footer background extending to 100% width of screen while keep the width of four column at 906 px. Is there any way I can do that. Sorry I am not good at css. I tried to change the footer background image repeat-x for #navSuppWrapper in stylesheet.css but no luck. Many thanks.
Re: Ezpages Footer Columns support
Does anyone have this working on version 1.5.7? I'm trying to upgrade from 1.5.4 and I get the following debug log:
#1 trigger_error() called at [C:\xampp\htdocs\zencart157\store\includes\classes\db\mysql\query_factory.php:170]
#2 queryFactory->show_error() called at [C:\xampp\htdocs\zencart157\store\includes\classes\db\mysql\query_factory.php:142]
#3 queryFactory->set_error() called at [C:\xampp\htdocs\zencart157\store\includes\classes\db\mysql\query_factory.php:269]
#4 queryFactory->Execute() called at [C:\xampp\htdocs\zencart157\store\includes\modules\downtoearth\ezpages_bar_footer .php:24]
#5 include(C:\xampp\htdocs\zencart157\store\includes\modules\downtoearth\ezpages_ba r_footer.php) called at [C:\xampp\htdocs\zencart157\store\includes\templates\downtoearth\templates\tpl_ez pages_bar_footer.php:18]
#6 require(C:\xampp\htdocs\zencart157\store\includes\templates\downtoearth\template s\tpl_ezpages_bar_footer.php) called at [C:\xampp\htdocs\zencart157\store\includes\templates\downtoearth\common\tpl_foote r.php:31]
#7 require(C:\xampp\htdocs\zencart157\store\includes\templates\downtoearth\common\t pl_footer.php) called at [C:\xampp\htdocs\zencart157\store\includes\templates\downtoearth\common\tpl_main_ page.php:173]
#8 require(C:\xampp\htdocs\zencart157\store\includes\templates\downtoearth\common\t pl_main_page.php) called at [C:\xampp\htdocs\zencart157\store\index.php:94]
--> PHP Fatal error: 1054:Unknown column 'pages_title' in 'order clause' :: select * from ezpages where status_footer = 1 and footer_sort_order > 0 order by footer_sort_order, pages_title ==> (as called by) C:\xampp\htdocs\zencart157\store\includes\modules\downtoearth\ezpages_bar_footer .php on line 24 <== in C:\xampp\htdocs\zencart157\store\includes\classes\db\mysql\query_factory.php on line 170.
Re: Ezpages Footer Columns support
I'm not 100% sure because I don't have that plugin installed, but this should help:
edit your C:\xampp\htdocs\zencart157\store\includes\modules\downtoearth\ezpages_bar_footer .php and simply replace all content with this:
Code:
<?php
/**
* ezpages bar (footer) - used to display links to EZ-Pages content in horizontal format (usually as a footer element)
*
* @copyright Copyright 2003-2020 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: DrByte 2020 May 19 Modified in v1.5.7 $
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
$zco_notifier->notify('NOTIFY_START_EZPAGES_FOOTERBAR');
$var_linksList = array();
// test if bar should display:
if (EZPAGES_STATUS_FOOTER == '1' || (EZPAGES_STATUS_FOOTER == '2' && zen_is_whitelisted_admin_ip())) {
if (!$sniffer->table_exists(TABLE_EZPAGES_CONTENT)) {
return; // early exit; db not upgraded
}
$pages_query = $db->Execute("SELECT e.pages_id, e.page_open_new_window, e.page_is_ssl, e.alt_url, e.alt_url_external, e.toc_chapter, ec.pages_title
FROM " . TABLE_EZPAGES . " e,
" . TABLE_EZPAGES_CONTENT . " ec
WHERE e.pages_id = ec.pages_id
AND ec.languages_id = " . (int)$_SESSION['languages_id'] . "
AND e.status_footer = 1
AND e.footer_sort_order > 0
ORDER BY e.footer_sort_order, ec.pages_title");
if ($pages_query->RecordCount()>0) {
$rows = 0;
$page_query_list_footer = array();
foreach ($pages_query as $page_query) {
$rows++;
$page_query_list_footer[$rows]['id'] = $page_query['pages_id'];
$page_query_list_footer[$rows]['name'] = $page_query['pages_title'];
$page_query_list_footer[$rows]['sort'] = $page_query->fields['footer_sort_order'];//ezpages_footer_columns
$page_query_list_footer[$rows]['altURL'] = '';
// if altURL is specified, check to see if it starts with "http", and if so, create direct URL, otherwise use a zen href link
switch (true) {
// external link new window or same window
case ($page_query['alt_url_external'] != ''):
$page_query_list_footer[$rows]['altURL'] = $page_query['alt_url_external'];
break;
// internal link new window
case ($page_query['alt_url'] != '' && $page_query['page_open_new_window'] == '1'):
$page_query_list_footer[$rows]['altURL'] = (substr($page_query['alt_url'],0,4) == 'http') ?
$page_query['alt_url'] :
($page_query['alt_url']=='' ? '' : zen_href_link($page_query['alt_url'], '', ($page_query['page_is_ssl']=='0' ? 'NONSSL' : 'SSL'), true, true, true));
break;
// internal link same window
case ($page_query['alt_url'] != '' && $page_query['page_open_new_window'] == '0'):
$page_query_list_footer[$rows]['altURL'] = (substr($page_query['alt_url'],0,4) == 'http') ?
$page_query['alt_url'] :
($page_query['alt_url']=='' ? '' : zen_href_link($page_query['alt_url'], '', ($page_query['page_is_ssl']=='0' ? 'NONSSL' : 'SSL'), true, true, true));
break;
}
// if altURL is specified, use it; otherwise, use EZPage ID to create link
$page_query_list_footer[$rows]['link'] = ($page_query_list_footer[$rows]['altURL'] =='') ?
zen_href_link(FILENAME_EZPAGES, 'id=' . $page_query['pages_id'] . ($page_query['toc_chapter'] > 0 ? '&chapter=' . $page_query['toc_chapter'] : ''), ($page_query['page_is_ssl']=='0' ? 'NONSSL' : 'SSL')) :
$page_query_list_footer[$rows]['altURL'];
$page_query_list_footer[$rows]['link'] .= ($page_query['page_open_new_window'] == '1' ? '" rel="noreferrer noopener" target="_blank' : '');
}
$var_linksList = $page_query_list_footer;
}
} // test for display
$zco_notifier->notify('NOTIFY_END_EZPAGES_FOOTERBAR');
The difference is in the query, which now uses two tables for ez-pages, instead of the one single table as it was when the plugin was released...
Re: Ezpages Footer Columns support
Thanks very much for your help! Now I get the following debug log:
#1 require(C:\xampp\htdocs\zencart157\store\includes\templates\downtoearth\template s\tpl_ezpages_bar_footer.php) called at [C:\xampp\htdocs\zencart157\store\includes\templates\downtoearth\common\tpl_foote r.php:33]
#2 require(C:\xampp\htdocs\zencart157\store\includes\templates\downtoearth\common\t pl_footer.php) called at [C:\xampp\htdocs\zencart157\store\includes\templates\template_default\common\tpl_ main_page.php:179]
#3 require(C:\xampp\htdocs\zencart157\store\includes\templates\template_default\com mon\tpl_main_page.php) called at [C:\xampp\htdocs\zencart157\store\index.php:94]
--> PHP Warning: Division by zero in C:\xampp\htdocs\zencart157\store\includes\templates\downtoearth\templates\tpl_ez pages_bar_footer.php on line 49.
And line 49 in tpl_ezpages_bar_footer.php is:
$col_width = (int)(100/$cols);//update divs with % width
Any idea how to fix that error?
Re: Ezpages Footer Columns support
My bad, sorry about that... The code I gave you was incorrect - I wasn't paying attention. Here's a revised copy:
Code:
<?php
/**
* ezpages bar (footer) - used to display links to EZ-Pages content in horizontal format (usually as a footer element)
*
* @copyright Copyright 2003-2020 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: DrByte 2020 May 19 Modified in v1.5.7 $
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
$zco_notifier->notify('NOTIFY_START_EZPAGES_FOOTERBAR');
$var_linksList = array();
// test if bar should display:
if (EZPAGES_STATUS_FOOTER == '1' || (EZPAGES_STATUS_FOOTER == '2' && zen_is_whitelisted_admin_ip())) {
if (!$sniffer->table_exists(TABLE_EZPAGES_CONTENT)) {
return; // early exit; db not upgraded
}
$pages_query = $db->Execute("SELECT e.pages_id, e.page_open_new_window, e.page_is_ssl, e.alt_url, e.alt_url_external, e.toc_chapter, e.footer_sort_order, ec.pages_title
FROM " . TABLE_EZPAGES . " e,
" . TABLE_EZPAGES_CONTENT . " ec
WHERE e.pages_id = ec.pages_id
AND ec.languages_id = " . (int)$_SESSION['languages_id'] . "
AND e.status_footer = 1
AND e.footer_sort_order > 0
ORDER BY e.footer_sort_order, ec.pages_title");
if ($pages_query->RecordCount()>0) {
$rows = 0;
$page_query_list_footer = array();
foreach ($pages_query as $page_query) {
$rows++;
$page_query_list_footer[$rows]['id'] = $page_query['pages_id'];
$page_query_list_footer[$rows]['name'] = $page_query['pages_title'];
$page_query_list_footer[$rows]['sort'] = $page_query['footer_sort_order'];//ezpages_footer_columns
$page_query_list_footer[$rows]['altURL'] = '';
// if altURL is specified, check to see if it starts with "http", and if so, create direct URL, otherwise use a zen href link
switch (true) {
// external link new window or same window
case ($page_query['alt_url_external'] != ''):
$page_query_list_footer[$rows]['altURL'] = $page_query['alt_url_external'];
break;
// internal link new window
case ($page_query['alt_url'] != '' && $page_query['page_open_new_window'] == '1'):
$page_query_list_footer[$rows]['altURL'] = (substr($page_query['alt_url'],0,4) == 'http') ?
$page_query['alt_url'] :
($page_query['alt_url']=='' ? '' : zen_href_link($page_query['alt_url'], '', ($page_query['page_is_ssl']=='0' ? 'NONSSL' : 'SSL'), true, true, true));
break;
// internal link same window
case ($page_query['alt_url'] != '' && $page_query['page_open_new_window'] == '0'):
$page_query_list_footer[$rows]['altURL'] = (substr($page_query['alt_url'],0,4) == 'http') ?
$page_query['alt_url'] :
($page_query['alt_url']=='' ? '' : zen_href_link($page_query['alt_url'], '', ($page_query['page_is_ssl']=='0' ? 'NONSSL' : 'SSL'), true, true, true));
break;
}
// if altURL is specified, use it; otherwise, use EZPage ID to create link
$page_query_list_footer[$rows]['link'] = ($page_query_list_footer[$rows]['altURL'] =='') ?
zen_href_link(FILENAME_EZPAGES, 'id=' . $page_query['pages_id'] . ($page_query['toc_chapter'] > 0 ? '&chapter=' . $page_query['toc_chapter'] : ''), ($page_query['page_is_ssl']=='0' ? 'NONSSL' : 'SSL')) :
$page_query_list_footer[$rows]['altURL'];
$page_query_list_footer[$rows]['link'] .= ($page_query['page_open_new_window'] == '1' ? '" rel="noreferrer noopener" target="_blank' : '');
}
$var_linksList = $page_query_list_footer;
}
} // test for display
$zco_notifier->notify('NOTIFY_END_EZPAGES_FOOTERBAR');
This WILL produce columns as expected, but depending on your template, it might require additional CSS tweaks, or even code changes because it just does simple percentage calculations.