zitat-button ausblenden wenn nicht eingeloggt

Alles zu Styles, Templates, Icons und Smilies für phpBB 2.0, sowie allgemeine Designfragen zur Integration von phpBB in bestehende Websites.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Benutzeravatar
austrian-i
Mitglied
Beiträge: 724
Registriert: 28.08.2004 18:01

zitat-button ausblenden wenn nicht eingeloggt

Beitrag von austrian-i »

eine frage: der edit-button wird ja auch nicht angezeigt wenn man nicht eingeloggt ist, warum dann der zitat-button?

kann man den auch irgendwie ausblenden wenn man nicht eingeloggt ist?
Benutzeravatar
Leuchte
Ehemaliges Teammitglied
Beiträge: 9179
Registriert: 26.05.2003 14:57
Wohnort: Duisburg
Kontaktdaten:

Beitrag von Leuchte »

viewtopic.php
Finde

Code: Alles auswählen

$quote_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_quote'] . '" alt="' . $lang['Reply_with_quote'] . '" title="' . $lang['Reply_with_quote'] . '" border="0" /></a>';
Ersetze mit

Code: Alles auswählen

$quote_img = ( ($userdata['session_logged_in']) ? ('<a href="' . $temp_url . '"><img src="' . $images['icon_quote'] . '" alt="' . $lang['Reply_with_quote'] . '" title="' . $lang['Reply_with_quote'] . '" border="0" /></a>') : '');
Benutzeravatar
austrian-i
Mitglied
Beiträge: 724
Registriert: 28.08.2004 18:01

Beitrag von austrian-i »

danke dir leuchte!
Zuletzt geändert von austrian-i am 27.09.2004 17:08, insgesamt 1-mal geändert.
Benutzeravatar
austrian-i
Mitglied
Beiträge: 724
Registriert: 28.08.2004 18:01

Beitrag von austrian-i »

darf ich etwas anderes fragen...

mein viewtopic schaut so aus:

[ externes Bild ]

und zwar ist das die ansicht für den unregistrierten besucher. wenn man eingeloggt ist, sind alle anderen dinge wie profil/pn/zitat zu sehen.

1) kann man diesen einen icon (dort wo der rote pfeil hinzeigt) auch ausblenden für ungeloggte besucher.

2) die tabellenzeile (dort wo der grüne strich von mir hingemalt ist und wo dann der profil und pn-button kommen wenn man sich einloggt), kann man den auch ausblenden für die gäste?
Benutzeravatar
Leuchte
Ehemaliges Teammitglied
Beiträge: 9179
Registriert: 26.05.2003 14:57
Wohnort: Duisburg
Kontaktdaten:

Beitrag von Leuchte »

viewtopic.php
Finde und lösche

Code: Alles auswählen

		'MINI_POST_IMG' => $mini_post_img,
		'PROFILE_IMG' => $profile_img,
		'PROFILE' => $profile,
		'SEARCH_IMG' => $search_img,
		'SEARCH' => $search,
		'PM_IMG' => $pm_img,
		'PM' => $pm,
		'EMAIL_IMG' => $email_img,
		'EMAIL' => $email,
		'WWW_IMG' => $www_img,
		'WWW' => $www,
		'ICQ_STATUS_IMG' => $icq_status_img,
		'ICQ_IMG' => $icq_img,
		'ICQ' => $icq,
		'AIM_IMG' => $aim_img,
		'AIM' => $aim,
		'MSN_IMG' => $msn_img,
		'MSN' => $msn,
		'YIM_IMG' => $yim_img,
		'YIM' => $yim,
Finde und lösche

Code: Alles auswählen

		'L_MINI_POST_ALT' => $mini_post_alt,

		'U_MINI_POST' => $mini_post_url,
		'U_POST_ID' => $postrow[$i]['post_id']
(Das Komma nach 'DELETE' => $delpost ebenfalls löschen!)
Finde

Code: Alles auswählen

}

$template->pparse('body');
Füge davor ein

Code: Alles auswählen

  if ( $userdata['session_logged_in'] )
  {
    $template->assign_block_vars('postrow.show_not', array(
        'MINI_POST_IMG' => $mini_post_img,
        'L_MINI_POST_ALT' => $mini_post_alt,
		    'U_MINI_POST' => $mini_post_url,
    		'U_POST_ID' => $postrow[$i]['post_id'],
        'PROFILE_IMG' => $profile_img,
		    'PROFILE' => $profile,
	    	'SEARCH_IMG' => $search_img,
		    'SEARCH' => $search,
		    'PM_IMG' => $pm_img,
		    'PM' => $pm,
		    'EMAIL_IMG' => $email_img,
		    'EMAIL' => $email,
		    'WWW_IMG' => $www_img,
		    'WWW' => $www,
		    'ICQ_STATUS_IMG' => $icq_status_img,
		    'ICQ_IMG' => $icq_img,
		    'ICQ' => $icq,
		    'AIM_IMG' => $aim_img,
		    'AIM' => $aim,
    		'MSN_IMG' => $msn_img,
		    'MSN' => $msn,
    		'YIM_IMG' => $yim_img,
    		'YIM' => $yim)
    );
  }
viewtopic_body.tpl
Finde

Code: Alles auswählen

				<td width="100%"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}:
Ersetze mit

Code: Alles auswählen

				<td width="100%">
        <!-- BEGIN show_not -->
        <a href="{postrow.show_not.U_MINI_POST}"><img src="{postrow.show_not.MINI_POST_IMG}" width="12" height="9" alt="{postrow.show_not.L_MINI_POST_ALT}" title="{postrow.show_not.L_MINI_POST_ALT}" border="0" /></a>
        <!-- END show_not -->
        <span class="postdetails">{L_POSTED}:
Finde

Code: Alles auswählen

	<tr> 
		<td class="{postrow.ROW_CLASS}" width="150" align="left" valign="middle"><span class="nav"><a href="#top" class="nav">{L_BACK_TO_TOP}</a></span></td>
		<td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="bottom" nowrap="nowrap"><table cellspacing="0" cellpadding="0" border="0" height="18" width="18">
			<tr> 
				<td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}<script language="JavaScript" type="text/javascript"><!-- 

	if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 )
		document.write(' {postrow.ICQ_IMG}');
	else
		document.write('</td><td>&nbsp;</td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">{postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{postrow.ICQ_STATUS_IMG}</div></div>');
				
				//--></script><noscript>{postrow.ICQ_IMG}</noscript></td>
			</tr>
		</table></td>
	</tr>
Ersetze mit

Code: Alles auswählen

  <!-- BEGIN show_not -->
	<tr> 
		<td class="{postrow.ROW_CLASS}" width="150" align="left" valign="middle"><span class="nav"><a href="#top" class="nav">{L_BACK_TO_TOP}</a></span></td>
		<td class="{postrow.ROW_CLASS}" width="100%" height="28" valign="bottom" nowrap="nowrap"><table cellspacing="0" cellpadding="0" border="0" height="18" width="18">
			<tr> 
				<td valign="middle" nowrap="nowrap">{postrow.show_not.PROFILE_IMG} {postrow.show_not.PM_IMG} {postrow.show_not.EMAIL_IMG} {postrow.show_not.WWW_IMG} {postrow.show_not.AIM_IMG} {postrow.show_not.YIM_IMG} {postrow.show_not.MSN_IMG}<script language="JavaScript" type="text/javascript"><!-- 

	if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 )
		document.write(' {postrow.show_not.ICQ_IMG}');
	else
		document.write('</td><td>&nbsp;</td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">{postrow.show_not.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{postrow.show_not.ICQ_STATUS_IMG}</div></div>');
				
				//--></script><noscript>{postrow.show_not.ICQ_IMG}</noscript></td>
			</tr>
		</table></td>
	</tr>
  <!-- END show_not -->
Benutzeravatar
austrian-i
Mitglied
Beiträge: 724
Registriert: 28.08.2004 18:01

Beitrag von austrian-i »

oh wow!

ich hab nur alles bis auf

Code: Alles auswählen

} 

$template->pparse('body');
schaut bei mir so aus

Code: Alles auswählen

append_sid("http://".$HTTP_SERVER_VARS['HTTP_HOST'].$HTTP_SERVER_VARS['PHP_SELF']."?t=$topic_id", true)));$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
Benutzeravatar
Leuchte
Ehemaliges Teammitglied
Beiträge: 9179
Registriert: 26.05.2003 14:57
Wohnort: Duisburg
Kontaktdaten:

Beitrag von Leuchte »

Nach der Veränderung sollte der Teil bis dahin so aussehen:

Code: Alles auswählen

		'DELETE' => $delpost)
	);
Und direkt danach fügst du das ein.
Wenn du's nicht findest, verlink hier die Datei als txt-Version
Benutzeravatar
austrian-i
Mitglied
Beiträge: 724
Registriert: 28.08.2004 18:01

Beitrag von austrian-i »

funktioniert leider nicht, weil das bei mir ganz anders ausschaut, kannst du mal schauen

viewtopic (ohne deine änderungen)
Benutzeravatar
Leuchte
Ehemaliges Teammitglied
Beiträge: 9179
Registriert: 26.05.2003 14:57
Wohnort: Duisburg
Kontaktdaten:

Beitrag von Leuchte »

Ersetz mal den kompletten Teil von

Code: Alles auswählen

	$template->assign_block_vars('postrow', array(
bis ?> damit

Code: Alles auswählen

	$template->assign_block_vars('postrow', array(
		'ROW_COLOR' => '#' . $row_color,
		'ROW_CLASS' => $row_class,
		'POSTER_NAME' => $poster,
		'POSTER_RANK' => $poster_rank,
		'RANK_IMAGE' => $rank_image,
		'POSTER_JOINED' => $poster_joined,
    'POSTER_JOINED_DAYS' => $poster_joined_days,
		'POSTER_POSTS' => $poster_posts,
		'POSTER_FROM' => $poster_from,
		'POSTER_AVATAR' => $poster_avatar,
		'POST_DATE' => $post_date,
		'POST_SUBJECT' => $post_subject,
		'MESSAGE' => $message,
		'SIGNATURE' => $user_sig,
		'EDITED_MESSAGE' => $l_edited_by,

		'PROFILE_IMG' => $profile_img,
		'PROFILE' => $profile,
		'SEARCH_IMG' => $search_img,
		'SEARCH' => $search,
		'EDIT_IMG' => $edit_img,
		'EDIT' => $edit,
		'QUOTE_IMG' => $quote_img,
		'QUOTE' => $quote,
		'IP_IMG' => $ip_img,
		'IP' => $ip,
		'DELETE_IMG' => $delpost_img,
		'DELETE' => $delpost,
    // BEGIN Quiz Hack
		'QUIZ_IMG' => $quiz_img,
		'QUIZ' => $quiz_txt,
		// END Quiz Hack
    )
	);
  
  if ( $userdata['session_logged_in'] )
  {
    $template->assign_block_vars('postrow.show_not', array(
        'MINI_POST_IMG' => $mini_post_img,
        'L_MINI_POST_ALT' => $mini_post_alt,
		    'U_MINI_POST' => $mini_post_url,
    		'U_POST_ID' => $postrow[$i]['post_id'],
        'PROFILE_IMG' => $profile_img,
		    'PROFILE' => $profile,
	    	'SEARCH_IMG' => $search_img,
		    'SEARCH' => $search,
		    'PM_IMG' => $pm_img,
		    'PM' => $pm,
		    'EMAIL_IMG' => $email_img,
		    'EMAIL' => $email,
		    'WWW_IMG' => $www_img,
		    'WWW' => $www,
		    'ICQ_STATUS_IMG' => $icq_status_img,
		    'ICQ_IMG' => $icq_img,
		    'ICQ' => $icq,
		    'AIM_IMG' => $aim_img,
		    'AIM' => $aim,
    		'MSN_IMG' => $msn_img,
		    'MSN' => $msn,
    		'YIM_IMG' => $yim_img,
    		'YIM' => $yim)
    );
  }
}

$template->assign_vars(array( 
"TELL_LINK" => append_sid("http://".$HTTP_SERVER_VARS['HTTP_HOST'].$HTTP_SERVER_VARS['PHP_SELF']."?t=$topic_id", true)));$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
Benutzeravatar
austrian-i
Mitglied
Beiträge: 724
Registriert: 28.08.2004 18:01

Beitrag von austrian-i »

hab ich gemacht, aber:

-dann geht der pn-button ganz weg (auch wenn man eingeloggt ist)
-und dieses icon (wo der rote pfeil) ist zwar weg, aber der link ist noch da
Antworten

Zurück zu „phpBB 2.0: Styles, Templates und Grafiken“