guides.pot 231 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724
  1. # SOME DESCRIPTIVE TITLE.
  2. # Copyright (C) 2013, Various
  3. # This file is distributed under the same license as the Elgg package.
  4. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
  5. #
  6. #, fuzzy
  7. msgid ""
  8. msgstr ""
  9. "Project-Id-Version: Elgg 1.12\n"
  10. "Report-Msgid-Bugs-To: \n"
  11. "POT-Creation-Date: 2016-03-06 18:02+0200\n"
  12. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  13. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  14. "Language-Team: LANGUAGE <LL@li.org>\n"
  15. "MIME-Version: 1.0\n"
  16. "Content-Type: text/plain; charset=UTF-8\n"
  17. "Content-Transfer-Encoding: 8bit\n"
  18. #: ../../guides/accessibility.rst:2
  19. msgid "Accessibility"
  20. msgstr ""
  21. #: ../../guides/accessibility.rst:4
  22. msgid "This page aims to list and document accessibility rules and best practices, to help core and plugins developpers to make Elgg the most accessible social engine framework that everyone dreams of."
  23. msgstr ""
  24. #: ../../guides/accessibility.rst:8
  25. msgid "This is an ongoing work, please contribute on `Github <https://github.com/Elgg/Elgg>`_ if you have some skills in this field!"
  26. msgstr ""
  27. #: ../../guides/accessibility.rst:11
  28. msgid "Resources + references"
  29. msgstr ""
  30. #: ../../guides/accessibility.rst:13
  31. msgid "`Official WCAG Accessibility Guidelines Overview <http://www.w3.org/WAI/WCAG20/glance/>`_"
  32. msgstr ""
  33. #: ../../guides/accessibility.rst:14
  34. msgid "`Official WCAG Accessibility Guidelines <http://www.w3.org/TR/WCAG/>`_"
  35. msgstr ""
  36. #: ../../guides/accessibility.rst:15
  37. msgid "`Resources for planning and implementing for accessibility <http://www.w3.org/WAI/managing>`_"
  38. msgstr ""
  39. #: ../../guides/accessibility.rst:16
  40. msgid "`Practical tips from the W3C for improving accessibility <http://www.w3.org/WAI/impl/improving>`_"
  41. msgstr ""
  42. #: ../../guides/accessibility.rst:17
  43. msgid "`Preliminary review of websites for accessibility <http://www.w3.org/WAI/eval/preliminary.html>`_"
  44. msgstr ""
  45. #: ../../guides/accessibility.rst:18
  46. msgid "`Tools for checking the accessibility of websites <http://www.w3.org/WAI/ER/tools/>`_"
  47. msgstr ""
  48. #: ../../guides/accessibility.rst:19
  49. msgid "`List of practical techniques for implementing accessibility <http://www.w3.org/TR/WCAG20-TECHS/Overview.html#contents>`_ (It would be great if someone could go through this and filter out all the ones that are relevant to Elgg)"
  50. msgstr ""
  51. #: ../../guides/accessibility.rst:22
  52. msgid "Tips for implementing accessibility"
  53. msgstr ""
  54. #: ../../guides/accessibility.rst:24
  55. msgid "All accessibility-related tickets reported to trac should be tagged with \"a11y\", short for \"accessibility\""
  56. msgstr ""
  57. #: ../../guides/accessibility.rst:25
  58. msgid "Use core views such as ``output/*``, and ``input/*`` to generate markup, since we can bake a11y concerns into these views"
  59. msgstr ""
  60. #: ../../guides/accessibility.rst:26
  61. msgid "All images should have a descriptive ``alt`` attribute. Spacer or purely decorative graphics should have blank ``alt`` attributes"
  62. msgstr ""
  63. #: ../../guides/accessibility.rst:27
  64. msgid "All ``<a>`` tags should have text or an accessible image inside. Otherwise screen readers will have to read the URL, which is a poor experience ``<a>`` tags should contain descriptive text, if possible, as opposed to generic text like \"Click here\""
  65. msgstr ""
  66. #: ../../guides/accessibility.rst:28
  67. msgid "Markup should be valid"
  68. msgstr ""
  69. #: ../../guides/accessibility.rst:29
  70. msgid "Themes should not reset \"outline\" to nothing. ``:focus`` deserves a special visual treatment so that handicapped users can know where they are"
  71. msgstr ""
  72. #: ../../guides/accessibility.rst:32
  73. msgid "Tips for testing accessibility"
  74. msgstr ""
  75. #: ../../guides/accessibility.rst:34
  76. msgid "Use the tools linked to from the resources section. `Example report for community.elgg.org on June 16, 2012 <http://try.powermapper.com/Reports/a6276098-0883-4d04-849e-8c05999812f2/report/map.htm>`_"
  77. msgstr ""
  78. #: ../../guides/accessibility.rst:35
  79. msgid "Try different font-size/zoom settings in your browser and make sure the theme remains usable"
  80. msgstr ""
  81. #: ../../guides/accessibility.rst:36
  82. msgid "Turn off css to make sure the sequential order of the page makes sense"
  83. msgstr ""
  84. #: ../../guides/accessibility.rst:39
  85. msgid "Documentation objectives and principles"
  86. msgstr ""
  87. #: ../../guides/accessibility.rst:41
  88. msgid "Main accessibility rules"
  89. msgstr ""
  90. #: ../../guides/accessibility.rst:42
  91. msgid "collect and document best practices"
  92. msgstr ""
  93. #: ../../guides/accessibility.rst:43
  94. msgid "Provide code examples"
  95. msgstr ""
  96. #: ../../guides/accessibility.rst:44
  97. msgid "Keep the document simple and usable"
  98. msgstr ""
  99. #: ../../guides/accessibility.rst:45
  100. msgid "Make it usable for both beginner developpers and experts (from most common and easiest changes to elaborate techniques)"
  101. msgstr ""
  102. #: ../../guides/actions.rst:2
  103. msgid "Forms + Actions"
  104. msgstr ""
  105. #: ../../guides/actions.rst:4
  106. msgid "Create, update, or delete content."
  107. msgstr ""
  108. #: ../../guides/actions.rst:6
  109. msgid "Elgg forms submit to actions. Actions define the behavior for form submission."
  110. msgstr ""
  111. #: ../../guides/actions.rst:8
  112. msgid "This guide assumes basic familiarity with:"
  113. msgstr ""
  114. #: ../../guides/actions.rst:10
  115. #: ../../guides/themes.rst:9
  116. msgid ":doc:`/admin/plugins`"
  117. msgstr ""
  118. #: ../../guides/actions.rst:11
  119. #: ../../guides/themes.rst:10
  120. msgid ":doc:`views`"
  121. msgstr ""
  122. #: ../../guides/actions.rst:12
  123. msgid ":doc:`i18n`"
  124. msgstr ""
  125. #: ../../guides/actions.rst:0
  126. #: ../../guides/database.rst:0
  127. #: ../../guides/events-list.rst:0
  128. #: ../../guides/guidelines.rst:0
  129. #: ../../guides/hooks-list.rst:0
  130. #: ../../guides/javascript.rst:0
  131. #: ../../guides/menus.rst:0
  132. #: ../../guides/notifications.rst:0
  133. #: ../../guides/plugins/dependencies.rst:0
  134. #: ../../guides/themes.rst:0
  135. #: ../../guides/upgrading.rst:0
  136. #: ../../guides/views.rst:0
  137. #: ../../guides/web-services.rst:0
  138. #: ../../guides/widgets.rst:0
  139. msgid "Contents"
  140. msgstr ""
  141. #: ../../guides/actions.rst:19
  142. msgid "Registering actions"
  143. msgstr ""
  144. #: ../../guides/actions.rst:21
  145. msgid "Actions must be registered before use. Use ``elgg_register_action`` for this:"
  146. msgstr ""
  147. #: ../../guides/actions.rst:27
  148. msgid "The ``mod/example/actions/example.php`` script will now be run whenever a form is submitted to ``http://localhost/elgg/action/example``."
  149. msgstr ""
  150. #: ../../guides/actions.rst:29
  151. msgid "A stumbling point for many new developers is the URL for actions. The URL always uses ``/action/`` (singular) and never ``/actions/`` (plural). However, action script files are usually saved under the directory ``/actions/`` (plural) and always have an extension."
  152. msgstr ""
  153. #: ../../guides/actions.rst:33
  154. msgid "Permissions"
  155. msgstr ""
  156. #: ../../guides/actions.rst:34
  157. msgid "By default, actions are only available to logged in users."
  158. msgstr ""
  159. #: ../../guides/actions.rst:36
  160. msgid "To make an action available to logged out users, pass ``\"public\"`` as the third parameter:"
  161. msgstr ""
  162. #: ../../guides/actions.rst:42
  163. msgid "To restrict an action to only administrators, pass ``\"admin\"`` for the last parameter:"
  164. msgstr ""
  165. #: ../../guides/actions.rst:50
  166. msgid "Writing action files"
  167. msgstr ""
  168. #: ../../guides/actions.rst:52
  169. msgid "Use the ``get_input`` function to get access to request parameters:"
  170. msgstr ""
  171. #: ../../guides/actions.rst:58
  172. msgid "You can then use the :doc:`database` api to load entities and perform actions on them accordingly."
  173. msgstr ""
  174. #: ../../guides/actions.rst:60
  175. msgid "To redirect the page once you've completed your actions, use the ``forward`` function:"
  176. msgstr ""
  177. #: ../../guides/actions.rst:66
  178. msgid "For example, to forward to the user's profile:"
  179. msgstr ""
  180. #: ../../guides/actions.rst:73
  181. msgid "URLs can be relative to the Elgg root:"
  182. msgstr ""
  183. #: ../../guides/actions.rst:80
  184. msgid "Redirect to the referring page by using the ``REFERRER`` constant:"
  185. msgstr ""
  186. #: ../../guides/actions.rst:87
  187. msgid "Give feedback to the user about the status of the action by using ``system_message`` for positive feedback or ``register_error`` for warnings and errors:"
  188. msgstr ""
  189. #: ../../guides/actions.rst:100
  190. msgid "Customizing actions"
  191. msgstr ""
  192. #: ../../guides/actions.rst:102
  193. msgid "Before executing any action, Elgg triggers a hook:"
  194. msgstr ""
  195. #: ../../guides/actions.rst:108
  196. msgid "Where ``$action`` is the action being called. If the hook returns ``false`` then the action will not be executed."
  197. msgstr ""
  198. #: ../../guides/actions.rst:111
  199. msgid "Example: Captcha"
  200. msgstr ""
  201. #: ../../guides/actions.rst:113
  202. msgid "The captcha module uses this to intercept the ``register`` and ``user/requestnewpassword`` actions and redirect them to a function which checks the captcha code. This check returns ``true`` if valid or ``false`` if not (which prevents the associated action from executing)."
  203. msgstr ""
  204. #: ../../guides/actions.rst:115
  205. msgid "This is done as follows:"
  206. msgstr ""
  207. #: ../../guides/actions.rst:137
  208. msgid "This lets a plugin extend an existing action without the need to replace the whole action. In the case of the captcha plugin it allows the plugin to provide captcha support in a very loosely coupled way."
  209. msgstr ""
  210. #: ../../guides/actions.rst:140
  211. msgid "To output a form, use the elgg_view_form function like so:"
  212. msgstr ""
  213. #: ../../guides/actions.rst:146
  214. msgid "Doing this generates something like the following markup:"
  215. msgstr ""
  216. #: ../../guides/actions.rst:157
  217. msgid "Elgg does some things automatically for you when you generate forms this way:"
  218. msgstr ""
  219. #: ../../guides/actions.rst:159
  220. msgid "It sets the action to the appropriate URL based on the name of the action you pass to it"
  221. msgstr ""
  222. #: ../../guides/actions.rst:160
  223. msgid "It adds some anti-csrf tokens (``__elgg_ts`` and ``__elgg_token``) to help keep your actions secure"
  224. msgstr ""
  225. #: ../../guides/actions.rst:161
  226. msgid "It automatically looks for the body of the form in the ``forms/example`` view."
  227. msgstr ""
  228. #: ../../guides/actions.rst:163
  229. msgid "Put the content of your form in your plugin’s ``forms/example`` view:"
  230. msgstr ""
  231. #: ../../guides/actions.rst:171
  232. msgid "Now when you call ``elgg_view_form('example')``, Elgg will produce:"
  233. msgstr ""
  234. #: ../../guides/actions.rst:186
  235. msgid "Files and images"
  236. msgstr ""
  237. #: ../../guides/actions.rst:188
  238. msgid "Use the input/file view in your form’s content view."
  239. msgstr ""
  240. #: ../../guides/actions.rst:195
  241. msgid "Set the enctype of the form to multipart/form-data:"
  242. msgstr ""
  243. #: ../../guides/actions.rst:203
  244. msgid "In your action file, use the ``$_FILES`` global to access the uploaded file:"
  245. msgstr ""
  246. #: ../../guides/actions.rst:210
  247. msgid "Sticky forms"
  248. msgstr ""
  249. #: ../../guides/actions.rst:212
  250. msgid "Sticky forms are forms that retain user input if saving fails. They are \"sticky\" because the user's data \"sticks\" in the form after submitting, though it was never saved to the database. This greatly improves the user experience by minimizing data loss. Elgg 1.8 includes helper functions so you can make any form sticky."
  251. msgstr ""
  252. #: ../../guides/actions.rst:215
  253. #: ../../guides/helpers.rst:2
  254. msgid "Helper functions"
  255. msgstr ""
  256. #: ../../guides/actions.rst:217
  257. msgid "Sticky forms are implemented in Elgg 1.8 by the following functions:"
  258. msgstr ""
  259. #: ../../guides/actions.rst:219
  260. msgid "``elgg_make_sticky_form($name)`` Tells the engine to make all input on a form sticky."
  261. msgstr ""
  262. #: ../../guides/actions.rst:222
  263. msgid "``elgg_clear_sticky_form($name)`` Tells the engine to discard all sticky input on a form."
  264. msgstr ""
  265. #: ../../guides/actions.rst:225
  266. msgid "``elgg_is_sticky_form($name)`` Checks if $name is a valid sticky form."
  267. msgstr ""
  268. #: ../../guides/actions.rst:228
  269. msgid "``elgg_get_sticky_values($name)`` Returns all sticky values saved for $name by elgg_make_sticky_form()."
  270. msgstr ""
  271. #: ../../guides/actions.rst:232
  272. #: ../../guides/i18n.rst:9
  273. #: ../../guides/plugins/dependencies.rst:11
  274. msgid "Overview"
  275. msgstr ""
  276. #: ../../guides/actions.rst:234
  277. msgid "The basic flow of using sticky forms is: Call ``elgg_make_sticky_form($name)`` at the top of actions for forms you want to be sticky. Use ``elgg_is_sticky_form($name)`` and ``elgg_get_sticky_values($name)`` to get sticky values when rendering a form view. Call ``elgg_clear_sticky_form($name)`` after the action has completed successfully or after data has been loaded by ``elgg_get_sticky_values($name)``."
  278. msgstr ""
  279. #: ../../guides/actions.rst:240
  280. msgid "Example: User registration"
  281. msgstr ""
  282. #: ../../guides/actions.rst:242
  283. msgid "Simple sticky forms require little logic to determine the input values for the form. This logic is placed at the top of the form body view itself."
  284. msgstr ""
  285. #: ../../guides/actions.rst:244
  286. msgid "The registration form view first sets default values for inputs, then checks if there are sticky values. If so, it loads the sticky values before clearing the sticky form:"
  287. msgstr ""
  288. #: ../../guides/actions.rst:259
  289. msgid "The registration action sets creates the sticky form and clears it once the action is completed:"
  290. msgstr ""
  291. #: ../../guides/actions.rst:276
  292. msgid "Example: Bookmarks"
  293. msgstr ""
  294. #: ../../guides/actions.rst:278
  295. msgid "The bundled plugin Bookmarks' save form and action is an example of a complex sticky form."
  296. msgstr ""
  297. #: ../../guides/actions.rst:280
  298. msgid "The form view for the save bookmark action uses ``elgg_extract()`` to pull values from the ``$vars`` array:"
  299. msgstr ""
  300. #: ../../guides/actions.rst:294
  301. msgid "The page handler scripts prepares the form variables and calls ``elgg_view_form()`` passing the correct values:"
  302. msgstr ""
  303. #: ../../guides/actions.rst:302
  304. msgid "Similarly, ``mod/bookmarks/pages/edit.php`` uses the same function, but passes the entity that is being edited as an argument:"
  305. msgstr ""
  306. #: ../../guides/actions.rst:314
  307. msgid "The library file defines ``bookmarks_prepare_form_vars()``. This function accepts an ``ElggEntity`` as an argument and does 3 things:"
  308. msgstr ""
  309. #: ../../guides/actions.rst:316
  310. msgid "Defines the input names and default values for form inputs."
  311. msgstr ""
  312. #: ../../guides/actions.rst:317
  313. msgid "Extracts the values from a bookmark object if it's passed."
  314. msgstr ""
  315. #: ../../guides/actions.rst:318
  316. msgid "Extracts the values from a sticky form if it exists."
  317. msgstr ""
  318. #: ../../guides/actions.rst:320
  319. msgid "TODO: Include directly from lib/bookmarks.php"
  320. msgstr ""
  321. #: ../../guides/actions.rst:359
  322. msgid "The save action checks the input, then clears the sticky form upon success:"
  323. msgstr ""
  324. #: ../../guides/actions.rst:373
  325. #: ../../guides/ajax.rst:2
  326. msgid "Ajax"
  327. msgstr ""
  328. #: ../../guides/actions.rst:375
  329. msgid "See the :doc:`Ajax guide</guides/ajax>` for instructions on calling actions from JavaScript."
  330. msgstr ""
  331. #: ../../guides/actions.rst:378
  332. #: ../../guides/web-services.rst:27
  333. msgid "Security"
  334. msgstr ""
  335. #: ../../guides/actions.rst:379
  336. msgid "For enhanced security, all actions require an CSRF token. Calls to action URLs that do not include security tokens will be ignored and a warning will be generated."
  337. msgstr ""
  338. #: ../../guides/actions.rst:381
  339. msgid "A few views and functions automatically generate security tokens:"
  340. msgstr ""
  341. #: ../../guides/actions.rst:389
  342. msgid "In rare cases, you may need to generate tokens manually:"
  343. msgstr ""
  344. #: ../../guides/actions.rst:396
  345. msgid "You can also access the tokens from javascript:"
  346. msgstr ""
  347. #: ../../guides/actions.rst:403
  348. msgid "These are refreshed periodically so should always be up-to-date."
  349. msgstr ""
  350. #: ../../guides/actions.rst:407
  351. msgid "Security Tokens"
  352. msgstr ""
  353. #: ../../guides/actions.rst:408
  354. msgid "On occasion we need to pass data through an untrusted party or generate an \"unguessable token\" based on some data. The industry-standard `HMAC <http://security.stackexchange.com/a/20301/4982>`_ algorithm is the right tool for this. It allows us to verify that received data were generated by our site, and were not tampered with. Note that even strong hash functions like SHA-2 should *not* be used without HMAC for these tasks."
  355. msgstr ""
  356. #: ../../guides/actions.rst:413
  357. msgid "Elgg provides ``elgg_build_hmac()`` to generate and validate HMAC message authentication codes that are unguessable without the site's private key."
  358. msgstr ""
  359. #: ../../guides/actions.rst:438
  360. msgid "Note: If you use a non-string as HMAC data, you must use types consistently. Consider the following:"
  361. msgstr ""
  362. #: ../../guides/ajax.rst:5
  363. #: ../../guides/guidelines.rst:81
  364. #: ../../guides/plugins/plugin-skeleton.rst:82
  365. msgid "Actions"
  366. msgstr ""
  367. #: ../../guides/ajax.rst:7
  368. msgid "From JavaScript we can execute actions via XHR POST operations. Here's an example action and script for some basic math:"
  369. msgstr ""
  370. #: ../../guides/ajax.rst:45
  371. msgid "Basically what happens here:"
  372. msgstr ""
  373. #: ../../guides/ajax.rst:47
  374. msgid "CSRF tokens are added to the data."
  375. msgstr ""
  376. #: ../../guides/ajax.rst:48
  377. msgid "The data is posted via XHR to http://localhost/elgg/action/example/add."
  378. msgstr ""
  379. #: ../../guides/ajax.rst:49
  380. msgid "The action makes sure this is an XHR request, and returns a JSON string."
  381. msgstr ""
  382. #: ../../guides/ajax.rst:50
  383. msgid "Once the action completes, Elgg builds a JSON response wrapper containing the echoed output."
  384. msgstr ""
  385. #: ../../guides/ajax.rst:51
  386. msgid "Client-side Elgg extracts and displays the system message \"We did it!\" from the wrapper."
  387. msgstr ""
  388. #: ../../guides/ajax.rst:52
  389. msgid "The ``success`` function receives the full wrapper object and validates the ``output`` key."
  390. msgstr ""
  391. #: ../../guides/ajax.rst:53
  392. msgid "The browser alerts \"3\" then \"2\"."
  393. msgstr ""
  394. #: ../../guides/ajax.rst:56
  395. msgid "elgg.action notes"
  396. msgstr ""
  397. #: ../../guides/ajax.rst:58
  398. msgid "It's best to echo a non-empty string, as this is easy to validate in the ``success`` function. If the action was not allowed to run for some reason, ``wrapper.output`` will be an empty string."
  399. msgstr ""
  400. #: ../../guides/ajax.rst:60
  401. msgid "You may want to use the :doc:`elgg/spinner</guides/javascript>` module."
  402. msgstr ""
  403. #: ../../guides/ajax.rst:61
  404. msgid "Elgg does not use ``wrapper.status`` for anything, but a call to ``register_error()`` causes it to be set to ``-1``."
  405. msgstr ""
  406. #: ../../guides/ajax.rst:63
  407. msgid "If the action echoes a non-JSON string, ``wrapper.output`` will contain that string."
  408. msgstr ""
  409. #: ../../guides/ajax.rst:64
  410. msgid "``elgg.action`` is based on ``jQuery.ajax`` and returns a ``jqXHR`` object (like a Promise), if you should want to use it."
  411. msgstr ""
  412. #: ../../guides/ajax.rst:65
  413. msgid "After the PHP action completes, other plugins can alter the wrapper via the plugin hook ``'output', 'ajax'``, which filters the wrapper as an array (not a JSON string)."
  414. msgstr ""
  415. #: ../../guides/ajax.rst:67
  416. msgid "A ``forward()`` call forces the action to be processed and output immediately, with the ``wrapper.forward_url`` value set to the normalized location given."
  417. msgstr ""
  418. #: ../../guides/ajax.rst:69
  419. msgid "To make sure Ajax actions can only be executed via XHR, check ``elgg_is_xhr()`` first."
  420. msgstr ""
  421. #: ../../guides/ajax.rst:72
  422. msgid "The action JSON response wrapper"
  423. msgstr ""
  424. #: ../../guides/ajax.rst:86
  425. msgid "It's probably best to rely only on the ``output`` key, and validate it in case the PHP action could not run for some reason, e.g. the user was logged out or a CSRF attack did not provide tokens."
  426. msgstr ""
  427. #: ../../guides/ajax.rst:90
  428. msgid "Fetching Views"
  429. msgstr ""
  430. #: ../../guides/ajax.rst:92
  431. msgid "A plugin can use a view script to handle XHR GET requests. Here's a simple example of a view that returns a link to an object given by its GUID:"
  432. msgstr ""
  433. #: ../../guides/ajax.rst:128
  434. msgid "The Ajax view system works significantly differently than the action system."
  435. msgstr ""
  436. #: ../../guides/ajax.rst:130
  437. msgid "There are no access controls based on session status."
  438. msgstr ""
  439. #: ../../guides/ajax.rst:131
  440. msgid "Non-XHR requests are automatically rejected."
  441. msgstr ""
  442. #: ../../guides/ajax.rst:132
  443. msgid "GET vars are injected into ``$vars`` in the view."
  444. msgstr ""
  445. #: ../../guides/ajax.rst:133
  446. msgid "If the request contains ``$_GET['guid']``, the system sets ``$vars['entity']`` to the corresponding entity or ``false`` if it can't be loaded."
  447. msgstr ""
  448. #: ../../guides/ajax.rst:135
  449. msgid "There's no \"wrapper\" object placed around the view output."
  450. msgstr ""
  451. #: ../../guides/ajax.rst:136
  452. msgid "System messages/errors shouldn't be used, as they don't display until the user loads another page."
  453. msgstr ""
  454. #: ../../guides/ajax.rst:137
  455. msgid "If the view name begins with ``js/`` or ``css/``, a corresponding Content-Type header is added."
  456. msgstr ""
  457. #: ../../guides/ajax.rst:141
  458. msgid "Unlike views rendered server-side, Ajax views must treat ``$vars`` as completely untrusted user data."
  459. msgstr ""
  460. #: ../../guides/ajax.rst:144
  461. msgid "Returning JSON from a view"
  462. msgstr ""
  463. #: ../../guides/ajax.rst:146
  464. msgid "If the view outputs encoded JSON, you must use ``elgg.getJSON`` to fetch it (or use some other method to set jQuery's ajax option ``dataType`` to ``json``). Your ``success`` function will be passed the decoded Object."
  465. msgstr ""
  466. #: ../../guides/ajax.rst:149
  467. msgid "Here's an example of fetching a view that returns a JSON-encoded array of times:"
  468. msgstr ""
  469. #: ../../guides/ajax.rst:160
  470. msgid "Fetching Forms"
  471. msgstr ""
  472. #: ../../guides/ajax.rst:162
  473. msgid "If you register a form view (name starting with ``forms/``), you can fetch it pre-rendered with ``elgg_view_form()``. Simply use ``ajax/form/<action>`` (instead of ``ajax/view/<view_name>``):"
  474. msgstr ""
  475. #: ../../guides/ajax.rst:184
  476. msgid "Unlike views rendered server-side, Ajax views must treat ``$vars`` as completely untrusted user data. Review the use of ``$vars`` in an existing form before registering it for Ajax fetching."
  477. msgstr ""
  478. #: ../../guides/ajax.rst:188
  479. msgid "Ajax helper functions"
  480. msgstr ""
  481. #: ../../guides/ajax.rst:190
  482. msgid "These functions extend jQuery's native Ajax features."
  483. msgstr ""
  484. #: ../../guides/ajax.rst:192
  485. msgid "``elgg.get()`` is a wrapper for jQuery's ``$.ajax()``, but forces GET and does URL normalization."
  486. msgstr ""
  487. #: ../../guides/ajax.rst:203
  488. msgid "``elgg.post()`` is a wrapper for jQuery's ``$.ajax()``, but forces POST and does URL normalization."
  489. msgstr ""
  490. #: ../../guides/authentication.rst:2
  491. msgid "Authentication"
  492. msgstr ""
  493. #: ../../guides/authentication.rst:4
  494. msgid "Elgg provides everything needed to authenticate users via username/email and password out of the box, including:"
  495. msgstr ""
  496. #: ../../guides/authentication.rst:7
  497. msgid "remember-me cookies for persistent login"
  498. msgstr ""
  499. #: ../../guides/authentication.rst:8
  500. msgid "password reset logic"
  501. msgstr ""
  502. #: ../../guides/authentication.rst:9
  503. msgid "secure storage of passwords"
  504. msgstr ""
  505. #: ../../guides/authentication.rst:10
  506. msgid "logout"
  507. msgstr ""
  508. #: ../../guides/authentication.rst:11
  509. msgid "UIs for accomplishing all of the above"
  510. msgstr ""
  511. #: ../../guides/authentication.rst:13
  512. msgid "All that's left for you to do as a developer is to use the built-in authentication functions to secure your pages and actions."
  513. msgstr ""
  514. #: ../../guides/authentication.rst:17
  515. msgid "Working with the logged in user"
  516. msgstr ""
  517. #: ../../guides/authentication.rst:19
  518. msgid "Check whether the current user is logged in with ``elgg_is_logged_in()``:"
  519. msgstr ""
  520. #: ../../guides/authentication.rst:27
  521. msgid "Check if the current user is an admin with ``elgg_is_admin_logged_in()``:"
  522. msgstr ""
  523. #: ../../guides/authentication.rst:35
  524. msgid "Get the currently logged in user with ``elgg_get_logged_in_user_entity()``:"
  525. msgstr ""
  526. #: ../../guides/authentication.rst:41
  527. msgid "The returned object is an ``ElggUser`` so you can use all the methods and properties of that class to access information about the user. If the user is not logged in, this will return ``null``, so be sure to check for that first."
  528. msgstr ""
  529. #: ../../guides/authentication.rst:46
  530. msgid "Gatekeepers"
  531. msgstr ""
  532. #: ../../guides/authentication.rst:48
  533. msgid "Gatekeeper functions allow you to manage how code gets executed by applying access control rules."
  534. msgstr ""
  535. #: ../../guides/authentication.rst:50
  536. msgid "Forward a user to the front page if they are not logged in with ``elgg_gatekeeper()``:"
  537. msgstr ""
  538. #: ../../guides/authentication.rst:60
  539. msgid "In Elgg 1.8 and below this function was called ``gatekeeper()``"
  540. msgstr ""
  541. #: ../../guides/authentication.rst:62
  542. msgid "Forward a user to the front page unless they are an admin with ``elgg_admin_gatekeeper()``:"
  543. msgstr ""
  544. #: ../../guides/authentication.rst:72
  545. msgid "In Elgg 1.8 and below this function was called ``admin_gatekeeper()``"
  546. msgstr ""
  547. #: ../../guides/authentication.rst:75
  548. msgid "Prevent CSRF attacks with ``action_gatekeeper()``."
  549. msgstr ""
  550. #: ../../guides/authentication.rst:83
  551. msgid "This function should be used in :doc:`actions` prior to Elgg 1.8."
  552. msgstr ""
  553. #: ../../guides/authentication.rst:87
  554. msgid "As of Elgg version 1.8 this function is called for all registered actions. There is no longer a need to call this function in your own actions. If you wish to protect other pages with action tokens then you can call this function."
  555. msgstr ""
  556. #: ../../guides/authentication.rst:94
  557. msgid "Pluggable Authentication Modules"
  558. msgstr ""
  559. #: ../../guides/authentication.rst:96
  560. msgid "Elgg has support for pluggable authentication modules (PAM), which enables you to write your own authentication handlers. Whenever a request needs to get authenticated the system will call ``elgg_authenticate()`` which probes the registered PAM handlers until one returns success."
  561. msgstr ""
  562. #: ../../guides/authentication.rst:98
  563. msgid "The preferred approach is to create a separate Elgg plugin which will have one simple task: to process an authentication request. This involves setting up an authentication handler in the plugin's :doc:`start.php <plugins>` file, and to register it with the PAM module so it will get processed whenever the system needs to authenticate a request."
  564. msgstr ""
  565. #: ../../guides/authentication.rst:100
  566. msgid "The authentication handler is a function and takes a single parameter. Registering the handler is being done by ``register_pam_handler()`` which takes the name of the authentication handler, the importance and the policy as parameters. It is advised to register the handler in the plugin's init function, for example:"
  567. msgstr ""
  568. #: ../../guides/authentication.rst:117
  569. msgid "Importance"
  570. msgstr ""
  571. #: ../../guides/authentication.rst:119
  572. msgid "By default an authentication module is registered with an importance of **sufficient**."
  573. msgstr ""
  574. #: ../../guides/authentication.rst:121
  575. msgid "In a list of authentication modules; if any one marked *sufficient* returns ``true``, ``pam_authenticate()`` will also return ``true``. The exception to this is when an authentication module is registered with an importance of **required**. All required modules must return ``true`` for ``pam_authenticate()`` to return ``true``, regardless of whether all sufficient modules return ``true``."
  576. msgstr ""
  577. #: ../../guides/authentication.rst:124
  578. msgid "Passed credentials"
  579. msgstr ""
  580. #: ../../guides/authentication.rst:126
  581. msgid "The format of the credentials passed to the handler can vary, depending on the originating request. For example, a regular login via the login form will create a named array, with the keys ``username`` and ``password``. If a request was made for example via XML-RPC then the credentials will be set in the HTTP header, so in this case nothing will get passed to the authentication handler and the handler will need to perform steps on its own to authenticate the request."
  582. msgstr ""
  583. #: ../../guides/authentication.rst:129
  584. msgid "Return value"
  585. msgstr ""
  586. #: ../../guides/authentication.rst:131
  587. msgid "The authentication handle should return a ``boolean``, indicating if the request could be authenticated or not. One caveat is that in case of a regular user login where credentials are available as username and password the user will get logged in. In case of the XML-RPC example the authentication handler will need to perform this step itself since the rest of the system will not have any idea of either possible formats of credentials passed nor its contents. Logging in a user is quite simple and is being done by ``login()``, which expects an ``ElggUser`` object."
  588. msgstr ""
  589. #: ../../guides/context.rst:2
  590. msgid "Context"
  591. msgstr ""
  592. #: ../../guides/context.rst:4
  593. msgid "Within the Elgg framework, context can be used to by your plugin's functions to determine if they should run or not. You will be registering callbacks to be executed when particular :doc:`events are triggered <events-list>`. Sometimes the events are generic and you only want to run your callback when your plugin caused the event to be triggered. In that case, you can use the page's context."
  594. msgstr ""
  595. #: ../../guides/context.rst:6
  596. msgid "You can explicitly set the context with ``set_context()``. The context is a string and typically you set it to the name of your plugin. You can retrieve the context with the function ``get_context()``. It's however better to use ``elgg_push_context($string)`` to add a context to the stack. You can check if the context you want in in the current stack by calling ``elgg_in_context($context)``. Don't forget to pop (with ``elgg_pop_context()``) the context after you push one and don't need it anymore."
  597. msgstr ""
  598. #: ../../guides/context.rst:9
  599. msgid "If you don't set it, Elgg tries to guess the context. If the page was called through the page handler, the context is set to the name of the handler which was set in ``elgg_register_page_handler()``. If the page wasn't called through the page handler, it uses the name of your plugin directory. If it cannot determine that, it returns main as the default context."
  600. msgstr ""
  601. #: ../../guides/context.rst:11
  602. msgid "Sometimes a view will return different HTML depending on the context. A plugin can take advantage of that by setting the context before calling ``elgg_view()`` on the view and then setting the context back. This is frequently done with the search context."
  603. msgstr ""
  604. #: ../../guides/database.rst:2
  605. msgid "Database"
  606. msgstr ""
  607. #: ../../guides/database.rst:4
  608. msgid "Persist user-generated content and settings with Elgg's generic storage API."
  609. msgstr ""
  610. #: ../../guides/database.rst:11
  611. msgid "Entities"
  612. msgstr ""
  613. #: ../../guides/database.rst:14
  614. msgid "Creating an object"
  615. msgstr ""
  616. #: ../../guides/database.rst:16
  617. msgid "To create an object in your code, you need to instantiate an ``ElggObject``. Setting data is simply a matter of adding instance variables or properties. The built-in properties are:"
  618. msgstr ""
  619. #: ../../guides/database.rst:20
  620. msgid "**``guid``** The entity's GUID; set automatically"
  621. msgstr ""
  622. #: ../../guides/database.rst:21
  623. msgid "**``owner_guid``** The owning user's GUID"
  624. msgstr ""
  625. #: ../../guides/database.rst:22
  626. msgid "**``site_guid``** The owning site's GUID. This is set automatically when an instance of ``ElggObject`` gets created)"
  627. msgstr ""
  628. #: ../../guides/database.rst:24
  629. msgid "**``subtype``** A single-word arbitrary string that defines what kind of object it is, for example ``blog``"
  630. msgstr ""
  631. #: ../../guides/database.rst:26
  632. msgid "**``access_id``** An integer representing the access level of the object"
  633. msgstr ""
  634. #: ../../guides/database.rst:28
  635. msgid "**``title``** The title of the object"
  636. msgstr ""
  637. #: ../../guides/database.rst:29
  638. msgid "**``description``** The description of the object"
  639. msgstr ""
  640. #: ../../guides/database.rst:31
  641. msgid "The object subtype is a special property. This is an arbitrary string that describes what the object is. For example, if you were writing a blog plugin, your subtype string might be *blog*. It's a good idea to make this unique, so that other plugins don't accidentally try and use the same subtype. For the purposes of this document, let's assume we're building a simple forum. Therefore, the subtype will be *forum*:"
  642. msgstr ""
  643. #: ../../guides/database.rst:45
  644. msgid "``access_id`` is another important property. If you don't set this, your object will be private, and only the creator user will be able to see it. Elgg defines constants for the special values of ``access_id``:"
  645. msgstr ""
  646. #: ../../guides/database.rst:49
  647. msgid "**ACCESS_PRIVATE** Only the owner can see it"
  648. msgstr ""
  649. #: ../../guides/database.rst:50
  650. msgid "**ACCESS_FRIENDS** Only the owner and his/her friends can see it"
  651. msgstr ""
  652. #: ../../guides/database.rst:51
  653. msgid "**ACCESS_LOGGED_IN** Any logged in user can see it"
  654. msgstr ""
  655. #: ../../guides/database.rst:52
  656. msgid "**ACCESS_PUBLIC** Even visitors not logged in can see it"
  657. msgstr ""
  658. #: ../../guides/database.rst:54
  659. msgid "Saving the object will automatically populate the ``$object->guid`` property if successful. If you change any more base properties, you can call ``$object->save()`` again, and it will update the database for you."
  660. msgstr ""
  661. #: ../../guides/database.rst:58
  662. msgid "You can set metadata on an object just like a standard property. Let's say we want to set the SKU of a product:"
  663. msgstr ""
  664. #: ../../guides/database.rst:65
  665. msgid "If you assign an array, all the values will be set for that metadata. This is how, for example, you set tags."
  666. msgstr ""
  667. #: ../../guides/database.rst:68
  668. msgid "Metadata cannot be persisted to the database until the entity has been saved, but for convenience, ElggEntity can cache it internally and save it when saving the entity."
  669. msgstr ""
  670. #: ../../guides/database.rst:73
  671. msgid "Loading an object"
  672. msgstr ""
  673. #: ../../guides/database.rst:76
  674. msgid "By GUID"
  675. msgstr ""
  676. #: ../../guides/database.rst:85
  677. msgid "But what if you don't know the GUID? There are several options."
  678. msgstr ""
  679. #: ../../guides/database.rst:88
  680. msgid "By user, subtype or site"
  681. msgstr ""
  682. #: ../../guides/database.rst:90
  683. msgid "If you know the user ID you want to get objects for, or the subtype, or the site, you have several options. The easiest is probably to call the procedural function ``elgg_get_entities``:"
  684. msgstr ""
  685. #: ../../guides/database.rst:102
  686. msgid "This will return an array of ``ElggEntity`` objects that you can iterate through. ``elgg_get_entities`` paginates by default, with a limit of 10; and offset 0."
  687. msgstr ""
  688. #: ../../guides/database.rst:106
  689. msgid "You can leave out ``owner_guid`` to get all objects and leave out subtype or type to get objects of all types/subtypes."
  690. msgstr ""
  691. #: ../../guides/database.rst:109
  692. msgid "If you already have an ``ElggUser`` – e.g. ``elgg_get_logged_in_user_entity``, which always has the current user's object when you're logged in – you can simply use:"
  693. msgstr ""
  694. #: ../../guides/database.rst:117
  695. msgid "But what about getting objects with a particular piece of metadata?"
  696. msgstr ""
  697. #: ../../guides/database.rst:120
  698. msgid "By metadata"
  699. msgstr ""
  700. #: ../../guides/database.rst:122
  701. msgid "The function ``elgg_get_entities_from_metadata`` allows fetching entities with metadata in a variety of ways."
  702. msgstr ""
  703. #: ../../guides/database.rst:126
  704. msgid "By annotation"
  705. msgstr ""
  706. #: ../../guides/database.rst:128
  707. msgid "The function ``elgg_get_entities_from_annotations`` allows fetching entities with metadata in a variety of ways."
  708. msgstr ""
  709. #: ../../guides/database.rst:133
  710. msgid "As of Elgg 1.10 the default behaviour of `elgg_get_entities_from_annotations` was brought inline with the rest of the `elgg_get_entities*` functions."
  711. msgstr ""
  712. #: ../../guides/database.rst:135
  713. msgid "Pre Elgg 1.10 the sorting of the entities was based on the latest addition of an annotation (in $options your could add `$options['order_by'] = 'maxtime ASC'` or `$options['order_by'] = 'maxtime DESC'`. As of Elgg 1.10 this was changed to the creation time of the entity, just like the rest of the `elgg_get_entities*` functions. To get the old behaviour back add the following to your `$options`:"
  714. msgstr ""
  715. #: ../../guides/database.rst:150
  716. #: ../../guides/views.rst:239
  717. msgid "Displaying entities"
  718. msgstr ""
  719. #: ../../guides/database.rst:152
  720. msgid "In order for entities to be displayed in listing functions you need to provide a view for the entity in the views system."
  721. msgstr ""
  722. #: ../../guides/database.rst:155
  723. msgid "To display an entity, create a view EntityType/subtype where EntityType is one of the following:"
  724. msgstr ""
  725. #: ../../guides/database.rst:158
  726. msgid "object: for entities derived from ElggObject user: for entities derived from ElggUser site: for entities derived from ElggSite group: for entities derived from ElggGroup"
  727. msgstr ""
  728. #: ../../guides/database.rst:163
  729. msgid "A default view for all entities has already been created, this is called EntityType/default."
  730. msgstr ""
  731. #: ../../guides/database.rst:169
  732. msgid "Entity Icons"
  733. msgstr ""
  734. #: ../../guides/database.rst:171
  735. msgid "Every entity can be assigned an icon which is retrieved using the ``ElggEntity::getIconURL($params)`` method. This method accepts a ``$params`` argument that can be either a string specifying on of the configured icon sizes, or an array of parameters, that specify the size and provide additional context for the hook to determine the icon to serve."
  736. msgstr ""
  737. #: ../../guides/database.rst:176
  738. msgid "Use ``elgg_get_config('icon_sizes')`` to get all possible values. The following sizes exist by default: ``'large'``, ``'medium'``, ``'small'``, ``'tiny'``, and ``'topbar'``. The method triggers the ``entity:icon:url`` :ref:`hook <guides/hooks-list#other>`."
  739. msgstr ""
  740. #: ../../guides/database.rst:180
  741. msgid "Use ``elgg_view_entity_icon($entity, $size, $vars)`` to render an icon. This will scan the following locations for a view and include the first match."
  742. msgstr ""
  743. #: ../../guides/database.rst:183
  744. msgid "views/$viewtype/icon/$type/$subtype.php"
  745. msgstr ""
  746. #: ../../guides/database.rst:184
  747. msgid "views/$viewtype/icon/$type/default.php"
  748. msgstr ""
  749. #: ../../guides/database.rst:185
  750. msgid "views/$viewtype/icon/default.php"
  751. msgstr ""
  752. #: ../../guides/database.rst:187
  753. msgid "Where"
  754. msgstr ""
  755. #: ../../guides/database.rst:189
  756. msgid "$viewtype"
  757. msgstr ""
  758. #: ../../guides/database.rst:190
  759. msgid "Type of view, e.g. ``'default'`` or ``'json'``."
  760. msgstr ""
  761. #: ../../guides/database.rst:191
  762. msgid "$type"
  763. msgstr ""
  764. #: ../../guides/database.rst:192
  765. msgid "Type of entity, e.g. ``'group'`` or ``'user'``."
  766. msgstr ""
  767. #: ../../guides/database.rst:194
  768. msgid "$subtype"
  769. msgstr ""
  770. #: ../../guides/database.rst:194
  771. msgid "Entity subtype, e.g. ``'blog'`` or ``'page'``."
  772. msgstr ""
  773. #: ../../guides/database.rst:196
  774. msgid "By convention entities that have an uploaded avatar or icon will have the ``icontime`` property assigned. This means that you can use ``$entity->icontime`` to check if an icon exists for the given entity."
  775. msgstr ""
  776. #: ../../guides/database.rst:201
  777. msgid "Adding, reading and deleting annotations"
  778. msgstr ""
  779. #: ../../guides/database.rst:203
  780. msgid "Annotations could be used, for example, to track ratings. To annotate an entity you can use the object's ``annotate()`` method. For example, to give a blog post a rating of 5, you could use:"
  781. msgstr ""
  782. #: ../../guides/database.rst:213
  783. msgid "To retrieve the ratings on the blog post, use ``$blogpost->getAnnotations('rating')`` and if you want to delete an annotation, you can operate on the ``ElggAnnotation`` class, eg ``$annotation->delete()``."
  784. msgstr ""
  785. #: ../../guides/database.rst:218
  786. msgid "Retrieving a single annotation can be done with ``get_annotation()`` if you have the annotation's ID. If you delete an ElggEntity of any kind, all its metadata, annotations, and relationships will be automatically deleted as well."
  787. msgstr ""
  788. #: ../../guides/database.rst:224
  789. msgid "Extending ElggEntity"
  790. msgstr ""
  791. #: ../../guides/database.rst:226
  792. msgid "If you derive from one of the Elgg core classes, you'll need to tell Elgg how to properly instantiate the new type of object so that get\\_entity() et al. will return the appropriate PHP class. For example, if I customize ElggGroup in a class called \"Committee\", I need to make Elgg aware of the new mapping. Following is an example class extension:"
  793. msgstr ""
  794. #: ../../guides/database.rst:256
  795. msgid "Now if you invoke ``get_entity()`` with the GUID of a committee object, you'll get back an object of type Committee."
  796. msgstr ""
  797. #: ../../guides/database.rst:259
  798. msgid "This template was extracted from the definition of ElggFile."
  799. msgstr ""
  800. #: ../../guides/database.rst:262
  801. msgid "Advanced features"
  802. msgstr ""
  803. #: ../../guides/database.rst:265
  804. msgid "Entity URLs"
  805. msgstr ""
  806. #: ../../guides/database.rst:267
  807. msgid "Entity urls are provided by the ``getURL()`` interface and provide the Elgg framework with a common way of directing users to the appropriate display handler for any given object."
  808. msgstr ""
  809. #: ../../guides/database.rst:271
  810. msgid "For example, a profile page in the case of users."
  811. msgstr ""
  812. #: ../../guides/database.rst:273
  813. msgid "The url is set using the ``elgg\\_register\\_entity\\_url\\_handler()`` function. The function you register must return the appropriate url for the given type - this itself can be an address set up by a page handler."
  814. msgstr ""
  815. #: ../../guides/database.rst:280
  816. msgid "The default handler is to use the default export interface."
  817. msgstr ""
  818. #: ../../guides/database.rst:283
  819. msgid "Entity loading performance"
  820. msgstr ""
  821. #: ../../guides/database.rst:285
  822. msgid "``elgg_get_entities`` has a couple options that can sometimes be useful to improve performance."
  823. msgstr ""
  824. #: ../../guides/database.rst:287
  825. msgid "**preload_owners**: If the entities fetched will be displayed in a list with the owner information, you can set this option to ``true`` to efficiently load the owner users of the fetched entities."
  826. msgstr ""
  827. #: ../../guides/database.rst:288
  828. msgid "**preload_containers**: If the entities fetched will be displayed in a list using info from their containers, you can set this option to ``true`` to efficiently load them."
  829. msgstr ""
  830. #: ../../guides/database.rst:289
  831. msgid "**distinct**: When Elgg fetches entities using an SQL query, Elgg must be sure that each entity row appears only once in the result set. By default it includes a ``DISTINCT`` modifier on the GUID column to enforce this, but some queries naturally return unique entities. Setting the ``distinct`` option to false will remove this modifier, and rely on the query to enforce its own uniqueness."
  832. msgstr ""
  833. #: ../../guides/database.rst:291
  834. msgid "The internals of Elgg entity queries is a complex subject and it's recommended to seek help on the Elgg Community site before using the ``distinct`` option."
  835. msgstr ""
  836. #: ../../guides/database.rst:294
  837. msgid "Pre-1.8 Notes"
  838. msgstr ""
  839. #: ../../guides/database.rst:296
  840. msgid "update\\_subtype(): This function is new in 1.8. In prior versions, you would need to edit the database by hand if you updated the class name associated with a given subtype."
  841. msgstr ""
  842. #: ../../guides/database.rst:300
  843. msgid "elgg\\_register\\_entity\\_url\\_handler(): This function is new in 1.8. It deprecates register\\_entity\\_url\\_handler(), which you should use if developing for a pre-1.8 version of Elgg."
  844. msgstr ""
  845. #: ../../guides/database.rst:304
  846. msgid "elgg\\_get\\_entities\\_from\\_metadata(): This function is new in 1.8. It deprecates get\\_entities\\_from\\_metadata(), which you should use if developing for a pre-1.8 version of Elgg."
  847. msgstr ""
  848. #: ../../guides/database.rst:309
  849. msgid "Custom database functionality"
  850. msgstr ""
  851. #: ../../guides/database.rst:311
  852. msgid "It is strongly recommended to use entities wherever possible. However, Elgg supports custom SQL queries using the database API."
  853. msgstr ""
  854. #: ../../guides/database.rst:315
  855. msgid "Example: Run SQL script on plugin activation"
  856. msgstr ""
  857. #: ../../guides/database.rst:317
  858. msgid "This example shows how you can populate your database on plugin activation."
  859. msgstr ""
  860. #: ../../guides/database.rst:319
  861. msgid "my_plugin/activate.php:"
  862. msgstr ""
  863. #: ../../guides/database.rst:329
  864. msgid "my_plugin/sql/activate.sql:"
  865. msgstr ""
  866. #: ../../guides/database.rst:345
  867. msgid "Note that Elgg execute statements through PHPs built-in functions and have limited support for comments. I.e. only single line comments are supported and must be prefixed by \"-- \" or \"# \". A comment must start at the very beginning of a line."
  868. msgstr ""
  869. #: ../../guides/database.rst:351
  870. msgid "Systemlog"
  871. msgstr ""
  872. #: ../../guides/database.rst:355
  873. msgid "This section need some attention and will contain outdated information"
  874. msgstr ""
  875. #: ../../guides/database.rst:357
  876. msgid "The default Elgg system log is a simple way of recording what happens within an Elgg system. It's viewable and searchable directly from the administration panel."
  877. msgstr ""
  878. #: ../../guides/database.rst:360
  879. msgid "System log storage"
  880. msgstr ""
  881. #: ../../guides/database.rst:362
  882. msgid "A system log row is stored whenever an event concerning an object whose class implements the :doc:`/design/loggable` interface is triggered. ``ElggEntity`` and ``ElggExtender`` implement :doc:`/design/loggable`, so a system log row is created whenever an event is performed on all objects, users, groups, sites, metadata and annotations."
  883. msgstr ""
  884. #: ../../guides/database.rst:364
  885. msgid "Common events include:"
  886. msgstr ""
  887. #: ../../guides/database.rst:366
  888. msgid "create"
  889. msgstr ""
  890. #: ../../guides/database.rst:367
  891. msgid "update"
  892. msgstr ""
  893. #: ../../guides/database.rst:368
  894. msgid "delete"
  895. msgstr ""
  896. #: ../../guides/database.rst:369
  897. msgid "login"
  898. msgstr ""
  899. #: ../../guides/database.rst:372
  900. msgid "Creating your own system log"
  901. msgstr ""
  902. #: ../../guides/database.rst:374
  903. msgid "There are some reasons why you might want to create your own system log. For example, you might need to store a full copy of entities when they are updated or deleted, for auditing purposes. You might also need to notify an administrator when certain types of events occur."
  904. msgstr ""
  905. #: ../../guides/database.rst:376
  906. msgid "To do this, you can create a function that listens to all events for all types of object:"
  907. msgstr ""
  908. #: ../../guides/database.rst:382
  909. msgid "Your function can then be defined as:"
  910. msgstr ""
  911. #: ../../guides/database.rst:392
  912. msgid "You can then use the extra methods defined by :doc:`/design/loggable` to extract the information you need."
  913. msgstr ""
  914. #: ../../guides/dont-modify-core.rst:2
  915. msgid "Don't Modify Core"
  916. msgstr ""
  917. #: ../../guides/dont-modify-core.rst:6
  918. msgid "Don't modify any non-config files that come with Elgg."
  919. msgstr ""
  920. #: ../../guides/dont-modify-core.rst:8
  921. msgid "Instead, create a :doc:`custom plugin<plugins>` and alter behavior through the rich Elgg plugin API."
  922. msgstr ""
  923. #: ../../guides/dont-modify-core.rst:10
  924. msgid "Here are the main reasons not to modify the core of Elgg, or of any other third party software that offers better extensibility routes through plugins."
  925. msgstr ""
  926. #: ../../guides/dont-modify-core.rst:13
  927. msgid "It makes it hard to get help"
  928. msgstr ""
  929. #: ../../guides/dont-modify-core.rst:15
  930. msgid "When you don't share the same codebase as everyone else, it's impossible for others to know what is going on in your system and whether your changes are to blame. This can frustrate those who offer help because it can add considerable noise to the support process."
  931. msgstr ""
  932. #: ../../guides/dont-modify-core.rst:18
  933. msgid "It makes upgrading tricky and potentially disastrous"
  934. msgstr ""
  935. #: ../../guides/dont-modify-core.rst:20
  936. msgid "You will certainly want or need to upgrade Elgg to take advantage of security patches, new features, new plugin APIs, new stability and performance improvements. If you've modified core files, then you must be very careful when upgrading that your changes are not overwritten and that they are compatible with the new Elgg code. If your changes are lost or incompatible, then the upgrade may remove features you've added or even completely break your site."
  937. msgstr ""
  938. #: ../../guides/dont-modify-core.rst:22
  939. msgid "This can also be a slippery slope. Lots of modifications can lead you to an upgrade process so complex that it's practically impossible. There are lots of sites stuck running old versions software due to taking this path."
  940. msgstr ""
  941. #: ../../guides/dont-modify-core.rst:25
  942. msgid "It may break plugins"
  943. msgstr ""
  944. #: ../../guides/dont-modify-core.rst:27
  945. msgid "You may not realize until much later that your \"quick fix\" broke seemingly unrelated functionality that plugins depended on."
  946. msgstr ""
  947. #: ../../guides/dont-modify-core.rst:30
  948. msgid "Summary"
  949. msgstr ""
  950. #: ../../guides/dont-modify-core.rst:32
  951. msgid "Resist the temptation"
  952. msgstr ""
  953. #: ../../guides/dont-modify-core.rst:33
  954. msgid "Editing existing files is quick and easy, but doing so heavily risks the maintainability, security, and stability of your site."
  955. msgstr ""
  956. #: ../../guides/dont-modify-core.rst:34
  957. msgid "When receiving advice, consider if the person telling you to modify core will be around to rescue you if you run into trouble later!"
  958. msgstr ""
  959. #: ../../guides/dont-modify-core.rst:35
  960. msgid "Apply these principle to software in general."
  961. msgstr ""
  962. #: ../../guides/dont-modify-core.rst:36
  963. msgid "If you can avoid it, don't modify third party plugins either, for many of the same reasons: Plugin authors release new versions, too, and you will want those updates."
  964. msgstr ""
  965. #: ../../guides/events-list.rst:2
  966. msgid "List of events in core"
  967. msgstr ""
  968. #: ../../guides/events-list.rst:9
  969. msgid "System events"
  970. msgstr ""
  971. #: ../../guides/events-list.rst:12
  972. msgid "**boot, system**"
  973. msgstr ""
  974. #: ../../guides/events-list.rst:12
  975. msgid "First event triggered. Triggered before plugins have been loaded."
  976. msgstr ""
  977. #: ../../guides/events-list.rst:15
  978. msgid "**plugins_boot, system**"
  979. msgstr ""
  980. #: ../../guides/events-list.rst:15
  981. msgid "Triggered just after the plugins are loaded. Rarely used. init, system is used instead."
  982. msgstr ""
  983. #: ../../guides/events-list.rst:18
  984. msgid "**init, system**"
  985. msgstr ""
  986. #: ../../guides/events-list.rst:18
  987. msgid "Plugins tend to use this event for initialization (extending views, registering callbacks, etc.)"
  988. msgstr ""
  989. #: ../../guides/events-list.rst:22
  990. msgid "**ready, system**"
  991. msgstr ""
  992. #: ../../guides/events-list.rst:21
  993. msgid "Triggered after the ``init, system`` event. All plugins are fully loaded and the engine is ready to serve pages."
  994. msgstr ""
  995. #: ../../guides/events-list.rst:25
  996. msgid "**pagesetup, system**"
  997. msgstr ""
  998. #: ../../guides/events-list.rst:25
  999. msgid "Called just before the first content is produced. Is triggered by ``elgg_view()``."
  1000. msgstr ""
  1001. #: ../../guides/events-list.rst:29
  1002. msgid "**shutdown, system**"
  1003. msgstr ""
  1004. #: ../../guides/events-list.rst:28
  1005. msgid "Triggered after the page has been sent to the user. Expensive operations could be done here and not make the user wait."
  1006. msgstr ""
  1007. #: ../../guides/events-list.rst:31
  1008. msgid "Depending upon your server configuration the PHP output might not be shown until after the process is completed. This means that any long-running processes will still delay the page load."
  1009. msgstr ""
  1010. #: ../../guides/events-list.rst:37
  1011. msgid "**regenerate_site_secret:before, system**"
  1012. msgstr ""
  1013. #: ../../guides/events-list.rst:36
  1014. msgid "Return false to cancel regenerating the site secret. You should also provide a message to the user."
  1015. msgstr ""
  1016. #: ../../guides/events-list.rst:40
  1017. msgid "**regenerate_site_secret:after, system**"
  1018. msgstr ""
  1019. #: ../../guides/events-list.rst:40
  1020. msgid "Triggered after the site secret has been regenerated."
  1021. msgstr ""
  1022. #: ../../guides/events-list.rst:44
  1023. msgid "**log, systemlog**"
  1024. msgstr ""
  1025. #: ../../guides/events-list.rst:43
  1026. msgid "Called for all triggered events. Used internally by ``system_log_default_logger()`` to populate the ``system_log`` table."
  1027. msgstr ""
  1028. #: ../../guides/events-list.rst:48
  1029. msgid "**upgrade, system**"
  1030. msgstr ""
  1031. #: ../../guides/events-list.rst:47
  1032. msgid "Triggered after a system upgrade has finished. All upgrade scripts have run, but the caches are not cleared."
  1033. msgstr ""
  1034. #: ../../guides/events-list.rst:53
  1035. msgid "**upgrade, upgrade**"
  1036. msgstr ""
  1037. #: ../../guides/events-list.rst:53
  1038. msgid "A single upgrade script finished executing. Handlers are passed a ``stdClass`` object with the properties"
  1039. msgstr ""
  1040. #: ../../guides/events-list.rst:52
  1041. msgid "from - The version of Elgg upgrading from."
  1042. msgstr ""
  1043. #: ../../guides/events-list.rst:53
  1044. msgid "to - The version just upgraded to."
  1045. msgstr ""
  1046. #: ../../guides/events-list.rst:56
  1047. msgid "**activate, plugin**"
  1048. msgstr ""
  1049. #: ../../guides/events-list.rst:56
  1050. msgid "Return false to prevent activation of the plugin."
  1051. msgstr ""
  1052. #: ../../guides/events-list.rst:59
  1053. msgid "**deactivate, plugin**"
  1054. msgstr ""
  1055. #: ../../guides/events-list.rst:59
  1056. msgid "Return false to prevent deactivation of the plugin."
  1057. msgstr ""
  1058. #: ../../guides/events-list.rst:62
  1059. msgid "**init:cookie, <name>**"
  1060. msgstr ""
  1061. #: ../../guides/events-list.rst:62
  1062. msgid "Return false to override setting a cookie."
  1063. msgstr ""
  1064. #: ../../guides/events-list.rst:65
  1065. msgid "**cache:flush, system**"
  1066. msgstr ""
  1067. #: ../../guides/events-list.rst:65
  1068. msgid "Reset internal and external caches, by default including system_cache, simplecache, and memcache. One might use it to reset others such as APC, OPCache, or WinCache."
  1069. msgstr ""
  1070. #: ../../guides/events-list.rst:68
  1071. msgid "User events"
  1072. msgstr ""
  1073. #: ../../guides/events-list.rst:71
  1074. msgid "**login:before, user**"
  1075. msgstr ""
  1076. #: ../../guides/events-list.rst:71
  1077. msgid "Triggered during login. Returning false prevents the user from logging"
  1078. msgstr ""
  1079. #: ../../guides/events-list.rst:74
  1080. msgid "**login:after, user**"
  1081. msgstr ""
  1082. #: ../../guides/events-list.rst:74
  1083. msgid "Triggered after the user logs in."
  1084. msgstr ""
  1085. #: ../../guides/events-list.rst:77
  1086. msgid "**logout:before, user**"
  1087. msgstr ""
  1088. #: ../../guides/events-list.rst:77
  1089. msgid "Triggered during logout. Returning false should prevent the user from logging out."
  1090. msgstr ""
  1091. #: ../../guides/events-list.rst:80
  1092. msgid "**logout:after, user**"
  1093. msgstr ""
  1094. #: ../../guides/events-list.rst:80
  1095. msgid "Triggered after the user logouts."
  1096. msgstr ""
  1097. #: ../../guides/events-list.rst:85
  1098. msgid "**validate, user**"
  1099. msgstr ""
  1100. #: ../../guides/events-list.rst:83
  1101. msgid "When a user registers, the user's account is disabled. This event is triggered to allow a plugin to determine how the user should be validated (for example, through an email with a validation link)."
  1102. msgstr ""
  1103. #: ../../guides/events-list.rst:88
  1104. msgid "**profileupdate, user**"
  1105. msgstr ""
  1106. #: ../../guides/events-list.rst:88
  1107. msgid "User has changed profile"
  1108. msgstr ""
  1109. #: ../../guides/events-list.rst:91
  1110. msgid "**profileiconupdate, user**"
  1111. msgstr ""
  1112. #: ../../guides/events-list.rst:91
  1113. msgid "User has changed profile icon"
  1114. msgstr ""
  1115. #: ../../guides/events-list.rst:94
  1116. msgid "**ban, user**"
  1117. msgstr ""
  1118. #: ../../guides/events-list.rst:94
  1119. msgid "Triggered before a user is banned. Return false to prevent."
  1120. msgstr ""
  1121. #: ../../guides/events-list.rst:97
  1122. msgid "**unban, user**"
  1123. msgstr ""
  1124. #: ../../guides/events-list.rst:97
  1125. msgid "Triggered before a user is unbanned. Return false to prevent."
  1126. msgstr ""
  1127. #: ../../guides/events-list.rst:100
  1128. msgid "**make_admin, user**"
  1129. msgstr ""
  1130. #: ../../guides/events-list.rst:100
  1131. msgid "Triggered before a user is promoted to an admin. Return false to prevent."
  1132. msgstr ""
  1133. #: ../../guides/events-list.rst:103
  1134. msgid "**remove_admin, user**"
  1135. msgstr ""
  1136. #: ../../guides/events-list.rst:103
  1137. msgid "Triggered before a user is demoted from an admin. Return false to prevent."
  1138. msgstr ""
  1139. #: ../../guides/events-list.rst:106
  1140. msgid "Relationship events"
  1141. msgstr ""
  1142. #: ../../guides/events-list.rst:110
  1143. msgid "**create, relationship**"
  1144. msgstr ""
  1145. #: ../../guides/events-list.rst:109
  1146. msgid "Triggered after a relationship has been created. Returning false deletes the relationship that was just created."
  1147. msgstr ""
  1148. #: ../../guides/events-list.rst:112
  1149. msgid "This event was broken in Elgg 1.9 - 1.12.3, returning false would *not* delete the relationship. This is working as of 1.12.4"
  1150. msgstr ""
  1151. #: ../../guides/events-list.rst:117
  1152. msgid "**delete, relationship**"
  1153. msgstr ""
  1154. #: ../../guides/events-list.rst:116
  1155. msgid "Triggered before a relationship is deleted. Return false to prevent it from being deleted."
  1156. msgstr ""
  1157. #: ../../guides/events-list.rst:120
  1158. msgid "**join, group**"
  1159. msgstr ""
  1160. #: ../../guides/events-list.rst:120
  1161. msgid "Triggered after the user ``$params['user']`` has joined the group ``$params['group']``."
  1162. msgstr ""
  1163. #: ../../guides/events-list.rst:123
  1164. msgid "**leave, group**"
  1165. msgstr ""
  1166. #: ../../guides/events-list.rst:123
  1167. msgid "Triggered before the user ``$params['user']`` has left the group ``$params['group']``."
  1168. msgstr ""
  1169. #: ../../guides/events-list.rst:126
  1170. msgid "Entity events"
  1171. msgstr ""
  1172. #: ../../guides/events-list.rst:129
  1173. msgid "**create, <entity type>**"
  1174. msgstr ""
  1175. #: ../../guides/events-list.rst:129
  1176. msgid "Triggered for user, group, object, and site entities after creation. Return false to delete entity."
  1177. msgstr ""
  1178. #: ../../guides/events-list.rst:132
  1179. msgid "**update, <entity type>**"
  1180. msgstr ""
  1181. #: ../../guides/events-list.rst:132
  1182. msgid "Triggered before an update for the user, group, object, and site entities. Return false to prevent update."
  1183. msgstr ""
  1184. #: ../../guides/events-list.rst:135
  1185. msgid "**update:after, <entity type>**"
  1186. msgstr ""
  1187. #: ../../guides/events-list.rst:135
  1188. msgid "Triggered after an update for the user, group, object, and site entities."
  1189. msgstr ""
  1190. #: ../../guides/events-list.rst:138
  1191. msgid "**delete, <entity type>**"
  1192. msgstr ""
  1193. #: ../../guides/events-list.rst:138
  1194. msgid "Triggered before entity deletion. Return false to prevent deletion."
  1195. msgstr ""
  1196. #: ../../guides/events-list.rst:141
  1197. msgid "**disable, <entity type>**"
  1198. msgstr ""
  1199. #: ../../guides/events-list.rst:141
  1200. msgid "Triggered before the entity is disabled. Return false to prevent disabling."
  1201. msgstr ""
  1202. #: ../../guides/events-list.rst:144
  1203. msgid "**disable:after, <entity type>**"
  1204. msgstr ""
  1205. #: ../../guides/events-list.rst:144
  1206. msgid "Triggered after the entity is disabled."
  1207. msgstr ""
  1208. #: ../../guides/events-list.rst:147
  1209. msgid "**enable, <entity type>**"
  1210. msgstr ""
  1211. #: ../../guides/events-list.rst:147
  1212. msgid "Return false to prevent enabling."
  1213. msgstr ""
  1214. #: ../../guides/events-list.rst:150
  1215. msgid "**enable:after, <entity type>**"
  1216. msgstr ""
  1217. #: ../../guides/events-list.rst:150
  1218. msgid "Triggered after the entity is enabled."
  1219. msgstr ""
  1220. #: ../../guides/events-list.rst:153
  1221. msgid "Metadata events"
  1222. msgstr ""
  1223. #: ../../guides/events-list.rst:157
  1224. msgid "**create, metadata**"
  1225. msgstr ""
  1226. #: ../../guides/events-list.rst:156
  1227. msgid "Called after the metadata has been created. Return false to delete the metadata that was just created."
  1228. msgstr ""
  1229. #: ../../guides/events-list.rst:160
  1230. msgid "**update, metadata**"
  1231. msgstr ""
  1232. #: ../../guides/events-list.rst:160
  1233. msgid "Called after the metadata has been updated. Return false to *delete the metadata.*"
  1234. msgstr ""
  1235. #: ../../guides/events-list.rst:163
  1236. msgid "**delete, metadata**"
  1237. msgstr ""
  1238. #: ../../guides/events-list.rst:163
  1239. msgid "Called before metadata is deleted. Return false to prevent deletion."
  1240. msgstr ""
  1241. #: ../../guides/events-list.rst:166
  1242. msgid "**enable, metadata**"
  1243. msgstr ""
  1244. #: ../../guides/events-list.rst:166
  1245. msgid "Called when enabling metadata. Return false to prevent enabling."
  1246. msgstr ""
  1247. #: ../../guides/events-list.rst:169
  1248. msgid "**disable, metadata**"
  1249. msgstr ""
  1250. #: ../../guides/events-list.rst:169
  1251. msgid "Called when disabling metadata. Return false to prevent disabling."
  1252. msgstr ""
  1253. #: ../../guides/events-list.rst:172
  1254. msgid "Annotation events"
  1255. msgstr ""
  1256. #: ../../guides/events-list.rst:176
  1257. msgid "**annotate, <entity type>**"
  1258. msgstr ""
  1259. #: ../../guides/events-list.rst:175
  1260. msgid "Called before the annotation has been created. Return false to prevent annotation of this entity."
  1261. msgstr ""
  1262. #: ../../guides/events-list.rst:180
  1263. msgid "**create, annotation**"
  1264. msgstr ""
  1265. #: ../../guides/events-list.rst:179
  1266. msgid "Called after the annotation has been created. Return false to delete the annotation."
  1267. msgstr ""
  1268. #: ../../guides/events-list.rst:183
  1269. msgid "**update, annotation**"
  1270. msgstr ""
  1271. #: ../../guides/events-list.rst:183
  1272. msgid "Called after the annotation has been updated. Return false to *delete the annotation.*"
  1273. msgstr ""
  1274. #: ../../guides/events-list.rst:186
  1275. msgid "**delete, annotation**"
  1276. msgstr ""
  1277. #: ../../guides/events-list.rst:186
  1278. msgid "Called before annotation is deleted. Return false to prevent deletion."
  1279. msgstr ""
  1280. #: ../../guides/events-list.rst:189
  1281. msgid "**enable, annotation**"
  1282. msgstr ""
  1283. #: ../../guides/events-list.rst:189
  1284. msgid "Called when enabling annotations. Return false to prevent enabling."
  1285. msgstr ""
  1286. #: ../../guides/events-list.rst:192
  1287. msgid "**disable, annotations**"
  1288. msgstr ""
  1289. #: ../../guides/events-list.rst:192
  1290. msgid "Called when disabling annotations. Return false to prevent disabling."
  1291. msgstr ""
  1292. #: ../../guides/events-list.rst:195
  1293. msgid "River events"
  1294. msgstr ""
  1295. #: ../../guides/events-list.rst:198
  1296. msgid "**created, river**"
  1297. msgstr ""
  1298. #: ../../guides/events-list.rst:198
  1299. msgid "Called after a river item is created."
  1300. msgstr ""
  1301. #: ../../guides/events-list.rst:201
  1302. msgid "Notes"
  1303. msgstr ""
  1304. #: ../../guides/events-list.rst:203
  1305. msgid "Because of bugs in the Elgg core, some events may be thrown more than once on the same action. For example, ``update, object`` is thrown twice."
  1306. msgstr ""
  1307. #: ../../guides/guidelines.rst:2
  1308. msgid "Plugin coding guidelines"
  1309. msgstr ""
  1310. #: ../../guides/guidelines.rst:4
  1311. msgid "In addition to the Elgg Coding Standards, these are guidelines for creating plugins. Core plugins are being updated to this format and all plugin authors should follow these guidelines in their own plugins."
  1312. msgstr ""
  1313. #: ../../guides/guidelines.rst:8
  1314. msgid "Be sure to follow the :doc:`plugins/plugin-skeleton` for your plugin's layout."
  1315. msgstr ""
  1316. #: ../../guides/guidelines.rst:12
  1317. msgid ":doc:`dont-modify-core`"
  1318. msgstr ""
  1319. #: ../../guides/guidelines.rst:19
  1320. #: ../../guides/upgrading.rst:445
  1321. msgid "Use standardized routing with page handlers"
  1322. msgstr ""
  1323. #: ../../guides/guidelines.rst:21
  1324. #: ../../guides/guidelines.rst:50
  1325. #: ../../guides/guidelines.rst:61
  1326. msgid "Example: Bookmarks plugin"
  1327. msgstr ""
  1328. #: ../../guides/guidelines.rst:38
  1329. msgid "Page handlers should accept the following standard URLs:"
  1330. msgstr ""
  1331. #: ../../guides/guidelines.rst:24
  1332. #: ../../guides/guidelines.rst:69
  1333. msgid "Purpose"
  1334. msgstr ""
  1335. #: ../../guides/guidelines.rst:24
  1336. #: ../../guides/guidelines.rst:69
  1337. msgid "URL"
  1338. msgstr ""
  1339. #: ../../guides/guidelines.rst:26
  1340. msgid "All"
  1341. msgstr ""
  1342. #: ../../guides/guidelines.rst:26
  1343. msgid "page_handler/all"
  1344. msgstr ""
  1345. #: ../../guides/guidelines.rst:28
  1346. msgid "User"
  1347. msgstr ""
  1348. #: ../../guides/guidelines.rst:28
  1349. msgid "page_handler/owner/<username>"
  1350. msgstr ""
  1351. #: ../../guides/guidelines.rst:30
  1352. msgid "User friends’"
  1353. msgstr ""
  1354. #: ../../guides/guidelines.rst:30
  1355. msgid "page_handler/friends/<username>"
  1356. msgstr ""
  1357. #: ../../guides/guidelines.rst:32
  1358. msgid "Single entity"
  1359. msgstr ""
  1360. #: ../../guides/guidelines.rst:32
  1361. msgid "page_handler/view/<guid>/<title>"
  1362. msgstr ""
  1363. #: ../../guides/guidelines.rst:34
  1364. #: ../../guides/guidelines.rst:71
  1365. msgid "Add"
  1366. msgstr ""
  1367. #: ../../guides/guidelines.rst:34
  1368. msgid "page_handler/add/<container_guid>"
  1369. msgstr ""
  1370. #: ../../guides/guidelines.rst:36
  1371. #: ../../guides/guidelines.rst:73
  1372. msgid "Edit"
  1373. msgstr ""
  1374. #: ../../guides/guidelines.rst:36
  1375. msgid "page_handler/edit/<guid>"
  1376. msgstr ""
  1377. #: ../../guides/guidelines.rst:38
  1378. msgid "Group list"
  1379. msgstr ""
  1380. #: ../../guides/guidelines.rst:38
  1381. msgid "page_handler/group/<guid>/owner"
  1382. msgstr ""
  1383. #: ../../guides/guidelines.rst:40
  1384. msgid "Include page handler scripts from the page handler. Almost every page handler should have a page handler script. (Example: ``bookmarks/all`` => ``mod/bookmarks/pages/bookmarks/all.php``)"
  1385. msgstr ""
  1386. #: ../../guides/guidelines.rst:41
  1387. #: ../../guides/upgrading.rst:460
  1388. msgid "Call ``set_input()`` for entity guids in the page handler and use ``get_input()`` in the page handler scripts."
  1389. msgstr ""
  1390. #: ../../guides/guidelines.rst:42
  1391. msgid "Call ``elgg_gatekeeper()`` and ``elgg_admin_gatekeeper()`` in the page handler function if required."
  1392. msgstr ""
  1393. #: ../../guides/guidelines.rst:43
  1394. msgid "The group URL should use the ``pages/<handler>/owner.php`` script."
  1395. msgstr ""
  1396. #: ../../guides/guidelines.rst:44
  1397. #: ../../guides/upgrading.rst:463
  1398. msgid "Page handlers should not contain HTML."
  1399. msgstr ""
  1400. #: ../../guides/guidelines.rst:45
  1401. msgid "If upgrading a 1.7 plugin, update the URLs throughout the plugin. (Don’t forget to remove ``/pg/``!)"
  1402. msgstr ""
  1403. #: ../../guides/guidelines.rst:48
  1404. #: ../../guides/upgrading.rst:468
  1405. msgid "Use standardized page handlers and scripts"
  1406. msgstr ""
  1407. #: ../../guides/guidelines.rst:51
  1408. msgid "Store page handler scripts in ``mod/<plugin>/pages/<page_handler>/<page_name>``"
  1409. msgstr ""
  1410. #: ../../guides/guidelines.rst:52
  1411. msgid "Use the content page layout in page handler scripts: ``$content = elgg_view_layout('content', $options);``"
  1412. msgstr ""
  1413. #: ../../guides/guidelines.rst:53
  1414. msgid "Page handler scripts should not contain HTML"
  1415. msgstr ""
  1416. #: ../../guides/guidelines.rst:54
  1417. #: ../../guides/upgrading.rst:477
  1418. msgid "Call ``elgg_push_breadcrumb()`` in the page handler scripts."
  1419. msgstr ""
  1420. #: ../../guides/guidelines.rst:55
  1421. msgid "No need to worry about setting the page owner if the URLs are in the standardized format"
  1422. msgstr ""
  1423. #: ../../guides/guidelines.rst:56
  1424. msgid "For group content, check the ``container_guid`` by using ``elgg_get_page_owner_entity()``"
  1425. msgstr ""
  1426. #: ../../guides/guidelines.rst:59
  1427. msgid "The object/<subtype> view"
  1428. msgstr ""
  1429. #: ../../guides/guidelines.rst:62
  1430. msgid "Make sure there are views for ``$vars[‘full’] == true`` and ``$vars[‘full’] == false``"
  1431. msgstr ""
  1432. #: ../../guides/guidelines.rst:63
  1433. msgid "Check for the object in ``$vars[‘entity’]`` . Use ``elgg_instance_of()`` to make sure it’s the type entity you want. Return ``true`` to short circuit the view if the entity is missing or wrong."
  1434. msgstr ""
  1435. #: ../../guides/guidelines.rst:64
  1436. msgid "Use the new list body and list metadata views to help format. You should use almost no markup in these views."
  1437. msgstr ""
  1438. #: ../../guides/guidelines.rst:65
  1439. msgid "Update action structure - Example: Bookmarks plugin."
  1440. msgstr ""
  1441. #: ../../guides/guidelines.rst:66
  1442. #: ../../guides/upgrading.rst:492
  1443. msgid "Namespace action files and action names (example: ``mod/blog/actions/blog/save.php`` => ``action/blog/save``)"
  1444. msgstr ""
  1445. #: ../../guides/guidelines.rst:75
  1446. #: ../../guides/upgrading.rst:493
  1447. msgid "Use the following action URLs:"
  1448. msgstr ""
  1449. #: ../../guides/guidelines.rst:71
  1450. #: ../../guides/guidelines.rst:73
  1451. msgid "action/plugin/save"
  1452. msgstr ""
  1453. #: ../../guides/guidelines.rst:75
  1454. msgid "Delete"
  1455. msgstr ""
  1456. #: ../../guides/guidelines.rst:75
  1457. msgid "action/plugin/delete"
  1458. msgstr ""
  1459. #: ../../guides/guidelines.rst:77
  1460. msgid "Make the delete action accept ``action/<handler>/delete?guid=<guid>`` so the metadata entity menu has the correct URL by default"
  1461. msgstr ""
  1462. #: ../../guides/guidelines.rst:78
  1463. msgid "If updating a 1.7 plugin, replace calls to functions deprecated in 1.7 because these will produce visible errors on every load in 1.8"
  1464. msgstr ""
  1465. #: ../../guides/guidelines.rst:83
  1466. msgid "Actions are transient states to perform an action such as updating the database or sending a notification to a user. Used correctly, actions are secure and prevent against CSRF and XSS attacks."
  1467. msgstr ""
  1468. #: ../../guides/guidelines.rst:87
  1469. msgid "As of Elgg 1.7 all actions require action tokens."
  1470. msgstr ""
  1471. #: ../../guides/guidelines.rst:90
  1472. msgid "Action best practices"
  1473. msgstr ""
  1474. #: ../../guides/guidelines.rst:92
  1475. msgid "Never call an action directly by saying:"
  1476. msgstr ""
  1477. #: ../../guides/guidelines.rst:98
  1478. msgid "This circumvents the security systems in Elgg."
  1479. msgstr ""
  1480. #: ../../guides/guidelines.rst:100
  1481. msgid "There is no need to include the ``engine/start.php`` file in your actions. Actions should never be called directly, so the engine will be started automatically when called correctly."
  1482. msgstr ""
  1483. #: ../../guides/guidelines.rst:102
  1484. msgid "Because actions are time-sensitive they are not suitable for links in emails or other delayed notifications. An example of this would be invitations to join a group. The clean way to create an invitation link is to create a page handler for invitations and email that link to the user. It is then the page handler's responsibility to create the action links for a user to join or ignore the invitation request."
  1485. msgstr ""
  1486. #: ../../guides/guidelines.rst:105
  1487. msgid "Directly calling a file"
  1488. msgstr ""
  1489. #: ../../guides/guidelines.rst:107
  1490. msgid "This is an easy one: **Don't do it**. With the exception of 3rd party application integration, there is not a reason to directly call a file in mods directory."
  1491. msgstr ""
  1492. #: ../../guides/guidelines.rst:110
  1493. msgid "Recommended"
  1494. msgstr ""
  1495. #: ../../guides/guidelines.rst:112
  1496. msgid "These points are good ideas, but are not yet in the official guidelines. Following these suggestions will help to keep your plugin consistent with Elgg core."
  1497. msgstr ""
  1498. #: ../../guides/guidelines.rst:114
  1499. msgid "Update the widget views (see the blog or file widgets)"
  1500. msgstr ""
  1501. #: ../../guides/guidelines.rst:115
  1502. msgid "Update the group profile “widget” using blog or file plugins as example"
  1503. msgstr ""
  1504. #: ../../guides/guidelines.rst:119
  1505. msgid "Update the forms"
  1506. msgstr ""
  1507. #: ../../guides/guidelines.rst:117
  1508. msgid "Move form bodies to ``/forms/<handler>/<action>`` to use Evan’s new ``elgg_view_form()``"
  1509. msgstr ""
  1510. #: ../../guides/guidelines.rst:118
  1511. msgid "Use input views in form bodies rather than html"
  1512. msgstr ""
  1513. #: ../../guides/guidelines.rst:119
  1514. msgid "Add a function that prepares the form (see ``mod/file/lib/file.php`` for example)"
  1515. msgstr ""
  1516. #: ../../guides/guidelines.rst:120
  1517. msgid "Integrate sticky forms (see the file plugin’s upload action and form prepare function)"
  1518. msgstr ""
  1519. #: ../../guides/guidelines.rst:121
  1520. #: ../../guides/upgrading.rst:536
  1521. msgid "Clean up CSS/HTML"
  1522. msgstr ""
  1523. #: ../../guides/guidelines.rst:122
  1524. msgid "Should be able to remove almost all CSS (look for patterns that can be moved into core if you need CSS)"
  1525. msgstr ""
  1526. #: ../../guides/guidelines.rst:123
  1527. msgid "Use hyphens rather than underscores in classes/ids"
  1528. msgstr ""
  1529. #: ../../guides/guidelines.rst:124
  1530. msgid "Update the ``manifest.xml`` file to the 1.8 format. Use http://el.gg/manifest17to18 to automate this"
  1531. msgstr ""
  1532. #: ../../guides/guidelines.rst:125
  1533. msgid "Do not use the ``bundled`` category with your plugins. That is for plugins distributed with Elgg"
  1534. msgstr ""
  1535. #: ../../guides/guidelines.rst:127
  1536. msgid "Update functions deprecated in 1.8."
  1537. msgstr ""
  1538. #: ../../guides/guidelines.rst:127
  1539. msgid "Many registration functions simply added an ``elgg_`` prefix for consistency"
  1540. msgstr ""
  1541. #: ../../guides/guidelines.rst:128
  1542. msgid "See ``/engine/lib/deprecated-1.8.php`` for the full list. You can also set the debug level to warning to get visual reminders of deprecated functions"
  1543. msgstr ""
  1544. #: ../../guides/helpers.rst:5
  1545. msgid "Input and output"
  1546. msgstr ""
  1547. #: ../../guides/helpers.rst:7
  1548. msgid "``get_input($name)`` Grabs information from a form field (or any variable passed using GET or POST). Also sanitises input, stripping Javascript etc."
  1549. msgstr ""
  1550. #: ../../guides/helpers.rst:8
  1551. msgid "``set_input($name, $value)`` Forces a value to a particular variable for subsequent retrieval by ``get_input()``"
  1552. msgstr ""
  1553. #: ../../guides/helpers.rst:11
  1554. msgid "Entity methods"
  1555. msgstr ""
  1556. #: ../../guides/helpers.rst:13
  1557. msgid "``$entity->getURL()`` Returns the URL of any entity in the system"
  1558. msgstr ""
  1559. #: ../../guides/helpers.rst:14
  1560. msgid "``$entity->getGUID()`` Returns the GUID of any entity in the system"
  1561. msgstr ""
  1562. #: ../../guides/helpers.rst:15
  1563. msgid "``$entity->canEdit()`` Returns whether or not the current user can edit the entity"
  1564. msgstr ""
  1565. #: ../../guides/helpers.rst:16
  1566. msgid "``$entity->getOwnerEntity()`` Returns the ElggUser owner of a particular entity"
  1567. msgstr ""
  1568. #: ../../guides/helpers.rst:19
  1569. msgid "Entity and context retrieval"
  1570. msgstr ""
  1571. #: ../../guides/helpers.rst:21
  1572. msgid "``elgg_get_logged_in_user_entity()`` Returns the ElggUser for the current user"
  1573. msgstr ""
  1574. #: ../../guides/helpers.rst:22
  1575. msgid "``elgg_get_logged_in_user_guid()`` Returns the GUID of the current user"
  1576. msgstr ""
  1577. #: ../../guides/helpers.rst:23
  1578. msgid "``elgg_is_logged_in()`` Is the viewer logged in"
  1579. msgstr ""
  1580. #: ../../guides/helpers.rst:24
  1581. msgid "``elgg_is_admin_logged_in()`` Is the view an admin and logged in"
  1582. msgstr ""
  1583. #: ../../guides/helpers.rst:25
  1584. msgid "``elgg_gatekeeper()`` Shorthand for checking if a user is logged in. Forwards user to front page if not"
  1585. msgstr ""
  1586. #: ../../guides/helpers.rst:26
  1587. msgid "``elgg_admin_gatekeeper()`` Shorthand for checking the user is logged in and is an admin. Forwards user to front page if not"
  1588. msgstr ""
  1589. #: ../../guides/helpers.rst:27
  1590. msgid "``get_user($user_guid)`` Given a GUID, returns a full ElggUser entity"
  1591. msgstr ""
  1592. #: ../../guides/helpers.rst:28
  1593. msgid "``elgg_get_page_owner_guid()`` Returns the GUID of the current page owner, if there is one"
  1594. msgstr ""
  1595. #: ../../guides/helpers.rst:29
  1596. msgid "``elgg_get_page_owner_entity()`` Like elgg_get_page_owner_guid() but returns the full entity"
  1597. msgstr ""
  1598. #: ../../guides/helpers.rst:30
  1599. msgid "``get_context()`` Returns the current page's context - eg \"blog\" for the blog plugin, \"thewire\" for the wire, etc. Returns \"main\" as default"
  1600. msgstr ""
  1601. #: ../../guides/helpers.rst:31
  1602. msgid "``set_context($context)`` Forces the context to be a particular value"
  1603. msgstr ""
  1604. #: ../../guides/helpers.rst:32
  1605. msgid "``elgg_push_context($context)`` Adds a context to the stack"
  1606. msgstr ""
  1607. #: ../../guides/helpers.rst:33
  1608. msgid "``elgg_pop_context()`` Removes the top context from the stack"
  1609. msgstr ""
  1610. #: ../../guides/helpers.rst:34
  1611. msgid "``elgg_in_context($context)`` Checks if you're in a context (this checks the complete stack, eg. 'widget' in 'groups')"
  1612. msgstr ""
  1613. #: ../../guides/helpers.rst:37
  1614. #: ../../guides/hooks-list.rst:470
  1615. #: ../../guides/plugins.rst:2
  1616. msgid "Plugins"
  1617. msgstr ""
  1618. #: ../../guides/helpers.rst:39
  1619. msgid "``elgg_is_active_plugin($plugin_id)`` Check if a plugin is installed and enabled"
  1620. msgstr ""
  1621. #: ../../guides/helpers.rst:42
  1622. msgid "Interface and annotations"
  1623. msgstr ""
  1624. #: ../../guides/helpers.rst:44
  1625. msgid "``elgg_view_image_block($icon, $info)`` Return the result in a formatted list"
  1626. msgstr ""
  1627. #: ../../guides/helpers.rst:45
  1628. msgid "``elgg_view_comments($entity)`` Returns any comments associated with the given entity"
  1629. msgstr ""
  1630. #: ../../guides/helpers.rst:46
  1631. msgid "``elgg_get_friendly_time($unix_timestamp)`` Returns a date formatted in a friendlier way - \"18 minutes ago\", \"2 days ago\", etc."
  1632. msgstr ""
  1633. #: ../../guides/helpers.rst:47
  1634. msgid "You can pass ``'use_hover' => false`` to the user icon view if you don't want the avatar drop down menu to appear e.g."
  1635. msgstr ""
  1636. #: ../../guides/hooks-list.rst:2
  1637. msgid "List of plugin hooks in core"
  1638. msgstr ""
  1639. #: ../../guides/hooks-list.rst:9
  1640. msgid "System hooks"
  1641. msgstr ""
  1642. #: ../../guides/hooks-list.rst:20
  1643. msgid "**email, system**"
  1644. msgstr ""
  1645. #: ../../guides/hooks-list.rst:12
  1646. msgid "Triggered when sending email. ``$params`` contains:"
  1647. msgstr ""
  1648. #: ../../guides/hooks-list.rst:14
  1649. msgid "to"
  1650. msgstr ""
  1651. #: ../../guides/hooks-list.rst:15
  1652. msgid "from"
  1653. msgstr ""
  1654. #: ../../guides/hooks-list.rst:16
  1655. msgid "subject"
  1656. msgstr ""
  1657. #: ../../guides/hooks-list.rst:17
  1658. msgid "body"
  1659. msgstr ""
  1660. #: ../../guides/hooks-list.rst:18
  1661. msgid "headers"
  1662. msgstr ""
  1663. #: ../../guides/hooks-list.rst:19
  1664. msgid "params"
  1665. msgstr ""
  1666. #: ../../guides/hooks-list.rst:23
  1667. msgid "**page_owner, system**"
  1668. msgstr ""
  1669. #: ../../guides/hooks-list.rst:23
  1670. msgid "Filter the page_owner for the current page. No options are passed."
  1671. msgstr ""
  1672. #: ../../guides/hooks-list.rst:25
  1673. msgid "**siteid, system**"
  1674. msgstr ""
  1675. #: ../../guides/hooks-list.rst:28
  1676. msgid "**gc, system**"
  1677. msgstr ""
  1678. #: ../../guides/hooks-list.rst:28
  1679. msgid "Allows plugins to run garbage collection for ``$params['period']``."
  1680. msgstr ""
  1681. #: ../../guides/hooks-list.rst:31
  1682. msgid "**unit_test, system**"
  1683. msgstr ""
  1684. #: ../../guides/hooks-list.rst:31
  1685. msgid "Add a Simple Test test. (Deprecated.)"
  1686. msgstr ""
  1687. #: ../../guides/hooks-list.rst:34
  1688. #: ../../guides/hooks-list.rst:48
  1689. msgid "**diagnostics:report, system**"
  1690. msgstr ""
  1691. #: ../../guides/hooks-list.rst:34
  1692. msgid "Filter the output for the diagnostics report download."
  1693. msgstr ""
  1694. #: ../../guides/hooks-list.rst:36
  1695. #: ../../guides/hooks-list.rst:534
  1696. msgid "**search_types, get_types**"
  1697. msgstr ""
  1698. #: ../../guides/hooks-list.rst:39
  1699. msgid "**cron, <period>**"
  1700. msgstr ""
  1701. #: ../../guides/hooks-list.rst:39
  1702. msgid "Triggered by cron for each period."
  1703. msgstr ""
  1704. #: ../../guides/hooks-list.rst:42
  1705. msgid "**validate, input**"
  1706. msgstr ""
  1707. #: ../../guides/hooks-list.rst:42
  1708. msgid "Filter GET and POST input. This is used by ``get_input()`` to sanitize user input."
  1709. msgstr ""
  1710. #: ../../guides/hooks-list.rst:45
  1711. msgid "**geocode, location**"
  1712. msgstr ""
  1713. #: ../../guides/hooks-list.rst:45
  1714. msgid "Deprecated as of 1.9."
  1715. msgstr ""
  1716. #: ../../guides/hooks-list.rst:48
  1717. msgid "Filters the output for a diagnostic report."
  1718. msgstr ""
  1719. #: ../../guides/hooks-list.rst:60
  1720. msgid "**debug, log**"
  1721. msgstr ""
  1722. #: ../../guides/hooks-list.rst:51
  1723. msgid "Triggered by the Logger. Return false to stop the default logging method. ``$params`` includes:"
  1724. msgstr ""
  1725. #: ../../guides/hooks-list.rst:57
  1726. msgid "level - The debug level. One of:"
  1727. msgstr ""
  1728. #: ../../guides/hooks-list.rst:54
  1729. msgid "``Elgg_Logger::OFF``"
  1730. msgstr ""
  1731. #: ../../guides/hooks-list.rst:55
  1732. msgid "``Elgg_Logger::ERROR``"
  1733. msgstr ""
  1734. #: ../../guides/hooks-list.rst:56
  1735. msgid "``Elgg_Logger::WARNING``"
  1736. msgstr ""
  1737. #: ../../guides/hooks-list.rst:57
  1738. msgid "``Elgg_Logger::NOTICE``"
  1739. msgstr ""
  1740. #: ../../guides/hooks-list.rst:58
  1741. msgid "``Elgg_Logger::INFO``"
  1742. msgstr ""
  1743. #: ../../guides/hooks-list.rst:59
  1744. msgid "msg - The message"
  1745. msgstr ""
  1746. #: ../../guides/hooks-list.rst:60
  1747. msgid "display - Should this message be displayed?"
  1748. msgstr ""
  1749. #: ../../guides/hooks-list.rst:63
  1750. msgid "**format, friendly:title**"
  1751. msgstr ""
  1752. #: ../../guides/hooks-list.rst:63
  1753. msgid "Formats the \"friendly\" title for strings. This is used for generating URLs."
  1754. msgstr ""
  1755. #: ../../guides/hooks-list.rst:66
  1756. msgid "**format, friendly:time**"
  1757. msgstr ""
  1758. #: ../../guides/hooks-list.rst:66
  1759. msgid "Formats the \"friendly\" time for the timestamp ``$params['time']``."
  1760. msgstr ""
  1761. #: ../../guides/hooks-list.rst:70
  1762. msgid "**format, strip_tags**"
  1763. msgstr ""
  1764. #: ../../guides/hooks-list.rst:69
  1765. msgid "Filters a string to remove tags. The original string is passed as ``$params['original_string']`` and an optional set of allowed tags is passed as ``$params['allowed_tags']``."
  1766. msgstr ""
  1767. #: ../../guides/hooks-list.rst:75
  1768. msgid "**output:before, page**"
  1769. msgstr ""
  1770. #: ../../guides/hooks-list.rst:73
  1771. msgid "In ``elgg_view_page()``, this filters ``$vars`` before it's passed to the page shell view (``page/<page_shell>``). To stop sending the X-Frame-Options header, unregister the handler ``_elgg_views_send_header_x_frame_options()`` from this hook."
  1772. msgstr ""
  1773. #: ../../guides/hooks-list.rst:78
  1774. msgid "**output, page**"
  1775. msgstr ""
  1776. #: ../../guides/hooks-list.rst:78
  1777. msgid "In ``elgg_view_page()``, this filters the output return value."
  1778. msgstr ""
  1779. #: ../../guides/hooks-list.rst:81
  1780. msgid "**output:before, layout**"
  1781. msgstr ""
  1782. #: ../../guides/hooks-list.rst:81
  1783. msgid "In ``elgg_view_layout()``, filters ``$params`` before it's passed to the layout view."
  1784. msgstr ""
  1785. #: ../../guides/hooks-list.rst:84
  1786. msgid "**output:after, layout**"
  1787. msgstr ""
  1788. #: ../../guides/hooks-list.rst:84
  1789. msgid "In ``elgg_view_layout()``, filters the return value of the layout view."
  1790. msgstr ""
  1791. #: ../../guides/hooks-list.rst:88
  1792. msgid "**output, ajax**"
  1793. msgstr ""
  1794. #: ../../guides/hooks-list.rst:87
  1795. msgid "Triggered in the ajax forward hook that is called for ajax requests. Allows plugins to alter the output returned, including the forward URL, system messages, and errors."
  1796. msgstr ""
  1797. #: ../../guides/hooks-list.rst:91
  1798. msgid "**parameters, menu:<menu_name>**"
  1799. msgstr ""
  1800. #: ../../guides/hooks-list.rst:91
  1801. msgid "Triggered by ``elgg_view_menu()``. Used to change menu variables (like sort order) before it is generated."
  1802. msgstr ""
  1803. #: ../../guides/hooks-list.rst:94
  1804. msgid "**register, menu:<menu_name>**"
  1805. msgstr ""
  1806. #: ../../guides/hooks-list.rst:94
  1807. msgid "Triggered by ``elgg_view_menu()``. Used to add dynamic menu items."
  1808. msgstr ""
  1809. #: ../../guides/hooks-list.rst:97
  1810. msgid "**prepare, menu:<menu_name>**"
  1811. msgstr ""
  1812. #: ../../guides/hooks-list.rst:97
  1813. msgid "Trigger by ``elgg_view_menu()``. Used to sort, add, remove, and modify menu items."
  1814. msgstr ""
  1815. #: ../../guides/hooks-list.rst:100
  1816. msgid "**creating, river**"
  1817. msgstr ""
  1818. #: ../../guides/hooks-list.rst:100
  1819. msgid "Triggered before a river item is created. Return false to prevent river item from being created."
  1820. msgstr ""
  1821. #: ../../guides/hooks-list.rst:103
  1822. msgid "**simplecache:generate, <view>**"
  1823. msgstr ""
  1824. #: ../../guides/hooks-list.rst:103
  1825. msgid "Triggered when generating the cached content of a view."
  1826. msgstr ""
  1827. #: ../../guides/hooks-list.rst:107
  1828. msgid "**get, subscriptions**"
  1829. msgstr ""
  1830. #: ../../guides/hooks-list.rst:106
  1831. msgid "Filter notification subscriptions for users for the Elgg_Notifications_Event ``$params['event']``. Return an array like:"
  1832. msgstr ""
  1833. #: ../../guides/hooks-list.rst:118
  1834. msgid "**prepare, breadcrumbs**"
  1835. msgstr ""
  1836. #: ../../guides/hooks-list.rst:117
  1837. msgid "In elgg_get_breadcrumbs(), this filters the registered breadcrumbs before returning them, allowing a plugin to alter breadcrumb strategy site-wide."
  1838. msgstr ""
  1839. #: ../../guides/hooks-list.rst:120
  1840. msgid "**add, river**"
  1841. msgstr ""
  1842. #: ../../guides/hooks-list.rst:123
  1843. msgid "User hooks"
  1844. msgstr ""
  1845. #: ../../guides/hooks-list.rst:127
  1846. msgid "**usersettings:save, user**"
  1847. msgstr ""
  1848. #: ../../guides/hooks-list.rst:126
  1849. msgid "Triggered in the aggregate action to save user settings. Return false prevent sticky forms from being cleared."
  1850. msgstr ""
  1851. #: ../../guides/hooks-list.rst:131
  1852. #: ../../guides/hooks-list.rst:251
  1853. msgid "**access:collections:write, user**"
  1854. msgstr ""
  1855. #: ../../guides/hooks-list.rst:130
  1856. msgid "Filters an array of access permissions that the user ``$params['user_id']`` is allowed to save content with. Permissions returned are of the form (id => 'Human Readable Name')."
  1857. msgstr ""
  1858. #: ../../guides/hooks-list.rst:134
  1859. msgid "**registeruser:validate:username, all**"
  1860. msgstr ""
  1861. #: ../../guides/hooks-list.rst:134
  1862. msgid "Return boolean for if the string in ``$params['username']`` is valid for a username."
  1863. msgstr ""
  1864. #: ../../guides/hooks-list.rst:137
  1865. msgid "**registeruser:validate:password, all**"
  1866. msgstr ""
  1867. #: ../../guides/hooks-list.rst:137
  1868. msgid "Return boolean for if the string in ``$params['password']`` is valid for a password."
  1869. msgstr ""
  1870. #: ../../guides/hooks-list.rst:140
  1871. msgid "**registeruser:validate:email, all**"
  1872. msgstr ""
  1873. #: ../../guides/hooks-list.rst:140
  1874. msgid "Return boolean for if the string in ``$params['email']`` is valid for an email address."
  1875. msgstr ""
  1876. #: ../../guides/hooks-list.rst:144
  1877. msgid "**register, user**"
  1878. msgstr ""
  1879. #: ../../guides/hooks-list.rst:143
  1880. msgid "Triggered by the ``register`` action after the user registers. Return ``false`` to delete the user. Note the function ``register_user`` does *not* trigger this hook."
  1881. msgstr ""
  1882. #: ../../guides/hooks-list.rst:147
  1883. msgid "**login:forward, user**"
  1884. msgstr ""
  1885. #: ../../guides/hooks-list.rst:147
  1886. msgid "Filters the URL to which the user will be forwarded after login."
  1887. msgstr ""
  1888. #: ../../guides/hooks-list.rst:150
  1889. msgid "**find_active_users, system**"
  1890. msgstr ""
  1891. #: ../../guides/hooks-list.rst:150
  1892. msgid "Return the number of active users."
  1893. msgstr ""
  1894. #: ../../guides/hooks-list.rst:153
  1895. msgid "**status, user**"
  1896. msgstr ""
  1897. #: ../../guides/hooks-list.rst:153
  1898. msgid "Triggered by The Wire when adding a post."
  1899. msgstr ""
  1900. #: ../../guides/hooks-list.rst:158
  1901. msgid "**username:character_blacklist, user**"
  1902. msgstr ""
  1903. #: ../../guides/hooks-list.rst:156
  1904. msgid "Filters the string of blacklisted characters used to validate username during registration. The return value should be a string consisting of the disallowed characters. The default string can be found from ``$params['blacklist']``."
  1905. msgstr ""
  1906. #: ../../guides/hooks-list.rst:161
  1907. msgid "Object hooks"
  1908. msgstr ""
  1909. #: ../../guides/hooks-list.rst:165
  1910. msgid "**comments, <entity_type>**"
  1911. msgstr ""
  1912. #: ../../guides/hooks-list.rst:164
  1913. msgid "Triggered in ``elgg_view_comments()``. If returning content, this overrides the ``page/elements/comments`` view."
  1914. msgstr ""
  1915. #: ../../guides/hooks-list.rst:168
  1916. msgid "**comments:count, <entity_type>**"
  1917. msgstr ""
  1918. #: ../../guides/hooks-list.rst:168
  1919. msgid "Return the number of comments on ``$params['entity']``."
  1920. msgstr ""
  1921. #: ../../guides/hooks-list.rst:171
  1922. msgid "**likes:count, <entity_type>**"
  1923. msgstr ""
  1924. #: ../../guides/hooks-list.rst:171
  1925. msgid "Return the number of likes for ``$params['entity']``."
  1926. msgstr ""
  1927. #: ../../guides/hooks-list.rst:174
  1928. msgid "Action hooks"
  1929. msgstr ""
  1930. #: ../../guides/hooks-list.rst:177
  1931. msgid "**action, <action>**"
  1932. msgstr ""
  1933. #: ../../guides/hooks-list.rst:177
  1934. msgid "Triggered before executing action scripts. Return false to abort action."
  1935. msgstr ""
  1936. #: ../../guides/hooks-list.rst:180
  1937. msgid "**action_gatekeeper:permissions:check, all**"
  1938. msgstr ""
  1939. #: ../../guides/hooks-list.rst:180
  1940. msgid "Triggered after a CSRF token is validated. Return false to prevent validation."
  1941. msgstr ""
  1942. #: ../../guides/hooks-list.rst:184
  1943. msgid "**action_gatekeeper:upload_exceeded_msg, all**"
  1944. msgstr ""
  1945. #: ../../guides/hooks-list.rst:183
  1946. msgid "Triggered when a POST exceeds the max size allowed by the server. Return an error message to display."
  1947. msgstr ""
  1948. #: ../../guides/hooks-list.rst:187
  1949. msgid "**forward, <reason>**"
  1950. msgstr ""
  1951. #: ../../guides/hooks-list.rst:187
  1952. msgid "Filter the URL to forward a user to when ``forward($url, $reason)`` is called."
  1953. msgstr ""
  1954. #: ../../guides/hooks-list.rst:192
  1955. msgid "Permission hooks"
  1956. msgstr ""
  1957. #: ../../guides/hooks-list.rst:196
  1958. msgid "**container_permissions_check, <entity_type>**"
  1959. msgstr ""
  1960. #: ../../guides/hooks-list.rst:195
  1961. msgid "Return boolean for if the user ``$params['user']`` can use the entity ``$params['container']`` as a container for an entity of ``<entity_type>`` and subtype ``$params['subtype']``."
  1962. msgstr ""
  1963. #: ../../guides/hooks-list.rst:199
  1964. msgid "**permissions_check, <entity_type>**"
  1965. msgstr ""
  1966. #: ../../guides/hooks-list.rst:199
  1967. msgid "Return boolean for if the user ``$params['user']`` can edit the entity ``$params['entity']``."
  1968. msgstr ""
  1969. #: ../../guides/hooks-list.rst:202
  1970. msgid "**permissions_check:delete, <entity_type>**"
  1971. msgstr ""
  1972. #: ../../guides/hooks-list.rst:202
  1973. msgid "Return boolean for if the user ``$params['user']`` can delete the entity ``$params['entity']``. Defaults to ``$entity->canEdit()``."
  1974. msgstr ""
  1975. #: ../../guides/hooks-list.rst:206
  1976. msgid "**permissions_check, widget_layout**"
  1977. msgstr ""
  1978. #: ../../guides/hooks-list.rst:205
  1979. msgid "Return boolean for if ``$params['user']`` can edit the widgets in the context passed as ``$params['context']`` and with a page owner of ``$params['page_owner']``."
  1980. msgstr ""
  1981. #: ../../guides/hooks-list.rst:210
  1982. msgid "**permissions_check:metadata, <entity_type>**"
  1983. msgstr ""
  1984. #: ../../guides/hooks-list.rst:209
  1985. msgid "Return boolean for if the user ``$params['user']`` can edit the metadata ``$params['metadata']`` on the entity ``$params['entity']``."
  1986. msgstr ""
  1987. #: ../../guides/hooks-list.rst:213
  1988. msgid "**permissions_check:comment, <entity_type>**"
  1989. msgstr ""
  1990. #: ../../guides/hooks-list.rst:213
  1991. msgid "Return boolean for if the user ``$params['user']`` can comment on the entity ``$params['entity']``."
  1992. msgstr ""
  1993. #: ../../guides/hooks-list.rst:219
  1994. msgid "**permissions_check:annotate:<annotation_name>, <entity_type>**"
  1995. msgstr ""
  1996. #: ../../guides/hooks-list.rst:216
  1997. msgid "Return boolean for if the user ``$params['user']`` can create an annotation ``<annotation_name>`` on the entity ``$params['entity']``. If logged in, the default is true."
  1998. msgstr ""
  1999. #: ../../guides/hooks-list.rst:219
  2000. msgid "This is called before the more general ``permissions_check:annotate`` hook, and its return value is that hook's initial value."
  2001. msgstr ""
  2002. #: ../../guides/hooks-list.rst:225
  2003. msgid "**permissions_check:annotate, <entity_type>**"
  2004. msgstr ""
  2005. #: ../../guides/hooks-list.rst:222
  2006. msgid "Return boolean for if the user ``$params['user']`` can create an annotation ``$params['annotation_name']`` on the entity ``$params['entity']``. if logged in, the default is true."
  2007. msgstr ""
  2008. #: ../../guides/hooks-list.rst:225
  2009. msgid "This is functions differently than the ``permissions_check:metadata`` hook by passing the annotation name instead of the metadata object."
  2010. msgstr ""
  2011. #: ../../guides/hooks-list.rst:229
  2012. msgid "**permissions_check:annotation**"
  2013. msgstr ""
  2014. #: ../../guides/hooks-list.rst:228
  2015. msgid "Return boolean for if the user in ``$params['user']`` can edit the annotation ``$params['annotation']`` on the entity ``$params['entity']``. The user can be null."
  2016. msgstr ""
  2017. #: ../../guides/hooks-list.rst:233
  2018. msgid "**fail, auth**"
  2019. msgstr ""
  2020. #: ../../guides/hooks-list.rst:232
  2021. msgid "Return the failure message if authentication failed. An array of previous PAM failure methods is passed as ``$params``."
  2022. msgstr ""
  2023. #: ../../guides/hooks-list.rst:236
  2024. msgid "**api_key, use**"
  2025. msgstr ""
  2026. #: ../../guides/hooks-list.rst:236
  2027. msgid "Triggered by ``api_auth_key()``. Returning false prevents the key from being authenticated."
  2028. msgstr ""
  2029. #: ../../guides/hooks-list.rst:241
  2030. msgid "**access:collections:read, user**"
  2031. msgstr ""
  2032. #: ../../guides/hooks-list.rst:239
  2033. msgid "Filters an array of access IDs that the user ``$params['user_id']`` can see."
  2034. msgstr ""
  2035. #: ../../guides/hooks-list.rst:241
  2036. #: ../../guides/hooks-list.rst:251
  2037. msgid "The handler needs to either not use parts of the API that use the access system (triggering the hook again) or to ignore the second call. Otherwise, an infinite loop will be created."
  2038. msgstr ""
  2039. #: ../../guides/hooks-list.rst:244
  2040. msgid "Filters an array of access IDs that the user ``$params['user_id']`` can write to. In get_write_access_array(), this hook filters the return value, so it can be used to alter the available options in the input/access view. For core plugins, the value \"input_params\" has the keys \"entity\" (ElggEntity|false), \"entity_type\" (string), \"entity_subtype\" (string), \"container_guid\" (int) are provided. An empty entity value generally means the form is to create a new object."
  2041. msgstr ""
  2042. #: ../../guides/hooks-list.rst:254
  2043. msgid "**access:collections:addcollection, collection**"
  2044. msgstr ""
  2045. #: ../../guides/hooks-list.rst:254
  2046. msgid "Triggered after an access collection ``$params['collection_id']`` is created."
  2047. msgstr ""
  2048. #: ../../guides/hooks-list.rst:258
  2049. msgid "**access:collections:deletecollection, collection**"
  2050. msgstr ""
  2051. #: ../../guides/hooks-list.rst:257
  2052. msgid "Triggered before an access collection ``$params['collection_id']`` is deleted. Return false to prevent deletion."
  2053. msgstr ""
  2054. #: ../../guides/hooks-list.rst:262
  2055. msgid "**access:collections:add_user, collection**"
  2056. msgstr ""
  2057. #: ../../guides/hooks-list.rst:261
  2058. msgid "Triggered before adding user ``$params['user_id']`` to collection ``$params['collection_id']``. Return false to prevent adding."
  2059. msgstr ""
  2060. #: ../../guides/hooks-list.rst:266
  2061. msgid "**access:collections:remove_user, collection**"
  2062. msgstr ""
  2063. #: ../../guides/hooks-list.rst:265
  2064. msgid "Triggered before removing user ``$params['user_id']`` to collection ``$params['collection_id']``. Return false to prevent removal."
  2065. msgstr ""
  2066. #: ../../guides/hooks-list.rst:269
  2067. msgid "**get_sql, access**"
  2068. msgstr ""
  2069. #: ../../guides/hooks-list.rst:269
  2070. msgid "Filters the SQL clauses used in ``_elgg_get_access_where_sql()``."
  2071. msgstr ""
  2072. #: ../../guides/hooks-list.rst:274
  2073. #: ../../guides/plugins/plugin-skeleton.rst:152
  2074. #: ../../guides/views.rst:2
  2075. msgid "Views"
  2076. msgstr ""
  2077. #: ../../guides/hooks-list.rst:277
  2078. msgid "**view_vars, <view_name>**"
  2079. msgstr ""
  2080. #: ../../guides/hooks-list.rst:277
  2081. msgid "Filters the ``$vars`` array passed to the view"
  2082. msgstr ""
  2083. #: ../../guides/hooks-list.rst:280
  2084. msgid "**view, <view_name>**"
  2085. msgstr ""
  2086. #: ../../guides/hooks-list.rst:280
  2087. msgid "Filters the returned content of the view"
  2088. msgstr ""
  2089. #: ../../guides/hooks-list.rst:283
  2090. msgid "**layout, page**"
  2091. msgstr ""
  2092. #: ../../guides/hooks-list.rst:283
  2093. msgid "In ``elgg_view_layout()``, filters the layout name"
  2094. msgstr ""
  2095. #: ../../guides/hooks-list.rst:286
  2096. msgid "**shell, page**"
  2097. msgstr ""
  2098. #: ../../guides/hooks-list.rst:286
  2099. msgid "In ``elgg_view_page()``, filters the page shell name"
  2100. msgstr ""
  2101. #: ../../guides/hooks-list.rst:289
  2102. msgid "**head, page**"
  2103. msgstr ""
  2104. #: ../../guides/hooks-list.rst:289
  2105. msgid "In ``elgg_view_page()``, filters ``$vars['head']``"
  2106. msgstr ""
  2107. #: ../../guides/hooks-list.rst:292
  2108. msgid "Files"
  2109. msgstr ""
  2110. #: ../../guides/hooks-list.rst:296
  2111. msgid "**mime_type, file**"
  2112. msgstr ""
  2113. #: ../../guides/hooks-list.rst:295
  2114. msgid "Return the mimetype for the filename ``$params['filename']`` with original filename ``$params['original_filename']`` and with the default detected mimetype of ``$params['default']``."
  2115. msgstr ""
  2116. #: ../../guides/hooks-list.rst:303
  2117. msgid "**simple_type, file**"
  2118. msgstr ""
  2119. #: ../../guides/hooks-list.rst:299
  2120. msgid "In ``elgg_get_file_simple_type()``, filters the return value. The hook uses ``$params['mime_type']`` (e.g. ``application/pdf`` or ``image/jpeg``) and determines an overall category like ``document`` or ``image``. The bundled file plugin and other-third party plugins usually store ``simpletype`` metadata on file entities and make use of it when serving icons and constructing ``ege*`` filters and menus."
  2121. msgstr ""
  2122. #: ../../guides/hooks-list.rst:308
  2123. msgid "Other"
  2124. msgstr ""
  2125. #: ../../guides/hooks-list.rst:311
  2126. msgid "**config, comments_per_page**"
  2127. msgstr ""
  2128. #: ../../guides/hooks-list.rst:311
  2129. msgid "Filters the number of comments displayed per page. Default is 25."
  2130. msgstr ""
  2131. #: ../../guides/hooks-list.rst:318
  2132. msgid "**default, access**"
  2133. msgstr ""
  2134. #: ../../guides/hooks-list.rst:314
  2135. msgid "In get_default_access(), this hook filters the return value, so it can be used to alter the default value in the input/access view. For core plugins, the value \"input_params\" has the keys \"entity\" (ElggEntity|false), \"entity_type\" (string), \"entity_subtype\" (string), \"container_guid\" (int) are provided. An empty entity value generally means the form is to create a new object."
  2136. msgstr ""
  2137. #: ../../guides/hooks-list.rst:333
  2138. msgid "**entity:icon:url, <entity_type>**"
  2139. msgstr ""
  2140. #: ../../guides/hooks-list.rst:321
  2141. msgid "Triggered when entity icon URL is requested, see :ref:`entity icons <guides/database#entity-icons>`. Callback should return URL for the icon of size ``$params['size']`` for the entity ``$params['entity']``. Following parameters are available through the ``$params`` array:"
  2142. msgstr ""
  2143. #: ../../guides/hooks-list.rst:325
  2144. msgid "entity"
  2145. msgstr ""
  2146. #: ../../guides/hooks-list.rst:326
  2147. msgid "Entity for which icon url is requested."
  2148. msgstr ""
  2149. #: ../../guides/hooks-list.rst:327
  2150. msgid "viewtype"
  2151. msgstr ""
  2152. #: ../../guides/hooks-list.rst:328
  2153. msgid "The type of :ref:`view <guides/views#listing-entities>` e.g. ``'default'`` or ``'json'``."
  2154. msgstr ""
  2155. #: ../../guides/hooks-list.rst:330
  2156. msgid "size"
  2157. msgstr ""
  2158. #: ../../guides/hooks-list.rst:330
  2159. msgid "Size requested, see :ref:`entity icons <guides/database#entity-icons>` for possible values."
  2160. msgstr ""
  2161. #: ../../guides/hooks-list.rst:332
  2162. msgid "Example on how one could default to a Gravatar icon for users that have not yet uploaded an avatar:"
  2163. msgstr ""
  2164. #: ../../guides/hooks-list.rst:369
  2165. msgid "**entity:url, <entity_type>**"
  2166. msgstr ""
  2167. #: ../../guides/hooks-list.rst:367
  2168. msgid "Return the URL for the entity ``$params['entity']``. Note: Generally it is better to override the ``getUrl()`` method of ElggEntity. This hook should be used when it's not possible to subclass (like if you want to extend a bundled plugin without overriding many views)."
  2169. msgstr ""
  2170. #: ../../guides/hooks-list.rst:373
  2171. msgid "**to:object, <entity_type|metadata|annotation|relationship|river_item>**"
  2172. msgstr ""
  2173. #: ../../guides/hooks-list.rst:372
  2174. msgid "Converts the entity ``$params['entity']`` to a StdClass object. This is used mostly for exporting entity properties for portable data formats like JSON and XML."
  2175. msgstr ""
  2176. #: ../../guides/hooks-list.rst:376
  2177. msgid "**extender:url, <annotation|metadata>**"
  2178. msgstr ""
  2179. #: ../../guides/hooks-list.rst:376
  2180. msgid "Return the URL for the annotation or metadatum ``$params['extender']``."
  2181. msgstr ""
  2182. #: ../../guides/hooks-list.rst:379
  2183. msgid "**file:icon:url, override**"
  2184. msgstr ""
  2185. #: ../../guides/hooks-list.rst:379
  2186. msgid "Override a file icon URL."
  2187. msgstr ""
  2188. #: ../../guides/hooks-list.rst:382
  2189. msgid "**is_member, group**"
  2190. msgstr ""
  2191. #: ../../guides/hooks-list.rst:382
  2192. msgid "Return boolean for if the user ``$params['user']`` is a member of the group ``$params['group']``."
  2193. msgstr ""
  2194. #: ../../guides/hooks-list.rst:386
  2195. msgid "**entity:annotate, <entity_type>**"
  2196. msgstr ""
  2197. #: ../../guides/hooks-list.rst:385
  2198. msgid "Triggered in ``elgg_view_entity_annotations()``, which is called by ``elgg_view_entity()``. Can be used to add annotations to all full entity views."
  2199. msgstr ""
  2200. #: ../../guides/hooks-list.rst:395
  2201. msgid "**usersetting, plugin**"
  2202. msgstr ""
  2203. #: ../../guides/hooks-list.rst:389
  2204. msgid "Filter user settings for plugins. ``$params`` contains:"
  2205. msgstr ""
  2206. #: ../../guides/hooks-list.rst:391
  2207. msgid "``user`` - An ElggUser instance"
  2208. msgstr ""
  2209. #: ../../guides/hooks-list.rst:392
  2210. #: ../../guides/hooks-list.rst:400
  2211. msgid "``plugin`` - An ElggPlugin instance"
  2212. msgstr ""
  2213. #: ../../guides/hooks-list.rst:393
  2214. #: ../../guides/hooks-list.rst:401
  2215. msgid "``plugin_id`` - The plugin ID"
  2216. msgstr ""
  2217. #: ../../guides/hooks-list.rst:394
  2218. #: ../../guides/hooks-list.rst:402
  2219. msgid "``name`` - The name of the setting"
  2220. msgstr ""
  2221. #: ../../guides/hooks-list.rst:395
  2222. #: ../../guides/hooks-list.rst:403
  2223. msgid "``value`` - The value to set"
  2224. msgstr ""
  2225. #: ../../guides/hooks-list.rst:403
  2226. msgid "**setting, plugin**"
  2227. msgstr ""
  2228. #: ../../guides/hooks-list.rst:398
  2229. msgid "Filter plugin settings. ``$params`` contains:"
  2230. msgstr ""
  2231. #: ../../guides/hooks-list.rst:406
  2232. msgid "**relationship:url, <relationship_name>**"
  2233. msgstr ""
  2234. #: ../../guides/hooks-list.rst:406
  2235. msgid "Filter the URL for the relationship object ``$params['relationship']``."
  2236. msgstr ""
  2237. #: ../../guides/hooks-list.rst:410
  2238. msgid "**profile:fields, group**"
  2239. msgstr ""
  2240. #: ../../guides/hooks-list.rst:409
  2241. #: ../../guides/hooks-list.rst:420
  2242. msgid "Filter an array of profile fields. The result should be returned as an array in the format ``name => input view name``. For example:"
  2243. msgstr ""
  2244. #: ../../guides/hooks-list.rst:421
  2245. msgid "**profile:fields, profile**"
  2246. msgstr ""
  2247. #: ../../guides/hooks-list.rst:431
  2248. msgid "**widget_settings, <widget_handler>**"
  2249. msgstr ""
  2250. #: ../../guides/hooks-list.rst:430
  2251. msgid "Triggered when saving a widget settings ``$params['params']`` for widget ``$params['widget']``. If handling saving the settings, the handler should return true to prevent the default code from running."
  2252. msgstr ""
  2253. #: ../../guides/hooks-list.rst:435
  2254. msgid "**get_list, default_widgets**"
  2255. msgstr ""
  2256. #: ../../guides/hooks-list.rst:434
  2257. msgid "Filters a list of default widgets to add for newly registered users. The list is an array of arrays in the format:"
  2258. msgstr ""
  2259. #: ../../guides/hooks-list.rst:448
  2260. msgid "**rest, init**"
  2261. msgstr ""
  2262. #: ../../guides/hooks-list.rst:447
  2263. msgid "Triggered by the web services rest handler. Plugins can set up their own authentication handlers, then return true to prevent the default handlers from being registered."
  2264. msgstr ""
  2265. #: ../../guides/hooks-list.rst:452
  2266. msgid "**public_pages, walled_garden**"
  2267. msgstr ""
  2268. #: ../../guides/hooks-list.rst:451
  2269. msgid "Filter the URLs that are can be seen by logged out users if Walled Garden is enabled. ``$value`` is an array of regex strings that will allow access if matched."
  2270. msgstr ""
  2271. #: ../../guides/hooks-list.rst:457
  2272. msgid "**volatile, metadata**"
  2273. msgstr ""
  2274. #: ../../guides/hooks-list.rst:455
  2275. msgid "Triggered when exporting an entity through the export handler. This is rare. This allows handler to handle any volatile (non-persisted) metadata on the entity. It's preferred to use the ``to:object, <type>`` hook."
  2276. msgstr ""
  2277. #: ../../guides/hooks-list.rst:461
  2278. msgid "**maintenance:allow, url**"
  2279. msgstr ""
  2280. #: ../../guides/hooks-list.rst:461
  2281. msgid "Return boolean if the URL ``$params['current_url']`` and the path ``$params['current_path']``"
  2282. msgstr ""
  2283. #: ../../guides/hooks-list.rst:461
  2284. msgid "is allowed during maintenance mode."
  2285. msgstr ""
  2286. #: ../../guides/hooks-list.rst:464
  2287. msgid "**robots.txt, site**"
  2288. msgstr ""
  2289. #: ../../guides/hooks-list.rst:464
  2290. msgid "Filter the robots.txt values for ``$params['site']``."
  2291. msgstr ""
  2292. #: ../../guides/hooks-list.rst:467
  2293. msgid "**config, amd**"
  2294. msgstr ""
  2295. #: ../../guides/hooks-list.rst:467
  2296. msgid "Filter the AMD config for the requirejs library."
  2297. msgstr ""
  2298. #: ../../guides/hooks-list.rst:473
  2299. msgid "Embed"
  2300. msgstr ""
  2301. #: ../../guides/hooks-list.rst:475
  2302. msgid "**embed_get_items, <active_section>**"
  2303. msgstr ""
  2304. #: ../../guides/hooks-list.rst:477
  2305. msgid "**embed_get_sections, all**"
  2306. msgstr ""
  2307. #: ../../guides/hooks-list.rst:479
  2308. msgid "**embed_get_upload_sections, all**"
  2309. msgstr ""
  2310. #: ../../guides/hooks-list.rst:482
  2311. msgid "HTMLawed"
  2312. msgstr ""
  2313. #: ../../guides/hooks-list.rst:485
  2314. msgid "**allowed_styles, htmlawed**"
  2315. msgstr ""
  2316. #: ../../guides/hooks-list.rst:485
  2317. msgid "Filter the HTMLawed allowed style array."
  2318. msgstr ""
  2319. #: ../../guides/hooks-list.rst:488
  2320. msgid "**config, htmlawed**"
  2321. msgstr ""
  2322. #: ../../guides/hooks-list.rst:488
  2323. msgid "Filter the HTMLawed config array."
  2324. msgstr ""
  2325. #: ../../guides/hooks-list.rst:491
  2326. msgid "Members"
  2327. msgstr ""
  2328. #: ../../guides/hooks-list.rst:494
  2329. msgid "**members:list, <page_segment>**"
  2330. msgstr ""
  2331. #: ../../guides/hooks-list.rst:494
  2332. msgid "To handle the page ``/members/$page_segment``, register for this hook and return the HTML of the list."
  2333. msgstr ""
  2334. #: ../../guides/hooks-list.rst:498
  2335. msgid "**members:config, tabs**"
  2336. msgstr ""
  2337. #: ../../guides/hooks-list.rst:497
  2338. msgid "This hook is used to assemble an array of tabs to be passed to the navigation/tabs view for the members pages."
  2339. msgstr ""
  2340. #: ../../guides/hooks-list.rst:501
  2341. msgid "Twitter API"
  2342. msgstr ""
  2343. #: ../../guides/hooks-list.rst:505
  2344. msgid "**authorize, twitter_api**"
  2345. msgstr ""
  2346. #: ../../guides/hooks-list.rst:504
  2347. msgid "Triggered when a user is authorizes Twitter for a login. ``$params['token']`` contains the Twitter authorization token."
  2348. msgstr ""
  2349. #: ../../guides/hooks-list.rst:508
  2350. msgid "Reported Content"
  2351. msgstr ""
  2352. #: ../../guides/hooks-list.rst:511
  2353. msgid "**reportedcontent:add, system**"
  2354. msgstr ""
  2355. #: ../../guides/hooks-list.rst:511
  2356. msgid "Triggered after adding the reported content object ``$params['report']``. Return false to delete report."
  2357. msgstr ""
  2358. #: ../../guides/hooks-list.rst:514
  2359. msgid "**reportedcontent:archive, system**"
  2360. msgstr ""
  2361. #: ../../guides/hooks-list.rst:514
  2362. msgid "Triggered before archiving the reported content object ``$params['report']``. Return false to prevent archiving."
  2363. msgstr ""
  2364. #: ../../guides/hooks-list.rst:517
  2365. msgid "**reportedcontent:delete, system**"
  2366. msgstr ""
  2367. #: ../../guides/hooks-list.rst:517
  2368. msgid "Triggered before deleting the reported content object ``$params['report']``. Return false to prevent deleting."
  2369. msgstr ""
  2370. #: ../../guides/hooks-list.rst:520
  2371. msgid "Search"
  2372. msgstr ""
  2373. #: ../../guides/hooks-list.rst:524
  2374. msgid "**search, <type>:<subtype>**"
  2375. msgstr ""
  2376. #: ../../guides/hooks-list.rst:523
  2377. msgid "Filter more granular search results than searching by type alone. Must return an array with ``count`` as the total count of results and ``entities`` an array of ElggUser entities."
  2378. msgstr ""
  2379. #: ../../guides/hooks-list.rst:526
  2380. msgid "**search, tags**"
  2381. msgstr ""
  2382. #: ../../guides/hooks-list.rst:530
  2383. msgid "**search, <type>**"
  2384. msgstr ""
  2385. #: ../../guides/hooks-list.rst:529
  2386. msgid "Filter the search for entities for type ``$type``. Must return an array with ``count`` as the total count of results and ``entities`` an array of ElggUser entities."
  2387. msgstr ""
  2388. #: ../../guides/hooks-list.rst:533
  2389. msgid "Filter an array of search types. This allows plugins to add custom types that don't correspond directly to entities."
  2390. msgstr ""
  2391. #: ../../guides/hooks-list.rst:537
  2392. msgid "**search_types, get_queries**"
  2393. msgstr ""
  2394. #: ../../guides/hooks-list.rst:537
  2395. msgid "Before a search this filters the types queried. This can be used to reorder the display of search results."
  2396. msgstr ""
  2397. #: ../../guides/i18n.rst:2
  2398. msgid "Internationalization"
  2399. msgstr ""
  2400. #: ../../guides/i18n.rst:4
  2401. msgid "Make your UI translatable into many different languages."
  2402. msgstr ""
  2403. #: ../../guides/i18n.rst:6
  2404. msgid "If you’d like to contribute translations to Elgg, see :doc:`the contributors' guide </about/contributing>`."
  2405. msgstr ""
  2406. #: ../../guides/i18n.rst:11
  2407. msgid "Translations are stored in PHP files in the ``/languages`` directory of your plugin. Each file corresponds to a language. The format is ``/languages/{language-code}.php`` where ``{language-code}`` is the ISO 639-1 short code for the language. For example:"
  2408. msgstr ""
  2409. #: ../../guides/i18n.rst:22
  2410. msgid "The default language is “en” for English."
  2411. msgstr ""
  2412. #: ../../guides/i18n.rst:24
  2413. msgid "To change the wording of any phrase, provide a new mapping in your plugin’s ``{language}.php`` file for the associated key:"
  2414. msgstr ""
  2415. #: ../../guides/i18n.rst:36
  2416. msgid "Unless you are overriding core’s or another plugin’s language strings, it is good practice for the language keys to start with your plugin name. For example: “yourplugin:success,” “yourplugin:title,” etc. This helps avoid conflicts with other language keys."
  2417. msgstr ""
  2418. #: ../../guides/i18n.rst:40
  2419. msgid "Server-side API"
  2420. msgstr ""
  2421. #: ../../guides/i18n.rst:42
  2422. msgid "``elgg_echo($key, $args, $language)``"
  2423. msgstr ""
  2424. #: ../../guides/i18n.rst:44
  2425. msgid "Output the translation of the key in the current language."
  2426. msgstr ""
  2427. #: ../../guides/i18n.rst:46
  2428. #: ../../guides/notifications.rst:24
  2429. #: ../../guides/notifications.rst:167
  2430. #: ../../guides/notifications.rst:191
  2431. #: ../../guides/notifications.rst:246
  2432. msgid "Example:"
  2433. msgstr ""
  2434. #: ../../guides/i18n.rst:52
  2435. msgid "It also supports variable replacement using sprintf syntax:"
  2436. msgstr ""
  2437. #: ../../guides/i18n.rst:62
  2438. msgid "To force which language should be used for translation, set the third parameter:"
  2439. msgstr ""
  2440. #: ../../guides/i18n.rst:71
  2441. msgid "Javascript API"
  2442. msgstr ""
  2443. #: ../../guides/i18n.rst:73
  2444. msgid "``elgg.echo(key, args, language)``"
  2445. msgstr ""
  2446. #: ../../guides/i18n.rst:75
  2447. msgid "This function is the exact counterpart to ``elgg_echo`` in PHP."
  2448. msgstr ""
  2449. #: ../../guides/i18n.rst:77
  2450. msgid "Client-side translations are loaded asynchronously. Ensure translations are available by requiring the \"elgg\" AMD module:"
  2451. msgstr ""
  2452. #: ../../guides/i18n.rst:87
  2453. msgid "Translations are also available after the ``init, system`` JavaScript event."
  2454. msgstr ""
  2455. #: ../../guides/index.rst:2
  2456. msgid "Developer Guides"
  2457. msgstr ""
  2458. #: ../../guides/index.rst:4
  2459. msgid "Customize Elgg's behavior with plugins."
  2460. msgstr ""
  2461. #: ../../guides/javascript.rst:2
  2462. msgid "JavaScript"
  2463. msgstr ""
  2464. #: ../../guides/javascript.rst:4
  2465. msgid "As of Elgg 1.9, we encourage all developers to adopt the `AMD (Asynchronous Module Definition) <http://requirejs.org/docs/whyamd.html>`_ standard for writing JavaScript code in Elgg. The 1.8 version is still functional and is :ref:`described below<1.8-js>`."
  2466. msgstr ""
  2467. #: ../../guides/javascript.rst:13
  2468. msgid "AMD"
  2469. msgstr ""
  2470. #: ../../guides/javascript.rst:15
  2471. msgid "Here we'll describe making and executing AMD modules. The RequireJS documentation for `defining modules <http://requirejs.org/docs/api.html#define>`_ may also be of use."
  2472. msgstr ""
  2473. #: ../../guides/javascript.rst:19
  2474. msgid "Executing a module in the current page"
  2475. msgstr ""
  2476. #: ../../guides/javascript.rst:21
  2477. msgid "Telling Elgg to load an existing module in the current page is easy:"
  2478. msgstr ""
  2479. #: ../../guides/javascript.rst:28
  2480. msgid "On the client-side, this will asynchronously load the module, load any dependencies, and execute the module's definition function, if it has one."
  2481. msgstr ""
  2482. #: ../../guides/javascript.rst:32
  2483. msgid "Defining the Module"
  2484. msgstr ""
  2485. #: ../../guides/javascript.rst:34
  2486. msgid "Here we define a basic module that alters the page, by passing a \"definition function\" to ``define()``:"
  2487. msgstr ""
  2488. #: ../../guides/javascript.rst:47
  2489. msgid "The module's name is determined by the view name, which here is ``js/myplugin/say_hello.js``. We strip the leading ``js/`` and the ``.js`` extension, leaving ``myplugin/say_hello``."
  2490. msgstr ""
  2491. #: ../../guides/javascript.rst:52
  2492. msgid "The definition function **must** have one argument named ``require``."
  2493. msgstr ""
  2494. #: ../../guides/javascript.rst:55
  2495. msgid "Making modules dependent on other modules"
  2496. msgstr ""
  2497. #: ../../guides/javascript.rst:57
  2498. msgid "Below we refactor a bit so that the module depends on a new ``myplugin/hello`` module to provide the greeting:"
  2499. msgstr ""
  2500. #: ../../guides/javascript.rst:82
  2501. msgid "Passing plugin/Elgg settings to modules"
  2502. msgstr ""
  2503. #: ../../guides/javascript.rst:84
  2504. msgid "You can use a PHP-based module to pass values from the server. To make the module ``myplugin/settings``, create the view file ``views/default/js/myplugin/settings.js.php`` (note the double extension ``.js.php``)."
  2505. msgstr ""
  2506. #: ../../guides/javascript.rst:101
  2507. msgid "You must also manually register the view as an external resource:"
  2508. msgstr ""
  2509. #: ../../guides/javascript.rst:111
  2510. msgid "The PHP view is cached, so you should treat the output as static (the same for all users) and avoid session-specific logic."
  2511. msgstr ""
  2512. #: ../../guides/javascript.rst:116
  2513. msgid "Setting the URL of a module"
  2514. msgstr ""
  2515. #: ../../guides/javascript.rst:118
  2516. msgid "You may have a script outside your views you wish to make available as a module."
  2517. msgstr ""
  2518. #: ../../guides/javascript.rst:120
  2519. msgid "In your PHP ``init, system`` event handler, you can use ``elgg_define_js()`` to do this:"
  2520. msgstr ""
  2521. #: ../../guides/javascript.rst:131
  2522. msgid "The ``src`` option in ``elgg_define_js()`` is passed through ``elgg_normalize_url``, so you can use paths relative to the site URL."
  2523. msgstr ""
  2524. #: ../../guides/javascript.rst:135
  2525. msgid "Using traditional JS libraries as modules"
  2526. msgstr ""
  2527. #: ../../guides/javascript.rst:137
  2528. msgid "JavaScript libraries that define global resources can also be defined as AMD modules if you shim them by setting ``exports`` and optionally ``deps``:"
  2529. msgstr ""
  2530. #: ../../guides/javascript.rst:150
  2531. msgid "When this is requested client-side:"
  2532. msgstr ""
  2533. #: ../../guides/javascript.rst:152
  2534. msgid "The jQuery module is loaded, as it's marked as a dependency."
  2535. msgstr ""
  2536. #: ../../guides/javascript.rst:153
  2537. msgid "``http://example.org/elgg/mod/myplugin/vendors/jquery/jquery.form.js`` is loaded and executed."
  2538. msgstr ""
  2539. #: ../../guides/javascript.rst:154
  2540. msgid "The value of ``window.jQuery.fn.ajaxForm`` is returned by the module."
  2541. msgstr ""
  2542. #: ../../guides/javascript.rst:156
  2543. msgid "Calls to ``elgg_define_js()`` must be in an ``init, system`` event handler."
  2544. msgstr ""
  2545. #: ../../guides/javascript.rst:159
  2546. msgid "Some things to note"
  2547. msgstr ""
  2548. #: ../../guides/javascript.rst:161
  2549. msgid "Do not use ``elgg.provide()`` anymore nor other means to attach code to ``elgg`` or other global objects. Use modules."
  2550. msgstr ""
  2551. #: ../../guides/javascript.rst:163
  2552. msgid "Return the value of the module instead of adding to a global variable."
  2553. msgstr ""
  2554. #: ../../guides/javascript.rst:164
  2555. msgid "JS and CSS views (names starting with ``js/`` or ``css/``) as well as static (.js/.css) files are automatically minified and cached by Elgg's simplecache system."
  2556. msgstr ""
  2557. #: ../../guides/javascript.rst:169
  2558. msgid "Migrating JS from Elgg 1.8 to AMD / 1.9"
  2559. msgstr ""
  2560. #: ../../guides/javascript.rst:171
  2561. msgid "**Current 1.8 JavaScript modules will continue to work with Elgg**."
  2562. msgstr ""
  2563. #: ../../guides/javascript.rst:173
  2564. msgid "We do not anticipate any backwards compatibility issues with this new direction and will fix any issues that do come up. The old system will still be functional in Elgg 1.9, but developers are encouraged to begin looking to AMD as the future of JS in Elgg."
  2565. msgstr ""
  2566. #: ../../guides/javascript.rst:180
  2567. msgid "Traditional JavaScript (1.8)"
  2568. msgstr ""
  2569. #: ../../guides/javascript.rst:183
  2570. msgid "Register third-party libraries with ``elgg_register_js``:"
  2571. msgstr ""
  2572. #: ../../guides/javascript.rst:189
  2573. msgid "This will override any URLs previously registered under this name."
  2574. msgstr ""
  2575. #: ../../guides/javascript.rst:191
  2576. msgid "Load a library on the current page with ``elgg_load_js``:"
  2577. msgstr ""
  2578. #: ../../guides/javascript.rst:197
  2579. msgid "This will include and execute the linked code."
  2580. msgstr ""
  2581. #: ../../guides/javascript.rst:204
  2582. msgid "Using inline scripts is strongly discouraged because:"
  2583. msgstr ""
  2584. #: ../../guides/javascript.rst:202
  2585. msgid "They are not testable (maintainability)"
  2586. msgstr ""
  2587. #: ../../guides/javascript.rst:203
  2588. msgid "They are not cacheable (performance)"
  2589. msgstr ""
  2590. #: ../../guides/javascript.rst:204
  2591. msgid "Doing so forces some scripts to be loaded in ``<head>`` (performance)"
  2592. msgstr ""
  2593. #: ../../guides/javascript.rst:206
  2594. msgid "Inline scripts in core or bundled plugins are considered legacy bugs."
  2595. msgstr ""
  2596. #: ../../guides/javascript.rst:209
  2597. msgid "Core functions available in JS"
  2598. msgstr ""
  2599. #: ../../guides/javascript.rst:211
  2600. msgid "``elgg.echo()``"
  2601. msgstr ""
  2602. #: ../../guides/javascript.rst:213
  2603. msgid "Translate interface text"
  2604. msgstr ""
  2605. #: ../../guides/javascript.rst:220
  2606. msgid "``elgg.system_message()``"
  2607. msgstr ""
  2608. #: ../../guides/javascript.rst:222
  2609. msgid "Display a status message to the user."
  2610. msgstr ""
  2611. #: ../../guides/javascript.rst:229
  2612. msgid "``elgg.register_error()``"
  2613. msgstr ""
  2614. #: ../../guides/javascript.rst:231
  2615. msgid "Display an error message to the user."
  2616. msgstr ""
  2617. #: ../../guides/javascript.rst:238
  2618. msgid "``elgg.forward()``"
  2619. msgstr ""
  2620. #: ../../guides/javascript.rst:240
  2621. msgid "``elgg.normalize_url()``"
  2622. msgstr ""
  2623. #: ../../guides/javascript.rst:242
  2624. msgid "Normalize a URL relative to the elgg root:"
  2625. msgstr ""
  2626. #: ../../guides/javascript.rst:251
  2627. msgid "Redirect to a new page."
  2628. msgstr ""
  2629. #: ../../guides/javascript.rst:257
  2630. msgid "This function automatically normalizes the URL."
  2631. msgstr ""
  2632. #: ../../guides/javascript.rst:260
  2633. msgid "``elgg.parse_url()``"
  2634. msgstr ""
  2635. #: ../../guides/javascript.rst:262
  2636. msgid "Parse a URL into its component parts:"
  2637. msgstr ""
  2638. #: ../../guides/javascript.rst:276
  2639. msgid "``elgg.get_page_owner_guid()``"
  2640. msgstr ""
  2641. #: ../../guides/javascript.rst:278
  2642. msgid "Get the GUID of the current page's owner."
  2643. msgstr ""
  2644. #: ../../guides/javascript.rst:281
  2645. msgid "``elgg.register_hook_handler()``"
  2646. msgstr ""
  2647. #: ../../guides/javascript.rst:283
  2648. msgid "Register a hook handler with the event system."
  2649. msgstr ""
  2650. #: ../../guides/javascript.rst:298
  2651. msgid "``elgg.trigger_hook()``"
  2652. msgstr ""
  2653. #: ../../guides/javascript.rst:300
  2654. msgid "Emit a hook event in the event system."
  2655. msgstr ""
  2656. #: ../../guides/javascript.rst:308
  2657. msgid "``elgg.security.refreshToken()``"
  2658. msgstr ""
  2659. #: ../../guides/javascript.rst:310
  2660. msgid "Force a refresh of all XSRF tokens on the page."
  2661. msgstr ""
  2662. #: ../../guides/javascript.rst:312
  2663. msgid "This is automatically called every 5 minutes by default."
  2664. msgstr ""
  2665. #: ../../guides/javascript.rst:314
  2666. msgid "This requires a valid security token in 1.8, but not in 1.9."
  2667. msgstr ""
  2668. #: ../../guides/javascript.rst:316
  2669. msgid "The user will be warned if their session has expired."
  2670. msgstr ""
  2671. #: ../../guides/javascript.rst:319
  2672. msgid "``elgg.security.addToken()``"
  2673. msgstr ""
  2674. #: ../../guides/javascript.rst:321
  2675. msgid "Add a security token to an object, URL, or query string:"
  2676. msgstr ""
  2677. #: ../../guides/javascript.rst:339
  2678. msgid "``elgg.get_logged_in_user_entity()``"
  2679. msgstr ""
  2680. #: ../../guides/javascript.rst:341
  2681. msgid "Returns the logged in user as an JS ElggUser object."
  2682. msgstr ""
  2683. #: ../../guides/javascript.rst:344
  2684. msgid "``elgg.get_logged_in_user_guid()``"
  2685. msgstr ""
  2686. #: ../../guides/javascript.rst:346
  2687. msgid "Returns the logged in user's guid."
  2688. msgstr ""
  2689. #: ../../guides/javascript.rst:349
  2690. msgid "``elgg.is_logged_in()``"
  2691. msgstr ""
  2692. #: ../../guides/javascript.rst:351
  2693. msgid "True if the user is logged in."
  2694. msgstr ""
  2695. #: ../../guides/javascript.rst:354
  2696. msgid "``elgg.is_admin_logged_in()``"
  2697. msgstr ""
  2698. #: ../../guides/javascript.rst:356
  2699. msgid "True if the user is logged in and is an admin."
  2700. msgstr ""
  2701. #: ../../guides/javascript.rst:359
  2702. msgid "``elgg.config.get_language()``"
  2703. msgstr ""
  2704. #: ../../guides/javascript.rst:361
  2705. msgid "Get the current page's language."
  2706. msgstr ""
  2707. #: ../../guides/javascript.rst:364
  2708. msgid "There are a number of configuration values set in the elgg object:"
  2709. msgstr ""
  2710. #: ../../guides/javascript.rst:380
  2711. msgid "Module ``elgg/spinner``"
  2712. msgstr ""
  2713. #: ../../guides/javascript.rst:382
  2714. msgid "The ``elgg/spinner`` module can be used to create an Ajax loading indicator fixed to the top of the window."
  2715. msgstr ""
  2716. #: ../../guides/javascript.rst:399
  2717. msgid "Hooks"
  2718. msgstr ""
  2719. #: ../../guides/javascript.rst:401
  2720. msgid "The JS engine has a hooks system similar to the PHP engine's plugin hooks: hooks are triggered and plugins can register callbacks to react or alter information. There is no concept of Elgg events in the JS engine; everything in the JS engine is implemented as a hook."
  2721. msgstr ""
  2722. #: ../../guides/javascript.rst:404
  2723. msgid "Registering a callback to a hook"
  2724. msgstr ""
  2725. #: ../../guides/javascript.rst:406
  2726. msgid "Callbacks are registered using ``elgg.register_hook_handler()``. Multiple callbacks can be registered for the same hook."
  2727. msgstr ""
  2728. #: ../../guides/javascript.rst:408
  2729. msgid "The following example registers the ``elgg.ui.initDatePicker`` callback for the *init*, *system* event. Note that a difference in the JS engine is that instead of passing a string you pass the function itself to ``elgg.register_hook_handler()`` as the callback."
  2730. msgstr ""
  2731. #: ../../guides/javascript.rst:418
  2732. msgid "The callback"
  2733. msgstr ""
  2734. #: ../../guides/javascript.rst:420
  2735. msgid "The callback accepts 4 arguments:"
  2736. msgstr ""
  2737. #: ../../guides/javascript.rst:422
  2738. msgid "**hook** - The hook name"
  2739. msgstr ""
  2740. #: ../../guides/javascript.rst:423
  2741. msgid "**type** - The hook type"
  2742. msgstr ""
  2743. #: ../../guides/javascript.rst:424
  2744. msgid "**params** - An object or set of parameters specific to the hook"
  2745. msgstr ""
  2746. #: ../../guides/javascript.rst:425
  2747. msgid "**value** - The current value"
  2748. msgstr ""
  2749. #: ../../guides/javascript.rst:427
  2750. msgid "The ``value`` will be passed through each hook. Depending on the hook, callbacks can simply react or alter data."
  2751. msgstr ""
  2752. #: ../../guides/javascript.rst:430
  2753. msgid "Triggering custom hooks"
  2754. msgstr ""
  2755. #: ../../guides/javascript.rst:432
  2756. msgid "Plugins can trigger their own hooks:"
  2757. msgstr ""
  2758. #: ../../guides/javascript.rst:439
  2759. msgid "Available hooks"
  2760. msgstr ""
  2761. #: ../../guides/javascript.rst:442
  2762. msgid "init, system"
  2763. msgstr ""
  2764. #: ../../guides/javascript.rst:442
  2765. msgid "This hook is fired when the JS system is ready. Plugins should register their init functions for this hook."
  2766. msgstr ""
  2767. #: ../../guides/javascript.rst:445
  2768. msgid "ready, system"
  2769. msgstr ""
  2770. #: ../../guides/javascript.rst:445
  2771. msgid "This hook is fired when the system has fully booted."
  2772. msgstr ""
  2773. #: ../../guides/javascript.rst:447
  2774. msgid "getOptions, ui.popup"
  2775. msgstr ""
  2776. #: ../../guides/javascript.rst:448
  2777. msgid "This hook is fired for pop up displays (\"rel\"=\"popup\") and allows for customized placement options."
  2778. msgstr ""
  2779. #: ../../guides/menus.rst:2
  2780. msgid "Menus"
  2781. msgstr ""
  2782. #: ../../guides/menus.rst:4
  2783. msgid "Elgg contains helper code to build menus throughout the site."
  2784. msgstr ""
  2785. #: ../../guides/menus.rst:6
  2786. msgid "Every single menu requires a name, as does every single menu item. These are required in order to allow easy overriding and manipulation, as well as to provide hooks for theming."
  2787. msgstr ""
  2788. #: ../../guides/menus.rst:15
  2789. msgid "Basic usage"
  2790. msgstr ""
  2791. #: ../../guides/menus.rst:17
  2792. msgid "Basic functionalities can be achieved through these two functions:"
  2793. msgstr ""
  2794. #: ../../guides/menus.rst:19
  2795. msgid "`elgg_register_menu_item()`__ to add an item to a menu"
  2796. msgstr ""
  2797. #: ../../guides/menus.rst:20
  2798. msgid "`elgg_unregister_menu_item()`__ to remove an item from a menu"
  2799. msgstr ""
  2800. #: ../../guides/menus.rst:22
  2801. msgid "You normally want to call them from your plugin's init function."
  2802. msgstr ""
  2803. #: ../../guides/menus.rst:28
  2804. #: ../../guides/menus.rst:65
  2805. msgid "Examples"
  2806. msgstr ""
  2807. #: ../../guides/menus.rst:45
  2808. msgid "Advanced usage"
  2809. msgstr ""
  2810. #: ../../guides/menus.rst:47
  2811. msgid "You can get more control over menus by using :doc:`plugin hooks </design/events>` and the public methods provided by the ElggMenuItem__ class."
  2812. msgstr ""
  2813. #: ../../guides/menus.rst:52
  2814. msgid "There are two hooks that can be used to modify a menu:"
  2815. msgstr ""
  2816. #: ../../guides/menus.rst:51
  2817. msgid "``'register', 'menu:<menu name>'`` to add or modify items (especially in dynamic menus)"
  2818. msgstr ""
  2819. #: ../../guides/menus.rst:52
  2820. msgid "``'prepare', 'menu:<menu name>'`` to modify the structure of the menu before it is displayed"
  2821. msgstr ""
  2822. #: ../../guides/menus.rst:54
  2823. msgid "When you register a plugin hook handler, replace the ``<menu name>`` part with the internal name of the menu."
  2824. msgstr ""
  2825. #: ../../guides/menus.rst:57
  2826. msgid "The third parameter passed into a menu handler contains all the menu items that have been registered so far by Elgg core and other enabled plugins. In the handler we can loop through the menu items and use the class methods to interact with the properties of the menu item."
  2827. msgstr ""
  2828. #: ../../guides/menus.rst:67
  2829. msgid "**Example 1:** Change the URL for menu item called \"albums\" in the ``owner_block`` menu:"
  2830. msgstr ""
  2831. #: ../../guides/menus.rst:109
  2832. msgid "**Example 2:** Modify the ``entity`` menu for the ``ElggBlog`` objects"
  2833. msgstr ""
  2834. #: ../../guides/menus.rst:108
  2835. msgid "Remove the thumb icon"
  2836. msgstr ""
  2837. #: ../../guides/menus.rst:109
  2838. msgid "Change the \"Edit\" text into a custom icon"
  2839. msgstr ""
  2840. #: ../../guides/menus.rst:151
  2841. msgid "Creating a new menu"
  2842. msgstr ""
  2843. #: ../../guides/menus.rst:153
  2844. msgid "Elgg provides multiple different menus by default. Sometimes you may however need some menu items that don't fit in any of the existing menus. If this is the case, you can create your very own menu with the `elgg_view_menu()`__ function. You must call the function from the view, where you want to menu to be displayed."
  2845. msgstr ""
  2846. #: ../../guides/menus.rst:161
  2847. msgid "**Example:** Display a menu called \"my_menu\" that displays it's menu items in alphapetical order:"
  2848. msgstr ""
  2849. #: ../../guides/menus.rst:168
  2850. msgid "You can now add new items to the menu like this:"
  2851. msgstr ""
  2852. #: ../../guides/menus.rst:178
  2853. msgid "Furthermore it is now possible to modify the menu using the hooks ``'register', 'menu:my_menu'`` and ``'prepare', 'menu:my_menu'``."
  2854. msgstr ""
  2855. #: ../../guides/menus.rst:182
  2856. msgid "Theming"
  2857. msgstr ""
  2858. #: ../../guides/menus.rst:184
  2859. msgid "The menu name, section names, and item names are all embedded into the HTML as CSS classes (normalized to contain only hyphens, rather that underscores or colons). This increases the size of the markup slightly but provides themers with a high degree of control and flexibility when styling the site."
  2860. msgstr ""
  2861. #: ../../guides/menus.rst:189
  2862. msgid "**Example:** The following would be the output of the ``foo`` menu with sections ``alt`` and ``default`` containing items ``baz`` and ``bar`` respectively."
  2863. msgstr ""
  2864. #: ../../guides/notifications.rst:2
  2865. #: ../../guides/upgrading.rst:157
  2866. msgid "Notifications"
  2867. msgstr ""
  2868. #: ../../guides/notifications.rst:6
  2869. msgid "There are two ways to send notifications in Elgg:"
  2870. msgstr ""
  2871. #: ../../guides/notifications.rst:5
  2872. #: ../../guides/notifications.rst:13
  2873. msgid "Instant notifications"
  2874. msgstr ""
  2875. #: ../../guides/notifications.rst:6
  2876. msgid "Event-based notifications send using a notifications queue"
  2877. msgstr ""
  2878. #: ../../guides/notifications.rst:15
  2879. msgid "The generic method to send a notification to a user is via the function `notify_user()`__. It is normally used when we want to notify only a single user. Notification like this might for example inform that someone has liked or commented the user's post."
  2880. msgstr ""
  2881. #: ../../guides/notifications.rst:19
  2882. msgid "The function usually gets called in an :doc:`action <actions>` file."
  2883. msgstr ""
  2884. #: ../../guides/notifications.rst:26
  2885. msgid "In this example a user (``$user``) is triggering an action to rate a post created by another user (``$owner``). After saving the rating (``ElggAnnotation $rating``) to database, we could use the following code to send a notification about the new rating to the owner."
  2886. msgstr ""
  2887. #: ../../guides/notifications.rst:57
  2888. msgid "The language used by the recipient isn't necessarily the same as the language of the person who triggers the notification. Therefore you must always remember to pass the recipient's language as the third parameter to ``elgg_echo()``."
  2889. msgstr ""
  2890. #: ../../guides/notifications.rst:63
  2891. msgid "The ``'summary'`` parameter is meant for notification plugins that only want to display a short message instead of both the subject and the body. Therefore the summary should be terse but still contain all necessary information."
  2892. msgstr ""
  2893. #: ../../guides/notifications.rst:68
  2894. msgid "Enqueued notifications"
  2895. msgstr ""
  2896. #: ../../guides/notifications.rst:70
  2897. msgid "On large sites there may be many users who have subscribed to receive notifications about a particular event. Sending notifications immediately when a user triggers such an event might remarkably slow down page loading speed. This is why sending of such notifications shoud be left for Elgg's notification queue."
  2898. msgstr ""
  2899. #: ../../guides/notifications.rst:75
  2900. msgid "New notification events can be registered with the `elgg_register_notification_event()`__ function. Notifications about registered events will be sent automatically to all subscribed users."
  2901. msgstr ""
  2902. #: ../../guides/notifications.rst:82
  2903. #: ../../guides/notifications.rst:104
  2904. msgid "Example"
  2905. msgstr ""
  2906. #: ../../guides/notifications.rst:84
  2907. msgid "Tell Elgg to send notifications when a new object of subtype \"photo\" is created:"
  2908. msgstr ""
  2909. #: ../../guides/notifications.rst:97
  2910. msgid "In order to send the event-based notifications you must have the one-minute :doc:`CRON </admin/cron>` interval configured."
  2911. msgstr ""
  2912. #: ../../guides/notifications.rst:100
  2913. msgid "Contents of the notification message can be defined with the ``'prepare', 'notification:[action]:[type]:[subtype]'`` hook."
  2914. msgstr ""
  2915. #: ../../guides/notifications.rst:106
  2916. msgid "Tell Elgg to use the function ``photos_prepare_notification()`` to format the contents of the notification when a new objects of subtype 'photo' is created:"
  2917. msgstr ""
  2918. #: ../../guides/notifications.rst:154
  2919. msgid "Make sure the notification will be in the correct language by passing the reciepient's language into the ``elgg_echo()`` function."
  2920. msgstr ""
  2921. #: ../../guides/notifications.rst:158
  2922. msgid "Registering a new notification method"
  2923. msgstr ""
  2924. #: ../../guides/notifications.rst:160
  2925. msgid "By default Elgg has two notification methods: email and the bundled site_notifications plugin. You can register a new notification method with the `elgg_register_notification_method()`__ function."
  2926. msgstr ""
  2927. #: ../../guides/notifications.rst:169
  2928. msgid "Register a handler that will send the notifications via SMS."
  2929. msgstr ""
  2930. #: ../../guides/notifications.rst:180
  2931. msgid "After registering the new method, it will appear to the notification settings page at ``www.example.com/notifications/personal/[username]``."
  2932. msgstr ""
  2933. #: ../../guides/notifications.rst:184
  2934. msgid "Sending the notifications using your own method"
  2935. msgstr ""
  2936. #: ../../guides/notifications.rst:186
  2937. msgid "Besides registering the notification method, you also need to register a handler that takes care of actually sending the SMS notifications. This happens with the ``'send', 'notification:[method]'`` hook."
  2938. msgstr ""
  2939. #: ../../guides/notifications.rst:230
  2940. msgid "Subscriptions"
  2941. msgstr ""
  2942. #: ../../guides/notifications.rst:232
  2943. msgid "In most cases Elgg core takes care of handling the subscriptions, so notification plugins don't usually have to alter them."
  2944. msgstr ""
  2945. #: ../../guides/notifications.rst:237
  2946. msgid "Subscriptions can however be:"
  2947. msgstr ""
  2948. #: ../../guides/notifications.rst:236
  2949. msgid "Added using the `elgg_add_subscription()`__ function"
  2950. msgstr ""
  2951. #: ../../guides/notifications.rst:237
  2952. msgid "Removed using the `elgg_remove_subscription()`__ function"
  2953. msgstr ""
  2954. #: ../../guides/notifications.rst:242
  2955. msgid "It's possible to modify the recipients of a notification dynamically with the ``'get', 'subscriptions'`` hook."
  2956. msgstr ""
  2957. #: ../../guides/page-owner.rst:2
  2958. msgid "Page ownership"
  2959. msgstr ""
  2960. #: ../../guides/page-owner.rst:4
  2961. msgid "One recurring task of any plugin will be to determine the page ownership in order to decide which actions are allowed or not. Elgg has a number of functions related to page ownership and also offers plugin developers flexibility by letting the plugin handle page ownership requests as well. Determining the owner of a page can be determined with ``elgg_get_page_owner_guid()``, which will return the GUID of the owner. Alternatively, ``elgg_get_page_owner_entity()`` will retrieve the whole page owner entity. If the page already knows who the page owner is, but the system doesn't, the it be can set by passing the GUID to ``elgg_set_page_owner_guid($guid)``."
  2962. msgstr ""
  2963. #: ../../guides/page-owner.rst:8
  2964. msgid "Custom page owner handlers"
  2965. msgstr ""
  2966. #: ../../guides/page-owner.rst:10
  2967. msgid "Plugin developers can create page owner handlers, which could be necessary in certain cases, for example when integrating third party functionality. The handler will be a function which will need to get registered with ``elgg_register_plugin_hook_handler('page_owner', 'system', 'your_page_owner_function_name');`` . The handler will only need to return a value (an integer GUID) when it knows for certain who the page owner is."
  2968. msgstr ""
  2969. #: ../../guides/page-owner.rst:12
  2970. msgid "By default, the system determines the page_owner from the following elements:"
  2971. msgstr ""
  2972. #: ../../guides/page-owner.rst:14
  2973. msgid "The ``username`` URL parameter"
  2974. msgstr ""
  2975. #: ../../guides/page-owner.rst:15
  2976. msgid "The ``owner_guid`` URL parameter"
  2977. msgstr ""
  2978. #: ../../guides/page-owner.rst:17
  2979. msgid "It then passes off to any page owner handlers defined using the :ref:`plugin hook <design/events#plugin-hooks>`. If no page owner can be determined, the page owner is set to 0, which is the same as the logged out user."
  2980. msgstr ""
  2981. #: ../../guides/pagehandler.rst:2
  2982. msgid "Page handler"
  2983. msgstr ""
  2984. #: ../../guides/pagehandler.rst:4
  2985. msgid "Elgg offers a facility to manage your plugin pages via a page handler, enabling custom urls like ``http://yoursite/your_plugin/section``. To add a page handler to a plugin, a handler function needs to be registered in the plugin's ``start.php`` file with ``elgg_register_page_handler()``:"
  2986. msgstr ""
  2987. #: ../../guides/pagehandler.rst:10
  2988. msgid "The plugin's page handler is passed two parameters:"
  2989. msgstr ""
  2990. #: ../../guides/pagehandler.rst:12
  2991. msgid "an array containing the sections of the URL exploded by '/'. With this information the handler will be able to apply any logic necessary, for example loading the appropriate view and returning its contents."
  2992. msgstr ""
  2993. #: ../../guides/pagehandler.rst:13
  2994. msgid "the handler, this is the handler that is currently used (in our example ``your_plugin``). If you don't register multiple page handlers to the same function you'll never need this."
  2995. msgstr ""
  2996. #: ../../guides/pagehandler.rst:16
  2997. msgid "Code flow"
  2998. msgstr ""
  2999. #: ../../guides/pagehandler.rst:18
  3000. msgid "Pages in plugins should be served only through page handlers, stored in ``pages/`` of your plugin's directory and do not need to ``include`` or ``require`` Elgg's ``engine/start.php`` file. The purpose of these files are to knit together output from different views to form the page that the user sees. The program flow is something like this:"
  3001. msgstr ""
  3002. #: ../../guides/pagehandler.rst:20
  3003. msgid "A user requests ``/plugin_name/section/entity``"
  3004. msgstr ""
  3005. #: ../../guides/pagehandler.rst:21
  3006. msgid "Elgg checks if ``plugin_name`` is registered to a page handler and calls that function, passing ``array('section', 'entity')`` as the first argument"
  3007. msgstr ""
  3008. #: ../../guides/pagehandler.rst:22
  3009. msgid "The page handler function determines which page to display, optionally sets some values, and then includes the correct page under ``plugin_name/pages/plugin_name/``"
  3010. msgstr ""
  3011. #: ../../guides/pagehandler.rst:23
  3012. msgid "The included file combines many separate views, calls formatting functions like ``elgg_view_layout()`` and ``elgg_view_page()``, and then echos the final output"
  3013. msgstr ""
  3014. #: ../../guides/pagehandler.rst:24
  3015. msgid "The user sees a fully rendered page"
  3016. msgstr ""
  3017. #: ../../guides/pagehandler.rst:26
  3018. msgid "There is no syntax enforced on the URLs, but Elgg's coding standards suggests a certain format."
  3019. msgstr ""
  3020. #: ../../guides/permissions-check.rst:2
  3021. msgid "Permissions Check"
  3022. msgstr ""
  3023. #: ../../guides/permissions-check.rst:6
  3024. msgid "As stated in the page, this method works **only** for granting **write** access to entities. You **cannot** use this method to retrieve or view entities for which the user does not have read access."
  3025. msgstr ""
  3026. #: ../../guides/permissions-check.rst:8
  3027. msgid "Elgg provides a mechanism of overriding write permissions check through the :ref:`permissions_check plugin hook <guides/hooks-list#permission-hooks>` . This is useful for allowing plugin write to all accessible entities regardless of access settings. Entities that are hidden, however, will still be unavailable to the plugin."
  3028. msgstr ""
  3029. #: ../../guides/permissions-check.rst:11
  3030. msgid "Hooking permissions_check"
  3031. msgstr ""
  3032. #: ../../guides/permissions-check.rst:13
  3033. msgid "In your plugin, you must register the plugin hook for ``permissions_check``."
  3034. msgstr ""
  3035. #: ../../guides/permissions-check.rst:20
  3036. msgid "The override function"
  3037. msgstr ""
  3038. #: ../../guides/permissions-check.rst:22
  3039. msgid "Now create the function that will be called by the permissions check hook. In this function we determine if the entity (in parameters) has write access. Since it is important to keep Elgg secure, write access should be given only after checking a variety of situations including page context, logged in user, etc. Note that this function can return 3 values: true if the entity has write access, false if the entity does not, and null if this plugin doesn't care and the security system should consult other plugins."
  3040. msgstr ""
  3041. #: ../../guides/permissions-check.rst:40
  3042. msgid "Full Example"
  3043. msgstr ""
  3044. #: ../../guides/permissions-check.rst:42
  3045. msgid "This is a full example using the context to determine if the entity has write access."
  3046. msgstr ""
  3047. #: ../../guides/plugins.rst:4
  3048. msgid "Plugins must provide a start.php and manifest.xml file in the plugin root in order to be recognized by Elgg."
  3049. msgstr ""
  3050. #: ../../guides/plugins.rst:8
  3051. msgid "start.php"
  3052. msgstr ""
  3053. #: ../../guides/plugins.rst:10
  3054. msgid "The start.php file bootstraps plugin by registering event listeners and plugin hooks."
  3055. msgstr ""
  3056. #: ../../guides/plugins.rst:14
  3057. msgid "activate.php, deactivate.php"
  3058. msgstr ""
  3059. #: ../../guides/plugins.rst:16
  3060. msgid "The activate.php and deactivate.php files contain procedural code that will run upon plugin activation and deactivation. Use these files to perform one-time events such as registering a persistent admin notice, registering subtypes, or performing garbage collection when deactivated."
  3061. msgstr ""
  3062. #: ../../guides/plugins.rst:22
  3063. msgid "manifest.xml"
  3064. msgstr ""
  3065. #: ../../guides/plugins.rst:24
  3066. msgid "Elgg plugins are required to have a ``manifest.xml`` file in the root of a plugin."
  3067. msgstr ""
  3068. #: ../../guides/plugins.rst:26
  3069. msgid "The ``manifest.xml`` file includes information about the plugin itself, requirements to run the plugin, and optional information including where to display the plugin in the admin area and what APIs the plugin provides."
  3070. msgstr ""
  3071. #: ../../guides/plugins.rst:29
  3072. msgid "Syntax"
  3073. msgstr ""
  3074. #: ../../guides/plugins.rst:31
  3075. msgid "The manifest file is a standard XML file in UTF-8. Everything is a child of the ``<plugin_manifest>`` element."
  3076. msgstr ""
  3077. #: ../../guides/plugins.rst:38
  3078. msgid "The manifest syntax is as follows:"
  3079. msgstr ""
  3080. #: ../../guides/plugins.rst:44
  3081. msgid "Many elements can contain children attributes:"
  3082. msgstr ""
  3083. #: ../../guides/plugins.rst:54
  3084. msgid "Required Elements"
  3085. msgstr ""
  3086. #: ../../guides/plugins.rst:56
  3087. msgid "All plugins are required to define the following elements in their manifest files:"
  3088. msgstr ""
  3089. #: ../../guides/plugins.rst:58
  3090. msgid "id - This has the name as the directory that the plugin uses."
  3091. msgstr ""
  3092. #: ../../guides/plugins.rst:59
  3093. msgid "name - The display name of the plugin."
  3094. msgstr ""
  3095. #: ../../guides/plugins.rst:60
  3096. msgid "author - The name of the author who wrote the plugin."
  3097. msgstr ""
  3098. #: ../../guides/plugins.rst:61
  3099. msgid "version - The version of the plugin."
  3100. msgstr ""
  3101. #: ../../guides/plugins.rst:62
  3102. msgid "description - A description of the what the plugin provides, its features, and other relevant information"
  3103. msgstr ""
  3104. #: ../../guides/plugins.rst:63
  3105. msgid "requires - Each plugin must specify the release of Elgg it was developed for. See the plugin Dependencies page for more information."
  3106. msgstr ""
  3107. #: ../../guides/plugins.rst:66
  3108. msgid "Available Elements"
  3109. msgstr ""
  3110. #: ../../guides/plugins.rst:68
  3111. msgid "In addition to the require elements above, the follow elements are available to use:"
  3112. msgstr ""
  3113. #: ../../guides/plugins.rst:70
  3114. msgid "blurb - A short description of the plugin."
  3115. msgstr ""
  3116. #: ../../guides/plugins.rst:71
  3117. msgid "category - The category of the plugin. It is recommended to follow the [[Plugin_Guidelines|plugin guidelines]] and use one of the defined categories. There can be multiple entries."
  3118. msgstr ""
  3119. #: ../../guides/plugins.rst:72
  3120. msgid "conflicts - Specifies that the plugin conflicts with a certain system configuration."
  3121. msgstr ""
  3122. #: ../../guides/plugins.rst:73
  3123. msgid "copyright - The plugin's copyright information."
  3124. msgstr ""
  3125. #: ../../guides/plugins.rst:74
  3126. msgid "license - The plugin's license information."
  3127. msgstr ""
  3128. #: ../../guides/plugins.rst:75
  3129. msgid "provides - Specifies that this plugin provides the same functionality as another Elgg plugin or a PHP extension."
  3130. msgstr ""
  3131. #: ../../guides/plugins.rst:76
  3132. msgid "screenshot - Screenshots of the plugin. There can be multiple entries. See the advanced example for syntax."
  3133. msgstr ""
  3134. #: ../../guides/plugins.rst:77
  3135. msgid "suggests - Parallels the requires system, but doesn't affect if the plugin can be enabled. Used to suggest other plugins that interact or build on the plugin."
  3136. msgstr ""
  3137. #: ../../guides/plugins.rst:78
  3138. msgid "website - A link to the website for the plugin."
  3139. msgstr ""
  3140. #: ../../guides/plugins.rst:82
  3141. msgid ":doc:`plugins/dependencies`"
  3142. msgstr ""
  3143. #: ../../guides/plugins.rst:85
  3144. #: ../../guides/widgets.rst:115
  3145. msgid "Simple Example"
  3146. msgstr ""
  3147. #: ../../guides/plugins.rst:87
  3148. msgid "This manifest file is the bare minimum a plugin must have."
  3149. msgstr ""
  3150. #: ../../guides/plugins.rst:105
  3151. msgid "Advanced example"
  3152. msgstr ""
  3153. #: ../../guides/plugins.rst:107
  3154. msgid "This example uses all of the available elements:"
  3155. msgstr ""
  3156. #: ../../guides/plugins.rst:149
  3157. #: ../../guides/views.rst:344
  3158. #: ../../guides/web-services.rst:329
  3159. msgid "Related"
  3160. msgstr ""
  3161. #: ../../guides/plugins/dependencies.rst:2
  3162. msgid "Plugin Dependencies"
  3163. msgstr ""
  3164. #: ../../guides/plugins/dependencies.rst:4
  3165. msgid "In Elgg 1.8 a plugin dependencies system was introduced to prevent plugins from being used on incompatible systems."
  3166. msgstr ""
  3167. #: ../../guides/plugins/dependencies.rst:13
  3168. msgid "The dependencies system is controlled through a plugin's ``manifest.xml`` file. Plugin authors can specify that a plugin:"
  3169. msgstr ""
  3170. #: ../../guides/plugins/dependencies.rst:15
  3171. msgid "Requires certain Elgg versions, Elgg plugins, PHP extensions, and PHP settings."
  3172. msgstr ""
  3173. #: ../../guides/plugins/dependencies.rst:16
  3174. msgid "Suggests certain Elgg versions, Elgg plugins, PHP extensions, and PHP settings."
  3175. msgstr ""
  3176. #: ../../guides/plugins/dependencies.rst:17
  3177. msgid "Conflicts with certain Elgg versions or Elgg plugins."
  3178. msgstr ""
  3179. #: ../../guides/plugins/dependencies.rst:18
  3180. msgid "Provides the equivalent of another Elgg plugin or PHP extension."
  3181. msgstr ""
  3182. #: ../../guides/plugins/dependencies.rst:20
  3183. msgid "The dependency system uses the four verbs above (``requires``, ``suggests``, ``conflicts``, and ``provides``) as parent elements to indicate what type of dependency is described by its children. All dependencies have a similar format with similar options:"
  3184. msgstr ""
  3185. #: ../../guides/plugins/dependencies.rst:32
  3186. msgid "``type`` is always required"
  3187. msgstr ""
  3188. #: ../../guides/plugins/dependencies.rst:35
  3189. msgid "Verbs"
  3190. msgstr ""
  3191. #: ../../guides/plugins/dependencies.rst:37
  3192. msgid "With the exception of ``provides``, all verbs use the same six types with differing effects, and the type options are the same among the verbs. ``provides`` only supports ``plugin`` and ``php_extension``."
  3193. msgstr ""
  3194. #: ../../guides/plugins/dependencies.rst:40
  3195. msgid "Requires"
  3196. msgstr ""
  3197. #: ../../guides/plugins/dependencies.rst:42
  3198. msgid "Using a ``requires`` dependency means that the plugin cannot be enabled unless the dependency is exactly met."
  3199. msgstr ""
  3200. #: ../../guides/plugins/dependencies.rst:45
  3201. msgid "Mandatory requires: elgg_version and elgg_release"
  3202. msgstr ""
  3203. #: ../../guides/plugins/dependencies.rst:47
  3204. msgid "Every plugin must have at least one requires: the version of Elgg the plugin is developed for. This is specified either by the Elgg API ``version`` (2011010401) or the ``release`` (1.8). The default comparison ``>=``, but you can specify your own by passing the ``<comparison>`` element."
  3205. msgstr ""
  3206. #: ../../guides/plugins/dependencies.rst:49
  3207. msgid "Using elgg_version:"
  3208. msgstr ""
  3209. #: ../../guides/plugins/dependencies.rst:58
  3210. msgid "Using elgg_release:"
  3211. msgstr ""
  3212. #: ../../guides/plugins/dependencies.rst:68
  3213. msgid "Suggests"
  3214. msgstr ""
  3215. #: ../../guides/plugins/dependencies.rst:70
  3216. msgid "``suggests`` dependencies signify that the plugin author suggests a specific system configuration, but it is not required to use the plugin. The suggestions can also be another plugin itself which could interact, extend, or be extended by this plugin, but is not required for it to function."
  3217. msgstr ""
  3218. #: ../../guides/plugins/dependencies.rst:72
  3219. msgid "Suggest another plugin:"
  3220. msgstr ""
  3221. #: ../../guides/plugins/dependencies.rst:82
  3222. msgid "Suggest a certain PHP setting:"
  3223. msgstr ""
  3224. #: ../../guides/plugins/dependencies.rst:94
  3225. msgid "Conflicts"
  3226. msgstr ""
  3227. #: ../../guides/plugins/dependencies.rst:96
  3228. msgid "``conflicts`` dependencies mean the plugin cannot be used under a specific system configuration."
  3229. msgstr ""
  3230. #: ../../guides/plugins/dependencies.rst:98
  3231. msgid "Conflict with any version of the profile plugin:"
  3232. msgstr ""
  3233. #: ../../guides/plugins/dependencies.rst:107
  3234. msgid "Conflict with a specific version of Elgg:"
  3235. msgstr ""
  3236. #: ../../guides/plugins/dependencies.rst:118
  3237. msgid "Provides"
  3238. msgstr ""
  3239. #: ../../guides/plugins/dependencies.rst:120
  3240. msgid "``provides`` dependencies tell Elgg that this plugin is providing the functionality of another plugin or PHP extension. Unlike the other verbs, it only supports two types: ``plugin`` and ``php_extension``."
  3241. msgstr ""
  3242. #: ../../guides/plugins/dependencies.rst:122
  3243. msgid "The purpose of this is to provide interchangeable APIs implemented by different plugins. For example, the twitter_services plugin provides an API for other plugins to Tweet on behalf of the user via curl and Oauth. A plugin author could write a compatible plugin for servers without curl support that uses sockets streams and specify that it provides twitter_services. Any plugins that suggest or require twitter_services would then know they can work."
  3244. msgstr ""
  3245. #: ../../guides/plugins/dependencies.rst:134
  3246. msgid "All plugins provide themselves as their plugin id (directory name) at the version defined in the their manifest."
  3247. msgstr ""
  3248. #: ../../guides/plugins/dependencies.rst:137
  3249. msgid "Types"
  3250. msgstr ""
  3251. #: ../../guides/plugins/dependencies.rst:139
  3252. msgid "Every dependency verb has a mandatory ``<type>`` element that must be one of the following six values:"
  3253. msgstr ""
  3254. #: ../../guides/plugins/dependencies.rst:141
  3255. msgid "**elgg_version** - The API version of Elgg (2011010401)"
  3256. msgstr ""
  3257. #: ../../guides/plugins/dependencies.rst:142
  3258. msgid "**elgg_release** - The release version of Elgg (1.8)"
  3259. msgstr ""
  3260. #: ../../guides/plugins/dependencies.rst:143
  3261. msgid "**plugin** - An Elgg plugin"
  3262. msgstr ""
  3263. #: ../../guides/plugins/dependencies.rst:144
  3264. msgid "**priority** - A plugin load priority"
  3265. msgstr ""
  3266. #: ../../guides/plugins/dependencies.rst:145
  3267. msgid "**php_extension** - A PHP extension"
  3268. msgstr ""
  3269. #: ../../guides/plugins/dependencies.rst:146
  3270. msgid "**php_ini** - A PHP setting"
  3271. msgstr ""
  3272. #: ../../guides/plugins/dependencies.rst:147
  3273. msgid "**php_version** - A PHP version"
  3274. msgstr ""
  3275. #: ../../guides/plugins/dependencies.rst:151
  3276. msgid "``provides`` only supports ``plugin`` and ``php_extension`` types."
  3277. msgstr ""
  3278. #: ../../guides/plugins/dependencies.rst:153
  3279. msgid "Every type is defined with a dependency verb as the parent element. Additional option elements are at the same level as the type element:"
  3280. msgstr ""
  3281. #: ../../guides/plugins/dependencies.rst:164
  3282. msgid "elgg_version and elgg_release"
  3283. msgstr ""
  3284. #: ../../guides/plugins/dependencies.rst:166
  3285. msgid "These concern the API and release versions of Elgg and requires the following option element:"
  3286. msgstr ""
  3287. #: ../../guides/plugins/dependencies.rst:168
  3288. msgid "**version** - The API or release version"
  3289. msgstr ""
  3290. #: ../../guides/plugins/dependencies.rst:170
  3291. #: ../../guides/plugins/dependencies.rst:229
  3292. msgid "The following option element is supported, but not required:"
  3293. msgstr ""
  3294. #: ../../guides/plugins/dependencies.rst:172
  3295. #: ../../guides/plugins/dependencies.rst:184
  3296. #: ../../guides/plugins/dependencies.rst:231
  3297. msgid "**comparison** - The comparison operator to use. Defaults to >= if not passed"
  3298. msgstr ""
  3299. #: ../../guides/plugins/dependencies.rst:175
  3300. msgid "plugin"
  3301. msgstr ""
  3302. #: ../../guides/plugins/dependencies.rst:177
  3303. msgid "Specifies an Elgg plugin by its ID (directory name). This requires the following option element:"
  3304. msgstr ""
  3305. #: ../../guides/plugins/dependencies.rst:179
  3306. msgid "**name** - The ID of the plugin"
  3307. msgstr ""
  3308. #: ../../guides/plugins/dependencies.rst:181
  3309. #: ../../guides/plugins/dependencies.rst:201
  3310. msgid "The following option elements are supported, but not required:"
  3311. msgstr ""
  3312. #: ../../guides/plugins/dependencies.rst:183
  3313. msgid "**version** - The version of the plugin"
  3314. msgstr ""
  3315. #: ../../guides/plugins/dependencies.rst:187
  3316. msgid "priority"
  3317. msgstr ""
  3318. #: ../../guides/plugins/dependencies.rst:189
  3319. msgid "This requires the plugin to be loaded before or after another plugin, if that plugin exists. ``requires`` should be used to require that a plugin exists. The following option elements are required:"
  3320. msgstr ""
  3321. #: ../../guides/plugins/dependencies.rst:191
  3322. msgid "**plugin** - The plugin ID to base the load order on"
  3323. msgstr ""
  3324. #: ../../guides/plugins/dependencies.rst:192
  3325. msgid "**priority** - The load order: 'before' or 'after'"
  3326. msgstr ""
  3327. #: ../../guides/plugins/dependencies.rst:195
  3328. msgid "php_extension"
  3329. msgstr ""
  3330. #: ../../guides/plugins/dependencies.rst:197
  3331. msgid "This checks PHP extensions. The follow option element is required:"
  3332. msgstr ""
  3333. #: ../../guides/plugins/dependencies.rst:199
  3334. msgid "**name** - The name of the PHP extension"
  3335. msgstr ""
  3336. #: ../../guides/plugins/dependencies.rst:203
  3337. msgid "**version** - The version of the extension"
  3338. msgstr ""
  3339. #: ../../guides/plugins/dependencies.rst:204
  3340. #: ../../guides/plugins/dependencies.rst:220
  3341. msgid "**comparison** - The comparison operator to use. Defaults to =="
  3342. msgstr ""
  3343. #: ../../guides/plugins/dependencies.rst:208
  3344. msgid "The format of extension versions varies greatly among PHP extensions and is sometimes not even set. This is generally worthless to check."
  3345. msgstr ""
  3346. #: ../../guides/plugins/dependencies.rst:211
  3347. msgid "php_ini"
  3348. msgstr ""
  3349. #: ../../guides/plugins/dependencies.rst:213
  3350. msgid "This checks PHP settings. The following option elements are required:"
  3351. msgstr ""
  3352. #: ../../guides/plugins/dependencies.rst:215
  3353. msgid "**name** - The name of the setting to check"
  3354. msgstr ""
  3355. #: ../../guides/plugins/dependencies.rst:216
  3356. msgid "**value** - The value of the setting to compare against"
  3357. msgstr ""
  3358. #: ../../guides/plugins/dependencies.rst:218
  3359. msgid "The following options are supported, but not required:"
  3360. msgstr ""
  3361. #: ../../guides/plugins/dependencies.rst:223
  3362. msgid "php_version"
  3363. msgstr ""
  3364. #: ../../guides/plugins/dependencies.rst:225
  3365. msgid "This checks the PHP version. The following option elements are required:"
  3366. msgstr ""
  3367. #: ../../guides/plugins/dependencies.rst:227
  3368. msgid "**version** - The PHP version"
  3369. msgstr ""
  3370. #: ../../guides/plugins/dependencies.rst:234
  3371. msgid "Comparison Operators"
  3372. msgstr ""
  3373. #: ../../guides/plugins/dependencies.rst:236
  3374. msgid "Dependencies that check versions support passing a custom operator via the ``<comparison>`` element."
  3375. msgstr ""
  3376. #: ../../guides/plugins/dependencies.rst:238
  3377. msgid "The follow are valid comparison operators:"
  3378. msgstr ""
  3379. #: ../../guides/plugins/dependencies.rst:240
  3380. msgid "< or lt"
  3381. msgstr ""
  3382. #: ../../guides/plugins/dependencies.rst:241
  3383. msgid "<= or le"
  3384. msgstr ""
  3385. #: ../../guides/plugins/dependencies.rst:242
  3386. msgid "=, ==, or eq"
  3387. msgstr ""
  3388. #: ../../guides/plugins/dependencies.rst:243
  3389. msgid "!=, <>, or ne"
  3390. msgstr ""
  3391. #: ../../guides/plugins/dependencies.rst:244
  3392. msgid "> or gt"
  3393. msgstr ""
  3394. #: ../../guides/plugins/dependencies.rst:245
  3395. msgid ">= or ge"
  3396. msgstr ""
  3397. #: ../../guides/plugins/dependencies.rst:247
  3398. msgid "If ``<comparison>`` is not passed, the follow are used as defaults, depending upon the dependency type:"
  3399. msgstr ""
  3400. #: ../../guides/plugins/dependencies.rst:249
  3401. msgid "requires->elgg_version and elgg_release: >="
  3402. msgstr ""
  3403. #: ../../guides/plugins/dependencies.rst:250
  3404. msgid "requires->plugin: >="
  3405. msgstr ""
  3406. #: ../../guides/plugins/dependencies.rst:251
  3407. msgid "requires->php_extension: ="
  3408. msgstr ""
  3409. #: ../../guides/plugins/dependencies.rst:252
  3410. msgid "requires->php_ini: ="
  3411. msgstr ""
  3412. #: ../../guides/plugins/dependencies.rst:253
  3413. msgid "all conflicts: ="
  3414. msgstr ""
  3415. #: ../../guides/plugins/dependencies.rst:257
  3416. msgid "You must escape < and > to ``&gt;`` and ``&lt;``. For comparisons that use these values, it is recommended you use the string equivalents instead!"
  3417. msgstr ""
  3418. #: ../../guides/plugins/dependencies.rst:260
  3419. msgid "Quick Examples"
  3420. msgstr ""
  3421. #: ../../guides/plugins/dependencies.rst:263
  3422. msgid "Requires Elgg 1.8.2 or higher"
  3423. msgstr ""
  3424. #: ../../guides/plugins/dependencies.rst:273
  3425. msgid "Requires the Groups plugin is active"
  3426. msgstr ""
  3427. #: ../../guides/plugins/dependencies.rst:283
  3428. msgid "Requires to be after the Profile plugin if Profile is active"
  3429. msgstr ""
  3430. #: ../../guides/plugins/dependencies.rst:294
  3431. msgid "Conflicts with The Wire plugin"
  3432. msgstr ""
  3433. #: ../../guides/plugins/dependencies.rst:304
  3434. msgid "Requires at least 256 MB memory in PHP"
  3435. msgstr ""
  3436. #: ../../guides/plugins/dependencies.rst:317
  3437. msgid "Requires at least PHP version 5.3"
  3438. msgstr ""
  3439. #: ../../guides/plugins/dependencies.rst:327
  3440. msgid "Suggest the TidyPics plugin is loaded"
  3441. msgstr ""
  3442. #: ../../guides/plugins/plugin-skeleton.rst:2
  3443. msgid "Plugin skeleton"
  3444. msgstr ""
  3445. #: ../../guides/plugins/plugin-skeleton.rst:4
  3446. msgid "The following is the standard for plugin structure in Elgg as of Elgg 1.8. Plugins written for Elgg 1.7 and down are strongly encouraged to use this structure as well, though some of the benefits are not as apparent as when used in 1.8."
  3447. msgstr ""
  3448. #: ../../guides/plugins/plugin-skeleton.rst:7
  3449. msgid "Example Structure"
  3450. msgstr ""
  3451. #: ../../guides/plugins/plugin-skeleton.rst:9
  3452. msgid "The following is an example of a plugin with standard structure. For further explanation of this structure, see the details in the following sections. Your plugin may not need all the files listed"
  3453. msgstr ""
  3454. #: ../../guides/plugins/plugin-skeleton.rst:11
  3455. msgid "The following files for plugin ``example`` would go in ``/mod/example/``"
  3456. msgstr ""
  3457. #: ../../guides/plugins/plugin-skeleton.rst:69
  3458. msgid "Required Files"
  3459. msgstr ""
  3460. #: ../../guides/plugins/plugin-skeleton.rst:71
  3461. msgid "Plugins **must** provide a ``start.php`` and ``manifest.xml`` file in the plugin root in order to be recognized by Elgg."
  3462. msgstr ""
  3463. #: ../../guides/plugins/plugin-skeleton.rst:73
  3464. msgid "Therefore the following is the minimally compliant structure:"
  3465. msgstr ""
  3466. #: ../../guides/plugins/plugin-skeleton.rst:84
  3467. msgid "Plugins *should* place scripts for actions an ``actions/`` directory, and furthermore *should* use the name of the action to determine the location within that directory."
  3468. msgstr ""
  3469. #: ../../guides/plugins/plugin-skeleton.rst:86
  3470. msgid "For example, the action ``my/example/action`` would go in ``my_plugin/actions/my/example/action.php``. This makes it very obvious which script is associated with which action."
  3471. msgstr ""
  3472. #: ../../guides/plugins/plugin-skeleton.rst:88
  3473. msgid "Similarly, the body of the form that submits to this action should be located in ``forms/my/example/action.php``. Not only does this make the connection b/w action handler, form code, and action name obvious, but it allows you to use the new (as of Elgg 1.8) ``elgg_view_form()`` function easily."
  3474. msgstr ""
  3475. #: ../../guides/plugins/plugin-skeleton.rst:91
  3476. msgid "Text Files"
  3477. msgstr ""
  3478. #: ../../guides/plugins/plugin-skeleton.rst:93
  3479. msgid "Plugins *may* provide various \\*.txt as additional documentation for the plugin. These files **must** be in Markdown syntax and will generate links on the plugin management sections."
  3480. msgstr ""
  3481. #: ../../guides/plugins/plugin-skeleton.rst:96
  3482. msgid "README.txt"
  3483. msgstr ""
  3484. #: ../../guides/plugins/plugin-skeleton.rst:96
  3485. msgid "*should* provide additional information about the plugin of an unspecified nature"
  3486. msgstr ""
  3487. #: ../../guides/plugins/plugin-skeleton.rst:99
  3488. msgid "COPYRIGHT.txt"
  3489. msgstr ""
  3490. #: ../../guides/plugins/plugin-skeleton.rst:99
  3491. msgid "If included, **must** provide an explanation of the plugin's copyright, besides what is included in ``manifest.xml``"
  3492. msgstr ""
  3493. #: ../../guides/plugins/plugin-skeleton.rst:102
  3494. msgid "LICENSE.txt"
  3495. msgstr ""
  3496. #: ../../guides/plugins/plugin-skeleton.rst:102
  3497. msgid "If included, **must** provide the text of the license that the plugin is released under."
  3498. msgstr ""
  3499. #: ../../guides/plugins/plugin-skeleton.rst:105
  3500. msgid "INSTALL.txt"
  3501. msgstr ""
  3502. #: ../../guides/plugins/plugin-skeleton.rst:105
  3503. msgid "If included, **must** provide additional instructions for installing the plugin if the process is sufficiently complicated (e.g. if it requires installing third party libraries on the host machine, or requires acquiring an API key from a third party)."
  3504. msgstr ""
  3505. #: ../../guides/plugins/plugin-skeleton.rst:108
  3506. msgid "CHANGES.txt"
  3507. msgstr ""
  3508. #: ../../guides/plugins/plugin-skeleton.rst:108
  3509. msgid "If included, **must** provide a list of changes for their plugin, grouped by version number, with the most recent version at the top."
  3510. msgstr ""
  3511. #: ../../guides/plugins/plugin-skeleton.rst:110
  3512. msgid "Plugins *may* include additional \\*.txt files besides these, but no interface is given for reading them."
  3513. msgstr ""
  3514. #: ../../guides/plugins/plugin-skeleton.rst:113
  3515. msgid "Pages"
  3516. msgstr ""
  3517. #: ../../guides/plugins/plugin-skeleton.rst:115
  3518. msgid "Plugins *should* put page-generating scripts in a ``pages/`` directory inside their plugin root. Furthermore, plugins *should* put page-generating scripts under a directory named for their handler. For example, the script for page ``yoursite.com/my_handler/view/1234`` *should* be located at ``mod/my_plugin/pages/my_handler/view.php``."
  3519. msgstr ""
  3520. #: ../../guides/plugins/plugin-skeleton.rst:117
  3521. msgid "In the past, these scripts were included directly in the plugin root. Plugins *should not* do this anymore, and if any core plugins are found to do this, that is a bug if not present solely for the sake of backwards compatibility."
  3522. msgstr ""
  3523. #: ../../guides/plugins/plugin-skeleton.rst:121
  3524. msgid "The reason we encourage this structure is"
  3525. msgstr ""
  3526. #: ../../guides/plugins/plugin-skeleton.rst:123
  3527. msgid "To form a logical relationship between urls and scripts, so that people examining the code can have an idea of what it does just by examining the structure."
  3528. msgstr ""
  3529. #: ../../guides/plugins/plugin-skeleton.rst:124
  3530. msgid "To clean up the root plugin directory, which historically has quickly gotten cluttered with the page handling scripts."
  3531. msgstr ""
  3532. #: ../../guides/plugins/plugin-skeleton.rst:128
  3533. msgid "Classes"
  3534. msgstr ""
  3535. #: ../../guides/plugins/plugin-skeleton.rst:130
  3536. msgid "All classes that your plugin defines *should* be included in a ``classes/`` directory. This directory has special meaning to Elgg. Classes placed in this directory are autoloaded on demand, and do not need to be included explicitly."
  3537. msgstr ""
  3538. #: ../../guides/plugins/plugin-skeleton.rst:134
  3539. msgid "Each file **must** have exactly one class defined inside it. The file name **must** match the name of the one class that the file defines (except for the \".php\" suffix)."
  3540. msgstr ""
  3541. #: ../../guides/plugins/plugin-skeleton.rst:139
  3542. msgid "Files with a \".class.php\" extension will **not** be recognized by Elgg."
  3543. msgstr ""
  3544. #: ../../guides/plugins/plugin-skeleton.rst:142
  3545. msgid "Vendors"
  3546. msgstr ""
  3547. #: ../../guides/plugins/plugin-skeleton.rst:144
  3548. msgid "Included third-party libraries of any kind *should* be included in the ``vendors/`` folder in the plugin root. Though this folder has no special significance to the Elgg engine, this has historically been the location where Elgg core stores its third-party libraries, so we encourage the same format for the sake of consistency and familiarity."
  3549. msgstr ""
  3550. #: ../../guides/plugins/plugin-skeleton.rst:147
  3551. msgid "Lib"
  3552. msgstr ""
  3553. #: ../../guides/plugins/plugin-skeleton.rst:149
  3554. msgid "Procedural code defined by your plugin *should* be placed in the `lib/` directory. Though this folder has no special significance to the Elgg engine, this has historically been the location where Elgg core stores its procedural code, so we encourage the same format for the sake of consistency and familiarity."
  3555. msgstr ""
  3556. #: ../../guides/plugins/plugin-skeleton.rst:154
  3557. msgid "In order to override core views, a plugin's views **must** be placed in a ``views/``. This directory has special meaning to Elgg as views defined here automatically override Elgg core's version of those views. For more info, see :doc:`/guides/views`."
  3558. msgstr ""
  3559. #: ../../guides/plugins/plugin-skeleton.rst:157
  3560. msgid "Javascript"
  3561. msgstr ""
  3562. #: ../../guides/plugins/plugin-skeleton.rst:159
  3563. msgid "Javascript that will be included on every page *should* be put in the ``plugin/js`` view and your plugin *should* extend ``js/elgg`` with this view. Javascript that does not need to be included on every page *should* be put in a static javascript file under the ``js/`` directory. For more information on Javascript in Elgg, see :doc:`/guides/javascript`."
  3564. msgstr ""
  3565. #: ../../guides/plugins/plugin-skeleton.rst:162
  3566. msgid "activate.php and deactivate.php"
  3567. msgstr ""
  3568. #: ../../guides/plugins/plugin-skeleton.rst:164
  3569. msgid "The ``activate.php`` and ``deactivate.php`` files contain procedural code that will run respectively upon plugin activation or deactivation. Use these files to perform one-time events such as registering a persistent admin notice, registering subtypes, or performing garbage collection when deactivated."
  3570. msgstr ""
  3571. #: ../../guides/river.rst:2
  3572. msgid "River"
  3573. msgstr ""
  3574. #: ../../guides/river.rst:4
  3575. msgid "Elgg natively supports the \"river\", an activity stream containing descriptions of activities performed by site members. This page gives an overview of adding events to the river in an Elgg plugin."
  3576. msgstr ""
  3577. #: ../../guides/river.rst:9
  3578. msgid "Pushing river items"
  3579. msgstr ""
  3580. #: ../../guides/river.rst:11
  3581. msgid "Items are pushed to the activity river through a function call, which you must include in your plugins for the items to appear."
  3582. msgstr ""
  3583. #: ../../guides/river.rst:14
  3584. msgid "Here we add a river item telling that a user has created a new blog post:"
  3585. msgstr ""
  3586. #: ../../guides/river.rst:27
  3587. msgid "All available parameters:"
  3588. msgstr ""
  3589. #: ../../guides/river.rst:29
  3590. msgid "``view`` => STR The view that will handle the river item (must exist)"
  3591. msgstr ""
  3592. #: ../../guides/river.rst:30
  3593. msgid "``action_type`` => STR An arbitrary string to define the action (e.g. 'create', 'update', 'vote', 'review', etc)"
  3594. msgstr ""
  3595. #: ../../guides/river.rst:31
  3596. msgid "``subject_guid`` => INT The GUID of the entity doing the action"
  3597. msgstr ""
  3598. #: ../../guides/river.rst:32
  3599. msgid "``object_guid`` => INT The GUID of the entity being acted upon"
  3600. msgstr ""
  3601. #: ../../guides/river.rst:33
  3602. msgid "``target_guid`` => INT The GUID of the the object entity's container (optional)"
  3603. msgstr ""
  3604. #: ../../guides/river.rst:34
  3605. msgid "``access_id`` => INT The access ID of the river item (default: same as the object)"
  3606. msgstr ""
  3607. #: ../../guides/river.rst:35
  3608. msgid "``posted`` => INT The UNIX epoch timestamp of the river item (default: now)"
  3609. msgstr ""
  3610. #: ../../guides/river.rst:36
  3611. msgid "``annotation_id`` => INT The annotation ID associated with this river entry (optional)"
  3612. msgstr ""
  3613. #: ../../guides/river.rst:38
  3614. msgid "When an item is deleted or changed, the river item will be updated automatically."
  3615. msgstr ""
  3616. #: ../../guides/river.rst:41
  3617. msgid "River views"
  3618. msgstr ""
  3619. #: ../../guides/river.rst:43
  3620. msgid "In order for events to appear in the river you need to provide a corresponding :doc:`view <views>` with the name specified in the function above."
  3621. msgstr ""
  3622. #: ../../guides/river.rst:46
  3623. msgid "We recommend ``/river/{type}/{subtype}/{action}``, where:"
  3624. msgstr ""
  3625. #: ../../guides/river.rst:48
  3626. msgid "{type} is the entity type of the content we're interested in (``object`` for objects, ``user`` for users, etc)"
  3627. msgstr ""
  3628. #: ../../guides/river.rst:49
  3629. msgid "{subtype} is the entity subtype of the content we're interested in (``blog`` for blogs, ``photo_album`` for albums, etc)"
  3630. msgstr ""
  3631. #: ../../guides/river.rst:50
  3632. msgid "{action} is the action that took place (''create'', ''update'', etc)"
  3633. msgstr ""
  3634. #: ../../guides/river.rst:52
  3635. msgid "River item information will be passed in an object called ``$vars['item']``, which contains the following important parameters:"
  3636. msgstr ""
  3637. #: ../../guides/river.rst:54
  3638. msgid "``$vars['item']->subject_guid`` The GUID of the user performing the action"
  3639. msgstr ""
  3640. #: ../../guides/river.rst:55
  3641. msgid "``$vars['item']->object_guid`` The GUID of the entity being acted upon"
  3642. msgstr ""
  3643. #: ../../guides/river.rst:57
  3644. msgid "Timestamps etc will be generated for you."
  3645. msgstr ""
  3646. #: ../../guides/river.rst:59
  3647. msgid "For example, the blog plugin uses the following code for its river view:"
  3648. msgstr ""
  3649. #: ../../guides/routing.rst:2
  3650. msgid "Routing"
  3651. msgstr ""
  3652. #: ../../guides/routing.rst:4
  3653. msgid "Elgg has two mechanisms to respond to HTTP requests that don't already go through the :doc:`/design/actions` and :doc:`/guides/views/simplecache` systems."
  3654. msgstr ""
  3655. #: ../../guides/routing.rst:8
  3656. msgid "URL Identifier and Segments"
  3657. msgstr ""
  3658. #: ../../guides/routing.rst:10
  3659. msgid "After removing the site URL, Elgg splits the URL path by ``/`` into an array. The first element, the **identifier**, is shifted off, and the remaining elements are called the **segments**. For example, if the site URL is ``http://example.com/elgg/``, the URL ``http://example.com/elgg/blog/owner/jane?foo=123`` produces:"
  3660. msgstr ""
  3661. #: ../../guides/routing.rst:15
  3662. msgid "Identifier: ``'blog'``. Segments: ``['owner', 'jane']``. (the query string parameters are available via ``get_input()``)"
  3663. msgstr ""
  3664. #: ../../guides/routing.rst:18
  3665. msgid "The site URL (home page) is a special case that produces an empty string identifier and an empty segments array."
  3666. msgstr ""
  3667. #: ../../guides/routing.rst:23
  3668. msgid "Page Handler"
  3669. msgstr ""
  3670. #: ../../guides/routing.rst:25
  3671. msgid "To handle all URLs that begin with a particular identifier, you can register a function to act as a :doc:`/guides/pagehandler`. When the handler is called, the segments array is passed in as the first argument."
  3672. msgstr ""
  3673. #: ../../guides/routing.rst:29
  3674. msgid "The following code registers a page handler for \"blog\" URLs and shows how one might route the request to a resource view."
  3675. msgstr ""
  3676. #: ../../guides/routing.rst:56
  3677. msgid "The ``route`` Plugin Hook"
  3678. msgstr ""
  3679. #: ../../guides/routing.rst:58
  3680. msgid "The ``route`` plugin hook is triggered earlier, before page handlers are called. The URL identifier is given as the type of the hook. This hook can be used to modify the identifier or segments, to take over page rendering completely, or just to add some logic before the request is handled elsewhere."
  3681. msgstr ""
  3682. #: ../../guides/routing.rst:63
  3683. msgid "Generally devs should use a page handler unless they need to affect a single page or a wider variety of URLs."
  3684. msgstr ""
  3685. #: ../../guides/routing.rst:65
  3686. msgid "The following code intercepts requests to the page handler for ``customblog`` and internally redirects them to the ``blog`` page handler."
  3687. msgstr ""
  3688. #: ../../guides/routing.rst:78
  3689. msgid "The following code results in ``/blog/all`` requests being completely handled by the plugin hook handler. For these requests the ``blog`` page handler is never called."
  3690. msgstr ""
  3691. #: ../../guides/routing.rst:103
  3692. msgid "Routing overview"
  3693. msgstr ""
  3694. #: ../../guides/routing.rst:105
  3695. msgid "For regular pages, Elgg's program flow is something like this:"
  3696. msgstr ""
  3697. #: ../../guides/routing.rst:107
  3698. msgid "A user requests ``http://example.com/blog/owner/jane``."
  3699. msgstr ""
  3700. #: ../../guides/routing.rst:108
  3701. msgid "Plugins are initialized."
  3702. msgstr ""
  3703. #: ../../guides/routing.rst:109
  3704. msgid "Elgg parses the URL to identifier ``blog`` and segments ``['owner', 'jane']``."
  3705. msgstr ""
  3706. #: ../../guides/routing.rst:110
  3707. msgid "Elgg triggers the plugin hook ``route, blog`` (see above)."
  3708. msgstr ""
  3709. #: ../../guides/routing.rst:111
  3710. msgid "Elgg finds a registered page handler (see above) for ``blog``, and calls the function, passing in the segments."
  3711. msgstr ""
  3712. #: ../../guides/routing.rst:113
  3713. msgid "The page handler function determines it needs to render a single user's blog. It stores the username via ``set_input()`` and calls the view ``resources/blog/owner``."
  3714. msgstr ""
  3715. #: ../../guides/routing.rst:115
  3716. msgid "The ``resources/blog/owner`` view gets the username via ``get_input()``, and uses many other views and formatting functions like ``elgg_view_layout()`` and ``elgg_view_page()`` to create the entire HTML page."
  3717. msgstr ""
  3718. #: ../../guides/routing.rst:117
  3719. msgid "The page handler echos the view HTML and returns ``true`` to indicate it handled the request."
  3720. msgstr ""
  3721. #: ../../guides/routing.rst:118
  3722. msgid "PHP invokes Elgg's shutdown sequence."
  3723. msgstr ""
  3724. #: ../../guides/routing.rst:119
  3725. msgid "The user receives a fully rendered page."
  3726. msgstr ""
  3727. #: ../../guides/routing.rst:121
  3728. msgid "Elgg's coding standards suggest a particular URL layout, but there is no syntax enforced."
  3729. msgstr ""
  3730. #: ../../guides/settings.rst:2
  3731. msgid "Plugin settings"
  3732. msgstr ""
  3733. #: ../../guides/settings.rst:4
  3734. msgid "You need to perform some extra steps if your plugin needs settings to be saved and controlled via the administration panel:"
  3735. msgstr ""
  3736. #: ../../guides/settings.rst:6
  3737. msgid "Create a file in your plugin’s default view folder called ``plugins/your_plugin/settings.php``, where ``your_plugin`` is the name of your plugin’s directory in the ``mod`` hierarchy"
  3738. msgstr ""
  3739. #: ../../guides/settings.rst:7
  3740. msgid "Fill this file with the form elements you want to display together with :doc:`internationalised <i18n>` text labels"
  3741. msgstr ""
  3742. #: ../../guides/settings.rst:8
  3743. msgid "Set the name attribute in your form components to ``param[`varname`]`` where ``varname`` is the name of the variable. These will be saved as private settings attached to a plugin entity. So, if your variable is called ``param[myparameter]`` your plugin (which is also passed to this view as ``$vars['entity']``) will be called ``$vars['entity']->myparameter``"
  3744. msgstr ""
  3745. #: ../../guides/settings.rst:10
  3746. msgid "An example ``settings.php`` would look like:"
  3747. msgstr ""
  3748. #: ../../guides/settings.rst:27
  3749. msgid "You don’t need to add a save button or the form, this will be handled by the framework."
  3750. msgstr ""
  3751. #: ../../guides/settings.rst:31
  3752. msgid "You cannot use form components that send no value when \"off.\" These include radio inputs and check boxes."
  3753. msgstr ""
  3754. #: ../../guides/settings.rst:34
  3755. msgid "User settings"
  3756. msgstr ""
  3757. #: ../../guides/settings.rst:36
  3758. msgid "Your plugin might need to store per user settings too, and you would like to have your plugin's options to appear in the user's settings page. This is also easy to do and follows the same pattern as setting up the global plugin configuration explained earlier. The only difference is that instead of using a ``settings`` file you will use ``usersettings``. So, the path to the user edit view for your plugin would be ``plugins/your_plugin/usersettings.php``."
  3759. msgstr ""
  3760. #: ../../guides/settings.rst:40
  3761. msgid "The title of the usersettings form will default to the plugin name. If you want to change this, add a translation for ``plugin_id:usersettings:title``."
  3762. msgstr ""
  3763. #: ../../guides/settings.rst:43
  3764. msgid "Retrieving settings in your code"
  3765. msgstr ""
  3766. #: ../../guides/settings.rst:45
  3767. msgid "To retrieve settings from your code use:"
  3768. msgstr ""
  3769. #: ../../guides/settings.rst:51
  3770. msgid "or for user settings"
  3771. msgstr ""
  3772. #: ../../guides/settings.rst:57
  3773. msgid "where:"
  3774. msgstr ""
  3775. #: ../../guides/settings.rst:59
  3776. msgid "``$name`` Is the value you want to retrieve"
  3777. msgstr ""
  3778. #: ../../guides/settings.rst:60
  3779. msgid "``$user_guid`` Is the user you want to retrieve these for (defaults to the currently logged in user)"
  3780. msgstr ""
  3781. #: ../../guides/settings.rst:61
  3782. msgid "``$plugin_name`` Is the name of the plugin (detected if run from within a plugin)"
  3783. msgstr ""
  3784. #: ../../guides/settings.rst:64
  3785. msgid "Setting values while in code"
  3786. msgstr ""
  3787. #: ../../guides/settings.rst:66
  3788. msgid "Values may also be set from within your plugin code, to do this use one of the following functions:"
  3789. msgstr ""
  3790. #: ../../guides/settings.rst:72
  3791. msgid "or"
  3792. msgstr ""
  3793. #: ../../guides/settings.rst:80
  3794. msgid "The ``$plugin_id`` needs to be provided when setting plugin (user)settings."
  3795. msgstr ""
  3796. #: ../../guides/themes.rst:2
  3797. msgid "Themes"
  3798. msgstr ""
  3799. #: ../../guides/themes.rst:4
  3800. msgid "Customize the look and feel of Elgg."
  3801. msgstr ""
  3802. #: ../../guides/themes.rst:6
  3803. msgid "A theme is a type of :doc:`plugin </admin/plugins>` that overrides display aspects of Elgg."
  3804. msgstr ""
  3805. #: ../../guides/themes.rst:10
  3806. msgid "This guide assumes you are familiar with:"
  3807. msgstr ""
  3808. #: ../../guides/themes.rst:17
  3809. msgid "Create your plugin"
  3810. msgstr ""
  3811. #: ../../guides/themes.rst:19
  3812. msgid "Create your plugin as described in the :doc:`developer guide </guides/index>`."
  3813. msgstr ""
  3814. #: ../../guides/themes.rst:21
  3815. msgid "Create a new directory under mod/"
  3816. msgstr ""
  3817. #: ../../guides/themes.rst:22
  3818. msgid "Create a new start.php"
  3819. msgstr ""
  3820. #: ../../guides/themes.rst:23
  3821. msgid "Create a manifest.xml file describing your theme."
  3822. msgstr ""
  3823. #: ../../guides/themes.rst:26
  3824. msgid "Customize the CSS"
  3825. msgstr ""
  3826. #: ../../guides/themes.rst:28
  3827. msgid "As of Elgg 1.8, the css is split into several files based on what aspects of the site you're theming. This allows you to tackle them one at a time, giving you a chance to make real progress without getting overwhelmed."
  3828. msgstr ""
  3829. #: ../../guides/themes.rst:33
  3830. msgid "Here is a list of the existing CSS views:"
  3831. msgstr ""
  3832. #: ../../guides/themes.rst:35
  3833. msgid "css/elements/buttons: Provides a way to style all the different kinds of buttons your site will use. There are 5 kinds of buttons that plugins will expect to be available: action, cancel, delete, submit, and special."
  3834. msgstr ""
  3835. #: ../../guides/themes.rst:36
  3836. msgid "css/elements/chrome: This file has some miscellaneous look-and-feel classes."
  3837. msgstr ""
  3838. #: ../../guides/themes.rst:37
  3839. msgid "css/elements/components: This file contains many “css objects” that are used all over the site: media block, list, gallery, table, owner block, system messages, river, tags, photo, and comments."
  3840. msgstr ""
  3841. #: ../../guides/themes.rst:38
  3842. msgid "css/elements/forms: This file determines what your forms and input elements will look like."
  3843. msgstr ""
  3844. #: ../../guides/themes.rst:39
  3845. msgid "css/elements/icons: Contains styles for the sprite icons and avatars used on your site."
  3846. msgstr ""
  3847. #: ../../guides/themes.rst:40
  3848. msgid "css/elements/layout: Determines what your page layout will look like: sidebars, page wrapper, main body, header, footer, etc."
  3849. msgstr ""
  3850. #: ../../guides/themes.rst:41
  3851. msgid "css/elements/modules: Lots of content in Elgg is displayed in boxes with a title and a content body. We called these modules. There are a few kinds: info, aside, featured, dropdown, popup, widget. Widget styles are included in this file too, since they are a subset of modules."
  3852. msgstr ""
  3853. #: ../../guides/themes.rst:42
  3854. msgid "css/elements/navigation: This file determines what all your menus will look like."
  3855. msgstr ""
  3856. #: ../../guides/themes.rst:43
  3857. msgid "css/elements/typography: This file determines what the content and headings of your site will look like."
  3858. msgstr ""
  3859. #: ../../guides/themes.rst:44
  3860. msgid "css/rtl: Custom rules for users viewing your site in a right-to-left language."
  3861. msgstr ""
  3862. #: ../../guides/themes.rst:45
  3863. msgid "css/admin: A completely separate theme for the admin area (usually not overridden)."
  3864. msgstr ""
  3865. #: ../../guides/themes.rst:46
  3866. msgid "css/elgg: Compiles all the core css/elements/\\* files into one file (DO NOT OVERRIDE)."
  3867. msgstr ""
  3868. #: ../../guides/themes.rst:47
  3869. msgid "css/elements/core: Contains base styles for the more complicated “css objects”. If you find yourself wanting to override this, you probably need to report a bug to Elgg core instead (DO NOT OVERRIDE)."
  3870. msgstr ""
  3871. #: ../../guides/themes.rst:48
  3872. msgid "css/elements/reset: Contains a reset stylesheet that forces elements to have the same default"
  3873. msgstr ""
  3874. #: ../../guides/themes.rst:52
  3875. msgid "View extension"
  3876. msgstr ""
  3877. #: ../../guides/themes.rst:54
  3878. msgid "There are two ways you can modify views:"
  3879. msgstr ""
  3880. #: ../../guides/themes.rst:56
  3881. msgid "The first way is to add extra stuff to an existing view via the extend view function from within your start.php’s initialization function."
  3882. msgstr ""
  3883. #: ../../guides/themes.rst:59
  3884. msgid "For example, the following start.php will add mytheme/css to Elgg's core css file:"
  3885. msgstr ""
  3886. #: ../../guides/themes.rst:74
  3887. msgid "View overloading"
  3888. msgstr ""
  3889. #: ../../guides/themes.rst:76
  3890. msgid "Plugins can have a view hierarchy, any file that exists here will replace any files in the existing core view hierarchy... so for example, if my plugin has a file:"
  3891. msgstr ""
  3892. #: ../../guides/themes.rst:80
  3893. msgid "``/mod/myplugin/views/default/css/elements/typography.php``"
  3894. msgstr ""
  3895. #: ../../guides/themes.rst:82
  3896. msgid "it will replace:"
  3897. msgstr ""
  3898. #: ../../guides/themes.rst:84
  3899. msgid "``/views/default/css/elements/typography.php``"
  3900. msgstr ""
  3901. #: ../../guides/themes.rst:86
  3902. msgid "But only when the plugin is active."
  3903. msgstr ""
  3904. #: ../../guides/themes.rst:88
  3905. msgid "This gives you total control over the way Elgg looks and behaves. It gives you the option to either slightly modify or totally replace existing views."
  3906. msgstr ""
  3907. #: ../../guides/themes.rst:93
  3908. msgid "Tools"
  3909. msgstr ""
  3910. #: ../../guides/themes.rst:95
  3911. msgid "Starting in Elgg 1.8, we've provided you with some development tools to help you with theming: Turn on the “Developers” plugin and go to the “Theme Preview” page to start tracking your theme's progress."
  3912. msgstr ""
  3913. #: ../../guides/themes.rst:100
  3914. msgid "Customizing the front page"
  3915. msgstr ""
  3916. #: ../../guides/themes.rst:101
  3917. msgid "The main Elgg index page runs a plugin hook called 'index,system'. If this returns true, it assumes that another front page has been drawn and doesn't display the default page."
  3918. msgstr ""
  3919. #: ../../guides/themes.rst:105
  3920. msgid "Therefore, you can override it by registering a function to the 'index,system' plugin hook and then returning true from that function."
  3921. msgstr ""
  3922. #: ../../guides/themes.rst:108
  3923. msgid "Here's a quick overview:"
  3924. msgstr ""
  3925. #: ../../guides/themes.rst:110
  3926. msgid "Create your new plugin"
  3927. msgstr ""
  3928. #: ../../guides/themes.rst:112
  3929. msgid "In the start.php you will need something like the following:"
  3930. msgstr ""
  3931. #: ../../guides/themes.rst:134
  3932. msgid "Then, create an index page (/pluginname/pages/index.php) and use that to put the content you would like on the front page of your Elgg site."
  3933. msgstr ""
  3934. #: ../../guides/upgrading.rst:2
  3935. msgid "Upgrading Plugins"
  3936. msgstr ""
  3937. #: ../../guides/upgrading.rst:4
  3938. msgid "Prepare your plugin for the next version of Elgg."
  3939. msgstr ""
  3940. #: ../../guides/upgrading.rst:6
  3941. msgid "See the administator guides for :doc:`how to upgrade a live site </admin/upgrading>`."
  3942. msgstr ""
  3943. #: ../../guides/upgrading.rst:13
  3944. msgid "From 1.10 to 1.11"
  3945. msgstr ""
  3946. #: ../../guides/upgrading.rst:16
  3947. msgid "Comment highlighting"
  3948. msgstr ""
  3949. #: ../../guides/upgrading.rst:18
  3950. msgid "If your theme is using the file ``views/default/css/elements/components.php``, you must add the following style definitions in it to enable highlighting for comments and discussion replies:"
  3951. msgstr ""
  3952. #: ../../guides/upgrading.rst:36
  3953. msgid "From 1.9 to 1.10"
  3954. msgstr ""
  3955. #: ../../guides/upgrading.rst:39
  3956. msgid "File uploads"
  3957. msgstr ""
  3958. #: ../../guides/upgrading.rst:41
  3959. msgid "If your plugin is using a snippet copied from the ``file/upload`` action to fix detected mime types for Microsoft zipped formats, it can now be safely removed."
  3960. msgstr ""
  3961. #: ../../guides/upgrading.rst:43
  3962. msgid "If your upload action performs other manipulations on detected mime and simple types, it is recommended to make use of available plugin hooks:"
  3963. msgstr ""
  3964. #: ../../guides/upgrading.rst:45
  3965. msgid "``'mime_type','file'`` for filtering detected mime types"
  3966. msgstr ""
  3967. #: ../../guides/upgrading.rst:46
  3968. msgid "``'simple_type','file'`` for filtering parsed simple types"
  3969. msgstr ""
  3970. #: ../../guides/upgrading.rst:49
  3971. msgid "From 1.8 to 1.9"
  3972. msgstr ""
  3973. #: ../../guides/upgrading.rst:51
  3974. msgid "In the examples we are upgrading an imaginary \"Photos\" plugin."
  3975. msgstr ""
  3976. #: ../../guides/upgrading.rst:53
  3977. msgid "Only the key changes are included. For example some of the deprecated functions are not mentioned here separately."
  3978. msgstr ""
  3979. #: ../../guides/upgrading.rst:55
  3980. msgid "Each section will include information whether the change is backwards compatible with Elgg 1.8."
  3981. msgstr ""
  3982. #: ../../guides/upgrading.rst:58
  3983. msgid "The manifest file"
  3984. msgstr ""
  3985. #: ../../guides/upgrading.rst:60
  3986. msgid "No changes are needed if your plugin is compatible with 1.8."
  3987. msgstr ""
  3988. #: ../../guides/upgrading.rst:62
  3989. msgid "It's however recommended to add the ``<id>`` tag. It's value should be the name of the directory where the plugin is located inside the ``mod/`` directory."
  3990. msgstr ""
  3991. #: ../../guides/upgrading.rst:64
  3992. msgid "If you make changes that break BC, you must update the plugin version and the required Elgg release."
  3993. msgstr ""
  3994. #: ../../guides/upgrading.rst:66
  3995. msgid "Example of (shortened) old version:"
  3996. msgstr ""
  3997. #: ../../guides/upgrading.rst:82
  3998. msgid "Example of (shortened) new version:"
  3999. msgstr ""
  4000. #: ../../guides/upgrading.rst:100
  4001. msgid "$CONFIG and $vars['config']"
  4002. msgstr ""
  4003. #: ../../guides/upgrading.rst:102
  4004. msgid "Both the global ``$CONFIG`` variable and the ``$vars['config']`` parameter have been deprecated. They should be replaced with the ``elgg_get_config()`` function."
  4005. msgstr ""
  4006. #: ../../guides/upgrading.rst:104
  4007. msgid "Example of old code:"
  4008. msgstr ""
  4009. #: ../../guides/upgrading.rst:115
  4010. msgid "Example of new code:"
  4011. msgstr ""
  4012. #: ../../guides/upgrading.rst:123
  4013. #: ../../guides/upgrading.rst:312
  4014. msgid "Compatible with 1.8"
  4015. msgstr ""
  4016. #: ../../guides/upgrading.rst:127
  4017. msgid "See how the community_plugins plugin was updated: https://github.com/Elgg/community_plugins/commit/f233999bbd1478a200ee783679c2e2897c9a0483"
  4018. msgstr ""
  4019. #: ../../guides/upgrading.rst:130
  4020. msgid "Language files"
  4021. msgstr ""
  4022. #: ../../guides/upgrading.rst:132
  4023. msgid "In Elgg 1.8 the language files needed to use the ``add_translation()`` function. In 1.9 it is enough to just return the array that was previously passed to the function as a parameter. Elgg core will use the file name (e.g. en.php) to tell which language the file contains."
  4024. msgstr ""
  4025. #: ../../guides/upgrading.rst:135
  4026. msgid "Example of the old way in ``languages/en.php``:"
  4027. msgstr ""
  4028. #: ../../guides/upgrading.rst:144
  4029. msgid "Example of new way:"
  4030. msgstr ""
  4031. #: ../../guides/upgrading.rst:154
  4032. #: ../../guides/upgrading.rst:244
  4033. #: ../../guides/upgrading.rst:340
  4034. #: ../../guides/upgrading.rst:402
  4035. msgid "Not compatible with 1.8"
  4036. msgstr ""
  4037. #: ../../guides/upgrading.rst:159
  4038. msgid "One of the biggest changes in Elgg 1.9 is the notifications system. The new system allows more flexible and scalable way of sending notifications."
  4039. msgstr ""
  4040. #: ../../guides/upgrading.rst:161
  4041. #: ../../guides/upgrading.rst:262
  4042. #: ../../guides/upgrading.rst:347
  4043. msgid "Example of the old way:"
  4044. msgstr ""
  4045. #: ../../guides/upgrading.rst:200
  4046. #: ../../guides/upgrading.rst:282
  4047. #: ../../guides/upgrading.rst:368
  4048. msgid "Example of the new way:"
  4049. msgstr ""
  4050. #: ../../guides/upgrading.rst:248
  4051. msgid "See how the community_plugins plugin was updated to use the new system: https://github.com/Elgg/community_plugins/commit/bfa356cfe8fb99ebbca4109a1b8a1383b70ff123"
  4052. msgstr ""
  4053. #: ../../guides/upgrading.rst:250
  4054. msgid "Notifications can also be sent with the ``notify_user()`` function."
  4055. msgstr ""
  4056. #: ../../guides/upgrading.rst:252
  4057. msgid "It has however been updated to support three new optional parameters passed inside an array as the fifth parameter."
  4058. msgstr ""
  4059. #: ../../guides/upgrading.rst:254
  4060. msgid "The parameters give notification plugins more control over the notifications, so they should be included whenever possible. For example the bundled site_notifications plugin won't work properly if the parameters are missing."
  4061. msgstr ""
  4062. #: ../../guides/upgrading.rst:256
  4063. msgid "Parameters:"
  4064. msgstr ""
  4065. #: ../../guides/upgrading.rst:258
  4066. msgid "**object** The object that we are notifying about (e.g. ElggEntity or ElggAnnotation). This is needed so that notification plugins can provide a link to the object."
  4067. msgstr ""
  4068. #: ../../guides/upgrading.rst:259
  4069. msgid "**action** String that describes the action that triggered the notification (e.g. \"create\", \"update\", etc)."
  4070. msgstr ""
  4071. #: ../../guides/upgrading.rst:260
  4072. msgid "**summary** String that contains a summary of the notification. (It should be more informative than the notification subject but less informative than the notification body.)"
  4073. msgstr ""
  4074. #: ../../guides/upgrading.rst:315
  4075. msgid "Adding items to the Activity listing"
  4076. msgstr ""
  4077. #: ../../guides/upgrading.rst:330
  4078. msgid "You can also add the optional ``target_guid`` parameter which tells the target of the create action."
  4079. msgstr ""
  4080. #: ../../guides/upgrading.rst:332
  4081. msgid "If the photo would had been added for example into a photo album, we could add it by passing in also:"
  4082. msgstr ""
  4083. #: ../../guides/upgrading.rst:343
  4084. msgid "Entity URL handlers"
  4085. msgstr ""
  4086. #: ../../guides/upgrading.rst:345
  4087. msgid "The ``elgg_register_entity_url_handler()`` function has been deprecated. In 1.9 you should use the ``'entity:url', 'object'`` plugin hook instead."
  4088. msgstr ""
  4089. #: ../../guides/upgrading.rst:405
  4090. #: ../../guides/web-services.rst:2
  4091. msgid "Web services"
  4092. msgstr ""
  4093. #: ../../guides/upgrading.rst:407
  4094. msgid "In Elgg 1.8 the web services API was included in core and methods were exposed using ``expose_function()``. To enable the same functionality for Elgg 1.9, enable the \"Web services 1.9\" plugin and replace all calls to ``expose_function()`` with ``elgg_ws_expose_function()``."
  4095. msgstr ""
  4096. #: ../../guides/upgrading.rst:413
  4097. msgid "From 1.7 to 1.8"
  4098. msgstr ""
  4099. #: ../../guides/upgrading.rst:414
  4100. msgid "Elgg 1.8 is the biggest leap forward in the development of Elgg since version 1.0. As such, there is more work to update core and plugins than with previous upgrades. There were a small number of API changes and following our standard practice, the methods we deprecated have been updated to work with the new API. The biggest changes are in the standardization of plugins and in the views system."
  4101. msgstr ""
  4102. #: ../../guides/upgrading.rst:422
  4103. msgid "Updating core"
  4104. msgstr ""
  4105. #: ../../guides/upgrading.rst:423
  4106. msgid "Delete the following core directories (same level as _graphics and engine):"
  4107. msgstr ""
  4108. #: ../../guides/upgrading.rst:425
  4109. msgid "_css"
  4110. msgstr ""
  4111. #: ../../guides/upgrading.rst:426
  4112. msgid "account"
  4113. msgstr ""
  4114. #: ../../guides/upgrading.rst:427
  4115. msgid "admin"
  4116. msgstr ""
  4117. #: ../../guides/upgrading.rst:428
  4118. msgid "dashboard"
  4119. msgstr ""
  4120. #: ../../guides/upgrading.rst:429
  4121. msgid "entities"
  4122. msgstr ""
  4123. #: ../../guides/upgrading.rst:430
  4124. msgid "friends"
  4125. msgstr ""
  4126. #: ../../guides/upgrading.rst:431
  4127. msgid "search"
  4128. msgstr ""
  4129. #: ../../guides/upgrading.rst:432
  4130. msgid "settings"
  4131. msgstr ""
  4132. #: ../../guides/upgrading.rst:433
  4133. msgid "simplecache"
  4134. msgstr ""
  4135. #: ../../guides/upgrading.rst:434
  4136. msgid "views"
  4137. msgstr ""
  4138. #: ../../guides/upgrading.rst:438
  4139. msgid "If you do not delete these directories before an upgrade, you will have problems!"
  4140. msgstr ""
  4141. #: ../../guides/upgrading.rst:442
  4142. msgid "Updating plugins"
  4143. msgstr ""
  4144. #: ../../guides/upgrading.rst:446
  4145. msgid "All: /page_handler/all"
  4146. msgstr ""
  4147. #: ../../guides/upgrading.rst:447
  4148. msgid "User’s content: /page_handler/owner/:username"
  4149. msgstr ""
  4150. #: ../../guides/upgrading.rst:448
  4151. msgid "User’s friends' content: /page_handler/friends/:username"
  4152. msgstr ""
  4153. #: ../../guides/upgrading.rst:449
  4154. msgid "Single entity: /page_handler/view/:guid/:title"
  4155. msgstr ""
  4156. #: ../../guides/upgrading.rst:450
  4157. msgid "Added: /page_handler/add/:container_guid"
  4158. msgstr ""
  4159. #: ../../guides/upgrading.rst:451
  4160. msgid "Editing: /page_handler/edit/:guid"
  4161. msgstr ""
  4162. #: ../../guides/upgrading.rst:452
  4163. msgid "Group list: /page_handler/group/:guid/all"
  4164. msgstr ""
  4165. #: ../../guides/upgrading.rst:456
  4166. msgid "Include page handler scripts from the page handler"
  4167. msgstr ""
  4168. #: ../../guides/upgrading.rst:457
  4169. msgid "Almost every page handler should have a page handler script. (Example: ``bookmarks/all => mod/bookmarks/pages/bookmarks/all.php``)"
  4170. msgstr ""
  4171. #: ../../guides/upgrading.rst:461
  4172. msgid "Call ``gatekeeper()`` and ``admin_gatekeeper()`` in the page handler function if required."
  4173. msgstr ""
  4174. #: ../../guides/upgrading.rst:462
  4175. msgid "The group URL should use the ``pages/:handler/owner.php`` script."
  4176. msgstr ""
  4177. #: ../../guides/upgrading.rst:464
  4178. msgid "Update the URLs throughout the plugin. (Don't forget to remove ``/pg/``!)"
  4179. msgstr ""
  4180. #: ../../guides/upgrading.rst:469
  4181. msgid "Store page handler scripts in ``mod/:plugin/pages/:page_handler/:page_name.php``"
  4182. msgstr ""
  4183. #: ../../guides/upgrading.rst:470
  4184. msgid "Use the content page layout in page handler scripts:"
  4185. msgstr ""
  4186. #: ../../guides/upgrading.rst:476
  4187. msgid "Page handler scripts should not contain HTML."
  4188. msgstr ""
  4189. #: ../../guides/upgrading.rst:478
  4190. msgid "No need to set page owner if the URLs are in the standardized format."
  4191. msgstr ""
  4192. #: ../../guides/upgrading.rst:479
  4193. msgid "For group content, check the container_guid by using elgg_get_page_owner_entity()."
  4194. msgstr ""
  4195. #: ../../guides/upgrading.rst:483
  4196. msgid "The ``object/:subtype`` view"
  4197. msgstr ""
  4198. #: ../../guides/upgrading.rst:484
  4199. msgid "Make sure there are views for ``$vars['full_view'] == true`` and ``$vars['full_view'] == false``. ``$vars['full_view']`` replaced ``$vars['full]``."
  4200. msgstr ""
  4201. #: ../../guides/upgrading.rst:485
  4202. msgid "Check for the object in ``$vars['entity']``. Use ``elgg_instance_of()`` to make sure it's the type of entity you want."
  4203. msgstr ""
  4204. #: ../../guides/upgrading.rst:486
  4205. msgid "Return ``true`` to short circuit the view if the entity is missing or wrong."
  4206. msgstr ""
  4207. #: ../../guides/upgrading.rst:487
  4208. msgid "Use ``elgg_view(‘object/elements/summary’, array(‘entity’ => $entity));`` and ``elgg_view_menu(‘entity’, array(‘entity’ => $entity));`` to help format. You should use very little markup in these views."
  4209. msgstr ""
  4210. #: ../../guides/upgrading.rst:491
  4211. msgid "Update action structure"
  4212. msgstr ""
  4213. #: ../../guides/upgrading.rst:495
  4214. msgid "Add: ``action/:plugin/save``"
  4215. msgstr ""
  4216. #: ../../guides/upgrading.rst:496
  4217. msgid "Edit: ``action/:plugin/save``"
  4218. msgstr ""
  4219. #: ../../guides/upgrading.rst:497
  4220. msgid "Delete: ``action/:plugin/delete``"
  4221. msgstr ""
  4222. #: ../../guides/upgrading.rst:499
  4223. msgid "Make the delete action accept ``action/:handler/delete?guid=:guid`` so the metadata entity menu has the correct URL by default."
  4224. msgstr ""
  4225. #: ../../guides/upgrading.rst:503
  4226. msgid "Update deprecated functions"
  4227. msgstr ""
  4228. #: ../../guides/upgrading.rst:504
  4229. msgid "Functions deprecated in 1.7 will produce visible errors in 1.8."
  4230. msgstr ""
  4231. #: ../../guides/upgrading.rst:506
  4232. msgid "See ``/engine/lib/deprecated-1.7.php`` for the full list."
  4233. msgstr ""
  4234. #: ../../guides/upgrading.rst:508
  4235. msgid "You can also update functions deprecated in 1.8."
  4236. msgstr ""
  4237. #: ../../guides/upgrading.rst:510
  4238. msgid "Many registration functions simply added an ``elgg_`` prefix for consistency, and should be easy to update."
  4239. msgstr ""
  4240. #: ../../guides/upgrading.rst:511
  4241. msgid "See ``/engine/lib/deprecated-1.8.php`` for the full list."
  4242. msgstr ""
  4243. #: ../../guides/upgrading.rst:512
  4244. msgid "You can set the debug level to “warning” to get visual reminders of deprecated functions."
  4245. msgstr ""
  4246. #: ../../guides/upgrading.rst:516
  4247. msgid "Update the widget views"
  4248. msgstr ""
  4249. #: ../../guides/upgrading.rst:517
  4250. msgid "See the blog or file widgets for examples."
  4251. msgstr ""
  4252. #: ../../guides/upgrading.rst:521
  4253. msgid "Update the group profile module"
  4254. msgstr ""
  4255. #: ../../guides/upgrading.rst:522
  4256. msgid "Use the blog or file plugins for examples. This will help with making your plugin themeable by the new CSS framework."
  4257. msgstr ""
  4258. #: ../../guides/upgrading.rst:526
  4259. msgid "Update forms"
  4260. msgstr ""
  4261. #: ../../guides/upgrading.rst:527
  4262. msgid "Move form bodies to the ``forms/:action`` view to use Evan's new ``elgg_view_form``."
  4263. msgstr ""
  4264. #: ../../guides/upgrading.rst:528
  4265. msgid "Use input views in form bodies rather than html. This helps with theming and future-proofing."
  4266. msgstr ""
  4267. #: ../../guides/upgrading.rst:529
  4268. msgid "Add a function that prepares the form (see ``mod/file/lib/file.php`` for an example)"
  4269. msgstr ""
  4270. #: ../../guides/upgrading.rst:530
  4271. msgid "Make your forms sticky (see the file plugin's upload action and form prepare function)."
  4272. msgstr ""
  4273. #: ../../guides/upgrading.rst:532
  4274. msgid "The forms API is discussed in more detail in :doc:`/guides/actions`."
  4275. msgstr ""
  4276. #: ../../guides/upgrading.rst:537
  4277. msgid "We have added many CSS patterns to the base CSS file (modules, image block, spacing primitives). We encourage you to use these patterns and classes wherever possible. Doing so should:"
  4278. msgstr ""
  4279. #: ../../guides/upgrading.rst:539
  4280. msgid "Reduce maintenance costs, since you can delete most custom CSS."
  4281. msgstr ""
  4282. #: ../../guides/upgrading.rst:540
  4283. msgid "Make your plugin more compatible with community themes."
  4284. msgstr ""
  4285. #: ../../guides/upgrading.rst:542
  4286. msgid "Look for patterns that can be moved into core if you need significant CSS."
  4287. msgstr ""
  4288. #: ../../guides/upgrading.rst:544
  4289. msgid "We use hyphens rather than underscores in classes/ids and encourage you do the same for consistency."
  4290. msgstr ""
  4291. #: ../../guides/upgrading.rst:546
  4292. msgid "If you do need your own CSS, you should use your own namespace, rather than ``elgg-``."
  4293. msgstr ""
  4294. #: ../../guides/upgrading.rst:550
  4295. msgid "Update manifest.xml"
  4296. msgstr ""
  4297. #: ../../guides/upgrading.rst:551
  4298. msgid "Use http://el.gg/manifest17to18 to automate this."
  4299. msgstr ""
  4300. #: ../../guides/upgrading.rst:552
  4301. msgid "Don't use the \"bundled\" category with your plugins. That is only for plugins distributed with Elgg."
  4302. msgstr ""
  4303. #: ../../guides/upgrading.rst:556
  4304. msgid "Update settings and user settings views"
  4305. msgstr ""
  4306. #: ../../guides/upgrading.rst:557
  4307. msgid "The view for settings is now ``plugins/:plugin/settings`` (previously ``settings/:plugin/edit``)."
  4308. msgstr ""
  4309. #: ../../guides/upgrading.rst:558
  4310. msgid "The view for user settings is now ``plugins/:plugin/usersettings`` (previously ``usersettings/:plugin/edit``)."
  4311. msgstr ""
  4312. #: ../../guides/views.rst:9
  4313. msgid "Introduction"
  4314. msgstr ""
  4315. #: ../../guides/views.rst:11
  4316. msgid "Elgg follows a MVC pattern and Views are the V in MVC. Views are responsible for creating the output. Generally, this will be HTML sent to a web browser, but it could also be RSS, JSON or any number of other data formats."
  4317. msgstr ""
  4318. #: ../../guides/views.rst:13
  4319. msgid "The Views system handles everything from the layout of pages and chunks of presentation output (like a footer or a toolbar) down to individual links and form inputs. It also allows for advanced features like automatic RSS generation, a swift-to-develop mobile interface, and the alternative interfaces suggested below."
  4320. msgstr ""
  4321. #: ../../guides/views.rst:16
  4322. msgid "Using views"
  4323. msgstr ""
  4324. #: ../../guides/views.rst:18
  4325. msgid "At their most basic level, the default views are just PHP files with snippets of html. For example:"
  4326. msgstr ""
  4327. #: ../../guides/views.rst:24
  4328. msgid "Assuming this view is located at ``/views/default/hello.php``, we could output it like so:"
  4329. msgstr ""
  4330. #: ../../guides/views.rst:30
  4331. msgid "For your convenience, Elgg comes with quite a lot of views by default. In order to keep things manageable, they are organized into subdirectories. Elgg handles this situation quite nicely. For example, our simple view might live in ``/views/default/hello/world.php``, in which case it would be called like so:"
  4332. msgstr ""
  4333. #: ../../guides/views.rst:36
  4334. msgid "Well that's easy enough to remember! The name of the view simply reflects the location of the view in the views directory."
  4335. msgstr ""
  4336. #: ../../guides/views.rst:39
  4337. msgid "Views as templates"
  4338. msgstr ""
  4339. #: ../../guides/views.rst:41
  4340. msgid "Views would be pretty useless if they could only contain static information. Fortunately, you can pass arbitrary data to a view via the ``$vars`` array. Our ``hello/world`` view might be modified to accept a variable like so:"
  4341. msgstr ""
  4342. #: ../../guides/views.rst:47
  4343. msgid "In this case, we can pass an arbitrary name parameter to the view like so:"
  4344. msgstr ""
  4345. #: ../../guides/views.rst:53
  4346. msgid "which would produce the following output:"
  4347. msgstr ""
  4348. #: ../../guides/views.rst:62
  4349. msgid "Viewtypes"
  4350. msgstr ""
  4351. #: ../../guides/views.rst:64
  4352. msgid "You might be wondering, \"what's with the 'default' in the directory structure? Why don't we just put the ``hello/world`` view at ``/views/hello/world.php``?\"."
  4353. msgstr ""
  4354. #: ../../guides/views.rst:66
  4355. msgid "Great question."
  4356. msgstr ""
  4357. #: ../../guides/views.rst:68
  4358. msgid "This subdirectory (the one under ``/views``) determines the *viewtype* of the views below it. It's possible that you might want your Elgg site to have several sets of interface pages. For example:"
  4359. msgstr ""
  4360. #: ../../guides/views.rst:70
  4361. msgid "Standard HTML for desktop browsing (This is the default view)"
  4362. msgstr ""
  4363. #: ../../guides/views.rst:71
  4364. msgid "HTML optimized for Mobile devices (iPhone, Android, Blackberry, etc.)"
  4365. msgstr ""
  4366. #: ../../guides/views.rst:72
  4367. msgid "HTML optimized Tablet devices (iPad, etc.)"
  4368. msgstr ""
  4369. #: ../../guides/views.rst:73
  4370. msgid "RSS"
  4371. msgstr ""
  4372. #: ../../guides/views.rst:74
  4373. msgid "Atom"
  4374. msgstr ""
  4375. #: ../../guides/views.rst:75
  4376. msgid "JSON"
  4377. msgstr ""
  4378. #: ../../guides/views.rst:76
  4379. msgid "etc..."
  4380. msgstr ""
  4381. #: ../../guides/views.rst:78
  4382. msgid "In Elgg, one set of these interface pages is called a *viewtype*. You can force Elgg to use a particular viewtype to render the page simply by setting the ``$view`` input variable. For example, to get an RSS version of the home page, you would access ``http://localhost/elgg/?view=rss``."
  4383. msgstr ""
  4384. #: ../../guides/views.rst:80
  4385. msgid "You could also write a plugin to set this automatically using the ``set_input()`` function. For example, your plugin might detect that the page was accessed with an iPhone's browser string, and set the viewtype to *handheld* by calling:"
  4386. msgstr ""
  4387. #: ../../guides/views.rst:86
  4388. msgid "The plugin would presumably also supply a set of views optimized for handheld devices."
  4389. msgstr ""
  4390. #: ../../guides/views.rst:91
  4391. msgid "Altering views via plugins"
  4392. msgstr ""
  4393. #: ../../guides/views.rst:93
  4394. msgid "Without modifying Elgg's core, Elgg provides several ways to customize almost all output:"
  4395. msgstr ""
  4396. #: ../../guides/views.rst:95
  4397. msgid "You can `override a view <#overriding-views>`_, completely changing the file used to render it."
  4398. msgstr ""
  4399. #: ../../guides/views.rst:96
  4400. msgid "You can `extend a view <#extending-views>`_ by prepending or appending the output of another view to it."
  4401. msgstr ""
  4402. #: ../../guides/views.rst:97
  4403. msgid "You can `alter a view's inputs <#altering-view-input>`_ by plugin hook."
  4404. msgstr ""
  4405. #: ../../guides/views.rst:98
  4406. msgid "You can `alter a view's output <#altering-view-output>`_ by plugin hook."
  4407. msgstr ""
  4408. #: ../../guides/views.rst:101
  4409. msgid "Overriding views"
  4410. msgstr ""
  4411. #: ../../guides/views.rst:103
  4412. msgid "Via plugin you can completely replace the rendering strategy of a view provided by Elgg or another plugin. Each plugin may have its own ``/views`` directory, and within it define its own view implementations."
  4413. msgstr ""
  4414. #: ../../guides/views.rst:105
  4415. msgid "Views in plugin directories always override views in the core directory, however, when plugins override the views of other plugins, :ref:`later plugins take precedent <admin/plugins#plugin-order>`."
  4416. msgstr ""
  4417. #: ../../guides/views.rst:107
  4418. msgid "For example, if we wanted to customize the ``hello/world`` view to use an ``h2`` instead of an ``h1``, we could create a file at ``/mod/example/views/default/hello/world.php`` like this:"
  4419. msgstr ""
  4420. #: ../../guides/views.rst:113
  4421. msgid "While it is **not recommended**, one *could* alternatively force the location of a view using the ``set_view_location`` function:"
  4422. msgstr ""
  4423. #: ../../guides/views.rst:119
  4424. msgid "Again, the best way to override views is to place them in the appropriate place in the views hierarchy."
  4425. msgstr ""
  4426. #: ../../guides/views.rst:123
  4427. msgid "When considering long-term maintenance, overriding views in the core and bundled plugins has a cost: Upgrades may bring changes in views, and if you have overridden them, you will not get those changes. You may instead want to :ref:`alter the input <guides/views#altering-view-input>` or the :ref:`the output <guides/views#altering-view-output>` of the view via plugin hooks."
  4428. msgstr ""
  4429. #: ../../guides/views.rst:127
  4430. msgid "Elgg caches view locations. This means that you should disable the system cache while working with views. When you install the changes to a production environment you mush flush the caches."
  4431. msgstr ""
  4432. #: ../../guides/views.rst:130
  4433. msgid "Extending views"
  4434. msgstr ""
  4435. #: ../../guides/views.rst:132
  4436. msgid "There may be other situations in which you don't want to override the whole view, you just want to prepend or append some more content to it. In Elgg this is called *extending* a view."
  4437. msgstr ""
  4438. #: ../../guides/views.rst:134
  4439. msgid "For example, instead of overriding the ``hello/world`` view, we could extend it like so:"
  4440. msgstr ""
  4441. #: ../../guides/views.rst:140
  4442. msgid "If the contents of ``/views/default/hello/greeting.php`` is:"
  4443. msgstr ""
  4444. #: ../../guides/views.rst:146
  4445. msgid "Then every time we call ``elgg_view('hello/world');``, we'll get:"
  4446. msgstr ""
  4447. #: ../../guides/views.rst:153
  4448. msgid "You can prepend views by passing a value to the 3rd parameter that is less than 500:"
  4449. msgstr ""
  4450. #: ../../guides/views.rst:163
  4451. msgid "Note that if you extend the core css view like this:"
  4452. msgstr ""
  4453. #: ../../guides/views.rst:169
  4454. msgid "You **must** do so within code that is executed by engine/start.php (normally this would mean your plugin's init code). Because the core css view is loaded separately via a ``<link>`` tag, any extensions you add will not have the same context as the rest of your page."
  4455. msgstr ""
  4456. #: ../../guides/views.rst:174
  4457. msgid "Altering view input"
  4458. msgstr ""
  4459. #: ../../guides/views.rst:176
  4460. msgid "It may be useful to alter a view's ``$vars`` array before it's rendered."
  4461. msgstr ""
  4462. #: ../../guides/views.rst:178
  4463. msgid "Since 1.11, before each view rendering the ``$vars`` array is filtered by the :ref:`plugin hook <guides/hooks-list#views>` ``[view_vars, view_name]``. Each registered handler function is passed these arguments:"
  4464. msgstr ""
  4465. #: ../../guides/views.rst:180
  4466. msgid "``$hook`` - the string ``\"view_vars\"``"
  4467. msgstr ""
  4468. #: ../../guides/views.rst:181
  4469. #: ../../guides/views.rst:211
  4470. msgid "``$type`` - the view name being rendered (the first argument passed to ``elgg_view()``)"
  4471. msgstr ""
  4472. #: ../../guides/views.rst:182
  4473. msgid "``$returnvalue`` - the ``$vars`` array"
  4474. msgstr ""
  4475. #: ../../guides/views.rst:183
  4476. msgid "``$params`` - an array containing: the unaltered ``$vars`` under the key ``vars``; :ref:`viewtype <guides/views#viewtypes>` being rendered under the key ``viewtype``; the view name under the key ``view``."
  4477. msgstr ""
  4478. #: ../../guides/views.rst:186
  4479. msgid "Altering view input example"
  4480. msgstr ""
  4481. #: ../../guides/views.rst:188
  4482. msgid "Here we'll alter the default pagination limit for the comments view:"
  4483. msgstr ""
  4484. #: ../../guides/views.rst:204
  4485. msgid "Altering view output"
  4486. msgstr ""
  4487. #: ../../guides/views.rst:206
  4488. msgid "Sometimes it is preferable to alter the output of a view instead of overriding it."
  4489. msgstr ""
  4490. #: ../../guides/views.rst:208
  4491. msgid "The output of each view is run through the :ref:`plugin hook <guides/hooks-list#views>` ``[view, view_name]`` before being returned by ``elgg_view()``. Each registered handler function is passed these arguments:"
  4492. msgstr ""
  4493. #: ../../guides/views.rst:210
  4494. msgid "``$hook`` - the string ``\"view\"``"
  4495. msgstr ""
  4496. #: ../../guides/views.rst:212
  4497. msgid "``$returnvalue`` - the rendered output of the view (or the return value of the last handler)"
  4498. msgstr ""
  4499. #: ../../guides/views.rst:213
  4500. msgid "``$params`` - an array containing the key ``viewtype`` with value being the :ref:`viewtype <guides/views#viewtypes>` being rendered"
  4501. msgstr ""
  4502. #: ../../guides/views.rst:215
  4503. msgid "To alter the view output, the handler just needs to alter ``$returnvalue`` and return a new string."
  4504. msgstr ""
  4505. #: ../../guides/views.rst:218
  4506. msgid "Altering view output example"
  4507. msgstr ""
  4508. #: ../../guides/views.rst:220
  4509. msgid "Here we'll eliminate breadcrumbs that don't have at least one link."
  4510. msgstr ""
  4511. #: ../../guides/views.rst:241
  4512. msgid "If you don't know what an entity is, :doc:`check this page out first </design/database>`."
  4513. msgstr ""
  4514. #: ../../guides/views.rst:243
  4515. msgid "The following code will automatically display the entity in ``$entity``:"
  4516. msgstr ""
  4517. #: ../../guides/views.rst:249
  4518. msgid "As you'll know from the data model introduction, all entities have a *type* (object, site, user or group), and optionally a subtype (which could be anything - 'blog', 'forumpost', 'banana'). ``elgg_view_entity`` will automatically look for a view called ``type/subtype``; if there's no subtype, it will look for ``type/type``. Failing that, before it gives up completely it tries ``type/default``. (RSS feeds in Elgg generally work by outputting the ``object/default`` view in the 'rss' viewtype.)"
  4519. msgstr ""
  4520. #: ../../guides/views.rst:251
  4521. msgid "So for example, the view to display a blogpost might be ``object/blog``. The view to display a user is ``user/user``."
  4522. msgstr ""
  4523. #: ../../guides/views.rst:254
  4524. msgid "Full and partial entity views"
  4525. msgstr ""
  4526. #: ../../guides/views.rst:256
  4527. msgid "``elgg_view_entity`` actually has a number of parameters, although only the very first one is required. The first three are:"
  4528. msgstr ""
  4529. #: ../../guides/views.rst:258
  4530. msgid "``$entity`` - The entity to display"
  4531. msgstr ""
  4532. #: ../../guides/views.rst:259
  4533. msgid "``$viewtype`` - The viewtype to display in (defaults to the one we're currently in, but it can be forced - eg to display a snippet of RSS within an HTML page)"
  4534. msgstr ""
  4535. #: ../../guides/views.rst:260
  4536. msgid "``$full_view`` - Whether to display a *full* version of the entity. (Defaults to false.)"
  4537. msgstr ""
  4538. #: ../../guides/views.rst:262
  4539. msgid "This last parameter is passed to the view as ``$vars['full_view']``. It's up to you what you do with it; the usual behaviour is to only display comments and similar information if this is set to true."
  4540. msgstr ""
  4541. #: ../../guides/views.rst:267
  4542. msgid "Listing entities"
  4543. msgstr ""
  4544. #: ../../guides/views.rst:269
  4545. msgid "This is then used in the provided listing functions. To automatically display a list of blog posts (:doc:`see the full tutorial </tutorials/blog>`), you can call:"
  4546. msgstr ""
  4547. #: ../../guides/views.rst:278
  4548. msgid "This function checks to see if there are any entities; if there are, it first displays the ``navigation/pagination`` view in order to display a way to move from page to page. It then repeatedly calls ``elgg_view_entity`` on each entity, before returning the result."
  4549. msgstr ""
  4550. #: ../../guides/views.rst:280
  4551. msgid "Note that ``elgg_list_entities`` allows the URL to set its ``limit`` and ``offset`` options, so set those explicitly if you need particular values (e.g. if you're not using it for pagination)."
  4552. msgstr ""
  4553. #: ../../guides/views.rst:282
  4554. msgid "Because it does this, Elgg knows that it can automatically supply an RSS feed - it extends the ``metatags`` view (which is called by the header) in order to provide RSS autodiscovery, which is why you can see the orange RSS icon on those pages."
  4555. msgstr ""
  4556. #: ../../guides/views.rst:284
  4557. msgid "If your entity list will display the entity owners, you can improve performance a bit by preloading all owner entities:"
  4558. msgstr ""
  4559. #: ../../guides/views.rst:296
  4560. msgid "See also :doc:`check this page out first </design/database>`."
  4561. msgstr ""
  4562. #: ../../guides/views.rst:298
  4563. msgid "Since 1.11, you can define an alternative view to render list items using ```'item_view'``` parameter."
  4564. msgstr ""
  4565. #: ../../guides/views.rst:300
  4566. msgid "In some cases, default entity views may be unsuitable for your needs. Using ```item_view``` allows you to customize the look, while preserving pagination, list's HTML markup etc."
  4567. msgstr ""
  4568. #: ../../guides/views.rst:302
  4569. msgid "Consider these two examples:"
  4570. msgstr ""
  4571. #: ../../guides/views.rst:324
  4572. msgid "In the first example, we are displaying a list of groups a user is a member of using the default group view. In the second example, we want to display a list of groups the user was invited to. Since invitations are not entities, they do not have their own views and can not be listed using ``elgg_list_*``. We are providing an alternative item view, that will use the group entity to display an invitation that contains a group name and buttons to access or reject the invitation."
  4573. msgstr ""
  4574. #: ../../guides/views.rst:327
  4575. msgid "Using a different templating system"
  4576. msgstr ""
  4577. #: ../../guides/views.rst:331
  4578. msgid "This functionality is deprecated as of Elgg 1.12. It will be removed in 2.0. It affects the behavior of templates globally, which is almost sure to cause breakages and therefore we suspect no one uses it in practice."
  4579. msgstr ""
  4580. #: ../../guides/views.rst:335
  4581. msgid "You can write your own templating system if you want to."
  4582. msgstr ""
  4583. #: ../../guides/views.rst:337
  4584. msgid "Before going through the motions of drawing views, Elgg checks the ``$CONFIG->template_handler`` variable to see if it contains the name of a callable function. If it does, the function will be passed the view name and template vars, and the return value of this function will be returned instead of the standard output:"
  4585. msgstr ""
  4586. #: ../../guides/views/foot-vs-footer.rst:2
  4587. msgid "Page/elements/foot vs footer"
  4588. msgstr ""
  4589. #: ../../guides/views/foot-vs-footer.rst:4
  4590. msgid "``page/elements/footer`` is the content that goes inside this part of the page:"
  4591. msgstr ""
  4592. #: ../../guides/views/foot-vs-footer.rst:14
  4593. msgid "It's content is visible to end users and usually where you would put a sitemap or other secondary global navigation, copyright info, powered by elgg, etc."
  4594. msgstr ""
  4595. #: ../../guides/views/foot-vs-footer.rst:16
  4596. msgid "``page/elements/foot`` is inserted just before the ending ``</body>`` tag and is mostly meant as a place to insert scripts that don't already work with ``elgg_register_js(array('location' => 'footer'));`` or ``elgg_require_js('amd/module');``. In other words, you should never override this view and probably don't need to extend it either. Just use the ``elgg_*_js`` functions instead"
  4597. msgstr ""
  4598. #: ../../guides/views/page-structure.rst:2
  4599. msgid "Page structure best practice"
  4600. msgstr ""
  4601. #: ../../guides/views/page-structure.rst:4
  4602. msgid "Elgg pages have an overall pageshell and a main content area. In Elgg 1.0+, we've marked out a space \\\"the canvas\\\" for items to write to the page. This means the user always has a very consistent experience, while giving maximum flexibility to plugin authors for laying out their functionality."
  4603. msgstr ""
  4604. #: ../../guides/views/page-structure.rst:6
  4605. msgid "Think of the canvas area as a big rectangle that you can do what you like in. We've created a couple of standard canvases for you:"
  4606. msgstr ""
  4607. #: ../../guides/views/page-structure.rst:8
  4608. msgid "one column"
  4609. msgstr ""
  4610. #: ../../guides/views/page-structure.rst:9
  4611. msgid "two column"
  4612. msgstr ""
  4613. #: ../../guides/views/page-structure.rst:10
  4614. msgid "content"
  4615. msgstr ""
  4616. #: ../../guides/views/page-structure.rst:11
  4617. msgid "widgets"
  4618. msgstr ""
  4619. #: ../../guides/views/page-structure.rst:13
  4620. msgid "are the main ones. You can access these with the function:"
  4621. msgstr ""
  4622. #: ../../guides/views/page-structure.rst:22
  4623. msgid "The content sections are passed as an ``array`` in the second parameter. The array keys correspond to sections in the layout, the choice of layout will determine which sections to pass. The array values contain the html that should be displayed in those areas. Examples of two common layouts:"
  4624. msgstr ""
  4625. #: ../../guides/views/page-structure.rst:37
  4626. msgid "You can then, ultimately, pass this into the ``elgg_view_page`` function:"
  4627. msgstr ""
  4628. #: ../../guides/views/page-structure.rst:43
  4629. msgid "You may also have noticed that we've started including a standard title area at the top of each plugin page (or at least, most plugin pages). This is created using the following wrapper function, and should usually be included at the top of the plugin content:"
  4630. msgstr ""
  4631. #: ../../guides/views/page-structure.rst:49
  4632. msgid "This will also display any submenu items that exist (unless you set the second, optional parameter to false). So how do you add submenu items?"
  4633. msgstr ""
  4634. #: ../../guides/views/page-structure.rst:51
  4635. msgid "In your plugin_init function, include the following call:"
  4636. msgstr ""
  4637. #: ../../guides/views/page-structure.rst:61
  4638. msgid "The submenu will then automatically display when your page is rendered. The 'identifier' is a machine name for the link, it should be unique per menu."
  4639. msgstr ""
  4640. #: ../../guides/views/simplecache.rst:2
  4641. msgid "Simplecache"
  4642. msgstr ""
  4643. #: ../../guides/views/simplecache.rst:6
  4644. msgid ":doc:`/admin/performance`"
  4645. msgstr ""
  4646. #: ../../guides/views/simplecache.rst:7
  4647. msgid ":doc:`/guides/views`"
  4648. msgstr ""
  4649. #: ../../guides/views/simplecache.rst:9
  4650. msgid "The Simplecache is a mechanism designed to alleviate the need for certain views to be regenerated dynamically. Instead, they are generated once, saved as a static file, and served in a way that entirely bypasses the Elgg engine."
  4651. msgstr ""
  4652. #: ../../guides/views/simplecache.rst:11
  4653. msgid "If Simplecache is turned off (which can be done from the administration panel), these views will be served as normal, with the exception of site CSS."
  4654. msgstr ""
  4655. #: ../../guides/views/simplecache.rst:13
  4656. msgid "The criteria for whether a view is suitable for the Simplecache is as follows:"
  4657. msgstr ""
  4658. #: ../../guides/views/simplecache.rst:15
  4659. msgid "The view must not change depending on who or when it is being looked at"
  4660. msgstr ""
  4661. #: ../../guides/views/simplecache.rst:16
  4662. msgid "The view must not depend on variables fed to it (except for global variables like site URL that never change)"
  4663. msgstr ""
  4664. #: ../../guides/views/simplecache.rst:19
  4665. msgid "Regenerating the Simplecache"
  4666. msgstr ""
  4667. #: ../../guides/views/simplecache.rst:21
  4668. msgid "You can regenerate the Simplecache at any time by:"
  4669. msgstr ""
  4670. #: ../../guides/views/simplecache.rst:23
  4671. msgid "Loading ``/upgrade.php``, even if you have nothing to upgrade"
  4672. msgstr ""
  4673. #: ../../guides/views/simplecache.rst:24
  4674. msgid "In the admin panel click on 'Flush the caches'"
  4675. msgstr ""
  4676. #: ../../guides/views/simplecache.rst:25
  4677. msgid "Enabling or disabling a plugin"
  4678. msgstr ""
  4679. #: ../../guides/views/simplecache.rst:26
  4680. msgid "Reordering your plugins"
  4681. msgstr ""
  4682. #: ../../guides/views/simplecache.rst:29
  4683. msgid "Using the Simplecache in your plugins"
  4684. msgstr ""
  4685. #: ../../guides/views/simplecache.rst:31
  4686. msgid "**Registering views with the Simplecache**"
  4687. msgstr ""
  4688. #: ../../guides/views/simplecache.rst:33
  4689. msgid "You can register a view with the Simplecache with the following function at init-time:"
  4690. msgstr ""
  4691. #: ../../guides/views/simplecache.rst:39
  4692. msgid "**Accessing the cached view**"
  4693. msgstr ""
  4694. #: ../../guides/views/simplecache.rst:41
  4695. msgid "If you registered a JavaScript or CSS file with Simplecache and put in in the view folder ``js/your_view`` or ``css/your_view`` you can very easily the the url to this cached view by calling"
  4696. msgstr ""
  4697. #: ../../guides/views/simplecache.rst:47
  4698. msgid "Where:"
  4699. msgstr ""
  4700. #: ../../guides/views/simplecache.rst:49
  4701. msgid "``$type`` is js or css"
  4702. msgstr ""
  4703. #: ../../guides/views/simplecache.rst:50
  4704. msgid "``$view`` the view name after css/ or js/"
  4705. msgstr ""
  4706. #: ../../guides/walled-garden.rst:2
  4707. msgid "Walled Garden"
  4708. msgstr ""
  4709. #: ../../guides/walled-garden.rst:4
  4710. msgid "Elgg supports a \"Walled Garden\" mode. In this mode, almost all pages are restricted to logged in users. This is useful for sites that don't allow public registration."
  4711. msgstr ""
  4712. #: ../../guides/walled-garden.rst:7
  4713. msgid "Activating Walled Garden mode"
  4714. msgstr ""
  4715. #: ../../guides/walled-garden.rst:9
  4716. msgid "To activate Walled Garden mode in Elgg 1.8, go to the Administration section. On the right sidebar menu, under the \"Configure\" section, expand \"Settings,\" then click on \"Advanced.\""
  4717. msgstr ""
  4718. #: ../../guides/walled-garden.rst:11
  4719. msgid "From the Advanced Settings page, find the option labelled \"Restrict pages to logged-in users.\" Enable this option, then click \"Save\" to switch your site into Walled Garden mode."
  4720. msgstr ""
  4721. #: ../../guides/walled-garden.rst:14
  4722. msgid "Exposing pages through Walled Gardens"
  4723. msgstr ""
  4724. #: ../../guides/walled-garden.rst:16
  4725. msgid "Many plugins extend Elgg by adding pages. Walled Garden mode will prevent these pages from being viewed by logged out users. Elgg uses :ref:`plugin hook <design/events#plugin-hooks>` to manage which pages are visible through the Walled Garden."
  4726. msgstr ""
  4727. #: ../../guides/walled-garden.rst:18
  4728. msgid "Plugin authors must register pages as public if they should be viewable through Walled Gardens by responding to the ``public_pages``, ``walled_garden`` plugin hook."
  4729. msgstr ""
  4730. #: ../../guides/walled-garden.rst:20
  4731. msgid "The returned value is an array of regexp expressions for public pages."
  4732. msgstr ""
  4733. #: ../../guides/walled-garden.rst:22
  4734. msgid "The following code shows how to expose http://example.org/my_plugin/public_page through a Walled Garden. This assumes the plugin has registered a :doc:`pagehandler` for ``my_plugin``."
  4735. msgstr ""
  4736. #: ../../guides/web-services.rst:4
  4737. msgid "Build an HTTP API for your site."
  4738. msgstr ""
  4739. #: ../../guides/web-services.rst:6
  4740. msgid "Elgg provides a powerful framework for building web services. This allows developers to expose functionality to other web sites and desktop applications along with doing integrations with third-party web applications. While we call the API RESTful, it is actually a REST/RPC hybrid similar to the APIs provided by sites like Flickr and Twitter."
  4741. msgstr ""
  4742. #: ../../guides/web-services.rst:12
  4743. msgid "To create an API for your Elgg site, you need to do 4 things:"
  4744. msgstr ""
  4745. #: ../../guides/web-services.rst:14
  4746. msgid "enable the web services plugin"
  4747. msgstr ""
  4748. #: ../../guides/web-services.rst:15
  4749. msgid "expose methods"
  4750. msgstr ""
  4751. #: ../../guides/web-services.rst:16
  4752. msgid "setup API authentication"
  4753. msgstr ""
  4754. #: ../../guides/web-services.rst:17
  4755. msgid "setup user authentication"
  4756. msgstr ""
  4757. #: ../../guides/web-services.rst:19
  4758. msgid "Additionally, you may want to control what types of authentication are available on your site. This will also be covered."
  4759. msgstr ""
  4760. #: ../../guides/web-services.rst:29
  4761. msgid "It is crucial that the web services are consumed via secure protocols. Do not enable web services if your site is not served via HTTPs. This is especially important if you allow API key only authentication."
  4762. msgstr ""
  4763. #: ../../guides/web-services.rst:33
  4764. msgid "If you are using third-party tools that expose API methods, make sure to carry out a thorough security audit. You may want to make sure that API authentication is required for ALL methods, even if they require user authentication. Methods that do not require API authentication can be easily abused to spam your site."
  4765. msgstr ""
  4766. #: ../../guides/web-services.rst:38
  4767. msgid "Ensure that the validity of API keys is limited and provide mechanisms for your API clients to renew their keys."
  4768. msgstr ""
  4769. #: ../../guides/web-services.rst:42
  4770. msgid "Exposing methods"
  4771. msgstr ""
  4772. #: ../../guides/web-services.rst:44
  4773. msgid "The function to use to expose a method is ``elgg_ws_expose_function()``. As an example, let's assume you want to expose a function that echos text back to the calling application. The function could look like this"
  4774. msgstr ""
  4775. #: ../../guides/web-services.rst:54
  4776. msgid "Since we are providing this function to allow developers to test their API clients, we will require neither API authentication nor user authentication. This call registers the function with the web services API framework:"
  4777. msgstr ""
  4778. #: ../../guides/web-services.rst:70
  4779. msgid "If you add this code to a plugin and then go to http://yoursite.com/services/api/rest/xml/?method=system.api.list, you should now see your test.echo method listed as an API call. Further, to test the exposed method from a web browser, you could hit the url: http://yoursite.com/services/api/rest/xml/?method=test.echo&string=testing and you should see xml data like this:"
  4780. msgstr ""
  4781. #: ../../guides/web-services.rst:85
  4782. msgid "Response formats"
  4783. msgstr ""
  4784. #: ../../guides/web-services.rst:87
  4785. msgid "The web services API framework provides three different response formats by default: xml, json, and serialized php. You can request the different formats for substituting “json” or “php” for “xml” in the above URLs. You can also add additional response formats by defining new viewtypes."
  4786. msgstr ""
  4787. #: ../../guides/web-services.rst:93
  4788. msgid "Parameters"
  4789. msgstr ""
  4790. #: ../../guides/web-services.rst:95
  4791. msgid "Parameters expected by each method should be listed as an associative array, where the key represents the parameter name, and the value contains an array with ``type``, ``default`` and ``required`` fields."
  4792. msgstr ""
  4793. #: ../../guides/web-services.rst:97
  4794. msgid "Values submitted with the API request for each parameter should match the declared type. API will throw on exception if validation fails."
  4795. msgstr ""
  4796. #: ../../guides/web-services.rst:99
  4797. msgid "Recognized parameter types are:"
  4798. msgstr ""
  4799. #: ../../guides/web-services.rst:101
  4800. msgid "``integer`` (or ``int``)"
  4801. msgstr ""
  4802. #: ../../guides/web-services.rst:102
  4803. msgid "``boolean`` (or ``bool``)"
  4804. msgstr ""
  4805. #: ../../guides/web-services.rst:103
  4806. msgid "``string``"
  4807. msgstr ""
  4808. #: ../../guides/web-services.rst:104
  4809. msgid "``float``"
  4810. msgstr ""
  4811. #: ../../guides/web-services.rst:105
  4812. msgid "``array``"
  4813. msgstr ""
  4814. #: ../../guides/web-services.rst:107
  4815. msgid "Unrecognized types will throw an API exception."
  4816. msgstr ""
  4817. #: ../../guides/web-services.rst:109
  4818. msgid "You can use additional fields to describe your parameter, e.g. ``description``."
  4819. msgstr ""
  4820. #: ../../guides/web-services.rst:135
  4821. msgid "API authentication"
  4822. msgstr ""
  4823. #: ../../guides/web-services.rst:137
  4824. msgid "You may want to control access to some of the functions that you expose. Perhaps you are exposing functions in order to integrate Elgg with another open source platform on the same server. In that case, you only want to allow that other application access to these methods. Another possibility is that you want to limit what external developers have access to your API. Or maybe you want to limit how many calls a developer can make against your API in a single day."
  4825. msgstr ""
  4826. #: ../../guides/web-services.rst:145
  4827. msgid "In all of these cases, you can use Elgg's API authentication functions to control access. Elgg provides two built-in methods to perform API authentication: key based and HMAC signature based. You can also add your own authentication methods. The key based approach is very similar to what Google, Flickr, or Twitter. Developers can request a key (a random string) and pass that key with all calls that require API authentication. The keys are stored in the database and if an API call is made without a key or a bad key, the call is denied and an error message is returned."
  4828. msgstr ""
  4829. #: ../../guides/web-services.rst:156
  4830. msgid "Key-based authentication"
  4831. msgstr ""
  4832. #: ../../guides/web-services.rst:158
  4833. msgid "As an example, let's write a function that returns the number of users that have viewed the site in the last x minutes."
  4834. msgstr ""
  4835. #: ../../guides/web-services.rst:169
  4836. msgid "Now, let's expose it and make the number of minutes an optional parameter:"
  4837. msgstr ""
  4838. #: ../../guides/web-services.rst:184
  4839. msgid "This function is now available and if you check ``system.api.list``, you will see that it requires API authentication. If you hit the method with a web browser, it will return an error message about failing the API authentication. To test this method, you need an API key. Fortunately, there is a plugin called apiadmin that creates keys for you. It is available in the Elgg plugin repository. It will return a public and private key and you will use the public key for this kind of API authentication. Grab a key and then do a GET request with your browser on this API method passing in the key string as the parameter ``api_key``. It might look something like this: http://yoursite.com/services/api/rest/xml/?method=users.active&api_key=1140321cb56c71710c38feefdf72bc462938f59f."
  4840. msgstr ""
  4841. #: ../../guides/web-services.rst:197
  4842. msgid "Signature-based authentication"
  4843. msgstr ""
  4844. #: ../../guides/web-services.rst:199
  4845. msgid "The :doc:`web-services/hmac` is similar to what is used with OAuth or Amazon's S3 service. This involves both the public and private key. If you want to be very sure that the API calls are coming from the developer you think they are coming from and you want to make sure the data is not being tampered with during transmission, you would use this authentication method. Be aware that it is much more involved and could turn off developers when there are other sites out there with key-based authentication."
  4846. msgstr ""
  4847. #: ../../guides/web-services.rst:209
  4848. msgid "OAuth"
  4849. msgstr ""
  4850. #: ../../guides/web-services.rst:211
  4851. msgid "With the addition of the OAuth plugin, Elgg also fully supports the OAuth 1.0a authorization standard. Clients can then use standard OAuth libraries to make any API calls to the site."
  4852. msgstr ""
  4853. #: ../../guides/web-services.rst:216
  4854. msgid "User authentication"
  4855. msgstr ""
  4856. #: ../../guides/web-services.rst:218
  4857. msgid "So far you have been allowing developers to pull data out of your Elgg site. Now we'll move on to pushing data into Elgg. In this case, it is going to be done by a user. Maybe you have created a desktop application that allows your Users to post to the wire without going to the site. You need to expose a method for posting to the wire and you need to make sure that a user cannot post using someone else's account. Elgg provides a token-based approach for user authentication. It allows a user to submit their username and password in exchange for a token using the method ``auth.gettoken``. This token can then be used for some amount of time to authenticate all calls to the API before it expires by passing it as the parameter ``auth_token``. If you do not want to have your users trusting their passwords to 3rd-party applications, you can also extend the current capability to use an approach like OAuth."
  4858. msgstr ""
  4859. #: ../../guides/web-services.rst:232
  4860. msgid "Let's write our wire posting function:"
  4861. msgstr ""
  4862. #: ../../guides/web-services.rst:246
  4863. msgid "Exposing this function is the same as the previous except we require user authentication and we're going to make this use POST rather than GET HTTP requests."
  4864. msgstr ""
  4865. #: ../../guides/web-services.rst:261
  4866. msgid "Please note that you will not be able to test this using a web browser as you did with the other methods. You need to write some client code to do this. There is some example client code in ``/engine/lib/api.php``. Take a look at `send\\_api\\_post\\_call()`_. You can also do a search for clients that have been written for the APIs of Flickr or Twitter or any other similar API. You will find a wide variety written in almost any language you can think of."
  4867. msgstr ""
  4868. #: ../../guides/web-services.rst:270
  4869. msgid "Building out your API"
  4870. msgstr ""
  4871. #: ../../guides/web-services.rst:272
  4872. msgid "As soon as you feel comfortable with Elgg's web services API framework, you will want to step back and design your API. What sort of data are you trying to expose? Who or what will be API users? How do you want them to get access to authentication keys? How are you going to document your API? Be sure to take a look at the APIs created by popular Web 2.0 sites for inspiration. If you are looking for 3rd party developers to build applications using your API, you will probably want to provide one or more language-specific clients."
  4873. msgstr ""
  4874. #: ../../guides/web-services.rst:284
  4875. msgid "Determining the authentication available"
  4876. msgstr ""
  4877. #: ../../guides/web-services.rst:286
  4878. msgid "Elgg's web services API uses a type of `pluggable authentication module (PAM)`_ architecture to manage how users and developers are authenticated. This provides you the flexibility to add and remove authentication modules. Do you want to not use the default user authentication PAM but would prefer using OAuth? You can do this."
  4879. msgstr ""
  4880. #: ../../guides/web-services.rst:292
  4881. msgid "The first step is registering a callback function for the *rest, init* plugin hook:"
  4882. msgstr ""
  4883. #: ../../guides/web-services.rst:299
  4884. msgid "Then in the callback function, you register the PAMs that you want to use:"
  4885. msgstr ""
  4886. #: ../../guides/web-services.rst:315
  4887. msgid "When testing, you may find it useful to register the ``pam_auth_session`` PAM so that you can easily test your methods from the browser. Be careful not to use this PAM on a production site because it could open up your users to a `CSRF attack`_."
  4888. msgstr ""
  4889. #: ../../guides/web-services.rst:320
  4890. msgid "Right now, the only other PAMs publicly available besides those provided by the Elgg core are the OAuth PAMs. See `Justin Richer's OAuth plugin`_ for more detail."
  4891. msgstr ""
  4892. #: ../../guides/web-services/hmac.rst:2
  4893. msgid "HMAC Authentication"
  4894. msgstr ""
  4895. #: ../../guides/web-services/hmac.rst:4
  4896. msgid "Elgg's RESTful API framework provides functions to support a `HMAC`_ signature scheme for API authentication. The client must send the HMAC signature together with a set of special HTTP headers when making a call that requires API authentication. This ensures that the API call is being made from the stated client and that the data has not been tampered with."
  4897. msgstr ""
  4898. #: ../../guides/web-services/hmac.rst:8
  4899. msgid "The HMAC must be constructed over the following data:"
  4900. msgstr ""
  4901. #: ../../guides/web-services/hmac.rst:10
  4902. msgid "The public API key identifying you to the Elgg api server as provided by the APIAdmin plugin"
  4903. msgstr ""
  4904. #: ../../guides/web-services/hmac.rst:11
  4905. msgid "The private API Key provided by Elgg (that is companion to the public key)"
  4906. msgstr ""
  4907. #: ../../guides/web-services/hmac.rst:12
  4908. msgid "The current unix time in seconds"
  4909. msgstr ""
  4910. #: ../../guides/web-services/hmac.rst:13
  4911. msgid "A nonce to guarantee two requests the same second have different signatures"
  4912. msgstr ""
  4913. #: ../../guides/web-services/hmac.rst:14
  4914. msgid "URL encoded string representation of any GET variable parameters, eg ``method=test.test&foo=bar``"
  4915. msgstr ""
  4916. #: ../../guides/web-services/hmac.rst:15
  4917. msgid "If you are sending post data, the hash of this data"
  4918. msgstr ""
  4919. #: ../../guides/web-services/hmac.rst:17
  4920. msgid "Some extra information must be added to the HTTP header in order for this data to be correctly processed:"
  4921. msgstr ""
  4922. #: ../../guides/web-services/hmac.rst:19
  4923. msgid "**X-Elgg-apikey** - The public API key"
  4924. msgstr ""
  4925. #: ../../guides/web-services/hmac.rst:20
  4926. msgid "**X-Elgg-time** - Unix time used in the HMAC calculation"
  4927. msgstr ""
  4928. #: ../../guides/web-services/hmac.rst:21
  4929. msgid "**X-Elgg-none** - a random string"
  4930. msgstr ""
  4931. #: ../../guides/web-services/hmac.rst:22
  4932. msgid "**X-Elgg-hmac** - The HMAC as base64 encoded"
  4933. msgstr ""
  4934. #: ../../guides/web-services/hmac.rst:23
  4935. msgid "**X-Elgg-hmac-algo** - The algorithm used in the HMAC calculation - eg, sha1, md5 etc."
  4936. msgstr ""
  4937. #: ../../guides/web-services/hmac.rst:25
  4938. msgid "If you are sending POST data you must also send:"
  4939. msgstr ""
  4940. #: ../../guides/web-services/hmac.rst:27
  4941. msgid "**X-Elgg-posthash** - The hash of the POST data"
  4942. msgstr ""
  4943. #: ../../guides/web-services/hmac.rst:28
  4944. msgid "**X-Elgg-posthash-algo** - The algorithm used to produce the POST data hash - eg, md5"
  4945. msgstr ""
  4946. #: ../../guides/web-services/hmac.rst:29
  4947. msgid "**Content-type** - The content type of the data you are sending (if in doubt use application/octet-stream)"
  4948. msgstr ""
  4949. #: ../../guides/web-services/hmac.rst:30
  4950. msgid "**Content-Length** - The length in bytes of your POST data"
  4951. msgstr ""
  4952. #: ../../guides/web-services/hmac.rst:32
  4953. msgid "Elgg provides a sample API client that implements this HMAC signature: send_api_call(). It serves as a good reference on how to implement it."
  4954. msgstr ""
  4955. #: ../../guides/widgets.rst:2
  4956. msgid "Widgets"
  4957. msgstr ""
  4958. #: ../../guides/widgets.rst:4
  4959. msgid "Widgets are content areas that users can drag around their page to customize the layout. They can typically be customized by their owner to show more/less content and determine who sees the widget. By default Elgg provides plugins for customizing the profile page and dashboard via widgets."
  4960. msgstr ""
  4961. #: ../../guides/widgets.rst:6
  4962. msgid "TODO: Screenshot"
  4963. msgstr ""
  4964. #: ../../guides/widgets.rst:13
  4965. msgid "Structure"
  4966. msgstr ""
  4967. #: ../../guides/widgets.rst:15
  4968. msgid "To create a widget, create two views:"
  4969. msgstr ""
  4970. #: ../../guides/widgets.rst:17
  4971. msgid "``widgets/widget/edit``"
  4972. msgstr ""
  4973. #: ../../guides/widgets.rst:18
  4974. msgid "``widgets/widget/content``"
  4975. msgstr ""
  4976. #: ../../guides/widgets.rst:20
  4977. msgid "``content.php`` is responsible for all the content that will output within the widget. The ``edit.php`` file contains any extra edit functions you wish to present to the user. You do not need to add access level as this comes as part of the widget framework."
  4978. msgstr ""
  4979. #: ../../guides/widgets.rst:24
  4980. msgid "Using HTML checkboxes to set widget flags is problematic because if unchecked, the checkbox input is omitted from form submission. The effect is that you can only set and not clear flags. The \"input/checkboxes\" view will not work properly in a widget's edit panel."
  4981. msgstr ""
  4982. #: ../../guides/widgets.rst:30
  4983. msgid "Initialise the widget"
  4984. msgstr ""
  4985. #: ../../guides/widgets.rst:32
  4986. msgid "Once you have created your edit and view pages, you need to initialize the plugin widget. This is done within the plugins ``init()`` function."
  4987. msgstr ""
  4988. #: ../../guides/widgets.rst:41
  4989. msgid "It is possible to add multiple widgets for a plugin. You just initialize as many widget directories as you need."
  4990. msgstr ""
  4991. #: ../../guides/widgets.rst:55
  4992. msgid "Multiple widgets"
  4993. msgstr ""
  4994. #: ../../guides/widgets.rst:57
  4995. msgid "Make sure you have the corrosponding directories within your plugin views structure:"
  4996. msgstr ""
  4997. #: ../../guides/widgets.rst:77
  4998. msgid "Elgg 1.8: Default widgets"
  4999. msgstr ""
  5000. #: ../../guides/widgets.rst:79
  5001. msgid "If your plugin uses the widget canvas, you can register default widget support with Elgg core, which will handle everything else."
  5002. msgstr ""
  5003. #: ../../guides/widgets.rst:81
  5004. msgid "To announce default widget support in your plugin, register for the ``get_list, default_widgets`` plugin hook:"
  5005. msgstr ""
  5006. #: ../../guides/widgets.rst:87
  5007. msgid "In the plugin hook handler, push an array into the return value defining your default widget support and when to create default widgets. Arrays require the following keys to be defined:"
  5008. msgstr ""
  5009. #: ../../guides/widgets.rst:89
  5010. msgid "name - The name of the widgets page. This is displayed on the tab in the admin interface."
  5011. msgstr ""
  5012. #: ../../guides/widgets.rst:90
  5013. msgid "widget\\_context - The context the widgets page is called from. (If not explicitly set, this is your plugin's id.)"
  5014. msgstr ""
  5015. #: ../../guides/widgets.rst:91
  5016. msgid "widget\\_columns - How many columns the widgets page will use."
  5017. msgstr ""
  5018. #: ../../guides/widgets.rst:92
  5019. msgid "event - The Elgg event to create new widgets for. This is usually ``create``."
  5020. msgstr ""
  5021. #: ../../guides/widgets.rst:93
  5022. msgid "entity\\_type - The entity type to create new widgets for."
  5023. msgstr ""
  5024. #: ../../guides/widgets.rst:94
  5025. msgid "entity\\_subtype - The entity subtype to create new widgets for. The can be ELGG\\_ENTITIES\\_ANY\\_VALUE to create for all entity types."
  5026. msgstr ""
  5027. #: ../../guides/widgets.rst:96
  5028. msgid "When an object triggers an event that matches the event, entity\\_type, and entity\\_subtype parameters passed, Elgg core will look for default widgets that match the widget\\_context and will copy them to that object's owner\\_guid and container\\_guid. All widget settings will also be copied."
  5029. msgstr ""
  5030. #: ../../guides/widgets.rst:117
  5031. msgid "Here is a simple Flickr widget that uses Flickr's JSON output."
  5032. msgstr ""
  5033. #: ../../guides/widgets.rst:119
  5034. msgid "Widget edit page:"
  5035. msgstr ""
  5036. #: ../../guides/widgets.rst:130
  5037. msgid "Widget view page:"
  5038. msgstr ""
  5039. #: ../../guides/widgets.rst:201
  5040. msgid "How to restrict where widgets can be used"
  5041. msgstr ""
  5042. #: ../../guides/widgets.rst:203
  5043. msgid "Any plugin that has a widget must register that widget with Elgg. The widget can specify the context that it can be used in (all, just profile, just dashboard, etc.). If you want to change where your users can use a widget, you can make a quick edit to the plugin's source."
  5044. msgstr ""
  5045. #: ../../guides/widgets.rst:206
  5046. msgid "Find where the plugin registers the widget"
  5047. msgstr ""
  5048. #: ../../guides/widgets.rst:208
  5049. msgid "The function you are looking for is ``add_widget_type()``. It is typically used in an init function in ``start.php``. You should be able to go to ``/mod/<plugin name>/``, open ``start.php`` in a text editor, and find the string ``add_widget_type``."
  5050. msgstr ""
  5051. #: ../../guides/widgets.rst:211
  5052. msgid "Changing the function's parameters"
  5053. msgstr ""
  5054. #: ../../guides/widgets.rst:213
  5055. msgid "Let's use the friends plugin as an example. We want to restrict it so that it can only be used on a user's profile. Currently, the function call looks like this:"
  5056. msgstr ""
  5057. #: ../../guides/widgets.rst:217
  5058. msgid "Keep in mind :doc:`dont-modify-core`"
  5059. msgstr ""
  5060. #: ../../guides/widgets.rst:223
  5061. msgid "To restrict it to the profile, change it to this:"
  5062. msgstr ""
  5063. #: ../../guides/widgets.rst:229
  5064. msgid "Notice that the context was not specified originally (there were only 3 parameters and we added a 4th). That means it defaulted to the \"all\" context. Besides \"all\" and \"profile\", the only other context available in default Elgg is \"dashboard\"."
  5065. msgstr ""