Papa101 hat geschrieben:Gibt es nicht schon Codes mit denen man Link´s und Bilder für Gäste erst garnicht sichtbar machen kann ?? Ich glaube soetwas schonmal irgendwo gesehen zu haben.
... sondern mit einem alternativ-Text anzeigen:
------ eMail-Anzeige & Bilder im Forum vor Gästen schützen ---
--- Ö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;
// No_Pics_4_Guests_by_4seven/2008
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önnen dieses Bild sehen !" />',
'size' => '<span style="font-size: $1%; line-height: normal">$2</span>',
'color' => '<span style="color: $1">$2</span>',
'email' => '<font size="-2" color="#008040" <a href=""></a>*** Die Adresse ist nur für Mitglieder sichtbar. Bitte <a href="./ucp.php?mode=register"><u>registriere</u></a> Dich, oder <a href="./ucp.php?mode=login"><u>logge dich ein</u></a>. *** </font>',
);
}
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>'
);
}
}
// No_Pics_4_Guests_by_4seven/2008
--- 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!" />
URLs werden an anderer Stelle geschützt:
------ URLs im Forum vor Gästen schützen ---
--- Öffne ---
includes/bbcode.php
--- Suche ---
Code: Alles auswählen
/**
* Return bbcode template replacement
*/
function bbcode_tpl_replace($tpl_name, $tpl)
{
global $user;
static $replacements = array(
'quote_username_open' => array('{USERNAME}' => '$1'),
'color' => array('{COLOR}' => '$1', '{TEXT}' => '$2'),
'size' => array('{SIZE}' => '$1', '{TEXT}' => '$2'),
'img' => array('{URL}' => '$1'),
'flash' => array('{WIDTH}' => '$1', '{HEIGHT}' => '$2', '{URL}' => '$3'),
'url' => array('{URL}' => '$1', '{DESCRIPTION}' => '$2'),
'email' => array('{EMAIL}' => '$1', '{DESCRIPTION}' => '$2')
);
--- Ersetze mit ---
Code: Alles auswählen
/**
* Return bbcode template replacement
*/
function bbcode_tpl_replace($tpl_name, $tpl)
{
global $user;
// with_replacement_link_for_guests_to_register
if ($user->data['user_id'] == ANONYMOUS){
$replacements = array(
'quote_username_open' => array('{USERNAME}' => '$1'),
'color' => array('{COLOR}' => '$1', '{TEXT}' => '$2'),
'size' => array('{SIZE}' => '$1', '{TEXT}' => '$2'),
'img' => array('{URL}' => '$1'),
'flash' => array('{WIDTH}' => '$1', '{HEIGHT}' => '$2', '{URL}' => '$3'),
'url' => array('{DESCRIPTION}' => '<font size="-2" color="#008040" <a href=""></a>*** Der Link ist nur für Mitglieder sichtbar. Bitte <a href="./ucp.php?mode=register"><u>registriere</u></a> Dich, oder <a href="./ucp.php?mode=login"><u>logge dich ein</u></a>. *** </font>'),
'email' => array('{EMAIL}' => '$1', '{DESCRIPTION}' => '$2')
);
}
else{
static $replacements = array(
'quote_username_open' => array('{USERNAME}' => '$1'),
'color' => array('{COLOR}' => '$1', '{TEXT}' => '$2'),
'size' => array('{SIZE}' => '$1', '{TEXT}' => '$2'),
'img' => array('{URL}' => '$1'),
'flash' => array('{WIDTH}' => '$1', '{HEIGHT}' => '$2', '{URL}' => '$3'),
'url' => array('{URL}' => '$1', '{DESCRIPTION}' => '$2'),
'email' => array('{EMAIL}' => '$1', '{DESCRIPTION}' => '$2')
);
}