Home Fórum | Support forum
Üdvözlet, Vendég

Use Gallery Image instead of Icon
(1 megtekintés) (1) vendég
Sobi2 Related Entries module English forum.
If you find bugs please open a new topic (You need to login).
LeOldal: 1
TÉMAKÖR: Use Gallery Image instead of Icon
#195
Use Gallery Image instead of Icon 1 év, 3 hónapja  
Hello,
Thank's for the good quality of the module !
Just to share :

Because I use the gallery plugin (and not the icon or image) for my entries, I needed to change the source files a little bit.
To display the first thumbnail image of the gallery instead of the icon
1) click on icon yes to the parameter module
2) in the helper.php
change the query line 97 to :

$query = " SELECT item.".$db->nameQuote('itemid').", item.".$db->nameQuote('title')." , gallery.".$db->nameQuote('thumb')." as ".$db->nameQuote('icon').", item.".$db->nameQuote('publish_up').", item.".$db->nameQuote('hits').", item.".$db->nameQuote('image').$cfieldfilter1
." FROM" .$db->nameQuote('#__sobi2_plugin_gallery')." AS gallery, " .$db->nameQuote('#__sobi2_item')." AS item"
. $cfieldfilter2
." WHERE item.".$db->nameQuote('itemid')."= gallery.".$db->nameQuote('itemid')." AND gallery.".$db->nameQuote('position')."=".$db->quote('1')
." AND item.".$db->nameQuote('published')." = ".$db->quote('1')." AND item.".$db->nameQuote('itemid')." != ".$db->quote($sobi2Id)." AND ($wheretags) "
." AND ( item.".$db->nameQuote('publish_down')." > ".$db->quote($now)." OR item.".$db->nameQuote('publish_down')." = ".$db->quote($nulldate).") "
. $cat1filter
. $orderby;

And the query line 156 to :
$query = " SELECT item.".$db->nameQuote('itemid').", item.".$db->nameQuote('title')." , gallery.".$db->nameQuote('thumb')." as ".$db->nameQuote('icon').", item.".$db->nameQuote('publish_up').", item.".$db->nameQuote('hits').", item.".$db->nameQuote('image').$cfieldfilter1
." FROM" .$db->nameQuote('#__sobi2_plugin_gallery')." AS gallery, " .$db->nameQuote('#__sobi2_item')." AS item"
. $cfieldfilter2
." WHERE item.".$db->nameQuote('itemid')."= gallery.".$db->nameQuote('itemid')." AND gallery.".$db->nameQuote('position')."=".$db->quote('1')
." AND item.".$db->nameQuote('published')." = ".$db->quote('1')." AND item.".$db->nameQuote('itemid')." != ".$db->quote($sobi2Id).$excludeitems
." AND ( item.".$db->nameQuote('publish_down')." > ".$db->quote($now)." OR item.".$db->nameQuote('publish_down')." = ".$db->quote($nulldate).") "
. $cat2filter
. $orderby;

3)change the folder to get the gallery plugin image : file tmpl/default.php line 45

if($related->icon) $iconsrc = $baseurl."/images/com_sobi2/gallery/".$related->itemid."/".$related->icon;
Utolsó szerkesztés: 2011-01-31 14:09 : joomlalala.
Vendégként nem küldhető be hozzászólás.
 
#196
Válasz: Use Gallery Image instead of Icon 1 év, 3 hónapja  
Thank you
Vendégként nem küldhető be hozzászólás.
If you find my module useful please make a small donation or/and make review on the JED. It is motivate me!
 
FelOldal: 1