Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Golzarion music player in user profile - HTML 5 Details »»
Golzarion music player in user profile - HTML 5
Version: 1.00, by Golzarion Golzarion is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Profile Enhancements - Version: 4.2.x Rating:
Released: 09-19-2013 Last Update: 09-19-2013 Installs: 13
Uses Plugins Template Edits Auto-Templates
Additional Files Translations  
No support by the author.

Golzarion music player in user profile - html5 :

What does this mod do ?

This mod allows users to upload their desire mp3 music and play it in their own profile !

Each user can have only one mp3 music file on server and in order to change his /her mp3 file : he/she needs to upload a file and it would be replaced with the old mp3 file ...
NO silver light or No Flash player installation is needed! It just uses the power of HTML 5 on users' browser.

Install :

1.download the attached file and extract it on your pc

2. upload "mp3"folder and "mp3.php" file in your forum root directory . and be sure that "mp3" folder has the sufficient permission to upload files ( in most hosts 0777 permission ).

3. Admin Control Panel :
Style Manager=>Your Template=>MemberInfo Templates=>memberinfo_block_ministats

Find :

Code:
<div class="mini_stats blockbody userprof_content userprof_content_border">
Before that , add :
Code:
<!-- Golzarion profile Music player Start -->  
   <div class="underblock"></div>
     <div class="block mainblock">
         <div id="userinfoblock" class="floatcontainer">
             <div class="blocksubhead" colspan="5">Golzarion mp3 Player</div>
             <div  class="blockbody userprof_content userprof_content_border">
                 <div class="blockrow member_blockrow"> 
     <audio preload="none" controls="controls" id="mp3player" style="width: 200px;display: block" >
         <!--<source src="myVideo.ogg" type="audio/ogg"> -->
         <source src="mp3/{vb:raw userinfo.userid}.mp3" type="audio/mpeg"> 
        Your browser does not support the audio element.        
 </audio>                 
 </div>
             </div>
         </div>
     </div>     
<div class="underblock"></div><br/>

 <!-- Golzarion profile Music player End -->
-
4. Add the product " product-Golzarion-mp3-player.xml " via Admincp => pruduct manager =>add new pruduct

5.(optional ) if your vb version is 4.2.X ==> Admin Control Panel => Navigation Manager then in "Forum" tab use the right Drop down menu and select " Add Link" then fill it like bellow :
screenshot4.jpg (screenshot4 )
and Save the changes.

Notice : Your users should use "Google Chrome " web browser or Firefox 21 (running on Windows 7, Windows 8, Windows Vista, and Android ) or explorer 8 or higher ...

( No doubt that the latest version of web browser is better ! )

The Persian language(Farsi) translation is also attached .

Optional changes :
1.If you want to increase the size of the mp3 file : in " mp3.php" file search for "2097152" and replace it with your desire size ( the default is 2 mb).Your server also should allow your php to upload that amount of size of mp3 file ... you can change the " php.ini" file on your server or use ".htaccess" file.

2.You can edit the mp3 upload page by editing :"Golzarion_mp3" template it is under "forum Home" template in your style . (It is highly recommended not to change these codes unless you are completely sure of what you are going to do ... )

3.With small amount of changes this html 5 player has the potential to play video files,too. But I do not have enough time right now to do it ...

The player in Chrome :
screenshot3.jpg
The player in Firefox :
screenshot2.jpg
The upload page :
screenshot1.jpg

*** Please click Installed if you use this mode . ***
Golzarion:
http://forum.golzarion.com

Download Now

