PDA

View Full Version : [Addon for glamour hack by ztsky]


DeadlyMax
06 Jul 2001, 23:41
his post can de found here:
http://www.vbulletin.com/forum/showthread.php?threadid=17116

i wanted to add another feature
all credits go to ztsky i dont want any of em..

ok here we go:
---------------------

this will add Personal Views to the posts
image:
http://24.132.14.110/images/personalviews.jpg


in showthread.php

Find:

$onlinestatus="";
}


Below that add:

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


then edit template postbit:

Find:

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

Replace that with:

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

that should do the trick ;)
have fun

Martz
07 Jul 2001, 01:29
Wow, so simple yet so impressive :)

Thanks a lot :)

OrangeFaygo
07 Jul 2001, 04:29
Do I place the code:

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

Does that go before the } or after the }

DeadlyMax
07 Jul 2001, 04:38
Originally posted by OrangeFaygo
Do I place the code:

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

Does that go before the } or after the }

after the }

OrangeFaygo
07 Jul 2001, 05:01
It is not working for me no matter what I do, I run version 2.0 and have edited everything but nothing shows.

DeadlyMax
07 Jul 2001, 05:29
weird are u sure u did it in showthread.php and edited the template?

and do you have icq its easier to talk

OrangeFaygo
07 Jul 2001, 06:49
I had someone do it for me, seems I misplaced some of the coding or erased it. Had to re-upload it and we got it all starightened out. There is one thing thoughm can you tell me much about the actual glamor hack? I the same person that installed yours install mine also and he could not get it to work - installed it in the right place, code has been edited and everything, but it is not working right. Edited the member.php and the template asked.

I have AIM: ProgramXnet

Sorry about not having ICQ, I have had a lot of people send me crap I never want or ask for so it is gone, I hardly ever have that happen on AIM.

Thanks.

Martz
07 Jul 2001, 15:54
is there any reason this line is included?

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

I'd prefer to use
$personal= $personal0[personalviews]; ;)

ztsky
07 Jul 2001, 16:11
Oh,thank you.
I have this feature a month ago.
look this:
http://tsing.com/vb/showthread.php?threadid=1742
But in my before post here ,I didn't re-release it.
To reach this feature,just do some edit in showthread.php as done in member.php,postbit as getinfo.:)
but you have done it.:)

in my forum I have release it at 05-21-2001 10:36 AM
http://tsing.com/vb/showthread.php?threadid=836
this is the post in Chinese:
第 1 帖 [RELEASE personal glamour FOR VB2]
中文就是个人魅力HACK——作者:ztsky本人
是统计一个会员是否积极参与论坛及他在论坛受到关注的程度,方便管理员管理,名字你随 便想,你叫个人魅力可以,叫论坛积分可以,叫+验值也可以。
我在VB论坛参与的讨论请见:http://www.vbulletin.com/forum/show...?threadid=17116
演示
如果转载,请注明出处~!

1、修改 member.php
查找eval("\$birthday = \"".gettemplat("getinfo_birthday")."\";");
}
在下面加
// 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;
// end Find threads
// 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
2、编+ 膜版 User Info Display Templates 中的getinfo

<tr>
<td bgcolor="#efefef"><normalfont>发帖数量:</normalfont></td>
<td bgcolor="#efefef"><normalfont>$userinfo[posts] (每天 $postsperday 帖)</normalfont></td>
</tr>
下面加
<tr>
<td bgcolor="#f7f7f7"><normalfont>发起主题:</normalfont></td>
<td bgcolor="#f7f7f7"><normalfont>$starts</normalfont>
</td></tr>
<!-- User personal glamour-->
<tr>
<td bgcolor="#efefef"><normalfont>个人魅力</normalfont></td>
<td bgcolor="#efefef"><normalfont>$personal</normalfont>
</td>
</tr>
<!-- End User personal glamour -->

3、修改 SHOWTHREAD.PHP
查找//$post[message].=$post[signature];
在后面加上
// 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;
// end Find threads
// 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
4、修改摸版 POSTBIT

来自: $post[field2]<br>
发帖数量: $post[posts]</smallfont></td>
改为
来自: $post[field2]<br>
发帖数量: $post[posts]<br>
个人魅力:$personal </smallfont></td>

webhost
10 Jul 2001, 20:58
Is it possible to add this also to the user profile under last online
below in the jpg.

Joey



https://www.vbulletin.org/forum/

ztsky
10 Jul 2001, 21:53
Originally posted by webhost
Is it possible to add this also to the user profile under last online
below in the jpg.

Joey



