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)
-   -   Since Your Last Visit! (https://vborg.vbsupport.ru/showthread.php?t=31957)

MrLister 10-31-2001 10:00 PM

Somebody here request it so I made it quickly.... Basically this hack here tells your users how many new posts and threads there have been since hteir last visit on the main page.

An example is https://vborg.vbsupport.ru and right under your username.

INSTRUCTIONS:
Inside index.php (not admin) find:
PHP Code:

// if user is know, then welcome 

right under it add:
PHP Code:

$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]'");
$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'"); 


In the template forumhome_welcometext find:
PHP Code:

Welcome back, <b>$bbuserinfo[username]</b

right under it add:
PHP Code:

<br>There have been <b>$getnewthread[threads]</bthreads and <b>$getnewpost[posts]</bposts since your last visit


That's it! If you installed the hack please click the install button!

atrl 11-01-2001 12:52 AM

Thanks Very Much!

Neo 11-01-2001 01:00 AM

thank you for another great hack

|DarkManX| 11-01-2001 03:12 AM

getting this error with 2.2

Database error in vBulletin 2.2.0:

Invalid SQL: SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '1004590373
mysql error: You have an error in your SQL syntax near ''1004590373' at line 1

mysql error number: 1064

Date: Thursday 01st of November 2001 12:10:23 AM
Script: http://www.partylounge.net/tof/tof/index.php?
Referer:



don't get what i did wrong....

MrLister 11-01-2001 03:49 AM

yikes sorry.... add a ' after $bbuserinfo[lastvisit] or look above. i fixed it.

FWC 11-01-2001 04:00 AM

Add a ' right before the last " in each query. You also need to add posts to the forumhome_welcometext.

MrLister 11-01-2001 04:13 AM

yup.. it's fully fixed now.. thx
Quote:

Originally posted by FWC
Add a ' right before the last " in each query. You also need to add posts to the forumhome_welcometext.

FWC 11-01-2001 04:29 AM

Hey, I'm the first guy to click "Installed". Thanks! :)

JJR512 11-01-2001 07:15 AM

2nd! :)

Admin 11-01-2001 10:22 AM

Clicked it as well since I'm already using this here. :) Nice job.


All times are GMT. The time now is 06:05 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.01095 seconds
  • Memory Usage 1,736KB
  • 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
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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