Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Suki on January 22, 2010, 09:56:02 AM

Title: Hide Topics from Guests
Post by: Suki on January 22, 2010, 09:56:02 AM
Hide Topics from Guest
Author: Suki (http://missallsunday.com)


Description
Hide Topics from Guests allows guests to see topics, but if they click a topic it redirects them to the login page.


License

* This SMF modification is subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this SMF modification except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/


Settings
No settings, just install and use.


Support
Questions should be address to the mod support topic (http://www.simplemachines.org/community).


Changelog
3.0 - 6 January 2012
- Added support for Profile and Print pages.

2.0 - 26 January 2011
- fixed guest can see the topic in action=recent

1.0 - 14 January 2010
First release of Hide Topics from Guests
Title: Re: Hide Topics from Guests
Post by: shumilica on January 22, 2010, 12:13:54 PM
Quite interesting mod, but what will happen if the guest has the direct link to a topic?
And this is supposed to happen only on boards that guests have access, no?
The idea is good, the implementation i think would have to resemble the View/Enter Board Permissions mod, so that we can choose from the permission if membergroups can view the topics or enter them.
Title: Re: Hide Topics from Guests
Post by: Matthew K. on January 22, 2010, 12:18:22 PM
Take a peak at the coding, it adds a line to Display.php for guests, meaning even if a guest has a direct link, it will redirect them.

Edit: The line added in ./Sources/Display.php
Code (Display.php) Select
if ($context['user']['is_guest']) redirectexit ('action=login');
Title: Re: Hide Topics from Guests
Post by: shumilica on January 22, 2010, 12:48:54 PM
Ok, I was thinking it adds it in the messageindex, but I would want to use this mod if it is activated per board basis. So that guest can enter topics in a board, but only view the titles in another. I think this would be the most lucrative mode of the mod.
Title: Re: Hide Topics from Guests
Post by: Matthew K. on January 22, 2010, 12:51:21 PM
Something similar is already setup, you can not allow guests to be able to view certain boards. The only benefit if I made my mod by a board-based permission would that guests could see messageindex's, which wouldn't be a huge gain.

However, I will consider it.
Title: Re: Hide Topics from Guests
Post by: Cal O'Shaw on January 22, 2010, 08:17:25 PM
So this differs from the Hide Topic Replies (http://custom.simplemachines.org/mods/index.php?mod=2082) MOD by just cutting off Guests from looking at any posts in topics, yes?  Hide Topic Replies allows Guests to see the first post.

Just want to understand the difference.

Grazie,

Cal
Title: Re: Hide Topics from Guests
Post by: Matthew K. on January 22, 2010, 09:24:06 PM
Yes, this completely blocks guests from viewing topics period, as other similar mods just limit viewing replies.

Labradoodle-360
Title: Re: Hide Topics from Guests
Post by: Tanks on January 23, 2010, 04:39:03 AM
This was what i wanted for my 2.0 RC2 - Guest can still see attachment on messageindex and that is what was needed. Thanks alot !
Title: Re: Hide Topics from Guests
Post by: Matthew K. on January 23, 2010, 11:06:11 AM
Not a problem, glad you like it!

Labradoodle-360
Title: Re: Hide Topics from Guests
Post by: digit on January 23, 2010, 06:09:51 PM
I guess this is system wide? Or is there an option to do on a per board basis? (and if not, make that a feature request!)
8)
Title: Re: Hide Topics from Guests
Post by: Matthew K. on January 23, 2010, 06:16:36 PM
This is strictly a system based mod and I do not intend on updating it to board basis any time soon.

As I am working on some bigger mods currently, I may add this to my to-do list after I get Hovering Login Bar done.
Labradoodle-360
Title: Re: Hide Topics from Guests
Post by: Earthview on January 25, 2010, 04:51:23 PM
I have a SEO question, is this blocking also the bots? Google bot?

Thanks,
Maik
Title: Re: Hide Topics from Guests
Post by: Matthew K. on January 25, 2010, 04:52:50 PM
Very good question, and the answer is yes.

Hide Topics from Guests blocks anyone and everyone who is not logged into the forum.
Title: Re: Hide Topics from Guests
Post by: 72 454 on February 11, 2010, 08:55:53 PM
This mod is perfect for me. Tnx! I like the fact that guests can see the boards and user's topic titles to show the activity, but they just can't go in and read the individual posts. Gives the forum some posting privacy while still showing the amount of activity.


8) 
Title: Re: Hide Topics from Guests
Post by: Afro on February 14, 2010, 12:34:01 PM
How does this treat search engines ?
Title: Re: Hide Topics from Guests
Post by: Nick Whetstone on February 14, 2010, 02:38:50 PM
Quote from: Earthview on January 25, 2010, 04:51:23 PM
I have a SEO question, is this blocking also the bots? Google bot?

Thanks,
Maik
Quote from: Labradoodle-360 on January 25, 2010, 04:52:50 PM
Very good question, and the answer is yes.

Hide Topics from Guests blocks anyone and everyone who is not logged into the forum.
;)
Quote from: Afro™ on February 14, 2010, 12:34:01 PM
How does this treat search engines ?
Title: Re: Hide Topics from Guests
Post by: YogiBear on February 14, 2010, 03:11:19 PM
This is what Bear here is trying to understand. A similar mod works great but by clicking on View Recent Posts a Guest can read all posts whether the topic is forbidden or not.
Title: Re: Hide Topics from Guests
Post by: Gurbet_42 on February 14, 2010, 03:43:27 PM
Quote from: YogiBear on February 14, 2010, 03:11:19 PM
This is what Bear here is trying to understand. A similar mod works great but by clicking on View Recent Posts a Guest can read all posts whether the topic is forbidden or not.

Delete
is_not_guest();  from Recent.template.php  ;)
Title: Re: Hide Topics from Guests
Post by: YogiBear on February 14, 2010, 03:57:16 PM
Thanks, Gurbet, lol
Title: Re: Hide Topics from Guests
Post by: qubbah on February 22, 2010, 08:00:20 PM
hope there is an option to enable or disable this function in admin panel. tq
Title: Re: Hide Topics from Guests
Post by: Matthew K. on February 22, 2010, 09:34:10 PM
@qubbah - Uninstall works just the same as a toggle would.

Since this is a very basic mod, I don't see this coming in the future.
Labradoodle-360
Title: Re: Hide Topics from Guests
Post by: Arantor on March 28, 2010, 12:07:02 PM
Anyone notice the two gaping holes in this mod... namely ssi_examples.php and RSS feeds...?
Title: Re: Hide Topics from Guests
Post by: thaj on April 05, 2010, 09:35:52 PM
Hi,

I have installed this mode its working fine . I would like to know is there any option to enable or disable this function from admin

Regard,
Thaj
www.jobslinked.in
Title: Re: Hide Topics from Guests
Post by: Nick Whetstone on April 05, 2010, 09:57:41 PM
Quote from: thaj on April 05, 2010, 09:35:52 PM
Hi,

I have installed this mode its working fine . I would like to know is there any option to enable or disable this function from admin

Regard,
Thaj
www.jobslinked.in
Quote from: Labradoodle-360 on February 22, 2010, 09:34:10 PM
Uninstall works just the same as a toggle would.

Since this is a very basic mod, I don't see this coming in the future.
Labradoodle-360
Title: Re: Hide Topics from Guests
Post by: bran8464 on April 21, 2010, 05:17:51 AM
How about making it work for 2.0 RC3? Any chance soon?
Title: Re: Hide Topics from Guests
Post by: WeWantRevenge on April 21, 2010, 05:18:41 AM
Quote from: bran8464 on April 21, 2010, 05:17:51 AM
How about making it work for 2.0 RC3? Any chance soon?

Title: Re: Hide Topics from Guests
Post by: Matthew K. on April 21, 2010, 10:42:32 AM
It should work using Version Emulate in the Package Manager.

An update for SMF 2.0 RC3 will come, but later down the road. As my dev laptop is still down.
Labradoodle-360
Title: Re: Hide Topics from Guests
Post by: bran8464 on April 22, 2010, 09:26:09 AM
It took a while to find version emulate (advanced) but when I did I set it to RC2 and it works. Thing is not sure whether it resets all packages or just HTFG - I suspect the former. However all is well so far, thanks.
Title: Re: Hide Topics from Guests
Post by: Matthew K. on April 22, 2010, 09:39:37 AM
Glad you got it working!
Title: Re: Hide Topics from Guests
Post by: khadhafi on April 24, 2010, 02:10:53 PM
Quote from: Arantor on March 28, 2010, 12:07:02 PM
Anyone notice the two gaping holes in this mod... namely ssi_examples.php and RSS feeds...?
what holes arantor? please tell us if this mods have holes. Thanks
Title: Re: Hide Topics from Guests
Post by: Arantor on April 24, 2010, 03:44:16 PM
The fact that, through RSS and ssi_examples.php you can totally bypass this mod's "hiding".
Title: Re: Hide Topics from Guests
Post by: Bruno36 on May 27, 2010, 07:32:39 AM
Hello!

an update is planned for RC3?
Title: Re: Hide Topics from Guests
Post by: Nick Whetstone on May 27, 2010, 10:18:21 AM
Quote from: Bruno36 on May 27, 2010, 07:32:39 AM
Hello!

an update is planned for RC3?
Quote from: Labradoodle-360 on April 21, 2010, 10:42:32 AM
It should work using Version Emulate in the Package Manager.

An update for SMF 2.0 RC3 will come, but later down the road. As my dev laptop is still down.
Labradoodle-360

Package Manager -> Browse -> Advanced Options -> Emulate to RC2 -> Apply
Title: Re: Hide Topics from Guests
Post by: SAFAD on May 30, 2010, 05:45:24 PM
ok
if a guest opens a topic
he'll be redirected to login
well
isn't there any permission system in SMF 1.X ?
Title: Re: Hide Topics from Guests
Post by: Matthew K. on May 30, 2010, 06:03:17 PM
What do you mean SAFAD?
Title: Re: Hide Topics from Guests
Post by: hamsterdaddy on September 27, 2010, 06:35:51 AM
If this question sounds dumb, it's because I'm not a "Geek", but here goes:

Re: "I have a SEO question, is this blocking also the bots? Google bot?"  (You said yes)

I love the basic idea, people would be unable to copy articles without being a member. But isn't blocking the spider bots very counter-productive?

Isn't there a way to do this without blocking the Bots from indexing page content?

2nd: On the portal page, where the first 200 characters are visible, would it block clicking to see the rest of the article? I'm assuming yes.
Title: Re: Hide Topics from Guests
Post by: Oya on September 27, 2010, 10:10:42 AM
QuoteIsn't there a way to do this without blocking the Bots from indexing page content?

not really

if you block guest access but not spiders you get penalised by google and others for doing it
Title: Re: Hide Topics from Guests
Post by: Joker™ on September 27, 2010, 10:33:37 AM
Quote from: hamsterdaddy on September 27, 2010, 06:35:51 AM
Isn't there a way to do this without blocking the Bots from indexing page content?
Ever wonder what does this page do

http://www.yoursitename/index.php?action=admin;area=sengines;sa=settings

There is an option
Apply restrictive permissions from group

You might try that thing and give bots a different permission.(Create a new permission based user group for them ;))
Title: Re: Hide Topics from Guests
Post by: hamsterdaddy on September 27, 2010, 01:17:02 PM
Good idea Joker. BTW, I plugged my site name into that URL, and didn't get a return, is it because it's the page for a non-existent user group that hasn't been created by me yet?

There appears to be URL's related to my site I never heard of before, LOL....
Title: Re: Hide Topics from Guests
Post by: Spoogs on September 27, 2010, 01:20:05 PM
Admin>>Members>>Search Engines>>Settings
Title: Re: Hide Topics from Guests
Post by: hamsterdaddy on September 28, 2010, 07:52:52 PM
You lost me there Spoogs, checked Members, was no "Search Engines", or Members>>Search Engines>> Settings, I'm assuming you mean "follow the trail inside "Members".  Do you mean make a user group for them?

I'm confused now. Why not a membergroup for Bots?

And do we know if Search Engines and/or bots recognize when they fall into a member group, and abide by their permissions?

Bots seem to go where they want, and do what they want to.

I don't mind that so much, except when they are from Moscow, Beijing, Ho Chi Min City, Gaza Strip, Etc.

I do not like those bots in my site, I don't care who thinks what, I'm bright enough to "read", and most of the hacking is coming from Communist Bloc countries.

But I'm getting off track. I don't want to hinder the English speaking country bots, like Google, Yahoo, Bing, Ask, etc, but I need to control guests too.

Not all guests are friendly. Come to think of it, not all bots are either.

Anyone have something constructive?




Title: Re: Hide Topics from Guests
Post by: Oya on September 28, 2010, 07:53:56 PM
you haven't turned it on

admin > core features > search engine tracking (click the power button)


and actually i thought he was being quite constructive, nice to know others around here appreciate each other
Title: Re: Hide Topics from Guests
Post by: hamsterdaddy on September 29, 2010, 10:27:40 PM
LOL @ Oya, he was, I just phased that wrong.   ::)

Re: "and actually i thought he was being quite constructive, nice to know others around here appreciate each other"...

I wouldn't have made it as far at my site were it not for the great people here.  :D

I never saw a "core features" in Admin before, But I never had many permissions as admin at the two sites I helped manage, I am seeing a lot of new stuff as "Webmaster Newbie", LOL...

Will look for that as soon as I post another article or two at my NFL magazine...

3 weeks old, but with a healthy chat room already, for the number of members I have:

http://saintstailgate.com/forum/index.php

Thanxs, will be back after I check later.
Title: Re: Hide Topics from Guests
Post by: datarry on October 01, 2010, 10:54:29 AM
hi  then do we get  2.0 RC3 wersion of this mod  ?

http://www.datarry.com/forum/index.php
Title: Re: Hide Topics from Guests
Post by: JessyKa on October 27, 2010, 05:44:16 PM
Hello,
I have installed this mod to keep guests from reading the postings without being registered. This works fine als long as they use the standard welcome page and go on.
But if they use the "http://forum.xxxxxx.xxx/index.php?action=recent" -link they conveniently can read all the postings.

As suggested at the first page of this thread I checked out the display.php and found the line
      if ($context['user']['is_guest']) redirectexit ('action=login');
but it was there, yet.

So this line doesn't seem to affect the latest-posting-page. Is this a bug or/and is there a way to avoid guests reading? I certainly could shut the forum to guests, but the nice thing about this modification is, that guests get an impression about whats going on and can take part if they really want.
Thanks a lot for any help,
Jessy
Title: Re: Hide Topics from Guests
Post by: Matthew K. on October 27, 2010, 06:15:13 PM
 I will take a peak at this later today - Hopefully. However, this definitely should not be occurring.
Title: Re: Hide Topics from Guests
Post by: Oya on October 27, 2010, 07:32:32 PM
of course it will, you only modified the thread view, not the recent pages, nor the rss feeds

looking back through the thread, it was mentioned months ago that there were holes in the mod...
Title: Re: Hide Topics from Guests
Post by: JessyKa on November 05, 2010, 12:19:41 PM
Is there an answer yet?
Title: Re: Hide Topics from Guests
Post by: Oya on November 05, 2010, 12:38:20 PM
the answer is, the mod never solved that problem in the first place so it will always occur, rather than "definitely should not" occur.
Title: Re: Hide Topics from Guests
Post by: JessyKa on November 05, 2010, 04:16:58 PM
Thanks, Oya!
Do you know another Mod that does completely block the user from reading posts?


Labradoodle-360,
this would certainly be a great improvement. Letting the guests see what is going on is much friendlier than just givin them the advice to register!

