Upload the forum image to the /images folder in the phpBB root directory. This will make it simpler to add a forum image in ACP. Just type in the relevant input like this: /images/forumimage.jpg
In order for the forum image you add to a forum to replace the existing forum icon, we need to edit the /template/forumlist_body.html file of the style you are using. First, find this:
Code: Select all
<dl class="row-item {forumrow.FORUM_IMG_STYLE}">
Code: Select all
<dl class="row-item<!-- IF not forumrow.FORUM_IMAGE --> {forumrow.FORUM_IMG_STYLE}<!-- ENDIF -->">
Code: Select all
<a href="{forumrow.U_VIEWFORUM}" class="row-item-link"></a>
Code: Select all
<a href="{forumrow.U_VIEWFORUM}" class="row-item-link"><!-- IF forumrow.FORUM_IMAGE -->{forumrow.FORUM_IMAGE}<!-- ENDIF --></a>
Code: Select all
<!-- IF forumrow.FORUM_IMAGE -->
<!-- EVENT forumlist_body_forum_image_before -->
<span class="forum-image"><!-- EVENT forumlist_body_forum_image_prepend -->{forumrow.FORUM_IMAGE}<!-- EVENT forumlist_body_forum_image_append --></span>
<!-- EVENT forumlist_body_forum_image_after -->
<!-- ENDIF -->
If forum image is too large, it may be misshapen. You can use this CSS code to give your forum image the size of its predecessor, the forum icon:
Code: Select all
dl a.row-item-link img {
width: inherit;
}
If you don't preserve these changes in style updates, you'll have to do it all over again. On the other hand, for your convenience, I am sharing the edited version of the forumlist_body.html file the default Prosilver style:
Feel free to write if you have any questions or if you have ideas to make the code better.