• Resolved chomarac

    (@chomarac)


    Hi,

    I’m currently integrating a blockchain certification in your plugin (free version) but I would like to buy the premium version. I just added my blockchain lines of code where I wanted. When I will go from free to premium, how is the code changing? Do you give new files with a code totally different than the free version? Because I will have to put again my lines of code at the right spot.

    I have another question : is there an after_upload() hook? I can’t find a doc with all available hooks. I already looked on learn.smartypantsplugins.com.

    Thank you in advance !

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author smartypants

    (@smartypants)

    Hello, how are you integrating blockchain? Can you post your code?

    There is an after upload hook in premium

    Thread Starter chomarac

    (@chomarac)

    For now, the document hash is added on the blockchain when the document is uploaded, in “display_sp_client_upload_process()” function. I’m using web3 js library so my code is JavaScript in your php file. Here is the code to add the hash to my smart contract :

    myContractInstance.addNewDocument(‘.$fileNum.’,”‘.$fileHash.'”,”‘.$clientAddr.'”,function (err, res) {
    if(err){
    // display error
    } else {
    // display success
    });

    Then I added a button to sign the document when you’re not an admin. The code is in “view_file()” function. First I check the hash of the document, I check if the document is already signed or not, and then you can sign the doc. I also customized “file_list()” to display in the list if the document is certified or not.

    Do I have a full documentation with the premium plugin?

    Plugin Author smartypants

    (@smartypants)

    Great! You should have what you need with the filters. If you do not want to dig through the code you can submit a ticket and we will let you know the filter names once you purchase a license.

    Thread Starter chomarac

    (@chomarac)

    Ok thanks

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Question before purchase’ is closed to new replies.