Greetings,
Jessy
Title: Re: Hide Topics from Guests
Post by: Matthew K. on November 05, 2010, 07:58:31 PM
I am no longer the author - directly, at least. Thanks for the input JessyKa.
Title: Re: Hide Topics from Guests
Post by: JessyKa on November 09, 2010, 01:38:36 PM
Hello Labradoodle,
I am not sure, if I got it right (sorry, I am German).
You're not responsible for this mod anymore, is that right?
So, is there someone else taking care for this mod? Is there a schedule for optimization? Otherwise I would have to uninstall it, and this would be too bad.
Bye
Jessy
Title: Re: Hide Topics from Guests
Post by: jjd1 on November 11, 2010, 11:38:31 PM
Hey there, this is just the mod I am looking for, but when I try to install to SMF version 1.1.12 (the latest 1.x.x), it says this mod is corrupt or does not work with my version... any chance I could beg for a compatible version?  Thanks!
Title: Re: Hide Topics from Guests
Post by: Matthew K. on November 12, 2010, 12:33:48 AM
Mods are being updated...should see an update shortly.
Title: Re: Hide Topics from Guests
Post by: almogz on November 26, 2010, 10:19:18 PM
Problem uninstalling this mod!

PLEASE HELP!!

I like your mod 'Hide Topics from Guests' but I have serious problem that google and ALL search engines stopped viewing my information from the forum (ie: MOST OF THE FORUM CONTENT!!).

This is a HUGE downside of this mod.

If you can solve this problem BEST!

If not, please tell me how to remove this mod/ bring the forum back to normal?!
I'm using smf 2.0 RC 3.0

I did uninstalled it from the PACKAGES and its no longer there but still yet!! the forum operate the same, guest AND SEARCH ENGINES can't see the forum content! my forum is going down because of it!

HELP ASAP PLEASE!
Title: Re: Hide Topics from Guests
Post by: almogz on November 28, 2010, 12:50:45 AM
?! Anyone ?!
Title: Re: Hide Topics from Guests
Post by: almogz on November 28, 2010, 04:56:44 AM
Quote from: almogz on November 26, 2010, 10:19:18 PM
Problem uninstalling this mod!

PLEASE HELP!!

I like your mod 'Hide Topics from Guests' but I have serious problem that google and ALL search engines stopped viewing my information from the forum (ie: MOST OF THE FORUM CONTENT!!).

This is a HUGE downside of this mod.

If you can solve this problem BEST!

If not, please tell me how to remove this mod/ bring the forum back to normal?!
I'm using smf 2.0 RC 3.0

I did uninstalled it from the PACKAGES and its no longer there but still yet!! the forum operate the same, guest AND SEARCH ENGINES can't see the forum content! my forum is going down because of it!

HELP ASAP PLEASE!

I think the mod owner shold answer these questions I have.

This mod is not that good and can't remove it easily from the forum!!

Should explain how to remove it manually from functioning in the forum.

