4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 29, 2016, 07:14:35 PM

Login with username, password and session length
Search:     Advanced search
You're looking for some 4images templates and styles? Then visit this thread to show websites with 4images templates to download.
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Mods & Plugins (Releases & Support) (Moderators: mawenzi, Rembrandt)
| | |-+  [Mod]Flash Mp3 Player
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 3 4 » »» Print
Current Topic Rating: *****
Author Topic: [Mod]Flash Mp3 Player  (Read 41053 times)
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 892

Vienna


View Profile WWW
« on: August 04, 2009, 03:50:26 PM »

Hi!

einige werde diesen Flash MP3 Player schon kennen, hier ist meine Version.

die Playliste wird automatisch erstellt,
das heißt alle mp3 in der jeweiligen Kategorie werden automatisch in die Playliste übernommen.
befinden sich mp3 in der Lightbox werden die in die Playliste übernommen.

für die Hintergrundfarbe des Players sind für den IE Explorer keine weiteren Einstellungen erforderlich.
bei verwendung im Firefox muß in der mp3.html der wert für die Hintergrundfarbe (bgcolor) angepasst werden.

wollt ihr den Artist Namen angezeigt haben, müßt ihr den Namen in das Keyword Feld der mp3 Datei schreiben.

Demo: demo.vienna-pictures.com

Neue Files:
audiolist.xml
fsmp3playerv15.swf

Beide Dateien befinden sich im Anhang, ladet sie euch herunter und kopiert sie in den Root Ordner eurer Galerie.

Geänderte Files:
detail.php
mp3.html

1.)sucht in der detail.php
1
2
3
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
und fügt davor ein:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//######################################### Start Flash-Mp3-Player ##################################################
$file_ext get_file_extension($image_row['image_media_file']);
if (
$file_ext == mp3){ 
  
$img_total " AND image_id IN ('".str_replace(",","','",$image_id_sql)."')";
    if (!empty(
$image_id_sql)){
     
$sql "SELECT image_id, cat_id, image_name, image_keywords, image_media_file, image_thumb_file
                FROM "
.IMAGES_TABLE."
                WHERE image_active = 1 
$img_total AND cat_id NOT IN (".get_auth_cat_sql("auth_viewcat""NOTIN").") AND image_media_file LIKE '%.mp3' 
                ORDER BY "
.$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort']."
         "
;
  }
  else{ 
     
$sql "SELECT image_id, cat_id, image_name, image_keywords, image_media_file, image_thumb_file
                FROM "
.IMAGES_TABLE."
                WHERE  image_active = 1 
$sql_where_query AND cat_id = '$cat_id' AND cat_id NOT IN (".get_auth_cat_sql("auth_viewcat""NOTIN").") AND image_media_file LIKE '%.mp3'
                ORDER BY "
.$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort']."
                "
;
   }
	
$result $site_db->query($sql);
 
  
$fp fopen("audiolist.xml""w+");
	
$text "";
	
$text "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
	
$text .= "<songs>\n";
	
while (
$image_row $site_db->fetch_array($result,MYSQL_ASSOC)){
	
$zeichen = array('"',"'",'#''?''§''$''%''&''/''('')''=''^''°''*''@');
	
$img_name str_replace($zeichen,"",$image_row['image_name']);
	
$text .= "<song path=\"./data/media/".$image_row['cat_id']."/".$image_row['image_media_file']."\" bild=\"./data/thumbnails/".$image_row['cat_id']."/".$image_row['image_thumb_file']."\" artist=\"".$image_row['image_keywords']."\" title=\"".$img_name."\" />\n";
}
	
$text .= "</songs>\n";
	
fwrite($fp$text);
	
fclose($fp);
}
//######################################### End Flash Mp3 Player #####################################################

2.) sucht in templates/YourTemplates/media/mp3.html
1
2
3
<!-- Template file for MP3 Audio Files -->
<!--<
embed src="{media_src}" type="audio/x-mpeg" hidden="true" autostart="true" loop="true" height="1" width="1"></embed> -->
{
media_icon}<br />
und ersetzt es mit:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!-- Template file for MP3 Audio Files -->
<!--<
embed src="{media_src}" type="audio/x-mpeg" hidden="true" autostart="true" loop="true" height="1" width="1"></embed> -->
<!-- {
media_icon}<br /> -->
<!-- 
######################################### Start Flash-Mp3-Player ################################################## -->
<div>
<
object type="application/x-shockwave-flash" id="fsmp3playerv15" data="fsmp3playerv15.swf" width="450" height="300" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"  >
	
<
param name="allowScriptAccess" value="sameDomain"/>
	
<
param name="movie" value="fsmp3playerv15.swf" />
	
