coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: cavallino on October 16, 2005, 11:53:31 AM

Title: Phpbb Bridge: Restrict access Gallery only to users who make 1 Post in the Board
Post by: cavallino on October 16, 2005, 11:53:31 AM
Hello,
Is it possible to allow gallery access only to those users who makes at least 1 new post in the board?
My phpbb board is successfully integrated with coppermine but i would like to add also this feature.
Please if you can, help me...

Thanks
Title: Re: Phpbb Bridge: Restrict access Gallery only to users who make 1 Post in the B
Post by: Nibbler on October 16, 2005, 12:43:48 PM
Certainly possible, but I don't know the code required to obtain a reliable post count from phpbb.
Title: Re: Phpbb Bridge: Restrict access Gallery only to users who make 1 Post in the B
Post by: cavallino on October 16, 2005, 01:50:29 PM
Quote from: Nibbler on October 16, 2005, 12:43:48 PM
Certainly possible, but I don't know the code required to obtain a reliable post count from phpbb.

If you need, i can provide you with a link to a simple mod made for phpbb to allows the admin to define how many posts are needed to view a certain forum...That's the mod i installed in my board to make users write at least 1 post before access other areas. Inside the mod instructions there are certain parts that calls up the post count table...if you wanna have a look at it Just search in google this string < View forum postcount threshold > and you will find it in the 1st result.

But probably someone else more into phpbb bridge has done it already, I'm sure I will find a solution soon :)

Thanks for ur help
Title: Re: Phpbb Bridge: Restrict access Gallery only to users who make 1 Post in the Board
Post by: cavallino on October 20, 2005, 10:14:58 AM
anyone?  ::)
Title: Re: Phpbb Bridge: Restrict access Gallery only to users who make 1 Post in the Board
Post by: Nibbler on October 20, 2005, 10:43:01 AM
Open your bridge file, find

"SELECT user_id, username as user_name, user_level "

change both places to this

"SELECT user_id, username as user_name, user_level, user_posts "

Then in init.inc.php or in specific files you wish to enforce this, add


if ($USER_DATA['user_posts'] < 1) {
pageheader('Please post');
msg_box('Notice', 'You must post in the forum before you can access the gallery');
pagefooter();
exit;
}
Title: Re: Phpbb Bridge: Restrict access Gallery only to users who make 1 Post in the Board
Post by: cavallino on October 20, 2005, 02:06:21 PM
thanks nibbler! you're the best !!  ;D