Firefox PHP

Views Hack v2 Finished, Tested, and working

Posted by Vulpes 
This good hack was done by Simen Brekken(simen@portalen.no)
I tested it change directions a bit.
Exampe you can see in this Phorum.
For right now it's working only with MySQL soon it will be adapted to PostgreSQL.
.txt file in attachment

It was tested and worked using Phorum 3.2.1 with PHP 4.0.3 and MySQL 3.23.24-beta on f2s (www.f2s.com) free hosting.
If you got it working with other versions of Phorum and MySQL plz write in this topic
If you adapted this hack to work with PostgreSQL or other databases plz also write about it here
Attachments:
open | download - ViewsHack.txt (8.7 KB)
Pease, Wrote if you got it work or if you not, also wrote with what PHP/MySQL/PostgreSQL version you done it
What is the VIEW hack ?
Not even the docs mention it!
John wrote:
>
> What is the VIEW hack ?
> Not even the docs mention it!

It counts how many times a page was viewed.
hell, this topic was viewed 400 times, and nobody make it work, or everybody can't find 2min to post in what server's, PHP version etc?!? :(

I don't belive it. Help me out.
Great thanks to you who made the hack. It worked very well for me, PHP 4.0.x + MySQL on FreeBSD. My forums now has a cool hit counter for each message :-) Thanks.

[BibleRussia.org] (in Russian)
I'm using
PHP4
MySQL
Debian Linux

It seems to be working just fine. The directions were clear. The only thing I had trouble with was putting the Views column in the right place. I was able to figure it out without too much trouble though!

BTW, I viewed this thread at least 3 times before I actually implemented the hack... so that may explain part of the reason why you have so many views and not so many responses. A lot of the people may not be implementing the hack just yet. I decided to wait until I had more time :)

[atozteacherstuff.com]

THANKS!
tnx for response!
Is there a working version for Release 3.2.11? I would like to implement this great hack but guess I would run into lots of problems since it's made for 3.2.1...

- St…le
I should have mentioned that I am using the latest release: 3.2.11 - and it works.
Worked great for me!! Thanks!

phorum 3.2.11
php 4.0.2
Rocks!
March 13, 2001 06:26PM
This hack rocks! Humm... but I was wondering if this puts much more of a demand on the server. I don't know if its me or what but my servers performance seems slow today.

Thanks for the hack!

-Phil
Older Messages.
March 15, 2001 03:13AM
I was wondering what happend to the older messages nave element when I added the views hack to my phorum. I love the views hack but I'd like to be able to look at my older messages too. The problem is only in the collapsed mode. Is it me?

Thanks for the hack!

-Phil

p.s. My Phorum has 29,000+ messages in my main Phorum and "older messages" still isn't visible.
Re: Older Messages.
March 15, 2001 03:58AM
Interesting.

2. Modify db/mysql.php (this will make sure all new forums get the extra views column):

I am sorry, but db/mysql.php only contains an include to sybase.php
sybase.php does NOT include this line:

$sSQL="CREATE TABLE $table_name (id bigint(20) unsigned DEFAULT '0' NOT NULL, datestamp datetime DEFAULT

I searched the files for keywords such as bigint, but nothing. Why is this? I have Forum 3.2.11
Re: Older Messages.
March 15, 2001 05:25AM
You opened not mysql.php, but mssql.php, look better.
Re: Older Messages.
March 15, 2001 05:28AM
I have no problems, and there shouldn't be any problems with list.php, because you don't edit HTML when you installing it.
weird.
March 15, 2001 08:04AM
Its weird! I only have this problem on my biggest of 20+ phorums! I'm not sure what to do. I'm sorry I feel like an idiot. Could anyone offer a suggestion?

Thank you.

-Phil
Re: weird.
March 15, 2001 03:48PM
Reinstall, or send me your list.php, i'll look at it, also threads.php.
Re: weird.
March 16, 2001 07:13AM
Adding views hack to an existing forum

ALTER TABLE exe ADD views INT(7) DEFAULT '0';

exe is the database name. DO I type the above command at my Mysql> prompt?
I keep getting Error 1046: No database selected

I am not sure what to do!
dan
Re: weird.
March 16, 2001 08:10AM
i put in the views and got it install perfectly. good, clear cut instructions. BUT! .. always a but, isnt there? ... When i collapse my threads, i dont see a Views anymore. i see the column with the numbers but not the top header that should say "views" .. only when i have the threads all collapsed though..

any ideas?

[www.wickednet.org]
Sorry, you do not have permission to post/reply in this forum.