DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • April 21, 2018, 09:53:19 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Counter  (Read 2638 times)
0 Members and 1 Guest are viewing this topic.
edorian
Guest
« on: July 06, 2005, 12:14:54 PM »

Hi there,

as it is impossible to Count anything using the module_setting (at least when u'r runnig a server with more then 10 users) correctly i made a little counter.

I think it's easy to handle but feel free to drop suggestions.

The Download is 3 files:

the Module : counter.php

it was no runnig code. It's just to install and remove the Table for the module and to check if the lib. file exists

the lib file : counter.php

provides 4 functions :

counter_insert($name,$inital_value)  
where you instert a new counter
(to call in the _install part of a module)


counter_remove($name)
where you remove a counter
(to call in the _uninstall part of a module


counter_get($name)

returns the count for that counter


counter_set($name , $value , $type='+')

here u change the counter
$type can be "+" , "-" and "="

where "+" is add , "-" is sub and "=" is set


the third file (testcounter.php) is the test file where i use all the functions and debug some output to the village.


the only thing to you need to care about is the
require_once("lib/counter.php");
when you use its functions.


Finally the download : http://lotgd.de/edorian/counter.tar


Feel free to drop comments, questions and suggestions.
« Last Edit: July 06, 2005, 12:18:09 PM by edorian » Logged
Freeze
Guest
« Reply #1 on: July 06, 2005, 12:22:36 PM »

Wrong place. you want to post that here.

http://dragonprime.net/index.php?board=17
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
22 Guests, 1 User
ChesireCat
Home Forums News Downloads Login Register Advanced Search