Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by fastforward fastforward is offline
Developer Last Online: Nov 2011 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 06-05-2001 Last Update: Never Installs: 0
 
No support by the author.

This is for vB 2.01

This is new thread as there seems to be a problem with editing attachments on old posts.

This little hack allows the display of the last active thread on the forums pages. This is the 'UBB like' feature. You can see an example at http://dbforums.com.

NOTES
It requires two extra column to be added in the forum table a few code additions and then the thread title and iconid can be referenced using the variables $forum[lastactivethread] and icon$forum[lastactiveiconid].gif. Instructions are in the attachment.

This was originally part of my usenet hack and due to popular request ( all two of them ) I'm releasing it seperately.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 06-08-2001, 03:54 PM
NanoEntity NanoEntity is offline
 
Join Date: Oct 2001
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where do I ADD THIS, I dont get the instructions, help!!!

a) admin/functions.php

OLD_CODE
--------
No old code to replace. ADD the new code just before the closing brace of the indexpost() function.

NEW CODE
--------
// START LAST ACTIVE THREAD HACK
update_last_active_thread(0,$post[threadid],0);
// END LAST ACTIVE THREAD HACK


PHP Code:
// ###################### Start indexpost #######################
function indexpost($postid,$firstpost=-1) {

  global 
$DB_site,$bbadminon,$minsearchlength,$maxsearchlength;
  global 
$firstpst,$badwords,$incp;

  if (!
is_array($badwords)) {
    if (
$incp) {
      include(
"./badwords.php");
    } else {
      include(
"./admin/badwords.php");
    }
  } 
Reply With Quote
  #13  
Old 06-08-2001, 04:24 PM
nuno's Avatar
nuno nuno is offline
 
Join Date: Oct 2001
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
// ###################### Start indexpost #######################
function indexpost($postid,$firstpost=-1) {

  global 
$DB_site,$bbadminon,$minsearchlength,$maxsearchlength;
  global 
$firstpst,$badwords,$incp;

  if (!
is_array($badwords)) {
    if (
$incp) {
      include(
"./badwords.php");
    } else {
      include(
"./admin/badwords.php");
    }
// START LAST ACTIVE THREAD HACK 
update_last_active_thread(0,$post[threadid],0); 
// END LAST ACTIVE THREAD HACK 
  

Reply With Quote
  #14  
Old 06-29-2001, 11:57 PM
Raptor Raptor is offline
 
Join Date: Nov 2001
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oops
Reply With Quote
  #15  
Old 06-29-2001, 11:58 PM
Raptor Raptor is offline
 
Join Date: Nov 2001
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am seeing a bug. It is consistantly displaying the title of the post one post BEFORE the last post. It worked the first time through, meaning that the first post registered correctly. Now, it is consistantly one behind.

It seems to work perfect when I make a new thread/reply but if left for a while it constantly stays one post behind

whats also weird is that some forums are correct and some are one behind - very VERY strange

check it out and you will see what I mean

I REALLY loved this feature when used to use UBB so was very happy when you rls'd this

any help would be much appreciated (perhaps table indexes are wrong? or the function.php is slightly wrong?)

also how to increase the table width for Last post - i'd like to widen it a bit but i'm totally missing where I should implement the change (doh!)

thanks FF !

http://digital-forums.com/forum/
Reply With Quote
  #16  
Old 07-21-2001, 08:30 PM
eurosale eurosale is offline
 
Join Date: Jan 2002
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had the same problem. Under certain circumstances vB is not reindexing when replying to a message. This additionl index-call should solve the problem:

Just replace in newreply.php :
PHP Code:
indexpost($postid,0);

if (
$visible) {
        if (
$threadinfo[replycount]%10==0) {
          
$replies=$DB_site->query_first("SELECT COUNT(*)-1 AS replies FROM post WHERE threadid='$threadid'");
          
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount='$replies[replies]',lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
        } else {
          
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount=replycount+1,lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
        }

by:
PHP Code:
indexpost($postid,0);

if (
$visible) {
        if (
$threadinfo[replycount]%10==0) {
          
$replies=$DB_site->query_first("SELECT COUNT(*)-1 AS replies FROM post WHERE threadid='$threadid'");
          
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount='$replies[replies]',lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
        } else {
          
$DB_site->query("UPDATE thread SET lastpost='".time()."',replycount=replycount+1,lastposter='".addslashes($postusername)."' WHERE threadid='$threadid'");
        }
      
indexpost($postid,0);

I hope that helps!
Reply With Quote
  #17  
Old 07-21-2001, 10:44 PM
ztsky
Guest
 
Posts: n/a
Default

See mine
there's a demo:
http://tsing.com/vb/

I think it's not need to change any table,I get last activetiltle and its icon in edit index.php.
Reply With Quote
  #18  
Old 07-21-2001, 11:08 PM
eurosale eurosale is offline
 
Join Date: Jan 2002
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So please ztsky,

if there are better solutuions, please let us know how!
Reply With Quote
  #19  
Old 07-21-2001, 11:19 PM
ztsky
Guest
 
Posts: n/a
Default

Quote:
Originally posted by eurosale
So please ztsky,

if there are better solutuions, please let us know how!
eurosale:
Sorry ,i still have a problem to solve.
I have three sub forums in a main forum.
in my hacked board, the main forumhome lastposttitle always show the main forum's,but the sub forums have newest thread!
Reply With Quote
  #20  
Old 07-22-2001, 01:27 AM
TDawson
Guest
 
Posts: n/a
Default

Quote:
Originally posted by ztsky


eurosale:
Sorry ,i still have a problem to solve.
I have three sub forums in a main forum.
in my hacked board, the main forumhome lastposttitle always show the main forum's,but the sub forums have newest thread!
I have the same problem.

I found this out AFTER i installed this hack
Reply With Quote
  #21  
Old 07-22-2001, 01:37 AM
ztsky
Guest
 
Posts: n/a
Default

Quote:
Originally posted by TDawson

I have the same problem.

I found this out AFTER i installed this hack
I didn't use this hack,I write a hack of mine,the effection is same but it's more simple and not need to edit table,but my problem is above i said.
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 11:04 PM.


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.05188 seconds
  • Memory Usage 2,319KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (7)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete