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)

webhost 07-13-2001 05:08 PM

Here is how I have mind setup in the forumhome template.

Registered Members: <b>$numbermembers</b><br>
Total Threads: <b>$totalthreads</b> | Total Posts: <b>$totalposts</b> | Total Views: <b>$totalviews</b><br>

webhost 07-13-2001 05:12 PM

This is what my index.php looks like.

$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]);

Lukman 07-13-2001 05:27 PM

Webhost

I thought u were just suppose to add

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

How come you got some extra code above this?

btw - pardon my lack on php knowledge - but are there permissions set for php files?

webhost 07-13-2001 05:31 PM

yes code above above ties in with something else.

Email me your index.php and forumhome template for me to look at to joeymoses1@home.com

Lukman 07-13-2001 05:50 PM

Here you go Webhost or anyone else who is willing 2 help me out :) - I copied and pasted the forum home template source in a txt file

Thanks :)

This is how i edited the index.php file -

I went to my ftp proggy (Cute FTP) first I made a backup of the index file by downloading it on my harddisk - then I right clicked and edited the index file from my uploaded version - it opened into notepad - then added the code - and uploaded the amended version..

I take it php files do not have chmod permissions, do they?

webhost 07-13-2001 07:42 PM

Try inserting the bold item below

// Total Thread Views
$boardviews = $DB_site->query_first("
SELECT SUM(views) AS threadviews FROM thread");
$totalviews = number_format($boardviews[threadviews]);
}<--- I think you need that
// get newest member
$getnewestusers=$DB_site->query_first("SELECT userid,username FROM user WHERE userid=$numbersmembers[max]");
$newusername=$getnewestusers['username'];
$newuserid=$getnewestusers['userid'];

mjames 07-14-2001 01:14 AM

Love this simple hack. Got it installed on my boards. Good job!

Lukman 07-14-2001 02:52 AM

webhost mate - tried that = still no joy :(

I guess this hack doesnt wanna work on my board! ( sob sob)

Anybody got any other ideas?

webhost 07-14-2001 03:24 AM

try uploading this index.php file, first backup your file on your hardrive then delete the index.php file on your server and upload this one.

[Zip Removed -- don't post full source code!]

webhost 07-14-2001 03:26 AM

lukman give a url to your board


All times are GMT. The time now is 08: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.01117 seconds
  • Memory Usage 1,733KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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