Disable the Quote Feature for one user.
4 posters
Page 1 of 1
Disable the Quote Feature for one user.
Is it possible to disable the quote feature for one user? A javascript code I'm assuming would be the way to do it. I'm using Invision. Thanks
Last edited by runawayhorses on October 9th 2012, 1:48 pm; edited 1 time in total
Re: Disable the Quote Feature for one user.
You could hide the quote button, by outputting CSS depending on the username:
- Code:
<script>
if('{USERNAME}' === 'username of user') document.write('<style>.i_icon_quote{ display: none; }</style>');
</script>
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: Disable the Quote Feature for one user.
Would a portal widget work? I don't have the forum widgets activated only the portal widgets.
Re: Disable the Quote Feature for one user.
Let me explain what just happened when I added that code. First to test it I set it to hide a test account username I have so I could check and see if I could view the Quote button. Well when I went to login with the test account it loaded a blank white screen and refused to load the page. I then cleared my cookies and tried again, same thing happened. I then began to panic thinking OMG what if I can't login with my usual admin account, but it loaded fine and let me in. Then to further test it I removed the code and then tried to login again with my test account, this time it loaded fine and let me in. So what we can conclude is, with the code in place whoevers name is in the script to block the Quote button is also being blocked from viewing the site. Something went terribly wrong.
Re: Disable the Quote Feature for one user.
runawayhorses wrote:Let me explain what just happened when I added that code. First to test it I set it to hide a test account username I have so I could check and see if I could view the Quote button. Well when I went to login with the test account it loaded a blank white screen and refused to load the page. I then cleared my cookies and tried again, same thing happened. I then began to panic thinking OMG what if I can't login with my usual admin account, but it loaded fine and let me in. Then to further test it I removed the code and then tried to login again with my test account, this time it loaded fine and let me in. So what we can conclude is, with the code in place whoevers name is in the script to block the Quote button is also being blocked from viewing the site. Something went terribly wrong.
have you tried LG way as well?
He dont really say where to put it, but my guess it should work in the forums announment if you do not have wigets on.
Other then that i will have to test as well, but am sure both codes will work.
kirk- Forumaster
- Posts : 11037
Reputation : 653
Language : English,Vulcan,Klingon, Romulan,& Gorn
Re: Disable the Quote Feature for one user.
Maybe so Kirk but I feel uncomfortable with this. Thank you but I'm going to steer clear of using such a code, if this one works for me I'd be concerned it might not for someone else, the code seems too unstable and I don't trust it. Thanks just the same, but I will just forget this idea of hiding the quote button for a member.
Re: Disable the Quote Feature for one user.
i just placed it in announcement and works fine. if that's the only thing in there you do not even see the announcement either.
But up to you
try what else Rideem3 has just added to
But up to you
try what else Rideem3 has just added to
kirk- Forumaster
- Posts : 11037
Reputation : 653
Language : English,Vulcan,Klingon, Romulan,& Gorn
Re: Disable the Quote Feature for one user.
Which one did you try Kirk LG's code in announcement?
Edit: were you using Invision?
No reflection on your Rideem just trying to sort this out..
Edit: were you using Invision?
No reflection on your Rideem just trying to sort this out..
Last edited by runawayhorses on October 9th 2012, 1:50 am; edited 1 time in total
Re: Disable the Quote Feature for one user.
Yeah document.write won't work in DOM Ready functions since the DOM is already loaded.
Putting this in an announcement or site description:
If you don't understand it runawayhorses, what it does is do a check that {USERNAME*} value is the same as the username you specify. If it is, then the current user must be that user that you don't want seeing the quote button. So it writes out the CSS necessary to hide the quote button.
Just note that doing this won't stop them from quoting if they visit the URL. /post?mode=quote&p=POSTID
Putting this in an announcement or site description:
- Code:
<script type="text/javascript">
if('{USERNAME*}' === 'username of user') document.write('<style>.i_icon_quote{ display: none; }</style>');
</script>
If you don't understand it runawayhorses, what it does is do a check that {USERNAME*} value is the same as the username you specify. If it is, then the current user must be that user that you don't want seeing the quote button. So it writes out the CSS necessary to hide the quote button.
Just note that doing this won't stop them from quoting if they visit the URL. /post?mode=quote&p=POSTID
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: Disable the Quote Feature for one user.
Topic Solved & Locked |
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» Disable Birthday Feature on Profiles?
» Enable/Disable Like feature according to sub-forums
» Are there any way to disable the "Guest can't post external link" feature?
» Background Color of Quote in Quote
» User Name Prefixes for entire User Group
» Enable/Disable Like feature according to sub-forums
» Are there any way to disable the "Guest can't post external link" feature?
» Background Color of Quote in Quote
» User Name Prefixes for entire User Group
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum