Restrict thread & post visibility to Topic Starter & Team only in one board

Started by FireDitto, September 07, 2012, 10:51:39 PM

Previous topic - Next topic

FireDitto

Hi,

What I'd like to be able to do is make it so that on a selected board, if a member is to post they will be able to see, and respond, only to their own threads.

No one else but Moderators, G. Mods or Admin will be able to see all the threads/replies on the board in question.

>< Hopefully that makes sense.

Restricted Viewing Board A
Member X can see all threads they created, as well as any replies the Team may have posted in that thread.
Member Y can only see the thread they created, and any replies within.
Moderator Z can see ALL the threads in the board, as well as comment on them.
Member W cannot see anything, as they have not posted in that board.


Why I want this;

I want a board where members can submit their character profiles in privacy, and not have people gawking at the comments and exchanges between the Player and the Team as they made any required adjustments.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

live627

Thread privacy is not easy to implement. SMF has lots of places to cover, which is to be expected for modifying one of the flagship components.

Hj Ahmad Rasyid Hj Ismail

I think SimpleDesk is something like this. Have try it? One can post but it will shows to he himself and the admin. The admin can later make it public, if he wants it to. Sorry, if this is not what you want.

FireDitto

Ahh, true stuff.

I'll give it a try, see if I can't get it to work for me. Thank you =)
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Suki

Give this a try:  https://github.com/MissAllSunday/PrivateTopic  it needs testing before send it to the modsite.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

FireDitto

Hi Suki

It seems to have installed cleanly, but the redirect didn't end up pointing me anywhere and beyond setting the permissions for membergroups (done) I am unable to find where to turn it "on", since it isn't working.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

live627


FireDitto

Quote from: live627 on October 01, 2012, 04:02:42 AM


  • Thank you
  • Yes, actually, you do - "Enable the Private Topics mod" ;)


Couple of requests if it would be at all possible;
+ Admin accounts able to view an active list of who has access to see the restricted thread
+ Original Poster able to add or remove members from viewing rights via editing the original post.
+ Private thread PMs use the login name; it would be better if it used the 'Real name'

=) Those are just what I noticed straight up. But this is definitely something I'm after and I'd love to see it with the above list/editing rights added. That would make it perfect IMHO.

Thanks.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

FireDitto

What part of the code do I need to remove to make it so there is only the check box option?
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Suki

Quote from: FireDitto on October 01, 2012, 08:10:28 AM
What part of the code do I need to remove to make it so there is only the check box option?


You mean you don't want the global enable/disable option?

Quote

+ Admin accounts able to view an active list of who has access to see the restricted thread

That should be too difficult to do, it depends on where do you want to see that list, if it is on the topic itself, then the info is already there, its just a matter of adding a nice list to the template or using template layers to keep it sources only.

Quote
+ Original Poster able to add or remove members from viewing rights via editing the original post.

That should be already possible AFAIK, I read the pull request from Live on the weekend, I remember something about editing, will read the whole pull request and merge it to the master branch.

Quote
+ Private thread PMs use the login name; it would be better if it used the 'Real name'

Not so sure what you mean by thread pms. The SMF auto suggest script does work with the displayed name only. Usually, SMF uses the displayed name for links and stuff like that, thats why I used the displayed name to keep it consistent.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

FireDitto

Quote from: Suki on October 01, 2012, 12:18:29 PM
Quote from: FireDitto on October 01, 2012, 08:10:28 AM
What part of the code do I need to remove to make it so there is only the check box option?


You mean you don't want the global enable/disable option?

No, I wanted to be able to turn off the option to choose individual names. Eg, I have a membergroup labled 'Restricted' which can see all Private threads, as they're the only ones with the permission to do so. So they don't need to specify a membername as I don't want anyone not in that group to be able to view.

>< Does that make sense?

Quote
Quote
+ Admin accounts able to view an active list of who has access to see the restricted thread
That should be too difficult to do, it depends on where do you want to see that list, if it is on the topic itself, then the info is already there, its just a matter of adding a nice list to the template or using template layers to keep it sources only.
Just in side the thread would be fine, kind of like how you can turn on the 'Who is Viewing This Thread' to show the usernames when someone is in said thread; maybe something like;
Name, name, name  and 0 Guests are viewing this topic.
Private Viewing Permission: name, name, name etc.

