PHPBB Mod - HTML Code entfernen - ich schaffe es nicht allein!

msilver

Lt. Junior Grade
Registriert
Juli 2005
Beiträge
351
hi
ich fummel hier schon rum, aber jedes mal zerlege ich mir mein forum rein von der optik her.

ich habe ne videomod eingebaut, diese zeigt videos direkt im forum an, userwunsch, aber oben drüber steht immer etwas "Gehe zu xxxxx Download Video phpBB Plugin". das möchten wir entfernen.

sieht derzeit so aus:
http://www.elitekoepfe.de/eliteboard/viewtopic.php?t=10911

kann mir jemand helfen? wird denke nur eine zeile sein, aber die ich gedacht hatte waren es nicht.

hier der modtext und die embvid.php als code.

habe diese mod im forum:
Code:
## before being allowed in the MODs Database there is no guarantee 
## that there are no security problems within the MOD. No support 
## will be given for MODs not found within the MODs Database which 
## can be found at [url]http://www.phpbb.com/mods/[/url] 
############################################################## 
## Author Notes:
##
##           Video URLs in signatures won't be replaced.
##           Easily post the video url f.e.
##           "http://www.youtube.com/watch?v=imehw6sj"
##           without any bbcode-tags and this url will be
##           automatically replaced.
##           To avoid replacing the video URL use the [url] bbcode tag.
##
############################################################## 
## MOD History:
##
##           Version 1.0.1:
##           - privmsg bug fix
##           - myvideo bug fix
##
##           Version 1.0.0:
##           - Mod released
##
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################
#
#-----[ COPY ]----------------------------------------------------------
#
copy includes/embvid.php to includes/embvid.php
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
define("BBCODE_UID_LEN", 10);
#
#-----[ AFTER, ADD ]------------------------------------------
#

//-- mod : embvid --------------------------------------------------------------
//-- add
include('embvid.php');
//-- fin mod : embvid ----------------------------------------------------------
#
#-----[ FIND ]------------------------------------------
#
	$ret = ' ' . $text;
#
#-----[ AFTER, ADD ]------------------------------------------
#

//-- mod : embvid --------------------------------------------------------------
//-- add
	$ret = embvid($ret);
//-- fin mod : embvid ----------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
			$user_sig = make_clickable($user_sig);
#
#-----[ REPLACE WITH ]------------------------------------------
#
//-- mod : embvid --------------------------------------------------------------
//-- add
			$is_sig = true;
//-- fin mod : embvid ----------------------------------------------------------
			$user_sig = make_clickable($user_sig);
//-- mod : embvid --------------------------------------------------------------
//-- add
			$is_sig = false;
//-- fin mod : embvid ----------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------
#
privmsg.php
#
#-----[ FIND ]------------------------------------------
#
		$private_message .= '<br /><br />_________________<br />' . make_clickable($user_sig);
#
#-----[ REPLACE WITH ]------------------------------------------
#
//-- mod : embvid --------------------------------------------------------------
//-- add
		$is_sig = true;
//-- fin mod : embvid ----------------------------------------------------------
		$private_message .= '<br /><br />_________________<br />' . make_clickable($user_sig);
//-- mod : embvid --------------------------------------------------------------
//-- add
		$is_sig = false;
//-- fin mod : embvid ----------------------------------------------------------
#
#-----[ FIND ]------------------------------------------
#
			$preview_message = $preview_message . '<br /><br />_________________<br />' . $user_sig;
#
#-----[ REPLACE WITH ]------------------------------------------
#
//-- mod : embvid --------------------------------------------------------------
//-- delete
/*
			$preview_message = $preview_message . '<br /><br />_________________<br />' . $user_sig;
*/
//-- add
			$is_sig = true;
			$user_sig = '<br /><br />_________________<br />' . $user_sig;
			if ( count($orig_word) )
			{
				$user_sig = preg_replace($orig_word, $replacement_word, $user_sig);
			}
			if ( $smilies_on )
			{
				$user_sig = smilies_pass($user_sig);
			}
			$is_sig = false;
//-- fin mod : embvid ----------------------------------------------------------
#
#-----[ FIND ]------------------------------------------
#
		$preview_message = make_clickable($preview_message);
#
#-----[ REPLACE WITH ]------------------------------------------
#
//-- mod : embvid --------------------------------------------------------------
//-- delete
/*
		$preview_message = make_clickable($preview_message);
*/
//-- add
		$preview_message = make_clickable($preview_message) . $user_sig;
//-- fin mod : embvid ----------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
		$user_sig = make_clickable($user_sig);
#
#-----[ REPLACE WITH ]------------------------------------------
#
//-- mod : embvid --------------------------------------------------------------
//-- add
		$is_sig = true;
//-- fin mod : embvid ----------------------------------------------------------
		$user_sig = make_clickable($user_sig);
//-- mod : embvid --------------------------------------------------------------
//-- add
		$is_sig = false;
//-- fin mod : embvid ----------------------------------------------------------
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

Code:
<?php
/*
© www.marc-gutt.de 2008
Marc Gutt Services
embvid for phpbb2
Version: 1.0.1
*/

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

function embvid($message)
{
	global $lang, $userdata, $is_sig;
	// signature switch
	if ( isset($is_sig) && $is_sig )
	{
		return $message;
	}
	// settings
	// prefer 4:3 ratio
	$width = 400;
	$height = 300;
	$download = true;
	$videos_per_post = 5;
	// download sites
	$sites = array(
		'lang_english' => 'http://www.savids.com/#',
		'lang_german' => 'http://www.2video.de/#',
	);
	// player
	$begin = '\\1<table border="0" cellpadding="0" cellspacing="2"><tr><td align="left"><span class="gensmall"><a href="\\2" target="_blank">' . $lang['Jump_to'] . ' ';
	$middle = '</a> ' . ($download ? '<a href="' . (isset($sites[ $userdata['user_lang'] ]) ? $sites[ $userdata['user_lang'] ] : current($sites)) . '\\2" title="Download Video" target="_blank">Download Video</a>' : '') . '</span></td><td align="right"><span class="gensmall"><a href="http://www.phpbb-de.com" target="_blank" title="phpBB">phpBB</a> Plugin</span></td></tr><tr><td colspan="2">';
	$players = array(
		'<div id="embed\\3"><script type="text/javascript" src="http://www.bendecho.de/embed/video?videoid=\\3"></script></div>',
		'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' . $width . '" height="' . $height . '" id="player" align="middle"><param name="allowScriptAccess" value="always" /><param name="movie" value="http://www.clipfish.de/videoplayer.swf?as=0&videoid=\\3&r=1" /><param name="quality" value="high" /><param name="wmode" value="transparent"><param name="allowFullScreen" value="true" /><embed src="http://www.clipfish.de/videoplayer.swf?as=0&videoid=\\3&r=1" quality="high" width="' . $width . '" height="' . $height . '" name="player" align="middle" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>',
		'<object width="' . $width . '" height="' . $height . '"><param name="movie" value="http://www.dailymotion.com/swf/\\3"></param><param name="allowFullScreen" value="true"></param><param name="wmode" value="transparent"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.dailymotion.com/swf/\\3" type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '" allowFullScreen="true" allowScriptAccess="always" wmode="transparent"></embed></object>',
		'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="gtembed" width="' . $width . '" height="' . $height . '">	<param name="allowScriptAccess" value="sameDomain" /> 	<param name="allowFullScreen" value="true" /> <param name="movie" value="http://www.gametrailers.com/remote_wrap.php?mid=\\3"/> <param name="wmode" value="transparent"> <param name="quality" value="high" /> <embed src="http://www.gametrailers.com/remote_wrap.php?mid=\\3" swLiveConnect="true" name="gtembed" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '" wmode="transparent"></embed> </object>',
		'<embed style="width:' . $width . 'px; height:' . $height . 'px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=\\3" flashvars="" wmode="transparent"> </embed>',
		'<embed src="http://www.metacafe.com/fplayer/\\3/\\4.swf" width="' . $width . '" height="' . $height . '" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"> </embed>',
		'<embed src="http://lads.myspace.com/videos/vplayer.swf" flashvars="m=\\3&v=2&type=video" type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '" wmode="transparent"></embed>',
		'<object style="width:' . $width . 'px;height:' . $height . 'px;" width="' . $width . '" height="' . $height . '" type="application/x-shockwave-flash" data="http://www.myvideo.\\3/movie/\\4"> <param name="movie" value="http://www.myvideo.\\3/movie/\\4"/>	<param name="AllowFullscreen" value="true" /><param name="wmode" value="transparent"></param> </object>',
		'<object width="' . $width . '" height="' . $height . '"><param name="FlashVars" value="apiHost=api.sevenload.com"/><param name="AllowScriptAccess" value="always"/><param name="wmode" value="transparent"></param><param name="movie" value="\\3/pl/\\4/425x350/swf" /><embed src="\\3/pl/\\4/425x350/swf" type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '" allowfullscreen="true" AllowScriptAccess="always" FlashVars="apiHost=api.sevenload.com" wmode="transparent"></embed></object>',
		'<embed src="http://videos.streetfire.net/vidiac.swf" FlashVars="video=\\3" quality="high" wmode="transparent" width="' . $width . '" height="' . $height . '" name="ePlayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>',
//		'<object width="' . $width . '" height="' . $height . '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">        <param name="movie" value="http://www.videotube.de/flash/player.swf"></param>        <param name="flashvars" value="baseURL=http%3A%2F%2Fwww.videotube.de%2Fwatch%2F\\3"></param>        <param name="quality" value="best">        <param name="wmode" value="transparent">        <param name="allowScriptAccess" value="always">        <param name="swLiveConnect" value="true">        <embed src="http://www.videotube.de/flash/player.swf" type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '" flashvars="baseURL=http%3A%2F%2Fwww.videotube.de%2Fwatch%2F\\3" quality="best" wmode="transparent" allowscriptaccess="always" swliveconnect="true"></embed>        </object>',
		'<object width="' . $width . '" height="' . $height . '"><param name="movie" value="http://www.youtube.com/v/\\3"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\\3" type="application/x-shockwave-flash" wmode="transparent" width="' . $width . '" height="' . $height . '"></embed></object>',
	);
	$end = '</td></tr></table>' . "\n";
	// build search
	$search = array(
		'Bendecho' => '#(^|[\n ])(http://[\w\.]*?bendecho\.de/([\w]+)-[\w\-]+)(^[\t <\n\r\]\[])*#is',
		'Clipfish' => '#(^|[\n ])(http://[\w\.]*?clipfish\.de/player\.php\?videoid=([\w%]+)(&[\w=+&;]*)*)(^[\t <\n\r\]\[])*#is',
		'Dailymotion' => '#(^|[\n ])(http://[\w\.]*?dailymotion\.com.*?/video/([\w]+)_[\w\-]+)(^[\t <\n\r\]\[])*#is',
		'Gametrailers' => '#(^|[\n ])(http://[\w\.]*?gametrailers\.com/player/([\w]+?)\.html)(^[\t <\n\r\]\[])*#is',
		'Google Video' => '#(^|[\n ])(http://video\.google\.[\w\.]+?/videoplay\?docid=([\w\-]+)(&[\w=+&;-]*)*)(^[\t <\n\r\]\[])*#is',
		'Metacafe' => '#(^|[\n ])(http://[\w\.]*?metacafe\.com/watch/([\w]+?)/([\w\-]+?)/)(^[\t <\n\r\]\[])*#is',
		'MySpace' => '#(^|[\n ])(http://[\w\.]*?myspace\.com/index\.cfm\?fuseaction=vids.individual&videoid=([\w]+))(^[\t <\n\r\]\[])*#is',
		'MyVideo' => '#(^|[\n ])(http://[\w\.]*?myvideo\.([\w]+?)/watch/([\w]+))(^[\t <\n\r\]\[])*#is',
		'Sevenload' => '#(^|[\n ])((http://[\w\.]*?sevenload.com)/videos/([\w]+?)/[\w\-]+)(^[\t <\n\r\]\[])*#is',
		'Streetfire' => '#(^|[\n ])(http://videos\.streetfire\.net/.*?/([\w\-]+?)\.htm)(^[\t <\n\r\]\[])*#is',
//		'Videotube' => '#(^|[\n ])(http://[\w\.]*?videotube\.de/watch/([\w]+))(^[\t <\n\r\]\[])*#is',
		'Youtube' => '#(^|[\n ])(http://[\w\.]*?youtube\.[\w\.]+?/watch\?v=([\w\-]+)(&[\w=+&;%]*)*)(^[\t <\n\r\]\[])*#is',
	);
	// build replace
	$replace = array();
	current($search);
	$portal = key($search);
	foreach ( $players as $embvid )
	{
		$replace[] = $begin . $portal . $middle . $embvid . $end;
		next($search);
		$portal = key($search);
	}
	// search & replace
	return preg_replace($search, $replace, $message, $videos_per_post);
}