>:(
Title: Re: Hide Topics from Guests
Post by: Matthew K. on November 28, 2010, 01:31:35 PM
Manual Installation of Mods (http://docs.simplemachines.org/index.php?topic=402.0) reverse that.
Quote from: almogz on November 28, 2010, 04:56:44 AM
Quote from: almogz on November 26, 2010, 10:19:18 PM
Problem uninstalling this mod!

PLEASE HELP!!

I like your mod 'Hide Topics from Guests' but I have serious problem that google and ALL search engines stopped viewing my information from the forum (ie: MOST OF THE FORUM CONTENT!!).

This is a HUGE downside of this mod.

If you can solve this problem BEST!

If not, please tell me how to remove this mod/ bring the forum back to normal?!
I'm using smf 2.0 RC 3.0

I did uninstalled it from the PACKAGES and its no longer there but still yet!! the forum operate the same, guest AND SEARCH ENGINES can't see the forum content! my forum is going down because of it!

HELP ASAP PLEASE!

I think the mod owner shold answer these questions I have.

This mod is not that good and can't remove it easily from the forum!!

Should explain how to remove it manually from functioning in the forum.

>:(

Title: Re: Hide Topics from Guests
Post by: JessyKa on December 10, 2010, 08:56:25 AM
I am sorry to ask again: who exactly is responsible for this mod now?
And is anyone about to solve the problem? And is there a vague schedule on it?
Thanks
Title: Re: Hide Topics from Guests
Post by: OCJ on January 21, 2011, 06:38:06 AM
Its a useful mod for many people but if possible, Im sure an if/else statement could be added easily to input forum IDs to block access?
Even manually in the display.php file it would be ok. This way I could open up most of the board except private forums... still nice to show the topics though as it makes the site look active.

Pleased to have this!
Andy
Title: Re: Hide Topics from Guests
Post by: Matthew K. on January 21, 2011, 01:13:51 PM
Miss All Sunday
Quote from: JessyKa on December 10, 2010, 08:56:25 AM
I am sorry to ask again: who exactly is responsible for this mod now?
And is anyone about to solve the problem? And is there a vague schedule on it?
Thanks
Title: Re: Hide Topics from Guests
Post by: Suki on January 21, 2011, 01:46:30 PM
Hi, what are exactly the issues with this mod?  if some one could tell me what the problems are so I can solve it.


thanks.
Title: Re: Hide Topics from Guests
Post by: JessyKa on January 24, 2011, 09:50:36 AM
Hello Miss All Sunday,
here I tried to explain, what the problem is:
http://www.simplemachines.org/community/index.php?topic=361613.msg2831311#msg2831311 (http://www.simplemachines.org/community/index.php?topic=361613.msg2831311#msg2831311)
If You could find a solution, that would be great!!
Jessy
Title: Re: Hide Topics from Guests
Post by: Suki on January 26, 2011, 09:07:23 PM
ok, this mod is now updated,  the mod now is compatible solely for 2.0 RC4  and fixes the problem with action=recent

to do list: 

-fix rss too
-maybe add per membergroup permissions.
Title: Re: Hide Topics from Guests
Post by: JessyKa on January 28, 2011, 01:25:09 PM
Thank You so much, Miss All Sunday!!!!
I will reinstall the mod, test it and report.
Jessy
Title: Re: Hide Topics from Guests
Post by: Adrek on February 03, 2011, 03:59:10 PM
hi, how to modify this mod to make redirect guests to login page, but with additional info
"You must log in to access this page, if you do not have an account, please register new"
Title: Re: Hide Topics from Guests
Post by: Suki on February 03, 2011, 04:51:46 PM
I have plans to  add a feature to let users chose between send guest directly to the login page or  send them to a page with a custom message.   

I can't tell you exactly when I'm going to do it, but I will certainly do it
Title: Re: Hide Topics from Guests
Post by: SnowWidow on February 15, 2011, 02:41:02 PM
I installed this mod and it worked perfectly. However after announcing it to my members they all agreed that there are certain forums/topic content that we would like to remain visible to guests because many members like to share topics on Facebook & Twitter. So I have uninstalled it, but will be watching to see if the membergroups permissions will be included in any updates.
Title: Re: Hide Topics from Guests
Post by: OCJ on February 27, 2011, 05:22:42 AM
Snowwidow,
There are BBcode mods to allow content in topics to be hidden from guests ... problem is they are for older versions/do not work anymore. I guess/hope that one will be updated to work with SMF2 this year sometime.

An alternative mod that shows topic titles but  disallows guest reading in selected forums is:
'Look but no read'

Title: Re: Hide Topics from Guests
Post by: datarry on March 01, 2011, 06:55:59 PM
is here going to be any  2.0 RC45 wersion ?
Title: Re: Hide Topics from Guests
Post by: Spoogs on March 01, 2011, 06:57:50 PM
it works just fine on both RC4 and RC5
Title: Re: Hide Topics from Guests
Post by: datarry on March 01, 2011, 06:59:48 PM
thanks i will try it now  8)
Title: Re: Hide Topics from Guests
Post by: datarry on March 01, 2011, 07:07:21 PM
well it does not work in 2.0 RC5  i will wait  till i get  new wersion
Title: Re: Hide Topics from Guests
Post by: Spoogs on March 01, 2011, 07:10:57 PM
Admin>>Packages... scroll down, click Advanced, change RC5 to RC4 and try again
Title: Re: Hide Topics from Guests
Post by: datarry on March 01, 2011, 07:24:51 PM
thanks working :)
Title: Re: Hide Topics from Guests
Post by: Spoogs on March 01, 2011, 07:29:08 PM
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.skype-emoticons.com%2Fimages%2Femoticon-00148-yes.gif&hash=7b54c8aad591e7950ed70118848a4f7edfb678bd)
Title: Re: Hide Topics from Guests
Post by: SnowWidow on March 02, 2011, 01:23:08 PM
Quote from: igirisjin on February 27, 2011, 05:22:42 AM
Snowwidow,
There are BBcode mods to allow content in topics to be hidden from guests ... problem is they are for older versions/do not work anymore. I guess/hope that one will be updated to work with SMF2 this year sometime.

An alternative mod that shows topic titles but  disallows guest reading in selected forums is:
'Look but no read'
I've seen that mod, but it's not for RC4???
Title: Re: Hide Topics from Guests
Post by: Suki on March 02, 2011, 01:25:43 PM
SnowWidow   tell me the forums IDs you want to show to guest and I can give you some custom code.
Title: Re: Hide Topics from Guests
Post by: SnowWidow on March 02, 2011, 01:51:26 PM
That would be great! Thanks!
4.0 & 9.0

There isn't a way to make it so guests & members can see a forum but not be able to read the topics (or even access the forum- just see it on the board index) until they reach a certain number of posts/membergroup is there?
Title: Re: Hide Topics from Guests
Post by: Suki on March 02, 2011, 02:44:52 PM
well, what you really need its this mod: http://www.simplemachines.org/community/index.php?topic=256206.0

it does all the things you want, you can ask on its support topic about how can it be implemented for users as well

Title: Re: Hide Topics from Guests
Post by: OCJ on March 03, 2011, 04:08:07 AM
The mod works ...Im using it now. Even older mods will work if you set install emulate to that version.
Title: Re: Hide Topics from Guests
Post by: Arantor on March 03, 2011, 04:15:18 AM
It really depends on the mod as to whether it'll work, some will, some won't.
Title: Re: Hide Topics from Guests
Post by: -=[Vyorel]=- on March 08, 2011, 11:48:48 AM
For SMF 1.1.13?
Title: Re: Hide Topics from Guests
Post by: Suki on March 08, 2011, 12:02:00 PM
sorry, I have no plans to make a 1.1.x version, however, the mod is pretty simple, you can follow the parser and adapt it for 1.1.x:

http://custom.simplemachines.org/mods/index.php?action=parse;mod=2380;attach=167502;smf_version=2.0_RC4
Title: Re: Hide Topics from Guests
Post by: Fair-Go on April 08, 2011, 05:00:45 AM
I would like to uninstall the "Hide Topics from Guests" v 1.0 mod but there is no "uninstall" option. My SMF is 1.1.13

Could you please help?

Regards, John
Title: Re: Hide Topics from Guests
Post by: Fair-Go on April 08, 2011, 05:46:42 AM
Hi all... I worked out how to remove it (without any uninstaller), just follow these instructions:

In:

./Sources/Display.php

Just find:

if ($context['user']['is_guest']) redirectexit ('action=login');

And add "// ".. like this:

// if ($context['user']['is_guest']) redirectexit ('action=login');

In my version (1.1.13) the mod had not changed "Recent.php" (so I didn't need to do the following), but if your was changed, in :

./Sources/Recent.php

Find:

if (empty($messages) || $context['user']['is_guest'])

and replace with:

if (empty($messages))

As a newby to the back end, I thought I did quite well!

Regards, John
Title: Re: Hide Topics from Guests
Post by: gigashiga on June 05, 2011, 02:02:30 AM
I am using smf 1.1.3

I installed it in packages bu there is no link to install it ( apply mod) :(
wont it work with 1.1.13 ?   :'(



Title: Re: Hide Topics from Guests
Post by: OCJ on June 05, 2011, 03:38:53 PM
3 messages above you ...

Quotesorry, I have no plans to make a 1.1.x version, however, the mod is pretty simple, you can follow the parser and adapt it for 1.1.x:

http://custom.simplemachines.org/mods/index.php?action=parse;mod=2380;attach=167502;smf_version=2.0_RC4
Title: Re: Hide Topics from Guests
Post by: gigashiga on June 06, 2011, 02:10:54 AM
yes so sad that is why I was  :'(

Quote from: Miss All Sunday on March 08, 2011, 12:02:00 PM
sorry, I have no plans to make a 1.1.x version, however, the mod is pretty simple, you can follow the parser and adapt it for 1.1.x:

http://custom.simplemachines.org/mods/index.php?action=parse;mod=2380;attach=167502;smf_version=2.0_RC4

follow the parser?
please direct me what I need to do so that I can do it...
Title: Re: Hide Topics from Guests
Post by: Suki on June 06, 2011, 09:45:56 AM
go to this link:

http://custom.simplemachines.org/mods/index.php?action=parse;mod=2380;attach=167502;smf_version=2.0_RC4


there you will find some instructions, such as find  x on your X file, replace with this.    you only need to follow those instructions on your files, make a back up first.


I may add support for 1.1.x but it will only after 2.0 is out and I start to update all my mods, bigger mods will have priority.
Title: Re: Hide Topics from Guests
Post by: gigashiga on June 07, 2011, 09:17:56 AM
Hi thanks this has worked...wonderfully thankyou very much

i hope you wont mind If i add some suggestions
Like I would like to switch it on and off depending upon different forum(subforum) and events

I wont like to do it for all forums/subforums... on my board
it depends upon events

I had webwiz forum with permission set for each forum that guest cant view that forum( even topics) were not accessible to guests
this code was modified to
allows guests to see topics, but if they click a topic it redirects them to the login page.


thanks again this mod is very essential specially if you have some traffic and you want to convert them to join your forum.
Title: Re: Hide Topics from Guests
Post by: Suki on June 07, 2011, 10:36:39 AM
based on what kind of events?   I can add an option to limit this only to certain boards and/or categories for sure.
Title: Re: Hide Topics from Guests
Post by: OCJ on June 07, 2011, 11:29:24 AM
QuoteLike I would like to switch it on and off depending upon different forum(subforum) and events

I wont like to do it for all forums/subforums... on my board
it depends upon events

I had webwiz forum with permission set for each forum that guest cant view that forum( even topics) were not accessible to guests
this code was modified to
allows guests to see topics, but if they click a topic it redirects them to the login page.


An SMF mod does this - Im using it... 'Look But No Read'

http://custom.simplemachines.org/mods/index.php?mod=1332 (http://custom.simplemachines.org/mods/index.php?mod=1332)

Works fine on  RC5
Title: Re: Hide Topics from Guests
Post by: gigashiga on June 08, 2011, 01:49:52 AM
events in my case is offline events ... or keyword traffic for a particular forum

Title: Re: Hide Topics from Guests
Post by: cebu on July 31, 2011, 02:10:35 AM
hopefully a support can be added to 1.1.14  :(
Title: Re: Hide Topics from Guests
Post by: desibees on August 07, 2011, 05:49:22 PM
You might wana fix your link "Link to mod" as it doesn't redirect it to the right place.
Title: Re: Hide Topics from Guests
Post by: smtek on August 07, 2011, 10:59:38 PM
Will it work on smf 2.0 . Please tell
Title: Re: Hide Topics from Guests
Post by: Suki on August 08, 2011, 08:09:54 PM
This mod is now updated for SMF 2.0
Title: Re: Hide Topics from Guests
Post by: Adrek on December 29, 2011, 01:50:50 PM
How can I redirect users to this page instead login page from mod?
http://phantom.unixstorm.org/smf/index.php?action=profile;u=1
Title: Re: Hide Topics from Guests
Post by: Suki on December 30, 2011, 09:15:55 AM
./Sources/Display.php

find


      if ($context['user']['is_guest']) redirectexit ('action=login');


replace with:


      if ($context['user']['is_guest']) redirectexit ('action=profile;u=1');


keep in mind this will redirect all  guest to that user's profile.
Title: Re: Hide Topics from Guests
Post by: Suki on January 06, 2012, 12:55:21 PM
New version:

Changelog
3.0 - 6 January 2012
- Added support for Profile and Print pages.
Title: Re: Hide Topics from Guests
Post by: Arantor on January 16, 2012, 04:34:01 AM
Quote from: Arantor on March 28, 2010, 12:07:02 PM
Anyone notice the two gaping holes in this mod... namely ssi_examples.php and RSS feeds...?

I notice that these two areas are still not actually resolved, there is no protection in SSI.php for pulling the content (so ssi_examples.php will show the recent posts quite happily) and RSS feeds will just display the posts normally too.
Title: Re: Hide Topics from Guests
Post by: punchy on March 11, 2012, 06:24:58 AM
Quote from: qubbah on February 22, 2010, 08:00:20 PM
hope there is an option to enable or disable this function in admin panel. tq

No there isnst and when i tried to uninstall it it throws up a fatal error  :-\ when i try and login to my admin CP with the white page of death  :o


QuoteFatal error: Call to undefined function hidetopics_who() in /home2/forumtop/public_html/forum/Sources/Who.php on line 733

However if i go to one of a different admin page, not the main page it seems to load ok

I have the fatal error on

1. The Administration Centrer
2. Supports and Credits

Those two i can no longer access

Not a major setback to the site but it really shouldn't happen, and i think a an option to disable it via admin cp would be a great idea, so any ideas how i can get my 2 admin pages back??
Title: Re: Hide Topics from Guests
Post by: Suki on March 11, 2012, 08:49:25 AM
Attach you Sources/Load.php and Sources/Who.php files here
Title: Re: Hide Topics from Guests
Post by: punchy on March 11, 2012, 02:35:22 PM
here you go
Title: Re: Hide Topics from Guests
Post by: OCJ on March 12, 2012, 07:53:44 AM
If you have problems uninstalling mods (not completing the manual edits where automatic uninstall fails) then the simple way to restore your site is to copy the backup files to your forum folder.
In the 'Packages' folder there is a folder called 'backups'. In there, SMF keeps a zip file copy of the site files before the mod was installed. Easy way is to download this zip file to your pc, open it and then drag and drop the contents (files and folders as seen) back onto your site (ftp) where the forum is - in the forum directory. This will replace all the files and those in subfolders.
You will have to reinstall mods that were installed after this one.

Example zip backup name:
2012-01-24_before_SimpleColorizer_1.tar.gz
Title: Re: Hide Topics from Guests
Post by: Suki on March 12, 2012, 12:15:54 PM
OK use this one
Title: Re: Hide Topics from Guests
Post by: punchy on March 13, 2012, 04:27:25 PM
Quote from: Suki on March 12, 2012, 12:15:54 PM
OK use this one

Thanks Suki, That worked a Treat

What do you think it was that made it like that??

Thanks again   ;)
Title: Re: Hide Topics from Guests
Post by: Suki on March 13, 2012, 04:30:50 PM
Who.php had some code left by the mod, I just removed that code.
Title: Re: Hide Topics from Guests
Post by: punchy on March 14, 2012, 03:43:09 PM
Great stuff, well done  ;)
Title: Re: Hide Topics from Guests
Post by: CSRM on April 24, 2012, 12:25:31 PM
Nice, very useful modification!

Can you please add default "Warning!" message, like the one when guest wants to look someone's profile...?

I have a picture but on Croatian language ("Upozorenje!"):

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FidgII.jpg&hash=2f2840d6280799655b3f572227b888d224bf903c)

What i say/want is field above "Prijava" (on CRO, "Log in" ENG).
I hope so that u understand what i want  :)
Title: Re: Hide Topics from Guests
Post by: shubha on April 25, 2012, 08:06:35 AM
Try this ,

The guest unable to see the profile.

Admin->member->general permission->guest->View other people's profiles (unclick  on this )

Note- It will create the problem in search engine , better than show the profile to guest.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg856.imageshack.us%2Fimg856%2F9742%2F71589347.jpg&hash=8b522f583a4dd042fd9734d4f326159935446cae)
Title: Re: Hide Topics from Guests
Post by: Suki on April 25, 2012, 10:03:28 AM
Bu default guest are redirected to the login page:

redirectexit('action=login');

if you want to show an error message, build a text string on your Modificaitons.language.php:

$txt['hide_topics_from_guestError'] = 'I\'m sorry, you aren\'t allowed to see the topics';


Then replace all the  redirectexit('action=login');  in  2.xml on the zip with:   fatal_lang_error('hide_topics_from_guestError', false);
Title: Re: Hide Topics from Guests
Post by: Kochan on June 22, 2012, 03:08:12 PM
Could you tell me if I can hide only one or two topics. Now I can hide all topics but I want to do this for only two
Title: Re: Hide Topics from Guests
Post by: Suki on June 22, 2012, 05:13:28 PM
you will need to hardcoded the topic ID on the Display.php file:

if ($topic == 666)
   redirectexit('action=login');

or if you want to use  it for several topics, use an array:

$topicsToHide = array(
1,
2,
3,
4,
666,
);

then check if $topic matches any value on the array:

if (in_array($topic, $topicsToHide))
   redirectexit('action=login');

keep in mind that this mod is old and doesn't cover all the areas, this mod however, does: https://github.com/MissAllSunday/ViewAnyTopic
Title: Re: Hide Topics from Guests
Post by: Adrek on August 05, 2012, 02:00:27 PM
How to use this mod only in selected boards?
Title: Re: Hide Topics from Guests
Post by: Suki on August 05, 2012, 07:32:35 PM
Pretty much like the code above, using the parser, take a lookat the places this mod changes and before those add something like this:

if ($board_info['id'] == 1)


When 1 is the board ID you want to use this mod on.
Title: Re: Hide Topics from Guests
Post by: Adrek on August 06, 2012, 02:22:10 AM
Thanks :)
Title: Re: Hide Topics from Guests
Post by: sportscenterisnext on December 17, 2012, 01:28:05 PM
Suki,

Great mod. I installed this mod on my forum last evening, appeared to work fine with only 1 issue. With the WYWIWYG editor enabled or disabled in SMF2.0.2 the package does not allow for images (jpeg-png) within the media files to be inserted into posts, depending on browser IE 8 & 9 displays a Red X,  Firefox 17.0.1 nothing. 

Any solutions as my members love displaying their images?

Thank you in advance for your assistance.
Title: Re: Hide Topics from Guests
Post by: Suki on December 18, 2012, 08:31:08 AM
Hi, this mod doesn't modify the WYSIWYG editor nor the posting page.
Title: Re: Hide Topics from Guests
Post by: sportscenterisnext on December 18, 2012, 10:18:11 AM
Thank you for your response, but I will disagree with you. I updated today to SMF 2.0.3, theme CLS Pro Sidebar. With your modification installed it does not accept images either thru the editor or bbc tags.  Otherwise a fabulous modification.
Title: Re: Hide Topics from Guests
Post by: Suki on December 18, 2012, 10:31:17 AM
You don't need to disagree with me... its a fact: http://custom.simplemachines.org/mods/index.php?action=parse;mod=2380;attach=194190;smf_version=2.0

This mod doesn't modify any Post.php file or any other file that deals with the editor, it has nothing to do with images or BBC either.

This mod only handles the topic display not the topic creation, those are two different things that re handle separately by different files, this mod only modifies the files corresponding to the display, not the creation.

Check again and make sure you are indeed using this modification. Perhaps you are using another one.
Title: Re: Hide Topics from Guests
Post by: Burt on November 07, 2016, 02:17:03 AM
Quote from: Suki on December 18, 2012, 10:31:17 AM
You don't need to disagree with me... its a fact: http://custom.simplemachines.org/mods/index.php?action=parse;mod=2380;attach=194190;smf_version=2.0 (http://custom.simplemachines.org/mods/index.php?action=parse;mod=2380;attach=194190;smf_version=2.0)

This mod doesn't modify any Post.php file or any other file that deals with the editor, it has nothing to do with images or BBC either.

This mod only handles the topic display not the topic creation, those are two different things that re handle separately by different files, this mod only modifies the files corresponding to the display, not the creation.

Check again and make sure you are indeed using this modification. Perhaps you are using another one.


I know that this is an old thread but I just wanted to confirm that after installing it on 2.0.12 I cannot longer use Toggle View. Unfortunately, I can't make sense of it... but it seem to affect post editing for some reason...
Title: Re: Hide Topics from Guests
Post by: Burt on November 09, 2016, 02:44:01 AM
Hi Suki


I was wondering if you still support this mod?


I can confirm that when this mod is installed it prevents some picture from displaying...


Today I Guest that was trying to register had to contact me by email to let me know that the registration image (I'm actually using the one made by Arantor) doesn't show.


The soon I disable this mod, the picture was back...


Could you please look into this?


Thank you


Burt
Title: Re: Hide Topics from Guests
Post by: Burt on November 19, 2016, 03:40:32 AM
I guess ignoring people is part of the charm  ;D
Title: Re: Hide Topics from Guests
Post by: Suki on November 19, 2016, 09:17:30 AM
I am busy and no amount of passive-aggressive messages is going to change that. Sorry.
Title: Re: Hide Topics from Guests
Post by: Burt on November 21, 2016, 10:15:38 AM
Quote from: Suki on November 19, 2016, 09:17:30 AM
I am busy and no amount of passive-aggressive messages is going to change that. Sorry.


A simple yes or no answer to my previous post would have been just fine... I'm the one that feel sorry...
Title: Re: Hide Topics from Guests
Post by: niraj on September 19, 2018, 12:57:52 AM
Hello, Please provide support for this mod for 2.0.15 smf version as well.Thanks

Title: Re: Hide Topics from Guests
Post by: Kindred on September 19, 2018, 07:34:02 AM
It should work just fine on 2.0.15.

https://wiki.simplemachines.org/smf/How_can_I_install_a_mod_that_doesn%27t_work_in_my_SMF_version