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.

Images for Topic areas

View previous topic View next topic Go down

Solved Images for Topic areas

Post by dad2paisley on September 16th 2015, 9:06 pm

Can we add an image to topic areas? For example, Introduction topic and I have an image for that page only. Is this something that can be done and if so, it will not show your main forum image on that page. Not have the image next to the word Introduction but on that page where the logo is.


Last edited by dad2paisley on September 28th 2015, 7:13 pm; edited 2 times in total

dad2paisley
Forumember

Posts : 128
Reputation : 5
Language : english

http://meowsandpurrs.forumotion.com/

Back to top Go down

Solved Re: Images for Topic areas

Post by dad2paisley on September 17th 2015, 9:12 pm

Any ideas?

dad2paisley
Forumember

Posts : 128
Reputation : 5
Language : english

http://meowsandpurrs.forumotion.com/

Back to top Go down

Solved Re: Images for Topic areas

Post by Ange Tuteur on September 17th 2015, 9:21 pm

Hi @dad2paisley,

If I understand correctly, you want to change the main banner image with another image, while you're viewing a topic. Correct ?

Let me know Smile

Ange Tuteur
Forumaster

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

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Images for Topic areas

Post by dad2paisley on September 17th 2015, 9:43 pm

yes. like on my old forum

Ex. weather page. So when member click on the weather topic the icon for weather is at the top of that page and not the main forum logo.

http://thehangoutzone.yuku.com/forums/143/The-Weather#.VfsXSKGZ9JM

dad2paisley
Forumember

Posts : 128
Reputation : 5
Language : english

http://meowsandpurrs.forumotion.com/

Back to top Go down

Solved Re: Images for Topic areas

Post by Ange Tuteur on September 17th 2015, 10:11 pm

Try the following. Smile

Go to Modules > JavaScript codes management > Create a new script

Title : Section banner
Placement : In the topics AND In the sub-forums
Paste the following code :
Code:
$(function() {
  var forums = {
    '5' : 'http://i38.servimg.com/u/f38/19/06/98/92/roa10.png',
    '4' : 'http://r36.imgfast.net/users/3614/21/92/75/avatars/1-12.jpg'
  },

  i,
  f = $('td.nav:first a:last').attr('href').replace(/\/f(\d+).*/, '$1'),
  logo = document.getElementById('i_logo');

  if (logo) {
    for (i in forums) {
      if (i == f) {
        logo.src = forums[i];
        break;
      }
    }
  }
});

Modifications :

To assign images to forums, you need to modify this part :
Code:
  var forums = {
    '5' : 'http://i38.servimg.com/u/f38/19/06/98/92/roa10.png',
    '4' : 'http://r36.imgfast.net/users/3614/21/92/75/avatars/1-12.jpg'
  },

To the left of the colon is the id of the forum ( '5' intros for example ) and to the right of the colon is the banner image. ( my avatar for example ) ; in short, forum_id:banner_image pairs.

forum_id : The forum id can be found via the address bar while viewing the forum. Example :


banner_image : The URL of the image you want to display for this forum.

Remember to separate each pair by a comma. Like so :
'forum_id' : 'banner_image',
'forum_id' : 'banner_image',
'forum_id' : 'banner_image',
'forum_id' : 'banner_image'

Except for the last pair.

If any questions let me know. Smile

Ange Tuteur
Forumaster

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

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Images for Topic areas

Post by dad2paisley on September 17th 2015, 10:26 pm

Thanks I will give a go. Very Happy and let you know.

dad2paisley
Forumember

Posts : 128
Reputation : 5
Language : english

http://meowsandpurrs.forumotion.com/

Back to top Go down

Solved Re: Images for Topic areas

Post by dad2paisley on September 17th 2015, 10:42 pm

It did work but when I clicked on Begin Here Zone my avatar came up. I guess for that area the main forum logo would go there.
If you click on Intro the image works.
http://hangoutzone.forumotion.com/f4-begin-here-zone

And I also lost the circle avatar too. Strange.


Last edited by dad2paisley on September 17th 2015, 10:54 pm; edited 1 time in total

dad2paisley
Forumember

Posts : 128
Reputation : 5
Language : english

http://meowsandpurrs.forumotion.com/

Back to top Go down

Solved Re: Images for Topic areas

Post by Ange Tuteur on September 17th 2015, 10:52 pm

Oh yes ! I had forum '4' in the script as an example. This line ^^ :
Code:
'4' : 'http://r36.imgfast.net/users/3614/21/92/75/avatars/1-12.jpg'

You can replace the image link or remove that pair if you want. Smile

Ange Tuteur
Forumaster

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

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Images for Topic areas

Post by dad2paisley on September 17th 2015, 11:22 pm

I lost the circles. I have the code in and checked yes to have it show.

dad2paisley
Forumember

Posts : 128
Reputation : 5
Language : english

http://meowsandpurrs.forumotion.com/

Back to top Go down

Solved Re: Images for Topic areas

Post by APE on September 29th 2015, 1:47 am

@dad2paisley is this problem now solved ?




APE
Manager
Manager

Male Posts : 8626
Reputation : 756
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Images for Topic areas

Post by dad2paisley on September 29th 2015, 4:50 pm

yes

dad2paisley
Forumember

Posts : 128
Reputation : 5
Language : english

http://meowsandpurrs.forumotion.com/

Back to top Go down

Solved Re: Images for Topic areas

Post by Ange Tuteur on September 29th 2015, 5:31 pm

Topic archived

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