<
param name="wmode" value="transparent" />
	
<
param name="loop" value="false"/>
	
<
param name="menu" value="false"/>
	
<
param name="quality" value="high"/>
  <
object  type="application/x-shockwave-flash"  data="fsmp3playerv15.swf"   width="450" height="300"  />
	
<
param name="bgcolor" value="#ffffff"/> <!-- backgroundcolor for FF value="#yourColorInHex" // -->
	
<
param name="movie" value="fsmp3playerv15.swf" />
  </
object>
</
object>
  <
noscript>
      
Your browser does not support Flash!
     <
span style="text-align:center;"><a href="http://www.macromedia.com/go/getflash/">Install Flash Now!</a></span>
  </
noscript>
</
div>
<!-- 
######################################### End Flash Mp3 Player ##################################################### -->

viel Spass Smile

mfg Andi

* Flash_mp3_files.zip (10.02 KB - downloaded 263 times.)
« Last Edit: August 20, 2009, 06:23:53 PM by Rembrandt » Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
mawenzi
Moderator
4images Guru
*****
Offline Offline

Posts: 4500

Thank You
-Given: 36
-Receive: 121


View Profile
« Reply #1 on: August 04, 2009, 04:17:30 PM »

... danke Andi ...  Very Happy
... verschoben nach "Mods & Plugins (Releases & Support)" ...
Logged

Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 560

mmm PHP...


View Profile WWW
« Reply #2 on: August 04, 2009, 04:42:01 PM »

Thanks Andi for sharing.
There are a few things I must point out at:

1) the mod saves .xml file into root of 4images, which means it will be shared with other visitors and also might conflict if two visitors opened two different .mp3 files.
2) the mod doesn't support search results
3) it might produce invalid .xml if image name contains quotes
4) the playlist will always be sorted by...image_id I guess.
5) if(empty($image_id_sql)) is unnecessary
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 892

Vienna


View Profile WWW
« Reply #3 on: August 04, 2009, 07:16:27 PM »

Hi!
...
1) the mod saves .xml file into root of 4images, which means it will be shared with other visitors and also might conflict if two visitors opened two different .mp3 files.
2) the mod doesn't support search results
3) it might produce invalid .xml if image name contains quotes
4) the playlist will always be sorted by...image_id I guess.
5) if(empty($image_id_sql)) is unnecessary

Thank you for your feedback
i think I have done all the points listed. *puhhh*

I always thought is simple php   Smile

point 1 is not clear to me, I've tested with different user, it works for me.  ...hm?
or maybe you have a better solution? ....I have no idea.

mfg Andi
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
GaYan
Sr. Member
****
Offline Offline

Posts: 301

Thank You
-Given: 6
-Receive: 26

♫ | G2 | ♫


View Profile WWW
« Reply #4 on: August 05, 2009, 08:19:42 PM »

yeeeh...i was looking for this  Laughing i think some 1 also did this b4..but he has removed it..thanks man,,,, this is 1 of the best mods we ever expected !  Smile
Logged

I'm Back Smile
mawenzi
Moderator
4images Guru
*****
Offline Offline

Posts: 4500

Thank You
-Given: 36
-Receive: 121


View Profile
« Reply #5 on: August 20, 2009, 11:42:08 AM »

... nur als Hinweis ...
... im Media-Template sollten die Hinweiszeilen "## Start / End Flash-Mp3-Player ##" entsprechend für eine html-Datei und nicht wie für eine php-Datei auskommentiert sein, so sind diese Zeilen jeweils über und unter dem Flash-Player zu sehen ... Wink
Logged

Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...
kai
Administrator
Addicted member
*****
Offline Offline

Posts: 1397

Thank You
-Given: 65
-Receive: 187


View Profile WWW
« Reply #6 on: August 20, 2009, 11:58:32 AM »

Well done! Thank you!
Logged


Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search
Sumale.my
Addicted member
******
Offline Offline

Posts: 1764

Thank You
-Given: 164
-Receive: 77

Neverdie


View Profile
« Reply #7 on: August 20, 2009, 02:22:30 PM »

WOW!
Tolle Sache!

Aber den HTML Code würde ich nicht im [php*][*/php] setzen sondern in [code*][*/code]

Wirklich nice!

Habs in meiner Liste aufgenommen!
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 892

Vienna


View Profile WWW
« Reply #8 on: August 20, 2009, 06:23:00 PM »

Hi!
stimmt, auf meiner demoseite sind sie deshalb nicht zu sehn da ich dort den fehler ursprünglich korrigiert habe.

nur aufs forum habe ich vergessen. Smile

mfg Andi

