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)
-   -   vBindex v2.1 (https://vborg.vbsupport.ru/showthread.php?t=41916)

LightBringer 08-29-2002 05:16 PM

NTLDR, I have tried to add the shoutbox as well, but am coming up short. Is there any hope in the future for a potential addon? I'm not real keen on php, and I got so far as to be able to post ONE shout at a time hehe....but that's about it. :)

NTLDR 08-29-2002 05:25 PM

Quote:

Originally posted by LightBringer
Is there any hope in the future for a potential addon?
Possibly, it depends if I can get permission from any of the shoutbox creators, if so then it would be built in by default.

LightBringer 08-29-2002 05:33 PM

Quote:

Originally posted by NTLDR


Possibly, it depends if I can get permission from any of the shoutbox creators, if so then it would be built in by default.

That would be great..let me holler at TWTCommish and point him to this thread :)

NTLDR 08-29-2002 05:49 PM

Quote:

Originally posted by LightBringer
That would be great..let me holler at TWTCommish and point him to this thread :)
LOL, I have done a quick integration of this with vBindex, but it would be nice if I could fully integrate it for v2.1 which is comming soon.

Anyway heres what to do:

Add the attached templates, the make this change to vbindex.php:

find:

PHP Code:

// left & right templates
// ------------------------- 

Directly above it add:

PHP Code:

// start shoutbox by TWTCommish
$shout_limit  4;
$smilie_limit 12;

  if (
$type == 'shout' && $comment_submit && trim($message) != '' && $bbuserinfo[userid] > 0) {
    
$DB_site->query("INSERT INTO shoutbox SET
                     userid      = '
$bbuserinfo[userid]',
                     shout_text  = '"
.addslashes($message)."',
                     timestamp   = '"
.time()."'");

    
header("Location: $PHP_SELF?s=$sessionhash[sessionid]");
  }

   
$shouts      $DB_site->query("SELECT u.username, u.userid, s.shoutid, s.shout_text FROM user u, shoutbox s WHERE u.userid = s.userid ORDER BY s.timestamp DESC LIMIT $shout_limit");

      if (!
$DB_site->num_rows($shouts)) {
      eval(
"\$shoutbits = \"".gettemplate("shoutbox_error",1,0)."\";");
    } else {
      while (
$shout_info $DB_site->fetch_array($shouts)) {
        
extract($shout_info);
        
$subject stripslashes($subject);
        
$body    stripslashes($body);
        
$user    = ($HTTP_GET_VARS["userid"] > 0) ? "&userid=$userid'';

        
$color       = ($num++ % == 0) ? '#13486D' '#1C5780';
        
$shout_text  bbcodeparse($shout_text);
        
      
        eval(
"\$shoutbits .= \"".gettemplate("shoutboxbit",1,0)."\";");
      }
   }

$metarefresh "<meta http-equiv=\"refresh\" content=\"180; url=shoutbox.php?s=$session[sessionhash]\"> ";
  if (
$bbuserinfo[userid]) {
    eval(
"\$shoutbox_postshout = \"".gettemplate("home_postshout",1,0)."\";");
    }
eval(
"\$homeshoutbox .= \"".gettemplate("home_shoutbox")."\";");
// end shoutbox by TWTCommish 

Change $shout_limit to reflect the number of shouts to be displayed.

And make sure you add $homeshoutbox in the home_right template (the format is for that of a side bar).

I take no credit for this hack, I have just modified TWTCommish's shoutbox code to fit in with this hack. The origional shoutbox must be installed for this to work.

LightBringer 08-29-2002 05:54 PM

w00t! CLICK ME!

Sheer joys of happiness and gratitude! Thanks NTLDR, I shall attempt this right away.

RenzukenX 08-29-2002 06:19 PM

Godly!
It seems to be working fine, it appears on the VBindex fine and it looks great!

I was just wondering if it could be modified a little to show the last, say 5, shouts rather than just displaying the user's shouts only?
Plus the colours seem a little out of sort. (example: www.coalitionforums.com)

Awesome job nonetheless.

NTLDR 08-29-2002 07:28 PM

Quote:

Originally posted by RenzukenX
I was just wondering if it could be modified a little to show the last, say 5, shouts rather than just displaying the user's shouts only?
Try changing the PHP code again, I've updated the post with it in, I've not had time to test this properly, but it should work now.

LightBringer 08-29-2002 07:36 PM

Hey RenzukenX, it appears as though you are getting the same oddities that I am.

An admin can post a shout no problem.
If a user tries and posts a shout, only those not logged in can see it.

I'm looking at your site now and I see "Sorry, no matching Shoutbox Items found"...

At this point, this is NOT something for NTLDR to worry about. I believe it needs to go back to TWTCommish for review :)

Gohan 08-29-2002 07:39 PM

Open vbindex.php and find:
PHP Code:

$color       = ($num++ % == 0) ? '#13486D' '#1C5780'

Change to:

PHP Code:

$color       = ($num++ % == 0) ? '{ firstaltcolor }' '{ secondaltcolor }'

Or:

PHP Code:

$color       = ($num++ % == 0) ? '{ secondaltcolor }' '{ firstaltcolor }'

Doesnt matter it but check to your prefer colour first or second

P.s. { firstaltcolor } and { secondaltcolor } must be without space!

=============================================

@NTLDR, Thank ya alot, mate! about shoutbox on vbindex page :up:

LightBringer 08-29-2002 07:47 PM

BTW NTLDR, thank you VERY much for doing this :)

That new code you updated worked like a champ.
I changed the submit form link in one of the zipped templates to point to $bburl/vbindex.php instead of $bburl/shoutbox.php, this way when a user would post, it would send them back to the main page.

Have a looksie
http://www.brainphreeze.com


All times are GMT. The time now is 03:37 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.02177 seconds
  • Memory Usage 1,771KB
  • 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
  • (5)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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