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)
-   -   vB Shoutbox 1.0 (https://vborg.vbsupport.ru/showthread.php?t=38698)

TWTCommish 05-17-2002 08:37 PM

In forumhome_shoutbox replace the $shout[shout_text] variable with your $shouts variable. I think that'll do it.

ceo_tfw 05-17-2002 08:53 PM

not sure where I put this
PHP Code:

$shoutz $DB_site->query('SELECT u.username, s.userid, s.shout_text, s.timestamp FROM user u, shoutbox s WHERE u.userid = s.userid ORDER BY s.timestamp DESC LIMIT 10');
while (
$shout10top mysql_fetch_array($shoutz)):
    ++
$shout10topnbsp;
    
$shout[timestamp]  = vbdate('n-j-y, g:i:s a'$shout10top[timestamp]);
    
$shout[shout_text] = bbcodeparse($shout10top[shout_text]);
    
$shouts .= "<smallfont><b>Posted by <a href=\"member.php?s=$sesion[sessionhash]&action=getinfo&userid=$shout10top[userid]\" class=\"small\">$shout10top[username]</a><br> Posted @ $shout[timestamp]</b></smallfont><br/><smallfont>$shout[shout_text]</smallfont><br><br>";
endwhile;
eval(
"\$the_shoutbox .= \"".gettemplate("forumhome_shoutbox")."\";"); 


TWTCommish 05-17-2002 09:12 PM

That's the code you put in the index.php file instead of the code listed in the instructions. Stick it in place of that, and in the same spot. That should do it. :)

S0uL 05-18-2002 01:16 AM

i installed this with vbhacker and it said everything installed right. but doesnt show on forumhome. and the $the_shoutbox is in forumhome.

TWTCommish 05-18-2002 01:21 AM

Make sure it edited your index.php file successfully...and then, go shout. It needs at least one shout if it's going to display anything on your main forum page. :)

S0uL 05-18-2002 01:21 AM

nevermind i fixed it. vbhacker didnt add the fourmhome_shoutbox

tweak 05-18-2002 03:09 AM

I put this in INDEX.PHP and my page is now WHite. Pure white, No forum ????


Quote:

Originally posted by ceo_tfw
not sure where I put this
PHP Code:

$shoutz $DB_site->query('SELECT u.username, s.userid, s.shout_text, s.timestamp FROM user u, shoutbox s WHERE u.userid = s.userid ORDER BY s.timestamp DESC LIMIT 10');
while (
$shout10top mysql_fetch_array($shoutz)):
    ++
$shout10topnbsp;
    
$shout[timestamp]  = vbdate('n-j-y, g:i:s a'$shout10top[timestamp]);
    
$shout[shout_text] = bbcodeparse($shout10top[shout_text]);
    
$shouts .= "<smallfont><b>Posted by <a href=\"member.php?s=$sesion[sessionhash]&action=getinfo&userid=$shout10top[userid]\" class=\"small\">$shout10top[username]</a><br> Posted @ $shout[timestamp]</b></smallfont><br/><smallfont>$shout[shout_text]</smallfont><br><br>";
endwhile;
eval(
"\$the_shoutbox .= \"".gettemplate("forumhome_shoutbox")."\";"); 



TWTCommish 05-18-2002 03:37 AM

Is that ALL you have in your index.php file? You're not supposed to replace the entire contents of it...

tweak 05-18-2002 04:52 AM

No no I just replaced this and the page was all white. Any reason why???

PHP Code:

eval("dooutput(\"".gettemplate('forumhome')."\");"); 


Quote:

Originally posted by TWTCommish
Is that ALL you have in your index.php file? You're not supposed to replace the entire contents of it...

ceo_tfw 05-18-2002 07:48 AM

Quote:

Originally posted by tweak
I put this in INDEX.PHP and my page is now WHite. Pure white, No forum ????






I put this in the index.php and I just seen the page die on me so I had to say OH ship, so I am not sure what then to do,,,,,,,

Bald Bouncer 05-18-2002 10:16 AM

tweak you dont replace that do you?? I think it says add above that!

TWTCommish 05-18-2002 12:40 PM

He's right: you don't remove that line. It should still be sitting there at the end of the file.

jamesdasher 05-18-2002 03:35 PM

the line you replaced is the line that outputs the entire forumhome template, or in other words the entire page, if you delete that you won't get a page at all, you have to add it above it.

James

Sezmarone 05-19-2002 06:21 PM

Has anybody seen an increase of server load with this hack?

Coolj 05-19-2002 11:41 PM

I love it..

Velocd 05-20-2002 01:11 AM

Quote:

Originally posted by Coolj
I love it..
yup, there's nothing like a good increase in server load ;)

j/k

TWTCommish 05-20-2002 01:16 AM

It uses something like 20 queries per pageload. That ain't much at all, man. :)

Jeremy W. 05-23-2002 05:59 PM

Yet another awesome hack :D

DarkDraco07 05-23-2002 07:31 PM

i tried to install this hack acouple times and i keep getting a white page, and its not the same as the earlier problem.
someone please help

TWTCommish 05-23-2002 07:37 PM

You're not allowed to post any full vB files. Anyway, I don't know what's wrong...you shouldn't be getting a white page if you still have this line as the second-to-last in your /index.php file:

PHP Code:

eval("dooutput(\"".gettemplate('forumhome')."\");"); 


DarkDraco07 05-23-2002 07:40 PM

sorry, i didnt know :(

TWTCommish 05-23-2002 07:46 PM

Um, you should probably go back and edit your post so you can remove the attachment, then. :)

Jeremy W. 05-23-2002 07:50 PM

Chris, I just wanted to say again how truly solid this is :)

I had installed Sinecure's shoutbox and it took me 2 hours to customize it and make it work properly. I dropped yours in and bang it worked. Since users had been using Sinecure's, they were quite shocked when everything switched to the new one.

In 1 hour there have been 200 shouts. The users love it, thank you again so much! :)

TWTCommish 05-23-2002 07:53 PM

Thanks very much - I'm glad you like it. My users love it, too. :)

Jeremy W. 05-23-2002 08:07 PM

No worries mate, good work deserves praise :)

Any plans for upgrades? (who's shouting, etc)?

TWTCommish 05-23-2002 08:28 PM

Yeah, I do plan, I think, to upgrade this script after awhile...assuming it continues to get this positive reaction. :) "Who's Shouting" is a very good idea...I guess it'd work a little bit like "Users Browsing this Forum"? I suppose I never thought of it because my board isn't big enough to warrant such a thing. And I've been busy with two other significant hacks. :D

I had a few other ideas, too:
  • Comprehensive admin script to edit/delete shouts easily (perhaps in bulk for the latter?)
  • Who's Shouting? (good idea :D)
  • Shoutbox Search
  • Shoutbox Smilie Selector (allow admins to easily select which smilies they want below their text box)
  • Shouts in last 24 hours (as an admin, and user options)
  • Refresh intervals: allow user to select how often the page should refresh, if at all.
That's all for now...a few of those are quite easy of course, but I'd rather do things in bunches. :) If anyyone else has any other suggestions, don't hesitate to speak up.

Jeremy W. 05-23-2002 08:33 PM

Yeah, it would be just like the "Who's browsing this forum".

A few things I've noticed is that the breadcrumb doesnt' show up properly (http://www.ringquest.com/forums/shoutbox.php), and smilies don't show up in posts at all...

I'd just like to say that I'm addicted to your hacks *L* Of the 20 odd new features this week, I think nearly half were yours :) One day I need to learn PHP *L*

TWTCommish 05-23-2002 08:49 PM

Open shoutbox.php, and find this:

PHP Code:

eval("\$shoutbits .= \"".gettemplate("shoutboxbit",1,0)."\";"); 

...right before it, add this...

PHP Code:

$shout_text  bbcodeparse($shout_text); 

Let me know if that helps with the smilies. :) If it doesn't, add this:

PHP Code:

$shout_text  bbcodeparse($shout_text01); 

That should help. I think. I hope. You probably have that line in your file already...but without the ", 0, 1" in the function call.

Jeremy W. 05-23-2002 10:06 PM

It now reads something like:

Code:

        $color      = ($num++ % 2 == 0) ? '{firstaltcolor}' : '{secondaltcolor}';
        $totalshouts = number_format($DB_site->num_rows($shouts));
        $time_posted = vbdate('n-j-y, g:i:s a', $timestamp);
        $shout_text  = bbcodeparse($shout_text);
       
          if ($bbuserinfo[usergroupid] == 6) {
            eval("\$adminoptions = \"".gettemplate("shoutbox_adminoptions",1,0)."\";");
          }
        $shout_text  = bbcodeparse($shout_text, 0, 1);
        eval("\$shoutbits .= \"".gettemplate("shoutboxbit",1,0)."\";");
      }

But still no smilies (from old or new posts) :(

I mean, it's not a big deal but they would add lots of "ambience" ;)

TWTCommish 05-23-2002 10:07 PM

Try this:

Code:

        $color      = ($num++ % 2 == 0) ? '#F1F1F1' : '#DFDFDF';
        $totalshouts = number_format($DB_site->num_rows($shouts));
        $time_posted = vbdate('n-j-y, g:i:s a', $timestamp);
        $shout_text  = bbcodeparse($shout_text, 0, 1);
       
          if ($bbuserinfo[usergroupid] == 6) {
            eval("\$adminoptions = \"".gettemplate("shoutbox_adminoptions",1,0)."\";");
          }
        eval("\$shoutbits .= \"".gettemplate("shoutboxbit",1,0)."\";");
      }


Jeremy W. 05-23-2002 10:11 PM

ergh ergh ergh... :(

What am I doing wrong?

TWTCommish 05-23-2002 10:18 PM

That didn't work either, I take it?

Jeremy W. 05-23-2002 11:46 PM

:(

TWTCommish 05-23-2002 11:50 PM

Ok, replace this...

PHP Code:

$shout_text  bbcodeparse($shout_text01); 

...with this...
PHP Code:

$shout_text  bbcodeparse($shout_textX); 

In place of "X" add the forumid number of one of your forums...one that supports bbCode. I think that'll do it. Not positive...but it's worth trying. :)

Jeremy W. 05-24-2002 02:22 AM

Gorgeous! It worked :D

TWTCommish 05-24-2002 02:23 AM

Excellent. :) Glad to hear it. Also in line for 2.0, assuming it gets that far: integration with the vBulletin Options page...much better if you can control the shouts per page and number of smilies generated, etc, right from the CP. It won't be too hard...but again...I'd rather bunch things a little. :)

Jeremy W. 05-24-2002 02:25 AM

Sounds good, I'd already integrated it though :)

PHP may be new, but it's still just scripting ;)

lordofgun 05-25-2002 05:29 AM

any idea how to get firefly's "/ me" hack to work with this?

lordofgun 05-25-2002 05:30 AM

BTW, still lovin the shoutbox! becoming more and more popular every day!

TWTCommish 05-25-2002 01:53 PM

Quote:

Originally posted by lordofgun
any idea how to get firefly's "/ me" hack to work with this?
Yeah, just change this line (in shoutbox.php)...

PHP Code:

$shout_text  bbcodeparse($shout_text01); 

...to this...
PHP Code:

$shout_text  bbcodeparse($shout_text011); 



All times are GMT. The time now is 12:53 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.01637 seconds
  • Memory Usage 1,844KB
  • 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
  • (2)bbcode_code_printable
  • (11)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete