News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

View Topic Permissions

Started by hadesflames, April 17, 2010, 12:57:54 PM

Previous topic - Next topic

hadesflames

Link to Mod

Package Information

Latest Version: 1.0
Created by: hadesflames
Built for: SMF 2.0 RC2
Package: View Topic Permissions


What is this?

This modification adds a permission so that the admin can decide if a member can view any topic, only his/her own topic, or no topics at all in certain, or all boards.

Alteration Log

Version 1.0

[!] Confirmed works with 2.0 RC3 - March 08, 2010
[!] Released on March 05, 2010.


Need Help?

If you need help with this modification, please don't hesitate to post in the support thread.

NOTE:
if you do not edit the permissions after installing, none of your members will be able to view any topics!

Bugo

Useful mod :)

Russian translation

Ryuoh

Thanks so much for this mod! I get an error though when i try to install it

   1.     Execute Modification     ./Sources/Display.php     Test successful
      1.    Add After    ./Sources/Display.php    Test successful
*    2.    Execute Modification    ./Sources/ManagePermissions.php    Test successful
      1.    Add Before    ./Sources/ManagePermissions.php    Test successful
      2.    Add Before    ./Sources/ManagePermissions.php    Test successful
*    3.    Execute Modification    ./Sources/MessageIndex.php    Test successful
      1.    Add After    ./Sources/MessageIndex.php    Test successful
      2.    Add After    ./Sources/MessageIndex.php    Test successful
*    4.    Execute Modification    ./Sources/News.php    Test successful
      1.    Replace    ./Sources/News.php    Test successful
      2.    Replace    ./Sources/News.php    Test successful
*    5.    Execute Modification    ./Sources/Printpage.php    Test successful
      1.    Replace    ./Sources/Printpage.php    Test successful
      2.    Add Before    ./Sources/Printpage.php    Test successful
*    6.    Execute Modification    ./Sources/Recent.php    Test failed
      1.    Add Before    ./Sources/Recent.php    Test successful
      2.    Replace    ./Sources/Recent.php    Test failed
*    7.    Execute Modification    ./Sources/Search.php    Test successful
      1.    Replace    ./Sources/Search.php    Test successful
      2.    Add After    ./Sources/Search.php    Test successful
*    8.    Execute Modification    ./Themes/default/Search.template.php    Test successful
      1.    Add After    ./Themes/default/Search.template.php    Test successful
      2.    Add After    ./Themes/default/Search.template.php    Test successful
*    9.    Execute Modification    ./Themes/default/languages/ManagePermissions.english.php    Test successful
      1.    Add Before    ./Themes/default/languages/ManagePermissions.english.php    Test successful
*    10.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful






$smcFunc['db_free_result']($request); // There might be - and are - different permissions between any and own. $permissions = array(
Replace[Select]
if(empty($context['posts'])) fatal_lang_error('recent_empty_error', false); $smcFunc['db_free_result']($request); // There might be - and are - different permissions between any and own. $permissions = array(

hadesflames

#3
You may have to make those changes to recent.php manually, as there may be another mod conflicting with your install. The mod installs fine on a vanilla SMF 2.0 RC3

Quote from: Bugo on April 18, 2010, 03:59:47 AM
Useful mod :)

Russian translation

Thanks for the translation, Russian has been added!

Ryuoh

ah it might be conflicting with one of these ill take a look and see if i can figure it out.

   TinyPortal      1.099       [ Uninstall ]  [ List Files ]  [ Delete ]
2.    Member Color Link    3.0.8    [ Uninstall ] [ List Files ] [ Delete ]
3.    SMF Arcade    2.5 RC1    [ Uninstall ] [ List Files ] [ Delete ]
4.    Aeva Media

hadesflames

Out of those mods, only Member Color Link edits recent.php, so you can have a look at that. Maybe installing view topic permissions first will work, if not you will have to manually install one of them.

Mitii

Hey Hades,

Any chance you could assist me with making the mod work like the 1.1.x version?: http://custom.simplemachines.org/mods/index.php?mod=794

I used that mod to make it so only certain membergroups could see every topic in the board, but people with the permission could ONLY see their topic. If they didn't have a topic in the board, it made it look like the board was empty.

tarpellia

Is it possible to add some additional functionality to this? Something along the lines of this mod? http://www.simplemachines.org/community/index.php?topic=142136.0

I'd like for everyone to be able to view sticky topics, but only for the poster (and moderators) to be able to view their  own topics, and to limit it so that the only topics viewable on the board's topic list are those posted by that user and the sticky topics.

I've searched through the mods, and there are several that combined will do what I need, but they aren't for 2.0. :(

Arantor

Or for a bigger version of it you could do worse than www.simpledesk.net for their helpdesk mod which is for 2.0 ;)
Holder of controversial views, all of which my own.

tarpellia

It's a nice system; perhaps a bit overkill for my needs though. :)

Thanks for the link. I'll check it out.

hadesflames

Quote from: Mitigation on April 22, 2010, 01:50:41 PM
Hey Hades,

Any chance you could assist me with making the mod work like the 1.1.x version?: http://custom.simplemachines.org/mods/index.php?mod=794

I used that mod to make it so only certain membergroups could see every topic in the board, but people with the permission could ONLY see their topic. If they didn't have a topic in the board, it made it look like the board was empty.

I would ask for help in the coding discussion board. (reason why stated below)

Quote from: tarpellia on April 22, 2010, 09:35:27 PM
Is it possible to add some additional functionality to this? Something along the lines of this mod? http://www.simplemachines.org/community/index.php?topic=142136.0

I'd like for everyone to be able to view sticky topics, but only for the poster (and moderators) to be able to view their  own topics, and to limit it so that the only topics viewable on the board's topic list are those posted by that user and the sticky topics.

I've searched through the mods, and there are several that combined will do what I need, but they aren't for 2.0. :(

I'm not really interested in adding more functionality to it than it has right now, mainly because I'm working on a bigger (much bigger) mod right now. Maybe in the future (though not likely)

tarpellia

I figured out a workaround using the topic approval system that will give me the privacy I need for this particular board. Good luck with your other mod!

Acans

For my forum you can still see the topics but just can't view them for replys, ect. Is it ment to be like this.

I was under the impression that it if only view your own topics was checked, you couldn't even see if other topics where made in that board?
"The Book of Arantor, 17:3-5
  And I said unto him, thy database query shalt always be sent by the messenger of $smcFunc
  And $smcFunc shall protect you against injections and evil
  And so it came to pass that mysql_query was declared deprecated and even though he says he is not
  dead yet, the time was soon to come to pass when mysql_query shall be gone and no more

hadesflames

Yes, the way I intended it to be was that you could only see your own topics (or none at all, depending on permissions) but you could still them inside the board.

Acans

is their a way to hide the other topics within the board if you do not have the permissions to see them?

The board type I want to setup is like a applications board, and i don't want others the ability to see if somebody else has submitted a application.
"The Book of Arantor, 17:3-5
  And I said unto him, thy database query shalt always be sent by the messenger of $smcFunc
  And $smcFunc shall protect you against injections and evil
  And so it came to pass that mysql_query was declared deprecated and even though he says he is not
  dead yet, the time was soon to come to pass when mysql_query shall be gone and no more

Bugo

Quote from: hadesflames on April 20, 2010, 11:30:25 PM
Quote from: Bugo on April 18, 2010, 03:59:47 AM
Useful mod :)

Russian translation

Thanks for the translation, Russian has been added!
Look at screenshot. It's not normal russian :) Please add both russian files - ansi & utf8 *.xml into package...

hadesflames

Quote from: α¢αηѕ on April 29, 2010, 11:14:42 PM
is their a way to hide the other topics within the board if you do not have the permissions to see them?

The board type I want to setup is like a applications board, and i don't want others the ability to see if somebody else has submitted a application.

It can be done, but it's not how the mod was intended to work, so I won't do it. But you can see how it gets hidden from action=recent for example in the recent.php file and try to do something similar for your boards.

Quote from: Bugo on April 30, 2010, 01:47:42 AM
Quote from: hadesflames on April 20, 2010, 11:30:25 PM
Quote from: Bugo on April 18, 2010, 03:59:47 AM
Useful mod :)

Russian translation

Thanks for the translation, Russian has been added!
Look at screenshot. It's not normal russian :) Please add both russian files - ansi & utf8 *.xml into package...

I'll take a look when I get home tonight.

Acans

Hey, I've just discovered a problem with the view topic permissions mod.

Its started causing errors in my forum whenever i try to navigate to the 2nd page of one of my boards. It gives this error.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't.id_member_started = 1
ORDER BY is_sticky DESC, id_last_msg DESC
LIMIT 20' at line 3
File: /home/blazesca/public_html/project377/Sources/MessageIndex.php
Line: 375


Can you please take a look at my MessageIndex.php?
"The Book of Arantor, 17:3-5
  And I said unto him, thy database query shalt always be sent by the messenger of $smcFunc
  And $smcFunc shall protect you against injections and evil
  And so it came to pass that mysql_query was declared deprecated and even though he says he is not
  dead yet, the time was soon to come to pass when mysql_query shall be gone and no more

the giox

Me too give the same error.

I have to de-install the mod.
When i click on the page 2 or 3 or other page i have the same error.
I can navigate only on the first page

Slug1

Anyone know if this mod is to be updated for v2.0?

Any other mod similar to what this one does developed that I can be pointed to?

Thank you!
Slug1--out

~My blessings are as many as the miles I marched all these years~

Advertisement: