Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-08-2004, 06:21 PM
Blam Forumz Blam Forumz is offline
 
Join Date: Jun 2004
Posts: 554
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 11-08-2004, 06:26 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Attached Files
File Type: php nowplaying.php (1.4 KB, 4 views)
Reply With Quote
  #3  
Old 11-08-2004, 06:32 PM
Blam Forumz Blam Forumz is offline
 
Join Date: Jun 2004
Posts: 554
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 11-08-2004, 06:38 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 11-08-2004, 06:46 PM
Blam Forumz Blam Forumz is offline
 
Join Date: Jun 2004
Posts: 554
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

0__0

Could you dumb down the instructions of that please? thanks :/
Reply With Quote
  #6  
Old 11-08-2004, 06:50 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 11-08-2004, 07:23 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]
Reply With Quote
  #8  
Old 11-08-2004, 07:37 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 11-08-2004, 07:49 PM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:51 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04780 seconds
  • Memory Usage 2,261KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete