News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Hide Topics from Guests

Started by Suki, January 22, 2010, 09:56:02 AM

Previous topic - Next topic

Suki

New version:

Changelog
3.0 - 6 January 2012
- Added support for Profile and Print pages.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Arantor

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.

punchy

#102
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??

Suki

Attach you Sources/Load.php and Sources/Who.php files here
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

punchy


OCJ

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

Suki

Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

punchy

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   ;)

Suki

Who.php had some code left by the mod, I just removed that code.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

punchy


CSRM

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!"):



What i say/want is field above "Prijava" (on CRO, "Log in" ENG).
I hope so that u understand what i want  :)
My forum has been kidnapped by people i trusted most

shubha

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.



Suki

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);
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Kochan

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

Suki

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
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Adrek

How to use this mod only in selected boards?
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

Suki

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.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Adrek

Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

sportscenterisnext

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.

Suki

Hi, this mod doesn't modify the WYSIWYG editor nor the posting page.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Advertisement: