4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: Rembrandt on July 26, 2009, 09:52:10 PM

Title: [MOD]Music for your Pictures
Post by: Rembrandt on July 26, 2009, 09:52:10 PM
Hi!

Mit dieser Modifikation ist es möglich zu jeden Bild auf der Detailseite mittels eines integrierten Flashplayers,
eine andere mp3 Datei abzuspielen.
Der Flashplayer ist includiert.

Demo:http://demo.vienna-pictures.com (http://www.demo.vienna-pictures.com/categories.php?cat_id=5)

Neu Dateien:
audio_bit.html
emff_silk.swf

Dateien zu ändern:
ein neuer Datenbank eintrag
admin/images.php
includes/db_definitions.php
lang/yourLanguage/main.php
details.php
templates/yourTemplates/detail.html

1.)Erstellt einen neuen Datenbankeintrag, im Anhang befindet sich die Datei "audio_install.php"
kopiert sie in euren rootorder der Galerie und führt sie aus.

2.)Im Anhang befindet sich die Datei "emff_silk.swf", kopiert sie in euer templates/YourTemplates Verzeichniss.

3.)Erstellt eine neue Datei mit den Namen "audio_bit.html" ,
 und kopiert sie in euer Templates/YourTemplates Verzeichniss, mit folgenden inhalt:

<object type="application/x-shockwave-flash" data="{template_url}/emff_silk.swf" width="88" height="40"/>
 <param name="movie" value="{template_url}/emff_silk.swf"/>
 <param name="bgcolor" value="#ffffff"/>
 <param name="FlashVars" value="src={media_src}&amp;autoload=yes&amp;autostart=yes&amp;repeat=yes&amp;volume=99"/>
 </object>


4.)Sucht in templates/YourTemplates detail.html:

{lightbox_button}&nbsp;&nbsp;{postcard_button}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{download_button}&nbsp;&nbsp;{download_zip_button}

und ersetzt die Zeile mit:

{lightbox_button}&nbsp;&nbsp;{postcard_button}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{download_button}&nbsp;&nbsp;{download_zip_button}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{show_audio}


5.)sucht in lang/yourLanguage/main.php

//--- Image Details -----------------------------------

und fügt danach ein:

//################################## Music for your Pictures ######################################
$lang['image_audio'] = "Audio Datei:<br /><span class=\"smalltext\">ID number of audio file</span>";
//################################## Music for your Pictures ######################################


6.)sucht in der detail.php:

$cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;

und fügt davor ein:

//############################### Music for your Pictures ###############################################
$image_audio = ($image_row['image_audio']);
if($image_audio >= 1){
$sql = "SELECT image_id, cat_id, image_name, image_active, image_media_file, image_thumb_file, image_audio
                           FROM ".IMAGES_TABLE."
          WHERE image_id = '$image_audio' ";
$row = $site_db->query_firstrow($sql);
show_image($row);
$show_audio = $site_template->parse_template("audio_bit");
$site_template->register_vars("show_audio", $show_audio);
}
//############################### Music for your Pictures ###############################################


7.)sucht in includes/db_definitions.php:

?>

und fügt davor ein:

//################################ Music for your Pictures ############################################  
$additional_image_fields['image_audio'] = array($lang['image_audio'], "int", 0);
//################################ Music for your Pictures ############################################  


8.)sucht in admin/images.php:

echo "<td class=\"tableseparator\">".$lang['field_image_name']."</td>\n<td class=\"tableseparator\">".$lang['field_category']."</td>\n<td class=\"tableseparator\">".$lang['field_username']."</td>\n<td class=\"tableseparator\">".$lang['field_date']."</td>\n<td class=\"tableseparator\">".$lang['options']."</td>\n</tr>\n";
und ersetzt es mit:

//################################ Music for your Pictures ###############################################  
// echo "<td class=\"tableseparator\">".$lang['field_image_name']."</td>\n<td class=\"tableseparator\">".$lang['field_category']."</td>\n<td class=\"tableseparator\">".$lang['field_username']."</td>\n<td class=\"tableseparator\">".$lang['field_date']."</td>\n<td class=\"tableseparator\">".$lang['options']."</td>\n</tr>\n";
echo "<td class=\"tableseparator\">ID</td>\n<td class=\"tableseparator\">".$lang['field_image_name']."</td>\n<td class=\"tableseparator\">".$lang['field_category']."</td>\n<td class=\"tableseparator\">".$lang['field_username']."</td>\n<td class=\"tableseparator\">".$lang['field_date']."</td>\n<td class=\"tableseparator\">".$lang['options']."</td>\n</tr>\n";
//################################ Music for your Pictures ################################################
sucht in admin/images.php:

echo "<td><input type=\"checkbox\" name=\"deleteimages[]\" value=\"".$image_row['image_id']."\" /></td>";

und fügt danach ein:

//################################ Music for your Pictures ################################################  
echo "<td>".$image_row['image_id']."</td>";
//################################ Music for your Pictures ################################################


in ACP unter Bild bearbeiten/bearbeiten findet ihr jetzt eine neue Zeile "Audio Datei:"  dort tragt ihr die ID nummer der mp3 Datei ein, die zu dem Bild abgespielt werden soll.

so das war es, ich hoffe ich habe nicht vergessen. :)

mfg Andi

Title: Re: [MOD]Music for your Pictures
Post by: Kurman on July 28, 2009, 04:32:05 AM
Sehr gut! Very nice!

Extending features of 4images!  :)
Title: Re: [MOD]Music for your Pictures
Post by: hlalink on July 29, 2009, 01:02:32 AM
hello
can you attach the file please

and where can i bot the mp3 and who can i get the id

thank you
Title: Re: [MOD]Music for your Pictures
Post by: Rembrandt on July 31, 2009, 02:14:31 PM
hi!
... and who can i get the id...

in ACP/ edit images /edit images search

(http://www.4homepages.de/forum/index.php?action=dlattach;topic=25413.0;attach=4756)
Title: Re: [MOD]Music for your Pictures
Post by: hlalink on July 31, 2009, 03:21:40 PM
Thank's

This is good Can I get the  different music for the  images  i get  only one i have make a change in the code for the tone 

<object type="application/x-shockwave-flash" data="{template_url}/emff_silk.swf" width="88" height="40"/>
 <param name="movie" value="{template_url}/emff_silk.swf"/>
 <param name="bgcolor" value="#ffffff"/>
 <param name="FlashVars" value="data\media\1/MHO-0003.mp3"/>
 </object>


so i get only one tone  for all the images so  what i have  to do to get different tones

thank's
Title: Re: [MOD]Music for your Pictures
Post by: mawenzi on August 20, 2009, 04:48:27 PM
... toll Andi, die Idee mit dem variablen Verknüpfen der einzelnen Im-/Au-Dateien gefällt mir gut ...
... verschoben nach "Mods & Plugins (Releases & Support)" ...
Title: Re: [MOD]Music for your Pictures
Post by: Sunny C. on August 20, 2009, 08:27:25 PM
Irgendwie eine richtig geile Idee!
Hab das mal aufgenommen: http://www.4homepages.de/forum/index.php?topic=24888.0
Title: Re: [MOD]Music for your Pictures
Post by: mxnn on June 12, 2013, 05:11:40 PM
where can I put the mp3 file? because I installed the mod but the music wasn't listening...
Title: Re: [MOD]Music for your Pictures
Post by: nobby on June 12, 2013, 05:31:24 PM
where can I put the mp3 file? because I installed the mod but the music wasn't listening...

Hi,

Then you have a mistake somewhere in there ...

nobby
Title: Re: [MOD]Music for your Pictures
Post by: Rembrandt on June 12, 2013, 05:45:58 PM
Hi!
@nooby ich habe jetzt auch erst drei mal nachschauen müßen wie der Mod funktioniert. :)

@mxnn
Upload a mp3 file and notice the ID number from the mp3 file.
Go to a Image and  "Edit image" and put the ID number from the mp3 file in the new image- field: "Audio Datei:"

mfg Andi
Title: Re: [MOD]Music for your Pictures
Post by: mxnn on June 13, 2013, 07:25:27 PM
thanks rembrandt
Title: Re: [MOD]Music for your Pictures
Post by: Papabaer6 on October 24, 2013, 08:09:03 PM
Hi!
@nooby ich habe jetzt auch erst drei mal nachschauen müßen wie der Mod funktioniert. :)

@mxnn
Upload a mp3 file and notice the ID number from the mp3 file.
Go to a Image and  "Edit image" and put the ID number from the mp3 file in the new image- field: "Audio Datei:"

mfg Andi

Also angezeit bekomm ich alles , aber sagt mir auch jemand in welches verzeichnis die musikdatei muss ?

LG

 Papabaer6
Title: Re: [MOD]Music for your Pictures
Post by: nobby on October 24, 2013, 09:34:45 PM
Hallo,

ich denke mal ins MEDIA Verzeichnis.

nobby
Title: Re: [MOD]Music for your Pictures
Post by: Papabaer6 on October 24, 2013, 11:07:43 PM
Hallo,

ich denke mal ins MEDIA Verzeichnis.

nobby

nein leider nicht egal wo ich es hinpacke es klappt leider nicht

Title: Re: [MOD]Music for your Pictures
Post by: Rembrandt on October 25, 2013, 05:37:06 AM
Willkommen im Forum!
.....
Also angezeit bekomm ich alles , aber sagt mir auch jemand in welches verzeichnis die musikdatei muss ?
.....

Die Musikdateien ladest du genauso wie die Bilder in irgend eine Kategorie hoch.
Die ID der Musikdatei siehst du entweder wenn du mit der Maus über das MP3 Bild der entsprechenden Musikdatei fährst in der Browser Statuszeile, oder unter  "ACP/ Bilder Verwalten / Bilder Bearbeiten".
Diese ID trägst du bei dem Bild ein.

mfg Andi
Title: Re: [MOD]Music for your Pictures
Post by: Papabaer6 on October 25, 2013, 03:04:48 PM
Willkommen im Forum!
.....
Also angezeit bekomm ich alles , aber sagt mir auch jemand in welches verzeichnis die musikdatei muss ?
.....

Die Musikdateien ladest du genauso wie die Bilder in irgend eine Kategorie hoch.
Die ID der Musikdatei siehst du entweder wenn du mit der Maus über das MP3 Bild der entsprechenden Musikdatei fährst in der Browser Statuszeile, oder unter  "ACP/ Bilder Verwalten / Bilder Bearbeiten".
Diese ID trägst du bei dem Bild ein.

mfg Andi


Danke dir Andi

das war so nicht ersichtlich das man es wie ei Bild hochladen muss.

es schien so das man sie auf den FTP laden muss

 :thumbup: