Copying a plugin

  • Views Views: 7,412
  • Last updated Last updated:
  • Lets say we want to copy the list plug-in 'caneditrow' as a basis for us to start work on a new plug-in, called 'custom_can_edit'.

    First of all copy the folder:
    /plugins/fabrik_list/caneditrow

    and rename it to
    /plugins/fabrik_list/custom_can_edit

    rename caneditrow.php to custom_can_edit.php
    rename caneditrow.xml to custom_can_edit.xml

    edit custom_can_edit.xml file and change the string in:

    XML:

    <name>Can Edit Row</name>
    to

    XML:

    <name>Custom Can Edit Row</name>

    then replace 'canedit' in this line

    XML:

    <filename plugin="caneditrow">caneditrow.php</filename>

    with custom_can_edit:

    XML:

    <filename plugin="custom_can_edit">custom_can_edit.php</filename>

    Rename the class name in custom_can_edit.php

    Class PlgFabrik_ListCanEditRow Extends PlgFabrik_List

    to

    Class PlgFabrik_ListCustom_Can_Edit Extends PlgFabrik_List

    Rename the language files in the respective language folder(s)

    en-GB.plg_fabrik_list_caneditrow.ini
    en-GB.plg_fabrik_list_caneditrow.sys.ini

    to

    en-GB.plg_fabrik_list_custom_can_edit.ini
    en-GB.plg_fabrik_list_custom_can_edit.sys.ini
Back
Top