[Discontinued] Company Enhancements MOD
Just to let you know: in the new release there is a folder called _MACOSX??? but now the mod seems to work...
but it is a little wierd it only works if I copy lang_inc into the folder inc_module - now I have:
inc_module/mod_company
inc_module/inc_lang/backend/de
inc_module/inc_lang/backend/da
inc_module/inc_lang/backend/en
etc....
but it is a little wierd it only works if I copy lang_inc into the folder inc_module - now I have:
inc_module/mod_company
inc_module/inc_lang/backend/de
inc_module/inc_lang/backend/da
inc_module/inc_lang/backend/en
etc....
http://www.studmed.dk Portal for doctors and medical students in Denmark
It let my update global settings value like Currency symbol, but I can´t add a new product!!
http://www.studmed.dk Portal for doctors and medical students in Denmark
Hi frold,
# Delete the inc_lang-Folder in the inc_module-Folder. You schould only have:
inc_module/inc_company/....
and nothing else in the inc_module (except of you have other MODs installed.).
# I am sorry for the _MACOSX-Folder, but I can't change this as I am at home and there working on my Mac. This is a hidden Folder that I can't delete, afaik.
# Products: EDIT: I understood sth wrong. I will write sth to this soon.
I think, this are the "baby sicknesses" of this MOD, I think, as you seem the first one to test it, except me. I hope you are not too mad at me, now...
# Delete the inc_lang-Folder in the inc_module-Folder. You schould only have:
inc_module/inc_company/....
and nothing else in the inc_module (except of you have other MODs installed.).
# I am sorry for the _MACOSX-Folder, but I can't change this as I am at home and there working on my Mac. This is a hidden Folder that I can't delete, afaik.
# Products: EDIT: I understood sth wrong. I will write sth to this soon.
I think, this are the "baby sicknesses" of this MOD, I think, as you seem the first one to test it, except me. I hope you are not too mad at me, now...
Hey
First I have to say - Im not mad .....!!!
First I have to say - Im not mad .....!!!
If I do that the mod doesn´t work...# Delete the inc_lang-Folder in the inc_module-Folder
It is not a prob for me - it was just to let you know# I am sorry for the _MACOSX-Folder, but I can't change this as I am at home and there working on my Mac. This is a hidden Folder that I can't delete, afaik.
Maybe I was unclear... The only thing I can update is the values in global settings but I can´t add new products thats is the problem# Is only the currency value not updatable or every value on the global settings page? Is there an error message? If not, please change the following:
http://www.studmed.dk Portal for doctors and medical students in Denmark
Frold, please perform the following SQL-Statement:
And please don't beat me!
Code: Select all
ALTER TABLE `phpwcms_products` CHANGE `contact_person` `contact_name` VARCHAR( 50 ) NOT NULL
*lol* I know, you are not MAD, but mad at ME, that means that you are not too angry with me.frold wrote:Hey
First I have to say - Im not mad .....!!!
Are you sure? I have not made update instructions yesterday night, this is my fault. Please do the following:frold wrote:If I do that the mod doesn´t work...# Delete the inc_lang-Folder in the inc_module-Folder
Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
phpwcms.php
#
#-----[ FIND ]------------------------------------------
#
require_once ('./include/inc_module/inc_lang/backend/'.$_SESSION["wcs_user_lang"].'/lang.inc.php');
#
#-----[ REPLACE WITH ]------------------------------------------
#
require_once ('./include/inc_module/mod_company/inc_lang/backend/'.$_SESSION["wcs_user_lang"].'/lang.inc.php');
Yes, I have seen myself that I haven't understood it correctly, it was not your fault, just my stupidity. I have edited my post at once, but you have been quicker.frold wrote:Maybe I was unclear... The only thing I can update is the values in global settings but I can´t add new products thats is the problem# Is only the currency value not updatable or every value on the global settings page? Is there an error message? If not, please change the following:
Baby illnesses, yeah?
now I can add products 
The lang poblem work when I changed in phpwcms.php
to:

The lang poblem work when I changed in phpwcms.php
Code: Select all
require_once ('./include/inc_module/inc_lang/backend/'.$_SESSION["wcs_user_lang"].'/lang.inc.php');
Code: Select all
require_once ('./include/inc_module/mod_company/inc_lang/backend/'.$_SESSION["wcs_user_lang"].'/lang.inc.php');
Last edited by frold on Sun 4. Apr 2004, 13:26, edited 1 time in total.
http://www.studmed.dk Portal for doctors and medical students in Denmark
I have made a small addon to this great mod...
Now you can use the html edior defined in your conf.inc.php:

This step is not necessary:
Open mod_company\inc_lang\backend\xx\lang.inc
Find:
Replace with:
save/close/upload
To let it work:
Open mod_company\inc_tmpl\product.update.tmpl.php
Find:
replace with:
save/close/upload
that´s it hope you like it
Now you can use the html edior defined in your conf.inc.php:
It should work with them all (there is a error in htmlarea in the newest release)- so now you can add images it in the description of the product....$phpwcms["wysiwyg_editor"] = 3; //0 = no wysiwyg editor, 1 = HTMLarea, 2 = FCKeditor, 3 = browser based

