vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Extreme Longshot, but... (https://vborg.vbsupport.ru/showthread.php?t=71491)

Blam Forumz 11-08-2004 06:21 PM

Extreme Longshot, but...
 
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

1 Attachment(s)
Quote:

Originally Posted by Blam Forumz
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.

[sql]ALTER TABLE `user` ADD `npsong` VARCHAR( 255 ) NOT NULL ,
ADD `nptime` BIGINT( 15 ) NOT NULL ;[/sql]

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:
PHP Code:

    $show['messageicon'] = iif($post['iconpath'], truefalse); 

Add above that:
PHP Code:

    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:
HTML Code:

<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.


All times are GMT. The time now is 10:01 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.01069 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete