Seite 1 von 4

Probleme

Verfasst: 21.09.2006 06:15
von NewFighter
Hi,
ich wollte folgenden Mod installieren:
##############################################################

## MOD Title: Quick Reply with Quote

## MOD Author: Smartor < smartor_xp@hotmail.com > (Hoang Ngoc Tu) http://smartor.is-root.com

## MOD Description: This will add a quick-reply form below every topics

## It will only display when user has the Reply access

## User have a option to quote the last message

## MOD Version: 1.1.5

##

## Installation Level: easy

## Installation Time: 5 Minutes

## Files To Edit: 3

## viewtopic.php

## language/lang_XX/lang_main.php

## templates/template_XX/viewtopic_body.tpl

## Included Files: N/A

##############################################################

## Author Notes:

##

##############################################################

## This MOD is released under the GPL License.

## Intellectual Property is retained by the MOD Author(s) listed above

##############################################################

## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD

##############################################################



#

#-----[ OPEN ]------------------------------------------

#

viewtopic.php



#

#-----[ FIND ]------------------------------------------

#

$template->pparse('body');



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



#

#-----[ BEFORE, ADD ]------------------------------------

#

//

// Quick Reply Mod

//

if ( ((!$is_auth['auth_reply']) or ($forum_topic_data['forum_status'] == FORUM_LOCKED) or ($forum_topic_data['topic_status'] == TOPIC_LOCKED)) and ($userdata['user_level'] != ADMIN) )

{

$quick_reply_form = "";

}

else

{

if ($can_watch_topic and $is_watching_topic)

{

$notify_user = 1;

}

else

{

$notify_user = $userdata['user_notify'];

}

$bbcode_uid = $postrow[$total_posts - 1]['bbcode_uid'];

$last_poster = $postrow[$total_posts - 1]['username'];

$last_msg = $postrow[$total_posts - 1]['post_text'];

$last_msg = str_replace(":1:$bbcode_uid", "", $last_msg);

$last_msg = str_replace(":u:$bbcode_uid", "", $last_msg);

$last_msg = str_replace(":o:$bbcode_uid", "", $last_msg);

$last_msg = str_replace(":$bbcode_uid", "", $last_msg);

$last_msg = str_replace("'", "'", $last_msg);

$last_msg = "
\"$last_poster\" hat geschrieben:" . $last_msg . "
";

$quick_reply_form = "

<script language='JavaScript' type='text/javascript'>

function checkForm()

{

formErrors = false;

document.post.message.value = '';

if (document.post.input.value.length < 2) {

formErrors = '" . $lang['Empty_message'] . "';

}

if (formErrors) {

alert(formErrors);

return false;

} else {

if (document.post.quick_quote.checked) {

document.post.message.value = document.post.last_msg.value;

}

document.post.message.value += document.post.input.value;

return true;

}

}

</script>

<form action='".append_sid("posting.$phpEx")."' method='post' name='post' onsubmit='return checkForm(this)'>

<span class='genmed'><b>".$lang['Quick_Reply'].":</b><br />";



if (!$userdata['session_logged_in'])

{

$quick_reply_form .= $lang['Username'] . ":&nbsp;<input class='post' type='text' name='username' size='25' maxlength='25' value='' /><br />";

}



$quick_reply_form .= "<textarea name='input' rows='10' cols='50' wrap='virtual' class='post''></textarea><br />

<input type='checkbox' name='quick_quote' />".$lang['Quick_quote']."<br />

<input type='checkbox' name='attach_sig' checked='checked' />".$lang["Attach_signature"]."<br />

<input type='hidden' name='mode' value='reply' />

<input type='hidden' name='sid' value='" . $userdata['session_id'] . "' />

<input type='hidden' name='t' value='" . $topic_id . "' />

<input type='hidden' name='message' value='' />

<input type='hidden' name='notify' value=" . $notify_user . " />

<input type='hidden' name='last_msg' value='" . $last_msg . "' />

<input type='submit' name='preview' class='liteoption' value='".$lang['Preview']."' />&nbsp;

<input type='submit' name='post' class='mainoption' value='".$lang["Submit"]."' />

</form></span>";

}



