Pagina 1 van 1
[FATALE FOUT]
Geplaatst: 20 dec 2005, 22:26
door Duifje
Support template:
- Wat is het probleem?
Fatal error: Cannot redeclare unhtmlentities() (previously declared in c:\wamp\www\viewtopic.php:1167) in c:\wamp\www\viewtopic.php on line 1167
Wanneer ontstond het probleem?
Toen ik de mod: Warn of Old Topic Before Posting Reply probeerde.
Adres van je forum: http://www.ltd-team.nl
Geïnstalleerde mods: Shoutbox, Thanks Mod, enz kleine dingentjes.
Huidige template: Fluffystyle
phpBB versie: 2.0.18
Host: Apache server
Heb je onlangs een mod of stijl geïnstalleerd? Nee
Heb je gezocht naar een antwoord?
Ja
Overige opmerkingen:
Het komt allemaal door die mod heel vaag allemaal.
Geplaatst: 20 dec 2005, 22:31
door Duifje
Hier de viewtopic.php
http://www.ltd-team.nl/Download/viewtopic.php
Wie mij kan helpen wil ik graag belonen :thumb:
Geplaatst: 21 dec 2005, 17:08
door Duifje
bump
Geplaatst: 21 dec 2005, 17:10
door RobinTown
Waar precies staat die fout?
Geplaatst: 21 dec 2005, 19:26
door Bee
Hoe wil je dat ons laten bekijken. Je moet de extensie veranderen naar .txt alleer je het wil laten werken.
Geplaatst: 21 dec 2005, 19:29
door Paul
Bee schreef:
Hoe wil je dat ons laten bekijken. Je moet de extensie veranderen naar .txt alleer je het wil laten werken.
(Of phps

)
Geplaatst: 21 dec 2005, 19:38
door Bee
paulus schreef:Bee schreef:
Hoe wil je dat ons laten bekijken. Je moet de extensie veranderen naar .txt alleer je het wil laten werken.
(Of phps

)
Snotneus, waarom moet jij toch altijd overal op reageren?
Geplaatst: 21 dec 2005, 22:33
door Lady Elensar
En Duifje heeft haast ofzo, gezien een driedubbel post waarvan een bump nauwelijks een dag later.

Geplaatst: 21 dec 2005, 22:36
door Duifje
viewtopic.php
http://www.ltd-team.nl/Download/viewtopic.txt
Wat ik in vieuwtopic.php moest editten !!!
Code: Selecteer alles
##-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
#
$temp_url = append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']);
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Begin "Warn of Old Topic Before Posting Reply" MOD
$sql = 'SELECT post_time FROM ' . POSTS_TABLE . ' WHERE topic_id = ' . $topic_id . ' ORDER BY post_time DESC LIMIT 1';
if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, $lang['error_last_post_time'], '', __LINE__, __FILE__, $sql);
}
if ( !$row = $db->sql_fetchrow($result) )
{
message_die(GENERAL_ERROR, $lang['error_last_post_time'], '', __LINE__, __FILE__, $sql);
}
$last_post_time = $row['post_time'];
$old_topic_length = $board_config['old_topic_length'];
$last_post_time_formatted = create_date($userdata['user_dateformat'], $last_post_time, $userdata['user_timezone']);
if ( $old_topic_length == 1 )
{
switch ($board_config['time_unit'])
{
case 'Second':
$multiplier = 1;
$unit_name = $lang['Second'];
break;
case 'Minute';
$multiplier = 60;
$unit_name = $lang['Minute'];
break;
case 'Hour';
$multiplier = 3600;
$unit_name = $lang['Hour'];
break;
case 'Day';
$multiplier = 86400;
$unit_name = $lang['Day'];
break;
case 'Week';
$multiplier = 604800;
$unit_name = $lang['Week'];
break;
case 'Month';
$multiplier = 18748800;
$unit_name = $lang['Month'];
break;
case 'Year';
$multiplier = 31557600;
$unit_name = $lang['Year'];
break;
}
}
else
{
switch ($board_config['time_unit'])
{
case 'Second':
$multiplier = 1;
$unit_name = $lang['Seconds'];
break;
case 'Minute';
$multiplier = 60;
$unit_name = $lang['Minutes'];
break;
case 'Hour';
$multiplier = 3600;
$unit_name = $lang['Hours'];
break;
case 'Day';
$multiplier = 86400;
$unit_name = $lang['Days'];
break;
case 'Week';
$multiplier = 604800;
$unit_name = $lang['Weeks'];
break;
case 'Month';
$multiplier = 18748800;
$unit_name = $lang['Months'];
break;
case 'Year';
$multiplier = 31557600;
$unit_name = $lang['Years'];
break;
}
}
list($aa, $bb) = explode("/viewtopic.$phpEx", $HTTP_SERVER_VARS['SCRIPT_NAME']);
if (preg_match('/https/i', $HTTP_SERVER_VARS['SERVER_PROTOCOL']))
{
$cc = 'https://' . $HTTP_SERVER_VARS['SERVER_NAME'] . $aa . '/';
}
else
{
$cc = 'http://' . $HTTP_SERVER_VARS['SERVER_NAME'] . $aa . '/';
}
$timeot = time();
function unhtmlentities ($string)
{
$trans_tbl = get_html_translation_table (HTML_ENTITIES);
$trans_tbl = array_flip ($trans_tbl);
return strtr ($string, $trans_tbl);
}
((($timeot) - ($last_post_time)) >= ($old_topic_length * $multiplier) ) ? $oldtime = ' onClick="ShowConfirmReply();" onMouseover="ChangeStatus(\'' . $cc . unhtmlentities($reply_topic_url) . '\');this.style.cursor = \'pointer\';" onMouseout="ChangeStatus(\'\')"' : $oldtime = ' onClick="JustGo();" onMouseover="ChangeStatus(\'' . $cc . unhtmlentities($reply_topic_url) . '\');this.style.cursor = \'pointer\';" onMouseout="ChangeStatus(\'\')"';
((($timeot) - ($last_post_time)) >= ($old_topic_length * $multiplier) ) ? $oldtimequote = ' onClick="ShowConfirmReplyQuote();" onMouseover="ChangeStatus(\'' . $cc . unhtmlentities($temp_url) . '\');this.style.cursor = \'pointer\';" onMouseout="ChangeStatus(\'\')"' : $oldtimequote = ' onClick="JustGoQuote();" onMouseover="ChangeStatus(\'' . $cc . unhtmlentities($temp_url) . '\');this.style.cursor = \'pointer\';" onMouseout="ChangeStatus(\'\')"';
((($timeot) - ($last_post_time)) >= ($old_topic_length * $multiplier) ) ? $oldtimequickreply = ' onClick="ShowConfirmReplyQuickReply();" onMouseover="ChangeStatus(\'' . $lang['Post_a_reply'] . '\');this.style.cursor = \'pointer\';" onMouseout="ChangeStatus(\'\')"' : $oldtimequickreply = ' onClick="ShowHide(\'quick_reply\',\'quick_reply2\');" onMouseover="ChangeStatus(\'' . $lang['Post_a_reply'] . '\');this.style.cursor = \'pointer\';" onMouseout="ChangeStatus(\'\')"';
$old_topic_javascript = '<script language="javascript" type="text/javascript">function ShowConfirmReply(){if (confirm(\'' . sprintf($lang['Old_topic_notification'], $old_topic_length, $unit_name) . '\')){window.location = (\'' . unhtmlentities($reply_topic_url) . '\');return true;}else{return false;}} function ShowConfirmReplyQuote(){if (confirm(\'' . sprintf($lang['Old_topic_notification'], $old_topic_length, $unit_name) . '\')){window.location = (\'' . unhtmlentities($temp_url) . '\');return true;}else{return false;}} function ShowConfirmReplyQuickReply(){if (confirm(\'' . sprintf($lang['Old_topic_notification'], $old_topic_length, $unit_name) . '\')){ShowHide(\'quick_reply\',\'quick_reply2\');return true;}else{return false;}} function ChangeStatus(message){window.status = message;return true;} function JustGo (){window.location = (\'' . unhtmlentities($reply_topic_url) . '\');} function JustGoQuote (){window.location = (\'' . unhtmlentities($temp_url) . '\')}</script>';
// End "Warn of Old Topic Before Posting Reply" MOD
#
#-----[ FIND ]------------------------------------------
#
$quote_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_quote'] . '" alt="' . $lang['Reply_with_quote'] . '" title="' . $lang['Reply_with_quote'] . '" border="0" /></a>';
#
#-----[ REPLACE WITH ]------------------------------------------
#
// Begin edit by "Warn of Old Topic Before Posting Reply" MOD
$quote_img = '<a><img src="' . $images['icon_quote'] . '" alt="' . $lang['Reply_with_quote'] . '" title="' . $lang['Reply_with_quote'] . '" border="0" ' . $oldtimequote . ' /></a>';
// End edit by "Warn of Old Topic Before Posting Reply" MOD
#
#-----[ FIND ]------------------------------------------
#
$template->assign_block_vars('postrow', array(
'ROW_COLOR' => '#' . $row_color,
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Begin "Warn of Old Topic Before Posting Reply" MOD
$template->assign_vars(array(
'OLDTIME_JAVASCRIPT' => $old_topic_javascript,
'OLDTIME' => $oldtime,)
);
// End "Warn of Old Topic Before Posting Reply" MOD
Je kan gewoon normaal topics maken maar zo dra je er op reageert krijg je deze fout en alleen in die topic.
Fatal error: Cannot redeclare unhtmlentities() (previously declared in c:\wamp\www\viewtopic.php:1167) in c:\wamp\www\viewtopic.php on line 1167
Lady Elensar schreef:En Duifje heeft haast ofzo, gezien een driedubbel post waarvan een bump nauwelijks een dag later.

Ja sorry daar voor had er echt haast biij, volgende keer zal ik er even aan denken voor dat ik weer wat doms doe.
