• Welcome to Simple Machines Community Forum. Please login or sign up.

Stop memebers from running scripts?

Started by Coldpressed, September 18, 2021, 11:06:37 PM

Previous topic - Next topic


People sign up to our forum and run a script to unhide links.
Its becoming unmanageable now and i was wondering if theres something i can add/tick that can stop a member from running a script?


Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro


Why are the links there if you don't want people to use them? What is the use case?


Quote from: vbgamer45 on September 18, 2021, 11:29:02 PMHow are you hiding links now?
I have a registered links mod https://custom.simplemachines.org/index.php?mod=342
The members are all registered already.
Im hiding links with a "Hide content in post" option.


Quote from: Coldpressed on September 18, 2021, 11:41:18 PMIm hiding links with a "Hide content in post" option.
That doesn't tell us much.

The short version is that if your "Hide content in post" option relies on javascript to work, anyone can easily circumvent it just by temporarily disabling javascript in their browser. Which is something you canot stop them doing. IOW, they may not even be running a script. They may just be disabling scripts.


They are running a script.
When questioned they admitted to it.
But thats not why im here.Im asking if theres a way to stop it.

Chief of Nothing

Antechinus is only trying to help. The more information that you can provide the better that help can be.

So, the short answer is: no, you can not do anything to prevent any person from running scripts against your site to reveal content that is part of the rendered page.


September 19, 2021, 01:50:54 AM #7 Last Edit: September 19, 2021, 07:22:21 AM by Steve
Quote from: Chief of Nothing on September 19, 2021, 01:20:18 AMAntechinus is only trying to help. The more information that you can provide the better that help can be.

So, the short answer is: no, you can not do anything to prevent any person from running scripts against your site to reveal content that is part of the rendered page.
Ty for your reply.

I know he is trying to help and im greatful :)

Edited to pull your answer out of the quote to make it more apparent ~ Steve


so the links that you are hiding, what is the purpose of it? and what does the member have to do to unhide said links?
is it something that they have to reach a specific post count? be in a specific group? if those are the cases than it would be better to instead of hiding those links, move those posts into a specific board and restrict access to that board per post count group or member group


That is why I asked what the use case was. Putting links into the page content, then expecting them not to be used, seems a rather odd way of going about things. Controlling access via board permissions makes much more sense.


Maybe he is using spoilers. Now the question is, how does the others run scripts  :-X
Read my posts in these links, maybe can help with your situation:

Also there are mods which will unlink links based on number of posts. I believe this one bellow does that
[nobbc]https://custom.simplemachines.org/index.php?mod=1237[/nobbc]And here is no bbc button https://custom.simplemachines.org/index.php?mod=3755



Unlinking anchors doesn't really help in this situation.That's really to stop bots following links. Humans can get around it easily. For example, take the link to this topic:
I can unlink it via a mod or whatever, to turn it into this:
A bot won't follow that, because it's not a valid link format. However, a human can easily use it just by highlighting the domain name and subsequent path, copying it to clipboard, and then pasting it into their search bar input. The browser will then find the page without any trouble at all.

Short version: if the domain name and rest of the path are visible, unlinking it will not stop humans using it. :)

Quote from: efk on September 19, 2021, 07:31:32 PMMaybe he is using spoilers.
He seems remarkably reluctant to give any information about what he is doing, which naturally makes me a tad suspicious about what he is up to. Wanting links on a page, but wanting to restrict people from using them? Sounds like it could be a warez site.


If this is the mod that is being used*, it is trivially easy to circumvent: https://custom.simplemachines.org/index.php?mod=4013

It clearly states that it requires javascript to work, and I've had a quick look at the code. The js simply appends a .hide class to set the relevant element to display: none;

There are two very simple ways around this:

1/ Disable javascript, thus disabling the appending of the relevant class, which will immediately make the element visible. This is what I mentioned earlier in the thread.

2/ Don't even bother disabling javascript. Simply look at the page markup with the browser's built-in inspector. This will automatically show any elements set to display: none; and will also show their content.

Either of these methods will work. It is not necessary to run any javascript of your own.

If they are running their own javascript it would be purely for convenience, not out of necessity. One obvious idea would be to write your script to change the .hide class from setting display: none; to setting display: block; but you don't even need to write js to do that. You could do it straight in your browser's  inspector, or via an add-on like Stylus, just by changing the CSS applied to that class. All hidden elements on the page would immediately be visible.

*@Coldpressed - if you are using this mod it would have been sensible to tell people up front, and give them a link to the mod so they could check the code themselves.

If you are not using this mod, and are using something else, the same applies.


yup --   as others have said:   If you are "hiding" content within a post (maybe until someone clicks "show" or someone meets some criteria)  ---   the CONTENT is still present, it's just being hidden by javascript and/or CSS...    and there is literally nothing that you can do to prevent others from seeing the content.

The only was to prevent content from being seen is to literally STOP it from being displayed on the CODE side of things --- and doing that within a post is complicated (as in, probably require you to pay someone (an expert) to develop a special mod just for you)
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


Please do not PM me for support.