This step is not necessary:
Open mod_company\inc_lang\backend\xx\lang.inc
Find:
Code: Select all
$BL['be_cm_product_sysreq'] = 'System requirements';
Code: Select all
$BL['be_cm_product_sysreq'] = 'Product details';
To let it work:
Open mod_company\inc_tmpl\product.update.tmpl.php
Find:
Code: Select all
<textarea name="system_req" rows="10" class="f11" id="system_req" style="width: 350px"><?php echo html_specialchars($system_req) ?></textarea>
Code: Select all
<?php
switch($_SESSION["wysiwyg_editor"]) {
//load htmlarea
case 1: echo "<style type=\"text/css\">\n<!--\n@import url(include/inc_ext/htmlarea/htmlarea.css);\n//-->\n</style>";
echo "<script language=\"Javascript\" type=\"text/javascript\">\n<!--\n_editor_url = \"include/inc_ext/htmlarea/\";\n";
echo "_editor_lang = \"".htmlarea_lang('en')."\";\n//-->\n</script>";
echo "<script language=\"Javascript\" type=\"text/javascript\" src=\"include/inc_ext/htmlarea/htmlarea.js\"></script>";
echo "<script language=\"Javascript\" type=\"text/javascript\" src=\"include/inc_lib/htmlarea.editor.inc.php\"></script>";
echo "<table width=\"536\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"#E7E8EB\">\n";
echo "<tr><td><textarea name=\"system_req\" rows=\"30\" wrap=\"VIRTUAL\" class=\"f10\" id=\"system_req\" ";
echo "style=\"height: 550px; width: 532px; background-color: #ffffff;\">".html_specialchars($system_req);
echo "</textarea></td></tr>\n</table>";
echo "<script language=\"JavaScript\" type=\"text/javascript\">\n<!--\ninitEditor('system_req','532px','550px');\n//-->\n</script>";
break;
//load FCKeditor
case 2: include(PHPWCMS_ROOT."/include/inc_lib/fckeditor.editor.inc.php") ;
$oFCKeditor = new FCKeditor ;
$oFCKeditor->ToolbarSet = 'phpwcms' ;
$oFCKeditor->Value = $system_req ;
$oFCKeditor->CreateFCKeditor( 'system_req', '438', '500' ) ;
break;
//load spaw editor
case 4: include(PHPWCMS_ROOT."/include/inc_ext/spaw/spaw_control.class.php") ;
$sw = new SPAW_Wysiwyg( 'system_req',
$system_req,
$_SESSION["wcs_user_lang"],
'full',
'default',
'536px',
'600px'
);
$sw->show();
break;
default: echo "<textarea name=\"system_req\" rows=\"20\" wrap=\"VIRTUAL\" class=\"f11\" id=\"system_req\" ";
echo "style=\"width: 536px; background-color: #ffffff;\">".html_specialchars($system_req)."</textarea>";
}
?>
that´s it hope you like it

Last edited by frold on Sun 4. Apr 2004, 15:07, edited 1 time in total.
http://www.studmed.dk Portal for doctors and medical students in Denmark
Company MOD 1.0.3 released
(This has not yet included the enhancement of frold)
This release has just one fix: I have replaced a function that is not supported by many PHP-systems because one special library is not installed. If you don't want to re-download the complete package (as already more than 60KB), please follow the following instructions:
(This has not yet included the enhancement of frold)
This release has just one fix: I have replaced a function that is not supported by many PHP-systems because one special library is not installed. If you don't want to re-download the complete package (as already more than 60KB), please follow the following instructions:
Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
mod_company/inc_tmpl/products.releases.list.tmpl.php
#
#-----[ FIND ]------------------------------------------
#
if (mb_strlen($release_shortdesc) >= 120)
#
#-----[ REPLACE WITH ]------------------------------------------
#
if (strlen($release_shortdesc) >= 120)
to let my new "mod" work with htmlarea plz download and install the new patch for phpwcms http://www.phpwcms.de/index.php?download
I have also updated the install instructions above
I have also updated the install instructions above
http://www.studmed.dk Portal for doctors and medical students in Denmark
Just a small bug report
Hi Jerome!
Awasome work you've done!
There was a little bug in products.functions.inc.php on line 10 which I found, because I'm using prefix in my table-names.
Should be
Awasome work you've done!

There was a little bug in products.functions.inc.php on line 10 which I found, because I'm using prefix in my table-names.
Code: Select all
$query = "SELECT * FROM phpwcms_products ORDER BY prod_id";
Code: Select all
$query = "SELECT * FROM ".DB_PREPEND."phpwcms_products ORDER BY prod_id";
hey good work marko, thanks to you from our side.
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------