$template->assign_vars(array(

'QUICK_REPLY_FORM' => $quick_reply_form)

);

//

// END Quick Reply Mod

//



#

#-----[ OPEN ]------------------------------------------

#

lang_main.php



#

#-----[ FIND ]------------------------------------------

#

//

// That's all Folks!



#

#-----[ BEFORE, ADD ]------------------------------------

#

// Quick Reply Mod

$lang['Quick_Reply'] = 'Quick Reply';

$lang['Quick_quote'] = 'Quote the last message';



#

#-----[ OPEN ]------------------------------------------

#

viewtopic_body.tpl



#

#-----[ FIND ]------------------------------------------

#

{S_TOPIC_ADMIN}



#

#-----[ AFTER, ADD ]------------------------------------

#

{QUICK_REPLY_FORM}





#

#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------

#

# EoM
Aber ich habe es genauso gemacht wie da beschrieben, bekomme aber immer wieder folgende Meldung:

Parse error: syntax error, unexpected T_STRING in /home/webpages/lima-city/newwarrior/html/klasse/board/language/lang_english/lang_main.php on line 276

Warum

Verfasst: 21.09.2006 06:27
von area57
moin lies erstmal dringend das hier:
Posten von Code
und zum prob schau dir mal deine lang_main.php genau an und/oder verlinke sie als txt-Download (KB:81)

Verfasst: 21.09.2006 06:28
von wicked-disorder
Erstmal ist das das falsche Forum. Verlinke mal Deine lang_main.php gem. folgender Anleitung:
http://www.phpbb.de/doku/kb/datei
lg

Wicked

/edit: Da war jemand schneller :)

Verfasst: 21.09.2006 06:32
von NewFighter

Verfasst: 21.09.2006 06:43
von wicked-disorder
ich glaube der Fehler liegt in der viewtopic.php. Verlinke die auch noch mal bitte.

Verfasst: 21.09.2006 06:53
von NewFighter

Verfasst: 21.09.2006 07:00
von area57
Der Fehler liegt doch eher in der lang_main

suche mal nach

Code: Alles auswählen

$lang['Read_profile'] = 'View user's profile'; 
$lang['Visit_website'] = 'Visit poster's website';
und ersetze es durch

Code: Alles auswählen

$lang['Read_profile'] = 'View users profile'; 
$lang['Visit_website'] = 'Visit posters website';
und lade sie wieder hoch ;)

Verfasst: 21.09.2006 07:05
von NewFighter
entimon hat geschrieben:Der Fehler liegt doch eher in der lang_main

suche mal nach

Code: Alles auswählen

$lang['Read_profile'] = 'View user's profile'; 
$lang['Visit_website'] = 'Visit poster's website';
und ersetze es durch

Code: Alles auswählen

$lang['Read_profile'] = 'View users profile'; 
$lang['Visit_website'] = 'Visit posters website';
und lade sie wieder hoch ;)
Habe ich gemacht.
Ich bekomme immer noch die Fehlermeldung.

http://fow-12.de.vu/

Verfasst: 21.09.2006 07:16
von wicked-disorder
finde in der lang_main.php folgenden Code

finde

Code: Alles auswählen

$lang['Read_profile'] = 'View user`s profile'; 
$lang['Visit_website'] = 'Visit poster`s website';

Ersetze mit:

Code: Alles auswählen

$lang['Read_profile'] = 'View user\'s profile'; 
$lang['Visit_website'] = 'Visit poster\'s website';

Verfasst: 21.09.2006 07:18
von NewFighter
wicked-disorder hat geschrieben:finde in der lang_main.php folgenden Code

finde

Code: Alles auswählen

$lang['Read_profile'] = 'View user`s profile'; 
$lang['Visit_website'] = 'Visit poster`s website';

Ersetze mit:

Code: Alles auswählen

$lang['Read_profile'] = 'View user\s profile'; 
$lang['Visit_website'] = 'Visit poster\s website';
[/code]
habe ich vereits