vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Now Playing Hack (https://vborg.vbsupport.ru/showthread.php?t=58489)

Dan 11-08-2003 10:00 PM

Now Playing Hack
 
[high]Now Playing Hack[/high]
Coded by: Oricon
Help from: fury, mist & assassingod

[high]INTRODUCTION:[/high]
This hack lets your users specify what they are listening to at the time of posting. This is my first hack so if there are any bugs in it please inform me and I'll get it fixed.

[high]VERSION SUPPORT:[/high]
vBulletin 2.3.2

[high]INSTALL: [/high]
All instructions are in the text file.

ALWAYS remember to backup before installing anything.


Please Click Install if you use this, Comments always welcome.

[high]SCREENSHOT BELOW:[/high]

assassingod 11-09-2003 02:08 PM

Oricon, please use the [high] tag instead of [color=yellow]

Cheers;)

Nice hack:)

Dan 11-09-2003 02:11 PM

Quote:

Originally Posted by assassingod
Oricon, please use the [high] tag instead of [color=yellow]

Cheers;)

Nice hack:)

Sorry forgot about the [high] tags someone should add it to the WYSIWYG Editor

Chris M 11-09-2003 02:17 PM

Nice, although useless to me at this time...

Satan

Sc0rp 11-09-2003 02:37 PM

sounds a bit useless, the ppl have to enter what they are playing manually and it only goes for the moment being..

dont think a lot of ppl will actually do so..

Dan 11-09-2003 04:08 PM

Quote:

Originally Posted by Sc0rp
sounds a bit useless, the ppl have to enter what they are playing manually and it only goes for the moment being..

dont think a lot of ppl will actually do so..

Lots of people actually like this type of stuff on forums... I'm not quite sure why but it was popular on the last several boards i worked on.

Floris 11-09-2003 08:41 PM

Quote:

Originally Posted by Oricon
Lots of people actually like this type of stuff on forums... I'm not quite sure why but it was popular on the last several boards i worked on.

Good job my friend!

Hobbes 11-10-2003 03:36 AM

nice dan, glad ya finally wrote a hack :D:D

*hasnt* ....*cowers* ..nice hack none the less :D

Gio Takahashi 11-10-2003 04:40 AM

I could've sworn I've seen this hack before on another forums.....oh well, I'll install it. I think it looks like a good add-on.

assassingod 11-10-2003 06:01 AM

Quote:

Originally Posted by Gio Takahashi
I could've sworn I've seen this hack before on another forums.....oh well, I'll install it. I think it looks like a good add-on.

There have been others but non that work with 2.3.2

gmarik 11-11-2003 12:23 PM

Is it about music?

Dan 11-11-2003 12:24 PM

Quote:

Originally Posted by gmarik
Is it about music?

Yes but you can change it to be anything really.... It is a very simple hack.

bozzy 11-14-2003 02:56 PM

it doesn't even work:
Database error in vBulletin 2.3.2:

Invalid SQL: INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible,nowp) VALUES (NULL,'333','','Bozzy','1','1068829131','0','fdsfs df','1','1','68.55.32.163','0','1', 'dffsdf')
mysql error: Unknown column 'nowp' in 'field list'

mysql error number: 1054

Date: Friday 14th of November 2003 11:58:51 AM
Script: http://www.unrulypolitics.com/newthread.php
Referer: http://www.unrulypolitics.com/newthr...ead&forumid=18

bozzy 11-14-2003 02:57 PM

unknown column? I DID ALL THE STEPS IN THE INSTALL!!!!!! retarded.

bozzy 11-14-2003 03:01 PM

Why is "nowp" an unknown column? It seems that the creator of this hack forgot to mention that people must run a line of SQL to add a column. I did all the steps, but I get errors. I have triple checked everything. If you're going to waste your time with stupid hacks that do not work, at least give support for them.

bozzy 11-14-2003 03:03 PM

Somebody (other than the creator, because he doesn't know what he's doing; not offering support) tell me how to add the "nowp" column in SQL.

Dan 11-14-2003 07:13 PM

Quote:

Originally Posted by bozzy
Somebody (other than the creator, because he doesn't know what he's doing; not offering support) tell me how to add the "nowp" column in SQL.

I was at school bozzy so calm yourself down.... are you absolutely sure you ran the correct queries... eep now that i checked the install file I noticed i have made a mistake.

Just run this

Code:

ALTER TABLE post ADD NOWP VARCHAR(40) NOT NULL
Updated instructions

latinO 11-18-2003 01:28 PM

It would be great if someone could add a feature which would take care of the fact that "Now Playing" will only be shown if someone filled in a song. Meaning that is a user is not using the option the postbit won't mention the "Now Playing" part!

Thanks!

edit --> spelling

Dan 11-18-2003 02:11 PM

Quote:

Originally Posted by latinO
It would be great if someone could add a feature which would take care of the fact that "Now Playing" will only be shown if someone filled in a song. Meaning that is a user is not using the option the postbit won't mention the "Now Playing" part!

Thanks!

edit --> spelling

It can be done but I do not have the knowledge on how to do it in vB2.... once vB3 goes to RC1 I'll release my already updated hack which does what you ask.

Apoco 11-18-2003 09:59 PM

Great Release! *clicks Install*

latinO 11-19-2003 11:32 AM

When I add a music title like artist - Don't let go, I get an MSQL database error because of the '

How can I fix this?

Thanks!

Dan 11-20-2003 04:23 AM

Quote:

Originally Posted by latinO
When I add a music title like artist - Don't let go, I get an MSQL database error because of the '

How can I fix this?

Thanks!

Hmm..... you shouldn't get an error.... I'll look into this and check it out.

Brad 12-09-2003 08:25 AM

Quote:

Originally Posted by Dan
Hmm..... you shouldn't get an error.... I'll look into this and check it out.

Hi Dan, I downloaded this today and noticed a few things in it you missed. This will fix the error with the ' throwing errors:

in newthread.php find:

PHP Code:

$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,nowp) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible', '$nowp')"); 

Replace it with:

PHP Code:

$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,nowp) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible', '".addslashes(htmlspecialchars($nowp))."')"); 

In newreply.php find:

PHP Code:

$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,nowp) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible', '$nowp')"); 

Replace with:

PHP Code:

$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible,nowp) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($title))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible', '".addslashes(htmlspecialchars($nowp))."')"); 

And this will hide 'now playing' in the postbit when it is not in use:

in functions.php find:

PHP Code:

        if ($post[homepage]!="" and $post[homepage]!="http://") {
            eval(
"\$post[homepage] = \"".gettemplate("postbit_homepage")."\";");
        } else {
            
$post[homepage]="";
        } 

Under It add:

PHP Code:

        if ($post['NOWP'] != '')
        {
            eval(
"\$nowplayi_ng = \"".gettemplate("postbit_nowplaying")."\";");
        }
        else
        {
            
$nowplayi_ng '';
        } 

Make a new template call postbit_nowplaying and populate it with:

PHP Code:

Now Playing$post[NOWP

Open the postbit template find:

PHP Code:

Now Playing$post[NOWP

Replace with:

PHP Code:

$nowplayi_ng 

Last but not least in showthread.php do the fallowing to avoid un-cached templates throwing extra querys:

Find:

PHP Code:

,postbit_buddy,postbit_useremail 

Replace with:

PHP Code:

,postbit_buddy,postbit_useremail,postbit_nowplaying

Find:

PHP Code:

,postbit_search,postbit_buddy

Replace with:

PHP Code:

,postbit_search,postbit_buddy,postbit_nowplaying


All done, keep up the good work Dan :)


All times are GMT. The time now is 06:47 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.01285 seconds
  • Memory Usage 1,807KB
  • 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_code_printable
  • (13)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)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