Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 22. Nov 2024, 23:24

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: 1. Nov 2008, 12:26 
Offline

Joined: 8. May 2008, 10:24
Posts: 5
Hi,
Is there a way to start a small mp3 music track to start playing when a user opens a gallery. Then stops when the user moves on to a different folder within the same gallery?

Many thanks
James


Top
 Profile  
 
 Post subject:
PostPosted: 1. Nov 2008, 21:54 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
There are a couple of files that are included depending where you are.
There you can include a mp3 if you like.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 2. Nov 2008, 23:47 
Offline

Joined: 8. May 2008, 10:24
Posts: 5
I'm in the UK and the mp3 has been created by me so there is no copyright on the track.
I would like the file to be played when a user accesses a directory and then stops when the user moves on to another directory, without any link to the file (using a .jpg to select the file) and if possible use the built in player, but not showing the players controls.
Is this possible?
James


Top
 Profile  
 
 Post subject:
PostPosted: 3. Nov 2008, 09:06 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
You alway have to program a little bit because you have to include the player in a hidden div.
But I still don't understand when a mp3 should be played and when not anymore. Playing it e.g. on the overview page and not on the album anymore is no problem.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 3. Nov 2008, 11:06 
Offline

Joined: 8. May 2008, 10:24
Posts: 5
I have separated the pictures folder into various galleries for the departments here at school.
So there is:
pictures/departments/history
pictures/departments/DT
pictures/departments/art
etc
Each folder is then linked from the department's home page and I have then used the root.txt text file so departments do not 'wander' into other departments gallery.

One of the departments, History, wish to have some music playing in the background whilst users view the images, I was curious to know if this could be done?
#removed_broken_link (will need login credentials which I will pm to you)
James


Top
 Profile  
 
 Post subject:
PostPosted: 3. Nov 2008, 11:31 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
you can place the code in a file called image.txt which has to be in that folder. an in this file you place the code that plays the music.

Read the howto about using image.txt

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 3. Nov 2008, 16:04 
Offline

Joined: 8. May 2008, 10:24
Posts: 5
I'm not quite sure how to do this?

I've added the files:
style.css (which contains:
.hide {
visibility : hidden;
}
mytune.mp3 (the actual music track)

image.txt (which contains:
mytune.mp3=<div class="hide" id="hide">
?php
$video_player="MP3";
$video_autostart=true; // true or false works!
$video_show_dl_link=false; // true or false works
$video_flash_site=""; // if you store your mp3's local - if you put an url base here you can even link remote
?
</div>

With the idea that the style sheet adds the hide class which hides the div playing the track.
Nothing is playing, what am I doing wrong?
James


Top
 Profile  
 
 Post subject:
PostPosted: 3. Nov 2008, 16:11 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
no - don't use the image.txt like that.

I have a user in the german forum with the same problem. I'll post some code tonight.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 3. Nov 2008, 16:25 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
this you have to place in e.g. header.htm if you like to have musik on all pages:

<div style="visibility:hidden;">
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript">
document.write('<div id="flashcontent">Flash is not installed<\/div>');
var so = new SWFObject("html/mediaplayer.swf?file=http://brain-on-a-stick.de/download_extern.php?file=BOAS-Belong.mp3", "VideoPlayback", "0", "0", "6");
so.addParam("FlashVars","autostart=true&height=0&width=0");
so.write("flashcontent");
</script>
</div>

and for musik in subdirectories you have to e.g. use image.txt or folder.txt and adopt the path correctly.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 3. Nov 2008, 19:39 
Offline

Joined: 8. May 2008, 10:24
Posts: 5
ah ha..many thanks it works a treat.

Sorry for not understanding this correctly but If I wanted different music tracks for different subdirectories then:
var so = new SWFObject("html/mediaplayer.swf?file=http://brain-on-a-stick.de/download_extern.php?file=BOAS-Belong.mp3", "VideoPlayback", "0", "0", "6");

would become:
var so = new SWFObject("html/mediaplayer.swf?file=folder.txt", "VideoPlayback", "0", "0", "6");

and the file folder.txt would contain the music track?

many thanks for all of your help,
James


Top
 Profile  
 
 Post subject:
PostPosted: 3. Nov 2008, 20:06 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
No - you directly link to the mp3 file as parameter for the flash.

/Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy