ÿØÿà JFIF    ÿÛ „  ( %"1!%)+...383,7(-.+  -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ  ß â" ÿÄ     ÿÄ H    !1AQaq"‘¡2B±ÁÑð#R“Ò Tbr‚²á3csƒ’ÂñDS¢³$CÿÄ   ÿÄ %  !1AQa"23‘ÿÚ   ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6  öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷󲍷˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz ¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%ÌÁ²h´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ǍýʏTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆѪQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$˝Úsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇ l¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡* ….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉ䢍mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ ñ#ºI¤Å´%çÁ­‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±b Lô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U  Z©RÊ ÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ." ¤‡ú*õ'VŽ|¼´Úgllº¼klz[Æüï÷Aób‡Eÿ dÑ»Xx9ÃÜ£ÁT/`¼¸vI±Ýµ·Ë‚“G³þ*Ÿû´r|*}<¨îºœ @¦mÄ’M¹”.œ«Y–|6ÏU¤jç¥ÕÞqO ˜kDÆÁ¨5ÿ š;ÐЦ¦€GÙk \ –Þ=â¼=SͧµªS°ÚÍpÜãQűÀõ¬?ÃÁ1Ñ•õZà?hóœ€ L¦l{Y*K˜Ù›zc˜–ˆâ ø+¾ ­-Ök¥%ùEÜA'}ˆ><ÊIè“bpÍ/qÞâvoX€w,\úªò6Z[XdÒæ­@Ö—€$òJí#é>'°Ú ôª˜<)4ryÙ£|óAÅn5žêŸyÒäMÝ2{"}‰–¤l÷ûWX\l¾Á¸góÉOÔ /óñB¤f¸çñ[.P˜ZsÊË*ßT܈§QN¢’¡¨§V¼(Üù*eÕ“”5T¨‹Âê¥FŒã½Dü[8'Ò¥a…Ú¶k7a *•›¼'Ò·\8¨ª\@\õ¢¦íq+DÙrmÎ…_ªæ»ŠÓœ¡¯’Ré9MÅ×D™lælffc+ŒÑ,ý™ÿ ¯þǤ=Å’Á7µ÷ÚÛ/“Ü€ñýã¼àí¾ÕÑ+ƒ,uµMâÀÄbm:ÒÎPæ{˜Gz[ƒ¯«® KHà`ߨŠéí¯P8Aq.C‰ à€kòpj´kN¶qô€…Õ,ÜNŠª-­{Zö’æû44‰sŽè‰îVíRœÕm" 6?³D9¡ÇTíÅꋇ`4«¸ÝÁô ï’ýorqКÇZ«x4Žâéþuïf¹µö[P ,Q£éaX±`PÉÍZ ¸äYúg üAx ’6Lê‚xÝÓ*äQ  Ï’¨hÍ =²,6ï#rÃ<¯–£»ƒ‹,–ê•€ aÛsñ'%Æ"®ÛüìBᝠHÚ3ß°©$“XnœÖ’î2ËTeûìxîß ¦å¿çÉ ðK§þ{‘t‚Ϋ¬jéîZ[ ”š7L¥4VÚCE×]m¤Øy”ä4-dz£œ§¸x.*ãÊÊ b÷•h:©‡¦s`BTÁRû¾g⻩‹jø sF¢àJøFl‘È•Xᓁà~*j¯ +(ÚÕ6-£¯÷GŠØy‚<Ç’.F‹Hœw(+)ÜÜâÈzÄäT§FߘãÏ;DmVœ3Àu@mÚüXÝü•3B¨òÌÁÛ<·ÃÜ z,Ì@õÅ·d2]ü8s÷IôÞ¯^Ç9¢u„~ëAŸï4«M? K]­ÅàPl@s_ p:°¬ZR”´›JC[CS.h‹ƒïËœ«Æ]–÷ó‚wR×k7X‰k›‘´ù¦=¡«‰¨¨Â')—71ó’c‡Ðúµ `é.{§p¹ój\Ž{1h{o±Ý=áUÊïGÖŒõ–-BÄm+AZX¶¡ ïHðæ¥JmÙ;…䡟ˆ¦ ° äšiÉg«$üMk5¤L“’çÊvïâï ,=f“"íἊ5ô¬x6{ɏžID0e¸vçmi'︧ºð9$ò¹÷*£’9ÿ ²TÔ…×>JV¥}Œ}$p[bÔ®*[jzS*8 ”·T›Í–ñUîƒwo$áè=LT™ç—~ô·¤ÈÚ$榍q‰„+´kFm)ž‹©i–ËqÞŠ‰à¶ü( ‚•§ •°ò·‡#5ª•µÊ﯅¡X¨šÁ*F#TXJÊ ušJVÍ&=iÄs1‚3•'fý§5Ñ<=[íÞ­ PÚ;ѱÌ_~Ä££8rÞ ²w;’hDT°>ÈG¬8Á²ÚzŽ®ò®qZcqJêäÞ-ö[ܘbň±çb“ж31²n×iƒðÕ;1¶þÉ ªX‰,ßqÏ$>•î íZ¥Z 1{ç൵+ƒÕµ¥°T$§K]á»Ûï*·¤tMI’ÂZbŽÕiÒ˜}bÓ0£ª5›¨ [5Ž^ÝœWøÂÝh° ¢OWun£¤5 a2Z.G2³YL]jåtì”ä ÁÓ‘%"©<Ôúʰsº UZvä‡ÄiÆÒM .÷V·™ø#kèýiíÌ–ª)µT[)BˆõÑ xB¾B€ÖT¨.¥~ð@VĶr#¸ü*åZNDŽH;âi ],©£öØpù(šºãö¼T.uCê•4@ÿ GÕÛ)Cx›®0ø#:ÏðFÒbR\(€€Ä®fã4Þ‰Fä¯HXƒÅ,†öEÑÔÜ]Öv²?tLÃvBY£ú6Êu5ÅAQ³1‘’¬x–HŒÐ‡ ^ ¸KwJôÖŽ5×CÚ¨vÜ«/B0$×k°=ðbÇ(Ï)w±A†Á† 11Í=èQšµ626ŒÜ/`G«µ<}—-Ö7KEHÈÉðóȤmݱû±·ø«Snmá=“䫚mݱŸ¡¶~ó·“äUóJæúòB|E LêŽy´jDÔ$G¢þÐñ7óR8ýÒ…Ç› WVe#·Ÿ p·Fx~•ݤF÷0Èÿ K¯æS<6’¡WШ; ´ÿ ¥Êø\Òuî†åÝ–VNœkÒ7oòX¨Á­Ø÷FÎÑä±g÷ÿ M~Çî=p,X´ ÝÌÚÅ‹’ÃjÖ.ØöÏñ qïQ¤ÓZE†° =6·]܈ s¸>v•Ž^Ý\wq9r‰Î\¸¡kURÒ$­*‹Nq?Þª*!sŠÆ:TU_u±T+øX¡ ®¹¡,ÄâÃBTsÜ$Ø›4m椴zÜK]’’›Pƒ @€#â˜`é¹=I‡fiV•Ôî“nRm+µFPOhÍ0B£ €+¬5c v•:P'ÒyÎ ‰V~‚Ó†ÖuókDoh$å\*ö%Ю=£«…aȼ½÷Û.-½VŒŠ¼'lyî±1¬3ó#ÞE¿ÔS¤gV£m›=§\û"—WU¤ÚǼÿ ÂnÁGŒÃ ‚õN D³õNÚíŒÕ;HôyÄÈ©P¹Ä{:?R‘Ô¨âF÷ø£bÅó® JS|‚R÷ivýáâ€Æé¡è³´IئÑT!§˜•ت‚¬â@q€wnïCWÄ@JU€ê¯m6]Ï:£âx'+ÒðXvÓ¦Úm=–´7œ $ì“B£~p%ÕŸUþ« N@¼üï~w˜ñø5®—'Ôe»¤5ã//€ž~‰Tþ›Å7•#¤× Íö pÄ$ùeåì*«ÓŠEØWEÈsßg ¦ûvžSsLpºÊW–âµEWöˬH; ™!CYõZ ÃÄf æ#1W. \uWâ\,\Çf j’<qTbên›Î[vxx£ë 'ö¨1›˜ÀM¼Pÿ H)ƒêêŒA7s,|F“ 꺸k³9Ìö*ç®;Ö!Ö$Eiž•¹ÒÚ†ýóéÝû¾ÕS®ó$’NÝäŸz¤5r¦ãÄÃD÷Üø!°ø‡Ô&@m™Ì^Ãä­d q5Lnÿ N;.6½·N|#ä"1Nƒx“ã<3('&ñßt  ~ªu”1Tb㫨9ê–›–bìd$ߣ=#ÕãÒmU¯eí$EFù5ýYô櫨æì™Ç—±ssM]·á¿0ÕåJRÓªîiƒ+O58ÖñªŠÒx" \µâá¨i’¤i —Ö ” M+M¤ë9‚‰A¦°Qõ¾ßøK~¼Ã‘g…Ö´~÷Ï[3GUœÒ½#…kàÔ®Ò”‰³·dWV‰IP‰Ú8u¹”E ÖqLj¾êÕCBš{A^Âß;–¨`¯¬ìö ˼ ×tìø.tƐm*n¨y4o&Àx¥n¦×î‡aupáÛj8¿m›è¶ã!o½;ß0y^ý×^EÑ¿ÒjzŒ­)vÚÑnÄL …^ªô× ‡—‚3k Îý­hï]içå–îÏ*÷ñþ»Ô CÒjøjÍznˆ´ ¹#b'Fô‹ ‰v¥'’à'T´ƒHýÍ%M‰ ƒ&ÆÇŒï1 ‘ –Þ ‰i¬s žR-Ÿ kЬá¬7:þ 0ŒÅÒÕ/aÙ¬ÃÝ#Úøœ ©aiVc‰. ¹¦ãµ” ›Yg¦›ÆÎýº°f³7ƒhá·¸­}&D9¡ÂsÉÙÞèŠõØàC™¨ñbFC|´Ü(ŸƒÚÒ-%»'a Ì¿)ËÇn¿úÿ ÞŽX…4ÊÅH^ôΑí@ù¹Eh¶“L8Çjù ¼ÎåVªóR©Ï5uà V4lZß®=€xÖŸ–ÑÈ ÷”¨°¾__yM1tÉ?uÆþIkÄgæ@þ[¢†°XÃJ£j·:nkÅ¢u ‘}âGzö­/IµèЬ¼48q¦F°ŽR¼=ûì{´¯RýicS ÕÛ íNtÍÙï£,w4rêì®»~x(©Uñ§#Ñ&œÕ¤>ÎåÍÓ9’Ö{9eV­[Öjâ²ãu]˜å2›qÑšÕJç0€sÄ|Êëè0튔bÁ>“{×_F`Ø©ºê:µä,v¤ðfc1±"«ÔÍän1#=· Âøv~H½ÐßA¾¿Ü€Óš]Õ; I¾÷ç‚Qi†î¹9ywÔKG˜áñ zQY—§ÃÕZ07§X‚ Áh;ÁM)iÌCH-¯T‘ë|A0{Ò½LÚ–TâÖkÜ’dÀ“rmm»”جPF³ÖcbE§T€ÒxKºû’Ó®7±²(\4ŽÃ¸Uu@j™yĵ;³µ!Á¢b.W¤=mõ´êµK k ¸K^ÜÛ#p*Ü14qkZç5ïë †°5Ï%ÍÛ<Õ¤×Ô¥ê†C Õ´¼ú$ƒÖ“”]Ù¬qÞÚ[4©ý!ûÏ—Áb쳐XµA¬â~`›Çr¸8ìùÝ䫦<>ä÷«?xs´ÇÑ /á;¹øüÊÈÙà{"@Žïzâ¬[âß‚ U_<ÇŸ½4èN˜ú61®qŠu ¦þF£»äJ_ˆÙÎ~ ÞAã–݄ϗrŠD;xTž‘ô`É«…suãO`?³à™ô Lý#Íc5öoæØ‚y´´÷«ZR§<&JÇ+éâô´€i!Àˆ0æAoàðLèÖ-2ŸõW.’t^–(KÁmHµV@xÜÇy®Ñø­â^:Ú3w· 7½¹°ñ¸â¹®:',«Mœ—n­Á+Ãbš LÈ‘ÄnRÓÅœ%¦²‰¨ùQ:¤f‚ "PÕtô¸…cæl…&˜Ú˜Ôkv‹ž+vŠ,=¢v­6—Xy*¥t£«<™:“aîϲ=¦6rO]XI¿Œ÷¤zÚ­›¶ 6÷”w\d ü~v®ˆÌk«^m<ÿ ¢‰Õ\)ùºŽ;… lîÙÅEŠ®cѾ@vnMÏ,¼“ñ•ŽBxðÃzãÇç%3ˆ"}Ù•Åî> BÉú;Ò]V+P˜F_´ßé> Øše|ï‡ÄOmFæÇ ãqÞ$/xÐx­z`ï9"œÜij‚!7.\Td…9M‡•iŽ‹¾‘50ÞŽn¥ß4ÉôO ¹*í^QêËÜÇÌ8=ާs‰'ÂëÙ«á%Pú[O †ÅP¯Vsް.‰,kc¶ ¬A9n˜XÎ-ÞšN["¹QÕ‰ƒMýÁߺXJæÍaLj¾×Ãmã¾ãÚ uñÒþåQô¦¥ /ÄUx:‚ÍÜ’ Đ©ØÝ3V¨‰ÕnÐ6ó*óúK­«…c ¯U òhsý­jóÔj#,ímŒRµ«lbïUTŒÑ8†Ä0œÏr`ð¡¬É Ї ë"À² ™ 6¥ f¶ ¢ÚoܱԷ-<Àî)†a¶ž'Ú»¨TXqØæ¶÷YÄHy˜9ÈIW­YÀuMFë ºÏ’AqÌ4·/Ú †ô'i$øä­=Ä Ý|öK×40è|È6p‘0§)o¥ctî§H+CA-“ xØ|ÐXАç l8íºð3Ø:³¤¬KX¯UÿÙ yjsg = Yjsg::getInstance(); defined('YJDS') or define('YJDS', DIRECTORY_SEPARATOR); defined('YJSGCUSTOMFOLDER') or define('YJSGCUSTOMFOLDER',JPATH_ROOT . YJDS . "templates" . YJDS . $this->yjsg->getDefaultTemplate() .YJDS. "custom" . YJDS); $this->loadLanguage(); $this->app = $this->yjsg->app; $this->user = $this->yjsg->user; $this->option = $this->Input('option'); $this->view = $this->Input('view'); $id = $this->Int('id'); $exid = $this->Int('extension_id'); $task = $this->Input('task'); $this->canEdit = $this->user->authorise('core.edit', 'com_templates'); $find_template = JPATH_SITE . YJDS . "templates" . YJDS . Yjsg::getDefaultTemplate() . YJDS . "custom" . YJDS; if ($this->option == 'com_templates' && $this->view == 'style') { $this->templateView = true; } if ($this->app->isAdmin()) { //get the edited template for back-end $this->edited_template = $this->getEditedTemplate($id, 0); // check if edited template is based on plugin if (!is_null($this->edited_template) && $this->yjsg->tmplVersion($this->edited_template) >= '2.0.0') { $this->yjsg_newtmpl_check = 1; } // check for conversion to turn on buttons in plugin admin if ($this->yjsg->yjtmpl() && $this->yjsg->tmplVersion(Yjsg::getDefaultTemplate()) == '1.0.16') { $this->yjsg_convert_check = 1; } // run the plugin in backend if template needs to be converted if ($this->canEdit && $this->option == 'com_plugins' && $this->view == 'plugin' && $this->yjsg_convert_check == 1 && $this->_name == 'yjsg') { $this->run_plg = 1; } // check media manager for modal and logo and make sure the element belongs to yjsg, if yes run the plugin if ($this->option == 'com_media' && $this->view == 'images' && $this->Input('author') == 'yjsg') { $this->run_plg = 1; } // if default template is not based on plugin and plugin runs, show msg if ($this->templateView && $this->yjsg_convert_check == 1 && ($this->edited_template == Yjsg::getDefaultTemplate())) { $this->app->enqueueMessage(JText::_('YJSG_OLD_TEMPLATE_FOUND'), 'warning'); } // run plugin on form tasks for ajax save if ($this->canEdit && $task == 'clearCache' || $task == 'adminUpdate' || $task == 'checkBootstrap' || $task == 'convertTemplate' || $task == 'checkTemplate' || $task == 'restoreTemplate' || $task == 'cleanupTemplate') { $this->run_plg = 1; } // default checks done run plugin for admin if ($this->canEdit && $this->templateView && $this->yjsg_newtmpl_check == 1) { $this->run_plg = 1; } // load the constants and override for admin if ($this->run_plg == 1) { $this->yjsgConstants(); // load Extend J classes $this->yjsgExtendJoomla(); } // check if we need to cleanup if ( $this->edited_template == Yjsg::getDefaultTemplate() && $this->yjsg->cleanup() ) { echo JText::_('YJSG_RUN_CLEANUP'); die; } } } public function onAfterRoute() { if ($this->app->isAdmin()) { $this->YjsgCleanup(); } if ($this->app->isSite()) { $this->default_template = $this->app->getTemplate(); if ($this->yjsg->tmplVersion() > '1.0.16') { $this->run_plg = 1; } // check if we need to cleanup if ( $this->yjsg->cleanup() ) { echo JText::_('YJSG_RUN_CLEANUP'); die; } } // load the constants and override frontend if ($this->run_plg == 1) { $this->yjsgConstants(); // load Extend J classes $this->yjsgExtendJoomla(); if($this->app->isSite()){ // clean pageclass_sfx $this->yjsg->yjsgCleanPageSfx(); // match messages for any J version if (version_compare(JVERSION, '3.0', '<') && !class_exists('JDocumentRendererMessage')) { require_once YJSGEXTEND . "25" . YJDS . 'html' . YJDS . 'message.php'; }else if(version_compare(JVERSION, '2.5', '>') && !function_exists('renderMessage') && !JFile::exists(YJSGTEMPLATEPATH.'html'. YJDS . 'message.php')){ require_once YJSGEXTEND . "30" . YJDS . 'html' . YJDS . 'message.php'; } } } } /** * Shorten the get call * * @return string. */ protected function Input($getOption) { return $this->app->input->get($getOption); } /** * Shorten the getInt call * * @return string. */ protected function Int($getInt) { return $this->app->input->getInt($getInt); } /** * Cleanup old classes on updates * * @return void */ protected function YjsgCleanup() { // cleanup on updates if (($this->Input('option') == 'com_joomlaupdate' && $this->Input('task') == 'update.install') || ($this->Input('option') == 'com_joomlaupdate' && $this->Input('layout') == 'complete')) { if(!JFolder::exists(JPATH_SITE . '/plugins/system/yjsg/includes/yjsgcore/classes/extend/classes/')) return; JFolder::delete(JPATH_SITE . '/plugins/system/yjsg/includes/yjsgcore/classes/extend/classes/'); JFolder::create(JPATH_SITE . '/plugins/system/yjsg/includes/yjsgcore/classes/extend/classes/'); $indexContent = ''; JFile::write(JPATH_SITE . '/plugins/system/yjsg/includes/yjsgcore/classes/extend/classes/index.html', $indexContent); } } /** * Extend J classes * * @return void */ public function yjsgExtendJoomla() { if (version_compare(JVERSION, '3.0', '<')) { $IsJversion = '25'; $ModuleHelper = 'JModuleHelper'; $isView = 'JView'; $HtmlDocument = 'JDocumentHTML'; $FormField = 'JFormField'; $FileLayout = 'JLayoutFile'; $Pagination = 'JPagination'; $YjsgJModuleHelperDefaultRead = JPATH_LIBRARIES . '/joomla/application/module/helper.php'; $YjsgJViewDefaultRead = JPATH_LIBRARIES . '/joomla/application/component/view.php'; $YjsgJPaginationDefaultRead = JPATH_LIBRARIES . '/joomla/html/pagination.php'; $YjsgJDocumentHTMLDefaultRead = JPATH_LIBRARIES . '/joomla/document/html/html.php'; $YjsgJFormFieldDefaultRead = JPATH_LIBRARIES . '/joomla/form/field.php'; } elseif (version_compare(JVERSION, '3.0', '>')) { $IsJversion = '30'; $ModuleHelper = 'JModuleHelper'; $isView = 'JViewLegacy'; $HtmlDocument = 'JDocumentHTML'; $FormField = 'JFormField'; $FileLayout = 'JLayoutFile'; $Pagination = 'JPagination'; if (version_compare(JVERSION, '3.2', '<')) { $YjsgJModuleHelperDefaultRead = JPATH_LIBRARIES . '/legacy/module/helper.php'; } else { $YjsgJModuleHelperDefaultRead = JPATH_LIBRARIES . '/cms/module/helper.php'; } $YjsgJViewDefaultRead = JPATH_LIBRARIES . '/legacy/view/legacy.php'; $YjsgJPaginationDefaultRead = JPATH_LIBRARIES . '/cms/pagination/pagination.php'; if(version_compare(JVERSION, '3.5', '>=')){//@since 2.2.3 $HtmlDocument = 'JDocumentHtml'; $YjsgJDocumentHTMLDefaultRead = JPATH_LIBRARIES . '/joomla/document/html.php'; }else{ $YjsgJDocumentHTMLDefaultRead = JPATH_LIBRARIES . '/joomla/document/html/html.php'; } $YjsgJFormFieldDefaultRead = JPATH_LIBRARIES . '/joomla/form/field.php'; $YjsgJLayoutFileDefaultRead = JPATH_LIBRARIES . '/cms/layout/file.php'; if (version_compare(JVERSION, '3.8', '>=')) { //@since 2.2.9 $IsJversion = '38'; $YjsgJModuleHelperDefaultRead = JPATH_LIBRARIES . '/src/Helper/ModuleHelper.php'; $YjsgJViewDefaultRead = JPATH_LIBRARIES . '/src/MVC/View/HtmlView.php'; $YjsgJPaginationDefaultRead = JPATH_LIBRARIES . '/src/Pagination/Pagination.php'; $YjsgJDocumentHTMLDefaultRead = JPATH_LIBRARIES . '/src/Document/HtmlDocument.php'; $YjsgJFormFieldDefaultRead = JPATH_LIBRARIES . '/src/Form/FormField.php'; $YjsgJLayoutFileDefaultRead = JPATH_LIBRARIES . '/src/Layout/FileLayout.php'; } } // replacers if (version_compare(JVERSION, '3.8', '>=')) { //@since 2.2.9 $RepModuleHelper = 'ModuleHelper'; $RepisView = 'HtmlView'; $RepHtmlDocument = 'HtmlDocument'; $RepFormField = 'FormField'; $RepFileLayout = 'FileLayout'; $RepPagination = 'Pagination'; }else{ $RepModuleHelper = $ModuleHelper; $RepisView = $isView; $RepHtmlDocument = $HtmlDocument; $RepFormField = $FormField; $RepFileLayout = $FileLayout; $RepPagination = $Pagination; } // default files $YjsgJModuleHelperDefaultFile = YJSGEXTEND . "classes" . YJDS . "YjsgJModuleHelperDefault" . $IsJversion . ".php"; $YjsgJViewDefaultFile = YJSGEXTEND . "classes" . YJDS . "Yjsg" . $isView . "Default" . $IsJversion . ".php"; $YjsgJPaginationDefaultFile = YJSGEXTEND . "classes" . YJDS . "YjsgJPaginationDefault" . $IsJversion . ".php"; $YjsgJDocumentHTMLDefaultFile = YJSGEXTEND . "classes" . YJDS . "YjsgJDocumentHTMLDefault" . $IsJversion . ".php"; $YjsgJFormFieldDefaultFile = YJSGEXTEND . "classes" . YJDS . "YjsgJFormFieldDefault" . $IsJversion . ".php"; $YjsgJLayoutFileDefaultFile = YJSGEXTEND . "classes" . YJDS . "YjsgJLayoutFileDefault" . $IsJversion . ".php"; //extend JModuleHelper library class // JLoader::getClassList() if($this->app->isSite()){ if ( JFile::exists($YjsgJModuleHelperDefaultFile) ) { require_once($YjsgJModuleHelperDefaultFile); jimport('joomla.application.module.helper'); JLoader::register($ModuleHelper, YJSGEXTEND . $IsJversion . '/module/helper.php', true); }else{ $YjsgJModuleHelperDefault = JFile::read($YjsgJModuleHelperDefaultRead); $YjsgJModuleHelperDefault = str_replace('class '.$RepModuleHelper, 'class YjsgJModuleHelperDefault', $YjsgJModuleHelperDefault); $YjsgJModuleHelperDefault = preg_replace('/(namespace(.*?);)/s', '', $YjsgJModuleHelperDefault); if(JFile::write($YjsgJModuleHelperDefaultFile, $YjsgJModuleHelperDefault)){ require_once($YjsgJModuleHelperDefaultFile); jimport('joomla.application.module.helper'); JLoader::register($ModuleHelper, YJSGEXTEND . $IsJversion . '/module/helper.php', true); }else{ JError::raiseWarning(100, 'YjsgJModuleHelperDefault'.$IsJversion . JText::_('YJSG_CANNOT_CREATE_FILE')); } } } //extend JView library class if($this->app->isSite() || $this->templateView || $this->Input('author') == 'yjsg'){ if ( JFile::exists($YjsgJViewDefaultFile) ) { require_once($YjsgJViewDefaultFile); jimport('joomla.application.component.view'); JLoader::register($isView, YJSGEXTEND . $IsJversion . '/component/view.php', true); }else{ $YjsgJViewDefault = JFile::read($YjsgJViewDefaultRead); $YjsgJViewDefault = str_replace('class ' . $RepisView, 'class Yjsg' . $isView . 'Default', $YjsgJViewDefault); $YjsgJViewDefault = preg_replace('/(namespace(.*?);)/s', '', $YjsgJViewDefault); if( JFile::write($YjsgJViewDefaultFile, $YjsgJViewDefault) ){ require_once($YjsgJViewDefaultFile); jimport('joomla.application.component.view'); JLoader::register($isView, YJSGEXTEND . $IsJversion . '/component/view.php', true); }else{ JError::raiseWarning(100, 'Yjsg' . $isView . 'Default'.$IsJversion . JText::_('YJSG_CANNOT_CREATE_FILE')); } } } //extend JDocumentHTML and JFormField library class for template admin if ($this->templateView && $this->canEdit && $this->app->isAdmin() && $this->yjsg_newtmpl_check == 1) { if ( JFile::exists($YjsgJDocumentHTMLDefaultFile) ) { require_once($YjsgJDocumentHTMLDefaultFile); JLoader::register($HtmlDocument, YJSGEXTEND . $IsJversion . '/html/html.php', true); }else{ $YjsgJDocumentHTMLDefault = JFile::read($YjsgJDocumentHTMLDefaultRead); $YjsgJDocumentHTMLDefault = str_replace('class '.$RepHtmlDocument, 'class YjsgJDocumentHTMLDefault', $YjsgJDocumentHTMLDefault); $YjsgJDocumentHTMLDefault = preg_replace('/(namespace(.*?);)/s', '', $YjsgJDocumentHTMLDefault); $YjsgJDocumentHTMLDefault = str_replace('extends Document', 'extends JDocument', $YjsgJDocumentHTMLDefault); if ( JFile::write($YjsgJDocumentHTMLDefaultFile, $YjsgJDocumentHTMLDefault) ){ require_once($YjsgJDocumentHTMLDefaultFile); JLoader::register($HtmlDocument, YJSGEXTEND . $IsJversion . '/html/html.php', true); }else{ JError::raiseWarning(100, 'YjsgJDocumentHTMLDefault'.$IsJversion . JText::_('YJSG_CANNOT_CREATE_FILE')); } } if(version_compare(JVERSION, '3.8', '<')){ if ( JFile::exists($YjsgJFormFieldDefaultFile) ) { require_once($YjsgJFormFieldDefaultFile); JLoader::register($FormField, YJSGEXTEND . $IsJversion . '/form/field.php', true); }else{ $YjsgJFormFieldDefault = JFile::read($YjsgJFormFieldDefaultRead); $YjsgJFormFieldDefault = str_replace('class '.$RepFormField, 'class YjsgJFormFieldDefault', $YjsgJFormFieldDefault); if ( JFile::write($YjsgJFormFieldDefaultFile, $YjsgJFormFieldDefault)){ require_once($YjsgJFormFieldDefaultFile); JLoader::register($FormField, YJSGEXTEND . $IsJversion . '/form/field.php', true); }else{ JError::raiseWarning(100, 'YjsgJFormFieldDefault'.$IsJversion . JText::_('YJSG_CANNOT_CREATE_FILE')); } } } } //extend JLayoutFile class if ($this->app->isSite() && version_compare(JVERSION, '3.1', '>')) { if ( JFile::exists($YjsgJLayoutFileDefaultFile) ) { require_once($YjsgJLayoutFileDefaultFile); JLoader::register($FileLayout, YJSGEXTEND . $IsJversion . '/layout/file.php', true); }else{ $YjsgJLayoutFileDefault = JFile::read($YjsgJLayoutFileDefaultRead); $YjsgJLayoutFileDefault = str_replace('class '.$RepFileLayout, 'class YjsgJLayoutFileDefault', $YjsgJLayoutFileDefault); $YjsgJLayoutFileDefault = preg_replace('/(namespace(.*?);)/s', '', $YjsgJLayoutFileDefault); $YjsgJLayoutFileDefault = str_replace('extends BaseLayout', 'extends JLayoutBase', $YjsgJLayoutFileDefault); if( JFile::write($YjsgJLayoutFileDefaultFile, $YjsgJLayoutFileDefault) ){ require_once($YjsgJLayoutFileDefaultFile); JLoader::register($FileLayout, YJSGEXTEND . $IsJversion . '/layout/file.php', true); }else{ JError::raiseWarning(100, 'YjsgJLayoutFileDefault'.$IsJversion . JText::_('YJSG_CANNOT_CREATE_FILE')); } } } //extend JPagination library class if ($this->app->isSite()) { if ( JFile::exists($YjsgJPaginationDefaultFile) ) { require_once($YjsgJPaginationDefaultFile); jimport('joomla.html.pagination'); JLoader::register($Pagination, YJSGEXTEND . $IsJversion . '/pagination/pagination.php', true); if(version_compare(JVERSION, '3.0', '<') && !class_exists('JPaginationObject')){ require_once(YJSGEXTEND.'25/pagination/object.php'); } }else{ $YjsgJPaginationDefault = JFile::read($YjsgJPaginationDefaultRead); $YjsgJPaginationDefault = str_replace('class '.$RepPagination, 'class YjsgJPaginationDefault', $YjsgJPaginationDefault); $YjsgJPaginationDefault = preg_replace('/(namespace(.*?);)/s', '', $YjsgJPaginationDefault); if (version_compare(JVERSION, '3.0', '<')) { $YjsgJPaginationDefault = str_replace('new '.$RepPagination, 'new YjsgJPaginationDefault', $YjsgJPaginationDefault); } if ( JFile::write($YjsgJPaginationDefaultFile, $YjsgJPaginationDefault) ){ require_once($YjsgJPaginationDefaultFile); jimport('joomla.html.pagination'); JLoader::register($Pagination, YJSGEXTEND . $IsJversion . '/pagination/pagination.php', true); if(version_compare(JVERSION, '3.0', '<') && !class_exists('JPaginationObject')){ require_once(YJSGEXTEND.'25/pagination/object.php'); } }else{ JError::raiseWarning(100, 'YjsgJPaginationDefault'.$IsJversion . JText::_('YJSG_CANNOT_CREATE_FILE')); } } } } /** * Constants * * @return void * * @since 2.0.0 */ public function yjsgConstants() { defined('YJSGPATH') or define('YJSGPATH', dirname(__FILE__) . YJDS); defined('YJSGRUN') or define('YJSGRUN', 1); defined('YJSGV') or define('YJSGV', $this->yjsg->version); defined('YJSGDEFT') or define('YJSGDEFT', Yjsg::getDefaultTemplate()); defined('YJSGTNAME') or define('YJSGTNAME', $this->default_template); defined('YJSGEXTEND') or define('YJSGEXTEND', YJSGPATH . 'includes' . YJDS . 'yjsgcore' . YJDS . 'classes' . YJDS . 'extend' . YJDS); if ($this->default_template != "") { defined('YJSGTEMPLATEPATH') or define('YJSGTEMPLATEPATH', JPATH_SITE . YJDS . 'templates' . YJDS . $this->default_template . YJDS); defined('YJSGSITE_PATH') or define('YJSGSITE_PATH', JURI::root() . 'templates/' . $this->default_template . '/'); } else { defined('YJSGTEMPLATEPATH') or define('YJSGTEMPLATEPATH', JPATH_SITE . YJDS . 'templates' . YJDS . $this->edited_template . YJDS); defined('YJSGSITE_PATH') or define('YJSGSITE_PATH', JURI::root() . 'templates/' . $this->edited_template . '/'); } defined('YJSGSITE_PLG_PATH') or define('YJSGSITE_PLG_PATH', JURI::root() . 'plugins/system/yjsg/'); defined('YJSGCORE_FOLDER') or define('YJSGCORE_FOLDER', YJSGPATH . 'includes' . YJDS . 'yjsgcore' . YJDS); defined('YJSGCORE_PATH') or define('YJSGCORE_PATH', YJSGPATH . 'includes' . YJDS . 'yjsgcore' . YJDS . 'yjsg_core.php'); defined('YJSGCOMPILER_LOG') or define('YJSGCOMPILER_LOG', YJSGTEMPLATEPATH . "css_compiled" . YJDS); defined('DS') or define('DS', DIRECTORY_SEPARATOR); // backwards compatibility defined('TEMPLATEPATH') or define('TEMPLATEPATH', YJSGTEMPLATEPATH); // backwards compatibility defined('YJSGSITE_BASEPATH') or define('YJSGSITE_BASEPATH', JURI::base(true) . '/templates/' . $this->default_template . '/'); defined('YJSG_BASEPATH') or define('YJSG_BASEPATH', JURI::base(true) . '/plugins/system/yjsg/'); defined('YJSG_ASSETS') or define('YJSG_ASSETS', JURI::base(true) . '/plugins/system/yjsg/assets/'); if ($this->app->isSite()) { /** * make constants out of all files inside layouts folder * * yjsg_filename - YJSG_FILENAME name. * @since 2.0.0 */ $constants = array(); if ($this->yjsg->preplugin()) { $layout_files = JFolder::files(YJSGPATH . YJDS . 'legacy' . YJDS . 'layouts'); } else { $layout_files = JFolder::files(YJSGPATH . YJDS . 'includes' . YJDS . 'layouts'); } foreach ($layout_files as $file) { $check_for_core = stripos($file, "yjsg_"); if ($check_for_core !== false && $check_for_core == 0) { if ($this->yjsg->preplugin()) { $constants[strtoupper(str_replace(".php", "", $file))] = YJSGPATH . "legacy" . YJDS . "layouts" . YJDS . $file; } else { $constants[strtoupper(str_replace(".php", "", $file))] = YJSGPATH . "includes" . YJDS . "layouts" . YJDS . $file; } } } //check the template overrides, if they are there change constants if (JFolder::exists(YJSGTEMPLATEPATH . YJDS . 'layouts')) { $template_layout_files = JFolder::files(YJSGTEMPLATEPATH . YJDS . 'layouts'); foreach ($template_layout_files as $template_file) { $check_for_core = stripos($template_file, "yjsg_"); if ($check_for_core !== false && $check_for_core == 0) { $constants[strtoupper(str_replace(".php", "", $template_file))] = YJSGTEMPLATEPATH . "layouts" . YJDS . $template_file; } } } //make constants if (!empty($constants)) { foreach ($constants as $row => $value) { defined($row) or define($row, $value); } } // allow to override yjsg_head.php in template/layouts folder if ($this->yjsg->preplugin()) { $yjsgHeadFile = YJSGPATH . 'legacy' . YJDS . 'yjsgcore' . YJDS . 'yjsg_head.php'; } else { $yjsgHeadFile = YJSGPATH . 'includes' . YJDS . 'yjsgcore' . YJDS . 'yjsg_head.php'; } if (!defined('YJSG_HEAD')) { define('YJSG_HEAD', $yjsgHeadFile); } if (!defined('YJSG_LINKS')) { define('YJSG_LINKS', YJSGPATH . 'includes' . YJDS . 'yjsgcore' . YJDS . 'functions' . YJDS . 'yjsg_links.php'); } } // make layout array for admin if ($this->canEdit && $this->app->isAdmin() && $this->templateView && $this->yjsg_newtmpl_check == 1) { $getpositions = file(YJSGTEMPLATEPATH . "index.php"); $searchpoz = array( 'yjsg1', 'yjsg2', 'yjsg3', 'yjsg4', 'yjsg5', 'yjsg6', 'yjsg7', 'YJSG_HEADERBLOCK', 'yjsg_custom_headerblock', 'YJSG_TOPMENU', 'yjsg_loadlayout', 'YJSG_FOOTER', 'YJSG_PATHWAY', 'newgrid1', 'newgrid2', 'newgrid3', 'newgrid4', 'newgrid5', 'newgrid6', 'newgrid7' ); $matches = array(); $getpositions = implode('', $getpositions); foreach ($searchpoz as $val) { $pos = strpos($getpositions, $val); if ($pos !== false) $matches[strtolower($val)] = $pos; } // preserve order of occurrence. asort($matches); $yjsglayout_array = array_keys($matches); $yjsglayout_array = json_encode($yjsglayout_array); defined('YJSGLAYOUT') or define('YJSGLAYOUT', $yjsglayout_array); } } /** * Get the editing template name * * @return string - template name * @since 2.0.0 */ public static function getEditedTemplate($templateId = "", $clientId = "", $default = "") { // Create a new query object. $db = JFactory::getDbo(); $query = $db->getQuery(true); if ($templateId !== "") { $query->where('id=' . (int) $templateId); } if ($clientId !== "") { $query->where('client_id=' . (int) $clientId); } if ($default !== "") { $query->where('a.home = 1'); } // Select the required fields from the table. $query->select('a.template'); $query->from($db->quoteName('#__template_styles') . ' AS a'); // Make sure there aren't any errors try{ $db->setQuery($query); $template_name = $db->loadResult(); }catch (RuntimeException $e){ echo $e->getMessage(); exit; } return $template_name; } public function onBeforeCompileHead() { $document = JFactory::getDocument(); // add bootstrap css to modal iframe if element is ours if ($this->canEdit && $this->app->isAdmin() && intval(JVERSION) < 3 && $this->option == 'com_media' && $this->view == 'images' && $this->Input('author') == 'yjsg') { $document->addStyleSheet(YJSGSITE_PLG_PATH . 'assets/bootstrap3/css/bootstrap.min.css'); } // check if template mootols is disabled: // TO DO: not able to do this since 3.x still depends on moo in some areas. /* $checkmootools = Yjsg::tplParam('mootools_on'); if(isset($checkmootools) && $checkmootools == 0 && ($this->view != 'images' && $this->view != 'form')) { unset($document->_scripts[JUri::root(true) . '/media/system/js/mootools-core.js']); unset($document->_scripts[JUri::root(true) . '/media/system/js/mootools-more.js']); }*/ //yjsg rearange frontend css files, set yjsg styles last if ($this->app->isSite() && $this->run_plg == 1) { if (intval(JVERSION) > 2) { unset($document->_scripts[JUri::root(true) . '/media/jui/js/bootstrap.min.js']); unset($document->_scripts[JUri::root(true) . '/media/jui/js/bootstrap.js']); unset($document->_styleSheets[JUri::root(true) . '/media/jui/css/bootstrap-extended.css']); unset($document->_styleSheets[JUri::root(true) . '/media/jui/css/bootstrap-responsive.css']); unset($document->_styleSheets[JUri::root(true) . '/media/jui/css/bootstrap-rtl.css']); unset($document->_styleSheets[JUri::root(true) . '/media/jui/css/bootstrap.css']); unset($document->_styleSheets[JUri::root(true) . '/media/jui/css/icomoon.css']); } $defaultStyles = array( 'http://fonts.googleapis.com', 'yjsg/assets/css', 'yjsg/legacy/css', 'yjsg/assets/src', 'yjsg/assets/bootstrap2/css', 'yjsg/assets/bootstrap3/css', 'templates/' . $document->template ); $this->yjsg->yjsgMoveCss($defaultStyles); // moving css files done // k2, vm, mijoshop joomla 3.x jquery load check $last_jsfiles_array = array(); $k2check = JPluginHelper::getPlugin('system', 'k2'); $micheck = JPluginHelper::getPlugin('system', 'mijoshopjquery'); $vmcheck = is_dir(JPATH_ROOT . YJDS . 'components' . YJDS . 'com_virtuemart' . YJDS); $unsetjq = false; if (intval(JVERSION) > 2) { $unsetjq = true; } if ($k2check && $this->Input('tmpl') !='component'){ $k2params = $this->app->getParams('com_k2'); $k2jq = str_replace('remote', '', $k2params->get('jQueryHandling')); if ($k2check && $k2jq > 0) { unset($document->_scripts['//ajax.googleapis.com/ajax/libs/jquery/' . $k2jq . '/jquery.min.js']); unset($document->_scripts[JUri::root(true) . '/media/k2/assets/js/jquery-' . $k2jq . '.min.js']); } } if ($vmcheck) { unset($document->_scripts['//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js']); unset($document->_scripts[JUri::root(true) . '/components/com_virtuemart/assets/js/jquery.min.js']); unset($document->_scripts[JUri::root(true) . '/components/com_virtuemart/assets/js/jquery.noConflict.js']); } if ($unsetjq) { // unset Yjsg jquery if Joomla 3.x unset($document->_scripts[YJSG_ASSETS . 'src/libraries/jquery.min.js']); unset($document->_scripts[YJSG_ASSETS . 'src/libraries/jquery-noconflict.js']); } // moving js files $defaultJsFiles[] = 'templates/' . $document->template; $defaultJsFiles[] = 'elements/src'; // move require js to avoid cookie define conflict $defaultJsFiles[] = 'require.js'; if ($k2check && $this->Input('tmpl') !='component'){ $defaultJsFiles[] = 'k2.noconflict.js'; $defaultJsFiles[] = 'k2.js'; } if ($vmcheck){ $defaultJsFiles[] = '1.8/jquery-ui.min.js'; $defaultJsFiles[] = 'com_virtuemart'; } if ($micheck){ $defaultJsFiles[] = 'com_mijoshop'; $defaultJsFiles[] = 'mijoshopjquery'; } $this->yjsg->yjsgMoveJs($defaultJsFiles); // js files move done } } function onBeforeRender(){ if ($this->app->isSite() && $this->run_plg == 1) { require_once YJSGPATH . 'includes/yjsgshortcodes/yjsg_shortcodes.php'; $document = JFactory::getDocument(); // cleanup description from possible shortcodes $cleanDescription = yjsg_clean_shortcodes( $document->getDescription() ); $document->setDescription( $cleanDescription ); $getogDesctiption = $document->getMetaData('og:description'); if(!empty($getogDesctiption)){ $document->setMetaData('og:description',$cleanDescription); } } } function onAfterRender() { // in case someone is overriding form field if ($this->app->isAdmin() && $this->run_plg == 1 && $this->templateView ) { $body = Yjsg::getBody(); if(version_compare(JVERSION, '3.0', '<')){ // bug in usergroup field type output $body = str_replace('jformparams', "jform_params_", $body); } if(version_compare(JVERSION, '3.0', '<')){ $body = preg_replace('/title="(.*?)::(.*?)">/','data-original-title="$1" data-content="$2">', $body); $body = str_replace('hasTip', "adminLabel", $body); }else{ $body = preg_replace('/title="(.*?)<\/strong>
(.*?)">/','data-original-title="$1" data-content="$2">', $body); $body = str_replace(array('hasTooltip','hasPopover'), "adminLabel", $body); } Yjsg::setBody($body); } if ($this->app->isSite() && $this->run_plg == 1) { // add before and after body custom codes $body = Yjsg::getBody(); $afterbody = Yjsg::tplParam('cc_after_body'); $beforecbody = Yjsg::tplParam('cc_before_cbody'); $bootstrapv = Yjsg::tplParam('bootstrap_version'); if(empty($bootstrapv)){ $bootstrapv ='bootstrapoff'; } if (!empty($afterbody) || !empty($beforecbody)) { if (!empty($afterbody)) { $body = preg_replace('/()(.*)/', "$0\n\t" . $afterbody, $body); } if (!empty($beforecbody)) { $body = str_replace('', "\n\t" . $beforecbody . "\n\t", $body); } Yjsg::setBody($body); } // make pagination class names same in all jversions if($this->Input('view') == 'article'){ $paginationreplace = array( '