[2.0.20] Topic Permissions

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
13
65%
Very Good
4
20%
Good
2
10%
Fair
0
No votes
Poor
1
5%
 
Total votes: 20

Swizec
Former Team Member
Posts: 1701
Joined: Mon Mar 10, 2003 9:42 pm
Location: Slovenia
Contact:

Post by Swizec »

Yes, but what version of it

because considering how long ago this was developed there is really no proper explanation as to why it wouldn't work O.o
Unless of course it's a matter of something not being backward compatible.
ptheyser
Registered User
Posts: 28
Joined: Tue Aug 01, 2006 10:59 pm

Post by ptheyser »

MySQL 4.0.27, according to my web host.
User avatar
Phant0m``
Registered User
Posts: 27
Joined: Mon Jun 06, 2005 7:55 pm

Post by Phant0m`` »

Hi

This is indeed a fantastic MOD, and she installed smoothly and error free.

There is one thing I hope would be improved upon unless it is something I’m overlooking here. When Guests don’t have the capability to Pass Protect a topic, the password and confirm password text along with its fields should be hidden from them when in Posting screen.
User avatar
Phant0m``
Registered User
Posts: 27
Joined: Mon Jun 06, 2005 7:55 pm

Post by Phant0m`` »

Posting page especially MODed makes this here MOD tad less then compact feel, and not user-friendly to have a feature showing that aren’t supported by their rights / level access.

So there is no quick convenient way to put a check code for user-level access and prevent these features of this here MOD from showing when under Guest and setup to refuse Guest passwording.. :?:
xcesiv
Registered User
Posts: 66
Joined: Sun Oct 22, 2006 7:27 am
Location: www.xcesiv.com
Contact:

Post by xcesiv »

i am having a problem with his mod.

I went in there and there is no labels on the options and no one can post or reply to a thread. can someone please help

Here is a screen dump of my ACP

Image
egypttpyge
Registered User
Posts: 57
Joined: Mon Feb 14, 2005 3:50 am

Post by egypttpyge »

xcesiv wrote: i am having a problem with his mod.

I went in there and there is no labels on the options and no one can post or reply to a thread. can someone please help


It looks like you didn't do the language file properly! Go over the Mod again make sure you didn't miss anything.
xcesiv
Registered User
Posts: 66
Joined: Sun Oct 22, 2006 7:27 am
Location: www.xcesiv.com
Contact:

Post by xcesiv »

we went through and replaced the files with the backup files from the day before so all good.

we wont be installing this mod again tho
User avatar
Roks
Registered User
Posts: 119
Joined: Thu Sep 14, 2006 1:15 am

Post by Roks »

Sounds Cool, is this 1.3.6 the latest version :?:
cybernet
Registered User
Posts: 34
Joined: Mon Jan 09, 2006 5:02 pm
Location: Romanian - i can't speak very well english so please excuse me
Contact:

Post by cybernet »

i read all the pages and i didn't find my error :(

Code: Select all

Error in posting

DEBUG MODE

SQL Error : 1064 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 '0, 1, 0, )' at line 1

INSERT INTO phpbb_topics (topic_title,topic_noguest, topic_noguest_level, topic_password, topic_pass_level, topic_description, topic_poster, topic_time, forum_id, topic_adminedit,topic_status, topic_type, topic_vote, enable_auto_lock) VALUES ('','', '', '', '', NULL, 2, 1162918789, 15, ,0, 1, 0, )

Line : 376
File : functions_post.php
i have installed more than 100 MODifications :oops:


what should i do` ?? and i can't view my topics :cry:
cybernet
Registered User
Posts: 34
Joined: Mon Jan 09, 2006 5:02 pm
Location: Romanian - i can't speak very well english so please excuse me
Contact:

Post by cybernet »

nobody knows nothig :cry: pls help me
lecky
Registered User
Posts: 3
Joined: Wed Dec 06, 2006 10:27 am

Post by lecky »

Hi,
Fatal error: Call to undefined function: check_topicban() in /home/codagagner/www/viewtopic.php on line 611

if ( ( ( $board_config['allow_tnologguest'] && $forum_topic_data['topic_noguest'] ) || $board_config['globalnoguestt'] ) && $userdata['user_id'] == ANONYMOUS )
{
// if this is a bot we let it through... people wanted this *shrugs*
if ( !user_is_bot( ) )
{
if ( $board_config['redirectnoguest'] )
{
redirect("login.$phpEx");
}
else
{
message_die ( GENERAL_MESSAGE, $lang['topic_noguest'] );
}
}
}
check_topicban ( $topic_id, TRUE );

$password = $forum_topic_data['topic_password'];
$pass_lvl = $forum_topic_data['topic_pass_level'];
$topic_logged = ( is_array( $userdata['log_topics'] ) ) ? array_search ( $forum_topic_data['topic_id'], $userdata['log_topics'] ) : FALSE;
$mod = FALSE;
if ( $pass_lvl == $userdata['user_level'] )
{
$mod = FALSE;
}
elseif ( $pass_lvl == USER && $userdata['user_level'] > USER )
{
$mod = TRUE;
}
if ( $userdata['user_level'] == ADMIN || !$board_config['enable_topicpass'] || ( $postrow[0]['user_id'] == ANONYMOUS && !$board_config['allow_guestpass'] ) )
{
$mod = TRUE;


line 611



I noticed that this error appears after having added the following code:
// mod topic permissions mod add
if ( ( ( $board_config['allow_tnologguest'] && $forum_topic_data['topic_noguest'] ) || $board_config['globalnoguestt'] ) && $userdata['user_id'] == ANONYMOUS )
{
// if this is a bot we let it through... people wanted this *shrugs*
if ( !user_is_bot( ) )
{
if ( $board_config['redirectnoguest'] )
{
redirect("login.$phpEx");
}
else
{
message_die ( GENERAL_MESSAGE, $lang['topic_noguest'] );
}
}
}
check_topicban ( $topic_id, TRUE );

$password = $forum_topic_data['topic_password'];
$pass_lvl = $forum_topic_data['topic_pass_level'];
$topic_logged = ( is_array( $userdata['log_topics'] ) ) ? array_search ( $forum_topic_data['topic_id'], $userdata['log_topics'] ) : FALSE;
$mod = FALSE;
if ( $pass_lvl == $userdata['user_level'] )
{
$mod = FALSE;
}
elseif ( $pass_lvl == USER && $userdata['user_level'] > USER )
{
$mod = TRUE;
}
if ( $userdata['user_level'] == ADMIN || !$board_config['enable_topicpass'] || ( $postrow[0]['user_id'] == ANONYMOUS && !$board_config['allow_guestpass'] ) )
{
$mod = TRUE;
}

if ( $topic_logged === FALSE && $password != '' && !$mod )
{
if ( !$board_config['allow_guesttlogin'] && $userdata['user_id'] == ANONYMOUS )
{
if ( $board_config['redirectnoguest'] )
{
redirect("login.$phpEx");
}
else
{
message_die ( GENERAL_MESSAGE, $lang['guest_nologin'] );
}
}
elseif ( !$userdata['user_allow_tlogin'] )
{
message_die ( GENERAL_MESSAGE, $lang['user_nologin'] );
}
elseif ( !isset($HTTP_POST_VARS['topic_login'] ))
{
$template -> assign_vars ( array (
'L_LOGIN' => $lang['Login'],
'L_PASSWORD' => $lang['Password'],

'MESSAGE_TITLE' => $lang['Login'],
'MESSAGE_TEXT' => $lang['topic_login'],

'S_LOGIN_ACTION' => append_sid ( "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id" )
) );

$template -> set_filenames ( array (
'login' => 'topic_login.tpl'
) );

$template->pparse('login');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

break;
}
else
{
$pass = md5 ( $HTTP_POST_VARS['topic_pass'] );
if ( $pass == $password )
{
$log_topics = $userdata['log_topics'];
$log_topics[count ( $log_topics ) + 1] = $topic_id;
//add this to session table
$sid = $userdata['session_id'];
$log_topics = implode ( ',', $log_topics );
$sql = "UPDATE " . SESSIONS_TABLE . " SET " .
"session_logged_topics='$log_topics' " .
"WHERE session_id='$sid' LIMIT 1";
$db -> sql_query ( $sql );
}
else
{
message_die ( GENERAL_ERROR, $lang['wrong_tpass'] );
}
}
}
elseif ( $topic_logged === FALSE && ( $mod || $password == '' ) )
{
$log_topics = $userdata['log_topics'];
$log_topics[count ( $log_topics ) + 1] = $topic_id;
//add this to session table
$sid = $userdata['session_id'];
$log_topics = implode ( ',', $log_topics );
$sql = "UPDATE " . SESSIONS_TABLE . " SET " .
"session_logged_topics='$log_topics' " .
"WHERE session_id='$sid' LIMIT 1";
$db -> sql_query ( $sql );
}
// mod topic permissions mod end


Thank :oops:
Kent157
Registered User
Posts: 1
Joined: Mon Mar 05, 2007 7:23 am

Post by Kent157 »

I deleted my message

:lol: :lol: :lol:
jkrise
Registered User
Posts: 3
Joined: Fri Feb 23, 2007 5:18 am

Re: [2.0.20] Topic Permissions - from a phpBB NooB

Post by jkrise »

Can I use this mod to set topic-wise permissions? Let me alaborate:

Users a, b, c, d, e and f are authorised users on 'Forum 1'.

Now, b wants to create a topic in Forum 1.. let's call it topic 1. For Topic 1, he wants to remove access to user e, but include access to user x, say.
That is, FOR THIS TOPIC 1, the authorised users are a, b, c, d, f and x.

Is this do-able at all with phpBB, and if so, is this the suitable 'MOD' I should be looking at?

TIA
Jkrise

(actually I posted this elsewhere and this MOD was referred by the helpful drathbun)
User avatar
tarotamerica
Registered User
Posts: 230
Joined: Thu Feb 22, 2007 10:30 am
Contact:

Re: [2.0.20] Topic Permissions

Post by tarotamerica »

You are advised to use EM in order to install this MOD.
Any reason why this is in the description? Is it because of the size of it?

I have many many MODs & can't really use EM.

Anyone tried installing by hand & what was your experience??

~tarot
Coincidences are God's way of remaining anonymous
—Albert Einstein
User avatar
tarotamerica
Registered User
Posts: 230
Joined: Thu Feb 22, 2007 10:30 am
Contact:

Re: [2.0.20] Topic Permissions

Post by tarotamerica »

I ran this MOD using EM on my test site. Then I check ed line-by-line to make sure I had the correctly modded viewtopic.php code written in.

I get this message, though (Same as the person above me):

undefined function: check_topicban() in [blahblahblah] viewtopic.php in line [500-and-something]

That person posted 9 months ago. Is this MOD abandoned?

Any ideas what I can do about this undefined error? without using EM on my active forum?
Coincidences are God's way of remaining anonymous
—Albert Einstein
Post Reply

Return to “[2.0.x] MOD Database Releases”

cron