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)

05-16-2001 09:00 PM

This hack is get info on user statu.
when view user's profile a "personal glamour"will be display.
here is a demo:
http://my.yalaso.net/~ztsky/ztskydemo.jpg
It's a Chinese Version.
but in my zipfile ,It's a english Version.
file to be edit: member.php
template to be edit:getinfo
updated on 05-19-2001 04:32 AM
here's the hack:

Sarge 05-17-2001 02:40 PM

Who said what to who?

What does this hack do?

Mega 05-17-2001 03:38 PM

Next time make the image a JPG first.. that BMP takes hours to load !!!

or put it on a better server

ztsky 05-17-2001 03:52 PM

Quote:

Originally posted by Mega
Next time make the image a JPG first.. that BMP takes hours to load !!!

or put it on a better server

You are right!;)
The image is too big.I have it edited.

Sarge 05-17-2001 06:04 PM

what does this hack do?

Pingu 05-17-2001 07:20 PM

Quote:

Originally posted by Sarge
what does this hack do?
Well, if you take a look in the textfile ztsky zipped, then you'll find a line like this:
2*$userinfo[posts]+$personal0[personalviews];

To keep it real simple, this hack produces a number of how active that user is on your forum, that's the personal glamour and I like it :)

MrLister 05-17-2001 11:14 PM

great hack except you made a typo in your document.

change:
Code:

<td><normalfont>$starts</normalfont>
to:
Code:

<td><normalfont>$personal</normalfont>

ztsky 05-18-2001 01:59 AM

Quote:

Originally posted by mrlister
great hack except you made a typo in your document.

change:
Code:

<td><normalfont>$starts</normalfont>
to:
Code:

<td><normalfont>$personal</normalfont>

Thank you very much.
I confuseed another hack with it,but it has been updated.:p

Mark Hewitt 05-18-2001 10:03 AM

I think personal views would be a better name.

Personal glamour could mean many things :eek:

Me2Be 05-18-2001 01:04 PM

I'm still confused - what exactly does this hack do? :)

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 !

Me2Be 05-18-2001 01:48 PM

Quote:

Originally posted by Mark Hewitt
ah well if you've actually removed it from the code as opposed to just not displayi it then it wouldn't !
Phew, I was getting confused there for a second! :)

ztsky 05-20-2001 02:09 AM

Quote:

Originally posted by Me2Be
Hi Ztsky! What exactly do you mean by "how active"? Number of times they view a thread? Number of times they visit your forums? :)
I think Number of times they view a thread and Number of times they visit your forums and Number they post a thread and Number of their posts all of "how active" ,:)
I sugguest vb should support a function to display "how active" a user in our forum.

Pingu 05-20-2001 10:57 AM

Well, this was what I needed.

I'm going to let my members advertise on my forums, but I only want to allow active members to do so. This hack could save me a lot of trouble :)

MrLister 05-20-2001 01:04 PM

using this you can easily restrict access to those who aren't active

Pingu 05-20-2001 04:22 PM

Quote:

Originally posted by mrlister
using this you can easily restrict access to those who aren't active
Not quite so, because the result is cummulative. People can still have a high number after being inactive for months.
But I've added a little extra code to check for the last activity. If that activity was more then 21 days ago, the glamour thing is set to 0

ztsky 05-20-2001 05:20 PM

Quote:

Originally posted by Pingu


Not quite so, because the result is cummulative. People can still have a high number after being inactive for months.
But I've added a little extra code to check for the last activity. If that activity was more then 21 days ago, the glamour thing is set to 0

Of cause "how active" is difficult to definite and it is not as a same thing everybody think about.
But this hack can give you a point.:o

ThomasP 06-15-2001 10:39 AM

Great hack!
Easy to setup and I love it :)
-Tom

Nocturnal 06-24-2001 06:12 PM

Quote:

Originally posted by Pingu

I've added a little extra code to check for the last activity. If that activity was more then 21 days ago, the glamour thing is set to 0

Care to share?

DeadlyMax 07-06-2001 08:25 PM

modified it a bit:

this will add Personal Views to the posts
image:
https://vborg.vbsupport.ru/


in showthread.php

Find:

PHP Code:

    $onlinestatus="";
  } 

Below that add:

PHP Code:

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

then edit template postbit:

Find:

Code:

        Posts: $post[posts]</smallfont></td>
Replace that with:

Code:

        Posts: $post[posts]<br>
        Personal Views: $personal </smallfont></td>

that should do the trick ;)
have fun

ShadowTech 07-12-2001 06:47 AM

I just thought I would point out that this hack has nothing to do with how active a member is on your forum.

ALL it does is shows how many times ANYONE has viewed a users thread. Not how many threads that user themselves have viewed.

If you want to see it in action to find out how it really works, open up a thread to view the posts.. look at the number of views for the thread creator.. then hit reload.. their number increases by one. Keep hitting reload and their number keeps rising.

So if you are using this hack thinking it shows how frequently your user is surfing around the board looking at people's posts.. you are mistaken.

ztsky 07-12-2001 06:52 AM

Quote:

Originally posted by ShadowTech
I just thought I would point out that this hack has nothing to do with how active a member is on your forum.

ALL it does is shows how many times ANYONE has viewed a users thread. Not how many threads that user themselves have viewed.

If you want to see it in action to find out how it really works, open up a thread to view the posts.. look at the number of views for the thread creator.. then hit reload.. their number increases by one. Keep hitting reload and their number keeps rising.

So if you are using this hack thinking it shows how frequently your user is surfing around the board looking at people's posts.. you are mistaken.

I don't think you had read this hack.
$personal= 2*$userinfo[posts]+$personal0[personalviews];

ShadowTech 07-12-2001 06:54 AM

Quote:

Originally posted by ztsky


I don't think you had read this hack.
$personal= 2*$userinfo[posts]+$personal0[personalviews];

this is the same exact code I edited in my .php files to install this hack and that is how it works on my board. Anyone who views the thread increases the thread starters' views count.

ztsky 07-12-2001 07:10 AM

Quote:

Originally posted by ShadowTech


this is the same exact code I edited in my .php files to install this hack and that is how it works on my board. Anyone who views the thread increases the thread starters' views count.

Code:

Anyone who views the thread increases the thread starters' views count.
Do you think it not good to count as this?
You can cancell this .
just use:
$personal= 2*$userinfo[posts]+$personal0

ShadowTech 07-12-2001 07:29 AM

I'm not saying it's a bad hack or anything.. just pointing out to those people who think this tracks a user's activity that it in fact doesn't with the default scripting.

I am not too familiar with the code variables on this board.. but I don't doubt it would just take a simple change to track the actual user's specific views.

webhost 07-13-2001 03:28 PM

Ztsky
I have added this hack also which counts total page views for the entire board. You can see at the top of board at http://forums.realwebhost.net When I add the numbers from members from your personalpage view hack your number is around 300 views higher. How would I correct the total count in your hack to reduce the count by 300?

http://vbulletin.com/forum/showthrea...5&pagenumber=1

ztsky 07-13-2001 04:43 PM

Quote:

Originally posted by webhost
Ztsky
I have added this hack also which counts total page views for the entire board. You can see at the top of board at http://forums.realwebhost.net When I add the numbers from members from your personalpage view hack your number is around 300 views higher. How would I correct the total count in your hack to reduce the count by 300?

http://vbulletin.com/forum/showthrea...5&pagenumber=1

$personal= 3*$userinfo[posts]+2$personal0[personalviews];
edit this code,you can figure your own,like:
$personal= $userinfo[posts]+$personal0[personalviews];
or:
$personal= 1/2*$userinfo[posts]+$personal0[personalviews];

webhost 07-13-2001 06:59 PM

member.php Where in here nothing matchs what you posted showthread below.

Thanks Joey

// Find out how much personal glamour does this user has
$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;
// end Findhow much personal glamour

showthread.php

$onlinestatus="";
}
$personal0 = $DB_site->query_first("

SELECT SUM(views) AS personalviews FROM thread WHERE postuserid='$userinfo[userid]' AND open!='10'");

$personal= 2*$userinfo[posts]+$personal0[personalviews];

if ($personal0 == ""):

$personal0 = "0";

endif;

ztsky 07-17-2001 02:57 PM

Hi! webhost
1??**********Edit member.php
**********FIND
Code:

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

**********AFTER THIS,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;


2??*************editTemplate getinfo
*******FIND
Code:

<tr>
<td bgcolor="#DFDFDF"><normalfont><b>Total Posts:</b></normalfont></td>
<td bgcolor="#DFDFDF"><normalfont>$userinfo[posts] ($postsperday posts per day)</normalfont></td>
</tr>
<tr>
<td bgcolor="#F1F1F1"><normalfont><b>Last Post:</b></normalfont></td>
<td bgcolor="#F1F1F1"><normalfont>$lastpostdate $lastposttime<br><a href="$lastposturl">$lastposttitle</a>$nolastpost</normalfont></td>
</tr>

********AFTER THIS CODE,ADD:
Code:

<tr>
<td bgcolor="#DFDFDF"><normalfont><b>Start Threads:</b></normalfont></td>
<td bgcolor="#DFDFDF"><normalfont>$starts </normalfont></td>
</tr>
<tr>
<td bgcolor="#F1F1F1"><normalfont><b>Personal Views:</b></normalfont></td>
<td bgcolor="#F1F1F1"><normalfont><b>$personal </b></normalfont></td>
</tr>

3??**********Edit SHOWTHREAD.PHP
**********FIND
[CODE] //$post[message].=$post[signature]; [CODE]
**********AFTER THIS,ADD
Code:

// Find out how many threads this user has started
$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;

4??**********Edit template POSTBIT
*********FIND:
Code:

<smallfont>Registered: $post[joindate]<br>
Location: $post[field2]<br>
Posts: $post[posts]</smallfont></td>

*******replace it with :
Code:

<smallfont>Registered: $post[joindate]<br>
location: $post[field2]<br>
posts: $post[posts]<br>
personalviews:$personal </smallfont></td>


that's all.

webhost 07-17-2001 03:37 PM

ztsky

ok I reinstalled per your instructions above this is what I have.

Total page views of all members from your hack shows 9602.

My total views shows 9280 a difference of 322. So based on your script above what do I change to subract your count by 322 views?

Joey

webhost 07-17-2001 03:45 PM

ztsky

I don't know how hard it would be for you to do but the best thing would to be somehow take your hack count numbers of personalpageviews and total them up. That way you could use that number for total views of the entire site instead of using the other hack for total views. That way they would always match.


All times are GMT. The time now is 09:46 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.02124 seconds
  • Memory Usage 1,856KB
  • 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
  • (18)bbcode_code_printable
  • (2)bbcode_php_printable
  • (15)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
  • (40)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