Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

HTML file include with <%forum_id%> ?

Quote Reply
HTML file include with <%forum_id%> ?
Hi All,

I want a different banner (linked to outside URL) in each forum.

In another thread - Alex said:


Currently, we don't have different template sets per forum, but you can do: <img src="/images/banners/header<%forum_id%>.gif">


It works with the gif but of course, that's all it is - a gif. Is it possible to do this with an HTML file (which includes the gif with link info)? I've tried for hours now - using various codes, searching through posts, etc. to no avail. Frown Also, - I can fool around with a little code but I'm not a programmer. Is there any hope for a novice?

Would appreciate any suggestions. Thanks so much.

Nadine
Quote Reply
Re: [Westiegirl] HTML file include with <%forum_id%> ? In reply to
I don't know if it would work, but you could maybe do <%include $forum_id%> and then have a file named like 1 for forum 1 in your template directory.


Realiiity.com Forums
Quote Reply
Re: [Westiegirl] HTML file include with <%forum_id%> ? In reply to
I don't know if this would work, but couldn't you put the banner html code for each banner into it's own entry in the global.txt file, then use whatever codes for each one you create whereever you want the banner...
Quote Reply
Re: [ellipsiiis] HTML file include with <%forum_id%> ? In reply to
In Reply To:
I don't know if it would work, but you could maybe do <%include $forum_id%> and then have a file named like 1 for forum 1 in your template directory.


Hi ellipisiiis,

Thanks so much for your help. I tried it a few ways - not know whether to put an extension on it or not since you didn't include it in your example. For forum #25 - I put a file named 25 in the default directory. This is the error message I got once the page displayed.

Error: Can't load included file: '/usr/local/www/vhosts/mydomain.com/cgi-bin/forum/admin/templates/default/$forum_id'. Reason: No such file or directory

Do you have any thoughts on how to work around this? I just know it's something simple and feel like I'm right on the edge of making it work. Any help is most appreciated!

Nadine
Quote Reply
Re: [Westiegirl] HTML file include with <%forum_id%> ? In reply to
Okay, then that way probably won't work, because it's not trying to use it as a variable, sorry! Hopefully someone else is more on the ball than I am :)


Realiiity.com Forums
Quote Reply
Re: [JerryP] HTML file include with <%forum_id%> ? In reply to
In Reply To:
I don't know if this would work, but couldn't you put the banner html code for each banner into it's own entry in the global.txt file, then use whatever codes for each one you create whereever you want the banner...


Hi Jerry,

Thanks for your reply. Great idea! I just haven't the foggiest as to how to code that into my include_header template to pull up the corresponding banner file for each forum.

Thanks again.

Nadine
Quote Reply
Re: [Westiegirl] HTML file include with <%forum_id%> ? In reply to
<%if forum_id = 1%><%global_tag_1%><%elsif forum_id = 2%><%global_tag_2%><%else%><%global_tag_fornonforumpages%><%endif%>


Realiiity.com Forums

Last edited by:

ellipsiiis: Mar 29, 2002, 8:13 PM
Quote Reply
Re: [ellipsiiis] HTML file include with <%forum_id%> ? In reply to
In Reply To:
<%if forum_id = 1%><%global_tag_1%><%elsif forum_id = 2%><%global_tag_2%><%else%><%global_tag_fornonforumpages%><%endif%>


Ahh... very nice. I shall give this a try in the morning. Thank you! Smile

Nadine
Quote Reply
Re: [ellipsiiis] HTML file include with <%forum_id%> ? In reply to
In Reply To:
<%if forum_id = 1%><%global_tag_1%><%elsif forum_id = 2%><%global_tag_2%><%else%><%global_tag_fornonforumpages%><%endif%>


Worked like a charm! Smile Thank you, thank you, thank you! Smile

Nadine