Attention:

Support Rules and Guidelines
Before you post your support topic, please remember to:
  • Read the support forum rules.
  • Check the wiki and use search to see if your problem can be answered there first.
  • Link your board please, and make sure that the problem on your board is visible to guests or provide a test account.
  • Do not post Board Wrappers and CSS unless requested. With a board link, this is not necessary.
  • Be as descriptive as you can and use as many details as possible when describing your problem.
  • Please briefly mark any links to forums that may not be work-safe.
This will help ensure your support issue will be attended to in a quick and efficient manner.

  ClosedNew TopicNew Poll

 Hiding link on mobile [SOLVED]
#
Hello, I was wondering if there was a code that would allow me to hide a specific link when a person is on the mobile version of my site? We have profile fields that are hidden in the usercpu with the help of a code, but the code doesn't work on mobile, and members are able to edit those profile fields. Instead of trying to come up with a complicated workaround, I'd rather just hide the usercpu while on mobile.

Thanks!

Oh, and this is the code we're currently using to hide certain profile fields. This way members can edit them once (during registration) and can't edit them again.

CODE
<script>
if('<!-- |g_id| -->' == '1' || '<!-- |g_id| -->' == '13' || '<!-- |g_id| -->' == '12' || '<!-- |g_id| -->' == '3' || '<!-- |g_id| -->' == '14' || '<!-- |g_id| -->' == '11' || '<!-- |g_id| -->' == '5' || '<!-- |g_id| -->' == '7' || '<!-- |g_id| -->' == '10' || '<!-- |g_id| -->' == '6' || '<!-- |g_id| -->' == '2' || '<!-- |g_id| -->' == '9') {
document.write("<style>#ucpcontent #field_8 { display: none; }</style>");
document.write("<style>#ucpcontent #field_10 { display: none; }</style>");
document.write("<style>#ucpcontent #field_20 { display: none; }</style>");
document.write("<style>#ucpcontent #field_21 { display: none; }</style>");
document.write("<style>#ucpcontent #field_22 { display: none; }</style>");
document.write("<style>#ucpcontent #field_23 { display: none; }</style>");
}
</script>


This post has been edited by perfect circle: May 10 2017, 03:33 AM
#
    So like, you can hide the entire links in the User Control Panel (so after they go to Menu --> My Controls), they won't see anything if you use this in your CSS:

    CODE
    td.row4.touch-area {
       display: none;
    }


    That hides everything though, including the Edit Avatar, Edit Signature, etc. on mobile.

    I mean I don't see a reason why people need to use that stuff on mobile anyway (most edit avatars and stuff on a computer because, well, PHOTOSHOP or whatever). But that CSS should allow you to hide the contents of My Controls and not worry about it.
PM
#
Thank you! It worked perfectly. http://files.b1.jcink.com/html/emoticons/smile.gif
#
This topic has been solved. If you need anymore help please post a new thread. Thanks for choosing Jcink services.

signature
email: admin@jcink.com :: blog: John C.
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | General Support | Next Newest »

Options ClosedNew TopicNew Poll