[FRAGE][MOD][Quick-Topic][Post erscheint nicht nach posten]

In diesem Forum können Mod-Autoren ihre Mods vorstellen, die sich noch im Entwicklungsstatus befinden. Der Einbau in Foren im produktiven Betrieb wird nicht empfohlen.
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.
Antworten
Benutzeravatar
doctormord
Mitglied
Beiträge: 152
Registriert: 27.04.2003 16:11

[FRAGE][MOD][Quick-Topic][Post erscheint nicht nach posten]

Beitrag von doctormord »

hi, ich habe mir den "quick-topic" mod installiert, funktioniert soweit auch von der anzeige, aber wenn ich da was eintrage, erscheint der post nicht im forum. =D

Code: Alles auswählen

############################################### 
##   Hack Title:   Quick New Topic 
##   Hack Version:   1.2 
##   Author:      Marc Philpott <www.marc-philpott.org.uk>
##   Description:   This hack will add a quick new topic form below forums 
##		when viewing a forum.
##		It will only display when a user is logged in.
##	
##   Compatibility:   2.0.0 - 2.0.4 
## 
##   Installation Level: Easy 
##   Installation Time: 5 minutes 
##
##   Files To Edit: 3
##      viewforum.php 
##      lang_main.php
##      viewforum_body.tpl
## 
##    Included Files: 1
##      quick_topic.php
## 
##   Author Notes: 
##      Thanks to Smartor and Freakin' Booty ;-P (FB-Ke)
## 
##   Support:      http://www.phpbbhacks.com/forums 
##   Copyright:      © 2003 Quick New Topic 1.2 - Marc Philpott 
## 
############################################### 
##   You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads. 
##   Please visit http://www.phpbbhacks.com/forums for support. 
############################################### 
## 
############################################### 
##   This hack is released under the GPL License. 
##   This hack can be freely used, but not distributed, without permission. 
##   Intellectual Property is retained by the hack author(s) listed above. 
###############################################

#
#-----[ OPEN ]------------------------------------------
#
viewforum.php

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

//
// Parse the page and print
//
$template->pparse('body');

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

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

//
// Quick New Topic

include($phpbb_root_path . 'quick_topic.'.$phpEx);

// END Quick New Topic
//

#
#-----[ OPEN ]------------------------------------------
#
lang_main.php

#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!

#
#-----[ BEFORE, ADD ]------------------------------------
#
// Quick New Topic Hack
$lang['Quick_Topic'] = 'Quick Topic';

#
#-----[ OPEN ]------------------------------------------
#
viewforum_body.tpl

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

	<tr>
	  <td align="left" colspan="3"><span class="nav">{PAGE_NUMBER}</span></td>
	</tr>
  </table>
</form>

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

{QUICK_TOPIC_FORM}

# 
#-----[ SAVE & CLOSE ALL FILES ]-------------------------- 
# 
#End 
quick-topic.php

Code: Alles auswählen

<?php 
/***************************************************************************
 *                              quick_topic.php
 *                            -------------------
 *   copyright            : Marc Philpott 
 *   website              : http://www.marc-philpott.org.uk
 *   version               : 1.2
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

$phpbb_root_path = "./";

if ( !defined('IN_PHPBB') )
{
        die('Hacking attempt1');
}

if($userdata['session_logged_in']){

	$cl_subject = "if(this.value=='subject')this.value='';";
	$cl_message = "if(this.value=='message')this.value='';";
	$quick_topic_form = "
<form action='".append_sid("posting.$phpEx")."' method='post' name='post'>
<table width='100%' cellpadding='3' cellspacing='1' border='0' class='forumline'>
  <tr> 
    <th height='25' class='thCornerL' nowrap='nowrap'>".$lang["Quick_Topic"]."</th>
  </tr>
  <tr> 
    <td class='row1' align='center'>";
	if (!$userdata['session_logged_in'])
	{
		$quick_topic_form .= $lang['Username'] . ":&nbsp;<input class='post' type='text' name='username' size='25' maxlength='25' value='' /><br />";
	}

	$quick_topic_form .= "
	<span class='genmed'><input type='text' name='subject' size='50' maxlength='60' tabindex='2' class='post' value='subject' onFocus=".$cl_subject." /><br />
	<textarea name='message' rows='7'  tabindex='3' cols='50' wrap='virtual' class='post' onFocus=".$cl_message." >message</textarea><br />
	<input type='checkbox' name='attach_sig' checked='checked' />".$lang["Attach_signature"]."<br />
	<input type='hidden' name='sid' value='" . $userdata['session_id'] . "' />
	<input type='hidden' name='mode' value='newtopic' />
	<input type='hidden' name='f' value='" . $forum_id . "' /></span></td>
      </tr>
  <tr> 
    <td class='catbottom' height='28'><div align='center'>
        <input type='submit' name='preview' class='liteoption' value='".$lang['Preview']."' /> &nbsp; 
        <input type='submit' name='post' class='mainoption' value='".$lang['Submit']."' />
      </div></td>
  </tr>
</table></form>
";
}
else
{
	$quick_reply_form = "";
}

$template->assign_vars(array(
	'QUICK_TOPIC_FORM' => $quick_topic_form)
);

?>

Link:
http://www.phpbbhacks.com/viewhack.php?id=1494

so schauts aus:
[ externes Bild ]
[9.8kb][gif][64 farben]
Zensiert
Antworten

Zurück zu „phpBB 2.0: Mods in Entwicklung“