PDA

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


07-05-2001, 10:00 PM
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-06-2001, 11:29 PM
Wow, so simple yet so impressive :)

Thanks a lot :)

OrangeFaygo
07-07-2001, 02:29 AM
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-07-2001, 02:38 AM
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-07-2001, 03:01 AM
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-07-2001, 03:29 AM
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-07-2001, 04:49 AM
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-07-2001, 01:54 PM
is there any reason this line is included?

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

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

ztsky
07-07-2001, 02:11 PM
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
07-10-2001, 06:58 PM
Is it possible to add this also to the user profile under last online
below in the jpg.

Joey



https://vborg.vbsupport.ru/

ztsky
07-10-2001, 07:53 PM
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
07-11-2001, 12:52 AM
Just add this in the getinfo template?

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

ztsky
07-11-2001, 05:04 AM
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
07-11-2001, 07:30 AM
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
07-11-2001, 08:07 AM
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
07-11-2001, 08:15 AM
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
07-11-2001, 08:28 AM
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
07-11-2001, 08:52 AM
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
07-11-2001, 04:20 PM
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
07-11-2001, 04:25 PM
Thanks

webhost
07-12-2001, 03:23 AM
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
07-12-2001, 03:48 AM
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
07-12-2001, 06:02 AM
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
07-12-2001, 10:14 AM
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
07-12-2001, 11:02 AM
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
07-12-2001, 11:12 AM
ok understand, how would I add a option or hack say, that would show a total amount of viewed pages a member has?

ztsky
07-12-2001, 11:16 AM
In Chinese,i said it's ¸öÈË÷ÈÁ¦¡¢¸öÈË»ý·Ö¡£¡£¡£¡ £
In English ,I think it can be named glamour or bonus

webhost
08-02-2001, 02:08 PM
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
08-02-2001, 02:11 PM
so what about 2.0.3 is't work with it ??

webhost
08-02-2001, 02:14 PM
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
08-02-2001, 02:17 PM
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
08-02-2001, 02:23 PM
yea I tried that, I got error in my functions file, Maybe the
hack man will answer the qestion.

illogicalx
08-05-2001, 10:28 AM
i hope some one can help us in this hack :(

we are waiting :D

webhost
08-05-2001, 11:28 AM
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
08-09-2001, 09:10 PM
Good Hack ! thanks ! ;)

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