Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by eva2000 eva2000 is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-26-2001 Last Update: Never Installs: 24
 
No support by the author.

Who would ever think me releasing something

Being a newbie at php/mysql programming i had help from tutorials all over the place and from freakysid from SPF forums

1. MySQL based counter

You need:
1. phpmyadmin - http://sourceforge.net/projects/phpmyadmin/ -phpmyadmin install and use guide to add a table named mycounter to your existing vB database.

you need to select you vb database name listed in the left of phpmyadmin and run the following queries once in phpmyadmin
Code:
CREATE TABLE mycounter (count INT(11) UNSIGNED NOT NULL);
INSERT INTO mycounter SET count = 0;
i.e. if my vb database is named usertest you should enter like this the screen cap below or here.

2. need to edit your phpinclude template and add the following in:
PHP Code:
$result mysql_query("SELECT count FROM mycounter");
$mycounter mysql_result($result0) + 1;
$result mysql_query("UPDATE mycounter SET count = count + 1"); 
save changes

3. then place $mycounter in your footer template

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-28-2001, 04:08 AM
Ruth Ruth is offline
 
Join Date: Oct 2001
Posts: 171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

looks nice,

is there a demo?

and how does it work? based on logins? or specified ip adress?
Reply With Quote
  #3  
Old 08-28-2001, 04:10 AM
eva2000's Avatar
eva2000 eva2000 is offline
 
Join Date: Oct 2001
Location: Brisbane, Australia
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

based a raw pageview hits... you can see it working on my vB at the bottom of each page http://animeboards.com/

i'm still a newbie with php but working on it
Reply With Quote
  #4  
Old 08-28-2001, 04:24 AM
merk merk is offline
 
Join Date: Nov 2001
Location: Canberra, Australia
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A sugestion eva2k...

Im after a counter script myself, which yours is great for, but i need one to also record the HTTP_REFFERER, and useragent, and i dont really want to us webtrends :/

I could try to add these features for you if you want me to?
Reply With Quote
  #5  
Old 08-28-2001, 04:37 AM
eva2000's Avatar
eva2000 eva2000 is offline
 
Join Date: Oct 2001
Location: Brisbane, Australia
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by merk
A sugestion eva2k...

Im after a counter script myself, which yours is great for, but i need one to also record the HTTP_REFFERER, and useragent, and i dont really want to us webtrends :/

I could try to add these features for you if you want me to?
sure why not.. i'm planning to do this too but i have to learn how to do it first (it's only been 48 hrs since i started learning php )
Reply With Quote
  #6  
Old 08-28-2001, 04:51 AM
merk merk is offline
 
Join Date: Nov 2001
Location: Canberra, Australia
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ive done php for some time, but never have gotten around do doing anything of any importance :/
Reply With Quote
  #7  
Old 08-28-2001, 05:33 AM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Who would ever think me releasing something
That's a nice hack. I installed it.
Reply With Quote
  #8  
Old 08-28-2001, 03:25 PM
_
Guest
 
Posts: n/a
Default

lol eva

the counter on AB is just like a stopwatch almost, it goes up like 2 every second (3 if you include me =)
Reply With Quote
  #9  
Old 08-28-2001, 03:34 PM
Bane's Avatar
Bane Bane is offline
 
Join Date: Oct 2001
Posts: 411
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by merk
A sugestion eva2k...

Im after a counter script myself, which yours is great for, but i need one to also record the HTTP_REFFERER, and useragent, and i dont really want to us webtrends :/

I could try to add these features for you if you want me to?
In case anyone is interested, I am putting together something like this. You can view an example of the output at:

http://www.talkloud.net/forums/vbstats.php

As far as the referrer check

http://www.talkloud.net/forums/vbsta...ction=incoming
Reply With Quote
  #10  
Old 08-28-2001, 04:59 PM
dxb's Avatar
dxb dxb is offline
 
Join Date: Oct 2001
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi there eva

you did it at last

thanks for the counter

and Bane the stats look really great ....yes I'm intersted in and I will be waiting for if

but could you make it so that you can add it to a VB page and a non VB page if it's possible
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:26 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04806 seconds
  • Memory Usage 2,291KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete