vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   How many threads and posts since your last visit! (https://vborg.vbsupport.ru/showthread.php?t=59583)

Gary King 01-02-2004 10:00 PM

How many threads and posts since your last visit!
 
PLEASE CLICK ON THE INSTALL BUTTON IF YOU INSTALLED THIS! THANKS!

What does this hack do?

This hack basically shows the number of new threads and posts since your last visit, in the navbar (under your nick.) Check out the attached screenshot for more information :)

Installation
This is a pretty simple hack to install.
Instructions are as follows:

FILE MODIFICATIONS
global.php

TEMPLATE MODIFICATIONS
navbar

PHRASES
navbar_sincelastvisit

OPEN global.php AND FIND
PHP Code:

    echo "End call of global.php:  $aftertime\n"
    echo 
"\n<hr />\n\n"


(NOTE: If you want old threads with new posts to count as a new thread, then skip this next step)
UNDER IT, ADD
PHP Code:

# SINCE YOUR LAST VISIT 
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM ".TABLE_PREFIX."thread WHERE lastpost > '".$bbuserinfo['lastvisit']."'"); 
$getnewpost=$DB_site->query_first("SELECT COUNT(*) AS posts FROM ".TABLE_PREFIX."post WHERE dateline > '".$bbuserinfo['lastvisit']."'"); 

(NOTE: If you did the step above, then skip this next step)

UNDER IT, ADD
PHP Code:

# SINCE YOUR LAST VISIT 
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM ".TABLE_PREFIX."thread WHERE dateline > '".$bbuserinfo['lastvisit']."'"); 
$getnewpost=$DB_site->query_first("SELECT COUNT(*) AS posts FROM ".TABLE_PREFIX."post WHERE dateline > '".$bbuserinfo['lastvisit']."'"); 

OPEN UP THE navbar TEMPLATE AND FIND
HTML Code:

<if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase></if>
UNDER IT, ADD
HTML Code:

<br /><phrase 1="$getnewthread[threads]" 2="$getnewpost[posts]" />$vbphrase[navbar_sincelastvisit]</phrase>
CREATE NEW PHRASE CALLED navbar_sincelastvisit
WITH THE FOLLOWING CONTENT:
Code:

There have been {1} threads and {2} posts since your last visit!
THE HACK IS NOW INSTALLED, ENJOY!

Screenshots

Attached :)

Gio Takahashi 01-03-2004 05:24 PM

Hmmm might actually do this one.

MGM 01-03-2004 05:36 PM

good job man, thanks for the hack!

*clicks install*

MGM out

Gio Takahashi 01-03-2004 05:40 PM

Installed, works smoothly.

Dan 01-03-2004 05:42 PM

nice one this will help with making a custom Welcome panel :D

assassingod 01-03-2004 06:09 PM

Shame I didn't get to release my version that I did ages ago:(

The Keeper 01-03-2004 06:26 PM

Does it actually show new threads, or will a thread show as new if there is a new post in it?

Gary King 01-03-2004 06:34 PM

Both.

DCX 01-03-2004 07:44 PM

i'm new to vb and i wanna try to add hacks and stuff to my board. i found the global.php file on the server but i couldn't find the navbar template file. to make things easier for me, is there a site or list somewhere showing where all the files are installed into which folder or whatever? oh yeah, will this work for vb3 gamma?

SnowBot 01-03-2004 08:03 PM

Quote:

Originally Posted by DCX
i'm new to vb and i wanna try to add hacks and stuff to my board. i found the global.php file on the server but i couldn't find the navbar template file. to make things easier for me, is there a site or list somewhere showing where all the files are installed into which folder or whatever? oh yeah, will this work for vb3 gamma?

the templates are located in your admin control panel under

Style Manager

in the dropdown menu click edit templates and you will see them all

good luck :)


All times are GMT. The time now is 03:19 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.01820 seconds
  • Memory Usage 1,748KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (3)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)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