Print Page | Close Window

Different banner for each forum

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=25084
Printed Date: 03 April 2026 at 8:24pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Different banner for each forum
Posted By: charades
Subject: Different banner for each forum
Date Posted: 02 January 2008 at 1:57pm
Hi,
 
I am wondering is it possible to have different banner image for different banner if so I appreciate if anyone can help me in directing me how to modify the code.
 
 



Replies:
Posted By: Scotty32
Date Posted: 03 January 2008 at 12:50pm
theres different ways it can be done.

you could add a field to the database and store the image location.

or you could have a function that does a different link.


at the top of the /forum/includes/header.asp file add

<% Call HeaderImage(intForumID) %>


then add to the functions_common.asp file:


Private Function HeaderImage(intForumID)
    select intForumID
    case 1
        strTitleImage = "location to image"
    case 2
        strTitleImage = "location to image"
    end select
end function


then just add and edit the pages below for each forum. 


    case 2
        strTitleImage = "location to image"


the number is the ID of the forum.
you can find this out by looking at the FID= in links, for example:

Quote http://forums.webwiz.net/forum_topics.asp?FID=24


This would be 24.


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: hotice08
Date Posted: 11 March 2008 at 1:19pm
I tried doing the same. But Didn't had any luck.
 
I am getting this on top of the page.
 

.Cookies(strCookiePrefix & "pID").Path = strCookiePath End Sub %>

Here are the changes I did. Please correct me where I went wrong.
 
In Header.asp File change which I did is in bold letters
 
I placed the call for HeaderImage in header.asp in between <body> and <table..... as shown here.
 
 
<body>
<% Call HeaderImage(intForumID) %>
<table class="basicTable" cellspacing="0" cellpadding="3" align="center">.
------------------------------------------------- 
and in functions_common.asp I added 
 
Private Function HeaderImage(intForumID)
 Dim strTitleImage   
 Select Case intForumID   
  Case 1
         strTitleImage = "/forum_images/abc.jpg"   
  Case Else     
   strTitleImage = "/forum_images/123.jpg"   
 End Select
End Function
 
I am not a asp Programmer and I have no clue on how these things work, So please don't mistake me and help me in resolving this. Any help is greatly appreciated.
 
Thanks 


Posted By: hotice08
Date Posted: 17 March 2008 at 1:31pm
I really need someone's help in directing me how I can achieve this.
 
I can save it in the database as an image or put them in one folder.
But in either of the scenarios I appreciate if anyone can help me in where to modify the code so that I can can see different banner for different forum.
 
 
Please help me
 


Posted By: billd3
Date Posted: 17 March 2008 at 2:50pm
I, too, would like to be able to have a different image over each "forum"
For engines, a nice 390 V8 image would be great, for the transmission section, perhaps a T5 transmission image, that sort of thing.
What about somewhere doing a "if xxx then" sort of thing?
If forumid=24 then xxxxxxx
else
if forumid=19 then xxxxx

and so on?

How easy a mod would this be?
I've got someone who could do some VERY nice flash-headers as used in
http://theamcpages.com

This would be for the forum at http://theamcforum.com/forum



-------------
BillD
http://theamcpages.com
http://theamcforum.com


Posted By: Scotty32
Date Posted: 17 March 2008 at 6:07pm



Sorry, looking at this again, it maybe better to do:




at the top of the /forum/includes/header.asp file add

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


then add to the functions_common.asp file:


Private Function HeaderImage(intForumID,strTitleImage)
    Dim strOutput

    select intForumID
    case 1
        strOutput = "location to image"
    case 2
        strOutput = "location to image"
    case else
       strOutput = strTitleImage
    end select

    HeaderImage = strOutput
end function


This would be an easy mod to build, you just do the following


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: hotice08
Date Posted: 17 March 2008 at 6:38pm
Thanks Scotty I will try this evening. Many thanks for prompt response


Posted By: billd3
Date Posted: 18 March 2008 at 1:02pm
This ability would be worth buying someone a 6-pack of a good German beer, or if you are British, tea. 
I look forward to seeing what you come up with. You folks are just plain talented.

-------------
BillD
http://theamcpages.com
http://theamcforum.com


Posted By: Scotty32
Date Posted: 18 March 2008 at 8:54pm
If the above doesnt work, or your unable to add it, let me know and i'll add it to the relevent files and release it for download.

-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: hotice08
Date Posted: 18 March 2008 at 8:57pm

Thanks Scotty it worked.

 

Now I have a small issue and that is every time the image is being clicked it is going to the home page probbaly something to do with code in Header.asp



Posted By: billd3
Date Posted: 19 March 2008 at 1:56am
Do you have as many "case" as you have forums you want different images for?
If you don't want to change the header image for a section, you don't include that in the case?

So you could have like 20, like we have 29, but would probably only do 20.
Is that it: case 18 would match forum ID 18?


-------------
BillD
http://theamcpages.com
http://theamcforum.com


Posted By: billd3
Date Posted: 19 March 2008 at 2:24am

Technical Information (for support personnel)

  • Error Type:
    Microsoft VBScript compilation (0x800A03FD)
    Expected 'Case'
    /forum/functions/functions_common.asp, line 46, column 7
  • Browser Type:
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
  • Page:
    GET /forum/forum_topics.asp


  • -------------
    BillD
    http://theamcpages.com
    http://theamcforum.com


    Posted By: billd3
    Date Posted: 19 March 2008 at 2:39am
    OK, got it. I took your quote here and found a missing word:
    >>
     select case intForumID
        case 1<<



    -------------
    BillD
    http://theamcpages.com
    http://theamcforum.com


    Posted By: Scotty32
    Date Posted: 19 March 2008 at 11:08am
    Originally posted by billd3 billd3 wrote:

    Do you have as many "case" as you have forums you want different images for?
    If you don't want to change the header image for a section, you don't include that in the case?

    So you could have like 20, like we have 29, but would probably only do 20.
    Is that it: case 18 would match forum ID 18?


    Yes, the case # should match your forum ID #

    so if you had 10 forums but wanted images for 3 which was 1, 5 and 7 then you would do:

    case 1
     . . .
    case 5
     . . .
    case 7
     . . .



    -------------
    S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

    For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


    Posted By: billd3
    Date Posted: 19 March 2008 at 12:25pm
    Got it. It works, it's slick!
    Thanks.

    Wow, if we want a change, simply add a bit for that forum number. If not, it will use the else bit.
    Perfect.

    Now to come up with more header images!


    -------------
    BillD
    http://theamcpages.com
    http://theamcforum.com


    Posted By: hotice08
    Date Posted: 21 March 2008 at 1:14pm
    Many Many Thanks Scotty ...It worked


    Posted By: Scotty32
    Date Posted: 21 March 2008 at 4:14pm
    For anyone else who might be getting confused by the change of information in this thread, I've written a tutorial on my site on how to the http://www.s2h.co.uk/wwf/tips/look/change-banner-for-forums.asp - Change Banner for Forums.

    -------------
    S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

    For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .



    Print Page | Close Window

    Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
    Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net