File Type: zip Golzarion_mp3_player.zip (176.7 KB, 82 views)
File Type: zip Golzarion_mp3_player--Farsi-Language.zip (177.2 KB, 38 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 09-20-2013, 06:18 PM
Golzarion's Avatar
Golzarion Golzarion is offline
 
Join Date: Jan 2008
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Optional :

If you want the users to add " the name of the music file " (like the screen shot bellow) :

Attachment 146473

First step (#1) :

Go to : Admincp / User Profile Fields / Add New User Profile Field

Then Select : Profile Field Type : Single-Line Text Box

then fill it like the next screen shot :

Attachment 146472

Next:

At last , (instead of the original code on first post, use the code bellow ) :

3. Admin Control Panel :
Style Manager=>Your Template=>MemberInfo Templates=>memberinfo_block_ministats
Find :
Code:
<div class="mini_stats blockbody userprof_content userprof_content_border">
Before that , add :
Code:
<!-- Golzarion profile Music player Start -->

    <div class="underblock"></div>
    <div class="block mainblock">
        <div id="userinfoblock" class="floatcontainer">
            <div class="blocksubhead" colspan="5">Golzarion mp3 Player</div>
            <div  class="blockbody userprof_content userprof_content_border">
                <div class="blockrow member_blockrow">                                
    <audio preload="none" controls="controls" id="mp3player" style="width: 200px;display: block" >
        <!--<source src="myVideo.ogg" type="audio/ogg"> -->
        <source src="mp3/{vb:raw userinfo.userid}.mp3" type="audio/mpeg">
        Your browser does not support the audio element.
        </audio>

                </div>
<vb:if condition="$userinfo['fieldX']"> 
<b> Music Name :</b> {vb:raw userinfo.fieldX} 
</vb:if>
            </div>
        </div>
    </div>
    <div class="underblock"></div><br/>

<!-- Golzarion profile Music player End -->
Replace both bold red X with field number you have created in first step (#1).
and save the changes.

Note : Users can add the name of the music file in their User CP (settings) => Edit profile

w w w.yoursite.com/profile.php?do=editprofile
/
Attached Images
File Type: jpg screenshot5a.jpg (133.0 KB, 0 views)
File Type: jpg screenshot6a.jpg (36.3 KB, 0 views)
Reply With Quote
  #3  
Old 09-23-2013, 06:44 PM
Animparadise's Avatar
Animparadise Animparadise is offline
 
Join Date: Sep 2007
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed.
Reply With Quote
  #4  
Old 09-24-2013, 02:02 PM
Shahed's Avatar
Shahed Shahed is offline
 
Join Date: Aug 2006
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed
Nice !
Reply With Quote
  #5  
Old 10-01-2013, 11:05 AM
Golzarion's Avatar
Golzarion Golzarion is offline
 
Join Date: Jan 2008
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Shahed View Post
Installed
Nice !
You are welcome.
Reply With Quote
  #6  
Old 10-14-2013, 01:05 AM
OUTL4W OUTL4W is offline
 
Join Date: May 2013
Location: Gettysburg, Pa
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed...where does this mod place the upload link?
Reply With Quote
  #7  
Old 10-19-2013, 02:18 PM
OUTL4W OUTL4W is offline
 
Join Date: May 2013
Location: Gettysburg, Pa
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

finally figured out the download link....read instructions....but no matter what I do...keep getting the eror
"Error! Check folder permission!"
even though I chmod'd the mp3 folder to 777....
used firefox 24.0 & chrome 30.0.1599.69 m

ugghhhhh....
Reply With Quote
  #8  
Old 10-25-2013, 07:29 PM
Golzarion's Avatar
Golzarion Golzarion is offline
 
Join Date: Jan 2008
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by OUTL4W View Post
installed...where does this mod place the upload link?
It is on your forum's root and the folder name is : "mp3";

Quote:
Originally Posted by OUTL4W View Post
finally figured out the download link....read instructions....but no matter what I do...keep getting the eror
"Error! Check folder permission!"
even though I chmod'd the mp3 folder to 777....
used firefox 24.0 & chrome 30.0.1599.69 m
ugghhhhh....
It may be because of your server configuration ... double check the folder "mp3" permission (you should have sufficient permission to upload file via php on this folder ) and also check server " temp " folder name on your php.ini ...
If you do not access "php.ini" on your server ,please ask your hosting company about the temp folder for uploading via php and then on "mp3.php" find :

Code:
move_uploaded_file($_FILES["SelectedFile1"]["tmp_name"],"mp3/".$fname) or die("<b>Error! Check folder permission!</b>");
and change "tmp_name" to the correct name of temp folder depending on your server configuration .

I hope it helps ...
/
I have installed this mod on two forums personally whith default setting and no chages was required !
It works perfect .
Reply With Quote
  #9  
Old 10-25-2013, 10:53 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Once you upload music yes it plays ok but if I upload another mp3 song it still plays the first one uploaded and won't change it no matter what is done
Reply With Quote
  #10  
Old 10-26-2013, 05:31 PM
Golzarion's Avatar
Golzarion Golzarion is offline
 
Join Date: Jan 2008
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ForceHSS View Post
Once you upload music yes it plays ok but if I upload another mp3 song it still plays the first one uploaded and won't change it no matter what is done
It is because of your web browser cache !
Of course you will here the newest music if you clear your browser cache or I guess the next time you visit the profile ...
Any way , if I change the mod to reload the music for every refresh , then there would be 2 possible solutions :

1. Putting no-cache meta tag on user profile .

2. Creating a new table on database in order to store the file name and one query would be added on each page refresh for user profile ...
I have not decided yet, but I'll try to do some changes in future ..
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 07:20 AM.


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.06627 seconds
  • Memory Usage 2,353KB
  • Queries Executed 26 (?)
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
  • (5)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (4)postbit_attachment
  • (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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete