I noticed that an update is due to be released any day now. If I install the mod today, will the new version be an easy override, or should I just wait a few weeks for the release? I just want to make it easy! :smile:
Printable View
I noticed that an update is due to be released any day now. If I install the mod today, will the new version be an easy override, or should I just wait a few weeks for the release? I just want to make it easy! :smile:
You would need to merge any custom defines you had made into the new language define file, but aside from that there will be nothing changed in the base setup, just some new capabilities. The rest of the files can safely just replace the current versions. You might want to tweak the styling a bit too.
Hi Glenn - dumb question of the day. Can this mod be used for the Main Page, i.e. index or home page. If so how does it apply, index page doesn't show up in E-Z Pages to use the mod as per your instructions. If not then can you direct me to the area I should be in to modify my footer, i.e. to include external links (links being links to my other sites). I will use this mod for E-Z pages as I develop more and include in existing ones.
cheers,
Mike
The footer columns will display in the footer of all pages, home/index or any other, unless you add custom coding to limit it.
Just install it and configure some ez-page external links per the readme, and see how it works.
Hi:
I installed the mod and everything was great until I looked at it in Compatability View. Then the headings and page titles are all messed up. I am using 1.3.9h.
You can see it at http://poolcuesexpress.com/testsite. Username is dave, Password is dave123
I would appreciate any help anyone could give me.
Dave
I'm out of time to look at this right now, but the problem only happens in IE7 compatibility view, not IE8 or 9, so it must be some effect of an IE7 bug. IE developer tools seem very rudimentary and I haven't yet found out how to edit the CSS to add properties. What happens if you look in your stylesheet and replace the
withCode:#navSupp{background:#fff;}
.ezpagesFooterCol{float:left;padding:0 0 0.5em 0}
This is some of the updated CSS I use in the upcoming version of the mod; I don't know if it will have any effect on the background color and text height you are getting in IE7, but it can't hurt to try it.Code:#navSupp{background:#fff;display: table; width: 100%;}
.ezpagesFooterCol{display: table-cell; padding:0 0 0.5em 0}
Glenn, I tried that code and it took the background color away but the text still wasn't fixed.
You said that that only happens in IE7? If that's the case then I am not going to worry too much about it.
Thanks for the help and support. The mod works great other that that and it does exactly what I wanted it to do.
Dave
Hi Glenn,
I just uploaded the mod, and instead of footer I get:
WARNING: An Error occurred, please refresh the page and try again.
The only two things I can think of are my version, and the language:
1.50 Italian
I made a copy of the english directory, and uploaded it.
Last bit of info is I haven't created any ez-pages yet, but I would expect the rest of footer to show.
Thank you
There are no v1.5.0 changes to core files the mod touches, so the version shouldn't matter. Correct copying of language files should not cause a problem. Can I see the site where this is happening?
What is the latest myDebug file in /cache/?
Thank you.
DeBug
[23-Aug-2012 08:07:45] 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 in /showroom/includes/classes/db/mysql/query_factory.php on line 101
Site is
afzdesign dot com / showroom
I have removed the plugin, if you want me to put it back up, please let me know.
It is choking on the SQL query, which is identical to the stock file's query. But if you are using the Multilanguage mod, that would probably be the issue, as that mod changes the SQL query and only fetches certain fields and not * ("everything"). My latest development version of this mod has an alternate version of ezpages_bar_footer.php which is compatible with the Multilanguage mod.PHP Code:
<?php
/**
* ezpages bar (footer) - used to display links to EZ-Pages content in horizontal format (usually as a footer element)
*
* @package templateSystem
* @copyright Copyright 2012 Glenn Herbert
* @copyright Copyright 2003-2007 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: ezpages_bar_footer.php 6021 2007-03-17 16:34:19Z ajeh $
* @modified from standard file to provide multi-language support 2006-05-16 bunyip $
* @added support for EZ-Pages Footer Columns by Glenn Herbert (gjh42) 2012-02-22
*/
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
$zco_notifier->notify('NOTIFY_START_EZPAGES_FOOTERBAR');
// test if bar should display:
if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) {
// $page_query = $db->Execute("select * from " . TABLE_EZPAGES . " where status = 1 and languages_id=" . (int)$_SESSION['languages_id'] . " and horizontal_sort_order > 0 order by horizontal_sort_order, pages_title");
if (isset($var_linksList)) {
unset($var_linksList);
}
// query modified for multi-language support and ez-pages footer columns
$page_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, et.pages_title, e.footer_sort_order
from " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
where e.pages_id = et.pages_id
and et.languages_id = '" . (int)$_SESSION['languages_id'] . "'
and status_footer = 1 and footer_sort_order > 0 order by footer_sort_order, pages_title");
// end of modification
if ($page_query->RecordCount()>0) {
$rows = 0;
while (!$page_query->EOF) {
$rows++;
$page_query_list_footer[$rows]['id'] = $page_query->fields['pages_id'];
$page_query_list_footer[$rows]['name'] = $page_query->fields['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->fields['alt_url_external'] != ''):
$page_query_list_footer[$rows]['altURL'] = $page_query->fields['alt_url_external'];
break;
// internal link new window
case ($page_query->fields['alt_url'] != '' and $page_query->fields['page_open_new_window'] == '1'):
$page_query_list_footer[$rows]['altURL'] = (substr($page_query->fields['alt_url'],0,4) == 'http') ?
$page_query->fields['alt_url'] :
($page_query->fields['alt_url']=='' ? '' : zen_href_link($page_query->fields['alt_url'], '', ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL'), true, true, true));
break;
// internal link same window
case ($page_query->fields['alt_url'] != '' and $page_query->fields['page_open_new_window'] == '0'):
$page_query_list_footer[$rows]['altURL'] = (substr($page_query->fields['alt_url'],0,4) == 'http') ?
$page_query->fields['alt_url'] :
($page_query->fields['alt_url']=='' ? '' : zen_href_link($page_query->fields['alt_url'], '', ($page_query->fields['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->fields['pages_id'] . ($page_query->fields['toc_chapter'] > 0 ? '&chapter=' . $page_query->fields['toc_chapter'] : ''), ($page_query->fields['page_is_ssl']=='0' ? 'NONSSL' : 'SSL')) :
$page_query_list_footer[$rows]['altURL'];
$page_query_list_footer[$rows]['link'] .= ($page_query->fields['page_open_new_window'] == '1' ? '" target="_blank' : '');
$page_query->MoveNext();
}
$var_linksList = $page_query_list_footer;
}
} // test for display
$zco_notifier->notify('NOTIFY_END_EZPAGES_FOOTERBAR');
?>
Looking at the revised $page_query, I see et.pages_title, which means that the title field has been moved from the ezpages table to the ezpages_text table. Thus the original query cannot find it to order by.
Thank you very much for your usual kindness.
I copied the code, and now it seems working fine, Just added one test page.
Thank you to share
I have turned on the ez pages in footer and changed all of the sort orders and still it is not sorting them into separate columns...what am I doing wrong?
Website is www.highplainsprospectors.com
Any help is appreciated.
Thanks!
Josh
You do not have EZ-Pages Footer Columns properly installed in your template, if at all. The output is strictly stock, but you have the stylesheet from clydejones' Footer Menu mod (though none of its output). Please verify what you have installed.
Our site is set up here: http://seventyfourdegrees.com/shop/i...age=page&id=16
We have installed the footer column module, enabled it in the ez-pages, changed the css, changed the column headers in the language file, updated the footer order of our links to the 110, 120 etc. but nothing is appearing. Is there something I am missing. There should be no disable footers in the config.
Basically we want the footer to look something like this: http://seventyfourdegrees.com/footer.jpg
Any help you can give or at least point us in the right direction if this has come up before would be much appreciated.
Thanks in advance.
What order did you install things in? Your Template Monster template has a customized tpl_footer.php, and you could not have both that and the Footer Columns active without combining the customizations in both versions of the file. Whichever one you installed last would be the only one active, and you do have the TM footer code active.
Can you post the contents of your template version of tpl_footer.php? That will tell exactly what is enabled, and I can tell you how to activate the footer columns if they are disabled.
Hmm we definitely installed the columns last, OK thanks for your help gjh42 I shall try combining and the two.
When you uploaded the footer columns files, you would have gotten a "file already exists" response for tpl_footer.php and possibly others, and if you missed that or selected not to replace what was there, you would not have the mod version of some files. Please verify exactly what versions of files are on your server compared to the versions in the mod package.
PHP Code:
<?php
/**
* Common Template - tpl_footer.php
*
* this file can be copied to /templates/your_template_dir/pagename<br />
* example: to override the privacy page<br />
* make a directory /templates/my_template/privacy<br />
* copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_footer.php<br />
* to override the global settings and turn off the footer un-comment the following line:<br />
* <br />
* $flag_disable_footer = true;<br />
*
* @package templateSystem
* @copyright Copyright 2009 Glenn Herbert
* @copyright Copyright 2003-2005 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: tpl_footer.php 4821 2006-10-23 10:54:15Z drbyte $
* modified for EZ-Pages Footer Columns by Glenn Herbert (gjh42) 2009-10-06 (line 31)
*/
require(DIR_WS_MODULES . zen_get_module_directory('footer.php'));
?>
<?php
if (!isset($flag_disable_footer) || !$flag_disable_footer) {
?>
<!--bof-navigation display -->
<div id="navSuppWrapper">
<div id="navSupp">
<?php //echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'. HEADER_TITLE_CATALOG . '</a>'; ?>
<?php if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php require($template->get_template_dir('tpl_ezpages_bar_footer.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_footer.php'); ?>
<?php } ?>
</div>
</div>
<!--eof-navigation display -->
<!--bof-ip address display -->
<?php
if (SHOW_FOOTER_IP == '1') {
?>
<div id="siteinfoIP"><?php echo TEXT_YOUR_IP_ADDRESS . ' ' . $_SERVER['REMOTE_ADDR']; ?></div>
<?php
}
?>
<!--eof-ip address display -->
<!--bof-banner #5 display -->
<?php
if (SHOW_BANNERS_GROUP_SET5 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET5)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerFive" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
?>
<!--eof-banner #5 display -->
<!--bof- site copyright display -->
<div id="siteinfoLegal" class="legalCopyright"><?php echo FOOTER_TEXT_BODY; ?></div>
<!--eof- site copyright display -->
<?php
} // flag_disable_footer
?>
Apparently TM has its footer output in a completely different file, and never allows tpl_footer to load. tpl_footer.php is obviously the footer columns version, but it is not being output. You haveinstead ofHTML Code:<!-- ========== FOOTER ========== -->
<div id="footer">
<div class="main-width">
<div class="footer-menu">
<div id="navSupp">
<br class="clearBoth" />
</div>
</div>
<div class="copyright">
which you would have if the footer columns code was executing.HTML Code:<!--bof-navigation display -->
<div id="navSuppWrapper">
<div id="navSupp">
<div class="ezpagesFooterCol col1" style="width: 20%">
<ul>
<li><a href="http://localhost/zc151/index.php?main_page=account">My Account</a></li>
</ul>
</div>
<div class="ezpagesFooterCol col2" style="width: 20%">
<ul>
<li><a href="http://localhost/zc151/index.php?main_page=site_map">Site Map</a></li>
</ul>
</div>
...
<div class="ezpagesFooterCol col6" style="width: 20%">
<ul>
<li><a href="http://localhost/zc151/index.php?main_page=index&cPath=3_10">Action DVDs</a></li>
</ul>
</div><br class="clearBoth" />
</div>
</div>
<!--eof-navigation display -->
<!--bof-ip address display -->
<div id="siteinfoIP">Your IP Address is: 1</div>
<!--eof-ip address display -->
<!--bof-banner #5 display -->
<!--eof-banner #5 display -->
<!--bof- site copyright display -->
I changed the footer to tpl_footer.php and it seemed to change to the transparent background. I have now styled it but the columns are still not appearing :-s Thanks for all your help it is very much appreciated!
You need to find what file TM uses to output the footer, so you can merge/call the footer columns from it.
In Tools > Developers Toolkit, paste a snippet of the output you have, like <div class="footer-menu">, in the lower left box, select all files and search. Among the results will be the file and line number where that is created. Try some other snippets if that doesn't help.
Ok thanks, we got the footer columns working but...when we add a comment it doesn't work. We would like to take out the home and newsletter link text and replace with a comment and facebook icon respectively. See below:
http://seventyfourdegrees.com/shop/i...age=page&id=16
the "define('EZPAGES_FOOTER_COL_COMMENT_4','blah blah');" doesn't appear in column 4
any help would be appreciated
'EZPAGES_FOOTER_COL_COMMENT_4' does not refer to column 4, but to ez-page id 4. You can make the comment show up under "Home" by changing the number to whatever ez-page id you are using to hold that link.
The current published version of the mod does not handle replacement of a page link with other content, but the development version does. I haven't looked at it in a while, but I think it's ready for a beta test if you would like to try it.
Ah that is brilliant thanks, makes you feel silly when its something that simple.
Yeh we would be up for trying the beta test, just let us know what you need. This is all very new to us!
I have just tested the new functions, and all appear to work correctly. Here is the zip; please post here with your experience.
Attachment 11609
Seems to work very well here: http://seventyfourdegrees.com/shop/i...age=page&id=16
The only thing it did was to shunt the #siteinfoLegal down below in a separate footer instead of being right below columns.
It appears that your template has eliminated the standard #mainWrapper that holds all of the other parts. Thus, #siteInfoLegal needs its own styling to make it match the other parts.
You have two different rules controlling the height of #navSupp:
stylesheet_ezpages_footer_columns.css:stylesheet.css:Code:#navSupp {
background:#000 url(../images/footer.jpg) no-repeat;
min-width:940px;
min-height:312px;
margin:0 auto;
width:940px;
color:#9b9b9b;
}
Eliminate one of these rules and consolidate the property declarations you want in the other. Reduce the height values as appropriate.Code:#navSupp {
background:#000 url(../images/footer.jpg) no-repeat;
min-width:940px;
min-height:350px;
height:350px;
margin:0 auto;
width:940px;
color:#9b9b9b;
}
There is a minor bug in the beta zip which disables the active page highlighting for non-ezpage links. You can fix it if you want by changing the end of this line in ezpages_improved_menus_functions.phpto thisPHP Code:
$active = ((strpos($_SERVER['REQUEST_URI'],$alturl) !== false and strpos('/index.php?main_page=index',$alturl) === false) or ($this_is_home_page and strpos('/index.php?main_page=index',$alturl) !== false))?' activeILPage': '';
I am submitting the update to Plugins, and it should be available there soon.PHP Code:
$active = ((strpos($_SERVER['REQUEST_URI'],$alturl) !== false and strpos('/index.php?main_page=index',$alturl) === false) or ($this_is_home_page and strpos('/index.php?main_page=index',$alturl) !== false))?' class="activeILPage"': '';
How are column headings defined and numbered in "EZ-Pages Footer Columns v1.1" plugin?
Column rows are numbered in the "EZ-Pages" as:
1st col: 101, 102, 103
2nd col: 201, 202
3rd col: 301, 302, 303
If you have 3 columns, are the column number 1, 2 & 3 from left to right, or is it defined by an ezpage?
In order to get 3 different Column headings, is it defined as follow under \includes\languages\english\extra_definitions\MY_TEMPLATE\ezpages_footer_columns_defines.php:
<?php
/**
* @copyright Copyright 2012 Glenn Herbert
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* ezpages_footer_columns_defines.php
* EZ-Pages Footer Columns by Glenn Herbert (gjh42) 2012-01-04
*/
if (!defined('IMAGE_TITLES_EXT')) define('IMAGE_TITLES_EXT','.gif');
/* ORIG STATEMENT define('EZPAGES_FOOTER_COL_HEADING_x', 'Your Column Heading');//change x to column number */
define('EZPAGES_FOOTER_COL_HEADING_1', 'Column Heading 1');//change x to column number
define('EZPAGES_FOOTER_COL_HEADING_2', 'Column Heading 2');//change x to column number
define('EZPAGES_FOOTER_COL_HEADING_3', 'Column Heading 3');//change x to column number
define('EZPAGES_FOOTER_COL_SUBHEAD_xx', 'Your Subheading');//change xx to ezp id
define('EZPAGES_FOOTER_COL_COMMENT_xx', 'Your Comment Text');//text can include <br /> for new line
define('EZPAGES_FOOTER_COL_HTML_xx', 'Some HTML content<br />to replace the<br />EZ-Page xx<br />link');
define('EZPAGES_FOOTER_COL_LIMIT_x','7');//change x to column to set, 7 to max # items high
define('EZPAGES_FOOTER_ICONS', '');//or '1' or '2'
define('EZPAGES_FOOTER_EXT', '');
?>
I am not getting any column heading?
Yes, footer column headings are defined by the first digit of the ez-page ids, so you would use _1, _2 and _3 in your case, as you show.
What exact definition strings are you using? Just as shown? Seeing your site live might give me a clue to why it is not working for you.
I got some screen captures of what I see. I hope it helps!
Attachment 11688
Attachment 11689
Attachment 11690
Those really don't tell me anything except that you seem to have your admin setups correct. I suppose even seeing it live wouldn't tell me more; what do your files look like?
Where exactly are they all (filepath starting with /includes/)? None of the other defines is essential to be active for your current purposes, so if the define file was not being run, the lack of column headings would be the only clue.
Are your defines exactly as shown in your previous post? (I expect so, given your other screenshots.)
The
/* ORIG STATEMENT define('EZPAGES_FOOTER_COL_HEADING_x', 'Your Column Heading');//change x to column number */
with its double comment marks shouldn't cause a problem (the /* */ should ignore the // and close properly), but try deleting the whole line or moving it to the end of the file, just for fun.
I went back to my prior backup and reloaded the plugin. It is not broken any more. I must have miss handled a file somehow.
Thank you.
Glad you got it sorted. Happy New Year!
Hi Glen,
I'm on Zen V 1.5.1 I'm trying to use EZPages Footer Columns, but I am also already using EZPages Improved Menus plugin (and love it!). When I install Footer Columns, there's apparently some kind of collision and it makes the EZPages Improved Menus (I'm using them in the header) disappear. Are the two plugins incompatible? Is there a special trick to get them to work together?
If they are not compatible, I wonder if RBarbour's Flexible Footer Menus might work.
I'm also using your Categories Dressing plugin and it does exactly what I needed- so thanks for that one also.
-- Debbie
The two are not incompatible - I have or had both installed on a local test site. I will look at them and see what might interfere. They both use some of the same base functions.
There is a chance that seeing your site live could give me a clue about your issue.
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
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
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).
Sounds great! Thanks. I'm sure that must have been our issue, trying to mix old & new.
Happy Holidays to you and yours!
Debbie
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!!!
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.
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.
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:
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...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');
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?
My bad, sorry about that... The code I gave you was incorrect - I wasn't paying attention. Here's a revised copy:
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.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');
That works!! Thank you so much - I really appreciate the help!!
I know this is some time later , but i am having the same issue. When i use your updated code for the ezpages_bar_footer.php , i get the same errors as the other user.
#1 require(/surplusremotes.com/includes/templates/bootstrap/templates/tpl_ezpages_bar_footer.php) called at [/surplusremotes.com/includes/templates/bootstrap/common/tpl_footer.php:33]
#2 require(/surplusremotes.com/includes/templates/bootstrap/common/tpl_footer.php) called at [/surplusremotes.com/includes/templates/bootstrap/common/tpl_main_page.php:253]
#3 require(surplusremotes.com/includes/templates/bootstrap/common/tpl_main_page.php) called at [/surplusremotes.com/index.php:94]
--> PHP Warning: Use of undefined constant EZPAGES_FOOTER_EXT - assumed 'EZPAGES_FOOTER_EXT' (this will throw an Error in a future version of PHP) in /surplusremotes.com/includes/templates/bootstrap/templates/tpl_ezpages_bar_footer.php on line 33.
I am using ZC 1.5.7C with boot strap4 installed and the only other plugin being ZX Slideshow , please help.