4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: Rembrandt on August 04, 2009, 03:50:26 PM

Title: [Mod]Flash Mp3 Player
Post by: Rembrandt 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 (http://www.demo.vienna-pictures.com/categories.php?cat_id=2)

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

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------

und fügt davor ein:

//######################################### 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

<!-- 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:

<!-- 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 :)

mfg Andi
Title: Re: [Mod]Flash Mp3 Player
Post by: mawenzi on August 04, 2009, 04:17:30 PM
... danke Andi ...  :D
... verschoben nach "Mods & Plugins (Releases & Support)" ...
Title: Re: [Mod]Flash Mp3 Player
Post by: V@no 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
Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt 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   :)

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
Title: Re: [Mod]Flash Mp3 Player
Post by: GaYan on August 05, 2009, 08:19:42 PM
yeeeh...i was looking for this  :lol: 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 !  :)
Title: Re: [Mod]Flash Mp3 Player
Post by: mawenzi 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 ... ;)
Title: Re: [Mod]Flash Mp3 Player
Post by: kai on August 20, 2009, 11:58:32 AM
Well done! Thank you!
Title: Re: [Mod]Flash Mp3 Player
Post by: Sunny C. 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!
Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt on August 20, 2009, 06:23:00 PM
Hi!
... nur als Hinweis ...
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. :)

mfg Andi

ps.: aber anscheinend interressiert das eh niemanden.  :cry:
Title: Re: [Mod]Flash Mp3 Player
Post by: Kurman 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  8O - 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.  :(

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.:
Code: [Select]
<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.  :|

But very good player for them, who do not use non-latin charachters.  :wink:
Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt 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  8O - 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
Title: Re: [Mod]Flash Mp3 Player
Post by: Kurman 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.  :thumbup:
Title: Re: [Mod]Flash Mp3 Player
Post by: Tino23 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!
Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt 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.  :P

mfg Andi

Title: Re: [Mod]Flash Mp3 Player
Post by: Tino23 on September 13, 2009, 05:42:13 PM
 8) nicht so wild. Ich hab den Mod ja schon seit einem Jahr bei mir drin und hab es auch erst heute gemerkt ;-) wollte nur sicher gehen, dass ich nicht damals einen fehler beim einbauen gemacht habe (hatte den Mod noch von KurtW)
Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt on September 13, 2009, 06:10:20 PM
Hi!
8) nicht so wild. Ich hab den Mod ja schon seit einem Jahr bei mir drin und hab es auch erst heute gemerkt ;-) wollte nur sicher gehen, dass ich nicht damals einen fehler beim einbauen gemacht habe (hatte den Mod noch von KurtW)
achso, ich dachte du redest von meinen mod.

mfg Andi
Title: Re: [Mod]Flash Mp3 Player
Post by: Tino23 on September 15, 2009, 09:39:35 PM
Naja die beiden ähneln sich ja bzw. sind vom Code her eigentlich gleich, von daher auch der selbe Effekt mit der Postkarte.
Aber schön das es den Mod hier weider gibt und andere ihn auch Nutzen können  :!:
Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt on September 15, 2009, 09:54:05 PM
.. sind vom Code her eigentlich gleich, von daher auch der selbe Effekt mit der Postkarte...
und der wäre?
Title: Re: [Mod]Flash Mp3 Player
Post by: Tino23 on September 16, 2009, 01:36:08 PM
Meinst jetzt den "Fehler" beim Postversand? Na wie gesagt wenn ich so eine Seite mit MP3 (Flashplayer) als Postkarte verdende, wird mir in der Postkarte nur der Flashplayer angezeigt, aber die MP3 nicht abgespielt.
Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt on September 16, 2009, 02:30:23 PM
ich meinte diese aussage von dir, die so nicht stimmt.
...sind vom Code her eigentlich gleich, von daher auch der selbe Effekt mit der Postkarte...

mfg Andi
Title: Re: [Mod]Flash Mp3 Player
Post by: Tino23 on September 16, 2009, 08:12:59 PM
Hi, sollte ja auch kein Vorwurf sein! Aber wenn ich euren Code vergleiche stimmen die zu 90% überein, selbst bei den Kommentaren  und der damalige Mod von KurtW wurde am June 02, 2007, 02:44:55 PM veröffentlich und halt aus bekannten gründen Anfang dieses Jahres wieder gelöscht.

