Hi all,
It's amazing that people should give more attention, when adding updates to contributions, the minimum that is asked is to read what is written in the contribution thread. If this is not done when a new update to info_pages comes up a problem is sorted, but some already spoted bugs may not be sorted.
How to make this nice contribution to work properly:
1 - go to
addon infos download info-unlimited-v2.07 --- escri version
2 - follow all instructions steps
2.1 - YES YOU SHOULD OPT WITH CKEDITOR it's the most advanced html editor, and it is ultra easy to install, just d/l it from ckeditor website and upload it to your server.
2.2 - if you are going for welcome pages (which i think you should) the sql is ok, bear in mind for n-languages websites you will need to create n x sql_additional (and dont forget your language id)
3 - After you do everything right, and finishing escri version instructions, you will now fix the following bugs:
3.1 BreadCrumbs not showing parent Ids properly
This is not accurate but i have worked it out and this version works to show properly the breadcrumbs:
/// Added for information pages
if(!isset($_GET['info_id']) || !tep_not_null($_GET['info_id']) || !is_numeric($_GET['info_id']) )
{
$title = 'Sorry. Page Not Found.';
$breadcrumb->add($INFO_TITLE, tep_href_link(FILENAME_INFORMATION, 'info_id=' . $_GET['info_id'], 'NONSSL'));
}
else
{
$info_id = intval($_GET['info_id']);
$information_query = tep_db_query("SELECT parent_id, information_title, information_description FROM " . TABLE_INFORMATION . " WHERE visible='1' AND information_id='" . $info_id . "' and language_id='" . (int)$languages_id ."'");
$information = tep_db_fetch_array($information_query);
$title = stripslashes($information['information_title']);
$page_description = stripslashes($information['information_description']);
// Added as noticed by infopages module
if (!preg_match("/([\<])([^\>]{1,})*([\>])/i", $page_description))
{
$page_description = str_replace("\r\n", "<br>\r\n", $page_description);
}
// if assigned to Parent - get parent too :)
$parent = $information['parent_id'];
if ($parent > '0') {
$information_parent_query = tep_db_query("SELECT information_title FROM " . TABLE_INFORMATION . " WHERE information_id='" . $parent . "' and language_id='" . (int)$languages_id ."'");
$information_parent = tep_db_fetch_array($information_parent_query);
$parent_title = stripslashes($information_parent['information_title']);
$breadcrumb->add($parent_title, tep_href_link(FILENAME_INFORMATION, 'info_id=' . $parent, 'NONSSL'));
$breadcrumb->add($title, tep_href_link(FILENAME_INFORMATION, 'info_id=' . $_GET['info_id'], 'NONSSL'));
} else {
$breadcrumb->add($title, tep_href_link(FILENAME_INFORMATION, 'info_id=' . $_GET['info_id'], 'NONSSL'));
}
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
3.2 Another issue to fix has to do with children infopages don't update in information box
Quote
nikita, on 04 October 2007, 12:55, said:
Uhh, sorry, there're another one small bug.
Now to show subcategories open catalog/includes/function/informatio.php find the line instances:
for ( $i = 1; $i < ($count_child+1); $i++ ) {
and replace with this:
for ( $i = 0; $i < ($count_child); $i++ ) {
And now it works for me with subcategories!
3.3 Edit catalog/includes/languages/yourlanguage.php (only if you have welcome pages as info pages) and:
find:
define('TEXT_GREETING_PERSONAL'
define('TEXT_GREETING_PERSONAL_RELOGON',
define('TEXT_GREETING_GUEST',
and replace for:
//define('TEXT_GREETING_PERSONAL'
//define('TEXT_GREETING_PERSONAL_RELOGON',
//define('TEXT_GREETING_GUEST',
4 This sorts it out. Everything works.
CONCLUSION: When adding updates is appreciated to check the forums so nothing is by passed in terms of solutions.
Edited by Francys, 10 July 2010, 01:27.