JD
Full Member
Posts: 771
inherit
180643
0
Sept 27, 2024 15:01:41 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Feb 11, 2013 5:08:06 GMT -8
Original Forum URL: diegesis.boards.net/Test Forum (in v.5) URL: diegesistest.freeforums.net/Hey there! I'm a little uncertain of where to put some coding on the new v.5 admin panels. I want to put something on the site that I would like to be global but NOT on the main page. On v.4 I've used this code - <script>if(pb_action=="home")document.write('<xmp style="display:none;"\>');</script>
STUFF IN HERE
[div]<script>document.write('<xmp\>');</script>[/div]</xmp> around anything I wanted to not appear on the main page. However, unlike it's counterpart code that makes my Main h/f info appear ONLY on the main page, this one is not working. Could someone either tell me how to work the above code on the new v.5 or tell me where I can post the code to get it to have the same effect. I ask where because there are a lot of different possibilities in the new one - headers and footers under plug ins, headers and footers in general etc etc. so I don't know whether or not there's one particular location that would already do what the code above does, if you see what I mean. I'm going to stop talking now because I feel like I'm confusing myself, let alone anyone else lol.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,322
January 2004
todge
|
Post by Todge on Feb 11, 2013 9:43:11 GMT -8
Try this instead..
<script>if(proboards.data.route == "home")document.write('<xmp style="display:none;"\>');</script>
STUFF IN HERE
[div]<script>document.write('<xmp\>');</script>[/div]</xmp>
|
|
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 11, 2013 9:54:25 GMT -8
Try this instead.. <script>if(document.title.match(/Home \|/))document.write('<xmp style="display:none;"\>');</script>
STUFF IN HERE
[div]<script>document.write('<xmp\>');</script>[/div]</xmp> Just curious, why wouldn't you check for proboards.data.route == "home"? Checking for "Home |" in document.title would assume that people haven't changed the divider in the forum wrapper template—granted, I don't think that would be too many people, but still.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,322
January 2004
todge
|
Post by Todge on Feb 11, 2013 10:05:55 GMT -8
The main reason being, that I never knew about proboards.data.route..
I'll edit it right now. Thank you.
|
|
JD
Full Member
Posts: 771
inherit
180643
0
Sept 27, 2024 15:01:41 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Feb 11, 2013 10:41:03 GMT -8
Thanks guys but that didn't work. I've left the code in so you can see what it's done.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,322
January 2004
todge
|
Post by Todge on Feb 11, 2013 16:49:22 GMT -8
It seems 'proboards.data.route' is not working.
Here's what I use..
<div id="mainpage" style="display: none;">
Put your content here
</div> <script type="text/javascript"> <!-- if(document.title.match(/Home \|/)){ document.getElementById('mainpage').style.display = '';} // --> </script> See if that will work for you.
|
|
JD
Full Member
Posts: 771
inherit
180643
0
Sept 27, 2024 15:01:41 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Feb 11, 2013 16:52:43 GMT -8
Hmmm nope. I still got nothing. Should the javascript of that code be in the JS plugin component? Is it okay for it to be in the headers/footers? Have I put it in the wrong place?
|
|
JD
Full Member
Posts: 771
inherit
180643
0
Sept 27, 2024 15:01:41 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Feb 13, 2013 10:46:19 GMT -8
bump?
|
|
inherit
170346
0
Mar 1, 2016 12:53:37 GMT -8
Shorty
Yeah, I'm that cool. Lol! No I'm not.
3,018
August 2011
shortyverrett94
|
Post by Shorty on Feb 13, 2013 20:24:06 GMT -8
Try this. <script>if(proboards.data('route').name == "home")document.write('<xmp style="display:none;"\>');</script> STUFF IN HERE <script>document.write('<xmp\>');</script></xmp> It seems 'proboards.data.route' is not working. Here's what I use.. It was the way you had it. it should be proboards.data('route').name
|
|
JD
Full Member
Posts: 771
inherit
180643
0
Sept 27, 2024 15:01:41 GMT -8
JD
771
June 2012
obsidian92
|
Post by JD on Feb 14, 2013 5:47:31 GMT -8
Perfect! Thank you so so much shorty Now I've just got to work everything else out. :S Lol.
|
|
inherit
170346
0
Mar 1, 2016 12:53:37 GMT -8
Shorty
Yeah, I'm that cool. Lol! No I'm not.
3,018
August 2011
shortyverrett94
|
Post by Shorty on Feb 14, 2013 6:30:21 GMT -8
No probs.
|
|