inherit
252032
0
Apr 26, 2024 23:51:41 GMT -8
Retread
Tribbial Pursuit.
5,014
January 2018
retread
|
Post by Retread on Aug 1, 2019 10:48:24 GMT -8
Forum URL: guitarnuts2.proboards.com/What I would like to accomplish is to remove the mini-profile (and signature) from specific posts. The object is to create a few reference threads which can take advantage of the full width in the OP, yet have replies which have mini-profiles associated with them. This is the core of what I need: <style type="text/css"> .posts .post .left-panel { display: none; } .posts .post .foot .signature { display: none; } </style> But if I put that in a board header, it removes the mini-profile from ALL posts in ALL threads on that board. I need something that can be targeted. Is this possible?
|
|
#e61919
Support Staff
224482
0
1
May 3, 2024 17:46:43 GMT -8
Scott
23,341
August 2015
socalso
|
Post by Scott on Aug 1, 2019 10:54:16 GMT -8
Retread, what do you mean by specific posts? Like all mini-profiles from a specific thread(s)? Or certain posts within a thread? Or?
|
|
inherit
252032
0
Apr 26, 2024 23:51:41 GMT -8
Retread
Tribbial Pursuit.
5,014
January 2018
retread
|
Post by Retread on Aug 1, 2019 11:00:53 GMT -8
Scott, removing mini-profile from ONLY the first post of specific threads is the goal here. Either specifying the thread numbers and removing the mini-profile of only the first post of those threads would work. Or manually grabbing the post number of the OP of those threads and using that to specify which posts are affected would be just fine, too.
|
|
#e61919
Support Staff
224482
0
1
May 3, 2024 17:46:43 GMT -8
Scott
23,341
August 2015
socalso
|
Post by Scott on Aug 1, 2019 11:05:40 GMT -8
Retread, will there be other posts in those threads?
|
|
inherit
252032
0
Apr 26, 2024 23:51:41 GMT -8
Retread
Tribbial Pursuit.
5,014
January 2018
retread
|
Post by Retread on Aug 1, 2019 11:12:05 GMT -8
Yes indeed, Scott The end result would look something like this:
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Aug 1, 2019 11:17:48 GMT -8
Oh, that's easy then. You almost had the CSS:
<style> .posts .post.first .left-panel { display: none; } .posts .post.first .foot .signature { display: none; } </style>
|
|
#e61919
Support Staff
224482
0
1
May 3, 2024 17:46:43 GMT -8
Scott
23,341
August 2015
socalso
|
Post by Scott on Aug 1, 2019 11:20:37 GMT -8
elli , that will affect all the threads in a board and he wants to target specific threads. Retread , think you're looking for something more like this: <script> $(document).ready(function() { if (proboards.data('thread_id') == 0000) { $('.posts .post.first .left-panel').css('display', 'none'); $('.posts .post.first .foot .signature').css('display', 'none'); } }); </script> Replace the 0000 with the thread ID
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Aug 1, 2019 11:26:28 GMT -8
Hmm, I guess it depends how the threads are selected, then. In a certain category? Board? Or unique threads in any given area?
|
|
#e61919
Support Staff
224482
0
1
May 3, 2024 17:46:43 GMT -8
Scott
23,341
August 2015
socalso
|
Post by Scott on Aug 1, 2019 11:29:53 GMT -8
Hmm, I guess it depends how the threads are selected, then. In a certain category? Board? Or unique threads in any given area? He posted about putting the code in a board header, so I went with that.
|
|
inherit
252032
0
Apr 26, 2024 23:51:41 GMT -8
Retread
Tribbial Pursuit.
5,014
January 2018
retread
|
Post by Retread on Aug 1, 2019 11:43:02 GMT -8
Thanks, Scott That works fine for the first one. Hmm, I guess it depends how the threads are selected, then. In a certain category? Board? Or unique threads in any given area? I reckon there will be about 5 or 6 threads to begin with. Later, maybe more. Could be in other boards but for now, just the one. If I want to target three threads would it look something like this: <script> $(document).ready(function() { if (proboards.data('thread_id') == 123 && 862 && 1043) { $('.posts .post.first .left-panel').css('display', 'none'); $('.posts .post.first .foot .signature').css('display', 'none'); } }); </script>
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Aug 1, 2019 11:48:00 GMT -8
Close, you have to repeat the thing it's checking against, in this case proboards.data('thread_id'). Also, you'd use or (||) instead of and (&&) since all of those conditions can't be met at once:
<script> $(document).ready(function() { if (proboards.data('thread_id') === 123 || proboards.data('thread_id') === 862 || proboards.data('thread_id') === 1043) { $('.posts .post.first .left-panel').css('display', 'none'); $('.posts .post.first .foot .signature').css('display', 'none'); } }); </script>
|
|
inherit
252032
0
Apr 26, 2024 23:51:41 GMT -8
Retread
Tribbial Pursuit.
5,014
January 2018
retread
|
Post by Retread on Aug 1, 2019 12:02:18 GMT -8
Thanks, elliI can wrangle html and css to some degree but JS is really over my head. It sounds like && is 'and' and || is 'or' ? So I'd need to test three times, each with a different value, eh? Good to know. I would have thought testing once for one of three conditions would have been possible but I guess that's not how it works. Lots of rules I'll need to learn.
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Aug 1, 2019 12:08:06 GMT -8
It sounds like && is 'and' and || is 'or' ? So I'd need to test three times, each with a different value, eh? Good to know. I would have thought testing once for one of three conditions would have been possible but I guess that's not how it works. Lots of rules I'll need to learn. Correct. AND needs all of those conditions to be true, OR only needs one. Here are some more details.And yes, you end up repeating yourself a lot with these. If this got any larger, you'd probably want to handle it differently. But this is small, so nbd.
|
|
#e61919
Support Staff
224482
0
1
May 3, 2024 17:46:43 GMT -8
Scott
23,341
August 2015
socalso
|
Post by Scott on Aug 1, 2019 12:08:30 GMT -8
Retread , think in terms of true/false for conditions to be met. Let's say you want to apply this to threads A, B, and C. The script says is this thread A? if true, then.... same goes for B and C. This is why the "or" If the script said is this thread A AND B AND C, then obviously the answer if false since one thread can't be all 3 at once, and so the script condition doesn't apply. This is a very layman's explanation, but hopefully makes sense?
|
|
inherit
252032
0
Apr 26, 2024 23:51:41 GMT -8
Retread
Tribbial Pursuit.
5,014
January 2018
retread
|
Post by Retread on Aug 1, 2019 12:21:34 GMT -8
Thanks, Scott && elli. I appreciate all the extra info. I bookmarked javascript.info/first-steps and I reckon I should spend some time there, as I did with the html and css sections of W3Schools. We can tie a ribbon on this one now.
|
|