3 Replies Latest reply on Feb 1, 2008 1:24 PM by Günter Schenk

    ADDT Understanding the code !?

      Hi,

      Do any one know a tutorial that explains the code generated by Developer Toolbox in dreamweaver CS3?

      I could not able to find any documentation about the tng and KT classes and its api. I think this may be very useful in-order to hand code some additional tasks and features over the website that is created by dreamweaver.

      For example, in the insert form wizard, I tried to find any method of the insert object that may return the last_insert_id() to be added as a parameter to the after insert page, but I couldn't find any thing.

      Best Regards,
      Said Bakr
        • 1. Re: ADDT Understanding the code !?
          Günter Schenk Level 4
          Hi Said,

          ADDT predecessor version "MX Kollection" has an API documentation here:

          http://www.interaktonline.com/Documentation/TransactionEngine/index.html

          It should apply to ADDT as well, as the internal structure didn´t change

          ----
          last_insert_id()
          ----

          Regardless if it´s an Insert or Update Transaction, you can always use the "Dynamic Data" placeholder that´s representing the respective table´s Primary Key, e.g. {id} -- if it´s an Insert Record transaction, this value will pass along the last_insert_id()

          Cheers,
          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: ADDT Understanding the code !?
            Level 1
            Well,

            Suppose this line of code:
            $ins_books->registerTrigger("END", "Trigger_Default_Redirect", 99, "books.php?MSG=insertDone&Id="{id});

            This is always return nothing in the redirection URL of the Id value .i.e books.php?MSG=insertDone&Id=

            I think, a custom Trigger should be regsitered before Trigger_Default_Redirect but I don't know how to implement it and then to insert its value to Trigger_Default_Redirect as value of the URL parameter Id .
            • 3. Re: ADDT Understanding the code !?
              Günter Schenk Level 4
              To my understanding a Custom Trigger embeds all variables etc within one function, and this means any variable that´s going to be used outside this function would have be declared as "global", e.g:

              global $variable_name;

              ...in order to be reused outside that function

              Cheers,
              Günter Schenk
              Adobe Community Expert, Dreamweaver