9
This is how you could do it (this is for the
xbootstrap theme and the
Publisher module):
1) create directory "
images" in "
publisher" folder in your theme, e.g.
/themes/xbootstrap/modules/publisher/images/2) copy the image of your choice to this folder, and name it e.g. "
search.png"
Repeat it for all modules that you want to modify.
Note:
the name of the file should be the same for all modules!3) copy the file "
system_search.tpl"
from
/modules/system/templates/to
/themes/xbootstrap/modules/system/4) modify the file "
system_search.tpl" around line 17:
<{foreach item=data from=$search.module_data}>
<img src="<{$data.image_link}>" title="<{$data.image_title}>" alt="<{$data.image_title}>"/> <a href="<{$data.link}>"><{$data.link_title}>a>
to this:
<{foreach item=data from=$search.module_data}>
<{*----------- new code start -------------*}>
<{assign var="module_name" value=$search.module_name|lower}>
<{assign var="image" value="themes/xbootstrap/modules/$module_name/images/search.png"}>
<{if file_exists($image)}>
<img src="<{$image}>"
<{else}>
<img src="<{$data.image_link}>"
<{/if}>
title="<{$data.image_title}>" alt="<{$data.image_title}>"/> <a href="<{$data.link}>"><{$data.link_title}>a>
<{*----------- new code ends -------------*}>
Now if you go to
http://myxoopssite/search.php and do the search, Publisher will show you the new icons.