kann eine codestelle nicht einbauen (2ter rank)
Verfasst: 01.01.2004 20:08
hi !
ich würde gerne 2 ränge anzeigen lassen und habe mir von phpbbhacks.com den dazugehrigen hack installieren wollen.
http://phpbbhacks.com/download.php?id=991
da ich den rang nur im posting angezeigt haben wollte habe ich nur folgende änderungen gemacht:
viewtopic.php
viewtopic_body.tpl
admin_users.php
user_edit_body.tpl
da ich aber ein profil control in der version drin habe, weiss ich nicht genau, wie ich an dieser stelle verfahren soll. kann mir da jemand helfen ?
auszug aus meiner viewtopic.php
ich habs schon an verschiedenen stellen versucht einzufügen, jedoch klappte das nicht.
bin für jeden tip dankbar !
gruß dagobert
ich würde gerne 2 ränge anzeigen lassen und habe mir von phpbbhacks.com den dazugehrigen hack installieren wollen.
http://phpbbhacks.com/download.php?id=991
da ich den rang nur im posting angezeigt haben wollte habe ich nur folgende änderungen gemacht:
viewtopic.php
viewtopic_body.tpl
admin_users.php
user_edit_body.tpl
da ich aber ein profil control in der version drin habe, weiss ich nicht genau, wie ich an dieser stelle verfahren soll. kann mir da jemand helfen ?
Code: Alles auswählen
#
#-----[ FIND ]------------------------------------------
#
$poster_rank = $ranksrow[$j]['rank_title'];
$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
}
}
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Rank 2 Begin
//
$poster_rank2 = '';
$rank2_image = '';
if ( $postrow[$i]['user_id'] == ANONYMOUS )
{
}
else if ( $postrow[$i]['user_rank2'] )
{
for($j = 0; $j < count($ranksrow); $j++)
{
if ( $postrow[$i]['user_rank2'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
{
$poster_rank2 = $ranksrow[$j]['rank_title'];
$rank2_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank2 . '" title="' . $poster_rank2 . '" border="0" /><br />' : '';
}
}
}
//
// Rank 2 End
//
Code: Alles auswählen
//
// Generate ranks, set them to empty string initially.
//
//-- mod : profile cp ------------------------------------------------------------------------------
//-- delete
// $poster_rank = '';
// $rank_image = '';
// if ( $postrow[$i]['user_id'] == ANONYMOUS )
// {
// }
// else if ( $postrow[$i]['user_rank'] )
// {
// for($j = 0; $j < count($ranksrow); $j++)
// {
// if ( $postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
// {
// $poster_rank = $ranksrow[$j]['rank_title'];
// $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
// }
// }
// }
// else
// {
// for($j = 0; $j < count($ranksrow); $j++)
// {
// if ( $postrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
// {
// $poster_rank = $ranksrow[$j]['rank_title'];
// $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
// }
// }
// }
//-- add
$rank_data = array();
$rank_data = get_user_rank($postrow[$i]);
$poster_rank = '';
$rank_image = '';
if ($www_display)
{
$poster_rank = $rank_data['rank_title'];
$rank_image = ($rank_data['rank_image'] != '') ? $rank_data['rank_image'] . '<br />' : '';
}
//-- fin mod : profile cp --------------------------------------------------------------------------
//
// Handle anon users posting with usernames
//
if ( $poster_id == ANONYMOUS && $postrow[$i]['post_username'] != '' )
{
$poster = $postrow[$i]['post_username'];
$poster_rank = $lang['Guest'];
}
$temp_url = '';
if ( $poster_id != ANONYMOUS )
{
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id");
$profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>';
$profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
//-- mod : profile cp ------------------------------------------------------------------------------
//-- add
$pm_img = '';
$pm = '';
if ( $pm_display )
{
//-- fin mod : profile cp --------------------------------------------------------------------------
$temp_url = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=$poster_id");
$pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
switch ($postrow[$i]['user_gender'])
{
case 1 : $gender_image = $lang['Gender'].":<img src=\"" . $images['icon_minigender_male'] . "\" alt=\"" . $lang['Gender']. ":".$lang['Male']."\" title=\"" . $lang['Gender'] . ":".$lang['Male']. "\" border=\"0\" />"; break;
case 2 : $gender_image = $lang['Gender'].":<img src=\"" . $images['icon_minigender_female'] . "\" alt=\"" . $lang['Gender']. ":".$lang['Female']. "\" title=\"" . $lang['Gender'] . ":".$lang['Female']. "\" border=\"0\" />"; break;
default : $gender_image="";
}
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
$temp_url = append_sid("album_personal.$phpEx?user_id=$poster_id");
$gallery_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_gallery'] . '" alt="' . sprintf($lang['Personal_Gallery_Of_User'], $postrow[$i]['username']) . '" title="' . sprintf($lang['Personal_Gallery_Of_User'], $postrow[$i]['username']) . '" border="0" /></a>';
$gallery = '<a href="' . $temp_url . '">' . $lang['Album'] . '</a>';
//-- mod : profile cp ------------------------------------------------------------------------------
//-- delete
// if ( !empty($postrow[$i]['user_viewemail']) || $is_auth['auth_mod'] )
//-- add
}
if ( $email_display )
//-- fin mod : profile cp --------------------------------------------------------------------------
{
$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $poster_id) : 'mailto:' . $postrow[$i]['user_email'];
$email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
}
else
{
$email_img = '';
$email = '';
}
//-- mod : profile cp ------------------------------------------------------------------------------
//-- add
$www_img = '';
$www = '';
if ( $www_display )
{
//-- fin mod : profile cp --------------------------------------------------------------------------
$www_img = ( $postrow[$i]['user_website'] ) ? '<a href="' . $postrow[$i]['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '';
$www = ( $postrow[$i]['user_website'] ) ? '<a href="' . $postrow[$i]['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
//-- mod : profile cp ------------------------------------------------------------------------------
//-- add
}
$icq_status_img = '';
$icq_img = '';
$icq = '';
$aim_img = '';
$aim = '';
$msn_img = '';
$msn = '';
$yim_img = '';
$yim = '';
if ( $messanger_display )
{
//-- fin mod : profile cp --------------------------------------------------------------------------
if ( !empty($postrow[$i]['user_icq']) )
{
$icq_status_img = '<a href="http://wwp.icq.com/' . $postrow[$i]['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $postrow[$i]['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
$icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $postrow[$i]['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
$icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $postrow[$i]['user_icq'] . '">' . $lang['ICQ'] . '</a>';
}
else
{
$icq_status_img = '';
$icq_img = '';
$icq = '';
}
$aim_img = ( $postrow[$i]['user_aim'] ) ? '<a href="aim:goim?screenname=' . $postrow[$i]['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '';
$aim = ( $postrow[$i]['user_aim'] ) ? '<a href="aim:goim?screenname=' . $postrow[$i]['user_aim'] . '&message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : '';
$temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id");
$msn_img = ( $postrow[$i]['user_msnm'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : '';
$msn = ( $postrow[$i]['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : '';
$yim_img = ( $postrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
$yim = ( $postrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
//-- mod : profile cp ------------------------------------------------------------------------------
//-- add
}
//-- fin mod : profile cp --------------------------------------------------------------------------
}
else
{
$profile_img = '';
$profile = '';
$pm_img = '';
$pm = '';
$gallery_img = '';
$gallery = '';
$email_img = '';
$email = '';
$www_img = '';
$www = '';
$icq_status_img = '';
$icq_img = '';
$icq = '';
$aim_img = '';
$aim = '';
$msn_img = '';
$msn = '';
$yim_img = '';
$yim = '';
}
$temp_url = append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']);
$quote_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_quote'] . '" alt="' . $lang['Reply_with_quote'] . '" title="' . $lang['Reply_with_quote'] . '" border="0" /></a>';
$quote = '<a href="' . $temp_url . '">' . $lang['Reply_with_quote'] . '</a>';
$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($postrow[$i]['username']) . "&showresults=posts");
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
if ( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] )
{
$temp_url = append_sid("posting.$phpEx?mode=editpost&" . POST_POST_URL . "=" . $postrow[$i]['post_id']);
$edit_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_edit'] . '" alt="' . $lang['Edit_delete_post'] . '" title="' . $lang['Edit_delete_post'] . '" border="0" /></a>';
$edit = '<a href="' . $temp_url . '">' . $lang['Edit_delete_post'] . '</a>';
}
else
{
$edit_img = '';
$edit = '';
}
ich habs schon an verschiedenen stellen versucht einzufügen, jedoch klappte das nicht.
bin für jeden tip dankbar !
gruß dagobert