phpBB3 MP3 Player with Attachments
-------------------------
مشغل mp3 يمكن تركيبه بموقع أو صفحة أو منتدى phpbb
تابع الشرح وتحميل الأداه بالملف المرفق
phpBB has a great attachment tool that gives users the ability to upload multiple files,
if you have a podcast or own a music site, the most essential of these will be the MP3
extension. The code that you’re going to find on this page is not relevant to any other
part of the attachment mod besides the MP3 file. I understand that the video support
is not top notch either. The problem is that there is too many different extensions and
they all need to be tackled individually.
What we are going to do is provide any user who decides to upload an MP3 file on
your forum a flash player that plays the song and gives you a download link on the
same page. A couple scripts that we borrowed from to do this very simple task were
missing key parts.
For example, one had a less standard flash player, the other didn’t allow you
download the MP3 file anymore, and there was a great one that only would add the
flash player by clicking the inline option after you uploaded it. Mine is 100 percent
automatic after you upload the file.
Almost all of them conflicted with other attachments to some degree, but were great
ideas that only took me a few hours to improve on.
I’ve made sure to test this modification out. The instructions are perfect and all there.
I can’t guarantee that it will work in future versions of phpBB3, but this page will
surely have an update if that isn’t the case because this mod is very essential to one of
my forums.
The MP3 Player is brilliant and a universally accepted one that allows you to
playback, rewind, fast forward and displays the name of the track.
A cool feature that you might overlook is the ability to use the bbcode tag [mp3]
anywhere on your site which makes it extremely simple for your users to move songs
from one forum to another. If enough people request it, I can make this happen off
the site as well.
Features*Fast MP3 Player
*Download MP3 & listen on the same page
*Use the MP3 tag anywhere on your forum to embed uploaded song
*Uses Attachment Mod
*Very simple to install
*Works with SubSilver2 and Prosilver
*Change Color of Flash Player, Loop, or Autostart
Step 1: Download the playerFirst you will need to download this player (right-click,
Save as…). It is an .swf file; this is what will be used to allow you to playback your
MP3 files.
Step 2: Upload PlayerUpload the flash .swf file to your forums root directory. We will
get back to that later in this easy tutorial that I promise will be done in 10 minutes.
Step 3: Code ChangesOpenview sourceprint?
1 /includes/constant.php
Findview sourceprint?
- الكود:
-
1 define('ATTACHMENT_CATEGORY_QUICKTIME', 6); // Quicktime/Mov files
Add Afterview sourceprint?
- الكود:
-
1 define('ATTACHMENT_CATEGORY_MP3', 7); // MP3 Files - Streaming
Openview sourceprint?
1 /includes/functions_content.php
Findview sourceprint?
Add Afterview sourceprint?
- الكود:
-
1 // MP3 Streams
2 case ATTACHMENT_CATEGORY_MP3:
3 $l_downloaded_viewed = 'VIEWED_COUNT';
4 $block_array = array(
5 'U_FORUM' => generate_board_url(),
6 'ATTACH_ID' => $attachment['attach_id'],
7 'S_MP3_FILE' => true,
8 );
9 // Viewed/Heared File ... update the download count
10 $update_count[] = $attachment['attach_id'];
11 break;
Openview sourceprint?
1 includes/acp/acp_attachments.php
Findview sourceprint?
- الكود:
-
1 ATTACHMENT_CATEGORY_FLASH => $user->lang['CAT_FLASH_FILES'],
2 ATTACHMENT_CATEGORY_QUICKTIME => $user->lang['CAT_QUICKTIME_FILES'],
Add Afterview sourceprint?
1 ATTACHMENT_CATEGORY_MP3 => $user->lang['CAT_MP3_FILES'],
Openview sourceprint?
1 language/en/acp/attachments.php
Findview sourceprint?
- الكود:
-
1 $cat_lang = array(
2 ....
3 'CAT_QUICKTIME_FILES' => 'Quicktime media files',
Add Afterview sourceprint?
1 'CAT_MP3_FILES' => 'MP3',
Openview sourceprint?
1 styles/template/attachments.html
FindWorks for Subsilver2 and Prosilver
view sourceprint?
1
2 //
3 if (document.rmstream_{_file.ATTACH_ID}.GetClipWidth)
4 {
5 while (!document.rmstream_{_file.ATTACH_ID}.GetClipWidth())
6 {
7 }
8
9 var width = document.rmstream_{_file.ATTACH_ID}.GetClipWidth();
10 var height = document.rmstream_{_file.ATTACH_ID}.GetClipHeight();
11
12 document.rmstream_{_file.ATTACH_ID}.width = width;
13 document.rmstream_{_file.ATTACH_ID}.height = height;
14 document.ctrls_{_file.ATTACH_ID}.width = width;
15 }
16 // ]]>
17
Add AfterReplace yoururl.com with your forums address.
view sourceprint?
- الكود:
-
1
2
3
12
13 [url=http://arab.forumburkina.com/{_file.U_DOWNLOAD_LINK}]{_file.DOWNLOAD_NAME}[/url]
[ {_file.FILESIZE} {_file.SIZE_LANG} | {_file.L_DOWNLOAD_COUNT} ] </SPAN>
FindOnly if you want to change the color, autostart or loop for the flash player.
view sourceprint?
- الكود:
-
1 &playerID=1&
Add Afterview sourceprint?
1 bg=0x9DA5BF&leftbg=0xeeeeee&lefticon=0x666666&rightbg=0x394670
&rightbghover=0x999999&righticon=0xE7E7EF&righticonhover=0xffffff
&text=0x666666&slider=0x666666&track=0xFFFFFF&border=0x66
6666&loader=0x9FFFB8&loop=no&&autostart=no&&
Step 4: Extension SettingsThe easiest part!
Open phpBB3 Admin Control PanelGo to the posting tab.
Under “Manage Extensions” add “mp3″ under the group “files MP3″.
Under “Manage Extension Groups” add “Files MP3″, select the “MP3″ for a special category and any other settings that you like.
Under “Manage Extensions” verify that the “MP3″ extension is filed under “MP3 Files”.
Step 5: MP3 BBCodeNot necessary, only if you want to be able to move the flash player
to different forums.
Navigate to Posting BBcodes.BBCode usage
Add Newview sourceprint?
- الكود:
-
1 [mp3]{URL}[/mp3]
HTML replacement
Add Newview sourceprint?
1
2
3
4
5
6
7
Help Line
Add Newview sourceprint?
- الكود:
-
1 [mp3]URL to file[/mp3]
That’s it!
AcknowledgementThanks 404 Tech Support especially and this non english forum for
giving us the tools to make this mod possible.
If you feel that any work that you might have contributed to this small mod was not
acknowledged in this article feel free to leave a comment with a link to your website. Feel
free to ask for improvements, I’d be glad to consider them.
===================
التحميل من هنااااااااااا