IP.Board Plugin Update

Discussion in 'Integration' started by jenolan, Feb 11, 2008.

  1. jenolan

    jenolan aMember Coder

    Joined:
    Nov 3, 2006
    Messages:
    510
    I have sent an update for the plugin to the guyz .. dunno how long until it is availabl but a simple patch is all that is needed. I have modified both my Advanced plugin (available on my site) and the basic one so that 'forbidden' groups do not appear in the drop downs.

    Open {amember}/plugins/protect/ipb22/ipb22.inc.php
    Find the function get_groups() and replace the whole function with;
    Code:
    	function get_groups()
    	{
    		$ipb22_table = $this->ipb22_get_table();
    		$x = "";
    		if( ! $this->config[ 'admin' ] )
    		{
    			$x = "WHERE (g_access_cp = 0 OR g_access_cp IS NULL) AND g_id <> 2";
    
    		}
    		$q = $this->query( $s = "SELECT g_id,g_title
    									FROM {$ipb22_table}groups
    									{$x}
    							", $ignore_error=1
    						);
    		$res = array();
    		while( list( $i, $s ) = mysql_fetch_row( $q ) )
    		{
    			if( ! in_array( $i, (array) $this->config[ 'denied_levels' ] ) )
    			{
    				$res[$i] = $s;
    			}
    		}
    	}
    

Share This Page