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 a minihack---personal glamour for vb2] (https://vborg.vbsupport.ru/showthread.php?t=17116)

Mark Hewitt 05-18-2001 01:05 PM

Number of threads you have viewed (I think)

ztsky 05-18-2001 01:20 PM

Quote:

Originally posted by Mark Hewitt
Number of threads you have viewed (I think)
2*$userinfo[posts]+$personal0[personalviews]
YOU CAN EDIT THIS CODE AS YOU LIKE.
It's produces a number of how active that user is on your forum.:( :)

Sarge 05-18-2001 01:24 PM

what is how active?
I installed it and it didnt post anything next to glamour in profile
rc3

Me2Be 05-18-2001 01:25 PM

Quote:

Originally posted by ztsky
It's produces a number of how active that user is on your forum.:( :)
Hi Ztsky! What exactly do you mean by "how active"? Number of times they view a thread? Number of times they visit your forums? :)

MrLister 05-18-2001 01:26 PM

This hack is really good. I really like it. You can use it as a activity level. It's very simple to customize. How you want to customize it. Look here
2*$userinfo[posts]+$personal0[personalviews]

In this equation it will take the total number of posts the user has times it by 2 and add the total of views the user has. So if that user has 10 posts and has viewed 50 threads his activity level would be at 70. You can make it so it divides by 100 to use smaller numbers. Only thing missing is replies which would be nice. Ok I came up with this little add-on. There are two types of installations.

People who use tubedoggs User started X threads hack do this:

***Go to member.php and find
Code:

  $startcount = $DB_site->query_first("SELECT COUNT(title) AS starts FROM thread WHERE postuserid='$userinfo[userid]' AND open!='10'");
  $starts = $startcount[starts];
  if ($starts == ""):
          $starts = "0";
  endif;

***Below that add
Code:

$personal0 = $DB_site->query_first("
    SELECT SUM(views) AS personalviews FROM thread WHERE postuserid='$userinfo[userid]' AND open!='10'");
$activity01= $userinfo[posts]-$starts;
$activity02= $starts;
$activity03= $personal0[personalviews];
$personal= 3*$activity02+2*$activity01+$activity03;
  if ($personal2 == ""):
          $personal2 = "0";
  endif;

People who are doing a clean installation do this:[code]
***open member.php and find
Code:

    eval("\$birthday = \"".gettemplate("getinfo_birthday")."\";");
  }

***below that add
Code:

  $startcount = $DB_site->query_first("SELECT COUNT(title) AS starts FROM thread WHERE postuserid='$userinfo[userid]' AND open!='10'");
  $starts = $startcount[starts];
  if ($starts == ""):
          $starts = "0";
  endif;
$personal0 = $DB_site->query_first("
    SELECT SUM(views) AS personalviews FROM thread WHERE postuserid='$userinfo[userid]' AND open!='10'");
$activity01= $userinfo[posts]-$starts;
$activity02= $starts;
$activity03= $personal0[personalviews];
$personal= 3*$activity02+2*$activity01+$activity03;
  if ($personal2 == ""):
          $personal2 = "0";
  endif;

That's it. There's probably a cleaner way of doing the $activity01,02,03 thing but i'm still learning. Please not that i wish no credit for this. i have simply just put the two together and all thanks should go to ztsky and tubedogg. For the rest of the instructions download the file.

Mark Hewitt 05-18-2001 01:26 PM

Ah so it's like an Activity Index number sort of thing, which gives credits for posts and views.

Thats quite nice I think. Not sure if I could be bothered to install it though!!

Me2Be 05-18-2001 01:34 PM

Ah, I see - thanks! Since I disabled views I'm not sure I could use this!

Mark Hewitt 05-18-2001 01:39 PM

Even if you've disabled views they are still counted as far as I know.

What I would like to know is if this hack is backwards compatible. I'm not sure there is anything recording views per person at the moment so I'm not sure how my current members can get an activity index based on what they have done in the past rather than what they do after the hack is installed.

Me2Be 05-18-2001 01:44 PM

Quote:

Originally posted by Mark Hewitt
Even if you've disabled views they are still counted as far as I know.
How would that work? I thought that if you disabled view counts in the code, then it doesn't count any views. Thanks Mark!

Mark Hewitt 05-18-2001 01:46 PM

ah well if you've actually removed it from the code as opposed to just not displayi it then it wouldn't !


All times are GMT. The time now is 05:55 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.01754 seconds
  • Memory Usage 1,739KB
  • 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
  • (4)bbcode_code_printable
  • (3)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