Ihr benutzt auch den gleichen Flashplayer bloß mit unterschiedlicher Werbung drin und das es von KurtW 2 Varianten des Players gab, einmal für die Gallerie und dann für die Lightbox, so wie du ihn verwendest. Schreib mir am besten mal ne PM mit deiner Mail, sonst blähen wir hier das unnötig auf und die User müssen wieder viel zu viel Lesen ;-)

Also wie gesagt sollte kein Vorwurf sein, ich hab halt bloß mal euren Code verglichen und es ist ja auch schön, dass sich wieder jemand gefunden hat, solch einen MOD den Usern zu Verfügung zu stellen...

cu Tino
Title: Re: [Mod]Flash Mp3 Player
Post by: GaYan on September 27, 2009, 05:31:25 PM
Error  8O

When I upload a mp3 via ftp and tries to play it..the player dosent recognize it :(
it only accepts mp3 files when its uploaded by acp or by a user

so my question is,,can we use this for files which is upload via ftp also ?
Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt on September 27, 2009, 05:41:54 PM
...so my question is,,can we use this for files which is upload via ftp also ?
???
this has nothing to do with it, as you upload the files.
I copy them all using FTP.

if you upload via FTP, go to the ACP Check New Images.

mfg Andi

Title: XML Mp3 File
Post by: chamkani.net on January 09, 2010, 08:19:00 PM
I am using the old mp3 mode for 4images, i have a problem when i changing my server i lost XML file, any one give me/tell me xml file for mp3, my site address it http://chamkani.net/tones please check it..

OR

I install the new mp3 mode but it play the first tone of the category for all images, any modification to play only selected mp3?
Title: Re: [Mod]Flash Mp3 Player
Post by: Bommel on January 27, 2010, 10:13:45 PM
Hallo Rembrandt,

besten Dank für diese MOD. :thumbup:

Problemstellung Nr.1:

Ist es machbar, dass die Dateien aus der Playlist über die ZIP-Downloadfunktion als Archiv heruntergeladen werden können? Ebenso gut ist, wenn über die normale Download-Funktion das gerade abgespielte Lied heruntergeladen werden könnte.

Problemstellung Nr. 2:

Ich möchte den Flashplayer per Link in einem extra Fenster - welches idealerweise die Maße des Flashplayers hat und ausschließlich nur den Flashplayer enthält - starten und dann dort eine vordefinierte Kategorie abspielen lassen. Wie kann das bewerkstelligt werden?

Freundliche Grüße, Bommel
Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt on January 28, 2010, 07:48:18 AM
...
Problemstellung Nr.1:...

das jeweilige mp3 das du aus der categorie herraus auswählst ist downloadbar..
aus der flashplayer liste funktioniert das nicht...

...
Problemstellung Nr.2:...

das liese sich machen...
Title: Flash Mp3 Player im eigenen Fenster mit persönlicher Playlist starten
Post by: Bommel on January 28, 2010, 09:55:14 AM
Hallo Rembrandt,

danke für deine Antwort. :)

Problemstellung 1 - OK, dann lege ich das ad acta. Schön wäre es aber gewesen, das möchte ich nicht verschweigen.

Problemstellung 2 - Prima, das lässt doch etwas Hoffnung bezüglich der Wünsche für meine Webseite. Wie wäre es, wenn du mir einen Ansatz lieferst? Ich möchte hier nicht immer nur auf die Hilfe anderer hoffen, sondern auch selbst Hand anlegen. Das Fenster mit den Maßen und Inhalt bekomme ich bestimmt hin. Aber bei php brauche ich als Laie eben aber noch den gewissen Anstoss. Schließlich will ich auch noch etwas dabei lernen. ;)

Freundliche Grüße, Bommel

Nachtrag:

So, habe jetzt eine Lösung gefunden. Ich weiß nicht, warum ich immer erst an PHP denke, wenn es doch mit Javascript genauso gut geht.  :roll:

Update (29.01.2010 10:35)

