Profile Music Uploader

Started on the old forum in September 2009 · view the original in the archive · old links redirect here

25 replies · 1,389 views · started 17 years ago · 2 min read

TL;DR · summary of 25 replies
  • - The issue was about converting the avatar uploader to support MIDI and WAV file uploads into a music folder.
  • - A solution was proposed using the code provided in genproc.php for lists.php, but it did not work as expected due to errors like parse errors or issues with autostart functionality across different browsers.
  • - Additional suggestions were made regarding browser compatibility and requiring plugins for certain media players, which added complexity to the implementation.
  • - The problem of making music play automatically in profiles remained unresolved.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

9 participants
srecnica Developer · 174 posts #21

capofret wrote: the correct code depends on which browser u want it to be played. opera, firefox, internet explorer each has code that it only accepts. mobile browser built in also has its own code. So dont be surprised if it doesnt play. I think some browsers dont allow background music to be played automatically and some require plug in.

to ... Mozilla we require a plug in but when I go to download it does not give anything .. to know that we plug in to ...I have a Mozilla plugin for Windows Media Player, Flash Player .. real player .. I do not know which player to install it yetExternal image (may be gone)

capofret Developer · 225 posts #22

srecnica wrote: to ... Mozilla we require a plug in but when I go to download it does not give anything .. to know that we plug in to ...I have a Mozilla plugin for Windows Media Player, Flash Player .. real player .. I do not know which player to install it yetExternal image (may be gone)

for Opera or IE

<bgsound src="file.mid" loop="infinite">

for all browsers

<embed src="file.mid" autostart="true" loop="true" width="2" height="0"> </embed> <noembed> <bgsound src="file.mid" loop="infinite"> </noembed>

autostart - choose if the media file will start automatically loop - sets the media file to repeat or not

dont forget to add in your .htaccess the correct mime type

AddType audio/midi .midi AddType audio/mpeg .mp3 AddType audio/x-wav .wav

plugins IE- activeX Mozilla - Quicktime

just try the other media players to see which one really works.

LDSWAPWORLD site closed. im busy with other things in life like facebook , send me PM so i can add you 🙂 www.pinoySG.com

don't ask for help if you're not even helping yourself! i am tired of seeing the line "best site", i want to see something NEW and UNIQUE. maybe if i find one, ill go back to my wap life again.

External image (may be gone)

srecnica Developer · 174 posts #23

Here's how I did all of this and all very nice work:) in genproc.php

else if($action=="upmusic") { addonline(getuid_sid($sid),"Updating music",""); $musicid = $_GET["musicid"];

$musiclink = $_POST["musiclink"];

$pstyle = gettheme($sid); echo xhtmlhead("$stitle",$pstyle); echo " "; //$uid = getuid_sid($sid); $musiclnk = mysql_fetch_array(mysql_query("SELECT musiclink FROM ibwf_music WHERE id='".$musicid."'")); $res = mysql_query("UPDATE ibwf_users SET music='".$musiclnk[0]."' WHERE id='".$uid."'"); if($res) { echo "<img src="http://coding-talk.com/images/ok.gif" alt="o"/>Muzika je Odabrana "; }else{ echo "<img src="http://coding-talk.com/images/notok.gif" alt="x"/>Greska! "; } echo " ";

     $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
$themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"http://coding-talk.com/images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";

echo "HAPPY</a>";

echo " "; echo xhtmlfoot(); exit(); } in lists.php

else if($action=="music") { addonline(getuid_sid($sid),"Music List",""); $pstyle = gettheme($sid); echo xhtmlhead("Music List",$pstyle);

//////ALL LISTS SCRIPT <<

if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_music"));
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;

//changable sql

    $sql = "SELECT id, musiclink,title FROM ibwf_music ORDER BY id DESC LIMIT $limit_start, $items_per_page";


echo "

"; $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { echo "$item[2] ";

    echo "<a href=\"genproc.php?action=upmusic&amp;sid=$sid&amp;musicid=$item[0]\">Izaberi</a>

"; echo " "; } } echo " "; echo " "; if($page>1) { $ppage = $page-1; echo "<a href="lists.php?action=music&sid=$sid&page=$ppage&view=$view">«Prev</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href="lists.php?action=music&sid=$sid&page=$npage&view=$view">Next»</a>"; } echo " $page/$num_pages "; if($num_pages>2) { $rets = "<form action="lists.php" method="get">"; $rets .= "Jump to page<input name="page" format="*N" size="3"/> "; $rets .= "<input type="submit" value="GO"/>"; $rets .= "<input type="hidden" name="action" value="$action"/>"; $rets .= "<input type="hidden" name="sid" value="$sid"/>";

    $rets .= "</form>";

    echo $rets;
}
echo "

"; ////// UNTILL HERE >> echo " "; echo "<a href="index.php?action=cpanel">"; echo "CPanel</a> "; $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'")); $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'")); echo "<a href="index.php?action=main&sid=$sid"><img src="http://coding-talk.com/images/themes/$themeimageset[0]/home.gif" alt="*"/>"; echo "HAPPY</a>";

echo " "; echo xhtmlfoot(); exit(); } in index.php action wievuser profile

$musiclink = getmusic($who); echo"<embed src="$musiclink" loop="infinite" autostart="true" WIDTH=0 HEIGHT=0></embed>"; in core.php

function getmusic($uid) { $music = mysql_fetch_array(mysql_query("SELECT music FROM ibwf_users WHERE id='".$uid."'")); return $music[0]; } in admincp

else if($action=="addmus") { echo "<card id="main" title="Vlasnicki panel">"; echo " "; echo "Dodaj Muziku

"; echo "Naziv pesme "; echo "<input name="title"/> ";

echo "Link Muzike:<input name=\"musiclink\" maxlength=\"200\"/>

"; echo "<anchor>POTVRDI"; echo "<go href="ownerproc.php?action=addmus&sid=$sid" method="post">"; echo "<postfield name="musiclink" value="$(musiclink)"/>"; echo "<postfield name="title" value="$(title)"/>"; echo "</go></anchor>"; echo "

<a href="ownercp.php?action=ownercp&sid=$sid"><img src="http://coding-talk.com/images/admn.gif" alt=""/>"; echo "Vlasnicki panel</a> "; echo "<a href="index.php?action=main&sid=$sid"><img src="http://coding-talk.com/images/home.gif" alt=""/>"; echo "HAPPY</a>"; echo " "; echo "</card>"; } in admonproc.php

else if($action=="addmus") { $title = $_POST["title"];

$musiclink = $_POST["musiclink"]; echo "<card id="main" title="HAPPY Forum">"; echo " "; echo " "; $res = mysql_query("INSERT INTO ibwf_music SET title='".$title."', musiclink='".$musiclink."'");

    if($res)
  {
    echo "<img src=\"http://coding-talk.com/images/ok.gif\" alt=\"O\"/>Muzika uspesno dodata!";
  }else{
    echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"X\"/>Nemoguce dodati Muziku!";
  }

  echo "

<a href="ownercp.php?action=addmus&sid=$sid">"; echo "Panel Muzike</a> "; echo "<a href="ownercp.php?action=ownercp&sid=$sid"><img src="http://coding-talk.com/images/admn.gif" alt=""/>"; echo "Vlasnicki panel</a> "; echo "<a href="index.php?action=main&sid=$sid"><img src="http://coding-talk.com/images/home.gif" alt=""/>"; echo "HAPPY</a>";

  echo "

</card>"; } SQL

CREATE TABLE IF NOT EXISTS ibwf_music ( id int(10) NOT NULL auto_increment, musiclink varchar(300) NOT NULL default '', title varchar(255) NOT NULL, PRIMARY KEY (id), UNIQUE KEY musiclink (musiclink) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; sql users add music varchar 200 create a music folder and upload it midi files thanks for the help 🙂

srecnica Developer · 174 posts #24

as WhiteWarrior said music is an expensive option, and here's an option to choose whether the user wants to music or do not want 🙂 in the SQL table users add

showmusic INT 100

in genproc.php

else if($action=="musi") { addonline(getuid_sid($sid),"Azuriraj muziku",""); $act = $_GET["act"]; $acts = ($act=="dis" ? 0 : 1); $pstyle = gettheme($sid); echo xhtmlhead("$nazivsajta",$pstyle); echo " "; //$uid = getuid_sid($sid); $res = mysql_query("UPDATE ibwf_users SET showmusic='".$acts."' WHERE id='".$uid."'"); if($res) { echo "<img src="images/ok.gif" alt="o"/>muzika azururana! ";

}else{ echo "<img src="images/notok.gif" alt="x"/>Nemoguce azurirati vas profil! "; } echo " <img src="images/home.gif" alt="*"/> <a href="index.php?action=main&sid=$sid">"; echo "HAPPY</a>"; echo " "; echo xhtmlfoot(); }

in index.php acnion=main

$sml = mysql_fetch_array(mysql_query("SELECT showmusic FROM ibwf_users WHERE id='".getuid_sid($sid)."'")); if($sml[0]=="1") { echo "<a href="genproc.php?action=musi&sid=$sid&act=dis">Turn music</a> "; }else{ echo "<a href="genproc.php?action=musi&sid=$sid&act=enb">Allow music</a> "; }

in index.php action wievuser profile

$showmusic = mysql_fetch_array(mysql_query("SELECT showmusic FROM ibwf_users WHERE id='".$uid."'"));

if($showmusic[0]=="1"){ $musiclink = getmusic($who); echo"<embed src="$musiclink" loop="infinite" autostart="true" WIDTH=0 HEIGHT=0></embed>"; } else if($showmusic[0]=="0"){ }

centi Developer · 159 posts #26

dnt use this uploader.. im sure u will get haked

😳 .................................... http://photomag.lk/ .................................... 🤨

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close