Seite 1 von 1

img für Gäste nicht anzeigen

Verfasst: 22.11.2008 18:45
von dennist
Kann man bei phpbb3 irgendwo einstellen, dass Bilder, die mittels dem bbCode "img" angezeigt werden für Gäste nicht sichtbar sind?

Gruß Dennis

Verfasst: 23.11.2008 01:08
von 4seven

Verfasst: 23.11.2008 17:28
von BaerchenHH
Ich weiß nicht, ob es der gleiche Code wie beim HideContent MOD ist, aber ich hab es für Gäste generell ausgeblendet:

--- Öffne ---
includes/bbcode.php

--- Suche ---

Code: Alles auswählen

	/**
	* Return bbcode template
	*/
	function bbcode_tpl($tpl_name, $bbcode_id = -1, $skip_bitfield_check = false)
	{
		static $bbcode_hardtpl = array();
		if (empty($bbcode_hardtpl))
		{
			global $user;
			
			$bbcode_hardtpl = array(
				'b_open'	=> '<span style="font-weight: bold">',
				'b_close'	=> '</span>',
				'i_open'	=> '<span style="font-style: italic">',
				'i_close'	=> '</span>',
				'u_open'	=> '<span style="text-decoration: underline">',
				'u_close'	=> '</span>',
				'img'		=> '<img src="$1" alt="' . $user->lang['IMAGE'] . '" />',
				'size'		=> '<span style="font-size: $1%; line-height: normal">$2</span>',
				'color'		=> '<span style="color: $1">$2</span>',
				'email'		=> '<a href="mailto:$1">$2</a>'
			);
		}
--- Ersetze mit ---

Code: Alles auswählen

	/** 
	* Return bbcode template 
	*/ 
	function bbcode_tpl($tpl_name, $bbcode_id = -1, $skip_bitfield_check = false) 
	{
		static $bbcode_hardtpl = array();    
		if (empty($bbcode_hardtpl)) 
		{
			global $user; 
		if ($user->data['user_id'] == ANONYMOUS) 
		{
			$bbcode_hardtpl = array(
				'b_open'	=> '<span style="font-weight: bold">',
				'b_close'	=> '</span>',
				'i_open'	=> '<span style="font-style: italic">',
				'i_close'	=> '</span>',
				'u_open'	=> '<span style="text-decoration: underline">',
				'u_close'	=> '</span>',
				'img'	=> '<img src="' . $phpbb_root_path . 'images/no_pics.JPG" width="90" height="90" alt="Nur Mitglieder k&ouml;nnen dieses Bild sehen !" />',
				'size'		=> '<span style="font-size: $1%; line-height: normal">$2</span>',
				'color'		=> '<span style="color: $1">$2</span>',
				'email'		=> '<a href="mailto:$1">$2</a>'
			);
		}
	else
		{
			$bbcode_hardtpl = array(
				'b_open'	=> '<span style="font-weight: bold">',
				'b_close'	=> '</span>',
				'i_open'	=> '<span style="font-style: italic">',
				'i_close'	=> '</span>',
				'u_open'	=> '<span style="text-decoration: underline">',
				'u_close'	=> '</span>',
				'img'		=> '<img src="$1" alt="' . $user->lang['IMAGE'] . '" />',
				'size'		=> '<span style="font-size: $1%; line-height: normal">$2</span>',
				'color'		=> '<span style="color: $1">$2</span>',
				'email'		=> '<a href="mailto:$1">$2</a>'
			);
		}
	}
--- Beachte ---
Grafik erstellen, in den Ordner "images/" hochladen und an u.g. Stelle Link, Größe und Alternativ-Text anpassen

Code: Alles auswählen

<img src="' . $phpbb_root_path . 'images/nichts_da.png" width="120" height="55" alt="Nichts zu sehen? - Meld dich an und logg Dich ein!" />

Verfasst: 26.11.2008 14:35
von dennist
Danke für eure Tipps.

Ist schon fast zu aufwendig.
Den Gästen muss eigentlich gar nicht irgendein Platzhaltertext angezeigt werden.