inherit
180580
0
Oct 13, 2024 16:46:13 GMT -8
My Display Name
335
June 2012
jsher1994
|
Post by My Display Name on Jan 4, 2013 17:57:10 GMT -8
Hello, I have this piece of code for something I made for v4 if(pb_username !="Guest"){ | | document.getElementById("guest1").style.display="none" | | document.getElementById("guest2").style.display="none" | |
| |
| | }else{ | | document.getElementById("member1").style.display="none" | | document.getElementById("messages").style.display="none" | | } | |
| | if (!pb_username.match(staff)){ | | document.getElementById('admin').style.display="none" | |
| | } |
but anyways, I'm not sure how I would make that v5 compatible, I was hoping in the plugins system there was an area where you could have it check if the user was logged in then have it display a certain code but couldn't find anything.
I'm not too sure how I would convert this to v5 as I don't know much about jQuery, or v5 at that. I was thinking like proboards.data is_current_user_guest or something like that, but not too sure.
any help would be appreciated :).
(and this post is completely ugly because the visual editor went bonkers on me and decided to put all this into a code tag and won't remove it)
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jan 5, 2013 4:43:49 GMT -8
Given the info you've provided this looks to be accomplish-able through the templating system provided the part you did not provide (i.e. the HTML markup bearing the id="guest1", id="member1", etc.) is not somehow dynamically generated by another code. You'll need to provide that markup so a set of conditional {if} sections can be constructed to show the various parts as well as the location/page you want this to appear
|
|
inherit
180580
0
Oct 13, 2024 16:46:13 GMT -8
My Display Name
335
June 2012
jsher1994
|
Post by My Display Name on Jan 5, 2013 5:45:51 GMT -8
Given the info you've provided this looks to be accomplish-able through the templating system provided the part you did not provide (i.e. the HTML markup bearing the id="guest1", id="member1", etc.) is not somehow dynamically generated by another code. You'll need to provide that markup so a set of conditional {if} sections can be constructed to show the various parts as well as the location/page you want this to appear Ah, totally forgot about the templating system and that it had if statements . I got it. Thanks for the help Chris
|
|