Quote
Quote
+ Original Poster able to add or remove members from viewing rights via editing the original post.

That should be already possible AFAIK, I read the pull request from Live on the weekend, I remember something about editing, will read the whole pull request and merge it to the master branch.
I thought it should be, but it didn't appear to be possible when I was fiddling around with it on the test site. I tried as both the OP and as the Admin account.


Quote
Quote
+ Private thread PMs use the login name; it would be better if it used the 'Real name'

Not so sure what you mean by thread pms. The SMF auto suggest script does work with the displayed name only. Usually, SMF uses the displayed name for links and stuff like that, thats why I used the displayed name to keep it consistent.

When the PMs were sent to the accounts in question, they showed the login name rather than the display name in the pm, so it was "User123 has invited you to a private thread!" rather than "Test has invited you to a private thread!"
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

live627

Quote
No, I wanted to be able to turn off the option to choose individual names. Eg, I have a membergroup labled 'Restricted' which can see all Private threads, as they're the only ones with the permission to do so. So they don't need to specify a membername as I don't want anyone not in that group to be able to view.
They can post in their own dedicated board, can they not?

FireDitto

Quote from: live627 on October 02, 2012, 08:40:18 PM
Quote
No, I wanted to be able to turn off the option to choose individual names. Eg, I have a membergroup labled 'Restricted' which can see all Private threads, as they're the only ones with the permission to do so. So they don't need to specify a membername as I don't want anyone not in that group to be able to view.
They can post in their own dedicated board, can they not?

What has that got to do with anything? I want them to be able to post in the main boards, but keep their topics to themselves; just members of the approved groups allowed to view. I don't want them restricted to a different board.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5


FireDitto

LOL, you chill. I wasn't giving attitude. I was asking a simple question.

Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Suki

The mod just got a lot of improvements: https://github.com/MissAllSunday/PrivateTopics

Now covers  a lot more places and directly modifies queries when possible rather than initialize a new class for each topic checked. Uses the cache system too.

I know it is far more efficient to just create a new row on topics table, I'm aware of that.


As for the edits, you can simply left the users field empty and manage all via the permission to see any topics, will probably need to add a fix to at least add the topic starter if the users filed is left empty.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

FireDitto

Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

FireDitto

O_O At least one of my boards is completely missing now;


QuoteAn Error Has Occurred!
The database value you're trying to insert does not exist: topic

The topics can still be reached... but it's saying the board itself no longer exists or... something?! Help, please ;;

I can also view it as a guest; but not logged in as an Admin, or my members on their accounts.

there are four boards after going through them all:
    Weyrleader's Headquarters (id 42) (Admin only)
    Whiteboard (id 4) (everyone)
    Bulletiin Board (id 22) (everyone)
    Recycle Bin (id 41) (Admin only)

None of them have the mod allocated to work on them, but they are not the only boards that don't.
They are all Parent boards with children, and all the children boards work.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Suki

uh, perhaps was a missing edit on github, can you tell me the exact line where the error is, on the error log the line should appear.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Suki

OK, I committed a few fixes and to cover more places too, try the latest package from github.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

bigdy

I've successfully installed this mod but i can't seem to get it to work properly.

I have CHECKED "Enable the Private Topics mod".
Entered in my board ID: "19"
Set a custom text for the Board and MessageIndex last topic cell: Blank

Thought it might have been a problem with Pretty URLs so, in the settings of Pretty URLS, I set it to disabled. No difference.  Then I uninstalled PrettyURLs.  No difference.

Do I need to change user groups or board permissions in any fashion?

Mods installed:
Pretty URLs
Disable 'last edit by...' for Administrators
SimplePortal
Private Topics
Separate the sticky topics
SMFPacks Shoutbox
Auto Respond
Ohara YouTube Embed
Bad Behavior mod
Gravatar 4 SMF
SMFPacks WYSIWYG Editor
Custom Form Mod
Tapatalk SMF 2.0 RC5/Final Plugin
Spoiler Tag
AutoAward

THANKS

Suki

Welcome to SMF

What exactly is the problem? does your users can still see the private topics? did you configure the permissions?


* Suki should really submit the mod to the modsite as its confusing having to answer multiple topics
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

bigdy

Hello Suki,

First thank you for the welcome.  After I posted I saw that this was my first post :)  I also thank you for monitoring other threads.  I'm sure it would indeed be much easier for everyone if this had it's own thread.   

I found the problem!  After you replied back I went and poked around a bit more.  Here's what is happening:

The board ID of the forum I want to set to 'private' is "19" -  I entered "19" (no quotes) into the Private Topic settings page.  When I went back and browsed the forum today it seems the Private Topic was set to board ID"9". Somehow entering 19 into the settings makes the module apply the setting to board ID 9.  Additionally, changing it to "9" results in the Private Topic being applied to board ID 9. 

Make sense?

Suki

Well, the mod does check and make sure you only enter a valid number, that is, if you enter "19"  the mod will change it to just 19, this is made to avoid possible errors since a lot of peoplr do actually enter things like "19"  or board 19  or 19.0, etc.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

bigdy

This is not what happened though.

I entered board id:
19

No quotes or anything.  Just the number 19. 19 is a valid board and the board it should have been applied to. 

For some reason, however, Private Topic applied the setting to Board ID 9.  Like it didn't even register the 1.


Suki

Does the setting still displays 9 ?

You can simply enter 19 and hit save, the mod will no longer assign private topics to board 9 but will now assign private topics to board 19.

It might be the case that you hit 1 but the number never appeared on the text field as there is no way the mod can skip a valid number, the regex simply cannot perform that, it was designed to only allows numbers from 1 to 9 and 0, meaning 19, 9 119 or 1119 are all valid numbers.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

FireDitto

Quote
An Error Has Occurred!
The database value you're trying to insert does not exist: topic

It's still cropping up. I don't know where or why. It's not telling me more than that which I quoted and I am not a coder to find out for you.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Suki

Who said something about doing my job for me?
You don't need to be a coder to find out, its as simple as telling me what are you doing the moment the error appear.

I don't remember at first glance what caused the error but I def know I fixed it (I checked my local repo to see if there was some commits that weren't sent to github but there isn't any, meaning the latest version is on github) so please do try the latest version on github, you don't say if you actually tried it already, perhaps I should figure it out that too?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

FireDitto

There is no need to be snippy!
I did install the new one; I thought that would be obvious.

I was responding to THIS request last time I said that the same thing was happening;
Quote from: Suki on October 19, 2012, 08:33:42 AM
uh, perhaps was a missing edit on github, can you tell me the exact line where the error is, on the error log the line should appear.

The error log says;

QuoteApply Filter: Only show the error messages of this URL
http://rohsii.dreamscaperpgs.net/index.php?board=27.0
Apply Filter: Only show the errors with the same message
The database value you're trying to insert does not exist: topic
Function: doGet
Apply Filter: Only show the errors from this file
File: /home/<removed>/public_html/rohsii/Sources/PrivateTopics.php
Line: 112


I also get this error if I do not insert at least one member name to the invitation part;
Quotehttp://rohsii.dreamscaperpgs.net/index.php?action=post2;start=0;board=1
Apply Filter: Only show the errors with the same message
The database value you're trying to insert does not exist: users
Function: doSave
Apply Filter: Only show the errors from this file
File: /home/<removed>/public_html/rohsii/Sources/PrivateTopics.php
Line: 74
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Suki

Not, its not obvious, I will still assume you have the previous mod installed until you tell otherwise as you having the old mod is the only reliable info you provided me, I cannot assume or make assumptions on what you already did, thats why I ask for all details.


About the $topic error, you still have some code let from the old installation, I checked the current one and all instance of $pt->doGet(); are precedeed by the call to the class, for example:

$pt = new PrivateTopics($context['latest_post']['topic']);
         $ptCache = $pt->doGet();

That is, every call to the class PrivateTopics must pass a valid topic ID, in the example above, the topic ID its $context['latest_post']['topic']

So please do check that all the calls made like this:  new PrivateTopics  are indeed passing a value between ()  you can do this with any code editor or even a text editor that has a search function.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Suki

OK, I was able to reproduce the $topic issue.  The issue was because you tried to edit a topic that wasn't marked as private but was in a board marked for private topics.

I committed a fix for that, now the mod will perform the update only if there was a previous record on the private topics table.

