XF 1.4 CSS and Node Id Help needed

pfernand

Member
Can somebody tell me how I can place a banner image on a specific forum or category in the main forum view using CSS and node id? My forum is --> theplugyourconnect.com and below is an image of what I am trying to accomplish. A million thanks for your help!
forum-view.webp
 
Example:

Rich (BB code):
.node.node_2 .nodeTitle a:after
{
    content: url('path/to/image.gif');
}
Thank you Jake.
1. How do I make my banner clickable (i.e. direct to ad website)?
2. Do I add this code to the EXTRA.CSS template or is there a more appropriate place to add the css?
 
Last edited:
Thank you Jake.
1. How do I make my banner clickable (i.e. direct to ad website)?
2. Do I add this code to the EXTRA.CSS template or is there a more appropriate place to add the css?

1) That can't be done with CSS. You might consider editing the HTML template directly:

Admin CP -> Appearance -> Templates -> node_forum_level_2

2) Yes, custom CSS like this should go in EXTRA.css
 
  • Like
Reactions: IPF
1) That can't be done with CSS. You might consider editing the HTML template directly:

Admin CP -> Appearance -> Templates -> node_forum_level_2

How would I edit the node_forum_level_2 template? I would only have banners on SOME of the forums and each banner would be directed to a DIFFERENT website when clicked. Is this doable? How?

A million thanks for your help!
 
Is the <div class="nodeText"> section in the node_forum_level_2 template where I need to modify in order to make a forum banner clickable? Would this be a series of if conditions based on node id? If so, can you PLEAE PLEASE help me with the syntax. I'm very new to XF and I'm not sure how to code my changes.

I'd like to display maybe 2 or 3 banners on different forums. I want visitors to be able to click on the banner and be taken to the respective sponsor's website via new tab. My site is theplugyourconnect.com.

I would be so very grateful for you help. Thank you!
 
Thank you, Jake. My banner is visible and clickable. However, is it possible to display the banner next to the forum title instead of below it (see snapshot below).
forum-view.webp
 
Thank you, Jake. My banner is visible and clickable. However, is it possible to display the banner next to the forum title instead of below it (see snapshot below).
View attachment 100455

Is it possible to display my forum topic ad in the same line as the topic title (see attachment)? I tried adding the following css to my EXTRA.css but it didn't have any impact. I'd appreciate any help. Thank you.

.node.node_27 .nodeTitle a:after
{
content: url('styles/*******/Boron/xenforo/ads/your-ad-here-350x35.png');
float: right;
width: 400px;
}
 
Top Bottom