Jump to content
chooch

Information Pages Unlimited v1.0

Recommended Posts

Hi all,

 

i'm just installing and ive got the part that says:

 

9. WYSIWYG Implementation (If you hace CKEditor installed, this part is not necessary)

 

find in /catalog/admin/htmloutput.php

 

so when i go to catalog/admin/ ---- there is no htmloutput.php

 

what should i do?

 

thanks

zac

Edited by zac123

Share this post


Link to post
Share on other sites

thanks for the pointer. Ive finished the install but i get an error when i try to access my admin.

 

PHP Fatal error:  Cannot redeclare tep_draw_fckeditor() (previously declared in E:\Domains\wwwroot\admin\includes\functions\html_output.php:272) in E:\Domains\wwwroot\admin\includes\functions\html_output.php on line 367

 

 

whats all that about? html_output.php doesnt eveon go up to line 367 ??

 

this is my entire html_output.php file. can anyone spot anything majorly wrong?

 

if someone could post thier file and i'll do a compare i'd be really grateful. thanks, zac

 

<?php
/*
 $Id: html_output.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2007 osCommerce

 Released under the GNU General Public License
*/

////
// The HTML href link wrapper function
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
   global $request_type, $session_started, $SID;

   if (!tep_not_null($page)) {
     die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');
   }

   if ($connection == 'NONSSL') {
     $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
   } elseif ($connection == 'SSL') {
     if (ENABLE_SSL == true) {
       $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
     } else {
       $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
     }
   } else {
     die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');
   }

   if (tep_not_null($parameters)) {
     $link .= $page . '?' . tep_output_string($parameters);
     $separator = '&';
   } else {
     $link .= $page;
     $separator = '?';
   }

   while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
   if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
     if (tep_not_null($SID)) {
       $_sid = $SID;
     } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
       if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
         $_sid = tep_session_name() . '=' . tep_session_id();
       }
     }
   }

   if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
     while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

     $link = str_replace('?', '/', $link);
     $link = str_replace('&', '/', $link);
     $link = str_replace('=', '/', $link);

     $separator = '?';
   }

   if (isset($_sid)) {
     $link .= $separator . tep_output_string($_sid);
   }

   return $link;
 }

////
// The HTML image wrapper function
 function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
   if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
     return false;
   }

// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
   $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

   if (tep_not_null($alt)) {
     $image .= ' title=" ' . tep_output_string($alt) . ' "';
   }

   if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
     if ($image_size = @getimagesize($src)) {
       if (empty($width) && tep_not_null($height)) {
         $ratio = $height / $image_size[1];
         $width = intval($image_size[0] * $ratio);
       } elseif (tep_not_null($width) && empty($height)) {
         $ratio = $width / $image_size[0];
         $height = intval($image_size[1] * $ratio);
       } elseif (empty($width) && empty($height)) {
         $width = $image_size[0];
         $height = $image_size[1];
       }
     } elseif (IMAGE_REQUIRED == 'false') {
       return false;
     }
   }

   if (tep_not_null($width) && tep_not_null($height)) {
     $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
   }

   if (tep_not_null($parameters)) $image .= ' ' . $parameters;

   $image .= '>';

   return $image;
 }

////
// The HTML form submit button wrapper function
// Outputs a button in the selected language
 function tep_image_submit($image, $alt = '', $parameters = '') {
   global $language;

   $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

   if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

   if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

   $image_submit .= '>';

   return $image_submit;
 }

////
// Output a function button in the selected language
 function tep_image_button($image, $alt = '', $parameters = '') {
   global $language;

   return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters);
 }

////
// Output a separator either through whitespace, or with an image
 function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') {
   return tep_image(DIR_WS_IMAGES . $image, '', $width, $height);
 }

////
// Output a form
 function tep_draw_form($name, $action, $method = 'post', $parameters = '') {
   $form = '<form name="' . tep_output_string($name) . '" action="' . tep_output_string($action) . '" method="' . tep_output_string($method) . '"';

   if (tep_not_null($parameters)) $form .= ' ' . $parameters;

   $form .= '>';

   return $form;
 }

////
// Output a form input field
 function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

   if ( ($reinsert_value == true) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
     if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
       $value = stripslashes($HTTP_GET_VARS[$name]);
     } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
       $value = stripslashes($HTTP_POST_VARS[$name]);
     }
   }

   if (tep_not_null($value)) {
     $field .= ' value="' . tep_output_string($value) . '"';
   }

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   return $field;
 }

////
// Output a form password field
 function tep_draw_password_field($name, $value = '', $parameters = 'maxlength="40"') {
   return tep_draw_input_field($name, $value, $parameters, 'password', false);
 }

////
// Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
 function tep_draw_selection_field($name, $type, $value = '', $checked = false, $parameters = '') {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

   if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"';

   if ( ($checked == true) || (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name]) && (($HTTP_GET_VARS[$name] == 'on') || (stripslashes($HTTP_GET_VARS[$name]) == $value))) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name]) && (($HTTP_POST_VARS[$name] == 'on') || (stripslashes($HTTP_POST_VARS[$name]) == $value))) ) {
     $selection .= ' CHECKED';
   }

   if (tep_not_null($parameters)) $selection .= ' ' . $parameters;

   $selection .= '>';

   return $selection;
 }

////
// Output a form checkbox field
 function tep_draw_checkbox_field($name, $value = '', $checked = false, $parameters = '') {
   return tep_draw_selection_field($name, 'checkbox', $value, $checked, $parameters);
 }

////
// Output a form radio field
 function tep_draw_radio_field($name, $value = '', $checked = false, $parameters = '') {
   return tep_draw_selection_field($name, 'radio', $value, $checked, $parameters);
 }

////
// Output a form textarea field
 function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   if ( ($reinsert_value == true) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
     if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
       $field .= tep_output_string_protected(stripslashes($HTTP_GET_VARS[$name]));
     } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
       $field .= tep_output_string_protected(stripslashes($HTTP_POST_VARS[$name]));
     }
   } elseif (tep_not_null($text)) {
     $field .= tep_output_string_protected($text);
   }

   $field .= '</textarea>';

   return $field;
 }

////
// Output a form hidden field
 function tep_draw_hidden_field($name, $value = '', $parameters = '') {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<input type="hidden" name="' . tep_output_string($name) . '"';

   if (tep_not_null($value)) {
     $field .= ' value="' . tep_output_string($value) . '"';
   } elseif ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) {
     if ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) ) {
       $field .= ' value="' . tep_output_string(stripslashes($HTTP_GET_VARS[$name])) . '"';
     } elseif ( (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) {
       $field .= ' value="' . tep_output_string(stripslashes($HTTP_POST_VARS[$name])) . '"';
     }
   }

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   return $field;
 }

////
// Hide form elements
 function tep_hide_session_id() {
   global $session_started, $SID;

   if (($session_started == true) && tep_not_null($SID)) {
     return tep_draw_hidden_field(tep_session_name(), tep_session_id());
   }
 }

////
// Output a form pull down menu
 function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<select name="' . tep_output_string($name) . '"';

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   if (empty($default) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
     if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
       $default = stripslashes($HTTP_GET_VARS[$name]);
     } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
       $default = stripslashes($HTTP_POST_VARS[$name]);
     }
   }

   for ($i=0, $n=sizeof($values); $i<$n; $i++) {
     $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
     if ($default == $values[$i]['id']) {
       $field .= ' SELECTED';
     }

     $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
   }
   $field .= '</select>';

   if ($required == true) $field .= TEXT_FIELD_REQUIRED;

   return $field;
 }

////
// Creates a pull-down list of countries
 function tep_get_country_list($name, $selected = '', $parameters = '') {
   $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
   $countries = tep_get_countries();

   for ($i=0, $n=sizeof($countries); $i<$n; $i++) {
     $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);
   }

   return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters);
 }
?>

Share this post


Link to post
Share on other sites

thanks for the pointer. Ive finished the install but i get an error when i try to access my admin.

 

PHP Fatal error:  Cannot redeclare tep_draw_fckeditor() (previously declared in E:\Domains\wwwroot\admin\includes\functions\html_output.php:272) in E:\Domains\wwwroot\admin\includes\functions\html_output.php on line 367

 

 

whats all that about? html_output.php doesnt eveon go up to line 367 ??

 

this is my entire html_output.php file. can anyone spot anything majorly wrong?

 

if someone could post thier file and i'll do a compare i'd be really grateful. thanks, zac

 

<?php
/*
 $Id: html_output.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2007 osCommerce

 Released under the GNU General Public License
*/

////
// The HTML href link wrapper function
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
   global $request_type, $session_started, $SID;

   if (!tep_not_null($page)) {
     die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');
   }

   if ($connection == 'NONSSL') {
     $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
   } elseif ($connection == 'SSL') {
     if (ENABLE_SSL == true) {
       $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
     } else {
       $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
     }
   } else {
     die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');
   }

   if (tep_not_null($parameters)) {
     $link .= $page . '?' . tep_output_string($parameters);
     $separator = '&';
   } else {
     $link .= $page;
     $separator = '?';
   }

   while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
   if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
     if (tep_not_null($SID)) {
       $_sid = $SID;
     } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
       if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
         $_sid = tep_session_name() . '=' . tep_session_id();
       }
     }
   }

   if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
     while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

     $link = str_replace('?', '/', $link);
     $link = str_replace('&', '/', $link);
     $link = str_replace('=', '/', $link);

     $separator = '?';
   }

   if (isset($_sid)) {
     $link .= $separator . tep_output_string($_sid);
   }

   return $link;
 }

////
// The HTML image wrapper function
 function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
   if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
     return false;
   }

// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
   $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

   if (tep_not_null($alt)) {
     $image .= ' title=" ' . tep_output_string($alt) . ' "';
   }

   if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
     if ($image_size = @getimagesize($src)) {
       if (empty($width) && tep_not_null($height)) {
         $ratio = $height / $image_size[1];
         $width = intval($image_size[0] * $ratio);
       } elseif (tep_not_null($width) && empty($height)) {
         $ratio = $width / $image_size[0];
         $height = intval($image_size[1] * $ratio);
       } elseif (empty($width) && empty($height)) {
         $width = $image_size[0];
         $height = $image_size[1];
       }
     } elseif (IMAGE_REQUIRED == 'false') {
       return false;
     }
   }

   if (tep_not_null($width) && tep_not_null($height)) {
     $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
   }

   if (tep_not_null($parameters)) $image .= ' ' . $parameters;

   $image .= '>';

   return $image;
 }

////
// The HTML form submit button wrapper function
// Outputs a button in the selected language
 function tep_image_submit($image, $alt = '', $parameters = '') {
   global $language;

   $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

   if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

   if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

   $image_submit .= '>';

   return $image_submit;
 }

////
// Output a function button in the selected language
 function tep_image_button($image, $alt = '', $parameters = '') {
   global $language;

   return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters);
 }

////
// Output a separator either through whitespace, or with an image
 function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') {
   return tep_image(DIR_WS_IMAGES . $image, '', $width, $height);
 }

////
// Output a form
 function tep_draw_form($name, $action, $method = 'post', $parameters = '') {
   $form = '<form name="' . tep_output_string($name) . '" action="' . tep_output_string($action) . '" method="' . tep_output_string($method) . '"';

   if (tep_not_null($parameters)) $form .= ' ' . $parameters;

   $form .= '>';

   return $form;
 }

////
// Output a form input field
 function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

   if ( ($reinsert_value == true) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
     if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
       $value = stripslashes($HTTP_GET_VARS[$name]);
     } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
       $value = stripslashes($HTTP_POST_VARS[$name]);
     }
   }

   if (tep_not_null($value)) {
     $field .= ' value="' . tep_output_string($value) . '"';
   }

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   return $field;
 }

////
// Output a form password field
 function tep_draw_password_field($name, $value = '', $parameters = 'maxlength="40"') {
   return tep_draw_input_field($name, $value, $parameters, 'password', false);
 }

////
// Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
 function tep_draw_selection_field($name, $type, $value = '', $checked = false, $parameters = '') {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

   if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"';

   if ( ($checked == true) || (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name]) && (($HTTP_GET_VARS[$name] == 'on') || (stripslashes($HTTP_GET_VARS[$name]) == $value))) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name]) && (($HTTP_POST_VARS[$name] == 'on') || (stripslashes($HTTP_POST_VARS[$name]) == $value))) ) {
     $selection .= ' CHECKED';
   }

   if (tep_not_null($parameters)) $selection .= ' ' . $parameters;

   $selection .= '>';

   return $selection;
 }

////
// Output a form checkbox field
 function tep_draw_checkbox_field($name, $value = '', $checked = false, $parameters = '') {
   return tep_draw_selection_field($name, 'checkbox', $value, $checked, $parameters);
 }

////
// Output a form radio field
 function tep_draw_radio_field($name, $value = '', $checked = false, $parameters = '') {
   return tep_draw_selection_field($name, 'radio', $value, $checked, $parameters);
 }

////
// Output a form textarea field
 function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   if ( ($reinsert_value == true) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
     if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
       $field .= tep_output_string_protected(stripslashes($HTTP_GET_VARS[$name]));
     } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
       $field .= tep_output_string_protected(stripslashes($HTTP_POST_VARS[$name]));
     }
   } elseif (tep_not_null($text)) {
     $field .= tep_output_string_protected($text);
   }

   $field .= '</textarea>';

   return $field;
 }

////
// Output a form hidden field
 function tep_draw_hidden_field($name, $value = '', $parameters = '') {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<input type="hidden" name="' . tep_output_string($name) . '"';

   if (tep_not_null($value)) {
     $field .= ' value="' . tep_output_string($value) . '"';
   } elseif ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) {
     if ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) ) {
       $field .= ' value="' . tep_output_string(stripslashes($HTTP_GET_VARS[$name])) . '"';
     } elseif ( (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) {
       $field .= ' value="' . tep_output_string(stripslashes($HTTP_POST_VARS[$name])) . '"';
     }
   }

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   return $field;
 }

////
// Hide form elements
 function tep_hide_session_id() {
   global $session_started, $SID;

   if (($session_started == true) && tep_not_null($SID)) {
     return tep_draw_hidden_field(tep_session_name(), tep_session_id());
   }
 }

////
// Output a form pull down menu
 function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
   global $HTTP_GET_VARS, $HTTP_POST_VARS;

   $field = '<select name="' . tep_output_string($name) . '"';

   if (tep_not_null($parameters)) $field .= ' ' . $parameters;

   $field .= '>';

   if (empty($default) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
     if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
       $default = stripslashes($HTTP_GET_VARS[$name]);
     } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
       $default = stripslashes($HTTP_POST_VARS[$name]);
     }
   }

   for ($i=0, $n=sizeof($values); $i<$n; $i++) {
     $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
     if ($default == $values[$i]['id']) {
       $field .= ' SELECTED';
     }

     $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
   }
   $field .= '</select>';

   if ($required == true) $field .= TEXT_FIELD_REQUIRED;

   return $field;
 }

////
// Creates a pull-down list of countries
 function tep_get_country_list($name, $selected = '', $parameters = '') {
   $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
   $countries = tep_get_countries();

   for ($i=0, $n=sizeof($countries); $i<$n; $i++) {
     $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);
   }

   return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters);
 }
?>

Hi

 

I think your looking in the catalog/includes/functions/html_output.php and not catalog/admin/includes/functions/html_output.php

search for tep_draw_fckeditor its saying you have that twice in html_ouput.php remove one of them

 

Steve

Share this post


Link to post
Share on other sites

yep found it thanks for that.

 

i'm starting to feel like one of those people that just posts for help all the time and cant fix anythingn for themselves but now when i try and access the 'info manager' link i get:

 

PHP Warning: require(includes/javascript/tiny_mce/general.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in E:\Domains\wwwroot\admin\information_manager.php on line 203

PHP Warning: require(includes/javascript/tiny_mce/general.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in E:\Domains\wwwroot\admin\information_manager.php on line 203

PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/javascript/tiny_mce/general.php' (include_path='.;C:\PHP5\pear') in E:\Domains\wwwroot\admin\information_manager.php on line 203

 

so i dont need to be a genius to work out that a file is missing from admin/includes/javascript/tiny_mce/general.php but my problem is i dont even have a tiny_mce dir !??

 

i checked the install files and its not in there so perhaps this is something that should have installed when i installed FCK?

 

thanks again

zac

 

 

P.S. this is the section that call the missing dir in the information_manager.php (line 200)

 

?>
<script language="javascript" type="text/javascript" src="includes/javascript/tiny_mce/tiny_mce.js"></script>
<?php 
 require('includes/javascript/tiny_mce/general.php');
// END tinyMCE 
?>

Edited by zac123

Share this post


Link to post
Share on other sites

ok.. well a fix for this is:

 

simply remove:

 

?>
<script language="javascript" type="text/javascript" src="includes/javascript/tiny_mce/tiny_mce.js"></script>
<?php 
 require('includes/javascript/tiny_mce/general.php');
// END tinyMCE 
?>

 

from: admin/information_manager.php

 

Unfortunatly the instructions say:

 

tinyMCE compatibility: (If you hace CKEditor installed, this part is not necessary)

 

in admin/information_manager.phpUnfortunately:

 

***FIND:

</head>

 

***ADD BEFORE:

<?php // START tinyMCE

$mce_str='information_description[' . tep_db_prepare_input($gID) . ']';

 

?>

<script language="javascript" type="text/javascript" src="includes/javascript/tiny_mce/tiny_mce.js"></script>

<?php

require('includes/javascript/tiny_mce/general.php');

// END tinyMCE

?>

 

I dont have 'ckeditor' installed so i didnt ignore this part of the instructions. I think perhaps the instructions SHOULD say:

 

(If you hace FCKEditor installed, this part is not necessary)

 

This might sound like i'm being pedantic but if there is one thing i have learnt from these forums its that you MUST follow the instructions exactly otherwiose peopledint one wondidn'tt support yoI'motherwiseu.

 

Nice addon thanks very much. but the install doc could do with an overhaul.

 

thanks

zac

Edited by zac123

Share this post


Link to post
Share on other sites

Hmm, ok so with a bit more testing i discovered that my FCKeditor is not displaying when i go to create a new 'info page'

 

i felt i needed to run through the install again to make sure i hadnt missed anything....

 

 

and i'm a bit confused. I'm looking at this part of the the install doc again:

 

===============================================================================

tinyMCE compatibility: (If you hace CKEditor installed, this part is not necessary)

 

in admin/information_manager.php:

 

***FIND:

</head>

 

***ADD BEFORE:

<?php // START tinyMCE

$mce_str='information_description[' . tep_db_prepare_input($gID) . ']';

 

?>

<script language="javascript" type="text/javascript" src="includes/javascript/tiny_mce/tiny_mce.js"></script>

<?php

require('includes/javascript/tiny_mce/general.php');

// END tinyMCE

?>

===============================================================================

 

so not only do i not have CKEditor installed but i dont have TinyMCE installed either! Having followed the install doc i DID install FCKEditor and i used an addon to do so; http://addons.oscommerce.com/info/2900, this worked fine, no probs at all.

 

also i notice that my admin/information_manager.php is calling <script type="text/javascript" src="./ckeditor/ckeditor.js"></script> in the <head> section. Ive tried changing that bit to read; fckeditor instead of CKEditor but didnt seem to make any difference.... hmmm....

 

i'll keep digging around but if anyone can spot anything wrong here, please do jump in.

 

thanks

zac

Edited by zac123

Share this post


Link to post
Share on other sites

Try to use the 2.06 version off information pages unlimited, as the latest 2.07 is adapted to ckeditor. 2.06 is for fckeditor.

Share this post


Link to post
Share on other sites

ok so i'm nearly there.... i can now get the FCKEditor to appear but its a little strange...

 

it completly takes over the text box and the only way i can actually see what i'm type is by collapsing the FCK so that it disapears. please see screen shots:

Edited by Mark Evans

Share this post


Link to post
Share on other sites

There is one place where you can set with and hight of fckeditor window size, but i dont recall where. You will have to look aroung or ask google.

Share this post


Link to post
Share on other sites

I really dont know why i'm bothering with this. Its so poorly documented i'll probably find that once i do get it to actauly work its functionality is probably poor as well!

 

I cant get FCKEditor to display at all now.

 

I think i'll just start stripping out the files and restoring my db back to how it was before. :angry:

 

oh well, one out of five addons that isnt any good isnt a bad average.

Share this post


Link to post
Share on other sites

I really dont know why i'm bothering with this. Its so poorly documented i'll probably find that once i do get it to actauly work its functionality is probably poor as well!

 

I cant get FCKEditor to display at all now.

 

I think i'll just start stripping out the files and restoring my db back to how it was before. :angry:

 

oh well, one out of five addons that isnt any good isnt a bad average.

 

If i were you i won't complain about this nice app and i wuold try to fix it. From my poitn of view it's a great piece of software that need some fix here and there. It work great on my site with a few tune i did to fit my project.

 

Cheers everyone


my contribution: Alex's Contributions

Share this post


Link to post
Share on other sites
If i were you i won't complain about this nice app and i wuold try to fix it. From my poitn of view it's a great piece of software that need some fix here and there. It work great on my site with a few tune i did to fit my project.

 

Cheers everyone

 

i'm incredibly grateful for the FREE add-ons that i get from this site. out of the 6 FREE add-ons i currently use i have made 3 donations to the authors. i would have made more donations but the other three did not display a donation button on their web-site.

 

what I’m not grateful for is add-ons that are poorly documented and haven’t been thoroughly tested. if the author cannot be bothered to release a fully working version then they should keep the add-ons to themselves and save us all the trouble.

 

i'm sure this add-on is great - if i had the time available to make it work!

Share this post


Link to post
Share on other sites

Any one who can help me,please!!!!!!!!!!!!!!!!

I have installed the info-unlimited-v2.07,but it does work.I insert two pieces of information into the database throgh http://localhost/admin,but when I open this url "http://localhost/information.php" it shows

 

Sorry. Page Not Found.

 

Then I trace the code and find that codes below of the catalog/information.php was executed

 

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 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);

}

$breadcrumb->add($title, tep_href_link(FILENAME_INFORMATION, 'info_id=' . $_GET['info_id'], 'NONSSL'));

}

 

Could someone tell me how to fix this problem,and any help will be very very very appreciated!

Share this post


Link to post
Share on other sites

Any one who can help me,please!!!!!!!!!!!!!!!!

I have installed the info-unlimited-v2.07,but it does work.I insert two pieces of information into the database throgh http://localhost/admin,but when I open this url "http://localhost/information.php" it shows

 

Sorry. Page Not Found.

 

Then I trace the code and find that codes below of the catalog/information.php was executed

 

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 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);

}

$breadcrumb->add($title, tep_href_link(FILENAME_INFORMATION, 'info_id=' . $_GET['info_id'], 'NONSSL'));

}

 

Could someone tell me how to fix this problem,and any help will be very very very appreciated!

theres no problem, you would need to have something like ?info_id=7 at the end of the url for it to find the page

 

e.g.

http://localhost/information.php?info_id=7

 

within the infomation box, there should be links to the content you created (unless it was the greatings message or homepage)

you click on those links and it finds the pages correctly


App created for phoenix
TinyMCE editor for admin

 

Share this post


Link to post
Share on other sites

theres no problem, you would need to have something like ?info_id=7 at the end of the url for it to find the page

 

e.g.

http://localhost/information.php?info_id=7

 

within the infomation box, there should be links to the content you created (unless it was the greatings message or homepage)

you click on those links and it finds the pages correctly

You give me the push in the right direction,thank you very much! :P

Share this post


Link to post
Share on other sites

Hi there,

 

I have installed information pages last version 207 and it's working, when i click the link of the article entitled puppets www.mysite.com/information.php?info_id=7 i can see the info page regarding puppets info.

 

What doesnt appear is the Puppets article page in the infobox on column left, near contact us or terms.

 

