+ Reply to Thread
Results 1 to 3 of 3

Thread: counter display question

  1. Join Date
    Aug 2005
    Posts
    2

    counter display question

    Is there a way to get counter-display to show up using php, like this
    Code:
    <?php 
    print !COUNTER-ONPAGE!;
    if (!COUNTER-ONPAGE!==1)
    { print " user"; }
    else
    { print " users"; }
    print " online";
    ?>
    instead of just using html and text?

  2. Join Date
    Aug 2004
    Posts
    781

    counter display question

    I suppose you could manually modify the script to act like this:

    Open counter.php:

    Find:
    $display = ereg_replace("!COUNTER-ONPAGE!", strval($this->online), $display);
    And replace it with (all one line):
    $display = ereg_replace("!COUNTER-ONPAGE!", strval($this->online) . (strval($this->online) == 1 ? " user" : " users"), $display);

  3. Join Date
    Aug 2005
    Posts
    2

    counter display question

    Thank you very much Patiek.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts