Member Specific Permissions...

Started by Grudge, January 03, 2004, 06:47:42 PM

Previous topic - Next topic

allainsim45

#80
Package Member Specific Permissions can be updated to work with the version SMF 1.1.12

Extract the file MemberPerms_v1.32.mod from the archive.

Delete all the lines including following lines till the end of the file,
<edit file>
$sourcedir/ManageBoards.php
</edit file>
<search for>
// Delete any extra events in the calendar for this category.
db_query("
DELETE FROM {$db_prefix}calendar
WHERE ID_BOARD IN (" . implode(', ', $boards) . ')', __FILE__, __LINE__);
</search for>

<add after>
// Delete any member permissions for this
db_query("
DELETE FROM {$db_prefix}member_permissions
WHERE ID_BOARD IN (" . implode(', ', $boards) . ')', __FILE__, __LINE__);
</add after>

<search for>
// Delete any permissions associated with this board.
db_query("
DELETE FROM {$db_prefix}board_permissions
WHERE ID_BOARD = $_POST[boardid]", __FILE__, __LINE__);
</search for>

<add after>
// Delete any permissions associated with this board.
db_query("
DELETE FROM {$db_prefix}member_permissions
WHERE ID_BOARD = $_POST[ID_BOARD]", __FILE__, __LINE__);
</add after>


add these new lines, save and compile the archive

<edit file>
$sourcedir/Subs-Boards.php
</edit file>

<search for>
// Delete any extra events in the calendar.
db_query("
DELETE FROM {$db_prefix}calendar
WHERE ID_BOARD IN (" . implode(', ', $boards_to_remove) . ')', __FILE__, __LINE__);
</search for>

<add after>
// Delete any member permissions for this
db_query("
DELETE FROM {$db_prefix}member_permissions
WHERE ID_BOARD IN (" . implode(', ', $boards_to_remove) . ')', __FILE__, __LINE__);
</add after>

<search for>
// Delete any permissions associated with these boards.
db_query("
DELETE FROM {$db_prefix}board_permissions
WHERE ID_BOARD IN (" . implode(', ', $boards_to_remove) . ')', __FILE__, __LINE__);
</search for>

<add after>
// Delete any permissions associated with this board.
db_query("
DELETE FROM {$db_prefix}member_permissions
WHERE ID_BOARD IN (" . implode(', ', $boards_to_remove) . ')', __FILE__, __LINE__);
</add after>


;)




Illori

unless you have permission to modify the code/package for that mod please remove it from your post. smf policy is to not allow anyone unless they have permission to distribute others mods especially as by using your attachment no one is able to review the code to make sure it does not have problems.

allainsim45

package deleted
Am I at least authorized to post the part of code to be modified, then the package so leaving the obligation with the users to adapt this package  themself?

Illori

you can post the code sure, just not the complete package from what i understand.

Arantor

Correct, you can document the changes you made, but you can't distribute the fully modified version in any form without permission from the author.

* IncognitoMuse is formerly of the SMF Cust. team btw.
Holder of controversial views, all of which my own.


allainsim45

#85
Here is it is rectified in my first message, I hope that the author will be interested and that he will publish a new version
O:)

Thanks for all  ;)

Arantor

Quote from: allainsim45 on January 09, 2011, 06:28:58 PM
Here is it is rectified in my first message, I hope that the author will be interested and that he will publish a new version
O:)

Thanks for all  ;)

I doubt it, see that Grudge hasn't been actively around here for a while, and hasn't responded to messages as far as I know :(
Holder of controversial views, all of which my own.


Anastasia V Pergakis

#87
I really need this Mod for my forum. Thanks allain for the changes for SMF 1.1.12 but sadly it doesn't work for me. Is it because I originally downloaded 1.1.11 then simply did the update to 1.1.13? I even undid the 1.1.13 update to see if the changes made for the Member Specific Permissions package would work, but it didn't.

Is there something else I should be doing? I did email Grudge but no reply. Any help with this would be great. I'm still learning php and am brand new to SMF forums.

Thanks in advance for your help.

EDIT::::

Okay I figured out what was wrong. In my Subs-Boards.php file instead of this:

//Delete any member permissions for this board.

I had:

//Delete any memberpermissions for these boards.

So it caused an error. I simply did the full Mod by hand and it worked with the changes!

Thanks so much!

Advertisement: