[SUPPORT] HTML Editor and UltraPics by MaxiDVD HTML/UltraPics is supported here.
#1
Posted 10 January 2004 - 03:13 AM
http://www.oscommerc...y/contributions,1689
Version 1.1 will be uploaded shortly.
(This is the prefered version)
Optional:
Use's NETPBM for image manipulation and resizing/resampling when uploading product images.
download: http://www.nieloimage.com/download/
MaxiDVD
#2
Posted 10 January 2004 - 05:46 PM
First of all thanks for this contribution, it works great.
Unfortunately you used an old version of htmlarea that doesn't support opensource and standards aware browsers like mozilla, netscape and opera.
I had some experience with the latest htmlarea and it worked perfecly on IE and Mozilla.
Do you think you could upgrade it ?
As for the image editor, here is a link to the one I'm using on another site, I think it is even better than the one included (and it works with htmlarea 3.0), it features a complete image editor (resize, flip, rotate):
image manager + image editor for htmlarea (by wei): http://www.zhuo.org/htmlarea/?nid=68
htmlarea 3.0: http://www.interacti.../iforum/P15734/
Unfortunately wei's demo is not working at the moment because of a right error on the php files, but if you want to see how it looks like I will set you up a test page in some time.
Hope this helps and thanks again for this great contrib !
#3
Posted 11 January 2004 - 12:04 AM
MaxiDVD, on Jan 10 2004, 03:13 AM, said:
(This is the prefered version)
Now I have installed ver 1.1.... working great...
And in admin I have found:
INFO PAGES UNLIMITED use WYSIWYG HTMLAREA? (enable)
But I can't find links to infopages in admin menus... mabye I have missed something??
/gert
#4
Posted 11 January 2004 - 07:00 AM
I have tried a few times to get HTMLArea 3.0 to work with osCommerce but I kept running into problems with the languages, It works fine if you use 1 language, but if the store use's more then 1 language it becomes unstable - I will eventually get it to work (In time).
The other issues is with the PHP Image uploader, the scripting needs to be heavily modified to function the way the original one does with standard osCommerce images.
Someone else maybe be more knowledgable when it comes to modifying the 3.0 version for image uploading.. (Jyps?)
gab
The actual editor page can be found under
admin -> catalog -> define mainpage
make sure you uploaded the new file:
admin/includes/boxes/catalog.php
Cheers MaxiDVD
#6
Posted 11 January 2004 - 05:59 PM
Quote
admin -> catalog -> define mainpage
make sure you uploaded the new file:
admin/includes/boxes/catalog.php
Edit mainpage works ok, but in admin -> Configuration -> WYSIWYG Editor 1.7 there are a funktion "INFO PAGES UNLIMITED use WYSIWYG HTMLAREA? Use WYSIWYG Area in Information Pages", with tagname "HTMLAREA_WYSIWYG_DISABLE_IPU" but that function dosen't exist in any *.php files??
I believed it's to edit catalog/shipping, conditions, privacy.php files ??
btw,
In catalog/product_info.php I had to change 'enable' to 'Enable' to se the additional images...
if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') { include(DIR_WS_MODULES . 'additional_images.php'); }to
if (ULTIMATE_ADDITIONAL_IMAGES == 'Enable') { include(DIR_WS_MODULES . 'additional_images.php'); }
#7
Posted 15 January 2004 - 12:27 AM
Warning: unlink(c:/program files/apache group/apache/htdocs/catalog/images/): Permission denied in c:\program files\apache group\apache\htdocs\catalog\admin\categories.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at c:\program files\apache group\apache\htdocs\catalog\admin\categories.php:216) in c:\program files\apache group\apache\htdocs\catalog\admin\includes\functions\general.php on line 18
This post has been edited by mrx2: 15 January 2004 - 12:28 AM
#8
Posted 15 January 2004 - 06:44 AM
Thanks for pointing this out (will fix b4 next upload):
Quote
to
CODE
if (ULTIMATE_ADDITIONAL_IMAGES == 'Enable') { include(DIR_WS_MODULES . 'additional_images.php'); }
Quote
I believed it's to edit catalog/shipping, conditions, privacy.php files ??
No I never added it, just set-up admin ready as most ppl do add it later-on
Information Pages Unlimited v1.0
http://www.oscommerc...y/contributions,1026
mrx2
Check that your image directory is CHMOD 777 so the script can access the image and delete them.
azer
Will add screen shot into the next update.
#9
Posted 15 January 2004 - 10:53 AM
But I have a small problem. The HTML Area field will only appear in the email.php and newsletter.php pages of the admin.
We are using IE 6.0 (had to upgrade the machine in order to see the HTML Area field), and added the UltraPics contrib before the WYSIWYG contrib. So what we did was just write over the old (modded) files with your UltraPics + WYSIWYG modded files. This did not break any UltraPics compatibility, but has not been able to display the HTML Area in e.g. /admin/categories.php
Any solution to this?
#10
Posted 15 January 2004 - 01:08 PM
Quote
Yeah too many!,
firstly make sure its been turned on in the admin->configuration->htmlarea ect controls panel.. product descriptions html area=enable
try doing a "view - source" (IE) on a product editing page, and make sure the MaxiDVD HTMLArea code can be seen between the <head> </head> tags and also check for more MaxiDVD HTMLArea code can be seen below the last </form> tag in the source.
if you cant see two sections of MaxiDVD HTMLArea code (top of view source and towards bottom) you will need to check the code on categories.php against the database.
Lee.
#11
Posted 17 January 2004 - 12:33 PM
Quote
Quote
Edit mainpage works ok, but in admin -> Configuration -> WYSIWYG Editor 1.7 there are a funktion "INFO PAGES UNLIMITED use WYSIWYG HTMLAREA? Use WYSIWYG Area in Information Pages", with tagname "HTMLAREA_WYSIWYG_DISABLE_IPU" but that function dosen't exist in any *.php files??
No I never added it, just set-up admin ready as most ppl do add it later-on
Information Pages Unlimited v1.0
http://www.oscommerc...y/contributions,1026
Ok I understand... now I have installed Page unlimited 1.1g
But I don't know how to edit "admin/information_manager.php" to work with htmlarea.. can I have a copy of yours :-)
/gert
#12
Posted 19 January 2004 - 06:44 AM
/admin/information_manager.php
Quote
/*
Module: Information Pages Unlimited
File date: 2003/03/02
Based on the FAQ script of adgrafics
Adjusted by Joeri Stegeman (joeri210 at yahoo.com), The Netherlands
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Released under the GNU General Public License
*/
require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . 'information.php');
function browse_information () {
global $languages_id;
$query="SELECT * FROM " . TABLE_INFORMATION . " WHERE languages_id=$languages_id ORDER BY v_order";
$daftar = mysql_db_query(DB_DATABASE, $query) or die("Information ERROR: ".mysql_error());$c=0;
while ($buffer = mysql_fetch_array($daftar)) {$result[$c]=$buffer;$c++;}
return $result;
}
function read_data ($information_id) {
$result=mysql_fetch_array(mysql_db_query(DB_DATABASE, "SELECT * FROM " . TABLE_INFORMATION . " WHERE information_id=$information_id"));
return $result;
}
$warning=tep_image(DIR_WS_ICONS . 'warning.gif', WARNING_INFORMATION);
function error_message($error) {
global $warning;
switch ($error) {
case "20":return "<tr class=messageStackError><td>$warning ." . ERROR_20_INFORMATION . "</td></tr>";break;
case "80":return "<tr class=messageStackError><td>$warning " . ERROR_80_INFORMATION . "</td></tr>";break;
default:return $error;
}
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="Javascript1.2"><!-- // load htmlarea
//MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.7 <head>
_editor_url = "<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN; ?>htmlarea/"; // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; }
<?php if (HTML_AREA_WYSIWYG_BASIC_PD == 'Basic'){ ?> if (win_ie_ver >= 5.5) {
document.write('<scr' + 'ipt src="' +_editor_url+ 'editor_basic.js"');
document.write(' language="Javascript1.2"></scr' + 'ipt>');
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
<?php } else{ ?> if (win_ie_ver >= 5.5) {
document.write('<scr' + 'ipt src="' +_editor_url+ 'editor_advanced.js"');
document.write(' language="Javascript1.2"></scr' + 'ipt>');
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
<?php }?>
// --></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top">
<table border=0 width="100%">
<tr><td align=right><?php echo $language; ?></td></tr>
<?
switch($adgrafics_information) {
case "Added":
$data=browse_information();
$no=1;
if (sizeof($data) > 0) {while (list($key, $val)=each($data)) {$no++; } } ;
$title="" . ADD_QUEUE_INFORMATION . " #$no";
echo tep_draw_form('',FILENAME_INFORMATION_MANAGER, 'adgrafics_information=AddSure');
include('information_form.php');
break;
case "AddSure":
function add_information ($data) {
global $languages_id;
$query ="INSERT INTO " . TABLE_INFORMATION . " VALUES(null, '$data[visible]', '$data[v_order]', '$data[info_title]', '$data[description]','$languages_id')";
mysql_db_query(DB_DATABASE, $query) or die ("Information ERROR: ".mysql_error());
}
if ($v_order && $info_title && $description) {
if ((INT)$v_order) {
add_information($HTTP_POST_VARS);
$data=browse_information();
$title="" . tep_image(DIR_WS_ICONS . 'confirm_red.gif', CONFIRM_INFORMATION) .SUCCED_INFORMATION . ADD_QUEUE_INFORMATION . " $v_order ";
include('information_list.php');
} else {$error="20";}
} else {$error="80";}
break;
case "Edit":
if ($information_id) {
$edit=read_data($information_id);
$data=browse_information();
$button=array("Update");
$title="" . EDIT_ID_INFORMATION . " $information_id";
//echo form("$PHP_SELF?adgrafics_information=Update", $hidden);
echo tep_draw_form('',FILENAME_INFORMATION_MANAGER, 'adgrafics_information=Update');
echo tep_draw_hidden_field('information_id', "$information_id");
include('information_form.php');
} else {$error="80";}
break;
case "Update":
function update_information ($data) {
mysql_db_query(DB_DATABASE, "UPDATE " . TABLE_INFORMATION . " SET info_title='$data[info_title]', description='$data[description]', visible='$data[visible]', v_order=$data[v_order] WHERE information_id=$data[information_id]") or die ("update_information: ".mysql_error());
}
if ($information_id && $description && $v_order) {
if ((INT)$v_order) {
update_information($HTTP_POST_VARS);
$data=browse_information();
$title="$confirm " . UPDATE_ID_INFORMATION . " $information_id " . SUCCED_INFORMATION . "";
include('information_list.php');
} else {$error="20"; }
} else {$error="80";}
break;
case 'Visible':
function tep_set_information_visible($information_id, $visible) {
if ($visible == '1') {
return tep_db_query("update " . TABLE_INFORMATION . " set visible = '0' where information_id = '" . $information_id . "'");
} else{
return tep_db_query("update " . TABLE_INFORMATION . " set visible = '1' where information_id = '" . $information_id . "'");
}
}
tep_set_information_visible($information_id, $visible);
$data=browse_information();
if ($visible == '1') { $vivod=DEACTIVATION_ID_INFORMATION;
}else{$vivod=ACTIVATION_ID_INFORMATION;}
$title="$confirm $vivod $information_id " . SUCCED_INFORMATION . "";
include('information_list.php');
break;
case "Delete":
if ($information_id) {
$delete=read_data($information_id);
$data=browse_information();
$title="" . DELETE_CONFITMATION_ID_INFORMATION . " $information_id";
echo "<tr class=pageHeading><td>$title </td></tr>";
echo "<tr><td>" . TITLE_INFORMATION . " $delete[info_title]</td></tr><tr><td align=right>";
echo tep_draw_form('',FILENAME_INFORMATION_MANAGER, "adgrafics_information=DelSure&information_id=$val[information_id]");
echo tep_draw_hidden_field('information_id', "$information_id");
echo tep_image_submit('button_delete.gif', IMAGE_DELETE);
echo '<a href="' . tep_href_link(FILENAME_INFORMATION_MANAGER, '', 'NONSSL') . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';
echo "</form></td></tr>";
} else {$error="80";}
break;
case "DelSure":
function delete_information ($information_id) {
mysql_db_query(DB_DATABASE, "DELETE FROM " . TABLE_INFORMATION . " WHERE information_id=$information_id");
}
if ($information_id) {
delete_information($information_id);
$data=browse_information();
$title="$confirm " . DELETED_ID_INFORMATION . " $information_id " . SUCCED_INFORMATION . "";
include('information_list.php');
} else {$error="80";}
break;
default:
$data=browse_information();
$title="" . MANAGER_INFORMATION . "";
include('information_list.php');
}
if ($error) {
$content=error_message($error);
echo $content;
$data=browse_information();
$no=1;
if (sizeof($data) > 0) {while (list($key, $val)=each($data)) {$no++; } } ;
$title="" . ADD_QUEUE_INFORMATION . " $no";
echo tep_draw_form('',FILENAME_INFORMATION_MANAGER, 'adgrafics_information=AddSure');
include('information_form.php');
}
?>
</table>
</td>
<!-- body_text_eof //-->
</tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
/admin/information_form.php
Quote
/*
Module: Information Pages Unlimited
File date: 2003/03/02
Based on the FAQ script of adgrafics
Adjusted by Joeri Stegeman (joeri210 at yahoo.com), The Netherlands
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Released under the GNU General Public License
*/
?>
<tr class=pageHeading><td><?php echo $title ?></td></tr>
<tr class="dataTableRow"><td><font color=red>
<?
echo QUEUE_INFORMATION_LIST;
$data=browse_information();
$no=1;
if (sizeof($data) > 0) {
while (list($key, $val)=each($data)) {
echo "$val[v_order], ";
$no++;
}
}
?>
</font>
</td></tr>
<tr><td>
<table border="0" cellpadding="0" cellspacing="2">
<tr><td><?php echo QUEUE_INFORMATION;?> </td>
<td>
<?php if ($edit[v_order]) {$no=$edit[v_order];}; echo tep_draw_input_field('v_order', "$no", 'size=3 maxlength=4'); ?>
<?php
echo VISIBLE_INFORMATION;
if ($edit[visible]==1) {
echo tep_image(DIR_WS_ICONS . 'icon_status_green.gif', INFORMATION_ID_ACTIVE);
}else{
echo tep_image(DIR_WS_ICONS . 'icon_status_red.gif', INFORMATION_ID_DEACTIVE);
}
?>
<?php if ($edit[visible]) {$checked= "checked";}; echo tep_draw_checkbox_field('visible', '1', "$checked") . VISIBLE_INFORMATION_DO; ?>
</td>
</tr>
<tr><td><?php echo TITLE_INFORMATION;?><br></td>
<td><?php echo tep_draw_input_field('info_title', "$edit[info_title]", 'maxlength=255'); ?></td>
</tr>
<tr><td><?php echo DESCRIPTION_INFORMATION;?><br>
</td>
<td>
<?php echo tep_draw_textarea_field('description', '', '60', '10', "$edit[description]"); ?>
</td>
</tr>
<tr><td></td>
<td align=right>
<?php
echo tep_image_submit('button_insert.gif', IMAGE_INSERT);
echo '<a href="' . tep_href_link(FILENAME_INFORMATION_MANAGER, '', 'NONSSL') . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';
?>
</td>
</tr>
</table>
</form>
</td></tr>
<?php if (HTML_AREA_WYSIWYG_INFORMATION_PAGES == 'Enable') { ?>
<script language="Javascript1.2" defer>
// MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.6.5 Products Description HTML - Body
var config = new Object(); // create new config object
config.width = "<?php echo DEFINE_MAINPAGE_WYSIWYG_WIDTH; ?>px";
config.height = "<?php echo DEFINE_MAINPAGE_WYSIWYG_HEIGHT; ?>px";
config.bodyStyle = 'background-color: <?php echo HTML_AREA_WYSIWYG_BG_COLOUR; ?>; font-family: "<?php echo HTML_AREA_WYSIWYG_FONT_TYPE; ?>"; color: <?php echo HTML_AREA_WYSIWYG_FONT_COLOUR; ?>; font-size: <?php echo HTML_AREA_WYSIWYG_FONT_SIZE; ?>pt;';
config.debug = <?php echo HTML_AREA_WYSIWYG_DEBUG; ?>;
editor_generate('description',config);
<?php } ?>
Thats is, there is only one part of code that I added to each page.. similar rules apply when adding HTMLArea to other contribs..
Cheers Lee
#13
Posted 19 January 2004 - 07:32 PM
Quote
Yeeesssss... I've got it to work...
But it took me some time to find out the missing </script> tag in bottom of /admin/information_form.php :-)
And I changed all "HTML_AREA_WYSIWYG_INFORMATION_PAGES" tags so they matching tags i database..
Thanx / gert
#14
Posted 20 January 2004 - 05:23 PM
In admin/information_manager.php
Change line 57 from
<?php if (HTML_AREA_WYSIWYG_BASIC_PD == 'Basic'){ ?> if (win_ie_ver >= 5.5) {to
<?php if (HTML_AREA_WYSIWYG_BASIC_IPU == 'Basic'){ ?> if (win_ie_ver >= 5.5) {In admin/information_form.php
Change line 69 from
<?php if (HTML_AREA_WYSIWYG_INFORMATION_PAGES == 'Enable') { ?>to
<?php if (HTML_AREA_WYSIWYG_DISABLE_IPU == 'Enable') { ?>change lines 73 and 74 from
config.width = "<?php echo DEFINE_MAINPAGE_WYSIWYG_WIDTH; ?>px"; config.height = "<?php echo DEFINE_MAINPAGE_WYSIWYG_HEIGHT; ?>px";
to
config.width = "<?php echo HTML_AREA_WYSIWYG_WIDTH_IPU; ?>px"; config.height = "<?php echo HTML_AREA_WYSIWYG_HEIGHT_IPU; ?>px";
change line 77
from
editor_generate('description',config);to
editor_generate('description',config);</script>Remember to back up first.
Lee
The site with the NETPM download seems to have been hacked and down
thnx
This post has been edited by hotnuts21: 20 January 2004 - 05:28 PM
beep... beep....My Pager
#15
Posted 23 January 2004 - 09:46 PM
Also do I need to install it to upload pictures, I was trying today and nothing seemed to work for uploading which was a bit weird!
beep... beep....My Pager
#16
Posted 26 January 2004 - 10:37 PM
I've got the WYSIWYG HTMLArea MS2 v1.7 contrib installed, the text areas seems ok, but I'm a bit unsure about the image upload, I had to tweak it so that the oscImageRoot automatically uses SSL if the admin is in a secure area, however this still didn't prevent the warning about insecure items being loaded, anyway, I'm using I.E. 6.0 but when clicking on an image or directory, I keep getting an Access Denied script error:
htmlarea/popups/viewer.php?DPI=96&file=oscommerce.gif
All the files in that directory are world readable/writable?
Is there something else that needs to be configured?
The other thing I noticed was that when uploading a file and resizing it, cleared the image?
Does HTML Editor and UltraPics resolve any of this?
TIA.
#17
Posted 28 January 2004 - 06:30 PM
beep... beep....My Pager
#18
Posted 28 January 2004 - 11:14 PM
Thanks for the contribution, it installs and works awesome. I have just 1 problem tho.... When I try to use it with wysiwyg the wysiwyg does not load up. internet explorer says the following..
Line: 256
Char: 3
Error: document.all(...) is null or not an object
Code:0
URL: https://www.sunncom....dit&information _id=4
#19
Posted 28 January 2004 - 11:18 PM
<?php
/*
Module: Information Pages Unlimited
File date: 2003/03/02
Based on the FAQ script of adgrafics
Adjusted by Joeri Stegeman (joeri210 at yahoo.com), The Netherlands
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Released under the GNU General Public License
*/
require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . 'information.php');
function browse_information () {
global $languages_id;
$query="SELECT * FROM " . TABLE_INFORMATION . " WHERE languages_id=$languages_id ORDER BY v_order";
$daftar = mysql_db_query(DB_DATABASE, $query) or die("Information ERROR: ".mysql_error());$c=0;
while ($buffer = mysql_fetch_array($daftar)) {$result[$c]=$buffer;$c++;}
return $result;
}
function read_data ($information_id) {
$result=mysql_fetch_array(mysql_db_query(DB_DATABASE, "SELECT * FROM " . TABLE_INFORMATION . " WHERE information_id=$information_id"));
return $result;
}
$warning=tep_image(DIR_WS_ICONS . 'warning.gif', WARNING_INFORMATION);
function error_message($error) {
global $warning;
switch ($error) {
case "20":return "<tr class=messageStackError><td>$warning ." . ERROR_20_INFORMATION . "</td></tr>";break;
case "80":return "<tr class=messageStackError><td>$warning " . ERROR_80_INFORMATION . "</td></tr>";break;
default:return $error;
}
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="Javascript1.2"><!-- // load htmlarea
//MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.6.5 Products Description HTML - Head
_editor_url = "<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN; ?>htmlarea/"; // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; }
<?php if (HTML_AREA_WYSIWYG_BASIC_DEFINE == 'Basic'){ ?> if (win_ie_ver >= 5.5) {
document.write('<scr' + 'ipt src="' +_editor_url+ 'editor_basic.js"');
document.write(' language="Javascript1.2"></scr' + 'ipt>');
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
<?php } else{ ?> if (win_ie_ver >= 5.5) {
document.write('<scr' + 'ipt src="' +_editor_url+ 'editor_advanced.js"');
document.write(' language="Javascript1.2"></scr' + 'ipt>');
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
<?php }?>
// --></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top">
<table border=0 width="100%">
<tr><td align=right><?php echo $language; ?></td></tr>
<?
switch($adgrafics_information) {
case "Added":
$data=browse_information();
$no=1;
if (sizeof($data) > 0) {while (list($key, $val)=each($data)) {$no++; } };
$title="" . ADD_QUEUE_INFORMATION . " #$no";
echo tep_draw_form('',FILENAME_INFORMATION_MANAGER, 'adgrafics_information=AddSure');
include('information_form.php');
break;
case "AddSure":
function add_information ($data) {
global $languages_id;
$query ="INSERT INTO " . TABLE_INFORMATION . " VALUES(null, '$data[visible]', '$data[v_order]', '$data[info_title]', '$data[description]','$languages_id')";
mysql_db_query(DB_DATABASE, $query) or die ("Information ERROR: ".mysql_error());
}
if ($v_order && $info_title && $description) {
if ((INT)$v_order) {
add_information($HTTP_POST_VARS);
$data=browse_information();
$title="" . tep_image(DIR_WS_ICONS . 'confirm_red.gif', CONFIRM_INFORMATION) .SUCCED_INFORMATION . ADD_QUEUE_INFORMATION . " $v_order ";
include('information_list.php');
} else {$error="20";}
} else {$error="80";}
break;
case "Edit":
if ($information_id) {
$edit=read_data($information_id);
$data=browse_information();
$button=array("Update");
$title="" . EDIT_ID_INFORMATION . " $information_id";
//echo form("$PHP_SELF?adgrafics_information=Update", $hidden);
echo tep_draw_form('',FILENAME_INFORMATION_MANAGER, 'adgrafics_information=Update');
echo tep_draw_hidden_field('information_id', "$information_id");
include('information_form.php');
} else {$error="80";}
break;
case "Update":
function update_information ($data) {
mysql_db_query(DB_DATABASE, "UPDATE " . TABLE_INFORMATION . " SET info_title='$data[info_title]', description='$data[description]', visible='$data[visible]', v_order=$data[v_order] WHERE information_id=$data[information_id]") or die ("update_information: ".mysql_error());
}
if ($information_id && $description && $v_order) {
if ((INT)$v_order) {
update_information($HTTP_POST_VARS);
$data=browse_information();
$title="$confirm " . UPDATE_ID_INFORMATION . " $information_id " . SUCCED_INFORMATION . "";
include('information_list.php');
} else {$error="20"; }
} else {$error="80";}
break;
case 'Visible':
function tep_set_information_visible($information_id, $visible) {
if ($visible == '1') {
return tep_db_query("update " . TABLE_INFORMATION . " set visible = '0' where information_id = '" . $information_id . "'");
} else{
return tep_db_query("update " . TABLE_INFORMATION . " set visible = '1' where information_id = '" . $information_id . "'");
}
}
tep_set_information_visible($information_id, $visible);
$data=browse_information();
if ($visible == '1') { $vivod=DEACTIVATION_ID_INFORMATION;
}else{$vivod=ACTIVATION_ID_INFORMATION;}
$title="$confirm $vivod $information_id " . SUCCED_INFORMATION . "";
include('information_list.php');
break;
case "Delete":
if ($information_id) {
$delete=read_data($information_id);
$data=browse_information();
$title="" . DELETE_CONFITMATION_ID_INFORMATION . " $information_id";
echo "<tr class=pageHeading><td>$title </td></tr>";
echo "<tr><td>" . TITLE_INFORMATION . " $delete[info_title]</td></tr><tr><td align=right>";
echo tep_draw_form('',FILENAME_INFORMATION_MANAGER, "adgrafics_information=DelSure&information_id=$val[information_id]");
echo tep_draw_hidden_field('information_id', "$information_id");
echo tep_image_submit('button_delete.gif', IMAGE_DELETE);
echo '<a href="' . tep_href_link(FILENAME_INFORMATION_MANAGER, '', 'NONSSL') . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';
echo "</form></td></tr>";
} else {$error="80";}
break;
case "DelSure":
function delete_information ($information_id) {
mysql_db_query(DB_DATABASE, "DELETE FROM " . TABLE_INFORMATION . " WHERE information_id=$information_id");
}
if ($information_id) {
delete_information($information_id);
$data=browse_information();
$title="$confirm " . DELETED_ID_INFORMATION . " $information_id " . SUCCED_INFORMATION . "";
include('information_list.php');
} else {$error="80";}
break;
default:
$data=browse_information();
$title="" . MANAGER_INFORMATION . "";
include('information_list.php');
}
if ($error) {
$content=error_message($error);
echo $content;
$data=browse_information();
$no=1;
if (sizeof($data) > 0) {while (list($key, $val)=each($data)) {$no++; } };
$title="" . ADD_QUEUE_INFORMATION . " $no";
echo tep_draw_form('',FILENAME_INFORMATION_MANAGER, 'adgrafics_information=AddSure');
include('information_form.php');
}
?>
</table>
</td>
<!-- body_text_eof //-->
</tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>is my information_manager.php
<?PHP
/*
Module: Information Pages Unlimited
File date: 2003/03/02
Based on the FAQ script of adgrafics
Adjusted by Joeri Stegeman (joeri210 at yahoo.com), The Netherlands
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Released under the GNU General Public License
*/
?>
<tr class=pageHeading><td><?php echo $title ?></td></tr>
<tr class="dataTableRow"><td><font color=red>
<?
echo QUEUE_INFORMATION_LIST;
$data=browse_information();
$no=1;
if (sizeof($data) > 0) {
while (list($key, $val)=each($data)) {
echo "$val[v_order], ";
$no++;
}
}
?>
</font>
</td></tr>
<tr><td>
<table border="0" cellpadding="0" cellspacing="2">
<tr><td><?php echo QUEUE_INFORMATION;?> </td>
<td>
<?php if ($edit[v_order]) {$no=$edit[v_order];}; echo tep_draw_input_field('v_order', "$no", 'size=3 maxlength=4'); ?>
<?php
echo VISIBLE_INFORMATION;
if ($edit[visible]==1) {
echo tep_image(DIR_WS_ICONS . 'icon_status_green.gif', INFORMATION_ID_ACTIVE);
}else{
echo tep_image(DIR_WS_ICONS . 'icon_status_red.gif', INFORMATION_ID_DEACTIVE);
}
?>
<?php if ($edit[visible]) {$checked= "checked";}; echo tep_draw_checkbox_field('visible', '1', "$checked") . VISIBLE_INFORMATION_DO; ?>
</td>
</tr>
<tr><td><?php echo TITLE_INFORMATION;?><br></td>
<td><?php echo tep_draw_input_field('info_title', "$edit[info_title]", 'maxlength=255'); ?></td>
</tr>
<tr><td><?php echo DESCRIPTION_INFORMATION;?><br>
</td>
<td>
<?php echo tep_draw_textarea_field('description', '', '60', '10', "$edit[description]"); ?>
</td>
</tr>
<tr><td></td>
<td align=right>
<?php
echo tep_image_submit('button_insert.gif', IMAGE_INSERT);
echo '<a href="' . tep_href_link(FILENAME_INFORMATION_MANAGER, '', 'NONSSL') . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';
?>
</td>
</tr>
</table>
</form>
</td></tr>
<?php if (HTML_AREA_WYSIWYG_DISABLE_DEFINE == 'Disable') {} else { ?>
<script language="Javascript1.2" defer>
// MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.6.5 Products Description HTML - Body
var config = new Object(); // create new config object
config.width = "<?php echo DEFINE_MAINPAGE_WYSIWYG_WIDTH; ?>px";
config.height = "<?php echo DEFINE_MAINPAGE_WYSIWYG_HEIGHT; ?>px";
config.bodyStyle = 'background-color: <?php echo HTML_AREA_WYSIWYG_BG_COLOUR; ?>; font-family: "<?php echo HTML_AREA_WYSIWYG_FONT_TYPE; ?>"; color: <?php echo HTML_AREA_WYSIWYG_FONT_COLOUR; ?>; font-size: <?php echo HTML_AREA_WYSIWYG_FONT_SIZE; ?>pt;';
config.debug = <?php echo HTML_AREA_WYSIWYG_DEBUG; ?>;
// More Configs can added here:
// Dreamscape added Dynamic Language Function
editor_generate('file_contents',config);
<?php } ?>
</script>is my information_form.php
Any ideas>?
#20
Posted 29 January 2004 - 07:37 AM
ok i do ahve write permission to the dirtory
but still the 3 images for Products Image Main Image used in catalog & description can not be delete or remove...but the 6 more images below work fine i can remove and delete all the images that the 3 main images above cant..
i try the older vesion then all images can be delete or remove but i got "warning no file uploaded"
also this weird problem say when you select an image for image 1 then go to preview and go back and remove it..then you select image 2 go to preview and the image 1 which you had removed show up again...is there a fix for this..anyone have this problem???

Sign In
Register
Help




MultiQuote