73.cache.php 125 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239
  1. <?php return array (
  2. 'resourceClass' => 'modDocument',
  3. 'resource' =>
  4. array (
  5. 'id' => 73,
  6. 'type' => 'document',
  7. 'contentType' => 'text/html',
  8. 'pagetitle' => 'Soil Balance',
  9. 'longtitle' => '',
  10. 'description' => 'Demo post 2 for the BlogIt extra.',
  11. 'alias' => 'post-2',
  12. 'alias_visible' => 1,
  13. 'link_attributes' => '',
  14. 'published' => 1,
  15. 'pub_date' => 0,
  16. 'unpub_date' => 0,
  17. 'parent' => 71,
  18. 'isfolder' => 0,
  19. 'introtext' => 'The cations Calcium, Magnesium, Sodium, Potassium, and Hydrogen have a major impact on pH and soil structure',
  20. 'content' => '<p class="lead">The cations Calcium, Magnesium, Sodium, Potassium, and Hydrogen have a major impact on pH and soil structure. Soil micro-organisms rely on good aeration and moisture regulation (field capacity) to function well. It is vital to maintaining a good balance between these cations, in turn assisting the soil biota and the availability of major and minor elements.</p>
  21. <p>The physical structure of the ‘ideal’ soil is made up to 50% solids and 50% pore space. Minerals 45%, organic matter (humus) 5%, with air at 25% and moisture remaining 25%. These ideal levels can be brought into alignment by the use of Total Exchange Capacity and Base Saturation Percentages of a particular soil.</p>
  22. <p>Base saturation percentages of major cations, which occupy space on the clay colloid from the ‘solids’ portion of the soil, determine whether or not there is enough pore space to accommodate the air and moisture percentages. Calcium and Magnesium have the greatest influence on those percentages.</p>
  23. <p>A soil with a cation exchange of say 10-30 requires a base saturation of min. 68% Calcium and 12% Magnesium, whilst a soil with a C.E.C. of 7 or less requires min. 60% Calcium and max. 20% Magnesium to have the same amount of pore space. In most situations, we have found a calcium/magnesium ratio of between 5:1 and 7:1 is ideal.</p>
  24. <p>A major factor which contributes to healthier vines and high-quality fruit is a fungal dominated soil. This can be achieved using materials like humic acid, fish, kelp, aloe vera, and the microbe cultures.</p>
  25. <p>Given the various options using new ‘biological’ inputs, combined with ‘conventional’ methods, we have found what we believe to be a more substantial approach to soil balance and crop nutrition suited to high quality, high value produce in lieu of low value and quantity.</p>',
  26. 'richtext' => 1,
  27. 'template' => 12,
  28. 'menuindex' => 1,
  29. 'searchable' => 1,
  30. 'cacheable' => 1,
  31. 'createdby' => 1,
  32. 'createdon' => 1549403042,
  33. 'editedby' => 1,
  34. 'editedon' => 1549519286,
  35. 'deleted' => 0,
  36. 'deletedon' => 0,
  37. 'deletedby' => 0,
  38. 'publishedon' => 1549514820,
  39. 'publishedby' => 1,
  40. 'menutitle' => '',
  41. 'donthit' => 0,
  42. 'privateweb' => 0,
  43. 'privatemgr' => 0,
  44. 'content_dispo' => 0,
  45. 'hidemenu' => 0,
  46. 'class_key' => 'modDocument',
  47. 'context_key' => 'web',
  48. 'content_type' => 1,
  49. 'uri' => 'post-2.html',
  50. 'uri_override' => 0,
  51. 'hide_children_in_tree' => 0,
  52. 'show_in_tree' => 0,
  53. 'properties' => NULL,
  54. 'blogit.post_main_image' =>
  55. array (
  56. 0 => 'blogit.post_main_image',
  57. 1 => 'http://placehold.it/900x300',
  58. 2 => 'default',
  59. 3 => NULL,
  60. 4 => 'image',
  61. ),
  62. 'blogit.post_main_image_alt' =>
  63. array (
  64. 0 => 'blogit.post_main_image_alt',
  65. 1 => 'Soil Balance',
  66. 2 => 'default',
  67. 3 => NULL,
  68. 4 => 'text',
  69. ),
  70. '_content' => '<!DOCTYPE html>
  71. <html lang="en">
  72. <head>
  73. <base href="https://cropmonitor.info/" />
  74. <meta charset="utf-8" />
  75. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  76. <title>Soil Balance | Crop Monitor</title>
  77. <meta name="description" content="Demo post 2 for the BlogIt extra.">
  78. <meta name="viewport" content="width=device-width, initial-scale=1">
  79. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  80. <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
  81. <script type="text/javascript" src="https://use.fontawesome.com/1e2844bb90.js"></script>
  82. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" integrity="sha384-gfdkjb5BdAXd+lj+gudLWI+BXq4IuLW5IT+brZEZsLFm++aCMlF1V92rMkPaX4PP" crossorigin="anonymous" />
  83. <link rel="stylesheet" type="text/css" href="/client-assets/weather-icons/css/weather-icons.min.css?version=1.16" />
  84. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.css" />
  85. <link rel="stylesheet" href="client-assets/css/greyscale.css" >
  86. <link href="https://fonts.googleapis.com/css?family=Varela+Round" rel="stylesheet">
  87. <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
  88. <style>
  89. body {
  90. }
  91. .blog.masthead {
  92. height: 20vh;
  93. padding: 0;
  94. min-height: 5rem !important;
  95. }
  96. </style>
  97. </head>
  98. <body id="page-top">
  99. <!-- Navigation -->
  100. <nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
  101. <div class="container">
  102. <a class="navbar-brand js-scroll-trigger" href="#page-top">Crop monitor</a>
  103. <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
  104. Menu
  105. <i class="fas fa-bars"></i>
  106. </button>
  107. <div class="collapse navbar-collapse" id="navbarResponsive">
  108. <ul class="navbar-nav ml-auto">
  109. <li class="nav-item">
  110. <a class="nav-link js-scroll-trigger" href="#about">About</a>
  111. </li>
  112. <li class="nav-item">
  113. <a class="nav-link js-scroll-trigger" href="#services">Services</a>
  114. </li>
  115. <li class="nav-item">
  116. <a class="nav-link js-scroll-trigger" href="#pricing">Pricing</a>
  117. </li>
  118. <li class="nav-item">
  119. <a class="nav-link js-scroll-trigger" href="#signup">Contact</a>
  120. </li>
  121. <li class="nav-item">
  122. <a class="nav-link js-scroll-trigger" href="#login">Login</a>
  123. </li>
  124. </ul>
  125. </div>
  126. </div>
  127. </nav>
  128. <header class="blog masthead">
  129. <div class="container d-flex h-100 align-items-center">
  130. <div class="mx-auto text-center">
  131. </div>
  132. </div>
  133. </header>
  134. <div class="container">
  135. <div class="row">
  136. <!-- Post Content Column -->
  137. <div class="col-lg-8">
  138. <!-- Title -->
  139. <h1 class="mt-4">Soil Balance</h1>
  140. <!-- Author -->
  141. <p class="lead">
  142. <a href="#">Created by: Benjamin Harris</a>
  143. </p>
  144. <hr>
  145. <!-- Date/Time -->
  146. <p>Published on: <time datetime="19-02-07">Feb 07 2019 at 15:47 PM</time></p>
  147. <hr>
  148. <!-- Preview Image -->
  149. <img class="img-fluid rounded" src="/assets/components/phpthumbof/cache/900x300.69398f367d8175b7e5e91b3bd10fa976.jpg" alt="Soil Balance">
  150. <hr>
  151. <!-- Post Content -->
  152. <p class="lead">The cations Calcium, Magnesium, Sodium, Potassium, and Hydrogen have a major impact on pH and soil structure. Soil micro-organisms rely on good aeration and moisture regulation (field capacity) to function well. It is vital to maintaining a good balance between these cations, in turn assisting the soil biota and the availability of major and minor elements.</p>
  153. <p>The physical structure of the ‘ideal’ soil is made up to 50% solids and 50% pore space. Minerals 45%, organic matter (humus) 5%, with air at 25% and moisture remaining 25%. These ideal levels can be brought into alignment by the use of Total Exchange Capacity and Base Saturation Percentages of a particular soil.</p>
  154. <p>Base saturation percentages of major cations, which occupy space on the clay colloid from the ‘solids’ portion of the soil, determine whether or not there is enough pore space to accommodate the air and moisture percentages. Calcium and Magnesium have the greatest influence on those percentages.</p>
  155. <p>A soil with a cation exchange of say 10-30 requires a base saturation of min. 68% Calcium and 12% Magnesium, whilst a soil with a C.E.C. of 7 or less requires min. 60% Calcium and max. 20% Magnesium to have the same amount of pore space. In most situations, we have found a calcium/magnesium ratio of between 5:1 and 7:1 is ideal.</p>
  156. <p>A major factor which contributes to healthier vines and high-quality fruit is a fungal dominated soil. This can be achieved using materials like humic acid, fish, kelp, aloe vera, and the microbe cultures.</p>
  157. <p>Given the various options using new ‘biological’ inputs, combined with ‘conventional’ methods, we have found what we believe to be a more substantial approach to soil balance and crop nutrition suited to high quality, high value produce in lieu of low value and quantity.</p>
  158. <hr>
  159. </div>
  160. <!-- Sidebar Widgets Column -->
  161. <div class="col-md-4">
  162. <!-- Side Widget -->
  163. <div class="card my-4">
  164. <h5 class="card-header">Portal Login</h5>
  165. <div class="card-body">
  166. [[!Login?
  167. &loginTpl=`CM_bloglgnLoginTpl`
  168. &loginResourceId=`2`
  169. &loginViaEmail=`true`
  170. &errTpl=`lgnErrTpl`
  171. &logoutTpl=`CMlgnLogoutTpl`
  172. &logoutResourceId=`4`
  173. &tpl=`CMlgnForgotPassTpl`
  174. &resetResourceId=`3`
  175. ]]
  176. </div>
  177. </div>
  178. <!-- Search Widget -->
  179. <div class="card my-4">
  180. <h5 class="card-header">Search</h5>
  181. <div class="card-body">
  182. <div class="input-group mb-3">
  183. [[!SimpleSearchForm?
  184. &landing=`80`
  185. &tpl=`CMSearchForm`
  186. &method=`POST`
  187. ]]
  188. </div>
  189. </div>
  190. </div>
  191. <!-- Categories Widget -->
  192. <div class="card my-4">
  193. <h5 class="card-header">Categories</h5>
  194. <div class="card-body">
  195. <div class="row">
  196. <div class="col">
  197. <ul class="list-inline mb-0">
  198. <!-- BlogIt - This chunk grabs all uses Tagger tags used in posts -->
  199. <li class="list-inline-item">
  200. <a href="post-2.html/main-group/calcium/">Calcium</a>
  201. </li><li class="list-inline-item">
  202. <a href="post-2.html/main-group/magnesium/">Magnesium</a>
  203. </li><li class="list-inline-item">
  204. <a href="post-2.html/main-group/nitrogen/">Nitrogen</a>
  205. </li><li class="list-inline-item">
  206. <a href="post-2.html/main-group/nutrition/">Nutrition</a>
  207. </li><li class="list-inline-item">
  208. <a href="post-2.html/main-group/potassium/">Potassium</a>
  209. </li><li class="list-inline-item">
  210. <a href="post-2.html/main-group/sodium/">Sodium</a>
  211. </li><li class="list-inline-item">
  212. <a href="post-2.html/main-group/viticultural/">Viticultural</a>
  213. </li>
  214. </ul>
  215. </div>
  216. </div>
  217. </div>
  218. </div>
  219. <!-- Side Widget -->
  220. <div class="card my-4">
  221. <h5 class="card-header">Contact Us</h5>
  222. <div class="card-body">
  223. [[!FormIt?
  224. &hooks=`spam,email`
  225. &submitVar=`enquiry-submit`
  226. &emailTpl=`CMenquiryEmailTpl`
  227. &emailTo=`enquiries@cropmonitor.info`
  228. &successMessage=`Thankyou for contacting us, we will be in touch soon.`
  229. &validationErrorMessage=`true`
  230. &validate=`nospam:blank,
  231. name:required,
  232. email:email:required,
  233. text:required:stripTags`
  234. ]]
  235. <span>
  236. [[!+fi.successMessage:notempty=`<div class="small text-black-50">[[!+fi.successMessage]]</div>`]]
  237. [[!+fi.validation_error_message:notempty=`<div class="small text-black-50">[[+errors]] [[!+fi.validation_error_message]]</div>`]]
  238. </span>
  239. <form action="post-2.html#contact" method="post">
  240. <div class="form-group">
  241. <input type="hidden" name="nospam" value="" />
  242. <input class="form-control form-control-sm flex-fill mr-0 mr-sm-2 mb-3 mb-sm-0" type="email" name="email" id="email" value="[[!+fi.email]]" placeholder="Email Address" >
  243. <small id="emailHelp" class="form-text text-muted">We\'ll never share your email.</small>
  244. </div>
  245. <div class="form-group">
  246. <input class="form-control form-control-sm flex-fill mr-0 mr-sm-2 mb-3 mb-sm-0" type="text" name="name" id="name" value="[[!+fi.name]]" placeholder="Full Name">
  247. </div>
  248. <div class="form-group">
  249. <textarea class="form-control form-control-sm flex-fill mr-0 mr-sm-2 mb-3 mb-sm-0" name="text" id="text" rows="1" value="[[!+fi.text]]" placeholder="Your enquiry is about...." ></textarea>
  250. </div>
  251. <div class="form-group">
  252. <input type="submit" name="enquiry-submit" class="btn-sm btn btn-success" value="Submit" />
  253. </div>
  254. </form>
  255. </div>
  256. </div>
  257. </div>
  258. </div>
  259. </div>
  260. </body>
  261. </html>',
  262. '_isForward' => true,
  263. ),
  264. 'contentType' =>
  265. array (
  266. 'id' => 1,
  267. 'name' => 'HTML',
  268. 'description' => 'HTML content',
  269. 'mime_type' => 'text/html',
  270. 'file_extensions' => '.html',
  271. 'headers' => NULL,
  272. 'binary' => 0,
  273. ),
  274. 'policyCache' =>
  275. array (
  276. ),
  277. 'elementCache' =>
  278. array (
  279. '[[*pagetitle:strip_tags]]' => 'Soil Balance',
  280. '[[*longtitle:strip_tags:empty=`Soil Balance`]]' => 'Soil Balance',
  281. '[[*description]]' => 'Demo post 2 for the BlogIt extra.',
  282. '[[*description:notempty=`Demo post 2 for the BlogIt extra.`:default=``]]' => 'Demo post 2 for the BlogIt extra.',
  283. '[[$dash-header]]' => '<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  284. <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
  285. <script type="text/javascript" src="https://use.fontawesome.com/1e2844bb90.js"></script>
  286. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" integrity="sha384-gfdkjb5BdAXd+lj+gudLWI+BXq4IuLW5IT+brZEZsLFm++aCMlF1V92rMkPaX4PP" crossorigin="anonymous" />
  287. <link rel="stylesheet" type="text/css" href="/client-assets/weather-icons/css/weather-icons.min.css?version=1.16" />
  288. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.css" />',
  289. '[[blogit.lexicon_load]]' => '',
  290. '[[%blogit.created_by]]' => 'Created by',
  291. '[[*createdby:userinfo=`fullname`]]' => 'Benjamin Harris',
  292. '[[%blogit.published_on]]' => 'Published on',
  293. '[[*publishedon:strtotime:date=`%y-%m-%d`]]' => '19-02-07',
  294. '[[*publishedon:strtotime:date=`%b %d %Y`]]' => 'Feb 07 2019',
  295. '[[*publishedon:strtotime:date=`%H:%M %p`]]' => '15:47 PM',
  296. '[[*blogit.post_main_image:phpthumbof=`w=900`]]' => '/assets/components/phpthumbof/cache/900x300.69398f367d8175b7e5e91b3bd10fa976.jpg',
  297. '[[*blogit.post_main_image_alt]]' => 'Soil Balance',
  298. '[[*blogit.post_main_image:isnot=``:then=`<img class="img-fluid rounded" src="/assets/components/phpthumbof/cache/900x300.69398f367d8175b7e5e91b3bd10fa976.jpg" alt="Soil Balance">`]]' => '<img class="img-fluid rounded" src="/assets/components/phpthumbof/cache/900x300.69398f367d8175b7e5e91b3bd10fa976.jpg" alt="Soil Balance">',
  299. '[[TaggerGetTags? &rowTpl=`blogit.tag_links_tpl` &separator=``]]' => '<li class="list-inline-item">
  300. <a href="post-2.html/main-group/calcium/">Calcium</a>
  301. </li><li class="list-inline-item">
  302. <a href="post-2.html/main-group/magnesium/">Magnesium</a>
  303. </li><li class="list-inline-item">
  304. <a href="post-2.html/main-group/nitrogen/">Nitrogen</a>
  305. </li><li class="list-inline-item">
  306. <a href="post-2.html/main-group/nutrition/">Nutrition</a>
  307. </li><li class="list-inline-item">
  308. <a href="post-2.html/main-group/potassium/">Potassium</a>
  309. </li><li class="list-inline-item">
  310. <a href="post-2.html/main-group/sodium/">Sodium</a>
  311. </li><li class="list-inline-item">
  312. <a href="post-2.html/main-group/viticultural/">Viticultural</a>
  313. </li>',
  314. '[[$blogit.taglist]]' => '<li class="list-inline-item">
  315. <a href="post-2.html/main-group/calcium/">Calcium</a>
  316. </li><li class="list-inline-item">
  317. <a href="post-2.html/main-group/magnesium/">Magnesium</a>
  318. </li><li class="list-inline-item">
  319. <a href="post-2.html/main-group/nitrogen/">Nitrogen</a>
  320. </li><li class="list-inline-item">
  321. <a href="post-2.html/main-group/nutrition/">Nutrition</a>
  322. </li><li class="list-inline-item">
  323. <a href="post-2.html/main-group/potassium/">Potassium</a>
  324. </li><li class="list-inline-item">
  325. <a href="post-2.html/main-group/sodium/">Sodium</a>
  326. </li><li class="list-inline-item">
  327. <a href="post-2.html/main-group/viticultural/">Viticultural</a>
  328. </li> ',
  329. '[[*id]]' => 73,
  330. '[[~73]]' => 'post-2.html',
  331. '[[~80]]' => 'blog-search-results.html',
  332. '[[%simplesearch.search? &namespace=`simplesearch` &topic=`default`]]' => 'Search',
  333. ),
  334. 'sourceCache' =>
  335. array (
  336. 'modChunk' =>
  337. array (
  338. 'dash-header' =>
  339. array (
  340. 'fields' =>
  341. array (
  342. 'id' => 13,
  343. 'source' => 0,
  344. 'property_preprocess' => false,
  345. 'name' => 'dash-header',
  346. 'description' => '',
  347. 'editor_type' => 0,
  348. 'category' => 0,
  349. 'cache_type' => 0,
  350. 'snippet' => '<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  351. <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
  352. <script type="text/javascript" src="https://use.fontawesome.com/1e2844bb90.js"></script>
  353. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" integrity="sha384-gfdkjb5BdAXd+lj+gudLWI+BXq4IuLW5IT+brZEZsLFm++aCMlF1V92rMkPaX4PP" crossorigin="anonymous" />
  354. <link rel="stylesheet" type="text/css" href="/client-assets/weather-icons/css/weather-icons.min.css?version=1.16" />
  355. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.css" />',
  356. 'locked' => false,
  357. 'properties' =>
  358. array (
  359. ),
  360. 'static' => false,
  361. 'static_file' => '',
  362. 'content' => '<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  363. <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
  364. <script type="text/javascript" src="https://use.fontawesome.com/1e2844bb90.js"></script>
  365. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" integrity="sha384-gfdkjb5BdAXd+lj+gudLWI+BXq4IuLW5IT+brZEZsLFm++aCMlF1V92rMkPaX4PP" crossorigin="anonymous" />
  366. <link rel="stylesheet" type="text/css" href="/client-assets/weather-icons/css/weather-icons.min.css?version=1.16" />
  367. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.css" />',
  368. ),
  369. 'policies' =>
  370. array (
  371. 'web' =>
  372. array (
  373. ),
  374. ),
  375. 'source' =>
  376. array (
  377. ),
  378. ),
  379. 'blogit.taglist' =>
  380. array (
  381. 'fields' =>
  382. array (
  383. 'id' => 94,
  384. 'source' => 0,
  385. 'property_preprocess' => false,
  386. 'name' => 'blogit.taglist',
  387. 'description' => 'Blogit - Created by MPThemes http://mpthemes.com',
  388. 'editor_type' => 0,
  389. 'category' => 36,
  390. 'cache_type' => 0,
  391. 'snippet' => '[[++blogit.use_tags:isequalto=`1`:then=`[[TaggerGetTags? &rowTpl=`blogit.tag_links_tpl` &separator=``]] `]]',
  392. 'locked' => false,
  393. 'properties' =>
  394. array (
  395. ),
  396. 'static' => false,
  397. 'static_file' => '',
  398. 'content' => '[[++blogit.use_tags:isequalto=`1`:then=`[[TaggerGetTags? &rowTpl=`blogit.tag_links_tpl` &separator=``]] `]]',
  399. ),
  400. 'policies' =>
  401. array (
  402. 'web' =>
  403. array (
  404. ),
  405. ),
  406. 'source' =>
  407. array (
  408. ),
  409. ),
  410. 'blogit.tag_links_tpl' =>
  411. array (
  412. 'fields' =>
  413. array (
  414. 'id' => 91,
  415. 'source' => 0,
  416. 'property_preprocess' => false,
  417. 'name' => 'blogit.tag_links_tpl',
  418. 'description' => 'Blogit - Created by MPThemes http://mpthemes.com',
  419. 'editor_type' => 0,
  420. 'category' => 36,
  421. 'cache_type' => 0,
  422. 'snippet' => '<li class="list-inline-item">
  423. <a href="[[+uri]]">[[+tag]]</a>
  424. </li>',
  425. 'locked' => false,
  426. 'properties' =>
  427. array (
  428. ),
  429. 'static' => false,
  430. 'static_file' => '',
  431. 'content' => '<li class="list-inline-item">
  432. <a href="[[+uri]]">[[+tag]]</a>
  433. </li>',
  434. ),
  435. 'policies' =>
  436. array (
  437. 'web' =>
  438. array (
  439. ),
  440. ),
  441. 'source' =>
  442. array (
  443. ),
  444. ),
  445. 'CM_bloglgnLoginTpl' =>
  446. array (
  447. 'fields' =>
  448. array (
  449. 'id' => 110,
  450. 'source' => 0,
  451. 'property_preprocess' => false,
  452. 'name' => 'CM_bloglgnLoginTpl',
  453. 'description' => '',
  454. 'editor_type' => 0,
  455. 'category' => 21,
  456. 'cache_type' => 0,
  457. 'snippet' => '<form class="form-group" action="[[~[[*id]]]]" method="post">
  458. <div class="form-label-group">
  459. <input type="email" id="inputEmail" class="form-control form-control-sm flex-fill mr-0 mr-sm-2 mb-3 mb-sm-0" placeholder="Email address" required autofocus>
  460. <label for="inputEmail">Email address</label>
  461. </div>
  462. <div class="form-label-group">
  463. <input type="password" id="inputPassword" class="form-control form-control-sm flex-fill mr-0 mr-sm-2 mb-3 mb-sm-0" placeholder="Password" required>
  464. <label for="inputPassword">Password</label>
  465. </div>
  466. <input class="returnUrl" type="hidden" name="returnUrl" value="[[+request_uri]]" />
  467. [[+login.recaptcha_html]]
  468. <button class="btn-sm btn btn-success" type="submit">Sign in</button>
  469. </form>
  470. ',
  471. 'locked' => false,
  472. 'properties' =>
  473. array (
  474. ),
  475. 'static' => false,
  476. 'static_file' => '',
  477. 'content' => '<form class="form-group" action="[[~[[*id]]]]" method="post">
  478. <div class="form-label-group">
  479. <input type="email" id="inputEmail" class="form-control form-control-sm flex-fill mr-0 mr-sm-2 mb-3 mb-sm-0" placeholder="Email address" required autofocus>
  480. <label for="inputEmail">Email address</label>
  481. </div>
  482. <div class="form-label-group">
  483. <input type="password" id="inputPassword" class="form-control form-control-sm flex-fill mr-0 mr-sm-2 mb-3 mb-sm-0" placeholder="Password" required>
  484. <label for="inputPassword">Password</label>
  485. </div>
  486. <input class="returnUrl" type="hidden" name="returnUrl" value="[[+request_uri]]" />
  487. [[+login.recaptcha_html]]
  488. <button class="btn-sm btn btn-success" type="submit">Sign in</button>
  489. </form>
  490. ',
  491. ),
  492. 'policies' =>
  493. array (
  494. 'web' =>
  495. array (
  496. ),
  497. ),
  498. 'source' =>
  499. array (
  500. ),
  501. ),
  502. ),
  503. 'modSnippet' =>
  504. array (
  505. 'blogit.lexicon_load' =>
  506. array (
  507. 'fields' =>
  508. array (
  509. 'id' => 103,
  510. 'source' => 0,
  511. 'property_preprocess' => false,
  512. 'name' => 'blogit.lexicon_load',
  513. 'description' => 'Blogit - Created by MPThemes http://mpthemes.com',
  514. 'editor_type' => 0,
  515. 'category' => 36,
  516. 'cache_type' => 0,
  517. 'snippet' => '$modx->lexicon->load(\'blogit:default\');
  518. return \'\';',
  519. 'locked' => false,
  520. 'properties' =>
  521. array (
  522. ),
  523. 'moduleguid' => '',
  524. 'static' => false,
  525. 'static_file' => '',
  526. 'content' => '$modx->lexicon->load(\'blogit:default\');
  527. return \'\';',
  528. ),
  529. 'policies' =>
  530. array (
  531. 'web' =>
  532. array (
  533. ),
  534. ),
  535. 'source' =>
  536. array (
  537. ),
  538. ),
  539. 'phpthumbof' =>
  540. array (
  541. 'fields' =>
  542. array (
  543. 'id' => 97,
  544. 'source' => 0,
  545. 'property_preprocess' => false,
  546. 'name' => 'phpthumbof',
  547. 'description' => 'Identical to pthumb. Retained for backwards compatibility.
  548. Documentation: https://github.com/oo12/phpThumbOf',
  549. 'editor_type' => 0,
  550. 'category' => 33,
  551. 'cache_type' => 0,
  552. 'snippet' => '/**
  553. * pThumb
  554. * Copyright 2013-2014 Jason Grant
  555. *
  556. * Please see the GitHub page for documentation or to report bugs:
  557. * https://github.com/oo12/phpThumbOf
  558. *
  559. * Forked from phpThumbOf 1.4.0
  560. * Copyright 2009-2012 by Shaun McCormick <shaun@modx.com>
  561. *
  562. * pThumb is free software; you can redistribute it and/or modify it
  563. * under the terms of the GNU General Public License as published by the Free
  564. * Software Foundation; either version 2 of the License, or (at your option) any
  565. * later version.
  566. *
  567. * pThumb is distributed in the hope that it will be useful, but WITHOUT ANY
  568. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  569. * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  570. *
  571. * You should have received a copy of the GNU General Public License along with
  572. * phpThumbOf; if not, write to the Free Software Foundation, Inc., 59 Temple
  573. * Place, Suite 330, Boston, MA 02111-1307 USA
  574. *
  575. */
  576. /**
  577. *
  578. * @var modX $modx
  579. * @var array $scriptProperties
  580. * @var string $input
  581. * @var string|array $options
  582. *
  583. */
  584. if (empty($input)) { // Exit quietly if no file name given
  585. return;
  586. }
  587. $scriptProperties[\'debug\'] = isset($debug) ? $debug : false;
  588. static $pt_settings = array();
  589. if (empty($pt_settings)) {
  590. if (!$modx->loadClass(\'phpThumbOf\', MODX_CORE_PATH . \'components/phpthumbof/model/\', true, true)) {
  591. $modx->log(modX::LOG_LEVEL_ERROR, \'[pThumb] Could not load phpThumbOf class.\');
  592. return $input;
  593. }
  594. }
  595. $pThumb = new phpThumbOf($modx, $pt_settings, $scriptProperties);
  596. $result = $pThumb->createThumbnail($input, $options);
  597. if (!empty($toPlaceholder) || $result[\'outputDims\']) {
  598. if ($result[\'width\'] === \'\' && $result[\'file\'] && $dims = getimagesize($result[\'file\']) ) {
  599. $result[\'width\'] = $dims[0];
  600. $result[\'height\'] = $dims[1];
  601. }
  602. if (!empty($toPlaceholder)) {
  603. $modx->setPlaceholders(array(
  604. $toPlaceholder => $result[\'src\'],
  605. "$toPlaceholder.width" => $result[\'width\'],
  606. "$toPlaceholder.height" => $result[\'height\']
  607. ));
  608. $output = \'\';
  609. }
  610. if ($result[\'outputDims\']) {
  611. $output = "src=\\"{$result[\'src\']}\\"" . ($result[\'width\'] ? " width=\\"{$result[\'width\']}\\" height=\\"{$result[\'height\']}\\"" : \'\');
  612. }
  613. }
  614. else {
  615. $output = $result[\'src\'];
  616. }
  617. if ($debug && $result[\'success\']) { // if debugging is on and createThumbnail was successful, log the debug info
  618. $pThumb->debugmsg(isset($pThumb->phpThumb->debugmessages) ? \':: Processed ::\' : ":: Loaded from cache: {$result[\'src\']}", true);
  619. }
  620. return $output;',
  621. 'locked' => false,
  622. 'properties' =>
  623. array (
  624. 'debug' =>
  625. array (
  626. 'name' => 'debug',
  627. 'desc' => 'prop_pthumb.debug_desc',
  628. 'type' => 'combo-boolean',
  629. 'options' =>
  630. array (
  631. ),
  632. 'value' => false,
  633. 'lexicon' => 'phpthumbof:default',
  634. 'area' => '',
  635. 'desc_trans' => 'Write debug messages to the MODX error log.',
  636. 'area_trans' => '',
  637. ),
  638. ),
  639. 'moduleguid' => '',
  640. 'static' => false,
  641. 'static_file' => '',
  642. 'content' => '/**
  643. * pThumb
  644. * Copyright 2013-2014 Jason Grant
  645. *
  646. * Please see the GitHub page for documentation or to report bugs:
  647. * https://github.com/oo12/phpThumbOf
  648. *
  649. * Forked from phpThumbOf 1.4.0
  650. * Copyright 2009-2012 by Shaun McCormick <shaun@modx.com>
  651. *
  652. * pThumb is free software; you can redistribute it and/or modify it
  653. * under the terms of the GNU General Public License as published by the Free
  654. * Software Foundation; either version 2 of the License, or (at your option) any
  655. * later version.
  656. *
  657. * pThumb is distributed in the hope that it will be useful, but WITHOUT ANY
  658. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  659. * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  660. *
  661. * You should have received a copy of the GNU General Public License along with
  662. * phpThumbOf; if not, write to the Free Software Foundation, Inc., 59 Temple
  663. * Place, Suite 330, Boston, MA 02111-1307 USA
  664. *
  665. */
  666. /**
  667. *
  668. * @var modX $modx
  669. * @var array $scriptProperties
  670. * @var string $input
  671. * @var string|array $options
  672. *
  673. */
  674. if (empty($input)) { // Exit quietly if no file name given
  675. return;
  676. }
  677. $scriptProperties[\'debug\'] = isset($debug) ? $debug : false;
  678. static $pt_settings = array();
  679. if (empty($pt_settings)) {
  680. if (!$modx->loadClass(\'phpThumbOf\', MODX_CORE_PATH . \'components/phpthumbof/model/\', true, true)) {
  681. $modx->log(modX::LOG_LEVEL_ERROR, \'[pThumb] Could not load phpThumbOf class.\');
  682. return $input;
  683. }
  684. }
  685. $pThumb = new phpThumbOf($modx, $pt_settings, $scriptProperties);
  686. $result = $pThumb->createThumbnail($input, $options);
  687. if (!empty($toPlaceholder) || $result[\'outputDims\']) {
  688. if ($result[\'width\'] === \'\' && $result[\'file\'] && $dims = getimagesize($result[\'file\']) ) {
  689. $result[\'width\'] = $dims[0];
  690. $result[\'height\'] = $dims[1];
  691. }
  692. if (!empty($toPlaceholder)) {
  693. $modx->setPlaceholders(array(
  694. $toPlaceholder => $result[\'src\'],
  695. "$toPlaceholder.width" => $result[\'width\'],
  696. "$toPlaceholder.height" => $result[\'height\']
  697. ));
  698. $output = \'\';
  699. }
  700. if ($result[\'outputDims\']) {
  701. $output = "src=\\"{$result[\'src\']}\\"" . ($result[\'width\'] ? " width=\\"{$result[\'width\']}\\" height=\\"{$result[\'height\']}\\"" : \'\');
  702. }
  703. }
  704. else {
  705. $output = $result[\'src\'];
  706. }
  707. if ($debug && $result[\'success\']) { // if debugging is on and createThumbnail was successful, log the debug info
  708. $pThumb->debugmsg(isset($pThumb->phpThumb->debugmessages) ? \':: Processed ::\' : ":: Loaded from cache: {$result[\'src\']}", true);
  709. }
  710. return $output;',
  711. ),
  712. 'policies' =>
  713. array (
  714. 'web' =>
  715. array (
  716. ),
  717. ),
  718. 'source' =>
  719. array (
  720. ),
  721. ),
  722. 'TaggerGetTags' =>
  723. array (
  724. 'fields' =>
  725. array (
  726. 'id' => 99,
  727. 'source' => 0,
  728. 'property_preprocess' => false,
  729. 'name' => 'TaggerGetTags',
  730. 'description' => '',
  731. 'editor_type' => 0,
  732. 'category' => 35,
  733. 'cache_type' => 0,
  734. 'snippet' => '/**
  735. * TaggerGetTags
  736. *
  737. * DESCRIPTION
  738. *
  739. * This Snippet allows you to list tags for resource(s), group(s) and all tags
  740. *
  741. * PROPERTIES:
  742. *
  743. * &resources string optional Comma separated list of resources for which will be listed Tags
  744. * &parents string optional Comma separated list of parents for which will be listed Tags
  745. * &groups string optional Comma separated list of Tagger Groups for which will be listed Tags
  746. * &rowTpl string optional Name of a chunk that will be used for each Tag. If no chunk is given, array with available placeholders will be rendered
  747. * &outTpl string optional Name of a chunk that will be used for wrapping all tags. If no chunk is given, tags will be rendered without a wrapper
  748. * &separator string optional String separator, that will be used for separating Tags
  749. * &limit int optional Limit number of returned tag Tags
  750. * &offset int optional Offset the output by this number of Tags
  751. * &totalPh string optional Placeholder to output the total number of Tags regardless of &limit and &offset
  752. * &target int optional An ID of a resource that will be used for generating URI for a Tag. If no ID is given, current Resource ID will be used
  753. * &showUnused int optional If 1 is set, Tags that are not assigned to any Resource will be included to the output as well
  754. * &showUnpublished int optional If 1 is set, Tags that are assigned only to unpublished Resources will be included to the output as well
  755. * &showDeleted int optional If 1 is set, Tags that are assigned only to deleted Resources will be included to the output as well
  756. * &linkCurrentTags int optional If 1 is set, Current Tags will be included in generated URL, default behavior is to generate links to a single tag
  757. * &linkOneTagPerGroup int optional If 1 is set, Only one tag will be placed to a group (in the URI tags from same group will swap places); Only available for linkCurrentTags=1; Default: 0
  758. * &contexts string optional If set, will display only tags for resources in given contexts. Contexts can be separated by a comma
  759. * &toPlaceholder string optional If set, output will return in placeholder with given name
  760. * &sort string optional Sort options in JSON. Example {"tag": "ASC"} or multiple sort options {"group_id": "ASC", "tag": "ASC"}
  761. * &friendlyURL int optional If set, will be used instead of friendly_urls system setting to generate URL
  762. * &linkTagScheme int|string optional Strategy to generate URLs, available values: -1, 0, 1, full, abs, http, https; Default: link_tag_scheme system setting
  763. *
  764. * USAGE:
  765. *
  766. * [[!TaggerGetTags? &showUnused=`1`]]
  767. *
  768. *
  769. * @package tagger
  770. */
  771. /** @var Tagger $tagger */
  772. $tagger = $modx->getService(\'tagger\',\'Tagger\',$modx->getOption(\'tagger.core_path\',null,$modx->getOption(\'core_path\').\'components/tagger/\').\'model/tagger/\',$scriptProperties);
  773. if (!($tagger instanceof Tagger)) return \'\';
  774. $resources = $modx->getOption(\'resources\', $scriptProperties, \'\');
  775. $parents = $modx->getOption(\'parents\', $scriptProperties, \'\');
  776. $groups = $modx->getOption(\'groups\', $scriptProperties, \'\');
  777. $target = (int) $modx->getOption(\'target\', $scriptProperties, $modx->resource->id, true);
  778. $showUnused = (int) $modx->getOption(\'showUnused\', $scriptProperties, \'0\');
  779. $showUnpublished = (int) $modx->getOption(\'showUnpublished\', $scriptProperties, \'0\');
  780. $showDeleted = (int) $modx->getOption(\'showDeleted\', $scriptProperties, \'0\');
  781. $linkCurrentTags = (int) $modx->getOption(\'linkCurrentTags\', $scriptProperties, \'0\');
  782. $linkOneTagPerGroup = (int) $modx->getOption(\'linkOneTagPerGroup\', $scriptProperties, \'0\');
  783. $contexts = $modx->getOption(\'contexts\', $scriptProperties, \'\');
  784. $translate = (int) $modx->getOption(\'translate\', $scriptProperties, \'0\');
  785. $defaultRowTpl = $modx->getOption(\'rowTpl\', $scriptProperties, \'\');
  786. $outTpl = $modx->getOption(\'outTpl\', $scriptProperties, \'\');
  787. $wrapIfEmpty = $modx->getOption(\'wrapIfEmpty\', $scriptProperties, 1);
  788. $separator = $modx->getOption(\'separator\', $scriptProperties, \'\');
  789. $limit = intval($modx->getOption(\'limit\', $scriptProperties, 0));
  790. $offset = intval($modx->getOption(\'offset\', $scriptProperties, 0));
  791. $totalPh = $modx->getOption(\'totalPh\', $scriptProperties, \'tags_total\');
  792. $weight = (int) $modx->getOption(\'weight\', $scriptProperties, \'0\');
  793. $friendlyURL = (int) $modx->getOption(\'friendlyURL\', $scriptProperties, $modx->getOption(\'friendly_urls\', null, 0));
  794. $linkTagScheme = $modx->getOption(\'linkTagScheme\', $scriptProperties, $modx->getOption(\'link_tag_scheme\', null, -1));
  795. $sort = $modx->getOption(\'sort\', $scriptProperties, \'{}\');
  796. $sort = $modx->fromJSON($sort);
  797. if ($sort === null || $sort == \'\' || count($sort) == 0) {
  798. $sort = array(
  799. \'tag\' => \'ASC\'
  800. );
  801. }
  802. $resources = $tagger->explodeAndClean($resources);
  803. $parents = $tagger->explodeAndClean($parents);
  804. $groups = $tagger->explodeAndClean($groups);
  805. $contexts = $tagger->explodeAndClean($contexts);
  806. $toPlaceholder = $modx->getOption(\'toPlaceholder\', $scriptProperties, \'\');
  807. $c = $modx->newQuery(\'TaggerTag\');
  808. $c->leftJoin(\'TaggerTagResource\', \'Resources\');
  809. $c->leftJoin(\'TaggerGroup\', \'Group\');
  810. $c->leftJoin(\'modResource\', \'Resource\', array(\'Resources.resource = Resource.id\'));
  811. if (!empty($parents)) {
  812. $c->where(array(
  813. \'Resource.parent:IN\' => $parents,
  814. ));
  815. }
  816. if (!empty($contexts)) {
  817. $c->where(array(
  818. \'Resource.context_key:IN\' => $contexts,
  819. ));
  820. }
  821. if ($showUnpublished == 0) {
  822. $c->where(array(
  823. \'Resource.published\' => 1,
  824. \'OR:Resource.published:IN\' => null,
  825. ));
  826. }
  827. if ($showDeleted == 0) {
  828. $c->where(array(
  829. \'Resource.deleted\' => 0,
  830. \'OR:Resource.deleted:IS\' => null,
  831. ));
  832. }
  833. if ($showUnused == 0) {
  834. $c->having(array(
  835. \'cnt > 0\',
  836. ));
  837. }
  838. if (!empty($resources)) {
  839. $c->where(array(
  840. \'Resources.resource:IN\' => $resources
  841. ));
  842. }
  843. if ($groups) {
  844. $c->where(array(
  845. \'Group.id:IN\' => $groups,
  846. \'OR:Group.name:IN\' => $groups,
  847. \'OR:Group.alias:IN\' => $groups,
  848. ));
  849. }
  850. $c->select($modx->getSelectColumns(\'TaggerTag\', \'TaggerTag\'));
  851. $c->select($modx->getSelectColumns(\'TaggerGroup\', \'Group\', \'group_\'));
  852. $c->select(array(\'cnt\' => \'COUNT(Resources.tag)\'));
  853. $c->groupby($modx->getSelectColumns(\'TaggerTag\', \'TaggerTag\') . \',\' . $modx->getSelectColumns(\'TaggerGroup\', \'Group\'));
  854. $c->prepare();
  855. $countQuery = new xPDOCriteria($modx, "SELECT COUNT(*) as total, MAX(cnt) as max_cnt FROM ({$c->toSQL(false)}) cq", $c->bindings, $c->cacheFlag);
  856. $stmt = $countQuery->prepare();
  857. if ($stmt && $stmt->execute()) {
  858. $fetchedData = $stmt->fetch(PDO::FETCH_ASSOC);
  859. $total = intval($fetchedData[\'total\']);
  860. $maxCnt = intval($fetchedData[\'max_cnt\']);
  861. } else {
  862. $total = 0;
  863. $maxCnt = 0;
  864. }
  865. $modx->setPlaceholder($totalPh, $total);
  866. foreach ($sort as $field => $dir) {
  867. $dir = (strtolower($dir) == \'asc\') ? \'asc\' : \'desc\';
  868. $c->sortby($field, $dir);
  869. }
  870. $c->limit($limit, $offset);
  871. $tags = $modx->getIterator(\'TaggerTag\', $c);
  872. $out = array();
  873. // prep for &tpl_N
  874. $keys = array_keys($scriptProperties);
  875. $nthTpls = array();
  876. foreach($keys as $key) {
  877. $keyBits = $tagger->explodeAndClean($key, \'_\');
  878. if (isset($keyBits[0]) && $keyBits[0] === \'tpl\') {
  879. if ($i = (int) $keyBits[1]) $nthTpls[$i] = $scriptProperties[$key];
  880. }
  881. }
  882. ksort($nthTpls);
  883. $idx = 1;
  884. $currentTags = $tagger->getCurrentTags();
  885. $currentTagsLink = array();
  886. if ($linkCurrentTags == 1) {
  887. foreach($currentTags as $currentTag) {
  888. $currentTagsLink[$currentTag[\'alias\']] = array_keys($currentTag[\'tags\']);
  889. }
  890. }
  891. foreach ($tags as $tag) {
  892. /** @var TaggerTag $tag */
  893. $phs = $tag->toArray();
  894. $group = $tag->Group;
  895. if (($linkOneTagPerGroup === 1) && $currentTagsLink[$group->alias]) {
  896. $linkData = $currentTagsLink;
  897. if (!in_array($tag->alias, $linkData[$group->alias])) {
  898. $linkData[$group->alias] = array($tag->alias);
  899. } else {
  900. $linkData[$group->alias] = array();
  901. }
  902. } else {
  903. $linkData = array_merge_recursive($currentTagsLink, array(
  904. $group->alias => array($tag->alias)
  905. ));
  906. }
  907. $linkData = array_filter(array_map(function($data) {
  908. return array_filter($data, function($value) use ($data) {
  909. return !(array_count_values($data)[$value] > 1);
  910. });
  911. }, $linkData));
  912. if ($friendlyURL == 1) {
  913. $linkPath = array_reduce(array_keys($linkData), function($carry, $item) use ($linkData) {
  914. return $carry . $item . \'/\' . implode(\'/\', array_unique($linkData[$item])) . \'/\';
  915. }, \'\');
  916. $uri = rtrim($modx->makeUrl($target, \'\', \'\', $linkTagScheme), \'/\') . \'/\' . $linkPath;
  917. } else {
  918. $linkPath = http_build_query(
  919. array_map(function($values) {
  920. return is_array($values) ? implode(\',\', array_unique($values)) : $values;
  921. }, $linkData)
  922. );
  923. $uri = $modx->makeUrl($target, \'\', $linkPath, $linkTagScheme);
  924. }
  925. $phs[\'uri\'] = $uri;
  926. $phs[\'idx\'] = $idx;
  927. $phs[\'target\'] = $target;
  928. $phs[\'max_cnt\'] = $maxCnt;
  929. if (isset($currentTags[$group->alias][\'tags\'][$tag->alias])) {
  930. $phs[\'active\'] = 1;
  931. } else {
  932. $phs[\'active\'] = 0;
  933. }
  934. if ($weight > 0) {
  935. $phs[\'weight\'] = intval(ceil($phs[\'cnt\'] / ($maxCnt / $weight)));
  936. }
  937. if ($translate == 1) {
  938. $groupNameTranslated = $modx->lexicon(\'tagger.custom.\' . $phs[\'group_alias\']);
  939. $groupDescriptionTranslated = $modx->lexicon(\'tagger.custom.\' . $phs[\'group_alias\'] . \'_desc\');
  940. $phs[\'group_name_translated\'] = ($groupNameTranslated == \'tagger.custom.\' . $phs[\'group_alias\']) ? $phs[\'group_name\'] : $groupNameTranslated;
  941. $phs[\'group_description_translated\'] = ($groupDescriptionTranslated == \'tagger.custom.\' . $phs[\'group_alias\'] . \'_desc\') ? $phs[\'group_description\'] : $groupDescriptionTranslated;
  942. }
  943. $rowTpl = $defaultRowTpl;
  944. $phs[\'sp\'] = $scriptProperties;
  945. if ($rowTpl == \'\') {
  946. $out[] = \'<pre>\' . print_r($phs, true) . \'</pre>\';
  947. } else {
  948. if (isset($nthTpls[$idx])) {
  949. $rowTpl = $nthTpls[$idx];
  950. } else {
  951. foreach ($nthTpls as $int => $tpl) {
  952. if ( ($idx % $int) === 0 ) $rowTpl = $tpl;
  953. }
  954. }
  955. $out[] = $tagger->getChunk($rowTpl, $phs);
  956. }
  957. $idx++;
  958. }
  959. $out = implode($separator, $out);
  960. if ($outTpl != \'\') {
  961. if (!empty($out) || $wrapIfEmpty) {
  962. $noActiveTags = (int)(count($currentTags) === 0);
  963. $out = $tagger->getChunk($outTpl, array(\'tags\' => $out, \'sp\' => $scriptProperties, \'noActiveTags\' => $noActiveTags));
  964. }
  965. }
  966. if (!empty($toPlaceholder)) {
  967. $modx->setPlaceholder($toPlaceholder, $out);
  968. return \'\';
  969. }
  970. return $out;',
  971. 'locked' => false,
  972. 'properties' =>
  973. array (
  974. 'resources' =>
  975. array (
  976. 'name' => 'resources',
  977. 'desc' => 'tagger.gettags.resources_desc',
  978. 'type' => 'textfield',
  979. 'options' => '',
  980. 'value' => '',
  981. 'lexicon' => 'tagger:properties',
  982. 'area' => '',
  983. 'desc_trans' => 'Comma separated list of resources for which will be listed Tags',
  984. 'area_trans' => '',
  985. ),
  986. 'groups' =>
  987. array (
  988. 'name' => 'groups',
  989. 'desc' => 'tagger.gettags.groups_desc',
  990. 'type' => 'textfield',
  991. 'options' => '',
  992. 'value' => '',
  993. 'lexicon' => 'tagger:properties',
  994. 'area' => '',
  995. 'desc_trans' => 'Comma separated list of Tagger Groups for which will be listed Tags',
  996. 'area_trans' => '',
  997. ),
  998. 'rowTpl' =>
  999. array (
  1000. 'name' => 'rowTpl',
  1001. 'desc' => 'tagger.gettags.rowTpl_desc',
  1002. 'type' => 'textfield',
  1003. 'options' => '',
  1004. 'value' => '',
  1005. 'lexicon' => 'tagger:properties',
  1006. 'area' => '',
  1007. 'desc_trans' => 'Name of a chunk that will be used for each Tag. If no chunk is given, array with available placeholders will be rendered',
  1008. 'area_trans' => '',
  1009. ),
  1010. 'outTpl' =>
  1011. array (
  1012. 'name' => 'outTpl',
  1013. 'desc' => 'tagger.gettags.outTpl_desc',
  1014. 'type' => 'textfield',
  1015. 'options' => '',
  1016. 'value' => '',
  1017. 'lexicon' => 'tagger:properties',
  1018. 'area' => '',
  1019. 'desc_trans' => 'Name of a chunk that will be used for wrapping all tags. If no chunk is given, tags will be rendered without a wrapper',
  1020. 'area_trans' => '',
  1021. ),
  1022. 'separator' =>
  1023. array (
  1024. 'name' => 'separator',
  1025. 'desc' => 'tagger.gettags.separator_desc',
  1026. 'type' => 'textfield',
  1027. 'options' => '',
  1028. 'value' => '',
  1029. 'lexicon' => 'tagger:properties',
  1030. 'area' => '',
  1031. 'desc_trans' => 'String separator, that will be used for separating Tags',
  1032. 'area_trans' => '',
  1033. ),
  1034. 'target' =>
  1035. array (
  1036. 'name' => 'target',
  1037. 'desc' => 'tagger.gettags.target_desc',
  1038. 'type' => 'textfield',
  1039. 'options' => '',
  1040. 'value' => '',
  1041. 'lexicon' => 'tagger:properties',
  1042. 'area' => '',
  1043. 'desc_trans' => 'An ID of a resource that will be used for generating URI for a Tag. If no ID is given, current Resource ID will be used',
  1044. 'area_trans' => '',
  1045. ),
  1046. 'showUnused' =>
  1047. array (
  1048. 'name' => 'showUnused',
  1049. 'desc' => 'tagger.gettags.showUnused_desc',
  1050. 'type' => 'numberfield',
  1051. 'options' => '',
  1052. 'value' => '0',
  1053. 'lexicon' => 'tagger:properties',
  1054. 'area' => '',
  1055. 'desc_trans' => 'If 1 is set, Tags that are not assigned to any Resource will be included to the output as well',
  1056. 'area_trans' => '',
  1057. ),
  1058. 'showUnpublished' =>
  1059. array (
  1060. 'name' => 'showUnpublished',
  1061. 'desc' => 'tagger.gettags.showUnpublished_desc',
  1062. 'type' => 'numberfield',
  1063. 'options' => '',
  1064. 'value' => '0',
  1065. 'lexicon' => 'tagger:properties',
  1066. 'area' => '',
  1067. 'desc_trans' => 'If 1 is set, Tags that are assigned only to unpublished Resources will be included to the output as well',
  1068. 'area_trans' => '',
  1069. ),
  1070. 'showDeleted' =>
  1071. array (
  1072. 'name' => 'showDeleted',
  1073. 'desc' => 'tagger.gettags.showDeleted_desc',
  1074. 'type' => 'numberfield',
  1075. 'options' => '',
  1076. 'value' => '0',
  1077. 'lexicon' => 'tagger:properties',
  1078. 'area' => '',
  1079. 'desc_trans' => 'If 1 is set, Tags that are assigned only to deleted Resources will be included to the output as well',
  1080. 'area_trans' => '',
  1081. ),
  1082. 'contexts' =>
  1083. array (
  1084. 'name' => 'contexts',
  1085. 'desc' => 'tagger.gettags.contexts_desc',
  1086. 'type' => 'textfield',
  1087. 'options' => '',
  1088. 'value' => '',
  1089. 'lexicon' => 'tagger:properties',
  1090. 'area' => '',
  1091. 'desc_trans' => 'If set, will display only tags for resources in given contexts. Contexts can be separated by a comma',
  1092. 'area_trans' => '',
  1093. ),
  1094. 'toPlaceholder' =>
  1095. array (
  1096. 'name' => 'toPlaceholder',
  1097. 'desc' => 'tagger.gettags.toPlaceholder_desc',
  1098. 'type' => 'textfield',
  1099. 'options' => '',
  1100. 'value' => '',
  1101. 'lexicon' => 'tagger:properties',
  1102. 'area' => '',
  1103. 'desc_trans' => 'If set, output will return in placeholder with given name',
  1104. 'area_trans' => '',
  1105. ),
  1106. 'limit' =>
  1107. array (
  1108. 'name' => 'limit',
  1109. 'desc' => 'tagger.gettags.limit_desc',
  1110. 'type' => 'numberfield',
  1111. 'options' => '',
  1112. 'value' => '0',
  1113. 'lexicon' => 'tagger:properties',
  1114. 'area' => '',
  1115. 'desc_trans' => 'Limit number of returned tag Tags',
  1116. 'area_trans' => '',
  1117. ),
  1118. 'offset' =>
  1119. array (
  1120. 'name' => 'offset',
  1121. 'desc' => 'tagger.gettags.offset_desc',
  1122. 'type' => 'numberfield',
  1123. 'options' => '',
  1124. 'value' => '0',
  1125. 'lexicon' => 'tagger:properties',
  1126. 'area' => '',
  1127. 'desc_trans' => 'Offset the output by this number of Tags',
  1128. 'area_trans' => '',
  1129. ),
  1130. 'totalPh' =>
  1131. array (
  1132. 'name' => 'totalPh',
  1133. 'desc' => 'tagger.gettags.totalPh_desc',
  1134. 'type' => 'textfield',
  1135. 'options' => '',
  1136. 'value' => 'tags_total',
  1137. 'lexicon' => 'tagger:properties',
  1138. 'area' => '',
  1139. 'desc_trans' => 'Placeholder to output the total number of Tags regardless of &limit and &offset',
  1140. 'area_trans' => '',
  1141. ),
  1142. 'sort' =>
  1143. array (
  1144. 'name' => 'sort',
  1145. 'desc' => 'tagger.gettags.sort_desc',
  1146. 'type' => 'textfield',
  1147. 'options' => '',
  1148. 'value' => '{"tag": "asc"}',
  1149. 'lexicon' => 'tagger:properties',
  1150. 'area' => '',
  1151. 'desc_trans' => 'Sort options in JSON. Example {"tag": "ASC"} or multiple sort options {"group_id": "ASC", "tag": "ASC"}',
  1152. 'area_trans' => '',
  1153. ),
  1154. ),
  1155. 'moduleguid' => '',
  1156. 'static' => false,
  1157. 'static_file' => '',
  1158. 'content' => '/**
  1159. * TaggerGetTags
  1160. *
  1161. * DESCRIPTION
  1162. *
  1163. * This Snippet allows you to list tags for resource(s), group(s) and all tags
  1164. *
  1165. * PROPERTIES:
  1166. *
  1167. * &resources string optional Comma separated list of resources for which will be listed Tags
  1168. * &parents string optional Comma separated list of parents for which will be listed Tags
  1169. * &groups string optional Comma separated list of Tagger Groups for which will be listed Tags
  1170. * &rowTpl string optional Name of a chunk that will be used for each Tag. If no chunk is given, array with available placeholders will be rendered
  1171. * &outTpl string optional Name of a chunk that will be used for wrapping all tags. If no chunk is given, tags will be rendered without a wrapper
  1172. * &separator string optional String separator, that will be used for separating Tags
  1173. * &limit int optional Limit number of returned tag Tags
  1174. * &offset int optional Offset the output by this number of Tags
  1175. * &totalPh string optional Placeholder to output the total number of Tags regardless of &limit and &offset
  1176. * &target int optional An ID of a resource that will be used for generating URI for a Tag. If no ID is given, current Resource ID will be used
  1177. * &showUnused int optional If 1 is set, Tags that are not assigned to any Resource will be included to the output as well
  1178. * &showUnpublished int optional If 1 is set, Tags that are assigned only to unpublished Resources will be included to the output as well
  1179. * &showDeleted int optional If 1 is set, Tags that are assigned only to deleted Resources will be included to the output as well
  1180. * &linkCurrentTags int optional If 1 is set, Current Tags will be included in generated URL, default behavior is to generate links to a single tag
  1181. * &linkOneTagPerGroup int optional If 1 is set, Only one tag will be placed to a group (in the URI tags from same group will swap places); Only available for linkCurrentTags=1; Default: 0
  1182. * &contexts string optional If set, will display only tags for resources in given contexts. Contexts can be separated by a comma
  1183. * &toPlaceholder string optional If set, output will return in placeholder with given name
  1184. * &sort string optional Sort options in JSON. Example {"tag": "ASC"} or multiple sort options {"group_id": "ASC", "tag": "ASC"}
  1185. * &friendlyURL int optional If set, will be used instead of friendly_urls system setting to generate URL
  1186. * &linkTagScheme int|string optional Strategy to generate URLs, available values: -1, 0, 1, full, abs, http, https; Default: link_tag_scheme system setting
  1187. *
  1188. * USAGE:
  1189. *
  1190. * [[!TaggerGetTags? &showUnused=`1`]]
  1191. *
  1192. *
  1193. * @package tagger
  1194. */
  1195. /** @var Tagger $tagger */
  1196. $tagger = $modx->getService(\'tagger\',\'Tagger\',$modx->getOption(\'tagger.core_path\',null,$modx->getOption(\'core_path\').\'components/tagger/\').\'model/tagger/\',$scriptProperties);
  1197. if (!($tagger instanceof Tagger)) return \'\';
  1198. $resources = $modx->getOption(\'resources\', $scriptProperties, \'\');
  1199. $parents = $modx->getOption(\'parents\', $scriptProperties, \'\');
  1200. $groups = $modx->getOption(\'groups\', $scriptProperties, \'\');
  1201. $target = (int) $modx->getOption(\'target\', $scriptProperties, $modx->resource->id, true);
  1202. $showUnused = (int) $modx->getOption(\'showUnused\', $scriptProperties, \'0\');
  1203. $showUnpublished = (int) $modx->getOption(\'showUnpublished\', $scriptProperties, \'0\');
  1204. $showDeleted = (int) $modx->getOption(\'showDeleted\', $scriptProperties, \'0\');
  1205. $linkCurrentTags = (int) $modx->getOption(\'linkCurrentTags\', $scriptProperties, \'0\');
  1206. $linkOneTagPerGroup = (int) $modx->getOption(\'linkOneTagPerGroup\', $scriptProperties, \'0\');
  1207. $contexts = $modx->getOption(\'contexts\', $scriptProperties, \'\');
  1208. $translate = (int) $modx->getOption(\'translate\', $scriptProperties, \'0\');
  1209. $defaultRowTpl = $modx->getOption(\'rowTpl\', $scriptProperties, \'\');
  1210. $outTpl = $modx->getOption(\'outTpl\', $scriptProperties, \'\');
  1211. $wrapIfEmpty = $modx->getOption(\'wrapIfEmpty\', $scriptProperties, 1);
  1212. $separator = $modx->getOption(\'separator\', $scriptProperties, \'\');
  1213. $limit = intval($modx->getOption(\'limit\', $scriptProperties, 0));
  1214. $offset = intval($modx->getOption(\'offset\', $scriptProperties, 0));
  1215. $totalPh = $modx->getOption(\'totalPh\', $scriptProperties, \'tags_total\');
  1216. $weight = (int) $modx->getOption(\'weight\', $scriptProperties, \'0\');
  1217. $friendlyURL = (int) $modx->getOption(\'friendlyURL\', $scriptProperties, $modx->getOption(\'friendly_urls\', null, 0));
  1218. $linkTagScheme = $modx->getOption(\'linkTagScheme\', $scriptProperties, $modx->getOption(\'link_tag_scheme\', null, -1));
  1219. $sort = $modx->getOption(\'sort\', $scriptProperties, \'{}\');
  1220. $sort = $modx->fromJSON($sort);
  1221. if ($sort === null || $sort == \'\' || count($sort) == 0) {
  1222. $sort = array(
  1223. \'tag\' => \'ASC\'
  1224. );
  1225. }
  1226. $resources = $tagger->explodeAndClean($resources);
  1227. $parents = $tagger->explodeAndClean($parents);
  1228. $groups = $tagger->explodeAndClean($groups);
  1229. $contexts = $tagger->explodeAndClean($contexts);
  1230. $toPlaceholder = $modx->getOption(\'toPlaceholder\', $scriptProperties, \'\');
  1231. $c = $modx->newQuery(\'TaggerTag\');
  1232. $c->leftJoin(\'TaggerTagResource\', \'Resources\');
  1233. $c->leftJoin(\'TaggerGroup\', \'Group\');
  1234. $c->leftJoin(\'modResource\', \'Resource\', array(\'Resources.resource = Resource.id\'));
  1235. if (!empty($parents)) {
  1236. $c->where(array(
  1237. \'Resource.parent:IN\' => $parents,
  1238. ));
  1239. }
  1240. if (!empty($contexts)) {
  1241. $c->where(array(
  1242. \'Resource.context_key:IN\' => $contexts,
  1243. ));
  1244. }
  1245. if ($showUnpublished == 0) {
  1246. $c->where(array(
  1247. \'Resource.published\' => 1,
  1248. \'OR:Resource.published:IN\' => null,
  1249. ));
  1250. }
  1251. if ($showDeleted == 0) {
  1252. $c->where(array(
  1253. \'Resource.deleted\' => 0,
  1254. \'OR:Resource.deleted:IS\' => null,
  1255. ));
  1256. }
  1257. if ($showUnused == 0) {
  1258. $c->having(array(
  1259. \'cnt > 0\',
  1260. ));
  1261. }
  1262. if (!empty($resources)) {
  1263. $c->where(array(
  1264. \'Resources.resource:IN\' => $resources
  1265. ));
  1266. }
  1267. if ($groups) {
  1268. $c->where(array(
  1269. \'Group.id:IN\' => $groups,
  1270. \'OR:Group.name:IN\' => $groups,
  1271. \'OR:Group.alias:IN\' => $groups,
  1272. ));
  1273. }
  1274. $c->select($modx->getSelectColumns(\'TaggerTag\', \'TaggerTag\'));
  1275. $c->select($modx->getSelectColumns(\'TaggerGroup\', \'Group\', \'group_\'));
  1276. $c->select(array(\'cnt\' => \'COUNT(Resources.tag)\'));
  1277. $c->groupby($modx->getSelectColumns(\'TaggerTag\', \'TaggerTag\') . \',\' . $modx->getSelectColumns(\'TaggerGroup\', \'Group\'));
  1278. $c->prepare();
  1279. $countQuery = new xPDOCriteria($modx, "SELECT COUNT(*) as total, MAX(cnt) as max_cnt FROM ({$c->toSQL(false)}) cq", $c->bindings, $c->cacheFlag);
  1280. $stmt = $countQuery->prepare();
  1281. if ($stmt && $stmt->execute()) {
  1282. $fetchedData = $stmt->fetch(PDO::FETCH_ASSOC);
  1283. $total = intval($fetchedData[\'total\']);
  1284. $maxCnt = intval($fetchedData[\'max_cnt\']);
  1285. } else {
  1286. $total = 0;
  1287. $maxCnt = 0;
  1288. }
  1289. $modx->setPlaceholder($totalPh, $total);
  1290. foreach ($sort as $field => $dir) {
  1291. $dir = (strtolower($dir) == \'asc\') ? \'asc\' : \'desc\';
  1292. $c->sortby($field, $dir);
  1293. }
  1294. $c->limit($limit, $offset);
  1295. $tags = $modx->getIterator(\'TaggerTag\', $c);
  1296. $out = array();
  1297. // prep for &tpl_N
  1298. $keys = array_keys($scriptProperties);
  1299. $nthTpls = array();
  1300. foreach($keys as $key) {
  1301. $keyBits = $tagger->explodeAndClean($key, \'_\');
  1302. if (isset($keyBits[0]) && $keyBits[0] === \'tpl\') {
  1303. if ($i = (int) $keyBits[1]) $nthTpls[$i] = $scriptProperties[$key];
  1304. }
  1305. }
  1306. ksort($nthTpls);
  1307. $idx = 1;
  1308. $currentTags = $tagger->getCurrentTags();
  1309. $currentTagsLink = array();
  1310. if ($linkCurrentTags == 1) {
  1311. foreach($currentTags as $currentTag) {
  1312. $currentTagsLink[$currentTag[\'alias\']] = array_keys($currentTag[\'tags\']);
  1313. }
  1314. }
  1315. foreach ($tags as $tag) {
  1316. /** @var TaggerTag $tag */
  1317. $phs = $tag->toArray();
  1318. $group = $tag->Group;
  1319. if (($linkOneTagPerGroup === 1) && $currentTagsLink[$group->alias]) {
  1320. $linkData = $currentTagsLink;
  1321. if (!in_array($tag->alias, $linkData[$group->alias])) {
  1322. $linkData[$group->alias] = array($tag->alias);
  1323. } else {
  1324. $linkData[$group->alias] = array();
  1325. }
  1326. } else {
  1327. $linkData = array_merge_recursive($currentTagsLink, array(
  1328. $group->alias => array($tag->alias)
  1329. ));
  1330. }
  1331. $linkData = array_filter(array_map(function($data) {
  1332. return array_filter($data, function($value) use ($data) {
  1333. return !(array_count_values($data)[$value] > 1);
  1334. });
  1335. }, $linkData));
  1336. if ($friendlyURL == 1) {
  1337. $linkPath = array_reduce(array_keys($linkData), function($carry, $item) use ($linkData) {
  1338. return $carry . $item . \'/\' . implode(\'/\', array_unique($linkData[$item])) . \'/\';
  1339. }, \'\');
  1340. $uri = rtrim($modx->makeUrl($target, \'\', \'\', $linkTagScheme), \'/\') . \'/\' . $linkPath;
  1341. } else {
  1342. $linkPath = http_build_query(
  1343. array_map(function($values) {
  1344. return is_array($values) ? implode(\',\', array_unique($values)) : $values;
  1345. }, $linkData)
  1346. );
  1347. $uri = $modx->makeUrl($target, \'\', $linkPath, $linkTagScheme);
  1348. }
  1349. $phs[\'uri\'] = $uri;
  1350. $phs[\'idx\'] = $idx;
  1351. $phs[\'target\'] = $target;
  1352. $phs[\'max_cnt\'] = $maxCnt;
  1353. if (isset($currentTags[$group->alias][\'tags\'][$tag->alias])) {
  1354. $phs[\'active\'] = 1;
  1355. } else {
  1356. $phs[\'active\'] = 0;
  1357. }
  1358. if ($weight > 0) {
  1359. $phs[\'weight\'] = intval(ceil($phs[\'cnt\'] / ($maxCnt / $weight)));
  1360. }
  1361. if ($translate == 1) {
  1362. $groupNameTranslated = $modx->lexicon(\'tagger.custom.\' . $phs[\'group_alias\']);
  1363. $groupDescriptionTranslated = $modx->lexicon(\'tagger.custom.\' . $phs[\'group_alias\'] . \'_desc\');
  1364. $phs[\'group_name_translated\'] = ($groupNameTranslated == \'tagger.custom.\' . $phs[\'group_alias\']) ? $phs[\'group_name\'] : $groupNameTranslated;
  1365. $phs[\'group_description_translated\'] = ($groupDescriptionTranslated == \'tagger.custom.\' . $phs[\'group_alias\'] . \'_desc\') ? $phs[\'group_description\'] : $groupDescriptionTranslated;
  1366. }
  1367. $rowTpl = $defaultRowTpl;
  1368. $phs[\'sp\'] = $scriptProperties;
  1369. if ($rowTpl == \'\') {
  1370. $out[] = \'<pre>\' . print_r($phs, true) . \'</pre>\';
  1371. } else {
  1372. if (isset($nthTpls[$idx])) {
  1373. $rowTpl = $nthTpls[$idx];
  1374. } else {
  1375. foreach ($nthTpls as $int => $tpl) {
  1376. if ( ($idx % $int) === 0 ) $rowTpl = $tpl;
  1377. }
  1378. }
  1379. $out[] = $tagger->getChunk($rowTpl, $phs);
  1380. }
  1381. $idx++;
  1382. }
  1383. $out = implode($separator, $out);
  1384. if ($outTpl != \'\') {
  1385. if (!empty($out) || $wrapIfEmpty) {
  1386. $noActiveTags = (int)(count($currentTags) === 0);
  1387. $out = $tagger->getChunk($outTpl, array(\'tags\' => $out, \'sp\' => $scriptProperties, \'noActiveTags\' => $noActiveTags));
  1388. }
  1389. }
  1390. if (!empty($toPlaceholder)) {
  1391. $modx->setPlaceholder($toPlaceholder, $out);
  1392. return \'\';
  1393. }
  1394. return $out;',
  1395. ),
  1396. 'policies' =>
  1397. array (
  1398. 'web' =>
  1399. array (
  1400. ),
  1401. ),
  1402. 'source' =>
  1403. array (
  1404. ),
  1405. ),
  1406. 'Login' =>
  1407. array (
  1408. 'fields' =>
  1409. array (
  1410. 'id' => 57,
  1411. 'source' => 0,
  1412. 'property_preprocess' => false,
  1413. 'name' => 'Login',
  1414. 'description' => 'Displays a login and logout form.',
  1415. 'editor_type' => 0,
  1416. 'category' => 21,
  1417. 'cache_type' => 0,
  1418. 'snippet' => '/**
  1419. * Login
  1420. *
  1421. * Copyright 2010 by Jason Coward <jason@modx.com> and Shaun McCormick
  1422. * <shaun@modx.com>
  1423. *
  1424. * Login is free software; you can redistribute it and/or modify it
  1425. * under the terms of the GNU General Public License as published by the Free
  1426. * Software Foundation; either version 2 of the License, or (at your option) any
  1427. * later version.
  1428. *
  1429. * Login is distributed in the hope that it will be useful, but WITHOUT ANY
  1430. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  1431. * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  1432. *
  1433. * You should have received a copy of the GNU General Public License along with
  1434. * Login; if not, write to the Free Software Foundation, Inc., 59 Temple
  1435. * Place, Suite 330, Boston, MA 02111-1307 USA
  1436. *
  1437. * @package login
  1438. */
  1439. /**
  1440. * MODx Login Snippet
  1441. *
  1442. * This snippet handles login POSTs, sending the user back to where they came from or to a specific
  1443. * location if specified in the POST.
  1444. *
  1445. * @package login
  1446. *
  1447. * @property textfield actionKey The REQUEST variable containing the action to take.
  1448. * @property textfield loginKey The actionKey for login.
  1449. * @property textfield logoutKey The actionKey for logout.
  1450. * @property boolean loginViaEmail Enable login via username or email address (either one!) [default: false]
  1451. * @property list tplType The type of template to expect for the views:
  1452. * modChunk - name of chunk to use
  1453. * file - full path to file to use as tpl
  1454. * embedded - the tpl is embedded in the page content
  1455. * inline - the tpl is inline content provided directly
  1456. * @property textfield loginTpl The template for the login view (content based on tplType)
  1457. * @property textfield logoutTpl The template for the logout view (content based on tplType)
  1458. * @property textfield errTpl The template for any errors that occur when processing an view
  1459. * @property list errTplType The type of template to expect for the error messages:
  1460. * modChunk - name of chunk to use
  1461. * file - full path to file to use as tpl
  1462. * inline - the tpl is inline content provided directly
  1463. * @property integer logoutResourceId An explicit resource id to redirect users to on logout
  1464. * @property string loginMsg The string to use for the login action. Defaults to
  1465. * the lexicon string "login".
  1466. * @property string logoutMsg The string to use for the logout action. Defaults
  1467. * to the lexicon string "login.logout"
  1468. */
  1469. require_once $modx->getOption(\'login.core_path\',null,$modx->getOption(\'core_path\').\'components/login/\').\'model/login/login.class.php\';
  1470. $login = new Login($modx,$scriptProperties);
  1471. if (!is_object($login) || !($login instanceof Login)) return \'\';
  1472. $controller = $login->loadController(\'Login\');
  1473. $output = $controller->run($scriptProperties);
  1474. return $output;',
  1475. 'locked' => false,
  1476. 'properties' =>
  1477. array (
  1478. 'actionKey' =>
  1479. array (
  1480. 'name' => 'actionKey',
  1481. 'desc' => 'prop_login.actionkey_desc',
  1482. 'type' => 'textfield',
  1483. 'options' => '',
  1484. 'value' => 'service',
  1485. 'lexicon' => 'login:properties',
  1486. 'area' => '',
  1487. 'desc_trans' => 'The REQUEST variable that indicates what action to take.',
  1488. 'area_trans' => '',
  1489. ),
  1490. 'loginKey' =>
  1491. array (
  1492. 'name' => 'loginKey',
  1493. 'desc' => 'prop_login.loginkey_desc',
  1494. 'type' => 'textfield',
  1495. 'options' => '',
  1496. 'value' => 'login',
  1497. 'lexicon' => 'login:properties',
  1498. 'area' => '',
  1499. 'desc_trans' => 'The login action key.',
  1500. 'area_trans' => '',
  1501. ),
  1502. 'logoutKey' =>
  1503. array (
  1504. 'name' => 'logoutKey',
  1505. 'desc' => 'prop_login.logoutkey_desc',
  1506. 'type' => 'textfield',
  1507. 'options' => '',
  1508. 'value' => 'logout',
  1509. 'lexicon' => 'login:properties',
  1510. 'area' => '',
  1511. 'desc_trans' => 'The logout action key.',
  1512. 'area_trans' => '',
  1513. ),
  1514. 'loginViaEmail' =>
  1515. array (
  1516. 'name' => 'loginViaEmail',
  1517. 'desc' => 'prop_login.loginviaemail_desc',
  1518. 'type' => 'combo-boolean',
  1519. 'options' => '',
  1520. 'value' => false,
  1521. 'lexicon' => 'login:properties',
  1522. 'area' => '',
  1523. 'desc_trans' => 'Enable login via username or email address.',
  1524. 'area_trans' => '',
  1525. ),
  1526. 'tplType' =>
  1527. array (
  1528. 'name' => 'tplType',
  1529. 'desc' => 'prop_login.tpltype_desc',
  1530. 'type' => 'list',
  1531. 'options' =>
  1532. array (
  1533. 0 =>
  1534. array (
  1535. 'value' => 'modChunk',
  1536. 'text' => 'opt_register.chunk',
  1537. 'name' => 'Chunk',
  1538. ),
  1539. 1 =>
  1540. array (
  1541. 'value' => 'file',
  1542. 'text' => 'opt_register.file',
  1543. 'name' => 'File',
  1544. ),
  1545. 2 =>
  1546. array (
  1547. 'value' => 'inline',
  1548. 'text' => 'opt_register.inline',
  1549. 'name' => 'Inline',
  1550. ),
  1551. 3 =>
  1552. array (
  1553. 'value' => 'embedded',
  1554. 'text' => 'opt_register.embedded',
  1555. 'name' => 'Embedded',
  1556. ),
  1557. ),
  1558. 'value' => 'modChunk',
  1559. 'lexicon' => 'login:properties',
  1560. 'area' => '',
  1561. 'desc_trans' => 'The type of tpls being provided for the login and logout forms.',
  1562. 'area_trans' => '',
  1563. ),
  1564. 'loginTpl' =>
  1565. array (
  1566. 'name' => 'loginTpl',
  1567. 'desc' => 'prop_login.logintpl_desc',
  1568. 'type' => 'textfield',
  1569. 'options' => '',
  1570. 'value' => 'lgnLoginTpl',
  1571. 'lexicon' => 'login:properties',
  1572. 'area' => '',
  1573. 'desc_trans' => 'The login form tpl.',
  1574. 'area_trans' => '',
  1575. ),
  1576. 'logoutTpl' =>
  1577. array (
  1578. 'name' => 'logoutTpl',
  1579. 'desc' => 'prop_login.logouttpl_desc',
  1580. 'type' => 'textfield',
  1581. 'options' => '',
  1582. 'value' => 'lgnLogoutTpl',
  1583. 'lexicon' => 'login:properties',
  1584. 'area' => '',
  1585. 'desc_trans' => 'The logout tpl.',
  1586. 'area_trans' => '',
  1587. ),
  1588. 'preHooks' =>
  1589. array (
  1590. 'name' => 'preHooks',
  1591. 'desc' => 'prop_login.prehooks_desc',
  1592. 'type' => 'textfield',
  1593. 'options' => '',
  1594. 'value' => '',
  1595. 'lexicon' => 'login:properties',
  1596. 'area' => '',
  1597. 'desc_trans' => 'What scripts to fire, if any, before the user is logged in or out. This can be a comma-separated list of hooks, and if the first fails, the proceeding ones will not fire. A hook can also be a Snippet name that will execute that Snippet.',
  1598. 'area_trans' => '',
  1599. ),
  1600. 'postHooks' =>
  1601. array (
  1602. 'name' => 'postHooks',
  1603. 'desc' => 'prop_login.posthooks_desc',
  1604. 'type' => 'textfield',
  1605. 'options' => '',
  1606. 'value' => '',
  1607. 'lexicon' => 'login:properties',
  1608. 'area' => '',
  1609. 'desc_trans' => 'What scripts to fire, if any, after the user has been logged in or out. This can be a comma-separated list of hooks, and if the first fails, the proceeding ones will not fire. A hook can also be a Snippet name that will execute that Snippet.',
  1610. 'area_trans' => '',
  1611. ),
  1612. 'errTpl' =>
  1613. array (
  1614. 'name' => 'errTpl',
  1615. 'desc' => 'prop_login.errtpl_desc',
  1616. 'type' => 'textfield',
  1617. 'options' => '',
  1618. 'value' => 'lgnErrTpl',
  1619. 'lexicon' => 'login:properties',
  1620. 'area' => '',
  1621. 'desc_trans' => 'The error tpl.',
  1622. 'area_trans' => '',
  1623. ),
  1624. 'errTplType' =>
  1625. array (
  1626. 'name' => 'errTplType',
  1627. 'desc' => 'prop_login.errtpltype_desc',
  1628. 'type' => 'list',
  1629. 'options' =>
  1630. array (
  1631. 0 =>
  1632. array (
  1633. 'value' => 'modChunk',
  1634. 'text' => 'opt_register.chunk',
  1635. 'name' => 'Chunk',
  1636. ),
  1637. 1 =>
  1638. array (
  1639. 'value' => 'file',
  1640. 'text' => 'opt_register.file',
  1641. 'name' => 'File',
  1642. ),
  1643. 2 =>
  1644. array (
  1645. 'value' => 'inline',
  1646. 'text' => 'opt_register.inline',
  1647. 'name' => 'Inline',
  1648. ),
  1649. 3 =>
  1650. array (
  1651. 'value' => 'embedded',
  1652. 'text' => 'opt_register.embedded',
  1653. 'name' => 'Embedded',
  1654. ),
  1655. ),
  1656. 'value' => 'modChunk',
  1657. 'lexicon' => 'login:properties',
  1658. 'area' => '',
  1659. 'desc_trans' => 'The type of error tpl.',
  1660. 'area_trans' => '',
  1661. ),
  1662. 'loginResourceId' =>
  1663. array (
  1664. 'name' => 'loginResourceId',
  1665. 'desc' => 'prop_login.loginresourceid_desc',
  1666. 'type' => 'textfield',
  1667. 'options' => '',
  1668. 'value' => '0',
  1669. 'lexicon' => 'login:properties',
  1670. 'area' => '',
  1671. 'desc_trans' => 'The resource to direct users to on successful login. 0 will redirect to self.',
  1672. 'area_trans' => '',
  1673. ),
  1674. 'loginResourceParams' =>
  1675. array (
  1676. 'name' => 'loginResourceParams',
  1677. 'desc' => 'prop_login.loginresourceparams_desc',
  1678. 'type' => 'textfield',
  1679. 'options' => '',
  1680. 'value' => '',
  1681. 'lexicon' => 'login:properties',
  1682. 'area' => '',
  1683. 'desc_trans' => 'A JSON object of parameters to append to the login redirection URL. Ex: {"test":123}',
  1684. 'area_trans' => '',
  1685. ),
  1686. 'logoutResourceId' =>
  1687. array (
  1688. 'name' => 'logoutResourceId',
  1689. 'desc' => 'prop_login.logoutresourceid_desc',
  1690. 'type' => 'textfield',
  1691. 'options' => '',
  1692. 'value' => '0',
  1693. 'lexicon' => 'login:properties',
  1694. 'area' => '',
  1695. 'desc_trans' => 'Resource ID to redirect to on successful logout. 0 will redirect to self.',
  1696. 'area_trans' => '',
  1697. ),
  1698. 'logoutResourceParams' =>
  1699. array (
  1700. 'name' => 'logoutResourceParams',
  1701. 'desc' => 'prop_login.logoutresourceparams_desc',
  1702. 'type' => 'textfield',
  1703. 'options' => '',
  1704. 'value' => '',
  1705. 'lexicon' => 'login:properties',
  1706. 'area' => '',
  1707. 'desc_trans' => 'A JSON object of parameters to append to the logout redirection URL. Ex: {"test":123}',
  1708. 'area_trans' => '',
  1709. ),
  1710. 'loginMsg' =>
  1711. array (
  1712. 'name' => 'loginMsg',
  1713. 'desc' => 'prop_login.loginmsg_desc',
  1714. 'type' => 'textfield',
  1715. 'options' => '',
  1716. 'value' => '',
  1717. 'lexicon' => 'login:properties',
  1718. 'area' => '',
  1719. 'desc_trans' => 'Optional label message for login action. If blank, will default to lexicon string for Login.',
  1720. 'area_trans' => '',
  1721. ),
  1722. 'logoutMsg' =>
  1723. array (
  1724. 'name' => 'logoutMsg',
  1725. 'desc' => 'prop_login.logoutmsg_desc',
  1726. 'type' => 'textfield',
  1727. 'options' => '',
  1728. 'value' => '',
  1729. 'lexicon' => 'login:properties',
  1730. 'area' => '',
  1731. 'desc_trans' => 'Optional label message for logout action. If blank, will default to lexicon string for Logout.',
  1732. 'area_trans' => '',
  1733. ),
  1734. 'redirectToPrior' =>
  1735. array (
  1736. 'name' => 'redirectToPrior',
  1737. 'desc' => 'prop_login.redirecttoprior_desc',
  1738. 'type' => 'combo-boolean',
  1739. 'options' => '',
  1740. 'value' => false,
  1741. 'lexicon' => 'login:properties',
  1742. 'area' => '',
  1743. 'desc_trans' => 'If true, will redirect to the referring page (HTTP_REFERER) on successful login.',
  1744. 'area_trans' => '',
  1745. ),
  1746. 'redirectToOnFailedAuth' =>
  1747. array (
  1748. 'name' => 'redirectToOnFailedAuth',
  1749. 'desc' => 'prop_login.redirecttoonfailedauth_desc',
  1750. 'type' => 'textfield',
  1751. 'options' => '',
  1752. 'value' => '',
  1753. 'lexicon' => 'login:properties',
  1754. 'area' => '',
  1755. 'desc_trans' => 'If set to a non-zero number, will redirect the user to this page if their attempt to login is unsuccessful.',
  1756. 'area_trans' => '',
  1757. ),
  1758. 'rememberMeKey' =>
  1759. array (
  1760. 'name' => 'rememberMeKey',
  1761. 'desc' => 'prop_login.remembermekey_desc',
  1762. 'type' => 'textfield',
  1763. 'options' => '',
  1764. 'value' => 'rememberme',
  1765. 'lexicon' => 'login:properties',
  1766. 'area' => '',
  1767. 'desc_trans' => 'prop_login.remembermekey_desc',
  1768. 'area_trans' => '',
  1769. ),
  1770. 'contexts' =>
  1771. array (
  1772. 'name' => 'contexts',
  1773. 'desc' => 'prop_login.contexts_desc',
  1774. 'type' => 'textfield',
  1775. 'options' => '',
  1776. 'value' => '',
  1777. 'lexicon' => 'login:properties',
  1778. 'area' => '',
  1779. 'desc_trans' => '(Experimental) A comma-separated list of contexts to log in to. Defaults to the current context if not explicitly set.',
  1780. 'area_trans' => '',
  1781. ),
  1782. 'toPlaceholder' =>
  1783. array (
  1784. 'name' => 'toPlaceholder',
  1785. 'desc' => 'prop_login.toplaceholder_desc',
  1786. 'type' => 'textfield',
  1787. 'options' => '',
  1788. 'value' => '',
  1789. 'lexicon' => 'login:properties',
  1790. 'area' => '',
  1791. 'desc_trans' => 'If set, will set the output of the login snippet to a placeholder of this name rather than directly outputting the return contents.',
  1792. 'area_trans' => '',
  1793. ),
  1794. 'recaptchaTheme' =>
  1795. array (
  1796. 'name' => 'recaptchaTheme',
  1797. 'desc' => 'prop_register.recaptchatheme_desc',
  1798. 'type' => 'list',
  1799. 'options' =>
  1800. array (
  1801. 0 =>
  1802. array (
  1803. 'value' => 'red',
  1804. 'text' => 'opt_register.red',
  1805. 'name' => 'Red',
  1806. ),
  1807. 1 =>
  1808. array (
  1809. 'value' => 'white',
  1810. 'text' => 'opt_register.white',
  1811. 'name' => 'White',
  1812. ),
  1813. 2 =>
  1814. array (
  1815. 'value' => 'clean',
  1816. 'text' => 'opt_register.clean',
  1817. 'name' => 'Clean',
  1818. ),
  1819. 3 =>
  1820. array (
  1821. 'value' => 'blackglass',
  1822. 'text' => 'opt_register.blackglass',
  1823. 'name' => 'Black Glass',
  1824. ),
  1825. ),
  1826. 'value' => 'clean',
  1827. 'lexicon' => 'login:properties',
  1828. 'area' => '',
  1829. 'desc_trans' => 'If `recaptcha` is set as a preHook, this will select a theme for the reCaptcha widget.',
  1830. 'area_trans' => '',
  1831. ),
  1832. ),
  1833. 'moduleguid' => '',
  1834. 'static' => false,
  1835. 'static_file' => '',
  1836. 'content' => '/**
  1837. * Login
  1838. *
  1839. * Copyright 2010 by Jason Coward <jason@modx.com> and Shaun McCormick
  1840. * <shaun@modx.com>
  1841. *
  1842. * Login is free software; you can redistribute it and/or modify it
  1843. * under the terms of the GNU General Public License as published by the Free
  1844. * Software Foundation; either version 2 of the License, or (at your option) any
  1845. * later version.
  1846. *
  1847. * Login is distributed in the hope that it will be useful, but WITHOUT ANY
  1848. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  1849. * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  1850. *
  1851. * You should have received a copy of the GNU General Public License along with
  1852. * Login; if not, write to the Free Software Foundation, Inc., 59 Temple
  1853. * Place, Suite 330, Boston, MA 02111-1307 USA
  1854. *
  1855. * @package login
  1856. */
  1857. /**
  1858. * MODx Login Snippet
  1859. *
  1860. * This snippet handles login POSTs, sending the user back to where they came from or to a specific
  1861. * location if specified in the POST.
  1862. *
  1863. * @package login
  1864. *
  1865. * @property textfield actionKey The REQUEST variable containing the action to take.
  1866. * @property textfield loginKey The actionKey for login.
  1867. * @property textfield logoutKey The actionKey for logout.
  1868. * @property boolean loginViaEmail Enable login via username or email address (either one!) [default: false]
  1869. * @property list tplType The type of template to expect for the views:
  1870. * modChunk - name of chunk to use
  1871. * file - full path to file to use as tpl
  1872. * embedded - the tpl is embedded in the page content
  1873. * inline - the tpl is inline content provided directly
  1874. * @property textfield loginTpl The template for the login view (content based on tplType)
  1875. * @property textfield logoutTpl The template for the logout view (content based on tplType)
  1876. * @property textfield errTpl The template for any errors that occur when processing an view
  1877. * @property list errTplType The type of template to expect for the error messages:
  1878. * modChunk - name of chunk to use
  1879. * file - full path to file to use as tpl
  1880. * inline - the tpl is inline content provided directly
  1881. * @property integer logoutResourceId An explicit resource id to redirect users to on logout
  1882. * @property string loginMsg The string to use for the login action. Defaults to
  1883. * the lexicon string "login".
  1884. * @property string logoutMsg The string to use for the logout action. Defaults
  1885. * to the lexicon string "login.logout"
  1886. */
  1887. require_once $modx->getOption(\'login.core_path\',null,$modx->getOption(\'core_path\').\'components/login/\').\'model/login/login.class.php\';
  1888. $login = new Login($modx,$scriptProperties);
  1889. if (!is_object($login) || !($login instanceof Login)) return \'\';
  1890. $controller = $login->loadController(\'Login\');
  1891. $output = $controller->run($scriptProperties);
  1892. return $output;',
  1893. ),
  1894. 'policies' =>
  1895. array (
  1896. 'web' =>
  1897. array (
  1898. ),
  1899. ),
  1900. 'source' =>
  1901. array (
  1902. ),
  1903. ),
  1904. 'SimpleSearchForm' =>
  1905. array (
  1906. 'fields' =>
  1907. array (
  1908. 'id' => 111,
  1909. 'source' => 0,
  1910. 'property_preprocess' => false,
  1911. 'name' => 'SimpleSearchForm',
  1912. 'description' => '',
  1913. 'editor_type' => 0,
  1914. 'category' => 40,
  1915. 'cache_type' => 0,
  1916. 'snippet' => '/**
  1917. * Show the search form
  1918. *
  1919. * @var modX $modx
  1920. * @var array $scriptProperties
  1921. * @package simplesearch
  1922. */
  1923. require_once $modx->getOption(
  1924. \'simplesearch.core_path\',
  1925. null,
  1926. $modx->getOption(\'core_path\') . \'components/simplesearch/\'
  1927. ) . \'model/simplesearch/simplesearch.class.php\';
  1928. $search = new SimpleSearch($modx, $scriptProperties);
  1929. /* Setup default options. */
  1930. $scriptProperties = array_merge(
  1931. array(
  1932. \'tpl\' => \'SearchForm\',
  1933. \'method\' => \'get\',
  1934. \'searchIndex\' => \'search\',
  1935. \'toPlaceholder\' => false,
  1936. \'landing\' => $modx->resource->get(\'id\'),
  1937. ), $scriptProperties);
  1938. if (empty($scriptProperties[\'landing\'])) {
  1939. $scriptProperties[\'landing\'] = $modx->resource->get(\'id\');
  1940. }
  1941. /* If get value already exists, set it as default. */
  1942. $searchValue = isset($_REQUEST[$scriptProperties[\'searchIndex\']]) ? $_REQUEST[$scriptProperties[\'searchIndex\']] : \'\';
  1943. $searchValues = explode(\' \', $searchValue);
  1944. array_map(array($modx, \'sanitizeString\'), $searchValues);
  1945. $searchValue = implode(\' \', $searchValues);
  1946. $placeholders = array(
  1947. \'method\' => $scriptProperties[\'method\'],
  1948. \'landing\' => $scriptProperties[\'landing\'],
  1949. \'searchValue\' => strip_tags(htmlspecialchars($searchValue, ENT_QUOTES, \'UTF-8\')),
  1950. \'searchIndex\' => $scriptProperties[\'searchIndex\'],
  1951. );
  1952. $output = $search->getChunk($scriptProperties[\'tpl\'], $placeholders);
  1953. return $search->output($output, $scriptProperties[\'toPlaceholder\']);',
  1954. 'locked' => false,
  1955. 'properties' =>
  1956. array (
  1957. 'tpl' =>
  1958. array (
  1959. 'name' => 'tpl',
  1960. 'desc' => 'simplesearch.tpl_form_desc',
  1961. 'type' => 'textfield',
  1962. 'options' => '',
  1963. 'value' => 'SearchForm',
  1964. 'lexicon' => 'simplesearch:properties',
  1965. 'area' => '',
  1966. 'desc_trans' => 'The chunk that will be used to display the search form.',
  1967. 'area_trans' => '',
  1968. ),
  1969. 'landing' =>
  1970. array (
  1971. 'name' => 'landing',
  1972. 'desc' => 'simplesearch.landing_desc',
  1973. 'type' => 'textfield',
  1974. 'options' => '',
  1975. 'value' => '',
  1976. 'lexicon' => 'simplesearch:properties',
  1977. 'area' => '',
  1978. 'desc_trans' => 'The Resource that the SimpleSearch snippet is called on, that will display the results of the search.',
  1979. 'area_trans' => '',
  1980. ),
  1981. 'searchIndex' =>
  1982. array (
  1983. 'name' => 'searchIndex',
  1984. 'desc' => 'simplesearch.searchindex_desc',
  1985. 'type' => 'textfield',
  1986. 'options' => '',
  1987. 'value' => 'search',
  1988. 'lexicon' => 'simplesearch:properties',
  1989. 'area' => '',
  1990. 'desc_trans' => 'The name of the REQUEST parameter that the search will use.',
  1991. 'area_trans' => '',
  1992. ),
  1993. 'method' =>
  1994. array (
  1995. 'name' => 'method',
  1996. 'desc' => 'simplesearch.method_desc',
  1997. 'type' => 'combo-boolean',
  1998. 'options' =>
  1999. array (
  2000. 0 =>
  2001. array (
  2002. 'text' => 'simplesearch.get',
  2003. 'value' => 'get',
  2004. 'name' => 'get',
  2005. ),
  2006. 1 =>
  2007. array (
  2008. 'text' => 'simplesearch.post',
  2009. 'value' => 'post',
  2010. 'name' => 'post',
  2011. ),
  2012. ),
  2013. 'value' => 'get',
  2014. 'lexicon' => 'simplesearch:properties',
  2015. 'area' => '',
  2016. 'desc_trans' => 'Whether to send the search over POST or GET.',
  2017. 'area_trans' => '',
  2018. ),
  2019. 'toPlaceholder' =>
  2020. array (
  2021. 'name' => 'toPlaceholder',
  2022. 'desc' => 'simplesearch.toplaceholder_desc',
  2023. 'type' => 'textfield',
  2024. 'options' => '',
  2025. 'value' => '',
  2026. 'lexicon' => 'simplesearch:properties',
  2027. 'area' => '',
  2028. 'desc_trans' => 'Whether to set the output to directly return, or set to a placeholder with this propertys name.',
  2029. 'area_trans' => '',
  2030. ),
  2031. ),
  2032. 'moduleguid' => '',
  2033. 'static' => false,
  2034. 'static_file' => '',
  2035. 'content' => '/**
  2036. * Show the search form
  2037. *
  2038. * @var modX $modx
  2039. * @var array $scriptProperties
  2040. * @package simplesearch
  2041. */
  2042. require_once $modx->getOption(
  2043. \'simplesearch.core_path\',
  2044. null,
  2045. $modx->getOption(\'core_path\') . \'components/simplesearch/\'
  2046. ) . \'model/simplesearch/simplesearch.class.php\';
  2047. $search = new SimpleSearch($modx, $scriptProperties);
  2048. /* Setup default options. */
  2049. $scriptProperties = array_merge(
  2050. array(
  2051. \'tpl\' => \'SearchForm\',
  2052. \'method\' => \'get\',
  2053. \'searchIndex\' => \'search\',
  2054. \'toPlaceholder\' => false,
  2055. \'landing\' => $modx->resource->get(\'id\'),
  2056. ), $scriptProperties);
  2057. if (empty($scriptProperties[\'landing\'])) {
  2058. $scriptProperties[\'landing\'] = $modx->resource->get(\'id\');
  2059. }
  2060. /* If get value already exists, set it as default. */
  2061. $searchValue = isset($_REQUEST[$scriptProperties[\'searchIndex\']]) ? $_REQUEST[$scriptProperties[\'searchIndex\']] : \'\';
  2062. $searchValues = explode(\' \', $searchValue);
  2063. array_map(array($modx, \'sanitizeString\'), $searchValues);
  2064. $searchValue = implode(\' \', $searchValues);
  2065. $placeholders = array(
  2066. \'method\' => $scriptProperties[\'method\'],
  2067. \'landing\' => $scriptProperties[\'landing\'],
  2068. \'searchValue\' => strip_tags(htmlspecialchars($searchValue, ENT_QUOTES, \'UTF-8\')),
  2069. \'searchIndex\' => $scriptProperties[\'searchIndex\'],
  2070. );
  2071. $output = $search->getChunk($scriptProperties[\'tpl\'], $placeholders);
  2072. return $search->output($output, $scriptProperties[\'toPlaceholder\']);',
  2073. ),
  2074. 'policies' =>
  2075. array (
  2076. 'web' =>
  2077. array (
  2078. ),
  2079. ),
  2080. 'source' =>
  2081. array (
  2082. ),
  2083. ),
  2084. 'FormIt' =>
  2085. array (
  2086. 'fields' =>
  2087. array (
  2088. 'id' => 16,
  2089. 'source' => 0,
  2090. 'property_preprocess' => false,
  2091. 'name' => 'FormIt',
  2092. 'description' => 'A dynamic form processing snippet.',
  2093. 'editor_type' => 0,
  2094. 'category' => 8,
  2095. 'cache_type' => 0,
  2096. 'snippet' => '/**
  2097. * FormIt
  2098. *
  2099. * Copyright 2009-2012 by Shaun McCormick <shaun@modx.com>
  2100. *
  2101. * FormIt is free software; you can redistribute it and/or modify it
  2102. * under the terms of the GNU General Public License as published by the Free
  2103. * Software Foundation; either version 2 of the License, or (at your option) any
  2104. * later version.
  2105. *
  2106. * FormIt is distributed in the hope that it will be useful, but WITHOUT ANY
  2107. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  2108. * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  2109. *
  2110. * You should have received a copy of the GNU General Public License along with
  2111. * FormIt; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
  2112. * Suite 330, Boston, MA 02111-1307 USA
  2113. *
  2114. * @package formit
  2115. */
  2116. /**
  2117. * FormIt
  2118. *
  2119. * A dynamic form processing Snippet for MODx Revolution.
  2120. *
  2121. * @var modX $modx
  2122. * @var array $scriptProperties
  2123. *
  2124. * @package formit
  2125. */
  2126. $modelPath = $modx->getOption(
  2127. \'formit.core_path\',
  2128. null,
  2129. $modx->getOption(\'core_path\', null, MODX_CORE_PATH) . \'components/formit/\'
  2130. ) . \'model/formit/\';
  2131. $modx->loadClass(\'FormIt\', $modelPath, true, true);
  2132. $fi = new FormIt($modx, $scriptProperties);
  2133. $fi->initialize($modx->context->get(\'key\'));
  2134. $fi->loadRequest();
  2135. $fields = $fi->request->prepare();
  2136. return $fi->request->handle($fields);',
  2137. 'locked' => false,
  2138. 'properties' =>
  2139. array (
  2140. 'hooks' =>
  2141. array (
  2142. 'name' => 'hooks',
  2143. 'desc' => 'prop_formit.hooks_desc',
  2144. 'type' => 'textfield',
  2145. 'options' => '',
  2146. 'value' => '',
  2147. 'lexicon' => 'formit:properties',
  2148. 'area' => '',
  2149. 'desc_trans' => 'What scripts to fire, if any, after the form passes validation. This can be a comma-separated list of hooks, and if the first fails, the proceeding ones will not fire. A hook can also be a Snippet name that will execute that Snippet.',
  2150. 'area_trans' => '',
  2151. ),
  2152. 'preHooks' =>
  2153. array (
  2154. 'name' => 'preHooks',
  2155. 'desc' => 'prop_formit.prehooks_desc',
  2156. 'type' => 'textfield',
  2157. 'options' => '',
  2158. 'value' => '',
  2159. 'lexicon' => 'formit:properties',
  2160. 'area' => '',
  2161. 'desc_trans' => 'What scripts to fire, if any, once the form loads. You can pre-set form fields via $scriptProperties[`hook`]->fields[`fieldname`]. This can be a comma-separated list of hooks, and if the first fails, the proceeding ones will not fire. A hook can also be a Snippet name that will execute that Snippet.',
  2162. 'area_trans' => '',
  2163. ),
  2164. 'submitVar' =>
  2165. array (
  2166. 'name' => 'submitVar',
  2167. 'desc' => 'prop_formit.submitvar_desc',
  2168. 'type' => 'textfield',
  2169. 'options' => '',
  2170. 'value' => '',
  2171. 'lexicon' => 'formit:properties',
  2172. 'area' => '',
  2173. 'desc_trans' => 'If set, will not begin form processing if this POST variable is not passed.',
  2174. 'area_trans' => '',
  2175. ),
  2176. 'validate' =>
  2177. array (
  2178. 'name' => 'validate',
  2179. 'desc' => 'prop_formit.validate_desc',
  2180. 'type' => 'textfield',
  2181. 'options' => '',
  2182. 'value' => '',
  2183. 'lexicon' => 'formit:properties',
  2184. 'area' => '',
  2185. 'desc_trans' => 'A comma-separated list of fields to validate, with each field name as name:validator (eg: username:required,email:required). Validators can also be chained, like email:email:required. This property can be specified on multiple lines.',
  2186. 'area_trans' => '',
  2187. ),
  2188. 'errTpl' =>
  2189. array (
  2190. 'name' => 'errTpl',
  2191. 'desc' => 'prop_formit.errtpl_desc',
  2192. 'type' => 'textfield',
  2193. 'options' => '',
  2194. 'value' => '<span class="error">[[+error]]</span>',
  2195. 'lexicon' => 'formit:properties',
  2196. 'area' => '',
  2197. 'desc_trans' => 'The wrapper template for error messages.',
  2198. 'area_trans' => '',
  2199. ),
  2200. 'validationErrorMessage' =>
  2201. array (
  2202. 'name' => 'validationErrorMessage',
  2203. 'desc' => 'prop_formit.validationerrormessage_desc',
  2204. 'type' => 'textfield',
  2205. 'options' => '',
  2206. 'value' => '<p class="error">A form validation error occurred. Please check the values you have entered.</p>',
  2207. 'lexicon' => 'formit:properties',
  2208. 'area' => '',
  2209. 'desc_trans' => 'A general error message to set to a placeholder if validation fails. Can contain [[+errors]] if you want to display a list of all errors at the top.',
  2210. 'area_trans' => '',
  2211. ),
  2212. 'validationErrorBulkTpl' =>
  2213. array (
  2214. 'name' => 'validationErrorBulkTpl',
  2215. 'desc' => 'prop_formit.validationerrorbulktpl_desc',
  2216. 'type' => 'textfield',
  2217. 'options' => '',
  2218. 'value' => '<li>[[+error]]</li>',
  2219. 'lexicon' => 'formit:properties',
  2220. 'area' => '',
  2221. 'desc_trans' => 'HTML tpl that is used for each individual error in the generic validation error message value.',
  2222. 'area_trans' => '',
  2223. ),
  2224. 'trimValuesBeforeValidation' =>
  2225. array (
  2226. 'name' => 'trimValuesBeforeValidation',
  2227. 'desc' => 'prop_formit.trimvaluesdeforevalidation_desc',
  2228. 'type' => 'combo-boolean',
  2229. 'options' => '',
  2230. 'value' => true,
  2231. 'lexicon' => 'formit:properties',
  2232. 'area' => '',
  2233. 'desc_trans' => 'Whether or not to trim spaces from the beginning and end of values before attempting validation. Defaults to true.',
  2234. 'area_trans' => '',
  2235. ),
  2236. 'customValidators' =>
  2237. array (
  2238. 'name' => 'customValidators',
  2239. 'desc' => 'prop_formit.customvalidators_desc',
  2240. 'type' => 'textfield',
  2241. 'options' => '',
  2242. 'value' => '',
  2243. 'lexicon' => 'formit:properties',
  2244. 'area' => '',
  2245. 'desc_trans' => 'A comma-separated list of custom validator names (snippets) you plan to use in this form. They must be explicitly stated here, or they will not be run.',
  2246. 'area_trans' => '',
  2247. ),
  2248. 'clearFieldsOnSuccess' =>
  2249. array (
  2250. 'name' => 'clearFieldsOnSuccess',
  2251. 'desc' => 'prop_formit.clearfieldsonsuccess_desc',
  2252. 'type' => 'combo-boolean',
  2253. 'options' => '',
  2254. 'value' => true,
  2255. 'lexicon' => 'formit:properties',
  2256. 'area' => '',
  2257. 'desc_trans' => 'If true, will clear the fields on a successful form submission that does not redirect.',
  2258. 'area_trans' => '',
  2259. ),
  2260. 'successMessage' =>
  2261. array (
  2262. 'name' => 'successMessage',
  2263. 'desc' => 'prop_formit.successmessage_desc',
  2264. 'type' => 'textfield',
  2265. 'options' => '',
  2266. 'value' => '',
  2267. 'lexicon' => 'formit:properties',
  2268. 'area' => '',
  2269. 'desc_trans' => 'If set, will set this a placeholder with the name of the value of the property &successMessagePlaceholder, which defaults to `fi.successMessage`.',
  2270. 'area_trans' => '',
  2271. ),
  2272. 'successMessagePlaceholder' =>
  2273. array (
  2274. 'name' => 'successMessagePlaceholder',
  2275. 'desc' => 'prop_formit.successmessageplaceholder_desc',
  2276. 'type' => 'textfield',
  2277. 'options' => '',
  2278. 'value' => 'fi.successMessage',
  2279. 'lexicon' => 'formit:properties',
  2280. 'area' => '',
  2281. 'desc_trans' => 'The placeholder to set the success message to.',
  2282. 'area_trans' => '',
  2283. ),
  2284. 'store' =>
  2285. array (
  2286. 'name' => 'store',
  2287. 'desc' => 'prop_formit.store_desc',
  2288. 'type' => 'combo-boolean',
  2289. 'options' => '',
  2290. 'value' => false,
  2291. 'lexicon' => 'formit:properties',
  2292. 'area' => '',
  2293. 'desc_trans' => 'If true, will store the data in the cache for retrieval using the FormItRetriever snippet.',
  2294. 'area_trans' => '',
  2295. ),
  2296. 'placeholderPrefix' =>
  2297. array (
  2298. 'name' => 'placeholderPrefix',
  2299. 'desc' => 'prop_formit.placeholderprefix_desc',
  2300. 'type' => 'textfield',
  2301. 'options' => '',
  2302. 'value' => 'fi.',
  2303. 'lexicon' => 'formit:properties',
  2304. 'area' => '',
  2305. 'desc_trans' => 'The prefix to use for all placeholders set by FormIt for fields. Defaults to `fi.`',
  2306. 'area_trans' => '',
  2307. ),
  2308. 'storeTime' =>
  2309. array (
  2310. 'name' => 'storeTime',
  2311. 'desc' => 'prop_formit.storetime_desc',
  2312. 'type' => 'textfield',
  2313. 'options' => '',
  2314. 'value' => '300',
  2315. 'lexicon' => 'formit:properties',
  2316. 'area' => '',
  2317. 'desc_trans' => 'If `store` is set to true, this specifies the number of seconds to store the data from the form submission. Defaults to five minutes.',
  2318. 'area_trans' => '',
  2319. ),
  2320. 'storeLocation' =>
  2321. array (
  2322. 'name' => 'storeLocation',
  2323. 'desc' => 'prop_formit.storelocation_desc',
  2324. 'type' => 'list',
  2325. 'options' =>
  2326. array (
  2327. 0 =>
  2328. array (
  2329. 'value' => 'cache',
  2330. 'text' => 'formit.opt_cache',
  2331. 'name' => 'MODX Cache',
  2332. ),
  2333. 1 =>
  2334. array (
  2335. 'value' => 'session',
  2336. 'text' => 'formit.opt_session',
  2337. 'name' => 'Session',
  2338. ),
  2339. ),
  2340. 'value' => 'cache',
  2341. 'lexicon' => 'formit:properties',
  2342. 'area' => '',
  2343. 'desc_trans' => 'If `store` is set to true, this specifies the cache location of the data from the form submission. Defaults to MODX cache.',
  2344. 'area_trans' => '',
  2345. ),
  2346. 'allowFiles' =>
  2347. array (
  2348. 'name' => 'allowFiles',
  2349. 'desc' => 'prop_formit.allowfiles_desc',
  2350. 'type' => 'combo-boolean',
  2351. 'options' => '',
  2352. 'value' => true,
  2353. 'lexicon' => 'formit:properties',
  2354. 'area' => '',
  2355. 'desc_trans' => 'If set to 0, will prevent files from being submitted on the form.',
  2356. 'area_trans' => '',
  2357. ),
  2358. 'spamEmailFields' =>
  2359. array (
  2360. 'name' => 'spamEmailFields',
  2361. 'desc' => 'prop_formit.spamemailfields_desc',
  2362. 'type' => 'textfield',
  2363. 'options' => '',
  2364. 'value' => 'email',
  2365. 'lexicon' => 'formit:properties',
  2366. 'area' => '',
  2367. 'desc_trans' => 'If `spam` is set as a hook, a comma-separated list of fields containing emails to check spam against.',
  2368. 'area_trans' => '',
  2369. ),
  2370. 'spamCheckIp' =>
  2371. array (
  2372. 'name' => 'spamCheckIp',
  2373. 'desc' => 'prop_formit.spamcheckip_desc',
  2374. 'type' => 'combo-boolean',
  2375. 'options' => '',
  2376. 'value' => false,
  2377. 'lexicon' => 'formit:properties',
  2378. 'area' => '',
  2379. 'desc_trans' => 'If `spam` is set as a hook, and this is true, will check the IP as well.',
  2380. 'area_trans' => '',
  2381. ),
  2382. 'recaptchaJs' =>
  2383. array (
  2384. 'name' => 'recaptchaJs',
  2385. 'desc' => 'prop_formit.recaptchajs_desc',
  2386. 'type' => 'textfield',
  2387. 'options' => '',
  2388. 'value' => '{}',
  2389. 'lexicon' => 'formit:properties',
  2390. 'area' => '',
  2391. 'desc_trans' => 'If `recaptcha` is set as a hook, this can be a JSON object that will be set to the JS RecaptchaOptions variable, which configures options for reCaptcha.',
  2392. 'area_trans' => '',
  2393. ),
  2394. 'recaptchaTheme' =>
  2395. array (
  2396. 'name' => 'recaptchaTheme',
  2397. 'desc' => 'prop_formit.recaptchatheme_desc',
  2398. 'type' => 'list',
  2399. 'options' =>
  2400. array (
  2401. 0 =>
  2402. array (
  2403. 'value' => 'red',
  2404. 'text' => 'formit.opt_red',
  2405. 'name' => 'Red',
  2406. ),
  2407. 1 =>
  2408. array (
  2409. 'value' => 'white',
  2410. 'text' => 'formit.opt_white',
  2411. 'name' => 'White',
  2412. ),
  2413. 2 =>
  2414. array (
  2415. 'value' => 'clean',
  2416. 'text' => 'formit.opt_clean',
  2417. 'name' => 'Clean',
  2418. ),
  2419. 3 =>
  2420. array (
  2421. 'value' => 'blackglass',
  2422. 'text' => 'formit.opt_blackglass',
  2423. 'name' => 'Black Glass',
  2424. ),
  2425. ),
  2426. 'value' => 'clean',
  2427. 'lexicon' => 'formit:properties',
  2428. 'area' => '',
  2429. 'desc_trans' => 'If `recaptcha` is set as a hook, this will select a theme for the reCaptcha widget.',
  2430. 'area_trans' => '',
  2431. ),
  2432. 'redirectTo' =>
  2433. array (
  2434. 'name' => 'redirectTo',
  2435. 'desc' => 'prop_formit.redirectto_desc',
  2436. 'type' => 'textfield',
  2437. 'options' => '',
  2438. 'value' => '',
  2439. 'lexicon' => 'formit:properties',
  2440. 'area' => '',
  2441. 'desc_trans' => 'If `redirect` is set as a hook, this must specify the Resource ID to redirect to.',
  2442. 'area_trans' => '',
  2443. ),
  2444. 'redirectParams' =>
  2445. array (
  2446. 'name' => 'redirectParams',
  2447. 'desc' => 'prop_formit.redirectparams_desc',
  2448. 'type' => 'textfield',
  2449. 'options' => '',
  2450. 'value' => '',
  2451. 'lexicon' => 'formit:properties',
  2452. 'area' => '',
  2453. 'desc_trans' => 'A JSON array of parameters to pass to the redirect hook that will be passed when redirecting.',
  2454. 'area_trans' => '',
  2455. ),
  2456. 'emailTo' =>
  2457. array (
  2458. 'name' => 'emailTo',
  2459. 'desc' => 'prop_formit.emailto_desc',
  2460. 'type' => 'textfield',
  2461. 'options' => '',
  2462. 'value' => '',
  2463. 'lexicon' => 'formit:properties',
  2464. 'area' => '',
  2465. 'desc_trans' => 'If `email` is set as a hook, then this specifies the email(s) to send the email to. Can be a comma-separated list of email addresses.',
  2466. 'area_trans' => '',
  2467. ),
  2468. 'emailToName' =>
  2469. array (
  2470. 'name' => 'emailToName',
  2471. 'desc' => 'prop_formit.emailtoname_desc',
  2472. 'type' => 'textfield',
  2473. 'options' => '',
  2474. 'value' => '',
  2475. 'lexicon' => 'formit:properties',
  2476. 'area' => '',
  2477. 'desc_trans' => 'Optional. If `email` is set as a hook, then this must be a parallel list of comma-separated names for the email addresses specified in the `emailTo` property.',
  2478. 'area_trans' => '',
  2479. ),
  2480. 'emailFrom' =>
  2481. array (
  2482. 'name' => 'emailFrom',
  2483. 'desc' => 'prop_formit.emailfrom_desc',
  2484. 'type' => 'textfield',
  2485. 'options' => '',
  2486. 'value' => '',
  2487. 'lexicon' => 'formit:properties',
  2488. 'area' => '',
  2489. 'desc_trans' => 'Optional. If `email` is set as a hook, and this is set, will specify the From: address for the email. If not set, will first look for an `email` form field. If none is found, will default to the `emailsender` system setting.',
  2490. 'area_trans' => '',
  2491. ),
  2492. 'emailFromName' =>
  2493. array (
  2494. 'name' => 'emailFromName',
  2495. 'desc' => 'prop_formit.emailfromname_desc',
  2496. 'type' => 'textfield',
  2497. 'options' => '',
  2498. 'value' => '',
  2499. 'lexicon' => 'formit:properties',
  2500. 'area' => '',
  2501. 'desc_trans' => 'Optional. If `email` is set as a hook, and this is set, will specify the From: name for the email.',
  2502. 'area_trans' => '',
  2503. ),
  2504. 'emailReplyTo' =>
  2505. array (
  2506. 'name' => 'emailReplyTo',
  2507. 'desc' => 'prop_formit.emailreplyto_desc',
  2508. 'type' => 'textfield',
  2509. 'options' => '',
  2510. 'value' => '',
  2511. 'lexicon' => 'formit:properties',
  2512. 'area' => '',
  2513. 'desc_trans' => 'Optional. If `email` is set as a hook, and this is set, will specify the Reply-To: address for the email.',
  2514. 'area_trans' => '',
  2515. ),
  2516. 'emailReplyToName' =>
  2517. array (
  2518. 'name' => 'emailReplyToName',
  2519. 'desc' => 'prop_formit.emailreplytoname_desc',
  2520. 'type' => 'textfield',
  2521. 'options' => '',
  2522. 'value' => '',
  2523. 'lexicon' => 'formit:properties',
  2524. 'area' => '',
  2525. 'desc_trans' => 'Optional. If `email` is set as a hook, and this is set, will specify the Reply-To: name for the email.',
  2526. 'area_trans' => '',
  2527. ),
  2528. 'emailCC' =>
  2529. array (
  2530. 'name' => 'emailCC',
  2531. 'desc' => 'prop_formit.emailcc_desc',
  2532. 'type' => 'textfield',
  2533. 'options' => '',
  2534. 'value' => '',
  2535. 'lexicon' => 'formit:properties',
  2536. 'area' => '',
  2537. 'desc_trans' => 'If `email` is set as a hook, then this specifies the email(s) to send the email to as a CC. Can be a comma-separated list of email addresses.',
  2538. 'area_trans' => '',
  2539. ),
  2540. 'emailCCName' =>
  2541. array (
  2542. 'name' => 'emailCCName',
  2543. 'desc' => 'prop_formit.emailccname_desc',
  2544. 'type' => 'textfield',
  2545. 'options' => '',
  2546. 'value' => '',
  2547. 'lexicon' => 'formit:properties',
  2548. 'area' => '',
  2549. 'desc_trans' => 'Optional. If `email` is set as a hook, then this must be a parallel list of comma-separated names for the email addresses specified in the `emailCC` property.',
  2550. 'area_trans' => '',
  2551. ),
  2552. 'emailBCC' =>
  2553. array (
  2554. 'name' => 'emailBCC',
  2555. 'desc' => 'prop_formit.emailbcc_desc',
  2556. 'type' => 'textfield',
  2557. 'options' => '',
  2558. 'value' => '',
  2559. 'lexicon' => 'formit:properties',
  2560. 'area' => '',
  2561. 'desc_trans' => 'If `email` is set as a hook, then this specifies the email(s) to send the email to as a BCC. Can be a comma-separated list of email addresses.',
  2562. 'area_trans' => '',
  2563. ),
  2564. 'emailBCCName' =>
  2565. array (
  2566. 'name' => 'emailBCCName',
  2567. 'desc' => 'prop_formit.emailbccname_desc',
  2568. 'type' => 'textfield',
  2569. 'options' => '',
  2570. 'value' => '',
  2571. 'lexicon' => 'formit:properties',
  2572. 'area' => '',
  2573. 'desc_trans' => 'Optional. If `email` is set as a hook, then this must be a parallel list of comma-separated names for the email addresses specified in the `emailBCC` property.',
  2574. 'area_trans' => '',
  2575. ),
  2576. 'emailReturnPath' =>
  2577. array (
  2578. 'name' => 'emailReturnPath',
  2579. 'desc' => 'prop_formit.emailreturnpath_desc',
  2580. 'type' => 'textfield',
  2581. 'options' => '',
  2582. 'value' => '',
  2583. 'lexicon' => 'formit:properties',
  2584. 'area' => '',
  2585. 'desc_trans' => 'Optional. If `email` is set as a hook, and this is set, will specify the Return-path: address for the email. If not set, will take the value of `emailFrom` property.',
  2586. 'area_trans' => '',
  2587. ),
  2588. 'emailSubject' =>
  2589. array (
  2590. 'name' => 'emailSubject',
  2591. 'desc' => 'prop_formit.emailsubject_desc',
  2592. 'type' => 'textfield',
  2593. 'options' => '',
  2594. 'value' => '',
  2595. 'lexicon' => 'formit:properties',
  2596. 'area' => '',
  2597. 'desc_trans' => 'If `email` is set as a hook, this is required as a subject line for the email.',
  2598. 'area_trans' => '',
  2599. ),
  2600. 'emailUseFieldForSubject' =>
  2601. array (
  2602. 'name' => 'emailUseFieldForSubject',
  2603. 'desc' => 'prop_formit.emailusefieldforsubject_desc',
  2604. 'type' => 'textfield',
  2605. 'options' => '',
  2606. 'value' => '',
  2607. 'lexicon' => 'formit:properties',
  2608. 'area' => '',
  2609. 'desc_trans' => 'If the field `subject` is passed into the form, if this is true, it will use the field content for the subject line of the email.',
  2610. 'area_trans' => '',
  2611. ),
  2612. 'emailHtml' =>
  2613. array (
  2614. 'name' => 'emailHtml',
  2615. 'desc' => 'prop_formit.emailhtml_desc',
  2616. 'type' => 'combo-boolean',
  2617. 'options' => '',
  2618. 'value' => true,
  2619. 'lexicon' => 'formit:properties',
  2620. 'area' => '',
  2621. 'desc_trans' => 'Optional. If `email` is set as a hook, this toggles HTML emails or not. Defaults to true.',
  2622. 'area_trans' => '',
  2623. ),
  2624. 'emailConvertNewlines' =>
  2625. array (
  2626. 'name' => 'emailConvertNewlines',
  2627. 'desc' => 'prop_formit.emailconvertnewlines_desc',
  2628. 'type' => 'combo-boolean',
  2629. 'options' => '',
  2630. 'value' => false,
  2631. 'lexicon' => 'formit:properties',
  2632. 'area' => '',
  2633. 'desc_trans' => 'If true and emailHtml is set to 1, will convert newlines to BR tags in the email.',
  2634. 'area_trans' => '',
  2635. ),
  2636. 'emailMultiWrapper' =>
  2637. array (
  2638. 'name' => 'emailMultiWrapper',
  2639. 'desc' => 'prop_formit.emailmultiwrapper_desc',
  2640. 'type' => 'textfield',
  2641. 'options' => '',
  2642. 'value' => '[[+value]]',
  2643. 'lexicon' => 'formit:properties',
  2644. 'area' => '',
  2645. 'desc_trans' => 'Will wrap each item in a collection of fields sent via checkboxes/multi-selects. Defaults to just the value.',
  2646. 'area_trans' => '',
  2647. ),
  2648. 'emailMultiSeparator' =>
  2649. array (
  2650. 'name' => 'emailMultiSeparator',
  2651. 'desc' => 'prop_formit.emailmultiseparator_desc',
  2652. 'type' => 'textfield',
  2653. 'options' => '',
  2654. 'value' => '',
  2655. 'lexicon' => 'formit:properties',
  2656. 'area' => '',
  2657. 'desc_trans' => 'The default separator for collections of items sent through checkboxes/multi-selects. Defaults to a newline.',
  2658. 'area_trans' => '',
  2659. ),
  2660. 'fiarTpl' =>
  2661. array (
  2662. 'name' => 'fiarTpl',
  2663. 'desc' => 'prop_formit.fiartpl_desc',
  2664. 'type' => 'textfield',
  2665. 'options' => '',
  2666. 'value' => '',
  2667. 'lexicon' => 'formit:properties',
  2668. 'area' => '',
  2669. 'desc_trans' => 'prop_formit.fiartpl_desc',
  2670. 'area_trans' => '',
  2671. ),
  2672. 'fiarToField' =>
  2673. array (
  2674. 'name' => 'fiarToField',
  2675. 'desc' => 'prop_formit.fiartofield_desc',
  2676. 'type' => 'textfield',
  2677. 'options' => '',
  2678. 'value' => 'email',
  2679. 'lexicon' => 'formit:properties',
  2680. 'area' => '',
  2681. 'desc_trans' => 'prop_formit.fiartofield_desc',
  2682. 'area_trans' => '',
  2683. ),
  2684. 'fiarSubject' =>
  2685. array (
  2686. 'name' => 'fiarSubject',
  2687. 'desc' => 'prop_formit.fiarsubject_desc',
  2688. 'type' => 'textfield',
  2689. 'options' => '',
  2690. 'value' => '[[++site_name]] Auto-Responder',
  2691. 'lexicon' => 'formit:properties',
  2692. 'area' => '',
  2693. 'desc_trans' => 'prop_formit.fiarsubject_desc',
  2694. 'area_trans' => '',
  2695. ),
  2696. 'fiarFrom' =>
  2697. array (
  2698. 'name' => 'fiarFrom',
  2699. 'desc' => 'prop_formit.fiarfrom_desc',
  2700. 'type' => 'textfield',
  2701. 'options' => '',
  2702. 'value' => '',
  2703. 'lexicon' => 'formit:properties',
  2704. 'area' => '',
  2705. 'desc_trans' => 'prop_formit.fiarfrom_desc',
  2706. 'area_trans' => '',
  2707. ),
  2708. 'fiarFromName' =>
  2709. array (
  2710. 'name' => 'fiarFromName',
  2711. 'desc' => 'prop_formit.fiarfromname_desc',
  2712. 'type' => 'textfield',
  2713. 'options' => '',
  2714. 'value' => '',
  2715. 'lexicon' => 'formit:properties',
  2716. 'area' => '',
  2717. 'desc_trans' => 'prop_formit.fiarfromname_desc',
  2718. 'area_trans' => '',
  2719. ),
  2720. 'fiarReplyTo' =>
  2721. array (
  2722. 'name' => 'fiarReplyTo',
  2723. 'desc' => 'prop_formit.fiarreplyto_desc',
  2724. 'type' => 'textfield',
  2725. 'options' => '',
  2726. 'value' => '',
  2727. 'lexicon' => 'formit:properties',
  2728. 'area' => '',
  2729. 'desc_trans' => 'prop_formit.fiarreplyto_desc',
  2730. 'area_trans' => '',
  2731. ),
  2732. 'fiarReplyToName' =>
  2733. array (
  2734. 'name' => 'fiarReplyToName',
  2735. 'desc' => 'prop_formit.fiarreplytoname_desc',
  2736. 'type' => 'textfield',
  2737. 'options' => '',
  2738. 'value' => '',
  2739. 'lexicon' => 'formit:properties',
  2740. 'area' => '',
  2741. 'desc_trans' => 'prop_formit.fiarreplytoname_desc',
  2742. 'area_trans' => '',
  2743. ),
  2744. 'fiarCC' =>
  2745. array (
  2746. 'name' => 'fiarCC',
  2747. 'desc' => 'prop_formit.fiarcc_desc',
  2748. 'type' => 'textfield',
  2749. 'options' => '',
  2750. 'value' => '',
  2751. 'lexicon' => 'formit:properties',
  2752. 'area' => '',
  2753. 'desc_trans' => 'prop_formit.fiarcc_desc',
  2754. 'area_trans' => '',
  2755. ),
  2756. 'fiarCCName' =>
  2757. array (
  2758. 'name' => 'fiarCCName',
  2759. 'desc' => 'prop_fiar.fiarccname_desc',
  2760. 'type' => 'textfield',
  2761. 'options' => '',
  2762. 'value' => '',
  2763. 'lexicon' => 'formit:properties',
  2764. 'area' => '',
  2765. 'desc_trans' => 'Optional. If `FormItAutoResponder` is set as a hook, then this must be a parallel list of comma-separated names for the email addresses specified in the `emailCC` property.',
  2766. 'area_trans' => '',
  2767. ),
  2768. 'fiarBCC' =>
  2769. array (
  2770. 'name' => 'fiarBCC',
  2771. 'desc' => 'prop_formit.fiarbcc_desc',
  2772. 'type' => 'textfield',
  2773. 'options' => '',
  2774. 'value' => '',
  2775. 'lexicon' => 'formit:properties',
  2776. 'area' => '',
  2777. 'desc_trans' => 'prop_formit.fiarbcc_desc',
  2778. 'area_trans' => '',
  2779. ),
  2780. 'fiarBCCName' =>
  2781. array (
  2782. 'name' => 'fiarBCCName',
  2783. 'desc' => 'prop_formit.fiarbccname_desc',
  2784. 'type' => 'textfield',
  2785. 'options' => '',
  2786. 'value' => '',
  2787. 'lexicon' => 'formit:properties',
  2788. 'area' => '',
  2789. 'desc_trans' => 'prop_formit.fiarbccname_desc',
  2790. 'area_trans' => '',
  2791. ),
  2792. 'fiarHtml' =>
  2793. array (
  2794. 'name' => 'fiarHtml',
  2795. 'desc' => 'prop_formit.fiarhtml_desc',
  2796. 'type' => 'combo-boolean',
  2797. 'options' => '',
  2798. 'value' => true,
  2799. 'lexicon' => 'formit:properties',
  2800. 'area' => '',
  2801. 'desc_trans' => 'prop_formit.fiarhtml_desc',
  2802. 'area_trans' => '',
  2803. ),
  2804. 'mathMinRange' =>
  2805. array (
  2806. 'name' => 'mathMinRange',
  2807. 'desc' => 'prop_formit.mathminrange_desc',
  2808. 'type' => 'textfield',
  2809. 'options' => '',
  2810. 'value' => '10',
  2811. 'lexicon' => 'formit:properties',
  2812. 'area' => '',
  2813. 'desc_trans' => 'prop_formit.mathminrange_desc',
  2814. 'area_trans' => '',
  2815. ),
  2816. 'mathMaxRange' =>
  2817. array (
  2818. 'name' => 'mathMaxRange',
  2819. 'desc' => 'prop_formit.mathmaxrange_desc',
  2820. 'type' => 'textfield',
  2821. 'options' => '',
  2822. 'value' => '100',
  2823. 'lexicon' => 'formit:properties',
  2824. 'area' => '',
  2825. 'desc_trans' => 'prop_formit.mathmaxrange_desc',
  2826. 'area_trans' => '',
  2827. ),
  2828. 'mathField' =>
  2829. array (
  2830. 'name' => 'mathField',
  2831. 'desc' => 'prop_formit.mathfield_desc',
  2832. 'type' => 'textfield',
  2833. 'options' => '',
  2834. 'value' => 'math',
  2835. 'lexicon' => 'formit:properties',
  2836. 'area' => '',
  2837. 'desc_trans' => 'prop_formit.mathfield_desc',
  2838. 'area_trans' => '',
  2839. ),
  2840. 'mathOp1Field' =>
  2841. array (
  2842. 'name' => 'mathOp1Field',
  2843. 'desc' => 'prop_formit.mathop1field_desc',
  2844. 'type' => 'textfield',
  2845. 'options' => '',
  2846. 'value' => 'op1',
  2847. 'lexicon' => 'formit:properties',
  2848. 'area' => '',
  2849. 'desc_trans' => 'prop_formit.mathop1field_desc',
  2850. 'area_trans' => '',
  2851. ),
  2852. 'mathOp2Field' =>
  2853. array (
  2854. 'name' => 'mathOp2Field',
  2855. 'desc' => 'prop_formit.mathop2field_desc',
  2856. 'type' => 'textfield',
  2857. 'options' => '',
  2858. 'value' => 'op2',
  2859. 'lexicon' => 'formit:properties',
  2860. 'area' => '',
  2861. 'desc_trans' => 'prop_formit.mathop2field_desc',
  2862. 'area_trans' => '',
  2863. ),
  2864. 'mathOperatorField' =>
  2865. array (
  2866. 'name' => 'mathOperatorField',
  2867. 'desc' => 'prop_formit.mathoperatorfield_desc',
  2868. 'type' => 'textfield',
  2869. 'options' => '',
  2870. 'value' => 'operator',
  2871. 'lexicon' => 'formit:properties',
  2872. 'area' => '',
  2873. 'desc_trans' => 'prop_formit.mathoperatorfield_desc',
  2874. 'area_trans' => '',
  2875. ),
  2876. 'saveTmpFiles' =>
  2877. array (
  2878. 'name' => 'saveTmpFiles',
  2879. 'desc' => 'prop_formit.savetmpfiles_desc',
  2880. 'type' => 'combo-boolean',
  2881. 'options' => '',
  2882. 'value' => false,
  2883. 'lexicon' => 'formit:properties',
  2884. 'area' => '',
  2885. 'desc_trans' => 'If set to 1, FormIt will store submitted files in a temporary folder.',
  2886. 'area_trans' => '',
  2887. ),
  2888. 'attachFilesToEmail' =>
  2889. array (
  2890. 'name' => 'attachFilesToEmail',
  2891. 'desc' => 'prop_formit.attachfiles_desc',
  2892. 'type' => 'combo-boolean',
  2893. 'options' => '',
  2894. 'value' => true,
  2895. 'lexicon' => 'formit:properties',
  2896. 'area' => '',
  2897. 'desc_trans' => 'If true, FormIt will add all file fields as attachments in the email.',
  2898. 'area_trans' => '',
  2899. ),
  2900. 'storeAttachments' =>
  2901. array (
  2902. 'name' => 'storeAttachments',
  2903. 'desc' => 'prop_formit.store_attachments_desc',
  2904. 'type' => 'combo-boolean',
  2905. 'options' => '',
  2906. 'value' => false,
  2907. 'lexicon' => 'formit:properties',
  2908. 'area' => '',
  2909. 'desc_trans' => 'prop_formit.store_attachments_desc',
  2910. 'area_trans' => '',
  2911. ),
  2912. ),
  2913. 'moduleguid' => '',
  2914. 'static' => false,
  2915. 'static_file' => '',
  2916. 'content' => '/**
  2917. * FormIt
  2918. *
  2919. * Copyright 2009-2012 by Shaun McCormick <shaun@modx.com>
  2920. *
  2921. * FormIt is free software; you can redistribute it and/or modify it
  2922. * under the terms of the GNU General Public License as published by the Free
  2923. * Software Foundation; either version 2 of the License, or (at your option) any
  2924. * later version.
  2925. *
  2926. * FormIt is distributed in the hope that it will be useful, but WITHOUT ANY
  2927. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  2928. * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  2929. *
  2930. * You should have received a copy of the GNU General Public License along with
  2931. * FormIt; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
  2932. * Suite 330, Boston, MA 02111-1307 USA
  2933. *
  2934. * @package formit
  2935. */
  2936. /**
  2937. * FormIt
  2938. *
  2939. * A dynamic form processing Snippet for MODx Revolution.
  2940. *
  2941. * @var modX $modx
  2942. * @var array $scriptProperties
  2943. *
  2944. * @package formit
  2945. */
  2946. $modelPath = $modx->getOption(
  2947. \'formit.core_path\',
  2948. null,
  2949. $modx->getOption(\'core_path\', null, MODX_CORE_PATH) . \'components/formit/\'
  2950. ) . \'model/formit/\';
  2951. $modx->loadClass(\'FormIt\', $modelPath, true, true);
  2952. $fi = new FormIt($modx, $scriptProperties);
  2953. $fi->initialize($modx->context->get(\'key\'));
  2954. $fi->loadRequest();
  2955. $fields = $fi->request->prepare();
  2956. return $fi->request->handle($fields);',
  2957. ),
  2958. 'policies' =>
  2959. array (
  2960. 'web' =>
  2961. array (
  2962. ),
  2963. ),
  2964. 'source' =>
  2965. array (
  2966. ),
  2967. ),
  2968. ),
  2969. 'modTemplateVar' =>
  2970. array (
  2971. 'blogit.post_main_image' =>
  2972. array (
  2973. 'fields' =>
  2974. array (
  2975. 'id' => 5,
  2976. 'source' => 0,
  2977. 'property_preprocess' => false,
  2978. 'type' => 'image',
  2979. 'name' => 'blogit.post_main_image',
  2980. 'caption' => 'Main image',
  2981. 'description' => 'Select the main image to show with this post, leave blank for no image, a re-sized verzion will be shown on the blog post overview.',
  2982. 'editor_type' => 0,
  2983. 'category' => 36,
  2984. 'locked' => false,
  2985. 'elements' => '',
  2986. 'rank' => 1,
  2987. 'display' => 'default',
  2988. 'default_text' => '',
  2989. 'properties' =>
  2990. array (
  2991. ),
  2992. 'input_properties' =>
  2993. array (
  2994. ),
  2995. 'output_properties' =>
  2996. array (
  2997. ),
  2998. 'static' => false,
  2999. 'static_file' => '',
  3000. 'content' => '',
  3001. ),
  3002. 'policies' =>
  3003. array (
  3004. 'web' =>
  3005. array (
  3006. ),
  3007. ),
  3008. 'source' =>
  3009. array (
  3010. ),
  3011. ),
  3012. 'blogit.post_main_image_alt' =>
  3013. array (
  3014. 'fields' =>
  3015. array (
  3016. 'id' => 6,
  3017. 'source' => 0,
  3018. 'property_preprocess' => false,
  3019. 'type' => 'text',
  3020. 'name' => 'blogit.post_main_image_alt',
  3021. 'caption' => 'Alt text for the main image',
  3022. 'description' => 'Fill in a description of the image (used mostly for Google).',
  3023. 'editor_type' => 0,
  3024. 'category' => 36,
  3025. 'locked' => false,
  3026. 'elements' => '',
  3027. 'rank' => 2,
  3028. 'display' => 'default',
  3029. 'default_text' => '',
  3030. 'properties' =>
  3031. array (
  3032. ),
  3033. 'input_properties' =>
  3034. array (
  3035. 'allowBlank' => 'true',
  3036. 'maxLength' => '',
  3037. 'minLength' => '',
  3038. ),
  3039. 'output_properties' =>
  3040. array (
  3041. ),
  3042. 'static' => false,
  3043. 'static_file' => '',
  3044. 'content' => '',
  3045. ),
  3046. 'policies' =>
  3047. array (
  3048. 'web' =>
  3049. array (
  3050. ),
  3051. ),
  3052. 'source' =>
  3053. array (
  3054. ),
  3055. ),
  3056. ),
  3057. ),
  3058. );