Nachdem ich feststellen musste, dass die alte Variante Probleme mit dem Popup-Fenster bei einigen Browsern brachte, habe ich mich dazu mal schlau gemacht. Das Ergebnis ist jetzt eine überarbeitete Version, welche mit allen Browsern funktionieren sollte. Die verwendete Lösung dazu fand ich hier: http://www.stichpunkt.de/beitrag/popup.html

Neue Dateien/ Ordner:

/js/popupwindow.js
/playmusic
/playmusic/flashplayer.html
/playmusic/audiolist.xml

geänderte Dateien:

template/dein_template/header.html

Schritt1:
Erstelle eine neue Datei mit dem Namen "popupwindow.js". Kopiere dann folgenden Code in diese Datei und speichere diese Datei in den Ordner "js" deiner 4Images-Installation. Besteht dieser Ordner noch nicht, dann erstelle diesen neu. Du wirst ihn später sicher auch für andere MODs benötigen.


// Script by Thomas Stich
// http://www.stichpunkt.de/beitrag/popup.html
// use it if you like it
//
// <a href="html-or.jpg" onclick="return popup(this,123,456)" title="..."
// or
// <a href="html-or.jpg" onclick="return popup(this)" title="..."


var pop = null;

function popdown() {
  if (pop && !pop.closed) pop.close();
}

function popup(obj,w,h) {
  var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href;
  if (!url) return true;
  w = (w) ? w += 20 : 450;  // 150px*150px is the default size
  h = (h) ? h += 25 : 325;
  var args = 'width='+w+',height='+h+',resizable';
  popdown();
  pop = window.open(url,'',args);
  return (pop) ? false : true;
}

window.onunload = popdown;
// window.onfocus = popdown;


Schritt 2:

Erstelle einen neuen Ordner mit dem Namen "playmusic" in dem Root-Verzeichnis deiner 4Images-Installation.

Schritt 3:

Erstelle eine neue Datei namens "flashplayer.html". Kopiere in diese Datei den folgenden Code von Rembrandt (http://www.4homepages.de/forum/index.php?topic=25472.msg139546#msg139546):


<!-- ######################################### 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 ##################################################### -->


und ändere dann in diesem Code die 4 Einträge "fsmp3playerv15.swf" folgendermaßen "xxxx://www.deine-domain.xxx/fsmp3playerv15.swf". Speichere diese Datei dann in den Ordner "playmusic" ab.

Schritt 4:

Füge in der Datei template/dein_template/header.html folgenden Eintrag an letzter Stelle vor </head> ein:


<script type="text/javascript" src="./js/popupwindow.js"></script>


Schritt 5:

Variante 1:

Erstelle eine neue Datei mit dem Namen "audiolist.xml" und speichere diese im Ordner "playmusic" ab. Kopiere dann in diesen Ordner deine gewünschten MP3-Dateien. Sobald der Flashplayer gestartet wird, werden alle in diesem Ordner abgelegten MP3-Dateien in die Play-Liste aufgenommen.

Variante 2:

Erstelle eine neue Datei mit dem Namen "audiolist.xml" und füge folgenden Code in diese Datei ein:


<?xml version="1.0" encoding="UTF-8"?>
<songs>
<song path="http://www.deine-domain.xxx/data/media/cat-id/song_1.mp3" bild="http://www.deine-domain.xxx/data/thumbnails/cat-id/" artist="" title="Song 1" />
</songs>


Bearbeite jetzt den Eintrag zwischen <song und >. Gib den komplette Pfad zu der MP3-Datei an. Anstelle von "cat-id" musst du nun die ID der Kategorie angeben, in der die gewünschte MP3-Datei vorliegt. Die Parameter "artist" und "title" können mit dem Namen und dem Titel des Songs vervollständigt werden, welche dann auch im Flasplayer angezeigt werden. Dies wiederholst du jetzt für jede weitere MP3-Datei, die vom Flashplayer abgespielt werden soll. Du kannst dir somit deine eigene Play-List erstellen und dabei in anderen Ordner vorliegende MP3-Dateien verwenden. Speichere diese Datei dann im Anschluss im Ordner "playmusic" ab.

Schritt 6:

Füge in deinem Template den folgenden Link an gewünschter Stelle ein:

<a href="./playmusic/flashplayer.html" onclick="return popup(this)">Musik abspielen</a>

Fertig!

Der Flashplayer kann jetzt per Mausklick aus deinem Template heraus gestartet werden und spielt dann deine Wunschmusik ab. Folgende Eigenschaft sollte noch erwähnt werden. Das Popup-Fenster mit dem Flashplayer wird automatisch beendet, sobald sich der Benutzer abmeldet oder das Fenster mit deiner Webseite schließt.

Wer sich noch etwas über die möglichen Parameter für den Flashplayer informieren möchte, sollte mal auf dieser Seite nachschauen: http://kb2.adobe.com/cps/127/tn_12701.html . Ich habe diese Parameter nicht komplett ausprobiert, doch ich denke, dass diese funktionieren sollten.

Freundliche Grüße, Bommel

@Rembrandt

Welche Parameter können für den Flashplayer in der flashplayer.html gesetzt werden? Ich kenne mich da noch nicht so gut mit aus.
Title: Re: [Mod]Flash Mp3 Player
Post by: Bommel on January 29, 2010, 10:45:35 AM
Hallo allerseits,

nachdem ich merkte, dass es mit der alten Variante Probleme mit dem Popup-Fenster bei einigen Browsern gab, habe ich eine neue Lösung angestrebt. Die überarbeitete Version/ Anleitung findet ihr im vorhergehenden Beitrag und sollte jetzt reibungslos funktionieren.

Freundliche Grüße, Bommel
Title: Re: [Mod]Flash Mp3 Player
Post by: komsho24 on April 05, 2010, 08:12:08 PM
Is it possible to create a button that contains characters play instead of download button, and when it is clicked on play mp3 file that plays in the background?
Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt on April 05, 2010, 08:17:23 PM
Hi!

look here :  http://www.4homepages.de/forum/index.php?topic=25413.msg139206#msg139206

mfg Andi
Title: Re: [Mod]Flash Mp3 Player
Post by: baerke on July 30, 2010, 12:02:36 AM
Hello, i am using this mod since one year. I found out that it is possible to access the player directly without logging in on the site by typing the direct adress of the player.
Is it possible to block this? I do not want that people who did not log in can access the player.
Thanks for the respons
Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt on July 30, 2010, 06:29:31 AM
.. I do not want that people who did not log in can access the player.
:?: that is the same as in the pictures

go in the ACP/Categories/Edit Categories and set restriction for the music categories.

or search in templates/YourTemplates/media/ mp3.html:
Code: [Select]
<div>insert above:
Code: [Select]
{if user_loggedout}<b class="title">Please Login or Register</b><br>{endif user_loggedout}
{if user_loggedin}
search:
Code: [Select]
</div>insert below:
Code: [Select]
{endif user_loggedin}
mfg Andi
Title: Re: [Mod]Flash Mp3 Player
Post by: baerke on July 30, 2010, 02:55:17 PM
.. I do not want that people who did not log in can access the player.


Thanks for the reply.

I have tried the changes you have proposed. But without succes.

When people go directly to http://mysite/fsmp3playerv15.swf they see the player and the playlist.
There is no logon screen.
Is it because the player is in the root directory?


I have tried it on your demosite and its the same, although i think that you haven't secured it with a password.


 

Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt on July 30, 2010, 06:36:34 PM
hmm... good question, to time i have not a answer, sorry
Title: Re: [Mod]Flash Mp3 Player
Post by: baerke on July 30, 2010, 11:39:42 PM
ok, doesn't matter, you cannot know it all.
I hear from you when you have a clou, i will try for myself and keep you informed..
greetings, Rob  :wink:
Title: Re: [Mod]Flash Mp3 Player
Post by: V@no on July 31, 2010, 04:41:16 AM
@Rembrandt:
do you have .fla file for your version of the player? (it looks like your player is different then any other version I could find)
If you do, then you can change auidolist.xml file to audiolist.php in FSMP3Playerv1 component definition. After that you can remove all changes from details.php and move everything into audiolist.php This way it should fix the problem baerke described and also a possible cross-user problem I mentioned in my very first reply.
Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt on July 31, 2010, 06:59:58 AM
Hi!

to time, i have no programm to edit the file.
i think it was flash mx, not mx 2004.
i have added the attachment

mfg Andi
Title: Re: [Mod]Flash Mp3 Player
Post by: baerke on August 01, 2010, 02:18:19 PM
@V@no:
"do you have .fla file for your version of the player? (it looks like your player is different then any other version I could find)"

Hi V@no, i have tried this but the playlist will not load in the player anymore.
I think that there are some codes i have forgotten. I am not used work with php. (just copy and paste will not work)

Can you advise me what to do?

thanks for your answer. Rob
Title: Re: [Mod]Flash Mp3 Player
Post by: V@no on August 01, 2010, 03:18:45 PM
I installed 30 days trial of adobe flash, opened .fla file and realized that I have no idea what to do with it...

If managed to make it actually use use audiolist.php then create that file with this following content:
<?php
echo '
put content from audiolist.xml file here
';
?>

see if it works. if it does, would be nice have that .swf file for further testings ;)

P.S.

You know what, all this also could be done via mod_rewrite if such available on your server...

P.P.S.
@Rembrandt:
Maybe it's better use more powerful, highly customizable JW Player (http://www.longtailvideo.com/players/jw-flv-player/) instead?
Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt on August 01, 2010, 05:28:00 PM
...
Maybe it's better use more powerful, highly customizable JW Player (http://www.longtailvideo.com/players/jw-flv-player/) instead?
can you do it ?  :)
Title: Re: [Mod]Flash Mp3 Player
Post by: baerke on August 01, 2010, 10:46:07 PM
"see if it works. if it does, would be nice have that .swf file for further testings ;)"

Hi V@no, i've tested it still without succes.

The file i used (audiolist.php)  is attached.

Title: Re: [Mod]Flash Mp3 Player
Post by: peyv on August 09, 2010, 03:13:58 PM
 :) Hallo leute vielen Dank , für den Mod sehr schöne sache , ich habe installiert und läuft sehr gut , aber leider der player spielt alle MP3 in der kategorie ab, ich will aber nu das angeklickte sonsg abgespielt wird
bitte um hilfe , meine seite besteht nur als mp3 und finde keine lösung  :|


Hello people,  very nice  mod , thank you
 I have installed and runs very well, but unfortunately the player plays all songs in the category, but I want Only the selected  sonsg  played
please help, my site is only as mp3 and find no solution
Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt on August 09, 2010, 05:20:10 PM
ich will aber nu das angeklickte sonsg abgespielt wird....
versuche mal das:
suche im code:

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";
}

und ersetze es mit:

//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";
//}
Title: Re: [Mod]Flash Mp3 Player
Post by: peyv on August 09, 2010, 06:18:58 PM
WOW Du bist ein Held Danke Danke Danke 1000 mal danke problem gelöst ,, ich bin wirklich dir dankbar :D
Title: Re: [Mod]Flash Mp3 Player
Post by: yousaf on October 03, 2011, 08:05:34 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

i am using the old MP3 mod by KurtW and i am facing .xml file issue pointed by V@NO, my visitor listen to different tracks instead of the one opened, How to prevent it? and does this mod act the same? anyone has faced such issue with this mod yet?
Title: Re: [Mod]Flash Mp3 Player
Post by: Marion on July 28, 2012, 11:42:39 AM
Vielen Dank für diesen MOD! Einbau incl. der Änderung für "ohne Playlist"  hat wunderbar in 1.7.10 geklappt !
MP3s werden auch abgespielt aber leider immer in Endlosschleife, egal in welcher Stellung der kleine Repeatbutton ist.
Kann man das im Code irgendwo abändern/abstellen ?
Title: Re: [Mod]Flash Mp3 Player
Post by: Rembrandt on July 28, 2012, 12:55:12 PM
Hi!

Hat mich jetzt selber gewundert das man das nicht abstellen kann, und auf die schnelle habe ich auch nichts gefunden...

mfg Andi
Title: Re: [Mod]Flash Mp3 Player
Post by: Marion on July 28, 2012, 02:03:05 PM
Danke trotzdem für's Nachschauen und Antworten  :)