http://www.realwebhost.net/images/personalviewadd.jpg

yes ,you can install the last online too.
just edit the getinfo template.

webhost
11 Jul 2001, 02:52
Just add this in the getinfo template?

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

ztsky
11 Jul 2001, 07:04
Originally posted by webhost
Just add this in the getinfo template?

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

plz read the install.txt.
IF you have install the last online hack and this hack.you should edit you getinfo template:
FIND:

<tr>
<td bgcolor="#efefef"><normalfont>last online </normalfont></td>
<td bgcolor="#efefef"><normalfont>$lastonline</normalfont>
</td>
</tr>

AFTER THIS,ADD:
<!-- User personal glamour-->
<tr>
<td bgcolor="#efefef"><normalfont>personalviews</normalfont></td>
<td bgcolor="#efefef"><normalfont>$personal</normalfont>
</td>
</tr>
<!-- End User personal glamour -->

webhost
11 Jul 2001, 09:30
Still have A problem, here's how I put code in and how it looks total not showing up. Also could you post new zip file with code changes and instructions, I am using 2.0.1, can not make out all the code in your previous posts. Thanks here's the code.

</tr>
<!-- Start Last Online -->
<tr>
<td bgcolor="{secondaltcolor}"><normalfont><b>Last Online:</b></normalfont></td>
<td bgcolor="{secondaltcolor}"><normalfont> $lastonline_time $lastonline_date</normalfont></td>
</tr>
<!-- End Last Online -->
<!-- User personal glamour-->
<tr>
<td bgcolor="{firstaltcolor}"><normalfont>Personalviews</normalfont></td>
<td bgcolor="{firstaltcolor}"><normalfont>$personal</normalfont>
</td>
</tr>
<!-- End User personal glamour -->
<tr>
<td bgcolor="{secondaltcolor}"><normalfont><b>Contact $userinfo[username]:</b></normalfont></td>

go to my board and look at someone's profile. Panelviews shows up under last online but no number shows up in the column to the right of panelviews in the same row.

Joey

ztsky
11 Jul 2001, 10:07
1、**********Edit member.php
**********FIND
eval("\$birthday = \"".gettemplat("getinfo_birthday")."\";");
}
**********ADD AFTER THIS,ADD
// 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;
// end Find threads
// 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


2、*************editTemplate getinfo
*******FIND
<tr>
<td bgcolor="{secondaltcolor}"><normalfont><b>Total Posts:</b></normalfont></td>
<td bgcolor="{secondaltcolor}"><normalfont>$userinfo[posts] ($postsperday posts per day)</normalfont></td>
</tr>
<tr>
<td bgcolor="{firstaltcolor}"><normalfont><b>Last Post:</b></normalfont></td>
<td bgcolor="{firstaltcolor}"><normalfont>$lastpostdate $lastposttime<br><a href="$lastposturl">$lastposttitle</a>$nolastpost</normalfont></td>
</tr>
********AFTER THIS CODE,ADD:
<tr>
<td bgcolor="{secondaltcolor}"><normalfont><b>Start Threads:</b></normalfont></td>
<td bgcolor="{secondaltcolor}"><normalfont>$starts </normalfont></td>
</tr>
<tr>
<td bgcolor="{firstaltcolor}"><normalfont><b>Personal Views:</b></normalfont></td>
<td bgcolor="{firstaltcolor}"><normalfont><b>$personal </b></normalfont></td>
</tr>

3、**********Edit SHOWTHREAD.PHP
**********FIND
//$post[message].=$post[signature];
**********AFTER THIS,ADD
// 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;
// end Find threads
// 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
4、**********Edit template POSTBIT
*********FIND:
<smallfont>Registered: $post[joindate]<br>
Location: $post[field2]<br>
Posts: $post[posts]</smallfont></td>
*******replace with this code:
<smallfont>Registered: $post[joindate]<br>
location: $post[field2]<br>
posts: $post[posts]<br>
personalviews:$personal </smallfont></td

webhost
11 Jul 2001, 10:15
Thanks For posting so quick. I got it working has you were posting. But I installed like your zip file in the first thread of the other thread. The one that does not have the activity stuff in it. What does the activity stuff add to your feature from the first thread?

Joey

ztsky
11 Jul 2001, 10:28
Originally posted by webhost
Thanks For posting so quick. I got it working has you were posting. But I installed like your zip file in the first thread of the other thread. The one that does not have the activity stuff in it. What does the activity stuff add to your feature from the first thread?

Joey

In this hack you can see:
$activity01= $userinfo[posts]-$starts;
$activity02= $starts;
$activity03= $personal0[personalviews];
$personal= 3*$activity02+2*$activity01+$activity03;


$activity01 is a stuff that the user's replies to others.

$activity02 is a stuff that the user start threads.
$activity03 is a stuff that the threads started by this user have been viewed by others .

$personal is a value that above.you can difinite the
$personal= 3*$activity02+2*$activity01+$activity03;
as you like.

webhost
11 Jul 2001, 10:52
Ok got the new code installed. Can you go to my board and see if it looks right? In the user profile and the showthread.

Joey
guest username is newguy password is hackman

ztsky
11 Jul 2001, 18:20
Originally posted by webhost
Ok got the new code installed. Can you go to my board and see if it looks right? In the user profile and the showthread.

Joey
guest username is newguy password is hackman

aha!
It works well.

webhost
11 Jul 2001, 18:25
Thanks

webhost
12 Jul 2001, 05:23
My have a problem with this script. This is what I have noticed.

It seems if a registered used post's or replies to thread the personalviews show;s a total for them. But if a registered user does post a thread or reply to any his views or not showing up in the members profile area. They all have zero's. I watched 3 members tonight view alot of threads but there personalview count stayed at zero. Then one of them replied to a message and then every time he view a thread it totaled in his personalviews like it should.

Any answers why this would act like this? Kinda have the same problem with the last online hack. The other 10 to 12 hacks I have installed all work fine.

Joey

webhost
12 Jul 2001, 05:48
All members that have 0 posts show 0 personalviews even though they have viewed alot of pages. I have one member that has not been on the board since April. When that member was on the board it was only for 1 day. They made 4 or 5 posts. That member shows to have 172 personal views. Why is this not showing total page views correctly. Can someone fix this please?

Joey

ztsky
12 Jul 2001, 08:02
Originally posted by webhost
All members that have 0 posts show 0 personalviews even though they have viewed alot of pages. I have one member that has not been on the board since April. When that member was on the board it was only for 1 day. They made 4 or 5 posts. That member shows to have 172 personal views. Why is this not showing total page views correctly. Can someone fix this please?

Joey

$personal= 3*$activity02+2*$activity01+$activity03;

YOU can edit it.
eample:
$personal= $activity02+*$activity01+$activity03;

or:

$personal= 2*$activity02+1*$activity01+2*$activity03;

webhost
12 Jul 2001, 12:14
That did not work, anyone with zero post's shows no personalviews although we know they have viewed pages.

Please help me to correct this error.

ztsky
12 Jul 2001, 13:02
Originally posted by webhost
That did not work, anyone with zero post's shows no personalviews although we know they have viewed pages.

Please help me to correct this error.

personalviews is the user's post be viewed by others!
Not his views on other's post!

webhost
12 Jul 2001, 13:12
ok understand, how would I add a option or hack say, that would show a total amount of viewed pages a member has?

ztsky
12 Jul 2001, 13:16
In Chinese,i said it's 个人魅力、个人积分。。。。
In English ,I think it can be named glamour or bonus

webhost
02 Aug 2001, 16:08
Ok I tried to move script from showthread to functions.php
I placed here. hack still works in member profile but does not
showup in showthread views. Iplaced here in functions but still not working any ideas how to fix this?


$post[avatar]="";
$post[profile]="";
$post[email]="";
$post[useremail]="";
$post[icqicon]="";
$post[aimicon]="";
$post[yahooicon]="";
$post[homepage]="";
$post[findposts]="";
$post[signature]="";
$onlinestatus="";
$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
}
// do ip addresses

illogicalx
02 Aug 2001, 16:11
so what about 2.0.3 is't work with it ??

webhost
02 Aug 2001, 16:14
that is the probelm I just upgraded to 2.0.3
It works in the member profile but it doesn't
work in the showthread view .

illogicalx
02 Aug 2001, 16:17
what i knew it shoud be like this

$post[aimicon]="";
$post[yahooicon]="";
$post[homepage]="";
$post[findposts]="";
$post[signature]="";
$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;



but it is not working :)

webhost
02 Aug 2001, 16:23
yea I tried that, I got error in my functions file, Maybe the
hack man will answer the qestion.

illogicalx
05 Aug 2001, 12:28
i hope some one can help us in this hack :(

we are waiting :D

webhost
05 Aug 2001, 13:28
these 2 need new placement in functions.php somewhere



$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





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

Kengan
09 Aug 2001, 23:10
Good Hack ! thanks ! ;)

webhost
10 Aug 2001, 00:14
ok if it was a good hack. What did you do with the showthread script, if you don't mind telling us