murp

Adding contentbox modules to coldbox

Sep 11th, 2013
9,513
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Yes!  Being able to deploy the ContentBox modules inside any ColdBox app has always been one of it's big features.  Follow these steps to do it:
  2.  
  3. 1. Update ColdBox to latest included on ContentBox
  4. 2. Add orm configurations to parent application.cfc
  5.  
  6. // THE DATASOURCE FOR CONTENTBOX MANDATORY
  7. this.datasource = "contentbox";
  8. // CONTENTBOX ORM SETTINGS
  9. this.ormEnabled = true;
  10. this.ormSettings = {
  11. // ENTITY LOCATIONS, ADD MORE LOCATIONS AS YOU SEE FIT
  12. cfclocation=["model","modules"],
  13. // THE DIALECT OF YOUR DATABASE OR LET HIBERNATE FIGURE IT OUT, UP TO YOU
  14. //dialect = "MySQLwithInnoDB",
  15. // DO NOT REMOVE THE FOLLOWING LINE OR AUTO-UPDATES MIGHT FAIL.
  16. dbcreate = "update",
  17. // FILL OUT: IF YOU WANT CHANGE SECONDARY CACHE, PLEASE UPDATE HERE
  18. secondarycacheenabled = true,
  19. cacheprovider= "ehCache",
  20. // ORM SESSION MANAGEMENT SETTINGS, DO NOT CHANGE
  21. logSQL = false,
  22. flushAtRequestEnd = false,
  23. autoManageSession= false,
  24. // ORM EVENTS MUST BE TURNED ON FOR CONTENTBOX TO WORK
  25. eventHandling = true,
  26. eventHandler= "modules.contentbox.model.system.EventHandler",
  27. // THIS IS ADDED SO OTHER CFML ENGINES CAN WORK WITH CONTENTBOX
  28. skipCFCWithError= true
  29. };
  30. 3. Add ContentBox mappings to parent application.cfc
  31.  
  32. // LOCATION MAPPINGS
  33. this.mappings["/contentbox"] = COLDBOX_APP_ROOT_PATH & "modules/contentbox";
  34. this.mappings["/contentbox-ui"] = COLDBOX_APP_ROOT_PATH & "modules/contentbox-ui";
  35. this.mappings["/contentbox-admin"] = COLDBOX_APP_ROOT_PATH & "modules/contentbox-admin";
  36.  
  37. 3. Drop ContentBox modules into modules folder
  38. 4. Remove the DSN creator module as I am guessing you are integrating, so delete it from disk
  39. 5. Open your parent application's config/ColdBox.cfc and make sure that
  40. a. The SES interceptor is defined
  41.  
  42. //Register interceptors as an array, we need order
  43. interceptors = [
  44.   //SES
  45.   {class="coldbox.system.interceptors.SES"}
  46. ];
  47.  
  48. b. The ORM injection is enabled:
  49.  
  50. // ORM
  51. orm = {
  52.   // Enable Injection
  53.   injection = {
  54. enabled = true
  55.   }
  56. };
  57.  
  58. 4. By default ContentBox UI takes over your application routes and display. You can segregate the module to a separate entry point by opening the ModuleConfig in the ContentBox UI module (/modules/contentbox-ui/ModuleConfig.cfc)  and adding an entry point:
  59.  
  60. // YOUR SES URL ENTRY POINT FOR CONTENTBOX, IF EMPTY IT WILL TAKE OVER THE ENTIRE APPLICATION
  61. // IF YOU WANT TO SECTION OFF CONTENTBOX THEN FILL OUT AN SES ENTRY POINT LIKE /site OR /content
  62. // BY DEFAULT IT TAKES OVER THE ENTIRE APPLICATION
  63. this.entryPoint= "blog";
Advertisement
Comments
  • Monzakor
    154 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • User was banned
Add Comment
Please, Sign In to add comment