my boxes/information.php code is this:

<?php
/*
 $Id: information.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- information //-->
         <tr>
           <td>
<?php
   // BOF code added Add-on - Information Pages Unlimited
 require_once(DIR_WS_FUNCTIONS . 'information.php');
   // EOF code added Add-on - Information Pages Unlimited  
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
                                        '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
                                        '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
//BOF code news blog  
                                        '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>
                                         <br><a href="' . tep_href_link(FILENAME_NEWS) . '">News</a><br>'.
//EOF code news blog
/***** BOF  code added End Sitemap_SEO *****/
                                         '<a href="' . tep_href_link(FILENAME_SITEMAP_SEO) . '">' . BOX_INFORMATION_SITEMAP_SEO . '</a>');
/***** EOF  code added End Sitemap_SEO *****/			

 new infoBox($info_box_contents);
?>
           </td>
         </tr>
<!-- information_eof //-->

Share this post


Link to post
Share on other sites

theres no problem, you would need to have something like ?info_id=7 at the end of the url for it to find the page

 

e.g.

http://localhost/information.php?info_id=7

 

within the infomation box, there should be links to the content you created (unless it was the greatings message or homepage)

you click on those links and it finds the pages correctly

 

I read carefully all this thread pages, and haven't found the answer to the problem im trying to sort... so can't say i haven't tried... everything runs smoothly and i can create nice info pages, but the problem is that it isn't showing the created content in the information box.

 

If anyone knows to sort this reply is appreciated really

 

Have here nice tools and sorting now thanks

Edited by Mark Evans

Share this post


Link to post
Share on other sites

Hi

I'm having a little problem with editing my information pages using the WYSIWYG editor. I put some code into the box and hit update. I get the message that the changes have been applied successfully but when I refresh my website, the changes have not taken place and when I go back into the editor and check the code, the code in the window is not the same code that I put in. Looks like the editor is changing some code on me. Is this a bug? Or is there something I'm doing wrong? Thanks.

Share this post


Link to post
Share on other sites

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

 

 

 

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

Share this post


Link to post
Share on other sites

Hi,

 

I would like to remove Information Pages Unlimited Contribution.

 

Could someone help me what the syntax I should use in phpadmin to remove the contribution tables?

 

would it be..

 

DROP TABLE IF EXISTS `information`;

DROP TABLE IF EXISTS `information_group`;

 

what about `configuration_group` TABLE and `configuration` TABLE ??? I should also remove some tables there.. right?

 

Could someone please tell me the complete syntax to use?

 

Thank you in advance !

 

Best Regards,

 

Nathali


Best Regards,

Nathali

Share this post


Link to post
Share on other sites

Hi.

I've played around with this great application and managed to accomplish 2 things I've seen people here are asking about, so here it goes:

 

To apply the application to a separate box:

Duplicate the information box, as you would when adding a new box (there are instructions on adding a new box in the docs that come with the original installation of osc) - on the original information box, comment out the added code for info pages unlimited, and in the new information box (make sure you name it something else) comment out the default pages (conditions, shipping, contact etc...)

add your new box to column left or right and voila.

 

as for adding SEO meta tags

Header Tags SEO : http://addons.oscommerce.com/info/5851

has an option for adding Pseudo Pages that works great with info pages unlimited & has very detailed and coherent instructions on how to do it.

 

If anyone has figured out how to make IPU work with more than one box , or how to have pages not show up on a menu but linkable from elsewhere, I would love to know

 

Thanks for a great addon!

Share this post


Link to post
Share on other sites

Hi,

 

I have followed the installation instructions for this (I am assuming correctly!)

 

The Info manager box has appeared in the admin section of my store, but when I create a page with it and click insert, I get the following:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/admtools/public_html/admin/includes/languages/english.php:306) in /home/admtools/public_html/admin/includes/functions/general.php on line 22

 

 

Please advise.

 

Thanks in advance.

Share this post


Link to post
Share on other sites

This seems to be sorted now but although all is ok in admin, nothing appears on the homepage.

 

Please advise.

 

Thanks in advance.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×