?>

ja, da habe ich wohl zu viel entfernt.

was habe ich geändert?:
das
PHP:
$middle = '</a> ' . ($download ? '<a href="' . (isset($sites[ $userdata['user_lang'] ]) ? $sites[ $userdata['user_lang'] ] : current($sites)) . '\\2" title="" target="_blank"></a>' : '') . '</span></td><td align="right"><span class="gensmall"><a href="" target="_blank" title="phpBB"></a> Plugin</span></td></tr><tr><td colspan="2">';

so war es vorher
PHP:
$middle = '</a> ' . ($download ? '<a href="' . (isset($sites[ $userdata['user_lang'] ]) ? $sites[ $userdata['user_lang'] ] : current($sites)) . '\\2" title="Download Video" target="_blank">Download Video</a>' : '') . '</span></td><td align="right"><span class="gensmall"><a href="http://www.phpbb-de.com" target="_blank" title="phpBB">phpBB</a> Plugin</span></td></tr><tr><td colspan="2">';

das kommt leider

Code:

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/v125204/eliteboard/includes/embvid.php:1) in /www/htdocs/v125204/eliteboard/includes/page_header.php on line 487

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/v125204/eliteboard/includes/embvid.php:1) in /www/htdocs/v125204/eliteboard/includes/page_header.php on line 489

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/v125204/eliteboard/includes/embvid.php:1) in /www/htdocs/v125204/eliteboard/includes/page_header.php on line 490
 
Was steht denn in Zeile: 487, 489 und 490?

Der Header wurde halt schon gesendet, deswegen der Fehler.
 
Zuletzt bearbeitet: (+n)
Code:
487: header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
488: }
489: header ('Expires: 0');
490: header ('Pragma: no-cache');
 
Also wie ich dich verstehe willst du wenn du ein video einfügst folgenden Text entfernen:

/*
Gehe zu Youtube Download Video phpBB Plugin
*/

Dann musst du halt nur paar Sachen entfernen

PHP:
//Daten dazu werden in $middle generiert
//Also hier : 
$middle = '</a> ' . ($download ? '<a href="' . (isset($sites[ $userdata['user_lang'] ]) ? $sites[ $userdata['user_lang'] ] : current($sites)) . 
'\\2" title="Download Video" target="_blank">Download Video</a>' : '') . '</span></td><td align="right"><span class="gensmall">
<a href="http://www.phpbb-de.com" target="_blank" title="phpBB">phpBB</a> Plugin</span></td></tr><tr><td colspan="2">';

Müsstet du paar Sachen raus nehmen, damit es dein Design(Tabellen) nicht verhaut:

Einmal in $beginn und $middle:


PHP:
// $beginn 

//Sachen die Raus müssen: 
<tr><td align="left"><span class="gensmall"><a href="\\2" target="_blank">' . $lang['Jump_to'] . ' 

// $middle = 

</a> ' . ($download ? '<a href="' . (isset($sites[ $userdata['user_lang'] ]) ? $sites[ $userdata['user_lang'] ] : current($sites)) . 
'\\2" title="Download Video" target="_blank">Download Video</a>' : '') . '</span></td><td align="right">
<span class="gensmall"><a href="http://www.phpbb-de.com" target="_blank" title="phpBB">phpBB</a> Plugin</span></td></tr>

Damit sollte es eigentlich gehen, wichtig ist halt das du ne Backup Datei anlegst, falls dass nicht geht.

Aber so wie ich dass gerade sehe müsste das so gehen.
 
Zuletzt bearbeitet:
Zurück
Oben