Guests: Access, Attachments & Downloads etc

Started by stoo23, July 20, 2023, 10:53:04 PM

Previous topic - Next topic

stoo23

One of the forums I am looking after, is an 'Active' (Rescued), continuation of a Far Older (Last active in 2012 & Now Read Only) 'Assembly Language Programming' forum, with (in effect), Open access to all the Topics, Posts and Attachments etc, which, considering the age of the accessible material and general attitude towards the Community interested in that material, is Fine  :)

BUT with regard to the New 'active' forum,.. perhaps Not So Much  ;)  :)

Perhaps 'Partly' with the Idea of (Perhaps they will Join, if they Can't see and Grab everything) mentality LOL AND noticing SO Many Guests were "Viewing Attachments", (which would quite often be Code Fragments & Examples, If Not actual Program elements etc), I figured that much like Guests Usually NOT being able to 'Search' Most Forums, I could Restrict their General access to the Resources.

Silly Question, perhaps, but IS there a way of allowing the Attachments to be Seen, but Not 'Downloaded' as such ?

Other than Dis-allowing Guests to:
You cannot view this attachment.

I cannot see any further Control over attachments.

Once again, thanks in advance.

TwitchisMental

That setting when disabled should show this error when viewing as a guest. Assuming the attachment has been linked within the post itself.

You cannot view this attachment.

stoo23

YES,.. it Does  :)
Get it, they might eventually decide to join the community,.. for what it might offer etc,..

Silly me,.. LOL

TwitchisMental

Quote from: stoo23 on July 20, 2023, 11:48:52 PMYES,.. it Does  :)
Get it, they might eventually decide to join the community,.. for what it might offer etc,..

Silly me,.. LOL
All good.

You could also edit the language string in index.english.php or make a ThemeStrings.english.php file and add something like "Login or Register to view attachment".

So it would look like -

You cannot view this attachment.

stoo23

OH, Hey,... thanks, that's a Great Idea !!  :)  ;D

Much appreciated.  ;)  8)

TwitchisMental

Quote from: stoo23 on July 21, 2023, 12:23:58 AMOH, Hey,... thanks, that's a Great Idea !!  :)  ;D

Much appreciated.  ;)  8)
No problem

To use the Theme Strings option do the following -

In 2.0 RC1 and onwards, a new way of including ThemeStrings.language.php would be to set $settings['require_theme_strings'] to true in index.template.php. It would look something like this:
Search for this in index.template.php:
/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
    $settings['require_theme_strings'] = false;



Replace it with:
/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
    $settings['require_theme_strings'] = true;



After doing this you will need to create language file specific for your language, i.e. ThemeStrings.english.php.
Note: ThemeStrings.language.php file has to be inside languages directory of your theme. You will need to create the directory yourself, if you're creating your own theme from scratch, or updating a theme that didn't have this directory in first place.



Would you consider this issue solved?

stoo23

OH, OK,..

Interestingly, in my 2.1.4 install, when I hover over the Red warning indicator when looking at a Guest viewing an attachment Mine says:
"Sorry, this section isn't available at this time." and so far, I have Not been able to Find that 'string' ??

also, I tried editing the string in index.english.php, that began with "You cannot view this atachment etc" but that was obviously Not the Correct string lol, as it did Not affect the area I was wanting and I Can't find the string I am after in index.english.php ??
Any ideas?

OK understood I will think about that and get back to you  ;)  :)

Solved ?? hmm perhaps Not yet,.. I am still pretty new to all this  :)

TwitchisMental

Quote from: stoo23 on July 21, 2023, 01:16:02 AMOH, OK,..

Interestingly, in my 2.1.4 install, when I hover over the Red warning indicator when looking at a Guest viewing an attachment Mine says:
"Sorry, this section isn't available at this time." and so far, I have Not been able to Find that 'string' ??

also, I tried editing the string in index.english.php, that began with "You cannot view this atachment etc" but that was obviously Not the Correct string lol, as it did Not affect the area I was wanting and I Can't find the string I am after in index.english.php ??
Any ideas?

OK understood I will think about that and get back to you  ;)  :)

Solved ?? hmm perhaps Not yet,.. I am still pretty new to all this  :)
Humm sounds like you may have some other things enabled or disabled. It's a bit late so I can't think of it off the top of my head.

The specific error you are getting can be found in errors.english.php.

However it is best to use the ThemeStrings method for changing text. If there happens to be updates to the language string files, it could be overwritten.

Do you have a link to your forum?

stoo23

QuoteHumm sounds like you may have some other things enabled or disabled

Perhaps, but All I did, when I noticed there were Heaps of 'Guests' viewing attachments was simply to 'Un-check' the box from the Permissions area in the admin' section as detailed in my first post.

which Had the desirable effect as far as attachments Not being visible when Not 'logged in'  :)

My only question was whether they could Still be 'viewable' but Not downloadable.

Probably NOT possible,...I guess BUT,.. I Really Like the idea of changing the warning the guest sees IF it is possible when they try to :)

Maybe they won't or don't even get or see a message, maybe that is Only a message indicating I can't see more info' about that ??,.. who knows lol, I sure don't at this stage LOL

Thanks for all the info' etc

Oh sorry, yes, here is our forum: https://masm32.com/board/index.php

Kindred

In short, not by default.

Smf never shows any action that can not be completed.

Additionally,  it is provable that trying to gatekeep contents with teasers has the OPPOSITE effect that you are looking for.  People leave and never come back
Слaва
Украинi

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

stoo23

QuoteAdditionally,  it is provable that trying to gatekeep contents with teasers has the OPPOSITE effect that you are looking for.  People leave and never come back

Good Point  :)

Steve

My pet rock is not feeling well. I think it's stoned.

Advertisement: