The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Header Image css?

View previous topic View next topic Go down

In progress Header Image css?

Post by Wealh on November 9th 2015, 6:37 pm

@Ange Tuteur wrote:If it's for all forum pages you can do this :
Code:
$(function() {
  if (/\/f\d+/.test(window.location.href)) {
    document.body.className += ' forum-page';
  }
});

If it's for that page only, you can do this instead :
Code:
$(function() {
  if (/\/f2(?:-|p\d+-)websites/.test(window.location.href)) {
    document.body.className += ' forum-page-websites';
  }
});
The number "2" is the forum ID.

I want to edit the header image on a specific page, how?

Wealh
Forumember

Posts : 69
Reputation : 6
Language : English

http://boredom.iftopic.com/

Back to top Go down

In progress Re: Header Image css?

Post by Ange Tuteur on November 9th 2015, 6:43 pm

Which specific page were you thinking ? Also, which forum version too ? Almost all versions have a unique selector for the banner logo.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Header Image css?

Post by Wealh on November 9th 2015, 8:39 pm

@Ange Tuteur wrote:Which specific page were you thinking ? Also, which forum version too ? Almost all versions have a unique selector for the banner logo.

Punbb.

http://boredom.iftopic.com/

Wealh
Forumember

Posts : 69
Reputation : 6
Language : English

http://boredom.iftopic.com/

Back to top Go down

In progress Re: Header Image css?

Post by Ange Tuteur on November 9th 2015, 8:50 pm

Using this script as an example :
Code:
$(function() {
  if (/\/f2(-|p\d+-)websites/.test(window.location.href)) {
   
  }
});

We can modify the logo element source inside the condition, like this :
Code:
$(function() {
  if (/\/f2(-|p\d+-)websites/.test(window.location.href)) {
    document.getElementById('pun-logo').firstChild.src = '/img_src.png';
  }
});

Just replace
Code:
/img_src.png
with the URL to your image. Wink

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum