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)
-   -   [Release VB2] Total Thread Views (https://vborg.vbsupport.ru/showthread.php?t=14739)

Sarge 05-09-2001 03:26 AM

easy dude

Just insert

$totalviews since 1-5-01 into where you want it on your forum home template
:)

JJR512 05-09-2001 03:27 AM

Well, it's very simple. Where ever you stick the $totalviews, just put the text by that. For example, if you put it in your forumhome template, so it's below your total threads and total posts, as I did, like this:
Code:

<b>$totalviews</b> total thread views
You could just change it to this:
Code:

<b>$totalviews</b> total thread views since May 7, 2001
(Or use whatever date it was when you converted from UBB to vB.)

TimberLand 05-09-2001 04:31 AM

Where do you paste the code at, in the index.php? Anywhere special.

Can someone give an example of placement.

Thanks
Dan

Sarge 05-09-2001 04:35 AM

in the forum home template

Put it under launch buddy list or wherever

JJR512 05-09-2001 04:42 AM

Quote:

Originally posted by JJR512
Well, it's very simple. Where ever you stick the $totalviews, just put the text by that. For example, if you put it in your forumhome template, so it's below your total threads and total posts, as I did, like this:
Code:

<b>$totalviews</b> total thread views
You could just change it to this:
Code:

<b>$totalviews</b> total thread views since May 7, 2001
(Or use whatever date it was when you converted from UBB to vB.)


TimberLand 05-09-2001 05:01 AM

Thanks very much,

What about the index.php file I need to edit. Where should I put the code it's says in the above post. It say cut and paste this code into the index.php file.

Sarge 05-09-2001 05:03 AM

just find a place... like under total posts in index.php

TimberLand 05-09-2001 11:46 AM

I can't find total posts in the index.php file. Can someone cut out a small part of this file were they have this code placed in the index.php file?

// Total Thread Views

$boardviews = $DB_site->query_first("
SELECT SUM(views) AS threadviews FROM thread");
$totalviews = number_format($boardviews[threadviews]);

JJR512 05-09-2001 04:40 PM

In index.php, look for this:
Code:

// get newest member
Place the code for this hack above this line.

This is how mine looks:
PHP Code:

// get total posts
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=$countposts['posts'];
if (
$totalposts=='') {
  
$totalposts=0;
}
$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
$totalthreads=$countthreads['threads'];
if (
$totalthreads=='') {
  
$totalthreads=0;
}

// Total Thread Views
$boardviews $DB_site->query_first("
    SELECT SUM(views) AS threadviews FROM thread"
);
$totalviews number_format($boardviews[threadviews]);

// get newest member
$getnewestusers=$DB_site->query_first("SELECT userid,username FROM user WHERE userid=$numbersmembers[max]");
$newusername=$getnewestusers['username'];
$newuserid=$getnewestusers['userid']; 


TimberLand 05-10-2001 04:09 AM

Worked like a charm. I was getting messed up because I didn't realize at first there are two index files.


All times are GMT. The time now is 01:42 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.01124 seconds
  • Memory Usage 1,744KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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