| Author |
Topic Search Topic Options
|
numanme
Senior Member
Joined: 21 May 2003
Location: United Kingdom
Status: Offline
Points: 220
|
Post Options
Thanks(0)
Quote Reply
Topic: flash player Posted: 21 December 2007 at 3:18pm |
I have been trying to get a flash player working on my forum one that any member can post without too much difficulty I have managed to get one working using The JW MP3 Player. But this still involves pasting in a large bit of script, I was wondering if it is possible to create some kind of code or page that the user could use just to put the MP3 link in to generate the code.
look at this
|
 |
Scotty32
Moderator Group
Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
|
Post Options
Thanks(0)
Quote Reply
Posted: 21 December 2007 at 4:46pm |
it should be pretty easy. create a BBCode so that you do [fplayer]http://site.com/song.mp3[/fplayer] and it loads JW MP3 player. you could also look at my Multi Media Functions mod
|
|
|
 |
numanme
Senior Member
Joined: 21 May 2003
Location: United Kingdom
Status: Offline
Points: 220
|
Post Options
Thanks(0)
Quote Reply
Posted: 21 December 2007 at 5:15pm |
Sorry to say I could not get your script working on my forum, have you got a text file of the cod update for each page updated. So I can add it manually if that is possible.
This is the cod that I have to enter to have a flash player on my site can anyone help to make it a little easier
<CENTER> </CENTER> <EMBED src=albumplayer2.swf width=300 height=20 type=application/x-shockwave-flash allowfullscreen="true" allowscriptaccess="always" flashvars="&file=PUT YOUR MP3 HERE&height=140&width=240&frontcolor=0x999999&backcolor=0x00000&lightcolor=0x990000&&height=20&width=300"> <CENTER> </CENTER>
|
 |
Scotty32
Moderator Group
Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
|
Post Options
Thanks(0)
Quote Reply
Posted: 21 December 2007 at 7:54pm |
since you posted in the V8 forum i will assume your using V8 - if so, make sure you use V1 of my mod as V2 is for Web Wiz Forums version 9. my mod only plays music via an embeded media player such as Windows Media Player or QuickTime. As for the code above, you will need to add the following lines to a couple of pages. Add this to forum_posts.asp just under where the flash line is called.
If InStr(1, strMessage, "[FPLAYER]", 1) > 0 AND InStr(1, strMessage, "[/FPLAYER]", 1) > 0 Then strMessage = formatFPLAYER(strMessage) |
add this line to some free space in the functions/functions_format_post.asp
'This function formats FPLAYER Function formatFPLAYER(ByVal strMessage) 'Declare variables Dim strFPLAYERLink 'Hold the You FPLAYER Link Dim lngStartPos 'Holds search start postions Dim lngEndPos 'Holds end start postions Dim strBuildFPLAYER 'Holds the built coded message Dim strOriginalFPLAYER 'Holds the code block in original format 'Loop through all the BB codes in the message and convert to a link to the FPLAYER movie Do While InStr(1, strMessage, "[FPLAYER]", 1) > 0 AND InStr(1, strMessage, "[/FPLAYER]", 1) > 0 'Get the start and end of the FPLAYER BBcode lngStartPos = InStr(1, strMessage, "[FPLAYER]", 1) + 6 lngEndPos = InStr(lngStartPos, strMessage, "[/FPLAYER]", 1) 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 6 'If there is a FPLAYER link then process If lngEndPos > lngStartPos Then 'Get the FPLAYER link strFPLAYERLink = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)) 'Insert FPLAYER movie strBuildFPLAYER = "<CENTER> </CENTER><EMBED src=""albumplayer2.swf"" width=300 height=20 type=application/x-shockwave-flash allowfullscreen=""true"" allowscriptaccess=""always"" flashvars=""&file=" & strFPLAYERLink & "&height=140&width=240&frontcolor=0x999999&backcolor=0x00000&lightcolor=0x990000&&height=20&width=300""><CENTER> </CENTER>" End If 'Get the start and end position in the start and end position in the message of the BBcode FPLAYER lngStartPos = InStr(1, strMessage, "[FPLAYER]", 1) lngEndPos = InStr(lngStartPos, strMessage, "[/FPLAYER]", 1) + 7 'Make sure the end position is not in error If lngEndPos < lngStartPos Then lngEndPos = lngStartPos + 6 'Get the original code to be replaced in the message strOriginalFPLAYER = Trim(Mid(strMessage, lngStartPos, lngEndPos-lngStartPos)) 'Replace the code codes in the message with the new formated code block If strBuildFPLAYER <> "" Then strMessage = Replace(strMessage, strOriginalFPLAYER, strBuildFPLAYER, 1, -1, 1) Else strMessage = Replace(strMessage, strOriginalFPLAYER, Replace(strOriginalFPLAYER, "[", "[", 1, -1, 1), 1, -1, 1) End If Loop 'Return the function formatFPLAYER = strMessage End Function |
|
|
|
 |
numanme
Senior Member
Joined: 21 May 2003
Location: United Kingdom
Status: Offline
Points: 220
|
Post Options
Thanks(0)
Quote Reply
Posted: 22 December 2007 at 1:27am |
|
|
 |
numanme
Senior Member
Joined: 21 May 2003
Location: United Kingdom
Status: Offline
Points: 220
|
Post Options
Thanks(0)
Quote Reply
Posted: 22 December 2007 at 1:39am |
http://www.numanme.co.uk/numanme-playlist.zip
Here is a Zip
of the files I have in the forum folder if it helps
|
 |
Scotty32
Moderator Group
Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
|
Post Options
Thanks(0)
Quote Reply
Posted: 22 December 2007 at 11:11am |
|
Im sorry i cant test this as i dont run V8 any more.
if you could link me to a post on your forum where the error is i might be able to see the problem
|
|
|
 |
numanme
Senior Member
Joined: 21 May 2003
Location: United Kingdom
Status: Offline
Points: 220
|
Post Options
Thanks(0)
Quote Reply
Posted: 22 December 2007 at 3:08pm |
http://www.numanme.co.uk/forumme/forum_posts.asp?FID=19&TID=3306&PN=1
Got the flash player to show but when you press play the MP3 will not play
And after the flash player you can see ER]
HELP
|
 |