The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Disable the Quote Feature for one user.

View previous topic View next topic Go down

Solved Disable the Quote Feature for one user.

Post by runawayhorses on October 8th 2012, 7:21 pm

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

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Disable the Quote Feature for one user.

Post by LGforum on October 8th 2012, 9:01 pm

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

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Disable the Quote Feature for one user.

Post by runawayhorses on October 8th 2012, 11:40 pm

Would a portal widget work? I don't have the forum widgets activated only the portal widgets.

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Disable the Quote Feature for one user.

Post by runawayhorses on October 9th 2012, 1:26 am

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.

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Disable the Quote Feature for one user.

Post by kirk on October 9th 2012, 1:32 am

@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

Male Posts : 11037
Reputation : 651
Language : English,Vulcan,Klingon, Romulan,& Gorn

Back to top Go down

Solved Re: Disable the Quote Feature for one user.

Post by runawayhorses on October 9th 2012, 1:35 am

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.

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Disable the Quote Feature for one user.

Post by kirk on October 9th 2012, 1:44 am

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 Smile

try what else Rideem3 has just added to Smile

kirk
Forumaster

Male Posts : 11037
Reputation : 651
Language : English,Vulcan,Klingon, Romulan,& Gorn

Back to top Go down

Solved Re: Disable the Quote Feature for one user.

Post by runawayhorses on October 9th 2012, 1:47 am

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.. Smile


Last edited by runawayhorses on October 9th 2012, 1:50 am; edited 1 time in total

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Disable the Quote Feature for one user.

Post by runawayhorses on October 9th 2012, 1:50 pm

Ok, thanks guys.

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Disable the Quote Feature for one user.

Post by LGforum on October 9th 2012, 4:31 pm

Yeah document.write won't work in DOM Ready functions since the DOM is already loaded.
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>
Will ensure the quote button is hidden on all pages, including PM's and any other places it may be.

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

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Disable the Quote Feature for one user.

Post by runawayhorses on October 9th 2012, 5:43 pm

Ok thanks everyone, this can be locked now. Smile

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Disable the Quote Feature for one user.

Post by SLGray on October 9th 2012, 7:03 pm

Topic Solved & Locked


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35645
Reputation : 2374
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum