Support » Plugin: StatPress Visitors » StatPress_Print

  • Resolved mvmonroe

    (@mvmonroe)


    I want to use the number of total visitors output by StatPress_Print as a variable.

    Example:
    <?php $tvisits = print StatPress_Print(%totalvisitors%); ?>

    When I do this, it only outputs ‘1’ and not the actual number.

    <?php echo $tvisits; ?>

    What am I doing wrong? And no, I don’t want to use StatPress_Print to display the number.

    http://wordpress.org/plugins/statpress-visitors/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author luciole135

    (@luciole135)

    Try :
    <?php $tvisits = StatPress_Print(%totalvisitors%); ?>

    Thread Starter mvmonroe

    (@mvmonroe)

    That works perfect.

    But here is where I run into a problem:

    <?php
              $resetnum = 258;
              $tvisits = StatPress_Print(%totalvisitors%);
              echo $resetnum + $tvisits;
    ?>

    This only displays the reset number of 258 and not the total visitors plus the previous reset number of total visitors. This should be a much higher number.

    Plugin Author luciole135

    (@luciole135)

    Try :
    StatPress_Print(258+%totalvisitors%);

    Thread Starter mvmonroe

    (@mvmonroe)

    That comes out to look like:

    “258+93” and not added together… hmmm…

    Thread Starter mvmonroe

    (@mvmonroe)

    I even tried this:

    <?php $tvisits + StatPress_Print(%totalvisitors%); ?>

    That displays:

    “25893”

    Plugin Author luciole135

    (@luciole135)

    try :
    $tvisits =luc_StatPressV_Vars(%totalvisitors%);
    print(258+$tvisits);

    Thread Starter mvmonroe

    (@mvmonroe)

    That worked perfectly!

    This is what I have now:

    <?php $tvisits = luc_StatPressV_Vars("%totalvisitors%");
         $reset = 258;
         print number_format($reset+$tvisits);
    ?>
    Thread Starter mvmonroe

    (@mvmonroe)

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘StatPress_Print’ is closed to new replies.