SafeInSanity
Junior Member
Falling in love with Proboards again!
Posts: 424
inherit
23917
0
Feb 27, 2020 11:29:13 GMT -8
SafeInSanity
Falling in love with Proboards again!
424
May 2004
wiki
|
Post by SafeInSanity on Nov 8, 2018 5:53:59 GMT -8
Is there any way to change the text of the "Reply" button to something different only when members are logged out?
For example, instead of having the top and bottom Reply buttons in a post say "Reply" when viewing as a guest I want them to say "Login or Register to Leave a Reply"
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Nov 8, 2018 9:57:36 GMT -8
<script>
(!pb.data("user").is_logged_in)? $(() => $("a.reply-button.guest-prompt").text("Login or Register to Leave a Reply")) : null;
</script>
|
|
SafeInSanity
Junior Member
Falling in love with Proboards again!
Posts: 424
inherit
23917
0
Feb 27, 2020 11:29:13 GMT -8
SafeInSanity
Falling in love with Proboards again!
424
May 2004
wiki
|
Post by SafeInSanity on Nov 8, 2018 17:01:00 GMT -8
<script>
(!pb.data("user").is_logged_in)? $(() => $("a.reply-button.guest-prompt").text("Login or Register to Leave a Reply")) : null;
</script> Thanks! but where should I put this code exactly?
|
|
inherit
140147
0
Apr 27, 2024 8:38:26 GMT -8
Nscalerr 🐺
Throw me to the wolves and I'll return leading the pack!
3,007
May 2009
nscalerr
|
Post by Nscalerr 🐺 on Nov 8, 2018 20:20:11 GMT -8
Hi SafeInSanityThe Global Header would the place to put it. Hi PeterTested this on my forum and nothing changed on the reply button! I have it in my Global Header. Link to my forum is in my sig.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,780
January 2015
msg
|
Post by Lynx on Nov 8, 2018 20:45:34 GMT -8
Hi SafeInSanityThe Global Header would the place to put it. Hi PeterTested this on my forum and nothing changed on the reply button! I have it in my Global Header. Link to my forum is in my sig. Looking at your forum, your Reply button is not in the default place (modified theme?) - hence why Peter's code doesn't work for you. Try this instead: <script>
(!pb.data("user").is_logged_in)? $(() => $('.content-head > .controls > a.button').text('Login or Register to leave a reply')) : null;
</script>
|
|
inherit
140147
0
Apr 27, 2024 8:38:26 GMT -8
Nscalerr 🐺
Throw me to the wolves and I'll return leading the pack!
3,007
May 2009
nscalerr
|
Post by Nscalerr 🐺 on Nov 8, 2018 21:25:57 GMT -8
The theme is modified Lynx, your script works fine.
|
|
SafeInSanity
Junior Member
Falling in love with Proboards again!
Posts: 424
inherit
23917
0
Feb 27, 2020 11:29:13 GMT -8
SafeInSanity
Falling in love with Proboards again!
424
May 2004
wiki
|
Post by SafeInSanity on Nov 10, 2018 16:54:03 GMT -8
Hi SafeInSanity The Global Header would the place to put it. Cool ... thanks! Working good.
|
|