PDA

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


N!ck
10 Nov 2002, 23:45
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 (http://www.vbulletin.org/forum/attachment.php?s=&postid=321225)

Enjoy! Screenshots will follow.

N!ck
10 Nov 2002, 23:48
Screenshot 1: "Currently Playing" page

N!ck
10 Nov 2002, 23:49
Screenshot 2: "How To Use" page

N!ck
10 Nov 2002, 23:49
Screenshot 3: Member Profile

N!ck
10 Nov 2002, 23:50
Screenshot 4: Postbit

Pancreas Paul
11 Nov 2002, 00:15
Nice man.

Neo
11 Nov 2002, 00:19
Finally.

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

N!ck
11 Nov 2002, 01:32
:) glad you guys like it

ZiRu$
11 Nov 2002, 02:11
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 Nov 2002, 02:41
make sure you're editing the one in your root folder, not in the admin folder

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

mheinemann
11 Nov 2002, 03:11
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 Nov 2002, 03:21
mmmmm...hold on and i'll get that fixed right up

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

N!ck
11 Nov 2002, 03:35
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 Nov 2002, 03:41
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 Nov 2002, 03:44
AGH ++++KKKKKKKKKKKKKK

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

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

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

mheinemann
11 Nov 2002, 04:02
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 Nov 2002, 04:02
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 Nov 2002, 04:38
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 Nov 2002, 04:57
i know what you mean, but i disagree in some ways. search for the moodlogic skin...it's pretty imo.

mister
11 Nov 2002, 05:14
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 Nov 2002, 07:23
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 Nov 2002, 16:06
I get parse errors in functions.php :(

N!ck
11 Nov 2002, 17:20
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 Nov 2002, 17:39
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 Nov 2002, 18:00
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 Nov 2002, 18:04
make sure they've downloaded the XML file (separate from the ZIP)

NuclioN
11 Nov 2002, 18:18
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 Nov 2002, 18:41
no, it is dynamically customized for whoever is downloading it. but the file DOES need to be downloaded nevertheless.

NuclioN
11 Nov 2002, 19:01
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 Nov 2002, 19:08
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 Nov 2002, 20:35
done. i hope there was no real harm done. :(

NuclioN
11 Nov 2002, 21:40
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 Nov 2002, 21:48
:/ i've got no idea. like i said, i suck at WA plugins. anyone else having this problem?

N!ck
11 Nov 2002, 22:04
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 Nov 2002, 22:13
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 Nov 2002, 23:04
just send it to me like i said; i'll try it out

Limpkinw
11 Nov 2002, 23:11
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 Nov 2002, 23:29
I hope you can make this work for winamp 2.x Limpkinw. ;)

Limpkinw
11 Nov 2002, 23:38
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 Nov 2002, 23:50
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
12 Nov 2002, 01:04
id like to see it working for winamp 2 also. if it works for 2.x i will install this hack

blackice912
13 Nov 2002, 21:06
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
15 Nov 2002, 16:30
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
17 Nov 2002, 03:49
message me on aim (retardkeith) and ill let you use mine bc i really want this

GoTTi
22 Nov 2002, 08:11
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
22 Nov 2002, 22:06
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
23 Nov 2002, 02:26
/me points and laughs at Shadowblazer.

hey Sb ;)

Jitway
23 Nov 2002, 22:22
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
23 Nov 2002, 22:37
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
29 Nov 2002, 07:58
need some support here, i want this hack to work

Jitway
29 Nov 2002, 12:00
Same here how about some support for post #51

Oblivion Knight
07 Dec 2002, 02:26
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
18 Dec 2002, 14:30
Whatever happened to working on the winamp 2 support?

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

Issy_X
20 Dec 2002, 12:56
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
21 Dec 2002, 01:57
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
22 Dec 2002, 12:27
I get this error....

<!-- Database error in vBulletin 2.2.9:

Invalid SQL: INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmili e,showsignature,ipaddress,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
05 Feb 2003, 03:26
anyone get this to work? not working for me...

Dominick
18 Feb 2003, 23:56
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
19 Feb 2003, 01:10
testing it
no problems on install

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

thanks for the hack.

:)

ULTIMATESSJ
24 Feb 2003, 14:33
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
24 Feb 2003, 17:42
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
24 Feb 2003, 17:42
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
24 Feb 2003, 17:45
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
10 Mar 2003, 15:32
will this work on 2.2.9? and does this work with WA2 yet?

DarkDraco07
17 Mar 2003, 19:31
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
19 Mar 2003, 21:29
bharvey - it works with 2.2.9, but only WA3

DarkDraco07 - ID3 tags must be present for those to show

Sinzar
24 Mar 2003, 22:57
12-20-02 at 01:56 PM Issy_X said this in Post #57 (http://www.vbulletin.org/forum/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
09 Apr 2003, 16:35
yep, same error as Da_GoTTi also

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

Deimos
17 Apr 2003, 23:38
Aye, very nice hack
Worked first time :)

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

gmarik
09 Jun 2003, 18:08
Does this allows to play any mp3 songs via Internet?