ÖffneDinseprinz hat geschrieben:Und ist es möglich, nur ein Channel anzubieten? Bei mir führt er nämlich auch sämtliche Foren auf. Habe schon in der lib/config.php gesucht aber nix gefunden.
CustomAJAXChat.php
Finde und füge alle Teile zwischen Begin und End ein
Code: Alles auswählen
[code]function &getChannels() {
		if($this->_channels === null) {
			global $auth;
//############################--BEGIN--##########################################
$channels = array('Technics'=>1111, 'Coding'=>2222, 'Fun'=>3333);
//############################--END--###########################################
			$this->_channels = array();
			$allChannels = $this->getAllChannels();
			foreach($allChannels as $key=>$value) {
				// Check if we have to limit the available channels:
				if($this->getConfig('limitChannelList') && !in_array($value, $this->getConfig('limitChannelList'))) {
					continue;
				}
				// Add the valid channels to the channel list (the defaultChannelID is always valid):
				if($value == $this->getConfig('defaultChannelID') || $auth->acl_get('f_read', $value)) {
					$this->_channels[$key] = $value;
				}
			}
//############################--BEGIN--##########################################
$this->_channels = array_merge($this->_channels, array('Technics'=>1111, 'Coding'=>2222, 'Fun'=>3333));
//############################--END--###########################################
		}
		return $this->_channels;
	}
	// Store all existing channels
	// Make sure channel names don't contain any whitespace
	function &getAllChannels() {
		if($this->_allChannels === null) {
			global $db;
	        $this->_allChannels = array();
			// Get valid phpBB forums:
			$sql = 'SELECT
							forum_id,
							forum_name
						FROM
							'.FORUMS_TABLE.'
						WHERE
							forum_type=1
						AND
							forum_password=\'\';';
			$result = $db->sql_query($sql);
			$defaultChannelFound = false;
			while ($row = $db->sql_fetchrow($result)) {
				$forumName = $this->trimChannelName($row['forum_name']);
				$this->_allChannels[$forumName] = $row['forum_id'];
				if(!$defaultChannelFound && $row['forum_id'] == $this->getConfig('defaultChannelID')) {
					$defaultChannelFound = true;
				}
			}
			$db->sql_freeresult($result);
			if(!$defaultChannelFound) {
				// Add the default channel as first array element to the channel list:
				$this->_allChannels = array_merge(
					array(
						$this->trimChannelName($this->getConfig('defaultChannelName'))=>$this->getConfig('defaultChannelID')
					),
					$this->_allChannels
				);
			}
//############################--BEGIN--##########################################
$this->_allChannels = array_merge($this->_allChannels, array('Technics'=>1111, 'Coding'=>2222, 'Fun'=>3333));
//############################--END--###########################################
		}
		return $this->_allChannels;
	}Wenn du nur einen Channel haben willst, dann logischerweise nur so.
Code: Alles auswählen
('Technics'=>1111);Öffne
config.php
und passe die Anteile die zwischen Begin und End stehen ein, bzw, füge noch nicht vorhandene Anteile ein.
Code: Alles auswählen
//############################--BEGIN--#########################################
// Default channelName used together with the defaultChannelID if no channel with this ID exists:
// $config['defaultChannelName'] = 'Public';
$config['defaultChannelName'] = 'Technics';
// ChannelID used when no channel is given:
// $config['defaultChannelID'] = 0;
$config['defaultChannelID'] = 1111;
// Defines an array of channelIDs (e.g. array(0, 1)) to limit the number of available channels, will be ignored if set to null:
// $config['limitChannelList'] = null;
$config['limitChannelList'] = array(1111, 2222, 3333);
//############################--END--###########################################Dort mal bitte gelegentlich einkehren
 
 lg
4seven
 
  
 


