Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

How many developers use Dreamweaver?


Recommended Posts

Since I do a little dabbling with osC development I found it easy to create a script that captures all the functions used by osCommerce and added them to the Dreamweaver code hint library. If you look in the Macromedia folder you'll find this file: Configuration\CodeHints\CodeHints.xml


Now, that is just a plain XML file that contains all the code hints that is used by Dreamweaver. To add the osC functions all that needs to be done is put them in with proper form.


So, as a fast example this needs to be put in for "tep_db_query" to have it come up as a code hint:

  <function pattern="tep_db_query(string query, link link)" doctypes="PHP_MySQL" caseSensitive="true" />

 <menu pattern="tep_" DOCTYPES="PHP_MySQL">
	 <menuitem label="tep_db_query" value ="db_query(" icon="shared/mm/images/hintMisc.gif" />

Now, whenever you start typing "tep_" the menu list comes up with tep_db_query. This can be expanded to include all 113 functions defined by osC (not including class methods). Although, it is limited to the normal functions it can be expanded to include all the classes pretty easy.


Here is the script I used to capture the functions (rather than hand coding them):

$arr = get_defined_functions();
$f = array();
foreach ($arr['user'] as $index => $function) {
if (substr($function, 0, 4) == 'tep_'){
 $f[] = $function;
$temp = array();
while (list($key, $val) = each($f)) {
  $temp[$val] = $key;
$_SESSION['functions'] = array_merge($_SESSION['functions'], $temp);

Then I just surfed the site for a few pages. Once I had them all in session it was easy to pull them out and create the XML entries :)


Does anyone want a copy and install directions for the osC API code hints?

Link to comment
Share on other sites

This sounds like an excellent iniative. :thumbsup:


I was just thinking the other day, wouldn't it be handy to have a cheatsheet for the parameters of the most used osC functions, without having to dive into the functions directory to figure it out each time.


While you are at it, could you also make a file for UltraEdit :-"


I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!


Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

  • 3 years later...


This topic is now archived and is closed to further replies.

  • Create New...