Change Banner for Forums

If you would like to change the banner at the top of the Web Wiz Forum to a custom image for each individual forum then this tutorial will help.

The beauty of the method we are using is that you only need to add the forums that you wish to have custom images for so you dont have to add an entry for every forum. If how ever you have a lot of forums (over 30) and you want a custom image for each, contact me and i'll see if i can make a WWF Mod of this that works of the database.

To start off with, you will need to add the following to the very top of the 'header.asp' file found in the 'Includes' folder.

<% strTitleImage = HeaderImage(intForumID,strTitleImage) %>

Now, add the following to the very bottom of the 'functions_common.asp' file which is found in the 'Functions' folder. Make sure it is not inside another function, it would proberly be best to add it after the copyright notices at the top of the file.

'***  	Forum Banner Image	 	***

Private Function HeaderImage(intForumID,strTitleImage)
    Dim strOutput

    Select Case intForumID
    Case 1
        strOutput = "location to image"
    Case 2
        strOutput = "location to image"
    Case else
        strOutput = strTitleImage
    End Select

    HeaderImage = strOutput

End function

The part that is highlighted blue represents the forum ID of which you would like a custom header image for. You can find this out by looking at "FID=" in the address bar when you are in a forum.

If you go to the Web Wiz Forums Discussions forum on this site you can see that the ID is 6 as highlighted below.

The part highlighted in green is the location to your custom banner image. Just put the location of where you uploaded the image to in this part, make sure that it is within the Quotes.

Upload both of these files (header.asp and functions_common.asp) to their respective folders and enjoy custom header images.

Written By: S2H, 21st March 2008

Share This Page