[Discontinued] Company Enhancements MOD

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Post Reply
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

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....
http://www.studmed.dk Portal for doctors and medical students in Denmark
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

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
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

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...
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

Hey

First I have to say - Im not mad .....!!!
# Delete the inc_lang-Folder in the inc_module-Folder
If I do that the mod doesn´t work...
# 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.
It is not a prob for me - it was just to let you know
# 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:
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
http://www.studmed.dk Portal for doctors and medical students in Denmark
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

Frold, please perform the following SQL-Statement:

Code: Select all

ALTER TABLE `phpwcms_products` CHANGE `contact_person` `contact_name` VARCHAR( 50 ) NOT NULL
And please don't beat me!
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

frold wrote:Hey

First I have to say - Im not mad .....!!!
*lol* I know, you are not MAD, but mad at ME, that means that you are not too angry with me.
frold wrote:
# Delete the inc_lang-Folder in the inc_module-Folder
If I do that the mod doesn´t work...
Are you sure? I have not made update instructions yesterday night, this is my fault. Please do the following:

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');
frold wrote:
# 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:
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
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.

Baby illnesses, yeah?
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

now I can add products :D


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');
to:

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
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

The menu problem was my fault, too. You have just given me the solution in MSN ;).
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

Company MOD 1.0.2 released

Another bugfix release that fixes the problem that... the MOD didn't work!. ;)

Thanks to frold who was the first to test the MOD and gave me hints and tips to solve the problems.
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

I have made a small addon to this great mod...

Now you can use the html edior defined in your conf.inc.php:
$phpwcms["wysiwyg_editor"] = 3; //0 = no wysiwyg editor, 1 = HTMLarea, 2 = FCKeditor, 3 = browser based
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.... :D

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';
Replace with:

Code: Select all

$BL['be_cm_product_sysreq']						= 'Product details';
save/close/upload

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>
replace with:

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

	}

?>
save/close/upload

that´s it hope you like it :D
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
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

That's a great MOD for the MOD, Frederik! I will include a MOD of your MOD to the MOD which will make of the "great" MOD an even greater MOD :lol:.
Jérôme
Posts: 481
Joined: Tue 16. Mar 2004, 10:33
Location: Cologne, Germany
Contact:

Post by Jérôme »

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:

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)
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

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
http://www.studmed.dk Portal for doctors and medical students in Denmark
Marko
Posts: 65
Joined: Tue 2. Dec 2003, 23:58
Location: Finland

Just a small bug report

Post by Marko »

Hi Jerome!

Awasome work you've done! :D

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";
Should be

Code: Select all

	$query = "SELECT * FROM ".DB_PREPEND."phpwcms_products ORDER BY prod_id";
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

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.
------------------------------------------------
Post Reply