Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

PHP post counter

Name: Anonymous 2010-01-18 15:19

Hey /b/oys.

Ive made a bbs in PHP but i need a post counter on it. how would one go about inserting a post counter into the PHP script??

Name: Anonymous 2010-01-18 15:25

postcount++;

Name: Anonymous 2010-01-18 15:31

>>1
/b/oys
Where exactly do you think you are?

Name: Anonymous 2010-01-18 15:34

<?php echo "here be a post counter;" ?>

Name: Anonymous 2010-01-18 16:05

Well, you're storing posts somewhere, right?  How about you count them?

Name: Anonymous 2010-01-18 17:42

Strange name for a counter, but here you go:
(define make-counter
  (let ((n 0)
        (inc (λ(x) (+ 1 x))))
    (λ()
      (λ()
        (set! n (inc n))
        n))))

(define php-counter (make-counter))

Name: Anonymous 2010-01-19 3:57

<?/*
/*************************************\
* COUNTER SCRIPT v2.3                 *
***************************************
* DO NOT USE WITHOUT ASKING ME FIRST. *
***************************************
* (C) 2004 XDEVPUPPY234X @ HOTMAIL . COM *
*/

$var1 = 'PUT NUMBER HERE';
function do_c($var1){
if($var1 == 'PUT NUMBER HERE') {
die('WRONG NUMBER!');
}
global $var1;
$COUNTER= 0;
$looper=array_fill($COUNTER, $var1, $COUNTER);
foreach($looper as $loopy) { // HEHE :P
if($counter < $var1) {
//if($counter == 1) {echo "COUNTING 1!";
//if($counter == 2) {echo "COUNTING 2!";
//if($counter == 3) {echo "COUNTING 3!";
//if($counter == 4) {echo "COUNTING 4!";
//if($counter == 5) {echo "COUNTING 5!";
//if($counter == 6) {echo "COUNTING 6!";
//if($counter == 7) {echo "COUNTING 7!";
//if($counter == 8) {echo "COUNTING 8!";
//if($counter == 9) {echo "COUNTING 9!";
  if($counter == $var1) { echo "DONE!";
} else { echo "COUNTING!";
echo $counter; // PHEW, MUCH BETTER! THANKS DARKXXSONIC!
echo "<BR>";
}
$counter =$counter+++1; // FIXED 10-09-04
}
}// if($counter == $var1)
return $var1;
}
/***************\
* CODE COMPLETE*
\***************/
?>

Name: Anonymous 2010-01-22 9:40

>>7
Oh God I lol'd so hard

Name: Anonymous 2010-01-22 13:13

>>7
Brilliant\(°∀°)ノ

Name: Anonymous 2010-01-22 13:23

>>7
PHP QUALITY

Name: Anonymous 2010-01-22 14:59

>>7
I've worked with a "web developer" before. This isn't far from reality.

And OP, if you want a serious answer, read the futaba source code.

Name: Anonymous 2010-01-22 15:50

You want to count posts in a thread?

Have you tried mysql_num_rows($shittyMySQLresourceGoesHere) ? Assuming of course you were smart enough to store threads in MySQL that is, of course.

Name: Anonymous 2010-01-22 15:52

>>7
Dear god, I rofl'd so hard I heard something pop

Name: Anonymous 2010-01-22 15:57

>>13

You should probably see a doctor about that.

Name: Anonymous 2010-01-22 16:00

POP MY CHERRY ANUS

Name: Anonymous 2010-01-22 16:07

>>12
smart
mysql
faceface.face

Name: Anonymous 2010-12-10 1:05

Name: Anonymous 2011-02-03 5:11

Name: Miu Miu taschen 2011-09-08 7:39


Wow, this list is great! There are so much things that I really need to learn how to do, but just not doing them. It is time for

me to stop procrastinating and give the list a try.

Name: Anonymous 2013-07-13 17:39

[# ][code][u][i][o][b][aa][m][sup][sub][rem][spoiler][math]HA HA HA I HAVE MASTERED Le [/math][/spoiler][/rem][/sub][/sup][/m][/aa][/b][/o][/i][/u][/code][/# ]

Don't change these.
Name: Email:
Entire Thread Thread List