[外掛][整理]撥放影片功能

MODs Released by Other phpbb Sites
非官方認證通過之 MOD ,或許有安全性之疑慮,所有問題由原發表者回覆!

版主: 版主管理群

主題已鎖定
新手
星球普通子民
星球普通子民
文章: 2
註冊時間: 2002-04-02 13:43
聯繫:

[外掛][整理]撥放影片功能

文章 新手 »

參考的原始檔案

[php]<?php

#################################################################
## Mod Title: Streaming audio BBcode Mod
## Mod Version: 2.0.0
## Author: David Smith davidls14@yahoo.com.au - http://www27.brinkster.com/bb2c
## Description: adds a stream bbcode tag to your forum for the windows media player plugin
##
## Installation Level: easy
## Installation Time: 30 seconds (that's how long it took me)
## Files To Edit: bbcode.tpl bbcode.php
## Included Files: n/a
#################################################################
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites without the direct permission of the author
#################################################################
##
## Author Note:
## This mod is ?002 David Smith, All Rights Reserved
## Be sure to edit all templates you have loaded
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################

#
#-----[ Open includes/bbcode.phpex ]------------------------------------------
#
#
#-----[ Find ]------------------------------------------
#
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\\1', $bbcode_tpl['email']);
#
#-----[ Add after ]------------------------------------------
#
//Begin Strean Mod Copyright David Smith 2002
$bbcode_tpl['stream'] = str_replace('{URL}', '\\\1', $bbcode_tpl['stream']);
#
#-----[ Find ]------------------------------------------
#
// user@domain.tld code..
$patterns[5] = "#\[email\]([a-z0-9\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
$replacements[5] = $bbcode_tpl['email'];
#
#-----[ Add after ]------------------------------------------
Note you may need to change array number if used with other BBcode mods
#
// [stream] and [/stream] for streaming audio.
// This one gets first-passed..
$patterns[6] = "#\[stream:$uid\](.*?)\[/stream:$uid\]#si";
$replacements[6] = $bbcode_tpl['stream'];
#
#-----[ Find ]------------------------------------------
#
// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\](([a-z]+?)://([^

]+?))\[/img\]#si", "[img:$uid]\\\1[/img:$uid]", $text);
#
#-----[ Add after ]------------------------------------------
#
// [stream]image_url_here[/stream] code..
$text = preg_replace("#\[stream\](([a-z]+?)://([^,

]+))\[/stream\]#si", "[stream:$uid]\\\1[/stream:$uid]", $text);
#
#-----[ Open templates/your template/bbcode.tpl ]------------------------------------------
#
#
#-----[ Find ]------------------------------------------
#
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->
#
#-----[ Add after ]------------------------------------------
#
<!-- BEGIN stream --><object id="wmp" width=300 height=70 classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/co ... on=6,0,0,0"
standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<param name="FileName" value="{URL}">
<param name="ShowControls" value="1">
<param name="ShowDisplay" value="0">
<param name="ShowStatusBar" value="1">
<param name="AutoSize" value="1">
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/windows95/down ... efault.asp"
src="{URL}" name=MediaPlayer2 showcontrols=1 showdisplay=0 showstatusbar=1 autosize=1 visible=1 animationatstart=0 transparentatstart=1 loop=0 height=70 width=300>
</embed>
</object><!-- END stream -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
?>[/php]
最後由 新手 於 2002-08-25 11:53 編輯,總共編輯了 1 次。
圖檔
新手
星球普通子民
星球普通子民
文章: 2
註冊時間: 2002-04-02 13:43
聯繫:

文章 新手 »

圖檔
主題已鎖定

回到「非官方認證外掛」