I was to change featured module so that instead of using the logo, it will grab the first gallery image and display that instead.
What code changes are necessary.
(1) You would need to modify mod_sobi2featured.xml, and add a new parameter to say use Gallery images.
You could choose the 'first' Gallery image to use, but what if not every Entry had a Gallery associated with it?
(2) You would need to add some code in mod_sobi2featured to get the image from the Gallery.
You would need to include error handling code to ensure that the Gallery image actually exists.
I am not familiar with the detailed workings of the SOBI2 Gallery plugin so I do not know if you will need different code for different versions of the plugin.
(3) If you are the only person adding entries to the SOBI2 Directory an easier work-around to the problem may be to use Custom Fields.
Create a Custom Field that contains the HTML code to display the required Image for each Entry;
For example;
<div class=
myFeaturedGalleryImage><img border="0" alt="
myAlternativeTextForThisImage" src="
myPathToGalleryImageForThisEntry" width="
MyGalleryImageWidth" height="
MyGalleryImageHeight"></a></div>
and then specify in the module settings to output this custom field via the parameter 'Display Custom Fields with ID:'
Obviously, this is practical only if you are the only person adding SOBI2 entries, or this creates a high administrative workload if you have to go back and update other peoples entries.
(4) It is not a trivial issue to build this feature into the standard Module mod_sobi2featured code and maintain compatibility with all SOBI2 versions, all Joomla versions and all Gallery plugin versions.
Regards - Mark