BzZzZ - ustvarjamo podobe logo
slovenščina
english
How to make onContentAfterSave compatible with Joomla 2.5 AND 3.x

Joomla 3 introduced a very annoying change, $article parameter in onContentAfterSave event is now passed by value, while in Joomla 1.6.-2.5 it was passed by reference and having the same method definition for both will cause an error in one of them. Depends on how you approach it, e.g. if you have parameter defined by reference, call_user_func_array that works behind the scenes to fire plugin events will return false and since your plugin won't work (without any php error).

So, a coding challenge is to make a plugin that is compatible with both popular joomla series. Take a bit of brain, add a large portion of poetry and here is a way to do it:
In the plugin file create an intermediate class that contains you actual code with one exception - rename onContentAfterSave to something else

class PlgContentSomethingIntermed extends JPlugin {
public function onContentAfterSaveIntermed ($context, $article, $isNew) {
somecode...
}
}


Beri dalje...
 
Get a free Packt publishing book!

To celebrate its 1000th title, Packt is offering you a gift - anyone already registered to www.packtpub.com, or who registers before 30th September 2012 can download any one of their eBooks for free!

Beri dalje...
 
How to display Joomla component in a module

inspired by the Ignite gallery, here is some more Joomla wizardry

A quick way to display your component in a module - place the following code in the main module file:

Beri dalje...
 
How to override Joomla 1.5. component router

Have you ever wondered how to change Joomla core component without hacking it?

While transferring an older site based on Joomla 1.0 to 1.5. I found out that com_contact router in 1.5. isn't working properly (at least in my opinion) as router is imposing category itemid on items even when direct menu links to those items exist. As parameters depend on itemid (it defines active menu and active menu parameters) it is impossible to change parameters of linked items when you are accessing them from a category list - they all will show whatever is set on the category. Fix itself is fairly easy, but as Joomla 1.5. is not actively maintained anymore (except security fixes) I couldn't push this fix trough Joomla trenches of mud to get it officially fixed. And even if this would not be the case - waiting 3 years before fix happens was not an option. What I could do is to change files directly and redo this for every security release that will come in the following years - or try to override this functions somehow.

Beri dalje...
 
Solving call_user_func_array() expects parameter 2 to be array, object given

After upgrade to PHP 5.3. you might start getting this error, if you were passing an object to function callbacks:

"call_user_func_array() expects parameter 2 to be array, object given".

 

To solve this simply wrap object in an array like this array($object) or typecast it to array (array)$object. If your function expexcts object by reference, you will need to pass it by reference at callback call time like this, typecasting won't work here as it breaks reference:

$sth = call_user_func_array(array('modRokNewsPagerHelper', 'getRowCount' ), array(&$params) );

 

Beri dalje...
 
Projekt Forkito kot samostojen razvijalski laboratorij

Z našo pomočjo je nastal projekt Forkito - laboratorij za razvoj Joomla in povezane kode.

Trenutno sta v laboratoriju v teku dva projekta: Izboljšave Joomla caching knjižnice in projekt prenove Joomla sistema pravic (ACL).

Več na http://www.forkito.org

 
Klas trikrat predaval na Jandbeyond 2011

Soavtor Joomle in največji poznavalec tega sistema v Sloveniji, Klas Berlič je na konferenci J and beyond 2011 , ki je v maju potekala v nizozemskem mestu Kerkrade predaval kar trikrat - dve samostojni predavanji pod naslovi Joomla Caching implemented in Forkito ACL ter kot soudeleženec predstavitve projekta Molajo pri katerem sodeluje kot eden izmed vodilnih razvijalcev.

 

Predavanja je takole zabeležila kamera organizatorjev:

Cutting corners from a wheel - Introducing Forkito ACL - Klas Berlic 

Beri dalje...
 
Klas predaval na Joomla dnevu v Indiji

Vodja naše agencije Klas Berlič je sodeloval na Joomla dnevu Indija, ki je potekal 12. in 13. marca 2011 v mestu Pune, kamor je odšel predavat na povabilo lokalnega Joomla združenja.

Beri dalje...
 
Vodja naše agencije je soavtor Joomle

Klas Berlič je kot edini Slovenec sodeloval pri nastanku najnovejše različice sistema za upravljanje z vsebinami (CMS) Joomla 1.6.

Klas je k nastanku nove različice prispeval povsem na novo napisano knjižnico za pospeševanje delovanja spletnih strani (Cache library), s pomočjo katere je moč delovanje posameznih delov Joomle ali celotnega sistema pospešiti tudi za več kot 10 krat,  kar je še zlasti pomembno pri delovanju zelo obiskanih spletnih strani.

Sistem Jooma na katerem temelji tudi dobršen del naši strani je najbolj razširjen sistem za upravljanje z vsebinami na svetu - ocene o njegovi razširjenosti se gibljejo okrog številke 20 milionov instalacij, izredno razširjen pa je tudi pri nas. Po raziskavi Cmsshare zavzema Joomla v Sloveniji kar 43% delež med vsemi orodji za objavljanje na spletu.

Beri dalje...
 
Joomla 1.6. cache changes for extension developers (Jennifer series 2)

Sorry Jennifer/Joe, I was joking, this one is really not for you.

This article is a historical sequel to Using caching in Joomla extensions that was written for Joomla 1.5. I will try to merge and expand this in the third article - but for now here are most important cache changes in Joomla 1.6. that affect Joomla extensions developers. Also reading part one of this series is advisable .

 

CHANGE OF TERMINOLOGY

In 1.5. we had 2 kinds of handlers - low level cache handlers like file cache, APC etc and higher level handlers like view cache or callback cache. In 1.6. higher level was renamed to cache controllers to better reflect it's role. Cache controllers use cache handlers to do it's work, so it is similar to controller-model relationship in MVC. The following chart can help you understand how cache library works internally:

 

Beri dalje...
 
<< Prva < Prejšnja 1 2 Naslednja > Zadnja >>

Rezultat(i) 1 - 15 od 20
  • strateško usmerjeno
  • integrirano
  • s kreativnostjo pospešeno
  • učinkovito komuniciranje
© BzZzZ 2008
stik z nami    zaposlitev    kazalo strani