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)

Alwaysmefirst 05-27-2001 08:50 AM

Very cool hack :)
Thanks for posting it.

Olly

max 05-28-2001 04:34 PM

Thanks for the hack, very nice.
Is there any way to include this hack onto a Non-VB page?
I've added the correct code into my /forums/index.php..
and then I made a new file named totalthreadviews.inc.php with this code:
Code:

<?php

$font = "Verdana";
$fontsize = "8pt";

require("/home/max/public_html/forums/index.php");
$boardviews = $DB_site->query_first("
SELECT SUM(views) AS threadviews FROM thread");
$totalviews = number_format($boardviews[threadviews]);
echo "<font-family: $font; font-size: $fontsize\"><b>$totalviews</b> total thread views</font>";
?>

Then I opened up my non-vb page and tried to include that file.. but it didn't work at all..
Any ideas on this one?

Martz 05-29-2001 12:54 PM

Very nice and simple hack, appreciated :)

Zorg 06-09-2001 12:27 PM

That's a great hack, thanks alot :D

Any change of putting this into the "stats" in the VB control panel to give more of a per day/week/month effect listing?

Streicher 06-11-2001 07:22 PM

If you want the views displayed without a "," then use this code instead:

PHP Code:

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


webhost 06-13-2001 12:33 PM

Thanks for the hack. Works Great

Joey;)

ThomasP 06-15-2001 10:51 AM

Quote:

Originally posted by Streicher
[B]If you want the views displayed without a "," then use this code instead (...)
Thanks - that was what I was looking for! :D

Gr??e nach Reinbek,
-Tom

king98 06-16-2001 09:29 AM

i tried to post that code in the index.php file but it did not work .... can some body add this hack to that file and put it for downloading plz.:(

webhost 07-12-2001 01:34 PM

Hack works great.
How would someone also add under a members profile the total amount of page views that member has?

Lukman 07-13-2001 04:59 PM

I think im the only one who cant get this hack to work :(

I did two things as instructed - add that piece of code in my /forums/index.php file exactly the same way JJR512 did it

and I added <b>$totalviews</b> total thread views - in the forum home template

When I refreshed - all i saw was total thread view with no number next to it :(


Whats wrong?


Thanks in advance - im using v2.0.1 btw


All times are GMT. The time now is 01: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.01179 seconds
  • Memory Usage 1,734KB
  • 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)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