Guest Posted April 28, 2004 Share Posted April 28, 2004 I want to turn Information Unlimited into a more general menu/navigation structure. In particular, I want to add menu elements within information boxes that simply point to a URL of my choosing such as "index.php" rather than to an information page like "information.php?info_id=5" I have made 2 small modifications and have now got the display of these new menu elements to work. However, I do not have the skill to modify the admin pages to complete the modification. Can anyone help? Basically, I use the varialble visible to decide whether the menu item is a normal info page (when =1) or is a link only (when =2). When visible is set to 2, then the URL the menu item points to is the value of 'description'. To use this, I manually edit the database and set visible=2 and simply enter the URL in the description field. MODIFICATIONS (based on Info Unlimited 1.1g): 1. In the database, TABLE information contains filed "visible" which is set to type ENUM with list values: '0','1'. I have added '2' to the ENUM list. 2. In catalog/includes/boxes/information.php: Modify $sql=mysql_query('SELECT information_id, languages_id, info_title FROM ' . TABLE_INFORMATION .' WHERE visible=\'1\' and languages_id ='.$languages_id.' ORDER BY v_order') or die(mysql_error()); while($row=mysql_fetch_array($sql)): $filename_information = tep_href_link(FILENAME_INFORMATION) . (stristr(tep_href_link(FILENAME_INFORMATION), '?')?'&':'?') . 'info_id=' . $row['information_id']; $informationString .= '<a href="' . $filename_information . '">' . $row['info_title'] . '</a><br>'; endwhile; to $sql=mysql_query('SELECT information_id, languages_id, info_title , description, visible FROM ' . TABLE_INFORMATION .' WHERE languages_id ='.$languages_id.' ORDER BY v_order') or die(mysql_error()); while($row=mysql_fetch_array($sql)): switch ($row['visible']){ case '0': // Not visible break; case '1': // For normal information pages $filename_information = tep_href_link(FILENAME_INFORMATION) . (stristr(tep_href_link(FILENAME_INFORMATION), '?')?'&':'?') . 'info_id=' . $row['information_id']; $informationString .= '<a href="' . $filename_information . '">' . $row['info_title'] . '</a><br>'; break; case '2': // For URL only links $filename_information = tep_href_link($row['description']); $informationString .= '<a href="' . $filename_information . '">' . $row['info_title'] . '</a><br>'; break; } endwhile; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.