Zen Cart Logo
Forums / Bug Reports / PHPBB: information.php tpl_site_map_default.php with URL reference to phpBB3 forum

PHPBB: information.php tpl_site_map_default.php with URL reference to phpBB3 forum

Locked

Views: 2,245

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
12 May 2010, 1:44 PM
#1
itslick avatar

itslick

New Zenner

Join Date:
May 2010
Posts:
1
Plugin Contributions:
0

PHPBB: information.php tpl_site_map_default.php with URL reference to phpBB3 forum

version Zen Cart v1.3.9b/v1.3.9b
clean new install
no addons

I'm familiar with PHP but no were near Pro so I was only able to trace the problem back to:
information.php
tpl_site_map_default.php

The problem behaviour:

When clicking on the "Forum" link inside the Information box it will try to go to
http://www.your-site.com/zen-cart-dir//forum/index.php

but that is incorrect as the forum is located on:
http://www.your-site.com/forum/index.php

I was able to trace the problem to be in this line, but i was unable to figure out where it gets the phpbb_url from, since the configure.php (from ..\includes) references the full local server path to phpBB forum, so no idea how it determines or assumes it's just "/forum/"

  define('DIR_WS_PHPBB', '/home/your-site/public_html/forum/');

Assuming that even if phpBB was installed within Zen Cart at the root folder, it's still creating a double slash // before the forum/index.php
which actually would read like

...some variable/+/phpbb_url/FILENAME_BB_INDEX

and that "some variable" is what i can't figure out where it's coming from.

<?php if ( (isset($phpBB->phpBB['db_installed_config']) && $phpBB->phpBB['db_installed_config']) && (isset($phpBB->phpBB['files_installed']) && $phpBB->phpBB['files_installed'])  && (PHPBB_LINKS_ENABLED=='true')) { ?>
            <li><?php echo '<a href="' . zen_href_link($phpBB->phpBB['phpbb_url'] . FILENAME_BB_INDEX, '', 'NONSSL', false, '', true) . '" target="_blank">' . BOX_BBINDEX . '</a>'; ?></li>
<?php } ?>

So my workaround was to modify that line of code to read like

<?php if ( (isset($phpBB->phpBB['db_installed_config']) && $phpBB->phpBB['db_installed_config']) && (isset($phpBB->phpBB['files_installed']) && $phpBB->phpBB['files_installed'])  && (PHPBB_LINKS_ENABLED=='true')) { ?>
            <li><?php echo '<a href="http://www.your-site.com/forum/index.php"' . '" target="_blank">' . BOX_BBINDEX . '</a>'; ?></li>
<?php } ?>

it'll be nice to know where it's getting those values from, to fix it properly as it affects 2 pages:
information.php
tpl_site_map_default.php