View Full Version : Extreme Longshot, but...
Blam Forumz
11-08-2004, 06:21 PM
Is there anyway to modify the 'Now Playing Hack' to read from the users WinAmp runing on their computer and automatically insert the song? Or is that just crazy?
Link14716
11-08-2004, 06:26 PM
Is there anyway to modify the 'Now Playing Hack' to read from the users WinAmp runing on their computer and automatically insert the song? Or is that just crazy?
It's crazy if you mean read from Winamp while they are posting, but it is pretty easy to do if they have the DoSomething plugin installed. It can submit a URL with song info on song change, making it easy for them to tell vBulletin what they are playing.
I have never made this into a real hack, so someone will have to work out the database query as well as some other stuff, but here is the file I used way back. It should work for both vB2 and vB3.
I might think about releasing it as a formal hack later.
EDIT: New file. The old one has stupid mistakes, so it was nonfunctional.
Blam Forumz
11-08-2004, 06:32 PM
Thanks, I'll try it out (DO they need DoSomething installed?)
Ill get back to you
(I know im crazy with all my needs :P)
All I can say about you is woah, your clever
Link14716
11-08-2004, 06:38 PM
You're going to have to add a field (or two, I forgot) to the user table and then make a template edit. Then of course you are going to have to tell people to install DoSomething installed to add a certain URL to it so it submits. I'll try to come up with those in a little while. Should be easy to do.
Blam Forumz
11-08-2004, 06:46 PM
0__0
Could you dumb down the instructions of that please? thanks :/
Link14716
11-08-2004, 06:50 PM
As I said, I never put everything together to make it a fomal hack. And it has been ages since I have touched it.
I'll look into making it useful.
Link14716
11-08-2004, 07:23 PM
Here is the needed query. Now I just need to work out the needed template mod (and possibly a file mod as well) and URL for DoSomething.
ALTER TABLE `user` ADD `npsong` VARCHAR( 255 ) NOT NULL ,
ADD `nptime` BIGINT( 15 ) NOT NULL ;
Link14716
11-08-2004, 07:37 PM
Alright, I uploaded a new nowplaying.php to my post above, I must have never tested it before, so it didn't work. This one does, though.
Here's the URL that your users would have to enter into DoSomething (using the Submit URL action).
http://www.yoursite.com/forums/nowplaying.php?username=username&password=password&song=%%URL_CURRENTSONG%%
Replacing http://www.yoursite.com/forums with the URL to your forums directory, username with their username, and password with their password.
Now I just need to work out the file/template edits to make it show in postbit. Should be simple enough.
Link14716
11-08-2004, 07:49 PM
Alright, the file and template edits are done.
First, the file edit. Open includes/functions_showthread.php and find:
$show['messageicon'] = iif($post['iconpath'], true, false);
Add above that:
if (!empty($post['nptime'])) {
$post['npdisplaytime'] = vbdate($vboptions['timeformat'], $post['nptime']);
}
Now, for the template edit. Place this where you want the now playing to show in your postbit or postbit_legacy template:
<if condition="!empty($post['npsong'])">Now Playing: $post[npsong] (Last Updated: $post[npdisplaytime])</if>
Put this together with the file, the query, and the DoSomething instructions, it should work fine. Enjoy. :)
If you want it to save what the now playing was when someone posts, that will be another edit, but it should be easy. Let me know if you want me to do so.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.