PDA

View Full Version : Ultimate Now Playing Hack - WA3 plugin / data stored in database


N!ck
11-10-2002, 10:00 PM
It's here! A real "Now Playing" hack. A WA3 plugin feeds data to the database. (Note: I did not write the plugin - credit for that goes to Brandon Martus of pubarso.com). Once loading a simple script, the plugin runs silently in the background without intervention.

Features:
+"Now Playing" information (at time of post, not currently) is shown next to posts.
+Currently Playing / All History / My History pages
+Dynamic downloading - user needn't edit any files once downloaded.
+Only last two weeks of songs are stored so database usage doesn't get too high.
+Password protected updating

Current Version: 1.0.1

Download: click here (https://vborg.vbsupport.ru/attachment.php?s=&postid=321225)

Enjoy! Screenshots will follow.

N!ck
11-10-2002, 10:48 PM
Screenshot 1: "Currently Playing" page

N!ck
11-10-2002, 10:49 PM
Screenshot 2: "How To Use" page

N!ck
11-10-2002, 10:49 PM
Screenshot 3: Member Profile

N!ck
11-10-2002, 10:50 PM
Screenshot 4: Postbit

Pancreas Paul
11-10-2002, 11:15 PM
Nice man.

Neo
11-10-2002, 11:19 PM
Finally.

snyx
11-10-2002, 11:44 PM
whoa, this is almost too much
for us running music based sites this should be great
thx mate

N!ck
11-11-2002, 12:32 AM
:) glad you guys like it

ZiRu$
11-11-2002, 01:11 AM
Gonna Install It Now.....thx man

EDIT: I cant find

eval("\$headinclude = \"".gettemplate('headinclude')."\";");

ANYWHERE....or nothing like it.....i will pm you my global.php now man.....

N!ck
11-11-2002, 01:41 AM
make sure you're editing the one in your root folder, not in the admin folder

M.C.
11-11-2002, 02:09 AM
really nice but can you do it for WinAmp as well???

mheinemann
11-11-2002, 02:11 AM
Works great, the only problem I have is that some songs have a ' in the, and they show up with a /.

ie: Adam's Song
turns into: Adam\'s Song

N!ck
11-11-2002, 02:21 AM
mmmmm...hold on and i'll get that fixed right up

M.C. This IS for Winamp (Winamp 3 = WA3).

N!ck
11-11-2002, 02:35 AM
This fixes a minor problem with song titles that have apostrophes in them. To upgrade from 1.0, follow these instructions (note: in step one, { imagesfolder } should not have the spaces - this is just so vb.org won't parse it):


1. In admin/functions.php, replace:
----------------------------------------
$post[nowplaying]="<br><br><img src=\"{ imagesfolder }/np.gif\" alt=\"Currently playing...\"> ".$post[npartist]." &raquo; \"".$post[npsong]."\"";
----------------------------------------
With:
----------------------------------------
$post[nowplaying]="<br><br><img src=\"{ imagesfolder }/np.gif\" alt=\"Currently playing...\"> ".stripslashes($post[npartist])." &raquo; \"".stripslashes($post[npsong])."\"";
----------------------------------------

2. In root/global.php, replace:
----------------------------------------
eval("\$nptext = \"".gettemplate("header_np")."\";");
----------------------------------------
With:
----------------------------------------
$nowplaying[song]=stripslashes($nowplaying[song]);
$nowplaying[artist]=stripslashes($nowplaying[artist]);
eval("\$nptext = \"".gettemplate("header_np")."\";");
----------------------------------------

3. In root/member.php, replace:
----------------------------------------
$membernptext=$membernowplaying[artist]." &raquo; \"".$membernowplaying[song]."\" (Began $membernpwhenstarted)&nbsp;";
----------------------------------------
With:
----------------------------------------
$membernptext=stripslashes($membernowplaying[artist])." &raquo; \"".stripslashes($membernowplaying[song])."\" (Began $membernpwhenstarted)&nbsp;";
----------------------------------------

4. Overwrite nowplaying.php with the one in the new zip.

Done!


New version file attached.

Velocd
11-11-2002, 02:41 AM
Job well done Nick, although it would be great to have this implemented with Sonique as well..so I'll go search for a similar plugin that might possibly be available.

*clicks install*

ZiRu$
11-11-2002, 02:44 AM
AGH ++++KKKKKKKKKKKKKK

It dosent work....it says "Nothing Recently"

Does that mean it dosen't work with winamp 2.xx?

Velocd
11-11-2002, 03:00 AM
It probably only works for Winamp3, according to the Chiefdelphi site inwhich it is from.

mheinemann
11-11-2002, 03:02 AM
Originally posted by nicksaunders
This fixes a minor problem with song titles that have apostrophes in them. To upgrade from 1.0, follow these instructions (note: in step one, { imagesfolder } should not have the spaces - this is just so vb.org won't parse it):

[snip]

New version file attached.

Worked! Great job on this!

N!ck
11-11-2002, 03:02 AM
Velocd is right. also, follow the directions on your "how to use" page to set it up properly.

anyway, i realize that sonique is a popular one, but i'm no good at winamp plugins even, let alone sonique.

Velocd
11-11-2002, 03:38 AM
I personally can't stand Winamp3, for it's un-needed complexity, weird features and ugly skins, so I'm not sure how long I'll be able to fiddle around with the app. Although I'm curious to see how the plugin works....so, I'll hold out till then. ;)

N!ck
11-11-2002, 03:57 AM
i know what you mean, but i disagree in some ways. search for the moodlogic skin...it's pretty imo.

mister
11-11-2002, 04:14 AM
Originally posted by nicksaunders
(Note: I did not write the plugin - credit for that goes to Brandon Martus of pubarso.com)

Gee. thanks for letting me know about this.

Thanks also for letting me know you were sending out a direct link to download the ListenTo plugin off my sites forums. >:|

-Brandon Martus

MarkB
11-11-2002, 06:23 AM
It's nice to see my genius has inspired such great hacks :D

*runs away from the thrown tomatos and heckling*

Great hack :D

Joe Page
11-11-2002, 03:06 PM
I get parse errors in functions.php :(

N!ck
11-11-2002, 04:20 PM
mister, i simply provided the means for people to get it that way because i don't want to redistribute something that's not mine. if you want and permiss, i'll include it in the zip if it's causing b/w problems for you.

joe, describe them.

Limpkinw
11-11-2002, 04:39 PM
If anyone can help me with the login to Vb using winsock (Delphi or Visual Basic) I have an API that will update the songs in 2.8x. (Developed in Delphi)

NuclioN
11-11-2002, 05:00 PM
It's working for me but a member tries to play a song and there is no output to the database at all. I took this member step by step trough the tutorials, screendumps etc. but no results. :(

N!ck
11-11-2002, 05:04 PM
make sure they've downloaded the XML file (separate from the ZIP)

NuclioN
11-11-2002, 05:18 PM
Do they have to put info in the ListenTo xml file? I see my name in a file that was separated from the zip. (??)

N!ck
11-11-2002, 05:41 PM
no, it is dynamically customized for whoever is downloading it. but the file DOES need to be downloaded nevertheless.

NuclioN
11-11-2002, 06:01 PM
Ok tnx, it's working for me though. Others are having difficulties with the installation, i shall try to translate it to Dutch. ;)

mister
11-11-2002, 06:08 PM
Originally posted by nicksaunders
if you want and permiss, i'll include it in the zip if it's causing b/w problems for you.

Either put it in the zip, or on a different website somewhere. I'd rather not have it linked from my site. Just change the default URL provided in the scripts, and leave my name on it. Be sure to include the iTunes3 one also, for the Mac users.

Thanks.

N!ck
11-11-2002, 07:35 PM
done. i hope there was no real harm done. :(

NuclioN
11-11-2002, 08:40 PM
Members getting a "....does not appear to have a valid description block" kind of error when they're playing a sound. I'm sure they went trough the tutorial in a strickt order with screendumps and files that were uploaded binairy and ascci to look if there's an error somewhere. They have the latest winamp so i don't know how to go further, we spent the whole afternoon to figure out what's wrong and now we're stuck. :(

N!ck
11-11-2002, 08:48 PM
:/ i've got no idea. like i said, i suck at WA plugins. anyone else having this problem?

N!ck
11-11-2002, 09:04 PM
Originally posted by MarkB
It's nice to see my genius has inspired such great hacks :D

*runs away from the thrown tomatos and heckling*

Great hack :D

i'd love to see it on UltimateMetal.com. wouldn't take too much to adapt it to coordinate with what you've got already.

Limpkinw
11-11-2002, 09:13 PM
Does anyone have a board I can test my WinAmp 2.x Application on with this hack? I would install but I have too much going on with my site to install this RIGHT NOW, but I will install Soon.

N!ck
11-11-2002, 10:04 PM
just send it to me like i said; i'll try it out

Limpkinw
11-11-2002, 10:11 PM
I am still in testing stages I need a working board to test it, I have sucessfully logged into Vbulletin with winsock, retrieved song from winamp, but I need to get the commands to send the song to vBulletin. Until then it will not function.

NuclioN
11-11-2002, 10:29 PM
I hope you can make this work for winamp 2.x Limpkinw. ;)

Limpkinw
11-11-2002, 10:38 PM
It's going to work all i need is a test board and a few hours and I will have a Beta up.

N!ck
11-11-2002, 10:50 PM
oh, i see. when you get it finished, i'd gladly include it in the ZIP if you'd rather do that. or you could just post it in this thread and i'll link from the first post.

zajako
11-12-2002, 12:04 AM
id like to see it working for winamp 2 also. if it works for 2.x i will install this hack

blackice912
11-13-2002, 08:06 PM
Originally posted by zajako
id like to see it working for winamp 2 also. if it works for 2.x i will install this hack

I second that, as not all my visitors use three...a lot of them still use 2

Limpkinw
11-15-2002, 03:30 PM
All i need is a board to test on and I will be able to complete my winamp 2.x PLUG-IN.

Anyone care to let me use their board for testing?

Thx

milkmycow
11-17-2002, 02:49 AM
message me on aim (retardkeith) and ill let you use mine bc i really want this

GoTTi
11-22-2002, 07:11 AM
When I follow the instructions on where to unzip the file to...then I goto the winamp preferences and install the skin or whatever...

the .xml file

I get this error after I click Open on the .xml file (file attached)

What is this and how do i get it fixed?

Shadowblazer
11-22-2002, 09:06 PM
Might want to htmlspecialchars the info when you display it. The very first thing one of my members did was change the title of one of their songs to <MARQUEE>

eckels2
11-23-2002, 01:26 AM
* eckels2 points and laughs at Shadowblazer.

hey Sb ;)

Jitway
11-23-2002, 09:22 PM
Ok everytime I try to post a newthread I get this error and it has to do with this hack that I installed. Posting a reply to thread is no problem but starting a newthread I get the same erro everytime........

Database error in vBulletin 2.2.8:

Invalid SQL: SELECT * FROM nowplaying WHERE userid = '1' AND dateline > ORDER BY dateline DESC LIMIT 1
mysql error: You have an error in your SQL syntax near 'ORDER BY dateline DESC LIMIT 1' at line 1

mysql error number: 1064

Date: Saturday 23rd of November 2002 11:15:55 PM
Script: http://www.jitway.com/forums/forums/newthread.php
Referer: http://www.jitway.com/forums/newthread.php?action=newthread&forumid=5
......and this would be that line of code in the newthread.php....

$npdateline=time()-600;
$currentsong=$DB_site->query_first("SELECT * FROM nowplaying WHERE userid = '".$bbuserinfo[userid]."' AND dateline > $npdateline ORDER BY dateline DESC LIMIT 1");

Any suggestions?

SlaPPiE
11-23-2002, 09:37 PM
I recieved this error when I tried to view "All History":


Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 1565905 bytes) in /home/btrend/www/forums/admin/functions.php on line 591

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 40 bytes) in Unknown on line 0

Forgive me if this has been solved somewhere earlier in this thread.

I'm not exactly sure how to clear out that list, and then lessen the length of days it keeps the history there, so if anyone could help me out, it'd be appreciated. Thanks in advance. :)

GoTTi
11-29-2002, 06:58 AM
need some support here, i want this hack to work

Jitway
11-29-2002, 11:00 AM
Same here how about some support for post #51

Oblivion Knight
12-07-2002, 01:26 AM
I'm recieving the same error as Da_GoTTi.
It's really weird, I've tried re-downloading the zip several times and i get the same error..

Any ideas..? This sounds like a really good hack..

RudeDog
12-18-2002, 01:30 PM
Whatever happened to working on the winamp 2 support?

If a board is still needed for test, I'll help....

Issy_X
12-20-2002, 11:56 AM
Ok, I don't have a clue about what I'm doing wrong. I applied the hack but it's not working. The only thing that works is that the nowplaying stuff is showing up on the profile page. The postbit is not working and I also can't access the howto and stats pages. What do I have to do?

Keta
12-21-2002, 12:57 AM
Originally posted by Da_GoTTi
When I follow the instructions on where to unzip the file to...then I goto the winamp preferences and install the skin or whatever...

the .xml file

I get this error after I click Open on the .xml file (file attached)

What is this and how do i get it fixed?

yup i get the same thing

TheComputerGuy
12-22-2002, 11:27 AM
I get this error....

<!-- Database error in vBulletin 2.2.9:

Invalid SQL: INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible) VALUES (NULL,'271','','TheComputerGuy','1','1040530296',' 0','I agree

Who are you?','1','1','67.30.234.131','0','1,'','')
mysql error: You have an error in your SQL syntax near ''1,'','')' at line 1

mysql error number: 1064

Date: Saturday 21st of December 2002 08:11:36 PM
Script: http://www.runaked.com/forums/forums/newreply.php
Referer: http://www.runaked.com/forums/showthread.php?postid=3078#post3078
-->

Xelation
02-05-2003, 02:26 AM
anyone get this to work? not working for me...

Dominick
02-18-2003, 10:56 PM
Im installing your hack right now.. quick question
why did it ask to place a cookie for some forum named
forum.drive-boat.com

???

Dominick
02-19-2003, 12:10 AM
testing it
no problems on install

Dominick
02-19-2003, 12:36 PM
Its done, you can see it running here...
http://tech-lounge.com/forum/showthread.php?s=&threadid=852

thanks for the hack.

:)

ULTIMATESSJ
02-24-2003, 01:33 PM
would it ever be possible for one of these to detect what someone is playing on Windows Media Player as well as Winamp

N!ck
02-24-2003, 04:42 PM
Originally posted by ULTIMATESSJ
would it ever be possible for one of these to detect what someone is playing on Windows Media Player as well as Winamp

Unfortunately, I don't know of a plugin that works with WMP.

N!ck
02-24-2003, 04:42 PM
Originally posted by Dominick
Im installing your hack right now.. quick question
why did it ask to place a cookie for some forum named
forum.drive-boat.com

???

forums.v-driveboat.com, i track installations.

N!ck
02-24-2003, 04:45 PM
Originally posted by Xelation
anyone get this to work? not working for me...

What part isn't working? I don't know what's going wrong with a lot of those error messages - as long as this was installed like in the directions.

bharvey42
03-10-2003, 02:32 PM
will this work on 2.2.9? and does this work with WA2 yet?

DarkDraco07
03-17-2003, 06:31 PM
this is a really great hack but the script doesnt seem to be correct. it says that someone is currently playin something but the album, author, song are blank.

N!ck
03-19-2003, 08:29 PM
bharvey - it works with 2.2.9, but only WA3

DarkDraco07 - ID3 tags must be present for those to show

Sinzar
03-24-2003, 09:57 PM
12-20-02 at 01:56 PM Issy_X said this in Post #57 (https://vborg.vbsupport.ru/showthread.php?postid=332798#post332798)
Ok, I don't have a clue about what I'm doing wrong. I applied the hack but it's not working. The only thing that works is that the nowplaying stuff is showing up on the profile page. The postbit is not working and I also can't access the howto and stats pages. What do I have to do?

I am facing the same problem ^^^^^

And I am also having the same problem as Da_GoTTi .

AnaFreak
04-09-2003, 03:35 PM
yep, same error as Da_GoTTi also

noyen
04-09-2003, 05:09 PM
very nice hack! thank you for this one. i really hope someone can get winamp 2.xx working or even windows media player.

Deimos
04-17-2003, 10:38 PM
Aye, very nice hack
Worked first time :)

kaotic
05-22-2003, 01:40 PM
Nice hack... but it seems to suck up a lot of BW. Is there any way to reduce that?

gmarik
06-09-2003, 05:08 PM
Does this allows to play any mp3 songs via Internet?