ps.: aber anscheinend interressiert das eh niemanden.  Crying or Very sad
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Kurman
Newbie
*
Offline Offline

Posts: 42

Thank You
-Given: 3
-Receive: 2


View Profile WWW
« Reply #9 on: August 21, 2009, 12:07:54 AM »

Viele danke!

Very simple solution!

Has the same problem, as previous Flash Mp3 Player from KW (lightbox edition, via playlist): both stops reading the song in xml playlist if it has any cyrillic charachter in keywords  Shocked - not in file name or something, but key words. It seems as data to xml being imported from keywords too. It is useless feature, but not knowing how to prevent it, I do not fill in Keywords nothing in cyrillic.  Sad

And if I see any cyrillyc in xml content, I remoove it manually, and then player works vell.

For example: some times, when generating xml content, there may randomly appear something in cyrillyc, has been taked from keywords.:
1
2
<song path="./data/media/11/cevsen015.mp3" bild="./data/thumbnails/11/cevsen015.jpg" artist="IN THIS PLACE SOMETIMES BEYING
 INSERTED KEYWORDS, IF THEY ARE IN CYRILLIC, AND AS A RESULT, PLAYER STOPS READING XML RIGHT HERE" title="cevsen015" />

So, this player should be used outside of lightbox (for them, who use cyrillic at least, by manullly tracking xml contents), but not in lightbox where xml file regenerated every time.  Neutral

But very good player for them, who do not use non-latin charachters.  Wink
« Last Edit: August 21, 2009, 12:30:27 AM by Kurman » Logged

4images running as a music portal http://music.kurman.ru/
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 892

Vienna


View Profile WWW
« Reply #10 on: August 21, 2009, 05:33:35 AM »

Hi!
... both stops reading the song in xml playlist if it has any cyrillic charachter in keywords  Shocked - not in file name or something, but key words. ...

i have cyrillic charachter in keywords it work, or I understand something wrong?

look at my demo site...

mfg Andi
Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Kurman
Newbie
*
Offline Offline

Posts: 42

Thank You
-Given: 3
-Receive: 2


View Profile WWW
« Reply #11 on: August 21, 2009, 02:20:51 PM »

Yes, it works, but randomly, (I did not find reason) while generating xml it inserts in artist name cyrillyc keywords (not from description, but exactly keywords, of the track). (as described in previouse message).

But maybe you are right, and there possibly are some other reasons.. I'll test it a while and return if see any changes. At first time, when I detected it, I manually deleted all cyrillic charachters from xml file and till now have no problem. Maybe generating xml file was interrupted by something else(if it possible).. I do not know.. As I've said, if problem returns, it will be more clear..

In the next days I intend to test it for using as a playlist player in lightbox.
Have you tested  it in that way?

Nevertheless, it is a good job and useful MOD.  Good
« Last Edit: August 21, 2009, 02:41:36 PM by Kurman » Logged

4images running as a music portal http://music.kurman.ru/
Tino23
Full Member
***
Offline Offline

Posts: 180

Thank You
-Given: 16
-Receive: 4


View Profile WWW
« Reply #12 on: September 13, 2009, 02:50:22 PM »

Kann es sein, dass der Player als Postkarte nicht Funktioniert? Bei mir wird dann bloß der Player angezeigt, aber weiter passiert nichts. Sonst läuft aber alles wunderbar!
Logged
Rembrandt
Moderator
4images Guru
*****
Offline Offline

Posts: 4187

Thank You
-Given: 116
-Receive: 892

Vienna


View Profile WWW
« Reply #13 on: September 13, 2009, 04:05:07 PM »

Hi!
Kann es sein, dass der Player als Postkarte nicht Funktioniert? Bei mir wird dann bloß der Player angezeigt, aber weiter passiert nichts. Sonst läuft aber alles wunderbar!
habe es gerade auf der demoseite probiert, als vorschau funktioniert es einwandfrei.
aber ganz ehrlich, den player als postkarte,... daran habe ich nicht wirklich gedacht.  Razz

mfg Andi

Logged

Meine 4Images Modifikationen  Now over 100 Modification Online!    Meine 4images Demo Seite


Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Tino23
Full Member
***
Offline Offline

Posts: 180

Thank You
-Given: 16
-Receive: 4


View Profile WWW
« Reply #14 on: September 13, 2009, 05:42:13 PM »

 Cool nicht so wild. Ich hab den Mod ja schon seit einem Jahr bei mir drin und hab es auch erst heute gemerkt Wink wollte nur sicher gehen, dass ich nicht damals einen fehler beim einbauen gemacht habe (hatte den Mod noch von KurtW)
Logged
Pages: [1] 2 3 4 » »» Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.166 seconds with 20 queries.
Post your comments here