Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 25, 2012, 04:33:24 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter
hier
und auf unserer
neuen Webseite
.
155511
Posts in
21712
Topics by
7738
Members
Latest Member:
chris85
WebsiteBaker Community Forum
English
Help & Support
(Moderators:
Argos
,
badknight
)
load a sound once at 1 page
Pages: [
1
]
Go Down
Author
Topic: load a sound once at 1 page (Read 786 times)
Ogierini
Offline
Posts: 276
load a sound once at 1 page
«
on:
August 21, 2009, 07:56:06 PM »
Hi therem,
Is ther e a script available for this?
I would like to load a sound at loading of 1 specific page. It should load the sound only one time....
Is this possible in website baker?
I made a swishmax file but cannot load it once....
kind regards Irene
Logged
Kind regards,Irene
albatros
Offline
Posts: 674
Re: load a sound once at 1 page
«
Reply #1 on:
August 21, 2009, 08:04:39 PM »
Hi Irene,
the only method I know to load a sound only one time would be setting the WB-site into a frame. But I would never do that.
Could it be a solution for you, using the swf only on the home-page, and using a jpg instead for the other pages?
Best regards
Uwe
Logged
Ogierini
Offline
Posts: 276
Re: load a sound once at 1 page
«
Reply #2 on:
August 21, 2009, 08:12:44 PM »
The picture and sound should only be heard 1 time at the home page and not at the rest of the pages.
How could I load this into a frame /wrapper one time with what code? And why is this not ideal?
kind regards Irene
Logged
Kind regards,Irene
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: load a sound once at 1 page
«
Reply #3 on:
August 21, 2009, 08:22:39 PM »
You can try to download some flash player wit auto start, then put it in hidden <div>
maybe that can help..
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
albatros
Offline
Posts: 674
Re: load a sound once at 1 page
«
Reply #4 on:
August 21, 2009, 08:43:37 PM »
Hi Irene,
Quote from: Ogierini on August 21, 2009, 08:12:44 PM
And why is this not ideal?
I am shure, for searchengines it would work like an eye of a needle. And this is really bad.
Quote from: Ogierini on August 21, 2009, 08:12:44 PM
The picture and sound should only be heard 1 time at the home page and not at the rest of the pages.
How could I load this into a frame /wrapper one time with what code?
If it is a header-animation, my sugestion is to use this animation on the home-page, an a (standing) jpg instead on the other pages. There are different ways to do this. one easy way is to make a templateclone fore the home-page.
Best regards
Uwe
Logged
kweitzel
Forum administrator
Offline
Posts: 6975
Re: load a sound once at 1 page
«
Reply #5 on:
August 21, 2009, 08:47:34 PM »
If you know a bit of programming you could create a bit of PHP which checks for a cookie, if no cookie present then loads the sound and then sets a cookie.
This way you have the sound loaded once during the visit. Of cause, if the cookie is still present, when the surfer comes back next time, it will not play the sound again. But if the cookie is not present it will play. You could also give the cookie a limited lifetime ...
cheers
Klaus
Logged
WebsiteBaker Org e.V. - for WebsiteBaker
albatros
Offline
Posts: 674
Re: load a sound once at 1 page
«
Reply #6 on:
August 21, 2009, 08:58:59 PM »
Hi Klaus,
that's a very elegant way. But this way I will never hear the sound, because I use a positive-list for cookies in ff. Ok, I know that I am a little bit exotic here.
Best regards
Uwe
Logged
Ogierini
Offline
Posts: 276
Re: load a sound once at 1 page
«
Reply #7 on:
August 21, 2009, 09:01:37 PM »
Yeah, Klaus I know, unfortunately I am no php scripter.
Dreamweaver cs3 has a standard code for this but now use cs 4.....
- hoped some one had a simple code a la this.....
Logged
Kind regards,Irene
kweitzel
Forum administrator
Offline
Posts: 6975
Re: load a sound once at 1 page
«
Reply #8 on:
August 21, 2009, 09:10:42 PM »
It's not a hard thing ... have a little look here:
http://www.w3schools.com/PHP/php_cookies.asp
... of cause that doesn't help people with "cookie issues"
cheers
Klaus
Logged
WebsiteBaker Org e.V. - for WebsiteBaker
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: load a sound once at 1 page
«
Reply #9 on:
August 21, 2009, 09:25:25 PM »
there is simpler way to do this, instead to clone template:
Check this code:
Code:
<?php
if (
file_exists
(
""
.
WB_PATH
.
"/templates/"
.
TEMPLATE
.
"/pagepics/"
.
PAGE_ID
.
".jpg"
) )
{
echo
"<img src=\""
.
TEMPLATE_DIR
.
"/pagepics/"
.
PAGE_ID
.
".jpg\" title=\""
.
PAGE_TITLE
.
"\" alt=\""
.
PAGE_TITLE
.
"\">\n"
;
}
else
{
echo
"<div class=\"pagepics\"><img src=\""
.
TEMPLATE_DIR
.
"/pagepics/default.jpg\" title=\""
.
PAGE_TITLE
.
"\" alt=\""
.
PAGE_TITLE
.
"\"></div>\n"
;
}
?>
You should make a folder: pagepics in your template folder. Then add picture names: defult.jpg and the other should be named 1.jpg or some other number ---look for page id number in backend admin> pages..
You could put as much pictures in that folder as much you want for all pages, and they are named 1.jpg , 2.jpg...etc.. and if you are on page who has page_id == 50 and you dont have picture 50.jpg , the defult.jpg picture will be used..
You can also make simular line for audio, like:
Code:
<?php
if (
file_exists
(
""
.
WB_PATH
.
"/templates/"
.
TEMPLATE
.
"/pagepics/"
.
PAGE_ID
.
".wav"
) )
{
echo
"
<embed src=\""
.
TEMPLATE_DIR
.
"/pagepics/"
.
PAGE_ID
.
".wav\" hidden=\"true\" autostart=\"true\" loop=\"1\">\n"
;
}
?>
I hope I helped
cheers
«
Last Edit: August 21, 2009, 09:39:59 PM by crnogorac081
»
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
kweitzel
Forum administrator
Offline
Posts: 6975
Re: load a sound once at 1 page
«
Reply #10 on:
August 21, 2009, 10:07:52 PM »
@ crnogorac081 ... you should try to read better please ... this user wants to use audio (sound) files ... not images or video ...
cheers
Klaus
Logged
WebsiteBaker Org e.V. - for WebsiteBaker
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: load a sound once at 1 page
«
Reply #11 on:
August 21, 2009, 10:21:13 PM »
I think she said in 9 posts above:
Quote
The picture and sound should only be heard 1 time at the home page and not at the rest of the pages...
If you have .mid, then just put instead .wav ---> .mid in the code:)
you can add additional parameter: volume=\"30%\"
cheers
«
Last Edit: August 21, 2009, 10:24:20 PM by crnogorac081
»
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Ogierini
Offline
Posts: 276
Re: load a sound once at 1 page
«
Reply #12 on:
August 22, 2009, 08:42:26 AM »
Thanks you guy's!
I resolved it by making a little flashfile with a turn on and turn off button.
And in websie baker I choose for play it by activating/once....
So it works as I wanted now!
Thanks for your help!
Logged
Kind regards,Irene
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...