User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:devel:helperscripts [2015/03/18 00:47]
joebordes [evalwf.php]
en:devel:helperscripts [2019/07/05 16:43] (current)
joebordes [composer2readme and module2wiki]
Line 1: Line 1:
 ====== Helper Scripts ====== ====== Helper Scripts ======
  
-In the **build/​HelperScripts** directory you can find a series of small scripts and tools that are useful to achieve some of those special tasks that help adapt the system to your specific needs. Some of these should be done directly inside the application,​ and hopefully someday they will be, but in the mean time, these are the steps to get it working.+In the **build/​HelperScripts** directory you can find a series of small scripts and tools that are useful to achieve some of those special tasks that help adapt the system to your specific needs. Some of these should be done directly inside the application,​ and hopefullysomeday they will be, but in the meantime, these are the steps to get it working.
  
 ===== addActionLink.php ===== ===== addActionLink.php =====
-This is an example script to show how you can add an action link in the right panel of the detailview ​of an existing module. In this case it is adding an **Add Ticket** action link to the Accounts module.+ 
 +This is an example script to show how you can add an action link in the right panel of the detail view of an existing module. In this caseit is adding an **Add Ticket** action link to the Accounts module. 
 + 
 +<WRAP center round info 60%> 
 +This script is no longer necessary. The Business Actions module permits us to create links of all types directly inside the application with a much more flexible permission system. That said, the script still works but is not the recommended way to create links anymore. 
 +</​WRAP>​ 
  
  
Line 11: Line 17:
  
 ===== addModComments.php ===== ===== addModComments.php =====
 +
 +<WRAP center round info 75%>
 +This is not needed anymore, you can now go to Settings > Module Manager > ModComments > Settings and activate it there.
 +</​WRAP>​
 +
 +
 This script adds the comment functionality to any module. Copy it to the root of your install and execute in the browser with the module name you want to have the feature: This script adds the comment functionality to any module. Copy it to the root of your install and execute in the browser with the module name you want to have the feature:
  
Line 33: Line 45:
 This script is for debugging the workflow process. It executes a given workflow, against a record and gives us the result of the evaluation of the conditions on screen. If the workflow is a scheduled workflow it will show us the full SQL generated. If it is an event based workflow it will tell us if it evaluates to true or false for the record. ​ This script is for debugging the workflow process. It executes a given workflow, against a record and gives us the result of the evaluation of the conditions on screen. If the workflow is a scheduled workflow it will show us the full SQL generated. If it is an event based workflow it will tell us if it evaluates to true or false for the record. ​
  
 +===== runwftask.php =====
 +
 +This helper script is a utility to manually execute one task inside a given workflow against a given entity in the system. We basically use this to debug workflows that fail for some reason and have more than one task. Once you know which task is failing you can concentrate on that one to debug it.
 ===== installmodule.php ===== ===== installmodule.php =====
-This is an example script to show how to install a module from it'​s ​manifest.xml file when all files are already copied into place in the filesytem+This is an example script to show how to install a module from its manifest.xml file when all files are already copied into place in the filesystem
  
  
Line 45: Line 60:
  
 <WRAP center round alert 70%>​Please do not leave this files in the root of your install. Remember to delete the file when you are finished.</​WRAP>​ <WRAP center round alert 70%>​Please do not leave this files in the root of your install. Remember to delete the file when you are finished.</​WRAP>​
 +
 +===== dumpdatabase.php and addAuditModtracker.sql =====
 +
 +The dumpdatabase script will create a MySQL dump of your database leaving out the potentially big tables of audit trail and module tracker. This is very useful when those table get VERY big (as they do on long living installs) both to get a copy of the database to debug some behavior and to make faster backups during the work week leaving a full dump for company low or downtime.
 +
 +The addAuditModtracker.sql script will create the tables so you can use the database.
 +
 +<WRAP center round info 80%>
 +[[https://​github.com/​omarllorens|Thank you Omar.]]
 +</​WRAP>​
 +
 +===== composer2readme and module2wiki =====
 +
 +These PHP scripts will connect to a standard coreBOS module or extension directory structure and output a DokuWiki syntax page with a summary of the module or extension which you can use as a starting point to document it in [[en:​extensions:​extensions|our extensions section]].
 +
 +<​code>​
 +php build/​HelperScripts/​composer2readme.php https://​raw.githubusercontent.com/​tsolucio/​coreBOSEmployee/​master
 +php build/​HelperScripts/​module2wiki.php https://​raw.githubusercontent.com/​tsolucio/​coreBOSEmployee/​master
 +</​code>​
 +
 +===== setEmailOptOut =====
 +
 +This script permits you to easily set the emailoptout field on or off by calling a simple link. This is an easy, yet insecure way of being able to add an "​unsubscribe"​ link to the body of your emails.
 +
 +As with most of the HelperScripts,​ copy the script to the root of your install and set the URL to
 +
 +<​code>​
 +https://​your_server/​your_corebos/​setEmailOptOut.php?​email={email}&​optout={0|1}&​appkey={appkey}
 +</​code>​
 +
 +this script triggers workflows accordingly.
 +
 +**The correct and secure way to do this is using Web Services**