vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Last Post: XX Minutes Ago (https://vborg.vbsupport.ru/showthread.php?t=43515)

JulianD 09-13-2002 10:00 PM

Last Post: XX Minutes Ago
 
Requested by: Unknown553 here

Description: Small hack to display the time since the last post in forumdisplay.
I did it pretty fast and there could be some bugs, so please, send some feedback.

Thanks.

Logician 09-14-2002 08:29 AM

LOL..

7 minutes before me congrats.. :)

I thought you might want to take a look at my code too.. :classic:

JulianD 09-14-2002 08:35 AM

Cool hack man! I like your code. :) Thanks!

Link14716 09-14-2002 10:23 AM

Heh, that was quick ;)

I will probably install it with some modifications to work with index.php (to show time since last post period). ;)

blackice912 09-14-2002 10:53 AM

Can I have a screenshot?

Link14716 09-14-2002 11:36 AM

It looks like this, but on a vB.

http://forums.sonymusic.com/forum.jsp?forum=438

blackice912 09-14-2002 12:22 PM

Oh, sweet. I think I'll be installing this. :)

Unknown553 09-14-2002 05:18 PM

Wow, that was fast! Thanks, both of you. Now, which of the two should I use? hehehe...

kmfdm_kid2000 09-14-2002 08:39 PM

I went with logician's version, only b/c I already have a lot of his hacks installed, but both are good, and I love stat hacks of all kinds!! Thank you both for your time and effort ;)

NTLDR 09-14-2002 08:52 PM

Quote:

Originally posted by Link14716
It looks like this, but on a vB.

http://forums.sonymusic.com/forum.jsp?forum=438

Is it me or does that site only have the date/time stamp like vB has by default? Or am I just blind? :knockedout:

Velocd 09-14-2002 11:19 PM

Very cool small hack
/me installs

Logician 09-15-2002 07:47 AM

Quote:

Originally posted by NTLDR

Is it me or does that site only have the date/time stamp like vB has by default? Or am I just blind? :knockedout:

Just looking wrong place.. Follow the arrow ;)

Unknown553 09-15-2002 07:43 PM

Ok I went with your hack, Logician, for the same reason as kmfdm_kid2000's. I already have a lot of your hacks installed so I trust you. Hack works 100% for me, so this doesn't belong in Beta Hacks ;)

Dado 01-28-2003 12:03 AM

nice hack but I had to take it off. Not sure why a small hack like this used so much CPU. I have an average of 800 online (4mbit average)and the site slowed way down and the load average went up to 4 instead of the average 1.

JulianD 01-28-2003 12:12 AM

Hi Dado... did you tried the Logician version of this hack? Try it and see how it goes.

mcyates 02-06-2003 09:23 AM

fantastic simple hack, weldone. Thanks

Alien 05-04-2003 05:00 PM

Hey.. How bad is the queries and server load with Logician's hack exactly? :)

-Jason

Alien 05-07-2003 04:09 PM

Anyone? :) I'm almost done with all my new hacks, and would like to get this one in if the load or queries won't be crummy...

-Jason

Logician 05-07-2003 05:43 PM

Both hacks add 1 query to forumdisplay page. No big deal, go with any version you like..

Alien 05-08-2003 05:23 AM

Thanks, Logician. I'll probably give yours a whirl.

-Jason

Alien 05-08-2003 05:36 AM

Logician: When viewing the two hacks, would your queries become lesser if you added your newly added template to the $templatesused line in forumdisplay? Just curious. :)

-Jason

Logician 05-08-2003 07:48 AM

that is right Alien..

Alien 05-09-2003 09:30 PM

Great.. So would this change actually make yours 0 queries? Or still 1? :D

Alien 05-19-2003 06:49 PM

0 I hope? :D

Logician 05-19-2003 07:42 PM

1 :)

Alien 05-19-2003 07:44 PM

Shucks. :P

Okay, installing!

cnczone 06-01-2003 02:24 PM

I installed it on 2.30 and it does nothing. What is wrong?

WEForums 06-02-2003 12:10 AM

If you are sure you followed the steps properly you should probably make sure you don't have multiple styles and didn't add the templates into a style you no longer use. It's a common problem when making new templates.

cnczone 06-02-2003 12:27 AM

I have only one style.

WEForums 06-02-2003 12:30 AM

Then you must redo your steps as you didn't do it properly. Make sure you didn't do the wrong $templatesused part because often they look very similar.

EDIT: Don't install this if you have alarge forum with lots of posts. If you do, your server will become overloaded and, if you're the size of WEForums, that isn't good at all. I only get like 1200 e-mails about it being down...and this hack is the cause.

WEForums 06-14-2003 03:06 PM

Thanks to delux (someone who is involved with the WEForums server), he fixed the problem.

Instead of:

PHP Code:

$lastpostsecond $DB_site->query_first("SELECT MAX(post.dateline) AS dateline
                                             FROM post
                                             LEFT JOIN thread ON thread.threadid=post.threadid
                                             WHERE thread.forumid='
$forumid'");
    
$lastpostseconds=time() - $lastpostsecond['dateline']; 

Use:

PHP Code:

$lastpostsecond $DB_site->query_first("SELECT lastpost
                                             FROM forum
                                             WHERE forumid='
$forumid'");
    
$lastpostseconds=time() - $lastpostsecond['lastpost']; 


JulianD 06-14-2003 09:40 PM

Thanks, I've updated the file


All times are GMT. The time now is 04:44 PM.

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.01243 seconds
  • Memory Usage 1,773KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (32)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