vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Moving the Navbar info (https://vborg.vbsupport.ru/showthread.php?t=71851)

AdmiralB 11-17-2004 01:21 AM

Moving the Navbar info
 
On my site, I significantly modified the navbar so it only shows the breadcrumb. I wanted to move the Private Message / Last Visit info from the navbar to another template, but it wouldn't work. I tried to move the following from the navbar template to another I created:

Code:

<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
 <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
 <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>

Does anyone know how I should set this up?

On an unrelated note, does anybody know how to retrieve the number of new posts since that user last visited?

Thanks in advance :D

Brad 11-17-2004 02:13 AM

You can get the new posts as so, its a intensive query tho, not recomended for large boards
PHP Code:

    $sql_newposts $DB_site->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "post WHERE dateline >= '$bbuserinfo[lastvisit]'");
    
$newposts number_format($sql_newposts['count']); 

Then use $newposts for the number of new posts in your templates. I don't recomend using that globaly, if you are going to use it restrict it to one or two pages.

AdmiralB 11-17-2004 08:47 PM

Quote:

Originally Posted by Brad.loo
I don't recomend using that globaly, if you are going to use it restrict it to one or two pages.

Alright, I won't use it then. Any ideas on how to solve my first problem?


All times are GMT. The time now is 06:23 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.01047 seconds
  • Memory Usage 1,719KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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