Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-22-2014, 05:46 PM
gullbird gullbird is offline
 
Join Date: Jan 2014
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default play a sound when a forum is loaded

is there a way so that i can play a sound whenever a forum is loaded
defining through admin panel which sound file is for the forum or sub forum
Reply With Quote
  #2  
Old 05-22-2014, 06:34 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would hate hearing a sound every time a page loads, especially if I frequented the forum & browsed/posted alot.
Reply With Quote
  #3  
Old 05-22-2014, 06:41 PM
gullbird gullbird is offline
 
Join Date: Jan 2014
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by final kaoss View Post
I would hate hearing a sound every time a page loads, especially if I frequented the forum & browsed/posted alot.
the one who hate will never visit the forum again or step away on visit thats Good
i seeking an idea
admin cp ll have option to set a sound file for each forum
so when a user loads a forum it will see audio and play it

--------------- Added [DATE]1400788640[/DATE] at [TIME]1400788640[/TIME] ---------------

i have some code like this
Code:
<script type="text/javascript" src="src/java.js"></script> 
<script type="text/javascript"> 
some JS
</script>
to add javascript
and have some DIVs to include

HTML Code:
<div class="jp-progress"> 
                        <div class="jp-seek-bar"> 
                            <div class="jp-play-bar"></div> 
Some Text
                        </div> 
                    </div>
hope some one will help
Reply With Quote
  #4  
Old 05-22-2014, 07:36 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're only likely to chase away your own visitors with this
Reply With Quote
  #5  
Old 05-22-2014, 08:36 PM
gullbird gullbird is offline
 
Join Date: Jan 2014
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery View Post
You're only likely to chase away your own visitors with this
yes
conditions come true false based on purpose
if i go to a bar i have to accept there'll be music chill etc and if i don't like that i should not go there
Reply With Quote
  #6  
Old 05-22-2014, 08:47 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you okay when your music stops/cganges/reloads, everytime you sip your drink, move slightly, ask the bartender something, pay?
Reply With Quote
  #7  
Old 05-22-2014, 09:14 PM
gullbird gullbird is offline
 
Join Date: Jan 2014
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery View Post
Are you okay when your music stops/cganges/reloads, everytime you sip your drink, move slightly, ask the bartender something, pay?
Yes this is what i am doing
i am a teacher i ll not allow non students (of mine) to enter into forum
my students know they are visiting to listen

Not sure why but i had the same situation on a free board script personally i think public forums are crap
a very big WHY for every question that do not fits to marketing seo traffic
Reply With Quote
  #8  
Old 05-22-2014, 09:23 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It is your forum, if you want to kill all of the traffic going to it, that's your choice.
Reply With Quote
  #9  
Old 05-22-2014, 11:07 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please don't play sound on your forum. Please. Pretty please.
Reply With Quote
  #10  
Old 05-23-2014, 12:19 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Although, I completely agree with the other board members on the topic, you cannot make that determination unless you try it yourself. This is just to give you a 'possibility' as you asked -- something you can do yourself. It will not work with most older browsers, with older browsers it will either not display, or not play 'mp3' audio. See Google "HTML5 <audio>" for details ...

Put your "renamed" MP3 files in a directory named "music".
For example: "/music/music_XX.mp3". Where "XX" is the "forum ID".

Place code before or after the footer variable ({vb:raw footer}) in the "FORUMDISPLAY" template
HTML Code:
    <!-- HTML5 solution -->
    <audio controls autoplay  id="tbworld_audio"  src="{vb:raw vboptions.bburl}/music/music_{vb:raw forumid}.mp3" type="audio/mpeg"></audio>
    <audio controls autoplay  id="tbworld_audio"  src="{vb:raw  vboptions.bburl}/music/music_{vb:raw forumid}.ogg"  type="audio/mpeg"></audio>   <!-- Opera Next -->

<!-- HTML5 --- Pre-Adjust volume level -->
<script>
  var AudioPlayer = document.getElementById("tbworld_audio");
  AudioPlayer.volume = 5.5;
<script>

<!-- or -->

   <!-- Embedded Solution -->
   <embed src="{vb:raw vboptions.bburl}/music/music_{vb:raw forumid}.mp3" type="audio/mpeg" width="120" height="35" autostart="true" loop="false">
Firefox now supports Mp3 for HTML5. Opera Next, will require the embedded solution or an ".ogg" extension.

This code will play a unique mp3 file given a "unique forum ID".

Nothing fancy.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:01 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04308 seconds
  • Memory Usage 2,264KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_html
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete