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)
-   -   Percent of thread views on threads created by user (https://vborg.vbsupport.ru/showthread.php?t=35929)

Gamingforce 03-09-2002 10:00 PM

Percent of thread views on threads created by user
 
I have been using this on my message board community for a while, but haven't seen a public hack out for it. This hack allows you to see what percent of all thread views made were threads started by that particular user. Very easy to install. Enjoy!

For a demo, check a profile on my board:
http://www.gamingforce.com/forums/me...tinfo&userid=1
(It's under activity summary)

File to edit: member.php
Template to edit: getinfo
Tested on vBulletin 2.0.3 - 2.2.4.

Dade 03-10-2002 06:01 AM

I think I just might use this, thanks. And awesome board

Lesane 03-10-2002 07:56 AM

Very nice, another addon on the user's profile page. Thanks. :up:

Edgar 03-10-2002 11:35 AM

Nice Bobo,I always wondered why I could not find this hack.
Now it seems you made it :D

Overgrow 03-10-2002 12:47 PM

That query ran faster than I expected on good size site. Nicely done.. and I had to respond to say *beautiful board* !

maverick1236 03-10-2002 02:14 PM

Parse error: parse error in c:\program files\nusphere\apache\htdocs\forums\member.php on line 1179

line 1179=$userthreadviews $countviews['views'];

lifesourcerec 03-11-2002 12:18 AM

Quote:

Originally posted by maverick1236
Parse error: parse error in c:\program files\nusphere\apache\htdocs\forums\member.php on line 1179


line 1179=$userthreadviews $countviews['views'];

Change it to:

Quote:

$userthreadviews = $countviews['views'];
the "=" is missing.

Mathiau 03-27-2002 06:51 AM

nice, gonna try this one as well.

pattox2k1 05-06-2002 05:34 AM

nice work :)

Boofo 06-21-2002 05:05 PM

I tried to install this and I got a parse error because of another hack I have installed. Is the following basically the same hack?

Code:

### Open member.php

### Find

  if ($userinfo[customtitle]==2)
    $userinfo[usertitle] = htmlspecialchars($userinfo[usertitle]);
  $userinfo[datejoined]=vbdate($dateformat,$userinfo[joindate]);

### After That Add
// Total Thread Views
$boardviews = $DB_site->query_first("SELECT SUM(views) AS totalviews FROM thread");
$totalviews = $boardviews['totalviews'];
$countviews=$DB_site->query_first("SELECT SUM(views) AS views FROM thread WHERE postuserid='$userinfo[userid]'");
$myviews= $countviews['views'];
$percentofmyviews = round(($myviews / $totalviews) * 100,2);

### Close member.php

### Login to your control panel

### Go to Templates -> Modify -> [expand list] -> User Info Display Templates [expand]  -> getinfo [change original]

### Find In That Template

 any place and add the code:

  $percentofmyviews% of total views

### Done in the control panel

Quote:

Originally posted by Gamingforce
I have been using this on my message board community for a while, but haven't seen a public hack out for it. This hack allows you to see what percent of all thread views made were threads started by that particular user. Very easy to install. Enjoy!

For a demo, check a profile on my board:
http://www.gamingforce.com/forums/me...tinfo&userid=1
(It's under activity summary)

File to edit: member.php
Template to edit: getinfo
Tested on vBulletin 2.0.3 - 2.2.4.



All times are GMT. The time now is 12:27 PM.

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.01375 seconds
  • Memory Usage 1,737KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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