context.cache.php 147 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448
  1. <?php return array (
  2. 'config' =>
  3. array (
  4. ),
  5. 'aliasMap' =>
  6. array (
  7. 'blog-search-results.html' => 80,
  8. 'home.html' => 61,
  9. 'index/' => 1,
  10. 'about.html' => 18,
  11. 'pricing-options.html' => 67,
  12. 'contact-us.html' => 17,
  13. 'albrecht-soil-analysis.html' => 94,
  14. 'blog/' => 71,
  15. 'login/' => 4,
  16. 'dashboard/' => 2,
  17. 'terms-of-condition.html' => 39,
  18. 'error.html' => 7,
  19. 'dev-test.html' => 62,
  20. 'quickemail.html' => 8,
  21. 'sitemap.xml' => 99,
  22. 'chromepdf.html' => 66,
  23. 'graphdata.json' => 3,
  24. 'api.html' => 36,
  25. 'upgrade-modx.html' => 38,
  26. 'admb.html' => 70,
  27. 'main-banner.html' => 20,
  28. 'home-plant-analysis.html' => 19,
  29. 'home-water-analysis.html' => 21,
  30. 'home-admb.html' => 22,
  31. 'irrigation-monitoring.html' => 68,
  32. 'moisture-monitoring.html' => 69,
  33. 'blog-preview.html' => 88,
  34. 'planning-calendar.html' => 12,
  35. 'inbox.html' => 13,
  36. 'report-history.html' => 92,
  37. 'weather/' => 14,
  38. 'pesticide.html' => 23,
  39. 'crop-analysis/' => 30,
  40. 'irrigation-controller/' => 105,
  41. 'client-settings.html' => 9,
  42. 'crop-cards/' => 90,
  43. 'register.html' => 5,
  44. 'thanks-for-registering.html' => 6,
  45. 'forgot-password.html' => 10,
  46. 'logout.html' => 11,
  47. 'edit-personal-details.html' => 29,
  48. 'change-password.html' => 91,
  49. 'update-client-details.html' => 15,
  50. 'product-list/' => 42,
  51. 'ci.html' => 98,
  52. 'email.html' => 16,
  53. 'moisture-sensor-setup.html' => 49,
  54. 'weatherapisave.html' => 64,
  55. 'predictive-watering.html' => 65,
  56. 'moisture.html' => 101,
  57. 'plant-recommendations.html' => 87,
  58. 'plant-analysis.html' => 26,
  59. 'plant-report.html' => 40,
  60. 'plant-submit.html' => 28,
  61. 'plant-rec-update.html' => 89,
  62. 'soil-test-data/' => 31,
  63. 'plant-test-report/' => 25,
  64. 'water-test-data.html' => 43,
  65. 'amdb.html' => 60,
  66. 'compost-test-data.html' => 50,
  67. 'soil-recommendations.html' => 59,
  68. 'soil-report-pdf.html' => 56,
  69. 'soil-analysis.html' => 32,
  70. 'uploadsubmit.html' => 33,
  71. 'soil-analysis-pdf.html' => 37,
  72. 'soil-report.html' => 41,
  73. 'soil-analysis-full-report.html' => 55,
  74. 'soil-submit.html' => 34,
  75. 'base-saturation-pie.html' => 103,
  76. 'soil-analysis-bs.html' => 104,
  77. 'updateweatherstation.html' => 27,
  78. 'power.html' => 35,
  79. 'sensors.html' => 107,
  80. 'updatecomment.html' => 58,
  81. 'updateproduct.html' => 57,
  82. 'water-analysis.html' => 44,
  83. 'water-analysis-pdf.html' => 45,
  84. 'water-uploadsubmit.html' => 46,
  85. 'water-report.html' => 48,
  86. 'water-submit.html' => 47,
  87. 'compost-analysis.html' => 52,
  88. 'compost-report.html' => 53,
  89. 'duplicate-of-animal-dietary-balance.html' => 51,
  90. 'compost-submit.html' => 54,
  91. 'animal-dietary-balance.html' => 24,
  92. 'animal-submit.html' => 63,
  93. 'post-1.html' => 72,
  94. 'post-2.html' => 73,
  95. 'nutrient-balance.html' => 74,
  96. 'the-power-of-foliar-fertiliser.html' => 75,
  97. 'hidden-benefits-of-fertigation.html' => 76,
  98. 'macro-nutrients.html' => 77,
  99. 'micro-nutrients.html' => 78,
  100. 'nitrogen-in-the-soil.html' => 79,
  101. 'cation-exchange-capacity.html' => 81,
  102. 'exchangeable-cations.html' => 82,
  103. 'base-saturation.html' => 83,
  104. 'carbon-nitrogen-ratio.html' => 84,
  105. 'nitrate-nitrogen.html' => 85,
  106. 'phosphorus-in-the-soil.html' => 86,
  107. 'crop-card-modal.html' => 93,
  108. 'albrecht.html' => 95,
  109. 'sa.html' => 96,
  110. 'william-albrecht.html' => 100,
  111. 'food-is-fabricated-soil-fertility.html' => 97,
  112. 'mg.html' => 102,
  113. 'zones.html' => 106,
  114. ),
  115. 'resourceMap' =>
  116. array (
  117. 0 =>
  118. array (
  119. 0 => 80,
  120. 1 => 61,
  121. 2 => 1,
  122. 3 => 18,
  123. 4 => 67,
  124. 5 => 17,
  125. 6 => 94,
  126. 7 => 71,
  127. 8 => 4,
  128. 9 => 2,
  129. 10 => 39,
  130. 11 => 7,
  131. 12 => 62,
  132. 13 => 8,
  133. 14 => 99,
  134. 15 => 66,
  135. 16 => 3,
  136. 17 => 36,
  137. 18 => 38,
  138. ),
  139. 1 =>
  140. array (
  141. 0 => 70,
  142. 1 => 20,
  143. 2 => 19,
  144. 3 => 21,
  145. 4 => 22,
  146. 5 => 68,
  147. 6 => 69,
  148. 7 => 88,
  149. ),
  150. 2 =>
  151. array (
  152. 0 => 12,
  153. 1 => 13,
  154. 2 => 92,
  155. 3 => 14,
  156. 4 => 23,
  157. 5 => 30,
  158. 6 => 105,
  159. 7 => 9,
  160. 8 => 90,
  161. ),
  162. 4 =>
  163. array (
  164. 0 => 5,
  165. 1 => 6,
  166. 2 => 10,
  167. 3 => 11,
  168. 4 => 29,
  169. 5 => 91,
  170. ),
  171. 9 =>
  172. array (
  173. 0 => 15,
  174. 1 => 42,
  175. ),
  176. 12 =>
  177. array (
  178. 0 => 98,
  179. ),
  180. 13 =>
  181. array (
  182. 0 => 16,
  183. ),
  184. 14 =>
  185. array (
  186. 0 => 49,
  187. 1 => 64,
  188. 2 => 65,
  189. 3 => 101,
  190. ),
  191. 25 =>
  192. array (
  193. 0 => 87,
  194. 1 => 26,
  195. 2 => 40,
  196. 3 => 28,
  197. 4 => 89,
  198. ),
  199. 30 =>
  200. array (
  201. 0 => 31,
  202. 1 => 25,
  203. 2 => 43,
  204. 3 => 60,
  205. 4 => 50,
  206. ),
  207. 31 =>
  208. array (
  209. 0 => 59,
  210. 1 => 56,
  211. 2 => 32,
  212. 3 => 33,
  213. 4 => 37,
  214. 5 => 41,
  215. 6 => 55,
  216. 7 => 34,
  217. 8 => 103,
  218. 9 => 104,
  219. ),
  220. 36 =>
  221. array (
  222. 0 => 27,
  223. 1 => 35,
  224. 2 => 107,
  225. ),
  226. 41 =>
  227. array (
  228. 0 => 58,
  229. ),
  230. 42 =>
  231. array (
  232. 0 => 57,
  233. ),
  234. 43 =>
  235. array (
  236. 0 => 44,
  237. 1 => 45,
  238. 2 => 46,
  239. 3 => 48,
  240. 4 => 47,
  241. ),
  242. 50 =>
  243. array (
  244. 0 => 52,
  245. 1 => 53,
  246. 2 => 51,
  247. 3 => 54,
  248. ),
  249. 60 =>
  250. array (
  251. 0 => 24,
  252. 1 => 63,
  253. ),
  254. 71 =>
  255. array (
  256. 0 => 72,
  257. 1 => 73,
  258. 2 => 74,
  259. 3 => 75,
  260. 4 => 76,
  261. 5 => 77,
  262. 6 => 78,
  263. 7 => 79,
  264. 8 => 81,
  265. 9 => 82,
  266. 10 => 83,
  267. 11 => 84,
  268. 12 => 85,
  269. 13 => 86,
  270. ),
  271. 90 =>
  272. array (
  273. 0 => 93,
  274. ),
  275. 94 =>
  276. array (
  277. 0 => 95,
  278. 1 => 96,
  279. 2 => 100,
  280. 3 => 97,
  281. ),
  282. 101 =>
  283. array (
  284. 0 => 102,
  285. ),
  286. 105 =>
  287. array (
  288. 0 => 106,
  289. ),
  290. ),
  291. 'webLinkMap' =>
  292. array (
  293. ),
  294. 'eventMap' =>
  295. array (
  296. 'FredBeforeRender' =>
  297. array (
  298. 17 => '17',
  299. ),
  300. 'OnBeforeDocFormSave' =>
  301. array (
  302. 14 => '14',
  303. 17 => '17',
  304. ),
  305. 'OnBeforeEmptyTrash' =>
  306. array (
  307. 17 => '17',
  308. ),
  309. 'OnChunkFormPrerender' =>
  310. array (
  311. 1 => '1',
  312. 3 => '3',
  313. ),
  314. 'OnChunkFormSave' =>
  315. array (
  316. 3 => '3',
  317. ),
  318. 'OnDocFormPrerender' =>
  319. array (
  320. 22 => '22',
  321. 19 => '19',
  322. 1 => '1',
  323. 14 => '14',
  324. 3 => '3',
  325. 17 => '17',
  326. 20 => '20',
  327. ),
  328. 'OnDocFormRender' =>
  329. array (
  330. 17 => '17',
  331. 24 => '24',
  332. ),
  333. 'OnDocFormSave' =>
  334. array (
  335. 24 => '24',
  336. 14 => '14',
  337. 3 => '3',
  338. 20 => '20',
  339. 19 => '19',
  340. ),
  341. 'OnFileCreateFormPrerender' =>
  342. array (
  343. 1 => '1',
  344. ),
  345. 'OnFileEditFormPrerender' =>
  346. array (
  347. 1 => '1',
  348. ),
  349. 'OnHandleRequest' =>
  350. array (
  351. 12 => '12',
  352. 19 => '19',
  353. 21 => '21',
  354. ),
  355. 'OnLoadWebDocument' =>
  356. array (
  357. 24 => '24',
  358. 14 => '14',
  359. 20 => '20',
  360. ),
  361. 'OnMODXInit' =>
  362. array (
  363. 20 => '20',
  364. 16 => '16',
  365. 24 => '24',
  366. 11 => '11',
  367. ),
  368. 'OnPageNotFound' =>
  369. array (
  370. 19 => '19',
  371. ),
  372. 'OnPluginFormPrerender' =>
  373. array (
  374. 1 => '1',
  375. 3 => '3',
  376. ),
  377. 'OnPluginFormSave' =>
  378. array (
  379. 3 => '3',
  380. ),
  381. 'OnResourceBeforeSort' =>
  382. array (
  383. 17 => '17',
  384. ),
  385. 'OnResourceDuplicate' =>
  386. array (
  387. 17 => '17',
  388. 19 => '19',
  389. 24 => '24',
  390. ),
  391. 'OnRichTextBrowserInit' =>
  392. array (
  393. 2 => '2',
  394. ),
  395. 'OnRichTextEditorInit' =>
  396. array (
  397. 2 => '2',
  398. ),
  399. 'OnRichTextEditorRegister' =>
  400. array (
  401. 2 => '2',
  402. 1 => '1',
  403. ),
  404. 'OnSiteRefresh' =>
  405. array (
  406. 18 => '18',
  407. ),
  408. 'OnSnipFormPrerender' =>
  409. array (
  410. 1 => '1',
  411. 3 => '3',
  412. ),
  413. 'OnSnipFormSave' =>
  414. array (
  415. 3 => '3',
  416. ),
  417. 'OnTempFormPrerender' =>
  418. array (
  419. 1 => '1',
  420. 3 => '3',
  421. 20 => '20',
  422. ),
  423. 'OnTempFormSave' =>
  424. array (
  425. 3 => '3',
  426. ),
  427. 'OnTemplateRemove' =>
  428. array (
  429. 14 => '14',
  430. ),
  431. 'OnTVFormPrerender' =>
  432. array (
  433. 3 => '3',
  434. ),
  435. 'OnTVFormSave' =>
  436. array (
  437. 3 => '3',
  438. ),
  439. 'OnTVInputPropertiesList' =>
  440. array (
  441. 14 => '14',
  442. 22 => '22',
  443. ),
  444. 'OnTVInputRenderList' =>
  445. array (
  446. 14 => '14',
  447. 22 => '22',
  448. ),
  449. 'OnTVOutputRenderList' =>
  450. array (
  451. 22 => '22',
  452. ),
  453. 'OnTVOutputRenderPropertiesList' =>
  454. array (
  455. 22 => '22',
  456. ),
  457. 'OnUserBeforeSave' =>
  458. array (
  459. 23 => '23',
  460. ),
  461. 'OnUserFormPrerender' =>
  462. array (
  463. 21 => '21',
  464. ),
  465. 'OnWebAuthentication' =>
  466. array (
  467. 21 => '21',
  468. ),
  469. 'OnWebPageComplete' =>
  470. array (
  471. 7 => '7',
  472. ),
  473. 'OnWebPagePrerender' =>
  474. array (
  475. 14 => '14',
  476. ),
  477. ),
  478. 'pluginCache' =>
  479. array (
  480. 1 =>
  481. array (
  482. 'id' => '1',
  483. 'source' => '0',
  484. 'property_preprocess' => '0',
  485. 'name' => 'Ace',
  486. 'description' => 'Ace code editor plugin for MODx Revolution',
  487. 'editor_type' => '0',
  488. 'category' => '0',
  489. 'cache_type' => '0',
  490. 'plugincode' => '/**
  491. * Ace Source Editor Plugin
  492. *
  493. * Events: OnManagerPageBeforeRender, OnRichTextEditorRegister, OnSnipFormPrerender,
  494. * OnTempFormPrerender, OnChunkFormPrerender, OnPluginFormPrerender,
  495. * OnFileCreateFormPrerender, OnFileEditFormPrerender, OnDocFormPrerender
  496. *
  497. * @author Danil Kostin <danya.postfactum(at)gmail.com>
  498. *
  499. * @package ace
  500. *
  501. * @var array $scriptProperties
  502. * @var Ace $ace
  503. */
  504. if ($modx->event->name == \'OnRichTextEditorRegister\') {
  505. $modx->event->output(\'Ace\');
  506. return;
  507. }
  508. if ($modx->getOption(\'which_element_editor\', null, \'Ace\') !== \'Ace\') {
  509. return;
  510. }
  511. $ace = $modx->getService(\'ace\', \'Ace\', $modx->getOption(\'ace.core_path\', null, $modx->getOption(\'core_path\').\'components/ace/\').\'model/ace/\');
  512. $ace->initialize();
  513. $extensionMap = array(
  514. \'tpl\' => \'text/x-smarty\',
  515. \'htm\' => \'text/html\',
  516. \'html\' => \'text/html\',
  517. \'css\' => \'text/css\',
  518. \'scss\' => \'text/x-scss\',
  519. \'less\' => \'text/x-less\',
  520. \'svg\' => \'image/svg+xml\',
  521. \'xml\' => \'application/xml\',
  522. \'xsl\' => \'application/xml\',
  523. \'js\' => \'application/javascript\',
  524. \'json\' => \'application/json\',
  525. \'php\' => \'application/x-php\',
  526. \'sql\' => \'text/x-sql\',
  527. \'md\' => \'text/x-markdown\',
  528. \'txt\' => \'text/plain\',
  529. \'twig\' => \'text/x-twig\'
  530. );
  531. // Define default mime for html elements(templates, chunks and html resources)
  532. $html_elements_mime=$modx->getOption(\'ace.html_elements_mime\',null,false);
  533. if(!$html_elements_mime){
  534. // this may deprecated in future because components may set ace.html_elements_mime option now
  535. switch (true) {
  536. case $modx->getOption(\'twiggy_class\'):
  537. $html_elements_mime = \'text/x-twig\';
  538. break;
  539. case $modx->getOption(\'pdotools_fenom_parser\'):
  540. $html_elements_mime = \'text/x-smarty\';
  541. break;
  542. default:
  543. $html_elements_mime = \'text/html\';
  544. }
  545. }
  546. // Defines wether we should highlight modx tags
  547. $modxTags = false;
  548. switch ($modx->event->name) {
  549. case \'OnSnipFormPrerender\':
  550. $field = \'modx-snippet-snippet\';
  551. $mimeType = \'application/x-php\';
  552. break;
  553. case \'OnTempFormPrerender\':
  554. $field = \'modx-template-content\';
  555. $modxTags = true;
  556. $mimeType = $html_elements_mime;
  557. break;
  558. case \'OnChunkFormPrerender\':
  559. $field = \'modx-chunk-snippet\';
  560. if ($modx->controller->chunk && $modx->controller->chunk->isStatic()) {
  561. $extension = pathinfo($modx->controller->chunk->name, PATHINFO_EXTENSION);
  562. if(!$extension||!isset($extensionMap[$extension])){
  563. $extension = pathinfo($modx->controller->chunk->getSourceFile(), PATHINFO_EXTENSION);
  564. }
  565. $mimeType = isset($extensionMap[$extension]) ? $extensionMap[$extension] : \'text/plain\';
  566. } else {
  567. $mimeType = $html_elements_mime;
  568. }
  569. $modxTags = true;
  570. break;
  571. case \'OnPluginFormPrerender\':
  572. $field = \'modx-plugin-plugincode\';
  573. $mimeType = \'application/x-php\';
  574. break;
  575. case \'OnFileCreateFormPrerender\':
  576. $field = \'modx-file-content\';
  577. $mimeType = \'text/plain\';
  578. break;
  579. case \'OnFileEditFormPrerender\':
  580. $field = \'modx-file-content\';
  581. $extension = pathinfo($scriptProperties[\'file\'], PATHINFO_EXTENSION);
  582. $mimeType = isset($extensionMap[$extension])
  583. ? $extensionMap[$extension]
  584. : \'text/plain\';
  585. $modxTags = $extension == \'tpl\';
  586. break;
  587. case \'OnDocFormPrerender\':
  588. if (!$modx->controller->resourceArray) {
  589. return;
  590. }
  591. $field = \'ta\';
  592. $mimeType = $modx->getObject(\'modContentType\', $modx->controller->resourceArray[\'content_type\'])->get(\'mime_type\');
  593. if($mimeType == \'text/html\')$mimeType = $html_elements_mime;
  594. if ($modx->getOption(\'use_editor\')){
  595. $richText = $modx->controller->resourceArray[\'richtext\'];
  596. $classKey = $modx->controller->resourceArray[\'class_key\'];
  597. if ($richText || in_array($classKey, array(\'modStaticResource\',\'modSymLink\',\'modWebLink\',\'modXMLRPCResource\'))) {
  598. $field = false;
  599. }
  600. }
  601. $modxTags = true;
  602. break;
  603. default:
  604. return;
  605. }
  606. $modxTags = (int) $modxTags;
  607. $script = \'\';
  608. if ($field) {
  609. $script .= "MODx.ux.Ace.replaceComponent(\'$field\', \'$mimeType\', $modxTags);";
  610. }
  611. if ($modx->event->name == \'OnDocFormPrerender\' && !$modx->getOption(\'use_editor\')) {
  612. $script .= "MODx.ux.Ace.replaceTextAreas(Ext.query(\'.modx-richtext\'));";
  613. }
  614. if ($script) {
  615. $modx->controller->addHtml(\'<script>Ext.onReady(function() {\' . $script . \'});</script>\');
  616. }',
  617. 'locked' => '0',
  618. 'properties' => 'a:0:{}',
  619. 'disabled' => '0',
  620. 'moduleguid' => '',
  621. 'static' => '0',
  622. 'static_file' => 'ace/elements/plugins/ace.plugin.php',
  623. ),
  624. 16 =>
  625. array (
  626. 'id' => '16',
  627. 'source' => '0',
  628. 'property_preprocess' => '0',
  629. 'name' => 'ClientConfig',
  630. 'description' => 'Sets system settings from the Client Config CMP.',
  631. 'editor_type' => '0',
  632. 'category' => '0',
  633. 'cache_type' => '0',
  634. 'plugincode' => '/**
  635. * ClientConfig
  636. *
  637. * Copyright 2011-2014 by Mark Hamstra <hello@markhamstra.com>
  638. *
  639. * ClientConfig is free software; you can redistribute it and/or modify it under the
  640. * terms of the GNU General Public License as published by the Free Software
  641. * Foundation; either version 2 of the License, or (at your option) any later
  642. * version.
  643. *
  644. * ClientConfig is distributed in the hope that it will be useful, but WITHOUT ANY
  645. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  646. * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  647. *
  648. * You should have received a copy of the GNU General Public License along with
  649. * ClientConfig; if not, write to the Free Software Foundation, Inc., 59 Temple
  650. * Place, Suite 330, Boston, MA 02111-1307 USA
  651. *
  652. * @package clientconfig
  653. *
  654. * @var modX $modx
  655. * @var int $id
  656. * @var string $mode
  657. * @var modResource $resource
  658. * @var modTemplate $template
  659. * @var modTemplateVar $tv
  660. * @var modChunk $chunk
  661. * @var modSnippet $snippet
  662. * @var modPlugin $plugin
  663. */
  664. $eventName = $modx->event->name;
  665. switch($eventName) {
  666. case \'OnMODXInit\':
  667. case \'OnHandleRequest\':
  668. /* Grab the class */
  669. $path = $modx->getOption(\'clientconfig.core_path\', null, $modx->getOption(\'core_path\') . \'components/clientconfig/\');
  670. $path .= \'model/clientconfig/\';
  671. $clientConfig = $modx->getService(\'clientconfig\',\'ClientConfig\', $path);
  672. /* If we got the class (gotta be careful of failed migrations), grab settings and go! */
  673. if ($clientConfig instanceof ClientConfig) {
  674. $contextKey = $modx->context instanceof modContext ? $modx->context->get(\'key\') : \'web\';
  675. $settings = $clientConfig->getSettings($contextKey);
  676. /* Make settings available as [[++tags]] */
  677. $modx->setPlaceholders($settings, \'+\');
  678. /* Make settings available for $modx->getOption() */
  679. foreach ($settings as $key => $value) {
  680. $modx->setOption($key, $value);
  681. }
  682. }
  683. break;
  684. }
  685. return;',
  686. 'locked' => '0',
  687. 'properties' => NULL,
  688. 'disabled' => '0',
  689. 'moduleguid' => '',
  690. 'static' => '0',
  691. 'static_file' => '',
  692. ),
  693. 2 =>
  694. array (
  695. 'id' => '2',
  696. 'source' => '0',
  697. 'property_preprocess' => '0',
  698. 'name' => 'TinyMCE',
  699. 'description' => 'TinyMCE 4.3.4-pl plugin for MODx Revolution',
  700. 'editor_type' => '0',
  701. 'category' => '0',
  702. 'cache_type' => '0',
  703. 'plugincode' => '/**
  704. * TinyMCE RichText Editor Plugin
  705. *
  706. * Events: OnRichTextEditorInit, OnRichTextEditorRegister,
  707. * OnBeforeManagerPageInit, OnRichTextBrowserInit
  708. *
  709. * @author Jeff Whitfield <jeff@collabpad.com>
  710. * @author Shaun McCormick <shaun@collabpad.com>
  711. *
  712. * @var modX $modx
  713. * @var array $scriptProperties
  714. *
  715. * @package tinymce
  716. * @subpackage build
  717. */
  718. if ($modx->event->name == \'OnRichTextEditorRegister\') {
  719. $modx->event->output(\'TinyMCE\');
  720. return;
  721. }
  722. require_once $modx->getOption(\'tiny.core_path\',null,$modx->getOption(\'core_path\').\'components/tinymce/\').\'tinymce.class.php\';
  723. $tiny = new TinyMCE($modx,$scriptProperties);
  724. $useEditor = $tiny->context->getOption(\'use_editor\',false);
  725. $whichEditor = $tiny->context->getOption(\'which_editor\',\'\');
  726. /* Handle event */
  727. switch ($modx->event->name) {
  728. case \'OnRichTextEditorInit\':
  729. if ($useEditor && $whichEditor == \'TinyMCE\') {
  730. unset($scriptProperties[\'chunk\']);
  731. if (isset($forfrontend) || $modx->context->get(\'key\') != \'mgr\') {
  732. $def = $tiny->context->getOption(\'cultureKey\',$tiny->context->getOption(\'manager_language\',\'en\'));
  733. $tiny->properties[\'language\'] = $modx->getOption(\'fe_editor_lang\',array(),$def);
  734. $tiny->properties[\'frontend\'] = true;
  735. unset($def);
  736. }
  737. /* commenting these out as it causes problems with richtext tvs */
  738. //if (isset($scriptProperties[\'resource\']) && !$resource->get(\'richtext\')) return;
  739. //if (!isset($scriptProperties[\'resource\']) && !$modx->getOption(\'richtext_default\',null,false)) return;
  740. $tiny->setProperties($scriptProperties);
  741. $html = $tiny->initialize();
  742. $modx->event->output($html);
  743. unset($html);
  744. }
  745. break;
  746. case \'OnRichTextBrowserInit\':
  747. if ($useEditor && $whichEditor == \'TinyMCE\') {
  748. $inRevo20 = (boolean)version_compare($modx->version[\'full_version\'],\'2.1.0-rc1\',\'<\');
  749. $modx->getVersionData();
  750. $source = $tiny->context->getOption(\'default_media_source\',null,1);
  751. $modx->controller->addHtml(\'<script type="text/javascript">var inRevo20 = \'.($inRevo20 ? 1 : 0).\';MODx.source = "\'.$source.\'";</script>\');
  752. $modx->controller->addJavascript($tiny->config[\'assetsUrl\'].\'jscripts/tiny_mce/tiny_mce_popup.js\');
  753. if (file_exists($tiny->config[\'assetsPath\'].\'jscripts/tiny_mce/langs/\'.$tiny->properties[\'language\'].\'.js\')) {
  754. $modx->controller->addJavascript($tiny->config[\'assetsUrl\'].\'jscripts/tiny_mce/langs/\'.$tiny->properties[\'language\'].\'.js\');
  755. } else {
  756. $modx->controller->addJavascript($tiny->config[\'assetsUrl\'].\'jscripts/tiny_mce/langs/en.js\');
  757. }
  758. $modx->controller->addJavascript($tiny->config[\'assetsUrl\'].\'tiny.browser.js\');
  759. $modx->event->output(\'Tiny.browserCallback\');
  760. }
  761. return \'\';
  762. break;
  763. default: break;
  764. }
  765. return;',
  766. 'locked' => '0',
  767. 'properties' => 'a:39:{s:22:"accessibility_warnings";a:7:{s:4:"name";s:22:"accessibility_warnings";s:4:"desc";s:315:"If this option is set to true some accessibility warnings will be presented to the user if they miss specifying that information. This option is set to true by default, since we should all try to make this world a better place for disabled people. But if you are annoyed with the warnings, set this option to false.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;s:4:"area";s:0:"";}s:23:"apply_source_formatting";a:7:{s:4:"name";s:23:"apply_source_formatting";s:4:"desc";s:229:"This option enables you to tell TinyMCE to apply some source formatting to the output HTML code. With source formatting, the output HTML code is indented and formatted. Without source formatting, the output HTML is more compact. ";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;s:4:"area";s:0:"";}s:15:"button_tile_map";a:7:{s:4:"name";s:15:"button_tile_map";s:4:"desc";s:338:"If this option is set to true TinyMCE will use tiled images instead of individual images for most of the editor controls. This produces faster loading time since only one GIF image needs to be loaded instead of a GIF for each individual button. This option is set to false by default since it doesn\'t work with some DOCTYPE declarations. ";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:0;s:7:"lexicon";N;s:4:"area";s:0:"";}s:7:"cleanup";a:7:{s:4:"name";s:7:"cleanup";s:4:"desc";s:331:"This option enables or disables the built-in clean up functionality. TinyMCE is equipped with powerful clean up functionality that enables you to specify what elements and attributes are allowed and how HTML contents should be generated. This option is set to true by default, but if you want to disable it you may set it to false.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;s:4:"area";s:0:"";}s:18:"cleanup_on_startup";a:7:{s:4:"name";s:18:"cleanup_on_startup";s:4:"desc";s:135:"If you set this option to true, TinyMCE will perform a HTML cleanup call when the editor loads. This option is set to false by default.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:0;s:7:"lexicon";N;s:4:"area";s:0:"";}s:22:"convert_fonts_to_spans";a:7:{s:4:"name";s:22:"convert_fonts_to_spans";s:4:"desc";s:348:"If you set this option to true, TinyMCE will convert all font elements to span elements and generate span elements instead of font elements. This option should be used in order to get more W3C compatible code, since font elements are deprecated. How sizes get converted can be controlled by the font_size_classes and font_size_style_values options.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;s:4:"area";s:0:"";}s:23:"convert_newlines_to_brs";a:7:{s:4:"name";s:23:"convert_newlines_to_brs";s:4:"desc";s:128:"If you set this option to true, newline characters codes get converted into br elements. This option is set to false by default.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:0;s:7:"lexicon";N;s:4:"area";s:0:"";}s:12:"convert_urls";a:7:{s:4:"name";s:12:"convert_urls";s:4:"desc";s:495:"This option enables you to control whether TinyMCE is to be clever and restore URLs to their original values. URLs are automatically converted (messed up) by default because the built-in browser logic works this way. There is no way to get the real URL unless you store it away. If you set this option to false it will try to keep these URLs intact. This option is set to true by default, which means URLs will be forced to be either absolute or relative depending on the state of relative_urls.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;s:4:"area";s:0:"";}s:11:"dialog_type";a:7:{s:4:"name";s:11:"dialog_type";s:4:"desc";s:246:"This option enables you to specify how dialogs/popups should be opened. Possible values are "window" and "modal", where the window option opens a normal window and the dialog option opens a modal dialog. This option is set to "window" by default.";s:4:"type";s:4:"list";s:7:"options";a:2:{i:0;a:2:{i:0;s:6:"window";s:4:"text";s:6:"Window";}i:1;a:2:{i:0;s:5:"modal";s:4:"text";s:5:"Modal";}}s:5:"value";s:6:"window";s:7:"lexicon";N;s:4:"area";s:0:"";}s:14:"directionality";a:7:{s:4:"name";s:14:"directionality";s:4:"desc";s:261:"This option specifies the default writing direction. Some languages (Like Hebrew, Arabic, Urdu...) write from right to left instead of left to right. The default value of this option is "ltr" but if you want to use from right to left mode specify "rtl" instead.";s:4:"type";s:4:"list";s:7:"options";a:2:{i:0;a:2:{s:5:"value";s:3:"ltr";s:4:"text";s:13:"Left to Right";}i:1;a:2:{s:5:"value";s:3:"rtl";s:4:"text";s:13:"Right to Left";}}s:5:"value";s:3:"ltr";s:7:"lexicon";N;s:4:"area";s:0:"";}s:14:"element_format";a:7:{s:4:"name";s:14:"element_format";s:4:"desc";s:210:"This option enables control if elements should be in html or xhtml mode. xhtml is the default state for this option. This means that for example &lt;br /&gt; will be &lt;br&gt; if you set this option to "html".";s:4:"type";s:4:"list";s:7:"options";a:2:{i:0;a:2:{s:5:"value";s:5:"xhtml";s:4:"text";s:5:"XHTML";}i:1;a:2:{s:5:"value";s:4:"html";s:4:"text";s:4:"HTML";}}s:5:"value";s:5:"xhtml";s:7:"lexicon";N;s:4:"area";s:0:"";}s:15:"entity_encoding";a:7:{s:4:"name";s:15:"entity_encoding";s:4:"desc";s:70:"This option controls how entities/characters get processed by TinyMCE.";s:4:"type";s:4:"list";s:7:"options";a:4:{i:0;a:2:{s:5:"value";s:0:"";s:4:"text";s:4:"None";}i:1;a:2:{s:5:"value";s:5:"named";s:4:"text";s:5:"Named";}i:2;a:2:{s:5:"value";s:7:"numeric";s:4:"text";s:7:"Numeric";}i:3;a:2:{s:5:"value";s:3:"raw";s:4:"text";s:3:"Raw";}}s:5:"value";s:0:"";s:7:"lexicon";N;s:4:"area";s:0:"";}s:16:"force_p_newlines";a:7:{s:4:"name";s:16:"force_p_newlines";s:4:"desc";s:147:"This option enables you to disable/enable the creation of paragraphs on return/enter in Mozilla/Firefox. The default value of this option is true. ";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;s:4:"area";s:0:"";}s:22:"force_hex_style_colors";a:7:{s:4:"name";s:22:"force_hex_style_colors";s:4:"desc";s:277:"This option enables you to control TinyMCE to force the color format to use hexadecimal instead of rgb strings. It converts for example "color: rgb(255, 255, 0)" to "#FFFF00". This option is set to true by default since otherwice MSIE and Firefox would differ in this behavior.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;s:4:"area";s:0:"";}s:6:"height";a:7:{s:4:"name";s:6:"height";s:4:"desc";s:38:"Sets the height of the TinyMCE editor.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:5:"400px";s:7:"lexicon";N;s:4:"area";s:0:"";}s:11:"indentation";a:7:{s:4:"name";s:11:"indentation";s:4:"desc";s:139:"This option allows specification of the indentation level for indent/outdent buttons in the UI. This defaults to 30px but can be any value.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:4:"30px";s:7:"lexicon";N;s:4:"area";s:0:"";}s:16:"invalid_elements";a:7:{s:4:"name";s:16:"invalid_elements";s:4:"desc";s:163:"This option should contain a comma separated list of element names to exclude from the content. Elements in this list will removed when TinyMCE executes a cleanup.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";N;s:4:"area";s:0:"";}s:6:"nowrap";a:7:{s:4:"name";s:6:"nowrap";s:4:"desc";s:212:"This nowrap option enables you to control how whitespace is to be wordwrapped within the editor. This option is set to false by default, but if you enable it by setting it to true editor contents will never wrap.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:0;s:7:"lexicon";N;s:4:"area";s:0:"";}s:15:"object_resizing";a:7:{s:4:"name";s:15:"object_resizing";s:4:"desc";s:148:"This option gives you the ability to turn on/off the inline resizing controls of tables and images in Firefox/Mozilla. These are enabled by default.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;s:4:"area";s:0:"";}s:12:"path_options";a:7:{s:4:"name";s:12:"path_options";s:4:"desc";s:119:"Sets a group of options. Note: This will override the relative_urls, document_base_url and remove_script_host settings.";s:4:"type";s:9:"textfield";s:7:"options";a:3:{i:0;a:2:{s:5:"value";s:11:"docrelative";s:4:"text";s:17:"Document Relative";}i:1;a:2:{s:5:"value";s:12:"rootrelative";s:4:"text";s:13:"Root Relative";}i:2;a:2:{s:5:"value";s:11:"fullpathurl";s:4:"text";s:13:"Full Path URL";}}s:5:"value";s:11:"docrelative";s:7:"lexicon";N;s:4:"area";s:0:"";}s:28:"plugin_insertdate_dateFormat";a:7:{s:4:"name";s:28:"plugin_insertdate_dateFormat";s:4:"desc";s:53:"Formatting of dates when using the InsertDate plugin.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:8:"%Y-%m-%d";s:7:"lexicon";N;s:4:"area";s:0:"";}s:28:"plugin_insertdate_timeFormat";a:7:{s:4:"name";s:28:"plugin_insertdate_timeFormat";s:4:"desc";s:53:"Formatting of times when using the InsertDate plugin.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:8:"%H:%M:%S";s:7:"lexicon";N;s:4:"area";s:0:"";}s:12:"preformatted";a:7:{s:4:"name";s:12:"preformatted";s:4:"desc";s:231:"If you enable this feature, whitespace such as tabs and spaces will be preserved. Much like the behavior of a &lt;pre&gt; element. This can be handy when integrating TinyMCE with webmail clients. This option is disabled by default.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;s:4:"area";s:0:"";}s:13:"relative_urls";a:7:{s:4:"name";s:13:"relative_urls";s:4:"desc";s:231:"If this option is set to true, all URLs returned from the file manager will be relative from the specified document_base_url. If it is set to false all URLs will be converted to absolute URLs. This option is set to true by default.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;s:4:"area";s:0:"";}s:17:"remove_linebreaks";a:7:{s:4:"name";s:17:"remove_linebreaks";s:4:"desc";s:531:"This option controls whether line break characters should be removed from output HTML. This option is enabled by default because there are differences between browser implementations regarding what to do with white space in the DOM. Gecko and Safari place white space in text nodes in the DOM. IE and Opera remove them from the DOM and therefore the line breaks will automatically be removed in those. This option will normalize this behavior when enabled (true) and all browsers will have a white-space-stripped DOM serialization.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:0;s:7:"lexicon";N;s:4:"area";s:0:"";}s:18:"remove_script_host";a:7:{s:4:"name";s:18:"remove_script_host";s:4:"desc";s:221:"If this option is enabled the protocol and host part of the URLs returned from the file manager will be removed. This option is only used if the relative_urls option is set to false. This option is set to true by default.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;s:4:"area";s:0:"";}s:20:"remove_trailing_nbsp";a:7:{s:4:"name";s:20:"remove_trailing_nbsp";s:4:"desc";s:392:"This option enables you to specify that TinyMCE should remove any traling &nbsp; characters in block elements if you start to write inside them. Paragraphs are default padded with a &nbsp; and if you write text into such paragraphs the space will remain. Setting this option to true will remove the space. This option is set to false by default since the cursor jumps a bit in Gecko browsers.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:0;s:7:"lexicon";N;s:4:"area";s:0:"";}s:4:"skin";a:7:{s:4:"name";s:4:"skin";s:4:"desc";s:330:"This option enables you to specify what skin you want to use with your theme. A skin is basically a CSS file that gets loaded from the skins directory inside the theme. The advanced theme that TinyMCE comes with has two skins, these are called "default" and "o2k7". We added another skin named "cirkuit" that is chosen by default.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:7:"cirkuit";s:7:"lexicon";N;s:4:"area";s:0:"";}s:12:"skin_variant";a:7:{s:4:"name";s:12:"skin_variant";s:4:"desc";s:403:"This option enables you to specify a variant for the skin, for example "silver" or "black". "default" skin does not offer any variant, whereas "o2k7" default offers "silver" or "black" variants to the default one. For the "cirkuit" skin there\'s one variant named "silver". When creating a skin, additional variants may also be created, by adding ui_[variant_name].css files alongside the default ui.css.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";N;s:4:"area";s:0:"";}s:20:"table_inline_editing";a:7:{s:4:"name";s:20:"table_inline_editing";s:4:"desc";s:231:"This option gives you the ability to turn on/off the inline table editing controls in Firefox/Mozilla. According to the TinyMCE documentation, these controls are somewhat buggy and not redesignable, so they are disabled by default.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;s:4:"area";s:0:"";}s:22:"theme_advanced_disable";a:7:{s:4:"name";s:22:"theme_advanced_disable";s:4:"desc";s:111:"This option should contain a comma separated list of controls to disable from any toolbar row/panel in TinyMCE.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";N;s:4:"area";s:0:"";}s:19:"theme_advanced_path";a:7:{s:4:"name";s:19:"theme_advanced_path";s:4:"desc";s:331:"This option gives you the ability to enable/disable the element path. This option is only useful if the theme_advanced_statusbar_location option is set to "top" or "bottom". This option is set to "true" by default. Setting this option to "false" will effectively hide the path tool, though it still takes up room in the Status Bar.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;s:4:"area";s:0:"";}s:32:"theme_advanced_resize_horizontal";a:7:{s:4:"name";s:32:"theme_advanced_resize_horizontal";s:4:"desc";s:319:"This option gives you the ability to enable/disable the horizontal resizing. This option is only useful if the theme_advanced_statusbar_location option is set to "top" or "bottom" and when the theme_advanced_resizing is set to true. This option is set to true by default, allowing both resizing horizontal and vertical.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;s:4:"area";s:0:"";}s:23:"theme_advanced_resizing";a:7:{s:4:"name";s:23:"theme_advanced_resizing";s:4:"desc";s:216:"This option gives you the ability to enable/disable the resizing button. This option is only useful if the theme_advanced_statusbar_location option is set to "top" or "bottom". This option is set to false by default.";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";N;s:4:"area";s:0:"";}s:33:"theme_advanced_statusbar_location";a:7:{s:4:"name";s:33:"theme_advanced_statusbar_location";s:4:"desc";s:257:"This option enables you to specify where the element statusbar with the path and resize tool should be located. This option can be set to "top" or "bottom". The default value is set to "top". This option can only be used when the theme is set to "advanced".";s:4:"type";s:4:"list";s:7:"options";a:2:{i:0;a:2:{s:5:"value";s:3:"top";s:4:"text";s:3:"Top";}i:1;a:2:{s:5:"value";s:6:"bottom";s:4:"text";s:6:"Bottom";}}s:5:"value";s:6:"bottom";s:7:"lexicon";N;s:4:"area";s:0:"";}s:28:"theme_advanced_toolbar_align";a:7:{s:4:"name";s:28:"theme_advanced_toolbar_align";s:4:"desc";s:187:"This option enables you to specify the alignment of the toolbar, this value can be "left", "right" or "center" (the default). This option can only be used when theme is set to "advanced".";s:4:"type";s:9:"textfield";s:7:"options";a:3:{i:0;a:2:{s:5:"value";s:6:"center";s:4:"text";s:6:"Center";}i:1;a:2:{s:5:"value";s:4:"left";s:4:"text";s:4:"Left";}i:2;a:2:{s:5:"value";s:5:"right";s:4:"text";s:5:"Right";}}s:5:"value";s:4:"left";s:7:"lexicon";N;s:4:"area";s:0:"";}s:31:"theme_advanced_toolbar_location";a:7:{s:4:"name";s:31:"theme_advanced_toolbar_location";s:4:"desc";s:191:"
  768. This option enables you to specify where the toolbar should be located. This option can be set to "top" or "bottom" (the defualt). This option can only be used when theme is set to advanced.";s:4:"type";s:4:"list";s:7:"options";a:2:{i:0;a:2:{s:5:"value";s:3:"top";s:4:"text";s:3:"Top";}i:1;a:2:{s:5:"value";s:6:"bottom";s:4:"text";s:6:"Bottom";}}s:5:"value";s:3:"top";s:7:"lexicon";N;s:4:"area";s:0:"";}s:5:"width";a:7:{s:4:"name";s:5:"width";s:4:"desc";s:32:"The width of the TinyMCE editor.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:3:"95%";s:7:"lexicon";N;s:4:"area";s:0:"";}s:33:"template_selected_content_classes";a:7:{s:4:"name";s:33:"template_selected_content_classes";s:4:"desc";s:234:"Specify a list of CSS class names for the template plugin. They must be separated by spaces. Any template element with one of the specified CSS classes will have its content replaced by the selected editor content when first inserted.";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";N;s:4:"area";s:0:"";}}',
  769. 'disabled' => '0',
  770. 'moduleguid' => '',
  771. 'static' => '0',
  772. 'static_file' => '',
  773. ),
  774. 3 =>
  775. array (
  776. 'id' => '3',
  777. 'source' => '0',
  778. 'property_preprocess' => '0',
  779. 'name' => 'VersionX',
  780. 'description' => 'The plugin that enables VersionX of tracking your content.',
  781. 'editor_type' => '0',
  782. 'category' => '0',
  783. 'cache_type' => '0',
  784. 'plugincode' => '$corePath = $modx->getOption(\'versionx.core_path\',null,$modx->getOption(\'core_path\').\'components/versionx/\');
  785. require_once $corePath.\'model/versionx.class.php\';
  786. $modx->versionx = new VersionX($modx);
  787. include $corePath . \'elements/plugins/versionx.plugin.php\';
  788. return;',
  789. 'locked' => '0',
  790. 'properties' => NULL,
  791. 'disabled' => '0',
  792. 'moduleguid' => '',
  793. 'static' => '0',
  794. 'static_file' => '',
  795. ),
  796. 22 =>
  797. array (
  798. 'id' => '22',
  799. 'source' => '0',
  800. 'property_preprocess' => '0',
  801. 'name' => 'GalleryCustomTV',
  802. 'description' => '',
  803. 'editor_type' => '0',
  804. 'category' => '0',
  805. 'cache_type' => '0',
  806. 'plugincode' => '/**
  807. * Handles plugin events for Gallery\'s Custom TV
  808. *
  809. * @package gallery
  810. */
  811. $corePath = $modx->getOption(\'gallery.core_path\',null,$modx->getOption(\'core_path\').\'components/gallery/\');
  812. switch ($modx->event->name) {
  813. case \'OnTVInputRenderList\':
  814. $modx->event->output($corePath.\'elements/tv/input/\');
  815. break;
  816. case \'OnTVOutputRenderList\':
  817. $modx->event->output($corePath.\'elements/tv/output/\');
  818. break;
  819. case \'OnTVInputPropertiesList\':
  820. $modx->event->output($corePath.\'elements/tv/inputoptions/\');
  821. break;
  822. case \'OnTVOutputRenderPropertiesList\':
  823. $modx->event->output($corePath.\'elements/tv/properties/\');
  824. break;
  825. case \'OnManagerPageBeforeRender\':
  826. $gallery = $modx->getService(\'gallery\',\'Gallery\',$modx->getOption(\'gallery.core_path\',null,$modx->getOption(\'core_path\').\'components/gallery/\').\'model/gallery/\',$scriptProperties);
  827. if (!($gallery instanceof Gallery)) return \'\';
  828. $snippetIds = \'\';
  829. $gallerySnippet = $modx->getObject(\'modSnippet\',array(\'name\' => \'Gallery\'));
  830. if ($gallerySnippet) {
  831. $snippetIds .= \'GAL.snippetGallery = "\'.$gallerySnippet->get(\'id\').\'";\'."\\n";
  832. }
  833. $galleryItemSnippet = $modx->getObject(\'modSnippet\',array(\'name\' => \'GalleryItem\'));
  834. if ($galleryItemSnippet) {
  835. $snippetIds .= \'GAL.snippetGalleryItem = "\'.$galleryItemSnippet->get(\'id\').\'";\'."\\n";
  836. }
  837. $jsDir = $modx->getOption(\'gallery.assets_url\',null,$modx->getOption(\'assets_url\').\'components/gallery/\').\'js/mgr/\';
  838. $modx->controller->addLexiconTopic(\'gallery:default\');
  839. $modx->controller->addJavascript($jsDir.\'gallery.js\');
  840. $modx->controller->addJavascript($jsDir.\'tree.js\');
  841. $modx->controller->addHtml(\'<script type="text/javascript">
  842. Ext.onReady(function() {
  843. GAL.config.connector_url = "\'.$gallery->config[\'connectorUrl\'].\'";
  844. \'.$snippetIds.\'
  845. });
  846. </script>\');
  847. break;
  848. case \'OnDocFormPrerender\':
  849. $gallery = $modx->getService(\'gallery\',\'Gallery\',$modx->getOption(\'gallery.core_path\',null,$modx->getOption(\'core_path\').\'components/gallery/\').\'model/gallery/\',$scriptProperties);
  850. if (!($gallery instanceof Gallery)) return \'\';
  851. /* assign gallery lang to JS */
  852. $modx->controller->addLexiconTopic(\'gallery:tv\');
  853. /* @var modAction $action */
  854. $action = $modx->getObject(\'modAction\',array(
  855. \'namespace\' => \'gallery\',
  856. \'controller\' => \'index\',
  857. ));
  858. $modx->controller->addHtml(\'<script type="text/javascript">
  859. Ext.onReady(function() {
  860. GAL.config = {};
  861. GAL.config.connector_url = "\'.$gallery->config[\'connectorUrl\'].\'";
  862. GAL.action = "\'.($action ? $action->get(\'id\') : 0).\'";
  863. });
  864. </script>\');
  865. $modx->controller->addJavascript($gallery->config[\'assetsUrl\'].\'js/mgr/tv/Spotlight.js\');
  866. $modx->controller->addJavascript($gallery->config[\'assetsUrl\'].\'js/mgr/gallery.js\');
  867. $modx->controller->addJavascript($gallery->config[\'assetsUrl\'].\'js/mgr/widgets/album/album.items.view.js\');
  868. $modx->controller->addJavascript($gallery->config[\'assetsUrl\'].\'js/mgr/widgets/album/album.tree.js\');
  869. $modx->controller->addJavascript($gallery->config[\'assetsUrl\'].\'js/mgr/tv/gal.browser.js\');
  870. $modx->controller->addJavascript($gallery->config[\'assetsUrl\'].\'js/mgr/tv/galtv.js\');
  871. $modx->controller->addCss($gallery->config[\'cssUrl\'].\'mgr.css\');
  872. break;
  873. }
  874. return;',
  875. 'locked' => '0',
  876. 'properties' => NULL,
  877. 'disabled' => '0',
  878. 'moduleguid' => '',
  879. 'static' => '0',
  880. 'static_file' => '',
  881. ),
  882. 7 =>
  883. array (
  884. 'id' => '7',
  885. 'source' => '1',
  886. 'property_preprocess' => '0',
  887. 'name' => 'controlErrorLog',
  888. 'description' => '',
  889. 'editor_type' => '0',
  890. 'category' => '14',
  891. 'cache_type' => '0',
  892. 'plugincode' => 'switch ($modx->event->name) {
  893. case \'OnManagerPageBeforeRender\':
  894. if ($modx->hasPermission(\'error_log_view\')) {
  895. $modx->controller->addLexiconTopic(\'controlerrorlog:default\');
  896. $modx->controller->addCss($modx->getOption(\'assets_url\') . \'components/controlerrorlog/css/mgr/main.css\');
  897. $modx->controller->addJavascript($modx->getOption(\'assets_url\') . \'components/controlerrorlog/js/mgr/cel.default.js\');
  898. $response = $modx->runProcessor(\'mgr/errorlog/get\', [\'includeContent\' => false], [\'processors_path\' => $modx->getOption(\'core_path\') . \'components/controlerrorlog/processors/\']);
  899. $resObj = $response->getObject();
  900. $_html = "<script> controlErrorLog.config = " . $modx->toJSON($resObj) . ";</script>";
  901. $modx->controller->addHtml($_html);
  902. }
  903. break;
  904. case \'OnHandleRequest\':
  905. if ($modx->context->get(\'key\') == \'mgr\') {
  906. return \'\';
  907. }
  908. $f = $modx->getOption(xPDO::OPT_CACHE_PATH) . \'logs/error.log\';
  909. if (file_exists($f)) {
  910. $casheHash = $modx->cacheManager->get(\'error_log\');
  911. $hash = md5_file($f);
  912. $email = $modx->getOption(\'controlerrorlog.admin_email\');
  913. if (filesize($f) > 0 && !empty($casheHash) && $casheHash != $hash && $modx->getOption(\'controlerrorlog.control_frontend\') && !empty($email)) {
  914. $modx->lexicon->load(\'controlerrorlog:default\');
  915. /** @var modPHPMailer $mail */
  916. $mail = $modx->getService(\'mail\', \'mail.modPHPMailer\');
  917. $mail->setHTML(true);
  918. $mail->set(modMail::MAIL_SUBJECT, $modx->lexicon(\'errorlog_email_subject\'));
  919. $mail->set(modMail::MAIL_BODY, $modx->lexicon(\'errorlog_email_body\'));
  920. $mail->set(modMail::MAIL_SENDER, $modx->getOption(\'emailsender\'));
  921. $mail->set(modMail::MAIL_FROM, $modx->getOption(\'emailsender\'));
  922. $mail->set(modMail::MAIL_FROM_NAME, $modx->getOption(\'site_name\'));
  923. $mail->address(\'to\', $email);
  924. $mail->address(\'reply-to\', $modx->getOption(\'emailsender\'));
  925. if (!$mail->send()) {
  926. print (\'An error occurred while trying to send the email: \' . $modx->mail->mailer->ErrorInfo);
  927. }
  928. $mail->reset();
  929. }
  930. if ($casheHash != $hash) {
  931. $modx->cacheManager->set(\'error_log\', $hash, 0);
  932. }
  933. }
  934. break;
  935. }',
  936. 'locked' => '0',
  937. 'properties' => NULL,
  938. 'disabled' => '0',
  939. 'moduleguid' => '',
  940. 'static' => '0',
  941. 'static_file' => 'core/components/controlerrorlog/elements/plugins/plugin.controlerrorlog.php',
  942. ),
  943. 12 =>
  944. array (
  945. 'id' => '12',
  946. 'source' => '0',
  947. 'property_preprocess' => '0',
  948. 'name' => 'GatewayManager',
  949. 'description' => 'The manager for all you gateways',
  950. 'editor_type' => '0',
  951. 'category' => '22',
  952. 'cache_type' => '0',
  953. 'plugincode' => '/**
  954. * GatewayManager
  955. * The manager for all you gateway domains
  956. *
  957. * @package gatewaymanager
  958. * @author Bert Oost at OostDesign.nl <bert@oostdesign.nl>
  959. *
  960. * @var modX|xPDO $modx
  961. * @var array $scriptProperties
  962. */
  963. if ($modx->context->get(\'key\') == \'mgr\') {
  964. return;
  965. }
  966. $corePath = $modx->getOption(\'gatewaymanager.core_path\', null, $modx->getOption(\'core_path\') . \'components/gatewaymanager/\');
  967. $gateway = $modx->getService(\'gatewaymanager\', \'GatewayManager\', $corePath . \'model/gatewaymanager/\', $scriptProperties);
  968. if (!($gateway instanceof GatewayManager)) {
  969. return \'\';
  970. }
  971. $gateway->initialize($modx->context->get(\'key\'));
  972. // get the hostname
  973. $hostname = parse_url($_SERVER[\'REQUEST_URI\'], PHP_URL_HOST);
  974. if (empty($hostname)) {
  975. $hostname = $modx->getOption(\'http_host\');
  976. }
  977. // and find the GatewayManager record
  978. $domain = $modx->getObject(\'gatewayDomain\', array(\'domain\' => $hostname, \'active\' => true));
  979. if (!empty($domain) && is_object($domain) && $domain instanceof gatewayDomain) {
  980. // the current context
  981. $currContext = $modx->context;
  982. $currContextKey = $currContext->get(\'key\');
  983. // get the context from the setupped domain
  984. $domContext = $domain->getOne(\'Context\');
  985. $domContextKey = $domContext->get(\'key\');
  986. $sameContext = ($currContextKey == $domContextKey) ? true : false;
  987. if (!$sameContext) {
  988. // switch to the new context
  989. $modx->switchContext($domContextKey);
  990. }
  991. // when domain of context is different then a canonical should be created
  992. $sameDomain = ($currContext->getOption(\'http_host\') == $domContext->getOption(\'http_host\')) ? true : false;
  993. if (!$sameDomain) {
  994. $currContext = $domContext;
  995. }
  996. // site start check (only when trying to reach the homepage)
  997. $urlPath = parse_url($_SERVER[\'REQUEST_URI\'], PHP_URL_PATH);
  998. if ($urlPath == \'/\' || empty($urlPath)) {
  999. $currSiteStart = $currContext->getOption(\'site_start\');
  1000. $siteStart = $domain->get(\'sitestart\');
  1001. $sameSiteStart = ($currSiteStart == $siteStart || empty($siteStart)) ? true : false;
  1002. if (!$sameSiteStart) {
  1003. // when not in same context, set a canonical placeholder
  1004. if ($sameContext || !$sameDomain) {
  1005. $url = $modx->makeUrl($sitestart, $currContext, \'\', \'full\');
  1006. $modx->setPlaceholder(\'gateway.canonical\', $url);
  1007. }
  1008. // send to the new startpage
  1009. $modx->sendForward($siteStart);
  1010. }
  1011. }
  1012. }',
  1013. 'locked' => '0',
  1014. 'properties' => NULL,
  1015. 'disabled' => '0',
  1016. 'moduleguid' => '',
  1017. 'static' => '0',
  1018. 'static_file' => '',
  1019. ),
  1020. 11 =>
  1021. array (
  1022. 'id' => '11',
  1023. 'source' => '1',
  1024. 'property_preprocess' => '0',
  1025. 'name' => 'UsersOnline',
  1026. 'description' => '',
  1027. 'editor_type' => '0',
  1028. 'category' => '20',
  1029. 'cache_type' => '0',
  1030. 'plugincode' => 'if (!$UsersOnline = $modx->getService(\'usersonline\', \'UsersOnline\', $modx->getOption(\'usersonline_core_path\', null,
  1031. $modx->getOption(\'core_path\') . \'components/usersonline/\') . \'model/usersonline/\', $scriptProperties)
  1032. ) {
  1033. return \'Could not load UsersOnline class!\';
  1034. }
  1035. switch ($modx->event->name) {
  1036. case \'OnMODXInit\':
  1037. $context = $modx->context->key;
  1038. if (!$mgr = $modx->getOption(\'usersonline_mgr_check\') and $context == \'mgr\') {
  1039. break;
  1040. }
  1041. if ($user = $modx->getAuthenticatedUser($context)) {
  1042. $blocked = 0;
  1043. $active = $user->get(\'active\');
  1044. if ($profile = $user->getOne(\'Profile\')) {
  1045. $blocked = $profile->get(\'blocked\');
  1046. }
  1047. $id = $user->get(\'id\');
  1048. if (!$userOnline = $modx->getObject(\'userOnline\', array(\'user_id\' => $id, \'context_key\' => $context))) {
  1049. $userOnline = $modx->newObject(\'userOnline\', array(
  1050. \'user_id\' => $id,
  1051. \'context_key\' => $context
  1052. ));
  1053. }
  1054. $userOnline->set(\'lastvisit\', time());
  1055. $userOnline->save();
  1056. if (!$active or $blocked) {
  1057. $response = $response = $modx->runProcessor(\'/security/logout\');
  1058. $modx->sendRedirect($modx->makeUrl($modx->getOption(\'site_start\')));
  1059. }
  1060. }
  1061. break;
  1062. default:
  1063. break;
  1064. }',
  1065. 'locked' => '0',
  1066. 'properties' => NULL,
  1067. 'disabled' => '0',
  1068. 'moduleguid' => '',
  1069. 'static' => '1',
  1070. 'static_file' => 'core/components/usersonline/elements/plugins/plugin.usersonline.php',
  1071. ),
  1072. 14 =>
  1073. array (
  1074. 'id' => '14',
  1075. 'source' => '0',
  1076. 'property_preprocess' => '0',
  1077. 'name' => 'Fred',
  1078. 'description' => '',
  1079. 'editor_type' => '0',
  1080. 'category' => '27',
  1081. 'cache_type' => '0',
  1082. 'plugincode' => '/*
  1083. * This file is part of the Fred package.
  1084. *
  1085. * Copyright (c) MODX, LLC
  1086. *
  1087. * For the full copyright and license information, please view the LICENSE
  1088. * file that was distributed with this source code.
  1089. */
  1090. $corePath = $modx->getOption(\'fred.core_path\', null, $modx->getOption(\'core_path\', null, MODX_CORE_PATH) . \'components/fred/\');
  1091. /** @var Fred $fred */
  1092. $fred = $modx->getService(
  1093. \'fred\',
  1094. \'Fred\',
  1095. $corePath . \'model/fred/\',
  1096. array(
  1097. \'core_path\' => $corePath
  1098. )
  1099. );
  1100. switch ($modx->event->name) {
  1101. case \'OnDocFormPrerender\':
  1102. if(!empty($resource) && !empty($fred->getTheme($resource->template))) {
  1103. //Disable ContentBlocks
  1104. $isContentBlocks = $resource->getProperty(\'_isContentBlocks\', \'contentblocks\', null);
  1105. if($isContentBlocks !== false){
  1106. $resource->setProperty(\'_isContentBlocks\', false, \'contentblocks\');
  1107. $resource->save();
  1108. }
  1109. $data = $resource->getProperty(\'data\', \'fred\');
  1110. $fingerprint = !empty($data[\'fingerprint\']) ? $data[\'fingerprint\'] : \'\';
  1111. //Load Open in Fred button
  1112. $modx->lexicon->load(\'fred:default\');
  1113. $modx->controller->addLexiconTopic(\'fred:default\');
  1114. $modx->controller->addHtml("
  1115. <script>
  1116. Ext.ComponentMgr.onAvailable(\'modx-resource-content\', function(right) {
  1117. right.on(\'beforerender\', function() {
  1118. var content = Ext.getCmp(\'ta\'),
  1119. contentvalue = content.getValue(),
  1120. panel = Ext.getCmp(\'modx-page-update-resource\');
  1121. content.destroy();
  1122. right.insert(0,{
  1123. xtype: \'button\'
  1124. ,fieldLabel: _(\'fred.open_in_fred\')
  1125. ,hideLabel: true
  1126. ,cls: \'primary-button\'
  1127. ,style: {padding: \'10px 15px\'}
  1128. ,html: _(\'fred.open_in_fred\')
  1129. ,handler: function(){
  1130. window.open(panel.config.preview_url)
  1131. }
  1132. });
  1133. right.insert(1,{
  1134. xtype: \'textarea\'
  1135. ,hideLabel: true
  1136. ,anchor: \'100%\'
  1137. ,grow: true
  1138. ,style: {marginTop:\'15px\'}
  1139. ,disabled: true
  1140. ,value: contentvalue
  1141. });
  1142. });
  1143. right.on(\'afterrender\', function() {
  1144. var panel = Ext.getCmp(\'modx-panel-resource\');
  1145. panel.on(\'success\', function(){
  1146. location.reload();
  1147. });
  1148. var fingerprint = document.createElement(\'input\');
  1149. fingerprint.setAttribute(\'type\', \'hidden\');
  1150. fingerprint.setAttribute(\'name\', \'fingerprint\');
  1151. fingerprint.setAttribute(\'value\', \'" . $fingerprint . "\');
  1152. panel.form.el.dom.appendChild(fingerprint);
  1153. });
  1154. });
  1155. </script>");
  1156. }
  1157. break;
  1158. case \'OnLoadWebDocument\':
  1159. $theme = $fred->getTheme($modx->resource->template);
  1160. if (!empty($theme)) {
  1161. $themeUri = $theme->getThemeFolderUri();
  1162. $modx->setPlaceholder(\'+fred.theme_dir\', $themeUri);
  1163. $modx->setOption(\'fred.theme_dir\', $themeUri);
  1164. }
  1165. break;
  1166. case \'OnWebPagePrerender\':
  1167. $theme = $fred->getTheme($modx->resource->template);
  1168. if (!empty($theme)) {
  1169. if (!$modx->user) return;
  1170. if (!($modx->user->hasSessionContext(\'mgr\') || $modx->user->hasSessionContext($modx->resource->context_key))) return;
  1171. if (!$modx->hasPermission(\'fred\')) return;
  1172. $modx->lexicon->load(\'fred:fe\');
  1173. $fredMode = 1;
  1174. if (isset($_SESSION[\'fred\'])) {
  1175. $fredMode = intval($_SESSION[\'fred\']);
  1176. }
  1177. if (isset($_GET[\'fred\'])) {
  1178. $fredMode = intval($_GET[\'fred\']);
  1179. }
  1180. if ($fredMode === 4) {
  1181. $fredMode = 0;
  1182. $_SESSION[\'fred\'] = 0;
  1183. }
  1184. if ($fredMode === 1) {
  1185. $_SESSION[\'fred\'] = 1;
  1186. }
  1187. $get = $_GET;
  1188. unset($get[$modx->getOption(\'request_param_alias\', [], \'q\')]);
  1189. if ($fredMode === 0) {
  1190. $button = "<a href=\\"" . str_replace(\'&amp;\', \'&\', $modx->makeUrl($modx->resource->id, \'\', array_merge($get, [\'fred\' => 1]) , \'abs\')) . "\\" title=\\"" . $modx->lexicon(\'fred.fe.turn_on_fred\') . "\\" role=\\"button\\" style=\\"display: block; text-decoration: none; background-color: #4D4D4D; background-image: url(&quot;data:image/svg+xml, %3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'48\' height=\'48\' viewBox=\'-14.584 -8.583 48 48\'%3E%3ClinearGradient id=\'a\' gradientUnits=\'userSpaceOnUse\' x1=\'2164.318\' y1=\'-2519.043\' x2=\'2047.448\' y2=\'-2442.941\' gradientTransform=\'matrix(.1471 0 0 -.1471 -290.574 -365.794)\'%3E%3Cstop offset=\'0\' stop-color=\'%2380c3e6\'/%3E%3Cstop offset=\'1\' stop-color=\'%233380c2\'/%3E%3C/linearGradient%3E%3Cpath fill=\'url(%23a)\' d=\'M22.035 11.468l9.602-15.406H8.488L5.236 1.17z\'/%3E%3Cpath opacity=\'.15\' d=\'M5.236 1.17l1.702-2.633 15.097 12.931z\'/%3E%3ClinearGradient id=\'b\' gradientUnits=\'userSpaceOnUse\' x1=\'2184.769\' y1=\'-2694.977\' x2=\'2097.394\' y2=\'-2637.275\' gradientTransform=\'matrix(.1471 0 0 -.1471 -290.574 -365.794)\'%3E%3Cstop offset=\'0\' stop-color=\'%23f38649\'/%3E%3Cstop offset=\'.185\' stop-color=\'%23f28147\'/%3E%3Cstop offset=\'.409\' stop-color=\'%23ef7242\'/%3E%3Cstop offset=\'.654\' stop-color=\'%23ea5a3a\'/%3E%3Cstop offset=\'.911\' stop-color=\'%23e4382e\'/%3E%3Cstop offset=\'1\' stop-color=\'%23e12a29\'/%3E%3C/linearGradient%3E%3Cpath fill=\'url(%23b)\' d=\'M27.068 39.416V16.268l-4.957-3.176L11.583 29.74z\'/%3E%3Cpath opacity=\'.15\' d=\'M11.583 29.74l2.632 1.625 7.896-18.273z\'/%3E%3ClinearGradient id=\'c\' gradientUnits=\'userSpaceOnUse\' x1=\'1896.918\' y1=\'-2571.592\' x2=\'2064.08\' y2=\'-2467.137\' gradientTransform=\'matrix(.1471 0 0 -.1471 -290.574 -365.794)\'%3E%3Cstop offset=\'0\' stop-color=\'%2342ab4a\'/%3E%3Cstop offset=\'1\' stop-color=\'%23add155\'/%3E%3C/linearGradient%3E%3Cpath fill=\'url(%23c)\' d=\'M-10.25-8.583v23.148l5.419 3.175 26.866-6.272z\'/%3E%3ClinearGradient id=\'d\' gradientUnits=\'userSpaceOnUse\' x1=\'1933.576\' y1=\'-2758.292\' x2=\'2069.413\' y2=\'-2540.907\' gradientTransform=\'matrix(.1471 0 0 -.1471 -290.574 -365.794)\'%3E%3Cstop offset=\'0\' stop-color=\'%2342ab4a\'/%3E%3Cstop offset=\'1\' stop-color=\'%23add155\'/%3E%3C/linearGradient%3E%3Cpath fill=\'url(%23d)\' d=\'M-4.985 19.52l-9.599 15.093H8.565l13.546-21.521z\'/%3E%3C/svg%3E&quot;); height: 48px; width: 48px; border-radius: 50%; outline: 0; border: none; background-repeat: no-repeat; background-size: 60%; background-position: center; box-shadow: rgba(18,55,100,0.34) 0 4px 8px; margin: 0; padding: 0; text-indent: -9999px; cursor: pointer; position: fixed; z-index: 10010; margin: 32px; bottom: 0; left: 0; opacity: 0.8; transition: .3s; box-sizing: border-box;\\" onmouseover=\\"this.style.transform=\'scale(1.05)\';\\" onmouseout=\\"this.style.transform=\'initial\'\\";>Fred</a>";
  1191. $modx->resource->_output = preg_replace(\'/(<\\/body>(?:<\\/body>)?)/i\', "{$button}\\r\\n$1", $modx->resource->_output);
  1192. return;
  1193. }
  1194. if ($fredMode === 3) {
  1195. $modx->resource->_output = \'\';
  1196. return;
  1197. }
  1198. $html = Wa72\\HtmlPageDom\\HtmlPageCrawler::create($modx->resource->_output);
  1199. $dzs = $html->filter(\'[data-fred-dropzone]\');
  1200. $dzs->each(function(Wa72\\HtmlPageDom\\HtmlPageCrawler $node, $i) {
  1201. $node->setInnerHtml(\'\');
  1202. });
  1203. $modx->resource->_output = $html->saveHTML();
  1204. if ($fredMode === 2) {
  1205. return;
  1206. }
  1207. $scripts = $html->filter(\'script\');
  1208. $scripts->each(function(Wa72\\HtmlPageDom\\HtmlPageCrawler $node, $i) {
  1209. $newNode = Wa72\\HtmlPageDom\\HtmlPageCrawler::create(\'<script-fred></script-fred>\');
  1210. $attrs = $node->getNode(0)->attributes;
  1211. foreach ($attrs as $attr) {
  1212. $newNode->attr($attr->nodeName, $attr->nodeValue);
  1213. }
  1214. $newNode->setAttribute(\'data-fred-script\', $node->getInnerHtml());
  1215. $node->replaceWith($newNode);
  1216. });
  1217. $modx->resource->_output = $html->saveHTML();
  1218. $beforeRenderResults = $modx->invokeEvent(\'FredBeforeRender\');
  1219. $includes = \'\';
  1220. $beforeRender = \'\';
  1221. $lexicons = [];
  1222. foreach ($beforeRenderResults as $result) {
  1223. if ($result[\'includes\']) {
  1224. $includes .= $result[\'includes\'];
  1225. }
  1226. if ($result[\'beforeRender\']) {
  1227. $beforeRender .= $result[\'beforeRender\'];
  1228. }
  1229. if ($result[\'lexicons\'] && is_array($result[\'lexicons\'])) {
  1230. $lexicons = array_merge($lexicons, $result[\'lexicons\']);
  1231. }
  1232. }
  1233. /** @var FredElementRTEConfig[] $rteConfigs */
  1234. $rteConfigs = $modx->getIterator(\'FredElementRTEConfig\');
  1235. $rteConfigString = [];
  1236. foreach ($rteConfigs as $rteConfig) {
  1237. if (empty($rteConfig->get(\'data\'))) continue;
  1238. $rteConfigString[] = $rteConfig->name . \':\' . $rteConfig->data;
  1239. }
  1240. $rteConfigString = implode(\',\', $rteConfigString);
  1241. $payload = [
  1242. \'iss\' => $modx->user->id,
  1243. \'resource\' => $modx->resource->id,
  1244. \'context\' => $modx->resource->context_key,
  1245. \'queryParams\' => $_GET
  1246. ];
  1247. $jwt = \\Firebase\\JWT\\JWT::encode($payload, $fred->getSecret());
  1248. $fredContent = \'
  1249. <script type="text/javascript" src="\' . $fred->getOption(\'webAssetsUrl\') . \'fred.min.js"></script>
  1250. <link rel="stylesheet" href="\' . $fred->getOption(\'webAssetsUrl\') . \'fred.css" type="text/css" />
  1251. \' . $includes . \'
  1252. <script>
  1253. var fred = new Fred({
  1254. theme: \' . $theme->id . \',
  1255. assetsUrl: "\' . $fred->getOption(\'webAssetsUrl\') . \'",
  1256. managerUrl: "\' . MODX_MANAGER_URL . \'",
  1257. fredOffUrl: "\' . str_replace(\'&amp;\', \'&\', $modx->makeUrl($modx->resource->id, \'\', array_merge($get, [\'fred\' => 4]) , \'abs\')) . \'",
  1258. contextKey: "\' . $modx->resource->context_key. \'",
  1259. launcherPosition: "\' . $fred->getOption(\'launcher_position\') . \'",
  1260. iconEditor: "\' . $fred->getOption(\'icon_editor\') . \'",
  1261. imageEditor: "\' . $fred->getOption(\'image_editor\') . \'",
  1262. rte: "\' . $fred->getOption(\'rte\') . \'",
  1263. rteConfig: {\' . $rteConfigString . \'},
  1264. jwt: "\' . $jwt . \'",
  1265. resource: {
  1266. "id": \' . $modx->resource->id . \',
  1267. "parent": \' . $modx->resource->parent . \',
  1268. "previewUrl": "\' . str_replace(\'&amp;\', \'&\', $modx->makeUrl($modx->resource->id, \'\', array_merge($get, [\'fred\' => 2]) , \'abs\')) . \'",
  1269. "emptyUrl": "\' . str_replace(\'&amp;\', \'&\', $modx->makeUrl($modx->resource->id, \'\', array_merge($get, [\'fred\' => 3]) , \'abs\')) . \'",
  1270. "save": \' . (int)$modx->resource->checkPolicy(\'save\') . \',
  1271. "delete": \' . (int)$modx->resource->checkPolicy(\'delete\') . \',
  1272. "undelete": \' . (int)$modx->resource->checkPolicy(\'undelete\') . \',
  1273. "publish": \' . (int)$modx->resource->checkPolicy(\'publish\') . \',
  1274. "unpublish": \' . (int)$modx->resource->checkPolicy(\'unpublish\') . \',
  1275. },
  1276. permission: {
  1277. "fred_settings": \' . (int)$modx->hasPermission(\'fred_settings\') . \',
  1278. "fred_settings_advanced": \' . (int)$modx->hasPermission(\'fred_settings_advanced\') . \',
  1279. "fred_settings_tags": \' . (int)$modx->hasPermission(\'fred_settings_tags\') . \',
  1280. "fred_settings_tvs": \' . (int)$modx->hasPermission(\'fred_settings_tvs\') . \',
  1281. "fred_elements": \' . (int)$modx->hasPermission(\'fred_elements\') . \',
  1282. "fred_blueprints": \' . (int)$modx->hasPermission(\'fred_blueprints\') . \',
  1283. "fred_element_screenshot": \' . (int)$modx->hasPermission(\'fred_element_screenshot\') . \',
  1284. "fred_element_move": \' . (int)$modx->hasPermission(\'fred_element_move\') . \',
  1285. "fred_element_delete": \' . (int)$modx->hasPermission(\'fred_element_delete\') . \',
  1286. "fred_blueprint_categories_save": \' . (int)$modx->hasPermission(\'fred_blueprint_categories_save\') . \',
  1287. "fred_blueprint_categories_create_public": \' . (int)$modx->hasPermission(\'fred_blueprint_categories_create_public\') . \',
  1288. "fred_blueprints_save": \' . (int)$modx->hasPermission(\'fred_blueprints_save\') . \',
  1289. "fred_blueprints_create_public": \' . (int)$modx->hasPermission(\'fred_blueprints_create_public\') . \',
  1290. "save_document": \' . (int)$modx->hasPermission(\'save_document\') . \',
  1291. "delete_document" : \' . (int)$modx->hasPermission(\'delete_document\') . \',
  1292. "undelete_document" : \' . (int)$modx->hasPermission(\'undelete_document\') . \',
  1293. "publish_document" : \' . (int)$modx->hasPermission(\'publish_document\') . \',
  1294. "unpublish_document" : \' . (int)$modx->hasPermission(\'unpublish_document\') . \',
  1295. "new_document" : \' . (int)$modx->hasPermission(\'new_document\') . \',
  1296. "resource_duplicate" : \' . (int)$modx->hasPermission(\'resource_duplicate\') . \',
  1297. "new_document_in_root" : \' . (int)$modx->hasPermission(\'new_document_in_root\') . \'
  1298. },
  1299. lexicons: \' . json_encode($lexicons) . \',
  1300. beforeRender: function() {
  1301. \' . $beforeRender . \'
  1302. }
  1303. });
  1304. </script>\';
  1305. $modx->resource->_output = preg_replace(\'/(<\\/head>(?:<\\/head>)?)/i\', "{$fredContent}\\r\\n$1", $modx->resource->_output);
  1306. }
  1307. break;
  1308. case \'OnBeforeDocFormSave\':
  1309. if ($mode !== \'upd\') return;
  1310. if (empty($fred->getTheme($resource->template))) return;
  1311. $data = $resource->getProperty(\'data\', \'fred\');
  1312. if (!empty($data[\'fingerprint\'])) {
  1313. if (empty($resource->fingerprint)) {
  1314. $modx->event->_output = \'No fingerprint was provided.\';
  1315. return;
  1316. }
  1317. if ($data[\'fingerprint\'] !== $resource->fingerprint) {
  1318. $modx->event->_output = \'Your page is outdated, please reload the page.\';
  1319. return;
  1320. }
  1321. }
  1322. break;
  1323. case \'OnDocFormSave\':
  1324. if ($mode !== \'upd\') return;
  1325. if (empty($fred->getTheme($resource->template))) return;
  1326. $renderResource = new \\Fred\\RenderResource($resource, $modx);
  1327. $renderResource->render();
  1328. break;
  1329. case \'OnTemplateRemove\':
  1330. /** @var modTemplate $template */
  1331. $templateId = $template->id;
  1332. if (!empty($templateId)) {
  1333. /** @var FredThemedTemplate $themedTemplate */
  1334. $themedTemplate = $modx->getObject(\'FredThemedTemplate\', [\'template\' => $templateId]);
  1335. if ($themedTemplate) {
  1336. $themedTemplate->remove();
  1337. }
  1338. }
  1339. break;
  1340. case \'OnTVInputRenderList\':
  1341. $modx->event->output($corePath . \'elements/tvs/input/\');
  1342. break;
  1343. case \'OnTVInputPropertiesList\':
  1344. $modx->event->output($corePath . \'elements/tvs/input/options/\');
  1345. break;
  1346. case \'OnManagerPageBeforeRender\':
  1347. $modx->controller->addLexiconTopic(\'fred:default\');
  1348. break;
  1349. }
  1350. return;',
  1351. 'locked' => '0',
  1352. 'properties' => 'a:0:{}',
  1353. 'disabled' => '0',
  1354. 'moduleguid' => '',
  1355. 'static' => '0',
  1356. 'static_file' => '',
  1357. ),
  1358. 21 =>
  1359. array (
  1360. 'id' => '21',
  1361. 'source' => '1',
  1362. 'property_preprocess' => '0',
  1363. 'name' => 'HybridAuth',
  1364. 'description' => '',
  1365. 'editor_type' => '0',
  1366. 'category' => '42',
  1367. 'cache_type' => '0',
  1368. 'plugincode' => 'switch ($modx->event->name) {
  1369. case \'OnHandleRequest\':
  1370. if ($modx->context->key != \'web\' && !$modx->user->id) {
  1371. if ($user = $modx->getAuthenticatedUser($modx->context->key)) {
  1372. $modx->user = $user;
  1373. $modx->getUser($modx->context->key);
  1374. }
  1375. }
  1376. if ($modx->user->isAuthenticated($modx->context->key)) {
  1377. if (!$modx->user->active || $modx->user->Profile->blocked) {
  1378. $modx->runProcessor(\'security/logout\');
  1379. $modx->sendRedirect($modx->makeUrl($modx->getOption(\'site_start\'), \'\', \'\', \'full\'));
  1380. }
  1381. }
  1382. if (!empty($_REQUEST[\'hauth_action\']) || !empty($_REQUEST[\'hauth_done\'])) {
  1383. $config = !empty($_SESSION[\'HybridAuth\'][$modx->context->key])
  1384. ? $_SESSION[\'HybridAuth\'][$modx->context->key]
  1385. : array();
  1386. $path = MODX_CORE_PATH . \'components/hybridauth/model/hybridauth/\';
  1387. /** @var HybridAuth $HybridAuth */
  1388. if ($HybridAuth = $modx->getService(\'HybridAuth\', \'HybridAuth\', $path, $config)) {
  1389. if (!empty($_REQUEST[\'hauth_action\'])) {
  1390. switch ($_REQUEST[\'hauth_action\']) {
  1391. case \'login\':
  1392. if (!empty($_REQUEST[\'provider\'])) {
  1393. $HybridAuth->Login($_REQUEST[\'provider\']);
  1394. } else {
  1395. $HybridAuth->Refresh();
  1396. }
  1397. break;
  1398. case \'logout\':
  1399. $HybridAuth->Logout();
  1400. break;
  1401. case \'unbind\':
  1402. if (!empty($_REQUEST[\'provider\'])) {
  1403. $HybridAuth->runProcessor(\'web/service/remove\', array(
  1404. \'provider\' => $_REQUEST[\'provider\'],
  1405. ));
  1406. }
  1407. $HybridAuth->Refresh();
  1408. break;
  1409. }
  1410. } else {
  1411. $HybridAuth->Login($_REQUEST[\'hauth_done\']);
  1412. }
  1413. }
  1414. }
  1415. break;
  1416. case \'OnWebAuthentication\':
  1417. $modx->event->_output = !empty($_SESSION[\'HybridAuth\'][\'verified\']);
  1418. unset($_SESSION[\'HybridAuth\'][\'verified\']);
  1419. break;
  1420. case \'OnUserFormPrerender\':
  1421. /** @var modUser $user */
  1422. if (!isset($user) || $user->get(\'id\') < 1) {
  1423. return;
  1424. }
  1425. $path = MODX_CORE_PATH . \'components/hybridauth/model/hybridauth/\';
  1426. if ($HybridAuth = $modx->getService(\'HybridAuth\', \'HybridAuth\', $path)) {
  1427. $HybridAuth->regManagerTab($modx->controller, $user);
  1428. }
  1429. break;
  1430. }',
  1431. 'locked' => '0',
  1432. 'properties' => NULL,
  1433. 'disabled' => '0',
  1434. 'moduleguid' => '',
  1435. 'static' => '0',
  1436. 'static_file' => 'core/components/hybridauth/elements/plugins/plugin.hybridauth.php',
  1437. ),
  1438. 17 =>
  1439. array (
  1440. 'id' => '17',
  1441. 'source' => '0',
  1442. 'property_preprocess' => '0',
  1443. 'name' => 'Collections',
  1444. 'description' => '',
  1445. 'editor_type' => '0',
  1446. 'category' => '32',
  1447. 'cache_type' => '0',
  1448. 'plugincode' => '/**
  1449. * Collections
  1450. *
  1451. * DESCRIPTION
  1452. *
  1453. * This plugin inject JS to handle proper working of close buttons in Resource\'s panel (OnDocFormPrerender)
  1454. * This plugin handles setting proper show_in_tree parameter (OnBeforeDocFormSave, OnResourceSort)
  1455. *
  1456. * @var modX $modx
  1457. * @var array $scriptProperties
  1458. */
  1459. $corePath = $modx->getOption(\'collections.core_path\', null, $modx->getOption(\'core_path\', null, MODX_CORE_PATH) . \'components/collections/\');
  1460. /** @var Collections $collections */
  1461. $collections = $modx->getService(
  1462. \'collections\',
  1463. \'Collections\',
  1464. $corePath . \'model/collections/\',
  1465. array(
  1466. \'core_path\' => $corePath
  1467. )
  1468. );
  1469. if (!($collections instanceof Collections)) return \'\';
  1470. $className = "\\\\Collections\\\\Events\\\\{$modx->event->name}";
  1471. if (class_exists($className)) {
  1472. /** @var \\Collections\\Events\\Event $handler */
  1473. $handler = new $className($modx, $scriptProperties);
  1474. $handler->run();
  1475. }
  1476. return;',
  1477. 'locked' => '0',
  1478. 'properties' => 'a:0:{}',
  1479. 'disabled' => '0',
  1480. 'moduleguid' => '',
  1481. 'static' => '0',
  1482. 'static_file' => '',
  1483. ),
  1484. 24 =>
  1485. array (
  1486. 'id' => '24',
  1487. 'source' => '0',
  1488. 'property_preprocess' => '0',
  1489. 'name' => 'seoPro',
  1490. 'description' => 'SEO optimizing plugin for MODx Revolution.',
  1491. 'editor_type' => '0',
  1492. 'category' => '47',
  1493. 'cache_type' => '0',
  1494. 'plugincode' => '/**
  1495. * The base seoPro snippet.
  1496. *
  1497. * @package seopro
  1498. */
  1499. $seoPro = $modx->getService(\'seopro\', \'seoPro\', $modx->getOption(\'seopro.core_path\', null, $modx->getOption(\'core_path\') . \'components/seopro/\') . \'model/seopro/\', $scriptProperties);
  1500. if (!($seoPro instanceof seoPro)) {
  1501. return \'\';
  1502. }
  1503. $disabledTemplates = explode(\',\', $modx->getOption(\'seopro.disabledtemplates\', null, \'0\'));
  1504. switch ($modx->event->name) {
  1505. case \'OnMODXInit\':
  1506. $version = $modx->getVersionData();
  1507. $version = (int)($version[\'version\'] . $version[\'major_version\']);
  1508. if ($version < 27) {
  1509. $modx->loadClass(\'modResource\');
  1510. $modx->map[\'modResource\'][\'fieldMeta\'][\'description\'] = array(
  1511. \'dbtype\' => \'text\',
  1512. \'phptype\' => \'string\',
  1513. \'index\' => \'fulltext\',
  1514. \'indexgrp\' => \'content_ft_idx\',
  1515. );
  1516. }
  1517. break;
  1518. case \'OnDocFormRender\':
  1519. $template = (string)$resource->get(\'template\');
  1520. $override = false;
  1521. if (isset($_REQUEST[\'template\'])) {
  1522. $template = (string)$_REQUEST[\'template\'];
  1523. $override = true;
  1524. }
  1525. if (($override && $template === \'0\') || (!empty($template) && in_array($template, $disabledTemplates))) {
  1526. break;
  1527. }
  1528. $currClassKey = $resource->get(\'class_key\');
  1529. $strFields = $modx->getOption(\'seopro.fields\', null, \'pagetitle:70,longtitle:70,description:320,alias:2023,menutitle:2023\');
  1530. $arrFields = array();
  1531. if (is_array(explode(\',\', $strFields))) {
  1532. foreach (explode(\',\', $strFields) as $field) {
  1533. list($fieldName, $fieldCount) = explode(\':\', $field);
  1534. $arrFields[$fieldName] = $fieldCount;
  1535. }
  1536. } else {
  1537. return \'\';
  1538. }
  1539. $keywords = \'\';
  1540. $modx->controller->addLexiconTopic(\'seopro:default\');
  1541. $ctxKey = !empty($resource) ? $resource->get(\'context_key\') : $modx->getOption(\'default_context\');
  1542. $ctx = $modx->getContext($ctxKey);
  1543. if ($ctx) {
  1544. $url = $ctx->getOption(\'site_url\', \'\', $modx->getOption(\'site_url\'));
  1545. } else {
  1546. $url = $modx->getOption(\'site_url\');
  1547. }
  1548. if ($mode == \'upd\') {
  1549. if ($ctx) {
  1550. if ($resource->get(\'id\') != $ctx->getOption(\'site_start\', \'\', $modx->getOption(\'site_start\'))) {
  1551. $url .= $resource->get(\'uri\');
  1552. }
  1553. } else {
  1554. $url = $modx->makeUrl($resource->get(\'id\'), \'\', \'\', \'full\');
  1555. }
  1556. $url = str_replace(
  1557. $resource->get(\'alias\'),
  1558. \'<span id=\\"seopro-replace-alias\\">\' . $resource->get(\'alias\') . \'</span>\',
  1559. $url
  1560. );
  1561. $seoKeywords = $modx->getObject(\'seoKeywords\', array(\'resource\' => $resource->get(\'id\')));
  1562. if ($seoKeywords) {
  1563. $keywords = $seoKeywords->get(\'keywords\');
  1564. }
  1565. }
  1566. if ($_REQUEST[\'id\'] == $modx->getOption(\'site_start\')) {
  1567. unset($arrFields[\'alias\']);
  1568. unset($arrFields[\'menutitle\']);
  1569. }
  1570. $config = $seoPro->config;
  1571. unset($config[\'resource\']);
  1572. $modx->regClientStartupHTMLBlock(\'<script type="text/javascript">
  1573. Ext.onReady(function() {
  1574. seoPro.config = \' . $modx->toJSON($config) . \';
  1575. seoPro.config.record = "\' . $keywords . \'";
  1576. seoPro.config.values = {};
  1577. seoPro.config.fields = "\' . implode(",", array_keys($arrFields)) . \'";
  1578. seoPro.config.chars = \' . $modx->toJSON($arrFields) . \'
  1579. seoPro.config.url = "\' . $url . \'";
  1580. });</script>\');
  1581. /* include CSS and JS*/
  1582. $version = $modx->getVersionData();
  1583. if($version[\'version\'] == 2 && $version[\'major_version\'] == 2){
  1584. $modx->regClientCSS($seoPro->config[\'assetsUrl\'] . \'css/mgr.css\');
  1585. }else{
  1586. $modx->regClientCSS($seoPro->config[\'assetsUrl\'] . \'css/mgr23.css\');
  1587. }
  1588. $modx->regClientStartupScript($seoPro->config[\'assetsUrl\'] . \'js/mgr/seopro.js??v=\' . $modx->getOption(\'seopro.version\', null, \'v1.0.0\'));
  1589. $modx->regClientStartupScript($seoPro->config[\'assetsUrl\'] . \'js/mgr/resource.js?v=\' . $modx->getOption(\'seopro.version\', null, \'v1.0.0\'));
  1590. break;
  1591. case \'OnDocFormSave\':
  1592. $template = (string)$resource->get(\'template\');
  1593. $override = false;
  1594. if (isset($_REQUEST[\'template\'])) {
  1595. $template = (string)$_REQUEST[\'template\'];
  1596. $override = true;
  1597. }
  1598. if (($override && $template === \'0\') || (!empty($template) && in_array($template, $disabledTemplates))) {
  1599. break;
  1600. }
  1601. $seoKeywords = $modx->getObject(\'seoKeywords\', array(\'resource\' => $resource->get(\'id\')));
  1602. if (!$seoKeywords && isset($resource)) {
  1603. $seoKeywords = $modx->newObject(\'seoKeywords\', array(\'resource\' => $resource->get(\'id\')));
  1604. }
  1605. if($seoKeywords){
  1606. if (isset($_POST[\'keywords\'])){
  1607. $seoKeywords->set(\'keywords\', trim($_POST[\'keywords\'], \',\'));
  1608. } else {
  1609. $seoKeywords->set(\'keywords\', \'\');
  1610. }
  1611. $seoKeywords->save();
  1612. }
  1613. break;
  1614. case \'onResourceDuplicate\':
  1615. $template = (string)$resource->get(\'template\');
  1616. $override = false;
  1617. if (isset($_REQUEST[\'template\'])) {
  1618. $template = (string)$_REQUEST[\'template\'];
  1619. $override = true;
  1620. }
  1621. if (($override && $template === \'0\') || (!empty($template) && in_array($template, $disabledTemplates))) {
  1622. break;
  1623. }
  1624. $seoKeywords = $modx->getObject(\'seoKeywords\', array(\'resource\' => $resource->get(\'id\')));
  1625. if (!$seoKeywords) {
  1626. $seoKeywords = $modx->newObject(\'seoKeywords\', array(\'resource\' => $resource->get(\'id\')));
  1627. }
  1628. $newSeoKeywords = $modx->newObject(\'seoKeywords\');
  1629. $newSeoKeywords->fromArray($seoKeywords->toArray());
  1630. $newSeoKeywords->set(\'resource\', $newResource->get(\'id\'));
  1631. $newSeoKeywords->save();
  1632. break;
  1633. case \'OnLoadWebDocument\':
  1634. if ($modx->context->get(\'key\') == "mgr") {
  1635. break;
  1636. }
  1637. $template = ($modx->resource->get(\'template\')) ? (string)$modx->resource->get(\'template\') : \'\';
  1638. if (in_array($template, $disabledTemplates)) {
  1639. break;
  1640. }
  1641. $seoKeywords = $modx->getObject(\'seoKeywords\', array(\'resource\' => $modx->resource->get(\'id\')));
  1642. if ($seoKeywords) {
  1643. $keyWords = $seoKeywords->get(\'keywords\');
  1644. $modx->setPlaceholder(\'seoPro.keywords\', $keyWords);
  1645. }
  1646. // Render the meta title, based on system settings
  1647. $titleFormat = $modx->getOption(\'seopro.title_format\');
  1648. if (empty($titleFormat)) {
  1649. $siteDelimiter = $modx->getOption(\'seopro.delimiter\', null, \'/\');
  1650. $siteUseSitename = (boolean)$modx->getOption(\'seopro.usesitename\', null, true);
  1651. $siteID = $modx->resource->get(\'id\');
  1652. $siteName = $modx->getOption(\'site_name\');
  1653. $longtitle = $modx->resource->get(\'longtitle\');
  1654. $pagetitle = $modx->resource->get(\'pagetitle\');
  1655. $seoProTitle = array();
  1656. if ($siteID == $modx->getOption(\'site_start\')) {
  1657. $seoProTitle[\'pagetitle\'] = !empty($longtitle) ? $longtitle : $siteName;
  1658. } else {
  1659. $seoProTitle[\'pagetitle\'] = !empty($longtitle) ? $longtitle : $pagetitle;
  1660. if ($siteUseSitename) {
  1661. $seoProTitle[\'delimiter\'] = $siteDelimiter;
  1662. $seoProTitle[\'sitename\'] = $siteName;
  1663. }
  1664. }
  1665. $title = implode(\' \', $seoProTitle);
  1666. } else {
  1667. $title = $modx->getOption(\'seopro.title_format\');
  1668. }
  1669. $modx->setPlaceholder(\'seoPro.title\', $title);
  1670. break;
  1671. }',
  1672. 'locked' => '0',
  1673. 'properties' => 'a:0:{}',
  1674. 'disabled' => '0',
  1675. 'moduleguid' => '',
  1676. 'static' => '0',
  1677. 'static_file' => '',
  1678. ),
  1679. 18 =>
  1680. array (
  1681. 'id' => '18',
  1682. 'source' => '0',
  1683. 'property_preprocess' => '0',
  1684. 'name' => 'phpThumbOfCacheManager',
  1685. 'description' => 'Handles cache cleaning when clearing the Site Cache.',
  1686. 'editor_type' => '0',
  1687. 'category' => '33',
  1688. 'cache_type' => '0',
  1689. 'plugincode' => '/*
  1690. * Handles cache cleanup
  1691. * pThumb
  1692. * Copyright 2013 Jason Grant
  1693. *
  1694. * Please see the GitHub page for documentation or to report bugs:
  1695. * https://github.com/oo12/phpThumbOf
  1696. *
  1697. * pThumb is free software; you can redistribute it and/or modify it
  1698. * under the terms of the GNU General Public License as published by the Free
  1699. * Software Foundation; either version 2 of the License, or (at your option) any
  1700. * later version.
  1701. *
  1702. * pThumb is distributed in the hope that it will be useful, but WITHOUT ANY
  1703. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  1704. * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  1705. *
  1706. * You should have received a copy of the GNU General Public License along with
  1707. * phpThumbOf; if not, write to the Free Software Foundation, Inc., 59 Temple
  1708. * Place, Suite 330, Boston, MA 02111-1307 USA
  1709. */
  1710. if ($modx->event->name === \'OnSiteRefresh\') {
  1711. if (!$modx->loadClass(\'pThumbCacheCleaner\', MODX_CORE_PATH . \'components/phpthumbof/model/\', true, true)) {
  1712. $modx->log(modX::LOG_LEVEL_ERROR, \'[pThumb] Could not load pThumbCacheCleaner class.\');
  1713. return;
  1714. }
  1715. static $pt_settings = array();
  1716. $pThumb = new pThumbCacheCleaner($modx, $pt_settings, array(), true);
  1717. $pThumb->cleanCache();
  1718. }',
  1719. 'locked' => '0',
  1720. 'properties' => NULL,
  1721. 'disabled' => '0',
  1722. 'moduleguid' => '',
  1723. 'static' => '0',
  1724. 'static_file' => '',
  1725. ),
  1726. 19 =>
  1727. array (
  1728. 'id' => '19',
  1729. 'source' => '0',
  1730. 'property_preprocess' => '0',
  1731. 'name' => 'Tagger',
  1732. 'description' => '',
  1733. 'editor_type' => '0',
  1734. 'category' => '35',
  1735. 'cache_type' => '0',
  1736. 'plugincode' => '/**
  1737. * Tagger
  1738. *
  1739. * DESCRIPTION
  1740. *
  1741. * This plugin inject JS to add Tab with tag groups into Resource panel
  1742. */
  1743. $corePath = $modx->getOption(\'tagger.core_path\', null, $modx->getOption(\'core_path\', null, MODX_CORE_PATH) . \'components/tagger/\');
  1744. /** @var Tagger $tagger */
  1745. $tagger = $modx->getService(
  1746. \'tagger\',
  1747. \'Tagger\',
  1748. $corePath . \'model/tagger/\',
  1749. array(
  1750. \'core_path\' => $corePath
  1751. )
  1752. );
  1753. $className = \'Tagger\' . $modx->event->name;
  1754. $modx->loadClass(\'TaggerPlugin\', $tagger->getOption(\'modelPath\') . \'tagger/events/\', true, true);
  1755. $modx->loadClass($className, $tagger->getOption(\'modelPath\') . \'tagger/events/\', true, true);
  1756. if (class_exists($className)) {
  1757. /** @var TaggerPlugin $handler */
  1758. $handler = new $className($modx, $scriptProperties);
  1759. $handler->run();
  1760. }
  1761. return;',
  1762. 'locked' => '0',
  1763. 'properties' => 'a:0:{}',
  1764. 'disabled' => '0',
  1765. 'moduleguid' => '',
  1766. 'static' => '0',
  1767. 'static_file' => '',
  1768. ),
  1769. 20 =>
  1770. array (
  1771. 'id' => '20',
  1772. 'source' => '1',
  1773. 'property_preprocess' => '0',
  1774. 'name' => 'AdminTools',
  1775. 'description' => '',
  1776. 'editor_type' => '0',
  1777. 'category' => '41',
  1778. 'cache_type' => '0',
  1779. 'plugincode' => '/** @var array $scriptProperties */
  1780. $path = $modx->getOption(\'admintools_core_path\', null, $modx->getOption(\'core_path\') . \'components/admintools/\') . \'services/\';
  1781. /** @var AdminTools $AdminTools */
  1782. $AdminTools = $modx->getService(\'admintools\', \'AdminTools\', $path);
  1783. $elementType = null;
  1784. if ($AdminTools instanceof AdminTools) {
  1785. switch ($modx->event->name) {
  1786. case \'OnManagerPageBeforeRender\':
  1787. if ($modx->user->id) $AdminTools->initialize();
  1788. break;
  1789. case \'OnManagerPageAfterRender\':
  1790. if ($AdminTools->isLocked()) {
  1791. $controller->content = $modx->getChunk(\'tpl.lockScreen\', [
  1792. \'username\' => $modx->user->username,
  1793. \'photo\' => $modx->user->getPhoto(),
  1794. \'title\' => $modx->getOption(\'site_name\'),
  1795. \'lang\' => $modx->getOption(\'manager_language\'),
  1796. \'form_action\' => $AdminTools->getOption(\'connectorUrl\'),
  1797. \'auth\' => $modx->user->getUserToken(\'mgr\'),
  1798. \'assets_url\' => MODX_ASSETS_URL,
  1799. \'input_placeholder\' => $AdminTools->getInputPlaceholder(),
  1800. ]
  1801. );
  1802. }
  1803. break;
  1804. case \'OnDocFormSave\':
  1805. if ($modx->getOption(\'admintools_clear_only_resource_cache\',null,false) && $modx->event->params[\'mode\'] == modSystemEvent::MODE_UPD) {
  1806. if ($resource->get(\'syncsite\')) {
  1807. $AdminTools->clearResourceCache($resource);
  1808. }
  1809. if (!empty($_POST[\'createCache\'])) {
  1810. $AdminTools->createResourceCache($resource->uri);
  1811. }
  1812. }
  1813. break;
  1814. case \'OnManagerPageInit\':
  1815. if (!$modx->user->isAuthenticated(\'mgr\') && $modx->getOption(\'admintools_email_authorization\', null, false)) {
  1816. $id = (int) $modx->getOption(\'admintools_loginform_resource\');
  1817. if (!empty($id) && $modx->getCount(\'modResource\', [\'id\' => $id, \'published\' => 1, \'deleted\' => 0])) {
  1818. $url = $modx->makeUrl($id, \'\', \'\', \'full\');
  1819. $modx->setOption(\'manager_login_url_alternate\', $url);
  1820. }
  1821. }
  1822. break;
  1823. case \'OnManagerAuthentication\':
  1824. if ($modx->getOption(\'admintools_user_can_login\', null, false)) {
  1825. $modx->setOption(\'admintools_user_can_login\', false);
  1826. $modx->event->output(true);
  1827. }
  1828. break;
  1829. case \'OnLoadWebDocument\':
  1830. if ($modx->user->isAuthenticated($modx->context->get(\'key\')) && (!$modx->user->active || $modx->user->Profile->blocked)) {
  1831. $modx->runProcessor(\'security/logout\');
  1832. }
  1833. if ($modx->getOption(\'admintools_alternative_permissions\', null, false) && !$AdminTools->hasPermissions()){
  1834. $modx->sendUnauthorizedPage();
  1835. }
  1836. break;
  1837. case \'OnTempFormPrerender\':
  1838. if ($modx->getOption(\'admintools_template_resource_relationship\', null, true)) {
  1839. $modx->controller->addLastJavascript($AdminTools->getOption(\'jsUrl\') . \'mgr/templates.js\');
  1840. }
  1841. break;
  1842. case \'OnDocFormPrerender\':
  1843. $_html = array();
  1844. $output = \'\';
  1845. if ($modx->getOption(\'admintools_template_resource_relationship\', null, true)) {
  1846. $_html[\'tpl_res_relationship\'] = \'
  1847. var tmpl = Ext.getCmp("modx-resource-template");
  1848. if (tmpl.getValue()) tmpl.label.update(_("resource_template") + "&nbsp;&nbsp;<a href=\\"?a=element/template/update&id=" + tmpl.getValue() + "\\"><i class=\\"icon icon-external-link\\"></i></a>");\';
  1849. }
  1850. if ($modx->getOption(\'admintools_clear_only_resource_cache\', null, true) && $modx->event->params[\'mode\'] != modSystemEvent::MODE_NEW) {
  1851. $_html[\'create_resource_cache\'] = \'
  1852. var cb = Ext.create({
  1853. xtype: "xcheckbox",
  1854. boxLabel: _("admintools_create_resource_cache"),
  1855. description: _("admintools_create_resource_cache_help"),
  1856. hideLabel: true,
  1857. name: "createCache",
  1858. id: "createCache",
  1859. checked: \'. intval($modx->getOption(\'admintools_create_resource_cache\', null, false)) .\'
  1860. });
  1861. if (Ext.getCmp("modx-page-settings-right-box-right")) {
  1862. Ext.getCmp("modx-page-settings-right-box-right").insert(2,cb);
  1863. Ext.getCmp("modx-page-settings-right-box-left").add(Ext.getCmp("modx-resource-uri-override"));
  1864. Ext.getCmp("modx-panel-resource").on("success", function(o){
  1865. if (o.result.object.createCache != 0) {
  1866. cb.setValue(true);
  1867. }
  1868. });
  1869. }\';
  1870. }
  1871. if (!empty($_html)) {
  1872. $output .= \'
  1873. Ext.onReady(function() {
  1874. setTimeout(function(){\' . implode("\\n", $_html) . \'
  1875. }, 200);
  1876. });\';
  1877. }
  1878. if ($modx->getOption(\'admintools_alternative_permissions\', null, true) && $modx->hasPermission(\'access_permissions\')) {
  1879. $modx->controller->addLastJavascript($AdminTools->getOption(\'jsUrl\') . \'mgr/permissions.js\');
  1880. $output .= \'
  1881. Ext.ComponentMgr.onAvailable("modx-resource-tabs", function() {
  1882. this.on("beforerender", function() {
  1883. this.add({
  1884. title: _("admintools_permissions"),
  1885. border: false,
  1886. items: [{
  1887. layout: "anchor",
  1888. border: false,
  1889. items: [{
  1890. html: _("admintools_permissions_desc"),
  1891. border: false,
  1892. bodyCssClass: "panel-desc"
  1893. }, {
  1894. xtype: "admintools-grid-permissions",
  1895. anchor: "100%",
  1896. cls: "main-wrapper",
  1897. resource: \' . $id . \'
  1898. }]
  1899. }]
  1900. });
  1901. });
  1902. });
  1903. \';
  1904. }
  1905. if (!empty($output)) $modx->controller->addHtml(\'<script>\' . $output . \'</script>\');
  1906. break;
  1907. case \'OnMODXInit\':
  1908. if ($modx->context->get(\'key\') !== \'mgr\') {
  1909. if ( $modx->getOption(\'admintools_only_current_context_user\', null, false)
  1910. && $modx->user->isAuthenticated(\'mgr\')
  1911. && !$modx->user->isAuthenticated($modx->context->get(\'key\')) ) {
  1912. $modx->user = $modx->newObject(\'modUser\');
  1913. $modx->user->fromArray(array(\'id\' => 0, \'username\' => $modx->getOption(\'default_username\', \'\', \'(anonymous)\', true)), \'\', true);
  1914. }
  1915. }
  1916. break;
  1917. }
  1918. }',
  1919. 'locked' => '0',
  1920. 'properties' => NULL,
  1921. 'disabled' => '0',
  1922. 'moduleguid' => '',
  1923. 'static' => '0',
  1924. 'static_file' => 'core/components/admintools/elements/plugins/plugin.admintools.php',
  1925. ),
  1926. 23 =>
  1927. array (
  1928. 'id' => '23',
  1929. 'source' => '0',
  1930. 'property_preprocess' => '0',
  1931. 'name' => 'ActivationEmail',
  1932. 'description' => 'Sends email to use on manual activation or (optionally) deactivation.',
  1933. 'editor_type' => '0',
  1934. 'category' => '46',
  1935. 'cache_type' => '0',
  1936. 'plugincode' => '/**
  1937. * ActivationEmail
  1938. *
  1939. * Copyright 2011-2019 Bob Ray
  1940. *
  1941. * @author Bob Ray
  1942. * 1/30/11
  1943. *
  1944. * ActivationEmail is free software; you can redistribute it and/or modify it
  1945. * under the terms of the GNU General Public License as published by the Free
  1946. * Software Foundation; either version 2 of the License, or (at your option) any
  1947. * later version.
  1948. *
  1949. * ActivationEmail is distributed in the hope that it will be useful, but WITHOUT ANY
  1950. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  1951. * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  1952. *
  1953. * You should have received a copy of the GNU General Public License along with
  1954. * ActivationEmail; if not, write to the Free Software Foundation, Inc., 59 Temple
  1955. * Place, Suite 330, Boston, MA 02111-1307 USA
  1956. *
  1957. * @package activationemail
  1958. */
  1959. /**
  1960. * MODX ActivationEmail Snippet
  1961. *
  1962. * Description Sends an email to users on manual activation and
  1963. * (optionally) deactivation.
  1964. *
  1965. * @package activationemail
  1966. *
  1967. *
  1968. * Properties:
  1969. *
  1970. * @property sendOnActivation (boolean) - Set to \'1\' to send the activation email; default \'1\'
  1971. * @property sendOnDeactivation (boolean) - Set to \'1\' to send the deactivation email; default \'0\'
  1972. * @property activationEmailTpl (string) - Tpl chunk for activation email;
  1973. * default: ActivationEmailTpl
  1974. * @property deactivationEmailTpl (string) - Tpl chunk for deactivation email;
  1975. * default: DeactivationEmailTpl
  1976. * @property activationURL (string) url to send activated users to;
  1977. * defaults to site_url System Setting
  1978. * @property deactivationURL (string) url to send deactivated users to;
  1979. * defaults to site_url System Setting
  1980. * @property sitename (string) site name to use in message; defaults
  1981. * to site_name System Setting
  1982. * @property useFullname (boolean) - Use full name in msg instead of username.
  1983. * @property replyToAddress (string) - reply-to address for emails;
  1984. * defaults to emailsender system setting.
  1985. * @property activeSubject (string) - subject for activation emails;
  1986. * defaults to "Registration Approved".
  1987. * @property activeSender(string) - Email Sender for activation emails;
  1988. * defaults to emailsender system setting.
  1989. * @property activeFrom (string) - Email From for activation emails;
  1990. * defaults to emailsender system setting.
  1991. * @property activeFromName(string) - Email From Name for activation emails;
  1992. * defaults to site_name system setting.
  1993. * @property activeReplyTo(string) - Email Reply To for activation emails;
  1994. * defaults to emailsender system setting.
  1995. *
  1996. * @property deActiveSubject (string) - subject for deactivation emails;
  1997. * defaults to "Status Changed to Inactive".
  1998. * @property deActiveSender(string) - Email Sender for deactivation emails;
  1999. * defaults to emailsender system setting.
  2000. * @property deActiveFrom (string) - Email From for deactivation emails;
  2001. * defaults to emailsender system setting.
  2002. * @property deActiveFromName(string) - Email From Name for deactivation emails;
  2003. * defaults to site_name system setting.
  2004. * @property deActiveReplyTo(string) - Email Reply To for deactivation emails;
  2005. * defaults to emailsender system setting.
  2006. *
  2007. * Placeholders:
  2008. * [[+username]]
  2009. * [[+sitename]]
  2010. * [[+activationURL]]
  2011. * [[+deactivationURL]]
  2012. * [[+fromName]]
  2013. *
  2014. */
  2015. /* Connect to OnUserBeforeSave (Note: *not* OnBeforeUserFormSave) */
  2016. /** @var $scriptProperties array */
  2017. /** @var $modx modX $sp */
  2018. /** @var $modx->$xpdo xPDO */
  2019. $sp = $scriptProperties;
  2020. if ($mode != modSystemEvent::MODE_UPD || ! is_object($modx) || !empty($modx->xpdo->config[xPDO::OPT_SETUP])) {
  2021. return \'\';
  2022. }
  2023. $sendActivation = $modx->getOption(\'sendOnActivation\',$sp,true) ? true : false;
  2024. $sendDeactivation = $modx->getOption(\'sendOnDeactivation\',$sp,false) ? true : false;
  2025. $activationEmailTpl = $modx->getOption(\'activationEmailTpl\',$sp,\'ActivationEmailTpl\');
  2026. $deactivationEmailTpl = $modx->getOption(\'deactivationEmailTpl\',$sp,\'DeactivationEmailTpl\');
  2027. /* get the system setting */
  2028. $emailSender = $modx->getOption(\'emailsender\');
  2029. /* This won\'t be used if activeReplyTo or deActiveReplyTo are set */
  2030. $replyTo = $modx->getOption(\'replyToAddress\',$sp, null);
  2031. $replyTo = empty($replyTo) ? $emailSender : $replyTo;
  2032. /* This won\'t be used if activeFromName or deActiveFromName are set */
  2033. $fromName = $modx->getOption(\'fromName\', $sp, null);
  2034. $fromName = empty($fromName) ? $modx->getOption(\'site_name\'): $fromName;
  2035. /* If you hard-code these in the email templates, the settings of
  2036. * these properties be ignored. Otherwise, the system settings will
  2037. * be used unless the properties are set.
  2038. */
  2039. $siteName = $modx->getOption(\'sitename\',$sp);
  2040. $siteName = empty($siteName)? $modx->getOption(\'site_name\') : $siteName;
  2041. $activeURL = $modx->getOption(\'activationURL\', $sp,null);
  2042. $activeURL = empty($activeURL)? $modx->getOption(\'site_url\') : $activeURL ;
  2043. $deActiveURL = $modx->getOption(\'deactivationURL\', $sp,null);
  2044. $deActiveURL = empty($deActiveURL)? $modx->getOption(\'site_url\') : $deActiveURL ;
  2045. $profile = $user->getOne(\'Profile\');
  2046. $email = $profile->get(\'email\');
  2047. $useFullName = $modx->getOption(\'useFullName\', $sp, false);
  2048. $name = $useFullname ? $profile->get(\'fullname\') : $user->get(\'username\');
  2049. $id = $user->get(\'id\');
  2050. $dbUser = $modx->getObject(\'modUser\',$id);
  2051. $before = $dbUser->get(\'active\');
  2052. $after = $user->get(\'active\');
  2053. $fullName = $profile->get(\'fullname\');
  2054. $fields = array(
  2055. \'fullname\' => $fullName,
  2056. \'username\' => $name,
  2057. \'sitename\' => $siteName,
  2058. \'activationURL\' => $activeURL,
  2059. \'deactivationURL\' => $deActiveURL,
  2060. );
  2061. $send = false;
  2062. if ($sendActivation && (empty($before) && $after)) {
  2063. /* activation */
  2064. $_sender = $modx->getOption(\'activeSender\', $sp, null);
  2065. $_sender = empty($_sender)? $emailSender : $_sender;
  2066. $_reply = $modx->getOption(\'activeReplyTo\', $sp, null);
  2067. $_reply = empty($_reply)? $replyTo : $_reply;
  2068. $_from = $modx->getOption(\'activeFrom\', $sp, null);
  2069. $_from = empty($_from)? $emailSender : $_from;
  2070. $_fromName = $modx->getOption(\'activeFromName\', $sp, null);
  2071. $_fromName = empty($_fromName)? $fromName : $_fromName;
  2072. $fields[\'fromName\'] = $_fromName;
  2073. $subject = $modx->getOption(\'activeSubject\', $sp,null);
  2074. $_subject = empty($subject)? \'Registration Approved\' : $subject ;
  2075. $_msg = $modx->getChunk($activationEmailTpl,$fields);
  2076. $send = true;
  2077. $eventName = \'activate_user\';
  2078. if (empty($_msg)) {
  2079. $_msg = "<p>Dear " . $name . ",</p>
  2080. <p>Thank you for registering at " . $siteName . \'.</p>
  2081. <p>Your registration has been approved and you may now access the Members area, please login <a href="\' . $activeURL . \'">here</a>.</p>\';
  2082. $_msg .= "<p>Kind Regards, <br />Site Administrator</p>";
  2083. }
  2084. }
  2085. if ($sendDeactivation && (empty($after) && $before)) {
  2086. /* deactivation */
  2087. $_sender = $modx->getOption(\'deActiveSender\', $sp, null);
  2088. $_sender = empty($_sender)? $emailSender : $_sender;
  2089. $_reply = $modx->getOption(\'deActiveReplyTo\', $sp, null);
  2090. $_reply = empty($_reply)? $replyTo : $_reply;
  2091. $from = $modx->getOption(\'deActiveFrom\', $sp, null);
  2092. $from = empty($from)? $emailSender : $from;
  2093. $_fromName = $modx->getOption(\'deActiveFromName\', $sp, null);
  2094. $_fromName = empty($_fromName)? $fromName : $_fromName;
  2095. $fields[\'fromName\'] = $_fromName;
  2096. $subject = $modx->getOption(\'deActiveSubject\', $sp,null);
  2097. $_subject = empty($subject)? \'Status Changed to Inactive\' : $subject ;
  2098. $_msg = $modx->getChunk($deactivationEmailTpl,$fields);
  2099. $send = true;
  2100. $eventName = \'deactivate_user\';
  2101. if (empty($_msg)) {
  2102. $_msg = "<p>Dear " . $name . \',</p>
  2103. <p>Your status at \' . $siteName . \' has been changed to "inactive." \'. \'If you believe this is an error please contact the site administrator at <a href="\' . $deActiveURL .\'">\' . $deActiveURL . \'</a>.</p>\';
  2104. $_msg .= "<p>Kind Regards, <br />Site Administrator</p>";
  2105. }
  2106. }
  2107. if ($send ) {
  2108. $modx->logManagerAction($eventName,\'modUser\',$user->get(\'id\'));
  2109. $modx->getService(\'mail\', \'mail.modPHPMailer\');
  2110. $modx->mail->set(modMail::MAIL_BODY, $_msg);
  2111. $modx->mail->set(modMail::MAIL_FROM, $_from);
  2112. $modx->mail->set(modMail::MAIL_FROM_NAME, $_fromName);
  2113. $modx->mail->set(modMail::MAIL_SENDER, $_sender);
  2114. $modx->mail->set(modMail::MAIL_SUBJECT, $_subject);
  2115. $modx->mail->address(\'to\', $email, $name);
  2116. $modx->mail->address(\'reply-to\',$_reply);
  2117. $modx->mail->setHTML(true);
  2118. $sent = $modx->mail->send();
  2119. $modx->mail->reset();
  2120. }
  2121. return \'\';',
  2122. 'locked' => '0',
  2123. 'properties' => 'a:19:{s:16:"sendOnActivation";a:7:{s:4:"name";s:16:"sendOnActivation";s:4:"desc";s:24:"ae_sendOnActivation_desc";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:1;s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:18:"sendOnDeactivation";a:7:{s:4:"name";s:18:"sendOnDeactivation";s:4:"desc";s:26:"ae_sendOnDeactivation_desc";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:0;s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:18:"activationEmailTpl";a:7:{s:4:"name";s:18:"activationEmailTpl";s:4:"desc";s:26:"ae_activationEmailTpl_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:18:"ActivationEmailTpl";s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:20:"deactivationEmailTpl";a:7:{s:4:"name";s:20:"deactivationEmailTpl";s:4:"desc";s:28:"ae_deactivationEmailTpl_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:20:"DeactivationEmailTpl";s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:13:"activationURL";a:7:{s:4:"name";s:13:"activationURL";s:4:"desc";s:21:"ae_activationURL_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:15:"deactivationURL";a:7:{s:4:"name";s:15:"deactivationURL";s:4:"desc";s:23:"ae_deactivationURL_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:8:"sitename";a:7:{s:4:"name";s:8:"sitename";s:4:"desc";s:16:"ae_sitename_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:11:"useFullname";a:7:{s:4:"name";s:11:"useFullname";s:4:"desc";s:19:"ae_useFullname_desc";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:0;s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:14:"replyToAddress";a:7:{s:4:"name";s:14:"replyToAddress";s:4:"desc";s:22:"ae_replyToAddress_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";b:0;s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:13:"activeSubject";a:7:{s:4:"name";s:13:"activeSubject";s:4:"desc";s:21:"ae_activeSubject_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:12:"activeSender";a:7:{s:4:"name";s:12:"activeSender";s:4:"desc";s:20:"ae_activeSender_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:10:"activeFrom";a:7:{s:4:"name";s:10:"activeFrom";s:4:"desc";s:18:"ae_activeFrom_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:14:"activeFromName";a:7:{s:4:"name";s:14:"activeFromName";s:4:"desc";s:22:"ae_activeFromName_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:13:"activeReplyTo";a:7:{s:4:"name";s:13:"activeReplyTo";s:4:"desc";s:21:"ae_activeReplyTo_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:15:"deActiveSubject";a:7:{s:4:"name";s:15:"deActiveSubject";s:4:"desc";s:23:"ae_deActiveSubject_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:14:"deActiveSender";a:7:{s:4:"name";s:14:"deActiveSender";s:4:"desc";s:22:"ae_deActiveSender_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:12:"deActiveFrom";a:7:{s:4:"name";s:12:"deActiveFrom";s:4:"desc";s:20:"ae_deActiveFrom_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:16:"deActiveFromName";a:7:{s:4:"name";s:16:"deActiveFromName";s:4:"desc";s:24:"ae_deActiveFromName_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}s:15:"deActiveReplyTo";a:7:{s:4:"name";s:15:"deActiveReplyTo";s:4:"desc";s:23:"ae_deActiveReplyTo_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:26:"activationemail:properties";s:4:"area";s:0:"";}}',
  2124. 'disabled' => '0',
  2125. 'moduleguid' => '',
  2126. 'static' => '0',
  2127. 'static_file' => '',
  2128. ),
  2129. ),
  2130. 'policies' =>
  2131. array (
  2132. 'modAccessContext' =>
  2133. array (
  2134. 'web' =>
  2135. array (
  2136. 0 =>
  2137. array (
  2138. 'principal' => 0,
  2139. 'authority' => 9999,
  2140. 'policy' =>
  2141. array (
  2142. 'load' => true,
  2143. ),
  2144. ),
  2145. 1 =>
  2146. array (
  2147. 'principal' => 0,
  2148. 'authority' => 9999,
  2149. 'policy' =>
  2150. array (
  2151. 'load' => true,
  2152. ),
  2153. ),
  2154. 2 =>
  2155. array (
  2156. 'principal' => 1,
  2157. 'authority' => 0,
  2158. 'policy' =>
  2159. array (
  2160. 'about' => true,
  2161. 'access_permissions' => true,
  2162. 'actions' => true,
  2163. 'change_password' => true,
  2164. 'change_profile' => true,
  2165. 'charsets' => true,
  2166. 'class_map' => true,
  2167. 'components' => true,
  2168. 'content_types' => true,
  2169. 'countries' => true,
  2170. 'create' => true,
  2171. 'credits' => true,
  2172. 'customize_forms' => true,
  2173. 'dashboards' => true,
  2174. 'database' => true,
  2175. 'database_truncate' => true,
  2176. 'delete_category' => true,
  2177. 'delete_chunk' => true,
  2178. 'delete_context' => true,
  2179. 'delete_document' => true,
  2180. 'delete_eventlog' => true,
  2181. 'delete_plugin' => true,
  2182. 'delete_propertyset' => true,
  2183. 'delete_role' => true,
  2184. 'delete_snippet' => true,
  2185. 'delete_template' => true,
  2186. 'delete_tv' => true,
  2187. 'delete_user' => true,
  2188. 'directory_chmod' => true,
  2189. 'directory_create' => true,
  2190. 'directory_list' => true,
  2191. 'directory_remove' => true,
  2192. 'directory_update' => true,
  2193. 'edit_category' => true,
  2194. 'edit_chunk' => true,
  2195. 'edit_context' => true,
  2196. 'edit_document' => true,
  2197. 'edit_locked' => true,
  2198. 'edit_plugin' => true,
  2199. 'edit_propertyset' => true,
  2200. 'edit_role' => true,
  2201. 'edit_snippet' => true,
  2202. 'edit_template' => true,
  2203. 'edit_tv' => true,
  2204. 'edit_user' => true,
  2205. 'element_tree' => true,
  2206. 'empty_cache' => true,
  2207. 'error_log_erase' => true,
  2208. 'error_log_view' => true,
  2209. 'events' => true,
  2210. 'export_static' => true,
  2211. 'file_create' => true,
  2212. 'file_list' => true,
  2213. 'file_manager' => true,
  2214. 'file_remove' => true,
  2215. 'file_tree' => true,
  2216. 'file_update' => true,
  2217. 'file_upload' => true,
  2218. 'file_unpack' => true,
  2219. 'file_view' => true,
  2220. 'flush_sessions' => true,
  2221. 'frames' => true,
  2222. 'help' => true,
  2223. 'home' => true,
  2224. 'import_static' => true,
  2225. 'languages' => true,
  2226. 'lexicons' => true,
  2227. 'list' => true,
  2228. 'load' => true,
  2229. 'logout' => true,
  2230. 'logs' => true,
  2231. 'menus' => true,
  2232. 'menu_reports' => true,
  2233. 'menu_security' => true,
  2234. 'menu_site' => true,
  2235. 'menu_support' => true,
  2236. 'menu_system' => true,
  2237. 'menu_tools' => true,
  2238. 'menu_user' => true,
  2239. 'messages' => true,
  2240. 'namespaces' => true,
  2241. 'new_category' => true,
  2242. 'new_chunk' => true,
  2243. 'new_context' => true,
  2244. 'new_document' => true,
  2245. 'new_document_in_root' => true,
  2246. 'new_plugin' => true,
  2247. 'new_propertyset' => true,
  2248. 'new_role' => true,
  2249. 'new_snippet' => true,
  2250. 'new_static_resource' => true,
  2251. 'new_symlink' => true,
  2252. 'new_template' => true,
  2253. 'new_tv' => true,
  2254. 'new_user' => true,
  2255. 'new_weblink' => true,
  2256. 'packages' => true,
  2257. 'policy_delete' => true,
  2258. 'policy_edit' => true,
  2259. 'policy_new' => true,
  2260. 'policy_save' => true,
  2261. 'policy_template_delete' => true,
  2262. 'policy_template_edit' => true,
  2263. 'policy_template_new' => true,
  2264. 'policy_template_save' => true,
  2265. 'policy_template_view' => true,
  2266. 'policy_view' => true,
  2267. 'property_sets' => true,
  2268. 'providers' => true,
  2269. 'publish_document' => true,
  2270. 'purge_deleted' => true,
  2271. 'remove' => true,
  2272. 'remove_locks' => true,
  2273. 'resource_duplicate' => true,
  2274. 'resourcegroup_delete' => true,
  2275. 'resourcegroup_edit' => true,
  2276. 'resourcegroup_new' => true,
  2277. 'resourcegroup_resource_edit' => true,
  2278. 'resourcegroup_resource_list' => true,
  2279. 'resourcegroup_save' => true,
  2280. 'resourcegroup_view' => true,
  2281. 'resource_quick_create' => true,
  2282. 'resource_quick_update' => true,
  2283. 'resource_tree' => true,
  2284. 'save' => true,
  2285. 'save_category' => true,
  2286. 'save_chunk' => true,
  2287. 'save_context' => true,
  2288. 'save_document' => true,
  2289. 'save_plugin' => true,
  2290. 'save_propertyset' => true,
  2291. 'save_role' => true,
  2292. 'save_snippet' => true,
  2293. 'save_template' => true,
  2294. 'save_tv' => true,
  2295. 'save_user' => true,
  2296. 'search' => true,
  2297. 'set_sudo' => true,
  2298. 'settings' => true,
  2299. 'sources' => true,
  2300. 'source_delete' => true,
  2301. 'source_edit' => true,
  2302. 'source_save' => true,
  2303. 'source_view' => true,
  2304. 'steal_locks' => true,
  2305. 'tree_show_element_ids' => true,
  2306. 'tree_show_resource_ids' => true,
  2307. 'undelete_document' => true,
  2308. 'unlock_element_properties' => true,
  2309. 'unpublish_document' => true,
  2310. 'usergroup_delete' => true,
  2311. 'usergroup_edit' => true,
  2312. 'usergroup_new' => true,
  2313. 'usergroup_save' => true,
  2314. 'usergroup_user_edit' => true,
  2315. 'usergroup_user_list' => true,
  2316. 'usergroup_view' => true,
  2317. 'view' => true,
  2318. 'view_category' => true,
  2319. 'view_chunk' => true,
  2320. 'view_context' => true,
  2321. 'view_document' => true,
  2322. 'view_element' => true,
  2323. 'view_eventlog' => true,
  2324. 'view_offline' => true,
  2325. 'view_plugin' => true,
  2326. 'view_propertyset' => true,
  2327. 'view_role' => true,
  2328. 'view_snippet' => true,
  2329. 'view_sysinfo' => true,
  2330. 'view_template' => true,
  2331. 'view_tv' => true,
  2332. 'view_unpublished' => true,
  2333. 'view_user' => true,
  2334. 'workspaces' => true,
  2335. ),
  2336. ),
  2337. 3 =>
  2338. array (
  2339. 'principal' => 1,
  2340. 'authority' => 0,
  2341. 'policy' =>
  2342. array (
  2343. 'about' => true,
  2344. 'access_permissions' => true,
  2345. 'actions' => true,
  2346. 'change_password' => true,
  2347. 'change_profile' => true,
  2348. 'charsets' => true,
  2349. 'class_map' => true,
  2350. 'components' => true,
  2351. 'content_types' => true,
  2352. 'countries' => true,
  2353. 'create' => true,
  2354. 'credits' => true,
  2355. 'customize_forms' => true,
  2356. 'dashboards' => true,
  2357. 'database' => true,
  2358. 'database_truncate' => true,
  2359. 'delete_category' => true,
  2360. 'delete_chunk' => true,
  2361. 'delete_context' => true,
  2362. 'delete_document' => true,
  2363. 'delete_eventlog' => true,
  2364. 'delete_plugin' => true,
  2365. 'delete_propertyset' => true,
  2366. 'delete_role' => true,
  2367. 'delete_snippet' => true,
  2368. 'delete_template' => true,
  2369. 'delete_tv' => true,
  2370. 'delete_user' => true,
  2371. 'directory_chmod' => true,
  2372. 'directory_create' => true,
  2373. 'directory_list' => true,
  2374. 'directory_remove' => true,
  2375. 'directory_update' => true,
  2376. 'edit_category' => true,
  2377. 'edit_chunk' => true,
  2378. 'edit_context' => true,
  2379. 'edit_document' => true,
  2380. 'edit_locked' => true,
  2381. 'edit_plugin' => true,
  2382. 'edit_propertyset' => true,
  2383. 'edit_role' => true,
  2384. 'edit_snippet' => true,
  2385. 'edit_template' => true,
  2386. 'edit_tv' => true,
  2387. 'edit_user' => true,
  2388. 'element_tree' => true,
  2389. 'empty_cache' => true,
  2390. 'error_log_erase' => true,
  2391. 'error_log_view' => true,
  2392. 'events' => true,
  2393. 'export_static' => true,
  2394. 'file_create' => true,
  2395. 'file_list' => true,
  2396. 'file_manager' => true,
  2397. 'file_remove' => true,
  2398. 'file_tree' => true,
  2399. 'file_update' => true,
  2400. 'file_upload' => true,
  2401. 'file_unpack' => true,
  2402. 'file_view' => true,
  2403. 'flush_sessions' => true,
  2404. 'frames' => true,
  2405. 'help' => true,
  2406. 'home' => true,
  2407. 'import_static' => true,
  2408. 'languages' => true,
  2409. 'lexicons' => true,
  2410. 'list' => true,
  2411. 'load' => true,
  2412. 'logout' => true,
  2413. 'logs' => true,
  2414. 'menus' => true,
  2415. 'menu_reports' => true,
  2416. 'menu_security' => true,
  2417. 'menu_site' => true,
  2418. 'menu_support' => true,
  2419. 'menu_system' => true,
  2420. 'menu_tools' => true,
  2421. 'menu_user' => true,
  2422. 'messages' => true,
  2423. 'namespaces' => true,
  2424. 'new_category' => true,
  2425. 'new_chunk' => true,
  2426. 'new_context' => true,
  2427. 'new_document' => true,
  2428. 'new_document_in_root' => true,
  2429. 'new_plugin' => true,
  2430. 'new_propertyset' => true,
  2431. 'new_role' => true,
  2432. 'new_snippet' => true,
  2433. 'new_static_resource' => true,
  2434. 'new_symlink' => true,
  2435. 'new_template' => true,
  2436. 'new_tv' => true,
  2437. 'new_user' => true,
  2438. 'new_weblink' => true,
  2439. 'packages' => true,
  2440. 'policy_delete' => true,
  2441. 'policy_edit' => true,
  2442. 'policy_new' => true,
  2443. 'policy_save' => true,
  2444. 'policy_template_delete' => true,
  2445. 'policy_template_edit' => true,
  2446. 'policy_template_new' => true,
  2447. 'policy_template_save' => true,
  2448. 'policy_template_view' => true,
  2449. 'policy_view' => true,
  2450. 'property_sets' => true,
  2451. 'providers' => true,
  2452. 'publish_document' => true,
  2453. 'purge_deleted' => true,
  2454. 'remove' => true,
  2455. 'remove_locks' => true,
  2456. 'resource_duplicate' => true,
  2457. 'resourcegroup_delete' => true,
  2458. 'resourcegroup_edit' => true,
  2459. 'resourcegroup_new' => true,
  2460. 'resourcegroup_resource_edit' => true,
  2461. 'resourcegroup_resource_list' => true,
  2462. 'resourcegroup_save' => true,
  2463. 'resourcegroup_view' => true,
  2464. 'resource_quick_create' => true,
  2465. 'resource_quick_update' => true,
  2466. 'resource_tree' => true,
  2467. 'save' => true,
  2468. 'save_category' => true,
  2469. 'save_chunk' => true,
  2470. 'save_context' => true,
  2471. 'save_document' => true,
  2472. 'save_plugin' => true,
  2473. 'save_propertyset' => true,
  2474. 'save_role' => true,
  2475. 'save_snippet' => true,
  2476. 'save_template' => true,
  2477. 'save_tv' => true,
  2478. 'save_user' => true,
  2479. 'search' => true,
  2480. 'set_sudo' => true,
  2481. 'settings' => true,
  2482. 'sources' => true,
  2483. 'source_delete' => true,
  2484. 'source_edit' => true,
  2485. 'source_save' => true,
  2486. 'source_view' => true,
  2487. 'steal_locks' => true,
  2488. 'tree_show_element_ids' => true,
  2489. 'tree_show_resource_ids' => true,
  2490. 'undelete_document' => true,
  2491. 'unlock_element_properties' => true,
  2492. 'unpublish_document' => true,
  2493. 'usergroup_delete' => true,
  2494. 'usergroup_edit' => true,
  2495. 'usergroup_new' => true,
  2496. 'usergroup_save' => true,
  2497. 'usergroup_user_edit' => true,
  2498. 'usergroup_user_list' => true,
  2499. 'usergroup_view' => true,
  2500. 'view' => true,
  2501. 'view_category' => true,
  2502. 'view_chunk' => true,
  2503. 'view_context' => true,
  2504. 'view_document' => true,
  2505. 'view_element' => true,
  2506. 'view_eventlog' => true,
  2507. 'view_offline' => true,
  2508. 'view_plugin' => true,
  2509. 'view_propertyset' => true,
  2510. 'view_role' => true,
  2511. 'view_snippet' => true,
  2512. 'view_sysinfo' => true,
  2513. 'view_template' => true,
  2514. 'view_tv' => true,
  2515. 'view_unpublished' => true,
  2516. 'view_user' => true,
  2517. 'workspaces' => true,
  2518. ),
  2519. ),
  2520. 4 =>
  2521. array (
  2522. 'principal' => 1,
  2523. 'authority' => 0,
  2524. 'policy' =>
  2525. array (
  2526. 'fred' => true,
  2527. 'fred_elements' => true,
  2528. 'fred_element_save' => true,
  2529. 'fred_element_screenshot' => true,
  2530. 'fred_element_rte_config_save' => true,
  2531. 'fred_element_rte_config_delete' => true,
  2532. 'fred_element_rtes' => true,
  2533. 'fred_element_rebuild' => true,
  2534. 'fred_element_option_sets_save' => true,
  2535. 'fred_element_option_sets_delete' => true,
  2536. 'fred_element_option_sets' => true,
  2537. 'fred_element_move' => true,
  2538. 'fred_element_category_delete' => true,
  2539. 'fred_element_category_save' => true,
  2540. 'fred_element_delete' => true,
  2541. 'fred_element_categories' => true,
  2542. 'fred_themes_save' => true,
  2543. 'fred_themes_delete' => true,
  2544. 'fred_themes_build' => true,
  2545. 'fred_themes' => true,
  2546. 'fred_themed_templates_save' => true,
  2547. 'fred_themed_templates_delete' => true,
  2548. 'fred_themed_templates' => true,
  2549. 'fred_settings_tvs' => true,
  2550. 'fred_settings_tags' => true,
  2551. 'fred_settings_advanced' => true,
  2552. 'fred_media_sources' => true,
  2553. 'fred_settings' => true,
  2554. 'fred_blueprint_categories_save' => true,
  2555. 'fred_blueprint_categories_delete' => true,
  2556. 'fred_blueprint_categories_create_public' => true,
  2557. 'fred_blueprints_save' => true,
  2558. 'fred_blueprint_categories' => true,
  2559. 'fred_blueprints_delete' => true,
  2560. 'fred_blueprints_create_public' => true,
  2561. 'fred_blueprints' => true,
  2562. 'new_document_in_root' => true,
  2563. 'view_unpublished' => true,
  2564. 'resource_duplicate' => true,
  2565. 'unpublish_document' => true,
  2566. 'publish_document' => true,
  2567. 'save_document' => true,
  2568. 'undelete_document' => true,
  2569. 'new_document' => true,
  2570. 'delete_document' => true,
  2571. 'formit' => true,
  2572. 'formit_encryptions' => false,
  2573. ),
  2574. ),
  2575. 5 =>
  2576. array (
  2577. 'principal' => 1,
  2578. 'authority' => 0,
  2579. 'policy' =>
  2580. array (
  2581. 'fred' => true,
  2582. 'fred_elements' => true,
  2583. 'fred_element_save' => true,
  2584. 'fred_element_screenshot' => true,
  2585. 'fred_element_rte_config_save' => true,
  2586. 'fred_element_rte_config_delete' => true,
  2587. 'fred_element_rtes' => true,
  2588. 'fred_element_rebuild' => true,
  2589. 'fred_element_option_sets_save' => true,
  2590. 'fred_element_option_sets_delete' => true,
  2591. 'fred_element_option_sets' => true,
  2592. 'fred_element_move' => true,
  2593. 'fred_element_category_delete' => true,
  2594. 'fred_element_category_save' => true,
  2595. 'fred_element_delete' => true,
  2596. 'fred_element_categories' => true,
  2597. 'fred_themes_save' => true,
  2598. 'fred_themes_delete' => true,
  2599. 'fred_themes_build' => true,
  2600. 'fred_themes' => true,
  2601. 'fred_themed_templates_save' => true,
  2602. 'fred_themed_templates_delete' => true,
  2603. 'fred_themed_templates' => true,
  2604. 'fred_settings_tvs' => true,
  2605. 'fred_settings_tags' => true,
  2606. 'fred_settings_advanced' => true,
  2607. 'fred_media_sources' => true,
  2608. 'fred_settings' => true,
  2609. 'fred_blueprint_categories_save' => true,
  2610. 'fred_blueprint_categories_delete' => true,
  2611. 'fred_blueprint_categories_create_public' => true,
  2612. 'fred_blueprints_save' => true,
  2613. 'fred_blueprint_categories' => true,
  2614. 'fred_blueprints_delete' => true,
  2615. 'fred_blueprints_create_public' => true,
  2616. 'fred_blueprints' => true,
  2617. 'new_document_in_root' => true,
  2618. 'view_unpublished' => true,
  2619. 'resource_duplicate' => true,
  2620. 'unpublish_document' => true,
  2621. 'publish_document' => true,
  2622. 'save_document' => true,
  2623. 'undelete_document' => true,
  2624. 'new_document' => true,
  2625. 'delete_document' => true,
  2626. 'formit' => true,
  2627. 'formit_encryptions' => false,
  2628. ),
  2629. ),
  2630. 6 =>
  2631. array (
  2632. 'principal' => 1,
  2633. 'authority' => 0,
  2634. 'policy' =>
  2635. array (
  2636. 'fred' => true,
  2637. 'fred_elements' => true,
  2638. 'fred_element_save' => true,
  2639. 'fred_element_screenshot' => true,
  2640. 'fred_element_rte_config_save' => true,
  2641. 'fred_element_rte_config_delete' => true,
  2642. 'fred_element_rtes' => true,
  2643. 'fred_element_rebuild' => true,
  2644. 'fred_element_option_sets_save' => true,
  2645. 'fred_element_option_sets_delete' => true,
  2646. 'fred_element_option_sets' => true,
  2647. 'fred_element_move' => true,
  2648. 'fred_element_category_delete' => true,
  2649. 'fred_element_category_save' => true,
  2650. 'fred_element_delete' => true,
  2651. 'fred_element_categories' => true,
  2652. 'fred_themes_save' => true,
  2653. 'fred_themes_delete' => true,
  2654. 'fred_themes_build' => true,
  2655. 'fred_themes' => true,
  2656. 'fred_themed_templates_save' => true,
  2657. 'fred_themed_templates_delete' => true,
  2658. 'fred_themed_templates' => true,
  2659. 'fred_settings_tvs' => true,
  2660. 'fred_settings_tags' => true,
  2661. 'fred_settings_advanced' => true,
  2662. 'fred_media_sources' => true,
  2663. 'fred_settings' => true,
  2664. 'fred_blueprint_categories_save' => true,
  2665. 'fred_blueprint_categories_delete' => true,
  2666. 'fred_blueprint_categories_create_public' => true,
  2667. 'fred_blueprints_save' => true,
  2668. 'fred_blueprint_categories' => true,
  2669. 'fred_blueprints_delete' => true,
  2670. 'fred_blueprints_create_public' => true,
  2671. 'fred_blueprints' => true,
  2672. 'new_document_in_root' => true,
  2673. 'view_unpublished' => true,
  2674. 'resource_duplicate' => true,
  2675. 'unpublish_document' => true,
  2676. 'publish_document' => true,
  2677. 'save_document' => true,
  2678. 'undelete_document' => true,
  2679. 'new_document' => true,
  2680. 'delete_document' => true,
  2681. 'formit' => true,
  2682. 'formit_encryptions' => false,
  2683. ),
  2684. ),
  2685. 7 =>
  2686. array (
  2687. 'principal' => 1,
  2688. 'authority' => 0,
  2689. 'policy' =>
  2690. array (
  2691. 'fred' => true,
  2692. 'fred_elements' => true,
  2693. 'fred_element_save' => true,
  2694. 'fred_element_screenshot' => true,
  2695. 'fred_element_rte_config_save' => true,
  2696. 'fred_element_rte_config_delete' => true,
  2697. 'fred_element_rtes' => true,
  2698. 'fred_element_rebuild' => true,
  2699. 'fred_element_option_sets_save' => true,
  2700. 'fred_element_option_sets_delete' => true,
  2701. 'fred_element_option_sets' => true,
  2702. 'fred_element_move' => true,
  2703. 'fred_element_category_delete' => true,
  2704. 'fred_element_category_save' => true,
  2705. 'fred_element_delete' => true,
  2706. 'fred_element_categories' => true,
  2707. 'fred_themes_save' => true,
  2708. 'fred_themes_delete' => true,
  2709. 'fred_themes_build' => true,
  2710. 'fred_themes' => true,
  2711. 'fred_themed_templates_save' => true,
  2712. 'fred_themed_templates_delete' => true,
  2713. 'fred_themed_templates' => true,
  2714. 'fred_settings_tvs' => true,
  2715. 'fred_settings_tags' => true,
  2716. 'fred_settings_advanced' => true,
  2717. 'fred_media_sources' => true,
  2718. 'fred_settings' => true,
  2719. 'fred_blueprint_categories_save' => true,
  2720. 'fred_blueprint_categories_delete' => true,
  2721. 'fred_blueprint_categories_create_public' => true,
  2722. 'fred_blueprints_save' => true,
  2723. 'fred_blueprint_categories' => true,
  2724. 'fred_blueprints_delete' => true,
  2725. 'fred_blueprints_create_public' => true,
  2726. 'fred_blueprints' => true,
  2727. 'new_document_in_root' => true,
  2728. 'view_unpublished' => true,
  2729. 'resource_duplicate' => true,
  2730. 'unpublish_document' => true,
  2731. 'publish_document' => true,
  2732. 'save_document' => true,
  2733. 'undelete_document' => true,
  2734. 'new_document' => true,
  2735. 'delete_document' => true,
  2736. 'formit' => true,
  2737. 'formit_encryptions' => false,
  2738. ),
  2739. ),
  2740. 8 =>
  2741. array (
  2742. 'principal' => 1,
  2743. 'authority' => 0,
  2744. 'policy' =>
  2745. array (
  2746. 'fred' => true,
  2747. 'fred_elements' => true,
  2748. 'fred_element_save' => true,
  2749. 'fred_element_screenshot' => true,
  2750. 'fred_element_rte_config_save' => true,
  2751. 'fred_element_rte_config_delete' => true,
  2752. 'fred_element_rtes' => true,
  2753. 'fred_element_rebuild' => true,
  2754. 'fred_element_option_sets_save' => true,
  2755. 'fred_element_option_sets_delete' => true,
  2756. 'fred_element_option_sets' => true,
  2757. 'fred_element_move' => true,
  2758. 'fred_element_category_delete' => true,
  2759. 'fred_element_category_save' => true,
  2760. 'fred_element_delete' => true,
  2761. 'fred_element_categories' => true,
  2762. 'fred_themes_save' => true,
  2763. 'fred_themes_delete' => true,
  2764. 'fred_themes_build' => true,
  2765. 'fred_themes' => true,
  2766. 'fred_themed_templates_save' => true,
  2767. 'fred_themed_templates_delete' => true,
  2768. 'fred_themed_templates' => true,
  2769. 'fred_settings_tvs' => true,
  2770. 'fred_settings_tags' => true,
  2771. 'fred_settings_advanced' => true,
  2772. 'fred_media_sources' => true,
  2773. 'fred_settings' => true,
  2774. 'fred_blueprint_categories_save' => true,
  2775. 'fred_blueprint_categories_delete' => true,
  2776. 'fred_blueprint_categories_create_public' => true,
  2777. 'fred_blueprints_save' => true,
  2778. 'fred_blueprint_categories' => true,
  2779. 'fred_blueprints_delete' => true,
  2780. 'fred_blueprints_create_public' => true,
  2781. 'fred_blueprints' => true,
  2782. 'new_document_in_root' => true,
  2783. 'view_unpublished' => true,
  2784. 'resource_duplicate' => true,
  2785. 'unpublish_document' => true,
  2786. 'publish_document' => true,
  2787. 'save_document' => true,
  2788. 'undelete_document' => true,
  2789. 'new_document' => true,
  2790. 'delete_document' => true,
  2791. 'formit' => true,
  2792. 'formit_encryptions' => false,
  2793. ),
  2794. ),
  2795. 9 =>
  2796. array (
  2797. 'principal' => 1,
  2798. 'authority' => 0,
  2799. 'policy' =>
  2800. array (
  2801. 'fred' => true,
  2802. 'fred_elements' => true,
  2803. 'fred_element_save' => true,
  2804. 'fred_element_screenshot' => true,
  2805. 'fred_element_rte_config_save' => true,
  2806. 'fred_element_rte_config_delete' => true,
  2807. 'fred_element_rtes' => true,
  2808. 'fred_element_rebuild' => true,
  2809. 'fred_element_option_sets_save' => true,
  2810. 'fred_element_option_sets_delete' => true,
  2811. 'fred_element_option_sets' => true,
  2812. 'fred_element_move' => true,
  2813. 'fred_element_category_delete' => true,
  2814. 'fred_element_category_save' => true,
  2815. 'fred_element_delete' => true,
  2816. 'fred_element_categories' => true,
  2817. 'fred_themes_save' => true,
  2818. 'fred_themes_delete' => true,
  2819. 'fred_themes_build' => true,
  2820. 'fred_themes' => true,
  2821. 'fred_themed_templates_save' => true,
  2822. 'fred_themed_templates_delete' => true,
  2823. 'fred_themed_templates' => true,
  2824. 'fred_settings_tvs' => true,
  2825. 'fred_settings_tags' => true,
  2826. 'fred_settings_advanced' => true,
  2827. 'fred_media_sources' => true,
  2828. 'fred_settings' => true,
  2829. 'fred_blueprint_categories_save' => true,
  2830. 'fred_blueprint_categories_delete' => true,
  2831. 'fred_blueprint_categories_create_public' => true,
  2832. 'fred_blueprints_save' => true,
  2833. 'fred_blueprint_categories' => true,
  2834. 'fred_blueprints_delete' => true,
  2835. 'fred_blueprints_create_public' => true,
  2836. 'fred_blueprints' => true,
  2837. 'new_document_in_root' => true,
  2838. 'view_unpublished' => true,
  2839. 'resource_duplicate' => true,
  2840. 'unpublish_document' => true,
  2841. 'publish_document' => true,
  2842. 'save_document' => true,
  2843. 'undelete_document' => true,
  2844. 'new_document' => true,
  2845. 'delete_document' => true,
  2846. 'formit' => true,
  2847. 'formit_encryptions' => false,
  2848. ),
  2849. ),
  2850. 10 =>
  2851. array (
  2852. 'principal' => 1,
  2853. 'authority' => 0,
  2854. 'policy' =>
  2855. array (
  2856. 'fred' => true,
  2857. 'fred_elements' => true,
  2858. 'fred_element_save' => true,
  2859. 'fred_element_screenshot' => true,
  2860. 'fred_element_rte_config_save' => true,
  2861. 'fred_element_rte_config_delete' => true,
  2862. 'fred_element_rtes' => true,
  2863. 'fred_element_rebuild' => true,
  2864. 'fred_element_option_sets_save' => true,
  2865. 'fred_element_option_sets_delete' => true,
  2866. 'fred_element_option_sets' => true,
  2867. 'fred_element_move' => true,
  2868. 'fred_element_category_delete' => true,
  2869. 'fred_element_category_save' => true,
  2870. 'fred_element_delete' => true,
  2871. 'fred_element_categories' => true,
  2872. 'fred_themes_save' => true,
  2873. 'fred_themes_delete' => true,
  2874. 'fred_themes_build' => true,
  2875. 'fred_themes' => true,
  2876. 'fred_themed_templates_save' => true,
  2877. 'fred_themed_templates_delete' => true,
  2878. 'fred_themed_templates' => true,
  2879. 'fred_settings_tvs' => true,
  2880. 'fred_settings_tags' => true,
  2881. 'fred_settings_advanced' => true,
  2882. 'fred_media_sources' => true,
  2883. 'fred_settings' => true,
  2884. 'fred_blueprint_categories_save' => true,
  2885. 'fred_blueprint_categories_delete' => true,
  2886. 'fred_blueprint_categories_create_public' => true,
  2887. 'fred_blueprints_save' => true,
  2888. 'fred_blueprint_categories' => true,
  2889. 'fred_blueprints_delete' => true,
  2890. 'fred_blueprints_create_public' => true,
  2891. 'fred_blueprints' => true,
  2892. 'new_document_in_root' => true,
  2893. 'view_unpublished' => true,
  2894. 'resource_duplicate' => true,
  2895. 'unpublish_document' => true,
  2896. 'publish_document' => true,
  2897. 'save_document' => true,
  2898. 'undelete_document' => true,
  2899. 'new_document' => true,
  2900. 'delete_document' => true,
  2901. 'formit' => true,
  2902. 'formit_encryptions' => false,
  2903. ),
  2904. ),
  2905. 11 =>
  2906. array (
  2907. 'principal' => 1,
  2908. 'authority' => 0,
  2909. 'policy' =>
  2910. array (
  2911. 'fred' => true,
  2912. 'fred_elements' => true,
  2913. 'fred_element_save' => true,
  2914. 'fred_element_screenshot' => true,
  2915. 'fred_element_rte_config_save' => true,
  2916. 'fred_element_rte_config_delete' => true,
  2917. 'fred_element_rtes' => true,
  2918. 'fred_element_rebuild' => true,
  2919. 'fred_element_option_sets_save' => true,
  2920. 'fred_element_option_sets_delete' => true,
  2921. 'fred_element_option_sets' => true,
  2922. 'fred_element_move' => true,
  2923. 'fred_element_category_delete' => true,
  2924. 'fred_element_category_save' => true,
  2925. 'fred_element_delete' => true,
  2926. 'fred_element_categories' => true,
  2927. 'fred_themes_save' => true,
  2928. 'fred_themes_delete' => true,
  2929. 'fred_themes_build' => true,
  2930. 'fred_themes' => true,
  2931. 'fred_themed_templates_save' => true,
  2932. 'fred_themed_templates_delete' => true,
  2933. 'fred_themed_templates' => true,
  2934. 'fred_settings_tvs' => true,
  2935. 'fred_settings_tags' => true,
  2936. 'fred_settings_advanced' => true,
  2937. 'fred_media_sources' => true,
  2938. 'fred_settings' => true,
  2939. 'fred_blueprint_categories_save' => true,
  2940. 'fred_blueprint_categories_delete' => true,
  2941. 'fred_blueprint_categories_create_public' => true,
  2942. 'fred_blueprints_save' => true,
  2943. 'fred_blueprint_categories' => true,
  2944. 'fred_blueprints_delete' => true,
  2945. 'fred_blueprints_create_public' => true,
  2946. 'fred_blueprints' => true,
  2947. 'new_document_in_root' => true,
  2948. 'view_unpublished' => true,
  2949. 'resource_duplicate' => true,
  2950. 'unpublish_document' => true,
  2951. 'publish_document' => true,
  2952. 'save_document' => true,
  2953. 'undelete_document' => true,
  2954. 'new_document' => true,
  2955. 'delete_document' => true,
  2956. 'formit' => true,
  2957. 'formit_encryptions' => false,
  2958. ),
  2959. ),
  2960. 12 =>
  2961. array (
  2962. 'principal' => 1,
  2963. 'authority' => 0,
  2964. 'policy' =>
  2965. array (
  2966. 'fred' => true,
  2967. 'fred_elements' => true,
  2968. 'fred_element_save' => true,
  2969. 'fred_element_screenshot' => true,
  2970. 'fred_element_rte_config_save' => true,
  2971. 'fred_element_rte_config_delete' => true,
  2972. 'fred_element_rtes' => true,
  2973. 'fred_element_rebuild' => true,
  2974. 'fred_element_option_sets_save' => true,
  2975. 'fred_element_option_sets_delete' => true,
  2976. 'fred_element_option_sets' => true,
  2977. 'fred_element_move' => true,
  2978. 'fred_element_category_delete' => true,
  2979. 'fred_element_category_save' => true,
  2980. 'fred_element_delete' => true,
  2981. 'fred_element_categories' => true,
  2982. 'fred_themes_save' => true,
  2983. 'fred_themes_delete' => true,
  2984. 'fred_themes_build' => true,
  2985. 'fred_themes' => true,
  2986. 'fred_themed_templates_save' => true,
  2987. 'fred_themed_templates_delete' => true,
  2988. 'fred_themed_templates' => true,
  2989. 'fred_settings_tvs' => true,
  2990. 'fred_settings_tags' => true,
  2991. 'fred_settings_advanced' => true,
  2992. 'fred_media_sources' => true,
  2993. 'fred_settings' => true,
  2994. 'fred_blueprint_categories_save' => true,
  2995. 'fred_blueprint_categories_delete' => true,
  2996. 'fred_blueprint_categories_create_public' => true,
  2997. 'fred_blueprints_save' => true,
  2998. 'fred_blueprint_categories' => true,
  2999. 'fred_blueprints_delete' => true,
  3000. 'fred_blueprints_create_public' => true,
  3001. 'fred_blueprints' => true,
  3002. 'new_document_in_root' => true,
  3003. 'view_unpublished' => true,
  3004. 'resource_duplicate' => true,
  3005. 'unpublish_document' => true,
  3006. 'publish_document' => true,
  3007. 'save_document' => true,
  3008. 'undelete_document' => true,
  3009. 'new_document' => true,
  3010. 'delete_document' => true,
  3011. 'formit' => true,
  3012. 'formit_encryptions' => false,
  3013. ),
  3014. ),
  3015. 13 =>
  3016. array (
  3017. 'principal' => 1,
  3018. 'authority' => 0,
  3019. 'policy' =>
  3020. array (
  3021. 'fred' => true,
  3022. 'fred_elements' => true,
  3023. 'fred_element_save' => true,
  3024. 'fred_element_screenshot' => true,
  3025. 'fred_element_rte_config_save' => true,
  3026. 'fred_element_rte_config_delete' => true,
  3027. 'fred_element_rtes' => true,
  3028. 'fred_element_rebuild' => true,
  3029. 'fred_element_option_sets_save' => true,
  3030. 'fred_element_option_sets_delete' => true,
  3031. 'fred_element_option_sets' => true,
  3032. 'fred_element_move' => true,
  3033. 'fred_element_category_delete' => true,
  3034. 'fred_element_category_save' => true,
  3035. 'fred_element_delete' => true,
  3036. 'fred_element_categories' => true,
  3037. 'fred_themes_save' => true,
  3038. 'fred_themes_delete' => true,
  3039. 'fred_themes_build' => true,
  3040. 'fred_themes' => true,
  3041. 'fred_themed_templates_save' => true,
  3042. 'fred_themed_templates_delete' => true,
  3043. 'fred_themed_templates' => true,
  3044. 'fred_settings_tvs' => true,
  3045. 'fred_settings_tags' => true,
  3046. 'fred_settings_advanced' => true,
  3047. 'fred_media_sources' => true,
  3048. 'fred_settings' => true,
  3049. 'fred_blueprint_categories_save' => true,
  3050. 'fred_blueprint_categories_delete' => true,
  3051. 'fred_blueprint_categories_create_public' => true,
  3052. 'fred_blueprints_save' => true,
  3053. 'fred_blueprint_categories' => true,
  3054. 'fred_blueprints_delete' => true,
  3055. 'fred_blueprints_create_public' => true,
  3056. 'fred_blueprints' => true,
  3057. 'new_document_in_root' => true,
  3058. 'view_unpublished' => true,
  3059. 'resource_duplicate' => true,
  3060. 'unpublish_document' => true,
  3061. 'publish_document' => true,
  3062. 'save_document' => true,
  3063. 'undelete_document' => true,
  3064. 'new_document' => true,
  3065. 'delete_document' => true,
  3066. 'formit' => true,
  3067. 'formit_encryptions' => false,
  3068. ),
  3069. ),
  3070. 14 =>
  3071. array (
  3072. 'principal' => 1,
  3073. 'authority' => 0,
  3074. 'policy' =>
  3075. array (
  3076. 'fred' => true,
  3077. 'fred_elements' => true,
  3078. 'fred_element_save' => true,
  3079. 'fred_element_screenshot' => true,
  3080. 'fred_element_rte_config_save' => true,
  3081. 'fred_element_rte_config_delete' => true,
  3082. 'fred_element_rtes' => true,
  3083. 'fred_element_rebuild' => true,
  3084. 'fred_element_option_sets_save' => true,
  3085. 'fred_element_option_sets_delete' => true,
  3086. 'fred_element_option_sets' => true,
  3087. 'fred_element_move' => true,
  3088. 'fred_element_category_delete' => true,
  3089. 'fred_element_category_save' => true,
  3090. 'fred_element_delete' => true,
  3091. 'fred_element_categories' => true,
  3092. 'fred_themes_save' => true,
  3093. 'fred_themes_delete' => true,
  3094. 'fred_themes_build' => true,
  3095. 'fred_themes' => true,
  3096. 'fred_themed_templates_save' => true,
  3097. 'fred_themed_templates_delete' => true,
  3098. 'fred_themed_templates' => true,
  3099. 'fred_settings_tvs' => true,
  3100. 'fred_settings_tags' => true,
  3101. 'fred_settings_advanced' => true,
  3102. 'fred_media_sources' => true,
  3103. 'fred_settings' => true,
  3104. 'fred_blueprint_categories_save' => true,
  3105. 'fred_blueprint_categories_delete' => true,
  3106. 'fred_blueprint_categories_create_public' => true,
  3107. 'fred_blueprints_save' => true,
  3108. 'fred_blueprint_categories' => true,
  3109. 'fred_blueprints_delete' => true,
  3110. 'fred_blueprints_create_public' => true,
  3111. 'fred_blueprints' => true,
  3112. 'new_document_in_root' => true,
  3113. 'view_unpublished' => true,
  3114. 'resource_duplicate' => true,
  3115. 'unpublish_document' => true,
  3116. 'publish_document' => true,
  3117. 'save_document' => true,
  3118. 'undelete_document' => true,
  3119. 'new_document' => true,
  3120. 'delete_document' => true,
  3121. 'formit' => true,
  3122. 'formit_encryptions' => false,
  3123. ),
  3124. ),
  3125. 15 =>
  3126. array (
  3127. 'principal' => 1,
  3128. 'authority' => 0,
  3129. 'policy' =>
  3130. array (
  3131. 'fred' => true,
  3132. 'fred_elements' => true,
  3133. 'fred_element_save' => true,
  3134. 'fred_element_screenshot' => true,
  3135. 'fred_element_rte_config_save' => true,
  3136. 'fred_element_rte_config_delete' => true,
  3137. 'fred_element_rtes' => true,
  3138. 'fred_element_rebuild' => true,
  3139. 'fred_element_option_sets_save' => true,
  3140. 'fred_element_option_sets_delete' => true,
  3141. 'fred_element_option_sets' => true,
  3142. 'fred_element_move' => true,
  3143. 'fred_element_category_delete' => true,
  3144. 'fred_element_category_save' => true,
  3145. 'fred_element_delete' => true,
  3146. 'fred_element_categories' => true,
  3147. 'fred_themes_save' => true,
  3148. 'fred_themes_delete' => true,
  3149. 'fred_themes_build' => true,
  3150. 'fred_themes' => true,
  3151. 'fred_themed_templates_save' => true,
  3152. 'fred_themed_templates_delete' => true,
  3153. 'fred_themed_templates' => true,
  3154. 'fred_settings_tvs' => true,
  3155. 'fred_settings_tags' => true,
  3156. 'fred_settings_advanced' => true,
  3157. 'fred_media_sources' => true,
  3158. 'fred_settings' => true,
  3159. 'fred_blueprint_categories_save' => true,
  3160. 'fred_blueprint_categories_delete' => true,
  3161. 'fred_blueprint_categories_create_public' => true,
  3162. 'fred_blueprints_save' => true,
  3163. 'fred_blueprint_categories' => true,
  3164. 'fred_blueprints_delete' => true,
  3165. 'fred_blueprints_create_public' => true,
  3166. 'fred_blueprints' => true,
  3167. 'new_document_in_root' => true,
  3168. 'view_unpublished' => true,
  3169. 'resource_duplicate' => true,
  3170. 'unpublish_document' => true,
  3171. 'publish_document' => true,
  3172. 'save_document' => true,
  3173. 'undelete_document' => true,
  3174. 'new_document' => true,
  3175. 'delete_document' => true,
  3176. 'formit' => true,
  3177. 'formit_encryptions' => false,
  3178. ),
  3179. ),
  3180. 16 =>
  3181. array (
  3182. 'principal' => 1,
  3183. 'authority' => 0,
  3184. 'policy' =>
  3185. array (
  3186. 'fred' => true,
  3187. 'fred_elements' => true,
  3188. 'fred_element_save' => true,
  3189. 'fred_element_screenshot' => true,
  3190. 'fred_element_rte_config_save' => true,
  3191. 'fred_element_rte_config_delete' => true,
  3192. 'fred_element_rtes' => true,
  3193. 'fred_element_rebuild' => true,
  3194. 'fred_element_option_sets_save' => true,
  3195. 'fred_element_option_sets_delete' => true,
  3196. 'fred_element_option_sets' => true,
  3197. 'fred_element_move' => true,
  3198. 'fred_element_category_delete' => true,
  3199. 'fred_element_category_save' => true,
  3200. 'fred_element_delete' => true,
  3201. 'fred_element_categories' => true,
  3202. 'fred_themes_save' => true,
  3203. 'fred_themes_delete' => true,
  3204. 'fred_themes_build' => true,
  3205. 'fred_themes' => true,
  3206. 'fred_themed_templates_save' => true,
  3207. 'fred_themed_templates_delete' => true,
  3208. 'fred_themed_templates' => true,
  3209. 'fred_settings_tvs' => true,
  3210. 'fred_settings_tags' => true,
  3211. 'fred_settings_advanced' => true,
  3212. 'fred_media_sources' => true,
  3213. 'fred_settings' => true,
  3214. 'fred_blueprint_categories_save' => true,
  3215. 'fred_blueprint_categories_delete' => true,
  3216. 'fred_blueprint_categories_create_public' => true,
  3217. 'fred_blueprints_save' => true,
  3218. 'fred_blueprint_categories' => true,
  3219. 'fred_blueprints_delete' => true,
  3220. 'fred_blueprints_create_public' => true,
  3221. 'fred_blueprints' => true,
  3222. 'new_document_in_root' => true,
  3223. 'view_unpublished' => true,
  3224. 'resource_duplicate' => true,
  3225. 'unpublish_document' => true,
  3226. 'publish_document' => true,
  3227. 'save_document' => true,
  3228. 'undelete_document' => true,
  3229. 'new_document' => true,
  3230. 'delete_document' => true,
  3231. 'formit' => true,
  3232. 'formit_encryptions' => false,
  3233. ),
  3234. ),
  3235. 17 =>
  3236. array (
  3237. 'principal' => 3,
  3238. 'authority' => 9999,
  3239. 'policy' =>
  3240. array (
  3241. 'load' => true,
  3242. 'list' => true,
  3243. 'view' => true,
  3244. 'save' => true,
  3245. 'remove' => true,
  3246. 'copy' => true,
  3247. 'view_unpublished' => true,
  3248. ),
  3249. ),
  3250. 18 =>
  3251. array (
  3252. 'principal' => 4,
  3253. 'authority' => 3,
  3254. 'policy' =>
  3255. array (
  3256. 'load' => true,
  3257. 'list' => true,
  3258. 'view' => true,
  3259. 'save' => true,
  3260. 'remove' => true,
  3261. 'copy' => true,
  3262. 'view_unpublished' => true,
  3263. ),
  3264. ),
  3265. 19 =>
  3266. array (
  3267. 'principal' => 5,
  3268. 'authority' => 9999,
  3269. 'policy' =>
  3270. array (
  3271. 'load' => true,
  3272. 'list' => true,
  3273. 'view' => true,
  3274. 'save' => true,
  3275. 'remove' => true,
  3276. 'copy' => true,
  3277. 'view_unpublished' => true,
  3278. ),
  3279. ),
  3280. 20 =>
  3281. array (
  3282. 'principal' => 6,
  3283. 'authority' => 9999,
  3284. 'policy' =>
  3285. array (
  3286. 'load' => true,
  3287. 'list' => true,
  3288. 'view' => true,
  3289. 'save' => true,
  3290. 'remove' => true,
  3291. 'copy' => true,
  3292. 'view_unpublished' => true,
  3293. ),
  3294. ),
  3295. ),
  3296. ),
  3297. ),
  3298. );