inherit
165142
0
Apr 28, 2024 3:44:58 GMT -8
channonite
Still Learning
200
March 2011
channonite
|
Post by channonite on Nov 21, 2012 2:14:26 GMT -8
I have a clickable banner set in my global header on my V4 forum using CrAzY_J's code (below). I can't find any way of getting it to work on my V5 forum and wonder if this is something for a plugin, or if anyone can at least point me in the right direction.
I use it to link my forum to my website.
<script type='text/javascript'> (function() { /* Clickable banner created by CrAzY_J Open Source*/
var Main = document.body.getElementsByTagName('font')[0]; var Source = Main.firstChild.src; Main.removeChild( Main.firstChild ); var Link = document.createElement('a'); var Image = document.createElement('img'); Link.href = 'Link goes here'; Image.src = Source; Image.border = 0; Link.appendChild( Image ); Main.appendChild( Link ); })(); </script>
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Nov 21, 2012 2:20:15 GMT -8
No need for a code, you can modify the template for this.
Goto...
Admin Home > Themes > Layout Templates
Click on "Forum Wrapper".
Look at line 18...
<a id="logo" href="/">$[forum.title]</a>
|
|
inherit
165142
0
Apr 28, 2024 3:44:58 GMT -8
channonite
Still Learning
200
March 2011
channonite
|
Post by channonite on Nov 21, 2012 12:39:49 GMT -8
Simple!
Thanks.
|
|
inherit
99060
0
May 28, 2024 11:56:49 GMT -8
JJ
1,660
February 2007
justjj
|
Post by JJ on Jan 16, 2013 17:09:45 GMT -8
Sorry to bump this after almost two months, but I use the same code. I do not understand the response by Peter. I found that line 18, so? Am I supposed to insert that line of code?
|
|
blueshead
Full Member
More hot peppers please!
Posts: 928
inherit
185994
0
Jun 17, 2018 15:20:52 GMT -8
blueshead
More hot peppers please!
928
November 2012
mrblueshead
|
Post by blueshead on Jan 18, 2013 4:36:23 GMT -8
Sorry to bump this after almost two months, but I use the same code. I do not understand the response by Peter. I found that line 18, so? Am I supposed to insert that line of code? The code should already be there.. Where "/" is in the code.. replace the slash with url of your choice..
|
|
inherit
99060
0
May 28, 2024 11:56:49 GMT -8
JJ
1,660
February 2007
justjj
|
Post by JJ on Jan 18, 2013 7:15:42 GMT -8
That's great, thank you Blueshead.
|
|
inherit
187722
0
Jul 9, 2013 22:18:11 GMT -8
blackwaterops
13
December 2012
blackwaterops
|
Post by blackwaterops on Jan 18, 2013 7:53:24 GMT -8
I'm using a custom banner and my code looks different. i still would like the clickable banner feature.. any help is appreciated, thanks.
Here is what I have between line 14 and 20 of my "wrapper"
<div id="wrapper"> <header> <div id="banner-container" role="banner"> <h2 id="banner"> [edit: I tried to add the href = "/" with the url to this line with no success] $[forum.title] </h2> </div>
|
|
inherit
178825
0
Nov 27, 2024 10:56:08 GMT -8
spiceelicious
Not a blond bimbo
1,076
April 2012
spiceelicious
|
Post by spiceelicious on Jan 21, 2013 17:53:48 GMT -8
Didn't work for me either.
|
|
inherit
165142
0
Apr 28, 2024 3:44:58 GMT -8
channonite
Still Learning
200
March 2011
channonite
|
Post by channonite on Jan 30, 2013 14:17:20 GMT -8
Strangely this is not working now, either on my newly converted board, nor the BetaZone one either, although the latter was. I don't know enough about code to spot what the problem is. Any ideas?
|
|
inherit
99060
0
May 28, 2024 11:56:49 GMT -8
JJ
1,660
February 2007
justjj
|
Post by JJ on Jan 30, 2013 14:24:01 GMT -8
It didn't work for me either.
|
|
inherit
178825
0
Nov 27, 2024 10:56:08 GMT -8
spiceelicious
Not a blond bimbo
1,076
April 2012
spiceelicious
|
Post by spiceelicious on Feb 1, 2013 7:54:43 GMT -8
No need for a code, you can modify the template for this. Goto... Admin Home > Themes > Layout Templates Click on "Forum Wrapper". Look at line 18... <a id="logo" href="/">$[forum.title]</a> I don't have that so now what?
|
|
inherit
178825
0
Nov 27, 2024 10:56:08 GMT -8
spiceelicious
Not a blond bimbo
1,076
April 2012
spiceelicious
|
Post by spiceelicious on Feb 1, 2013 7:55:20 GMT -8
No need for a code, you can modify the template for this. Goto... Admin Home > Themes > Layout Templates Click on "Forum Wrapper". Look at line 18... <a id="logo" href="/">$[forum.title]</a> I don't have that so now what?
|
|
inherit
126477
0
Apr 21, 2023 15:18:52 GMT -8
Shrike
Re-appeared briefly after 6 years only to no doubt disappear again.
1,569
June 2008
shrike
|
Post by Shrike on Feb 1, 2013 8:53:14 GMT -8
It's been changed so that the link to your forum home page is now included in the $[forum.title] variable. Unless you're wanting it to link to somewhere other than your home page, you shouldn't need to do anything because they've now made the banner clickable by default. If you do want it to link elsewhere, we just need to add back in the <a> tag that was there before and then change the variable so it is just giving us the name of the forum (and not the <a> tag that is now included).
Find $[forum.title] around line 18 and replace it with this, changing the value of the href to the link you want:
<a id="logo" href="/">$[forum.name]</a>
|
|
inherit
165142
0
Apr 28, 2024 3:44:58 GMT -8
channonite
Still Learning
200
March 2011
channonite
|
Post by channonite on Feb 1, 2013 9:12:14 GMT -8
This is what I have in rows 18,19,20 (I have a shortcut icon in row 7) and it has no effect at all, now.
<h2 id="banner"> <a id="logo" href="http://www.itsbeautifuloutside.co.uk">$[forum.title]</a> </h2>
It was working to begin with, but it was only just before I converted the forum this week that I noticed that it didn't do anything anymore.
|
|
inherit
178825
0
Nov 27, 2024 10:56:08 GMT -8
spiceelicious
Not a blond bimbo
1,076
April 2012
spiceelicious
|
Post by spiceelicious on Feb 1, 2013 9:56:19 GMT -8
It's been changed so that the link to your forum home page is now included in the $[forum.title] variable. Unless you're wanting it to link to somewhere other than your home page, you shouldn't need to do anything because they've now made the banner clickable by default. If you do want it to link elsewhere, we just need to add back in the <a> tag that was there before and then change the variable so it is just giving us the name of the forum (and not the <a> tag that is now included). Find $[forum.title] around line 18 and replace it with this, changing the value of the href to the link you want: <a id="logo" href="/">$[forum.name]</a> I just checked and my forum banner is clickable but only when you hover over the beginning of the name of the forum. Shouldn't you be able to click anywhere on the name?
|
|