Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: "Advanced" phpBB integration? (going into evil/twi  (Read 10942 times)

0 Members and 1 Guest are viewing this topic.

DefenceTalk.com

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 230
    • http://www.defencetalk.com
"Advanced" phpBB integration? (going into evil/twi
« on: January 20, 2004, 05:56:04 pm »

Hi, got another twisted idea to further the board integration already in place.

Here is what I want to get out of this.

Current situation:

Only registered people can see the full sized images... a person can register, login and go to the gallery and look at any pic he wants. Fair enough.

Proposed "advanced" feature request:

How great would it be to regulate who has the right to see full size picture depending on # of posts they have made to the integrated board?

Since board groups are also integrated into the gallery, I can make a group called "50-posts" and take away ALL of its permissions in CM group management - then they wont be able to post comments, rate pics, etc...  When the user has more than 50 posts, they automatically(through a phpbb mod) are put into "regular member" group and have regular member permissions. This can also be done by having the member apply to "regular member" group and then the admin approving.

What u think?  :twisted: evil idea? confused? :(
Logged
(http://www.defencetalk.com/pictures/signature_cpg.php)

Nibbler

  • Guest
"Advanced" phpBB integration? (going into evil/twi
« Reply #1 on: January 20, 2004, 07:26:57 pm »

How about this:

You make a rank in phpbb with minimum post requirement of 50.

You change displayimage.php like this:

find:

Code: [Select]

    if (isset($image_size['reduced'])) {
        $winsizeX = $CURRENT_PIC_DATA['pwidth'] + 16;
        $winsizeY = $CURRENT_PIC_DATA['pheight'] + 16;
        $pic_html = "<a href=\"javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
        $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title; //added by gaugau
        $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
        $pic_html .= "</a>\n";
    } else {


alter it to:

Code: [Select]

if (isset($image_size['reduced'])) {
        $winsizeX = $CURRENT_PIC_DATA['pwidth'] + 16;
        $winsizeY = $CURRENT_PIC_DATA['pheight'] + 16;
        $rankcheck = mysql_fetch_array(db_query("SELECT user_rank FROM phpbb_users WHERE user_id=" .USER_ID));
        if ($rankcheck[user_rank] == 2) {
            $fpu = "displayimage.php?pid=$pid&fullsize=1";
        } else {
            $fpu = "bleh.html";
        }
        $pic_html = "<a href=\"javascript:;\" onClick=\"MM_openBrWindow('".$fpu."','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
        $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title; //added by gaugau
        $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
        $pic_html .= "</a>\n";
    } else {


(instead of 2 use the id of the rank you created.)

use bleh.html to display a message about insufficient posts.

 :)
Logged

DefenceTalk.com

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 230
    • http://www.defencetalk.com
"Advanced" phpBB integration? (going into evil/twi
« Reply #2 on: January 20, 2004, 07:30:47 pm »

that was fast... :D i ll try it once i get home. I am tempted to try it now though!  :lol:

thanks
Logged
(http://www.defencetalk.com/pictures/signature_cpg.php)

DefenceTalk.com

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 230
    • http://www.defencetalk.com
"Advanced" phpBB integration? (going into evil/twi
« Reply #3 on: January 20, 2004, 08:01:12 pm »

I tried and gives this error:

There was an error while processing a database query  

for some pics that require extra click for another window to open the FULL size pic but does not give that error for pics that do not require extra click....  :shock:
Logged
(http://www.defencetalk.com/pictures/signature_cpg.php)

Nibbler

  • Guest
"Advanced" phpBB integration? (going into evil/twi
« Reply #4 on: January 20, 2004, 08:21:21 pm »

Turn on debug mode, try again, post the error msg this time.

Also if your phpbb users table is not called phpbb_users you will need to change that.
Logged

DefenceTalk.com

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 230
    • http://www.defencetalk.com
"Advanced" phpBB integration? (going into evil/twi
« Reply #5 on: January 20, 2004, 08:26:44 pm »

Well its not going for the phpbb database... its looking for the user in pictures/cm database!


error:

While executing query "SELECT user_rank FROM phpbb_users WHERE user_id=3" on 0

mySQL error: Table 'defence_pictures.phpbb_users' doesn't exist
Logged
(http://www.defencetalk.com/pictures/signature_cpg.php)

Nibbler

  • Guest
"Advanced" phpBB integration? (going into evil/twi
« Reply #6 on: January 20, 2004, 08:32:55 pm »

So change it to defence_xmb2.phpbb_users then ( im guessing that is where your phpbb db is ;) )
Logged

DefenceTalk.com

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 230
    • http://www.defencetalk.com
"Advanced" phpBB integration? (going into evil/twi
« Reply #7 on: January 20, 2004, 08:47:13 pm »

yeah.... how did u guess. :D
Logged
(http://www.defencetalk.com/pictures/signature_cpg.php)

DefenceTalk.com

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 230
    • http://www.defencetalk.com
"Advanced" phpBB integration? (going into evil/twi
« Reply #8 on: January 20, 2004, 08:55:07 pm »

well it works.  8) But does it take "special ranks" into consideration.... ?
Logged
(http://www.defencetalk.com/pictures/signature_cpg.php)

DefenceTalk.com

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 230
    • http://www.defencetalk.com
"Advanced" phpBB integration? (going into evil/twi
« Reply #9 on: January 20, 2004, 09:10:25 pm »

well, kinda confusing the ranks now.

i have private = 1 (id=3) post and then after that its Lance Corporal = 51 (id=4) posts...i want everyone all Lance Corporals and UP see the full size pic... :D

when i put in id 3 it doesnt allow me and when i put in id 4, it still does not allow me to see the full size pic.
Logged
(http://www.defencetalk.com/pictures/signature_cpg.php)

Nibbler

  • Guest
"Advanced" phpBB integration? (going into evil/twi
« Reply #10 on: January 20, 2004, 09:22:57 pm »

Well you could try this:

Code: [Select]


if ($rankcheck[user_rank] > 3)
 


to stop anyone with a rank 3 or below seeing the full size pics, you'll just have to play with it depeding on how your ranks work.
Logged
Pages: [1]   Go Up
 

Page created in 0.034 seconds with 20 queries.