I also added the possibility to left the text box empty, meaning only the topic starter will be added to the lsit of users capable of seen the topic and of course the people with permissions.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

FireDitto

Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

FireDitto

Okay! Installed the latest edition and I have the following;

Quote
An Error Has Occurred!
The database value you're trying to insert does not exist: topic_id

I didn't type in a User ID number, and the above error cropped up. It still posted, it just tossed up the error page rather than going to view the topic. As a result it doesn't list the topic as private and editing it to make it private doesn't 'stick'.


Entering a username into the "Type the user ID" worked perfectly, and upon editing it has the check box ticked, and the ID's of the two accounts in question listed.


Selected boards are still vanishing however;
Quote
An Error Has Occurred!
The database value you're trying to insert does not exist: topicp.

I can't seem to find anything in particular that links them together to suggest why they would all be bringing up that error. Some of them are listed as 'Read Only', some are 'Default'

Ah! They're all boards with children! The children boards themselves work -- UNLESS they have a child as well.



Also, regarding this post (below) I have no idea what you mean :/ Code-talk generally goes over my head. Is it still relevant to the latest update?

Quote from: Suki on November 21, 2012, 04:41:04 PM
About the $topic error, you still have some code let from the old installation, I checked the current one and all instance of $pt->doGet(); are precedeed by the call to the class, for example:

$pt = new PrivateTopics($context['latest_post']['topic']);
         $ptCache = $pt->doGet();

That is, every call to the class PrivateTopics must pass a valid topic ID, in the example above, the topic ID its $context['latest_post']['topic']

So please do check that all the calls made like this:  new PrivateTopics  are indeed passing a value between ()  you can do this with any code editor or even a text editor that has a search function.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Unruler

Mod seems to work fairly randomly for me.

Sometimes it gives me the message:

An Error Has Occurred!
The database value you're trying to insert does not exist: topic_id


Even though it will create the thread.

And I managed to hide only one topic out of five created. I checked for guest. I've tried to edit created threads so checkbox to make it private would be ticked but it appears to be un-ticked every time I edit the thread again. Then I tried to insert my username ID, but that didn't help either.

So all in all I managed to hide just one thread and I'm not sure how that happened.

Suki

Quote from: Unruler on December 06, 2012, 10:14:48 AM
Mod seems to work fairly randomly for me.

Sometimes it gives me the message:

An Error Has Occurred!
The database value you're trying to insert does not exist: topic_id


Even though it will create the thread.

And I managed to hide only one topic out of five created. I checked for guest. I've tried to edit created threads so checkbox to make it private would be ticked but it appears to be un-ticked every time I edit the thread again. Then I tried to insert my username ID, but that didn't help either.

So all in all I managed to hide just one thread and I'm not sure how that happened.

did you tried the last version updated on github?  if not, download the mod again, uninstall it and install the new version. It should cover the whole topic_id error.

Quote from: FireDitto on November 26, 2012, 08:06:34 PM
I didn't type in a User ID number

how exactly did you enter the number?

gotta check the child boards issue, they are usually a real pain to deal with.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

FireDitto

Quote from: Suki on December 06, 2012, 03:15:14 PM

Quote from: FireDitto on November 26, 2012, 08:06:34 PM
I didn't type in a User ID number

how exactly did you enter the number?

Um, not the ID number, so much as a member's user-name and it brings up a drop-down that you click and it adds it similar to the PM system. If I don't put at least one other member's name in before clicking to post the topic, it results in the error popping up, and the topic not being privatised when I go back and check it.


Quotegotta check the child boards issue, they are usually a real pain to deal with.
Not surprised >< Good luck
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Unruler

Quote from: Suki on December 06, 2012, 03:15:14 PM
did you tried the last version updated on github?  if not, download the mod again, uninstall it and install the new version. It should cover the whole topic_id error.

I'm pretty sure I did. Since there is no other way to get older version and the last update to files was made 14 days ago, I tried it at 5th of December which is two days ago.

Suki

Quote from: Unruler on December 07, 2012, 09:01:04 AM
Quote from: Suki on December 06, 2012, 03:15:14 PM
did you tried the last version updated on github?  if not, download the mod again, uninstall it and install the new version. It should cover the whole topic_id error.

I'm pretty sure I did. Since there is no other way to get older version and the last update to files was made 14 days ago, I tried it at 5th of December which is two days ago.


And cna I ask you how exactly did you create those topics?  the exact steps you made?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Unruler

Quote from: Suki on December 07, 2012, 10:59:37 AM
Quote from: Unruler on December 07, 2012, 09:01:04 AM
Quote from: Suki on December 06, 2012, 03:15:14 PM
did you tried the last version updated on github?  if not, download the mod again, uninstall it and install the new version. It should cover the whole topic_id error.

I'm pretty sure I did. Since there is no other way to get older version and the last update to files was made 14 days ago, I tried it at 5th of December which is two days ago.

And cna I ask you how exactly did you create those topics?  the exact steps you made?

I just went into category and pushed create topic then I ticked the checkbox with make this topic private on it. I've tried to add my name in the field with user ID and I've tried to go with just a checkbox. But it worked only once for some reason...

Suki

The topic creator is already added to the list of persons capable of see the topic so you don't need to type your name on it, try adding someone else name, the mod includes an autosuggest feature that will detect the name your type and will give you possible usernames.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Unruler

Quote from: Suki on December 07, 2012, 11:52:45 AM
The topic creator is already added to the list of persons capable of see the topic so you don't need to type your name on it, try adding someone else name, the mod includes an autosuggest feature that will detect the name your type and will give you possible usernames.

Now, I'm trying it after reinstallation of a mod and it works. Except if I edit topics and change the tick in the checkbox the settings won't change.

Prime32

This mod interests me greatly, but the link is dead. Any chance you could post another?

Suki

I upload a new version tomorrow, it looks like I finally hunted down the annoying bug with childboards and grandchilds boards, it is not a pretty fix though.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Suki

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

Prime32

Thank you. I had to modify an "AND" to "WHERE" before it would install on a base 2.0.1 setup, but I assume that's something from 2.0.2+.

Is there any way to give the Moderator membergroup access to the "Can always see private topics" permission? i.e. let local moderators see private topics, but only in the sections they moderate.

Suki

Yes, since 2.0.3 introduces a change on SSI.php, the current package won't work on a 2.0.2 or lower versions.

You can apply permission groups for your boards independently, you can create a permission group where moderators can have the "Can always see private topics" permission and apply that to some board, this board will have custom permissions that won't be available outside that board
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Prime32

If you mean Permission Profiles, the permission isn't available there for Moderators (as in, the people you select when creating a board, membergroup 3) any more than in general. A standard group like Global Moderator doesn't accomplish what I wanted to do. :-\

I was looking to enable Private Topics on a few dozen boards, each used for a game, where the Game Master is a local mod and can see all private topics; however, the GM of one game board may be a player in others, and shouldn't be able to see private topics there. I could do this by creating a membergroup and permission profile for each board, but that's both messy and tedious.

FireDitto

Apologies if you haven't attacked the error yet, but I saw the files have been updated so I installed and gave it a shot. It is still not loading the parent boards; Children work if they don't have their own children, otherwise the grandchildren work, but any board that is a parent isn't loading still.

An observation (not an issue to me but I'll mention it) if a Private topic is the last on a board, it naturally shows up to those that can see it - however, for those that can't, the "last post" block is completely empty. That could be related to the error cropping up with parent boards. I haven't looked into it, but I can poke around on my forum and see if you want :)

Hope you had a good holiday!
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Suki

Quote from: Prime32 on February 01, 2013, 07:59:07 PM
If you mean Permission Profiles, the permission isn't available there for Moderators (as in, the people you select when creating a board, membergroup 3) any more than in general. A standard group like Global Moderator doesn't accomplish what I wanted to do. :-\

I was looking to enable Private Topics on a few dozen boards, each used for a game, where the Game Master is a local mod and can see all private topics; however, the GM of one game board may be a player in others, and shouldn't be able to see private topics there. I could do this by creating a membergroup and permission profile for each board, but that's both messy and tedious.

There is no reason why the permissions shlund't appear, there are regular permissions that are ported to permissions profiles just like any other.

Quote from: FireDitto on February 03, 2013, 02:00:54 AM
Apologies if you haven't attacked the error yet, but I saw the files have been updated so I installed and gave it a shot. It is still not loading the parent boards; Children work if they don't have their own children, otherwise the grandchildren work, but any board that is a parent isn't loading still.

An observation (not an issue to me but I'll mention it) if a Private topic is the last on a board, it naturally shows up to those that can see it - however, for those that can't, the "last post" block is completely empty. That could be related to the error cropping up with parent boards. I haven't looked into it, but I can poke around on my forum and see if you want :)

Hope you had a good holiday!

Is this the same issue or another?

There should be no error since I moved the logic from the sources to the template, child boards are loaded intact and is in the template where the logic is applied.

I need more details... like the exact error or a demo forum where I can see the error, "doesn't show" isn't exactly helpful.

The last post field been empty is part of the fix, if a topic is private then it shouldn't appear, makes no sense to show it to those who can't see private topics.  And no, showing the "las topic a person can see" is just too much, will eat too much resources and this mod already hurts performance with all those LEFT JOINs.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Prime32

Quote from: Suki on February 03, 2013, 08:50:38 AMThere is no reason why the permissions shlund't appear, there are regular permissions that are ported to permissions profiles just like any other.
It shows up under "General Permissions", a section which the Moderator group and profile groups don't have.
EDIT: That is, the heading above "Default Board Profile Permissions" which contains permissions like "Read personal messages"; not the tab next to Board Permissions/Edit Profiles/Settings.

FireDitto

Quote from: Suki on February 03, 2013, 08:50:38 AM
Is this the same issue or another?

There should be no error since I moved the logic from the sources to the template, child boards are loaded intact and is in the template where the logic is applied.

I need more details... like the exact error or a demo forum where I can see the error, "doesn't show" isn't exactly helpful.

It is the same issue. I've included an image showing a series of screenshots down from parent board through to the grandchild so that you can see what I am talking about.

I uninstalled, re downloaded and reinstalled the mod in case I'd been a dweeb and installed the wrong one, but I am receiving the same error. Everything installed clean - or, rather, there were no alerts and aside from the boards not functioning correctly, I'm not having any issues.


The Error Log is reading;

Type of error: Critical
URL: {Site}/index.php?board=61.0
message: The database value you're trying to insert does not exist: topic
Function: doGet
File: {details}/Sources/PrivateTopics.php
Line: 112

lines 101 to 122; the ); on its own is line 112

	
	
/* Use the cache when possible */
	
	
if ((
$this->_return cache_get_data(self::$name .':'$this->_topic120)) == null)
	
	
{
	
	
	
$this->_request $smcFunc['db_query']('''
	
	
	
	
SELECT users, topic_id
	
	
	
	
FROM {db_prefix}private_topics
	
	
	
	
WHERE topic_id = {int:topic}
	
	
	
	
LIMIT 1'
,
	
	
	
	
array(
	
	
	
	
	
'topic' => $this->_topic,
	
	
	
	
)
	
	
	
);

	
	
	
$temp $smcFunc['db_fetch_assoc']($this->_request);

	
	
	
if (!empty(
$temp))
	
	
	
	
$this->_return explode(','$temp['users']);

	
	
	
else
	
	
	
	
$this->_return 'no';

	
	
	
	
/* Cache this beauty */
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Suki

Unfortunately, a screenshot does not help, I need to know how you setup your boards, if the parent is an empty shell of does contain post, if the child is an empty shell or does contain post.

I need ot knoe in roder to properly reproduce this, I checked the last fix with grandchilds and I couldn't reproduce this.

The error is not on the code you posted, that is just where it shows and its only showing that $this->_topic is empty which shouldn't be.

Function doGet() is called in several files, without knowing which specific file/action is not passing the topic ID it would be pretty difficult to address this, specially if I already moved the logic from sources, meaning there is absolutely no way for an error like that to appear.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Suki

OK, I'm going to start all over with this, the separate table approach wasn't the best approach, might be better to add another column to the topics table to avoid all those nasty LEFT JOINS.

I'm still unsure about how to handle grandchild boards, all the ideas I have for it are rather ugly since I do not wish to re-factor the entire function, that will only cause more things to break since there is no modularity.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

pastorvictor

Thank you for trying, Suki. I am following the progress of this mod. I really need this in one of my boards, as I'd like my staff to offer private counseling/advice to members but not through PM. Good luck!

Suki

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

Advertisement: