Counter

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Freecode
Registered User
Posts: 11
Joined: Wed Jun 25, 2003 2:21 am
Contact:

Counter

Post by Freecode » Mon Jul 19, 2004 5:34 am

Is there souch mod that counts visitors daily and w/e. Just like you would have a counter on your website.?
(if it already exists please point it out)

Freecode
Registered User
Posts: 11
Joined: Wed Jun 25, 2003 2:21 am
Contact:

Post by Freecode » Mon Jul 19, 2004 11:04 am

anyone?

EDF
Registered User
Posts: 27
Joined: Sun Jul 18, 2004 12:41 pm

Post by EDF » Mon Jul 19, 2004 10:48 pm

Yes there is, I have it here located on my hardrive. It add's the counter were you forum stats are located were it says members online etc. It's very simple to install and looks very neat, but does require you also upload a MySQL file using your PHP Admin tools located on your server to add to your database.

I created a separate MySQL file from the mod code so you can simply use php admin to locate the mysql file on your hardrive ans upload it to your database to add very easily.

Download here from my server: Forum Counter

EDIT: Don't install that yet till I get some answers to my question below!
Last edited by EDF on Thu Jul 22, 2004 7:57 am, edited 2 times in total.

EDF
Registered User
Posts: 27
Joined: Sun Jul 18, 2004 12:41 pm

Post by EDF » Mon Jul 19, 2004 11:04 pm

MMmmmmmmm

Looking at my SQL file below I created I think I've overlooked something. Check this out below.

Code: Select all

#-----[ SQL QUERY ]------------------------------------- 
# Replace phpbb_ with your table prefix 
# Replace '1' with your wised starting value 
# 
INSERT INTO phpbb_config (config_name, config_value) VALUES ('visit_counter', '1');
It says replace "phpbb_" with your table prefix, can anybody shed a bit more light as an example regarding what this means. And what should be put there as an example. Give me an example of what the full mysql file should look something like with the changes in place.

I have already installed the counter using that code and the counter seemed to work fine, so I need a bit more explanation please.

ayusuf
I've Been Banned!
Posts: 917
Joined: Fri Feb 06, 2004 11:00 pm
Location: Orlando,Fl
Contact:

Post by ayusuf » Tue Jul 20, 2004 1:34 am

Like in the beginning of a phpBB installation if you upload the files yourself. you have to create a database table name prefix. The prefix can be phpbb_ bb_ forum_ but most likely if you did it with cpanel your prefix will be phpbb_ . 2 cents.

EDF
Registered User
Posts: 27
Joined: Sun Jul 18, 2004 12:41 pm

Post by EDF » Tue Jul 20, 2004 1:55 am

You mean the name of the MySQL Database I created. For example my database is not called "php_name" mine is called "gbnw_phpbb2" as an example.

So when I installed the forum for the first time, it asked for the database title to entered. I used this an an example: gbnw_phpbb2

Is that what you mean and if so how do I make the changes in the code, give ma an example please of what my SQL file should look like.

ayusuf
I've Been Banned!
Posts: 917
Joined: Fri Feb 06, 2004 11:00 pm
Location: Orlando,Fl
Contact:

Post by ayusuf » Tue Jul 20, 2004 1:59 am

see my database name prefix is phpbb_ i just kept that.

Code: Select all

INSERT INTO phpbb_EDF (config_name, config_value) VALUES ('visit_counter', '1');
I don't know ur db name. but let me just get a scrnshot of your phpmyadmin and i can tell you.

EDF
Registered User
Posts: 27
Joined: Sun Jul 18, 2004 12:41 pm

Post by EDF » Tue Jul 20, 2004 2:05 am

I may be a little confused here, because if I use my Control Panel and go into my MySQL settings etc. If I create a new MySQL Database to use for the forum. Even thoough I may choose this name for the database "phpbb2". Once the database is created it would show as "gbnw_phpbb2" because it puts my Control Panel login name in front of the "phpbb2" bit. So I never see the "php_" bit in front of the database name, the only place I see "php_" for example is if I go into "My phpAdmin" and then I can see loads of files in my database like "php_config" for example, and all the other files in my database all start with "php_". But the MySQL Database itself would not be named "php_phpbb2", but instead "gbnw_phpbb2" because it always puts my login name before the database name I choose.

EDF
Registered User
Posts: 27
Joined: Sun Jul 18, 2004 12:41 pm

Post by EDF » Tue Jul 20, 2004 2:17 am

As an example I just looked at my "PHPAdmin" tools were all the forums files can be viewed inside my database itself, and in big black bold letters at the top of the page it says: Database gbnw_phpbb2 running on localhost

So does that mean my code should look like this below:

Code: Select all

INSERT INTO gbnw_phpbb2 (config_name, config_value) VALUES ('visit_counter', '1');
If that's correct above, do I also not have to change the the "NAME" bit in the line that says "config_name"

EDF
Registered User
Posts: 27
Joined: Sun Jul 18, 2004 12:41 pm

Post by EDF » Thu Jul 22, 2004 7:04 am

Any chance anybody can read this thread and give me the answers I need. I know it a simple answer I need from somebody who knows.

RDC
Registered User
Posts: 92
Joined: Tue Jun 01, 2004 3:49 pm
Contact:

Post by RDC » Thu Jul 22, 2004 7:26 am

EDF wrote: MMmmmmmmm

Looking at my SQL file below I created I think I've overlooked something. Check this out below.

Code: Select all

#-----[ SQL QUERY ]------------------------------------- 
# Replace phpbb_ with your table prefix 
# Replace '1' with your wised starting value 
# 
INSERT INTO phpbb_config (config_name, config_value) VALUES ('visit_counter', '1');
It says replace "phpbb_" with your table prefix, can anybody shed a bit more light as an example regarding what this means. And what should be put there as an example. Give me an example of what the full mysql file should look something like with the changes in place.

I have already installed the counter using that code and the counter seemed to work fine, so I need a bit more explanation please.


It meens that the prefix of all the tables phpBB uses start with phpbb_*name of table* (eg: phpbb_users, phpbb_forums, ...)
phpbb_config is the table it will change and config_name and config_value are the columns that will be changed into that table.

you should have this table but perhaps you chose another prefix.

EDF
Registered User
Posts: 27
Joined: Sun Jul 18, 2004 12:41 pm

Post by EDF » Thu Jul 22, 2004 7:31 am

If I go into my database on my host using "My phpadmin" tool, there is a left hand scrolling colum that displays all the files inside my forums database. They all start with "php_", and I can see files there like "php_config" for example.

So does that mean I can leave things unchanged in the MySQL file?

RDC
Registered User
Posts: 92
Joined: Tue Jun 01, 2004 3:49 pm
Contact:

Post by RDC » Thu Jul 22, 2004 7:41 am

EDF wrote: If I go into my database on my host using "My phpadmin" tool, there is a left hand scrolling colum that displays all the files inside my forums database. They all start with "php_", and I can see files there like "php_config" for example.

So does that mean I can leave things unchanged in the MySQL file?


No you have to modify the MOD!

Code: Select all

#-----[ SQL QUERY ]------------------------------------- 
# Replace phpbb_ with your table prefix 
# Replace '1' with your wised starting value 
# 
INSERT INTO phpbb_config (config_name, config_value) VALUES ('visit_counter', '1');
Yours should be like this:

Code: Select all

INSERT INTO php_config (config_name, config_value) VALUES ('visit_counter', '1');
That would do the trick.

EDF
Registered User
Posts: 27
Joined: Sun Jul 18, 2004 12:41 pm

Post by EDF » Thu Jul 22, 2004 7:43 am

OK, thanks for that I understand now! :)

RDC
Registered User
Posts: 92
Joined: Tue Jun 01, 2004 3:49 pm
Contact:

Post by RDC » Thu Jul 22, 2004 7:46 am

Please can you look at your server!
File isn't there and I'm interested in that file.

Let me know if it's available for download.

Greetz

Post Reply

Return to “[2.0.x] MOD Requests”