Support » Plugin: WP Statistics » Email Shows Text Not Values

  • Resolved UndeadEarth

    (@undeadearth)


    Before the 8.1.1 upgrade my email had the values configured via sections. After the upgrade I see the actual text:
    What I see in Email:
    • User Online: %user_online%
    • Today Visitor: %today_visitor%
    • Today Visit: %today_visit%
    • Yesterday Visitor:%yesterday_visitor%
    • Yesterday Visit: %yesterday_visit%
    • Total Visitor: %total_visitor%
    • Total Visit: %total_visit%

    What I see in Settings Page.

    <ul>
    <li>User Online: <code>%user_online%</code></li>
    <li>Today Visitor: <code>%today_visitor%</code></li>
    <li>Today Visit: <code>%today_visit%</code></li>
    <li>Yesterday Visitor:<code>%yesterday_visitor%</code></li>
    <li>Yesterday Visit: <code>%yesterday_visit%</code></li>
    <li>Total Visitor: <code>%total_visitor%</code></li>
    <li>Total Visit: <code>%total_visit%</code></li>
    </ul>

    Thank you for all your hard work. You guys have an awesome plug in and your support is second to none.

    Best regards,
    matt

    https://wordpress.org/plugins/wp-statistics/

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Contributor Greg Ross

    (@gregross)

    The old %var% format is no longer supported in version 8, instead replace them with the short codes (you can find the short code reference in the admin manual).

    The upgrade script should have converted them for you but looks like it didn’t for some reason.

    So I would replace message body paramaters such as —
    Input data: User Online: %user_online% Today Visitor: %today_visitor%

    with—
    Input data: User Online: usersonline Today Visitor: visitors

    or do I need to do something like—
    Input data: User Online: [wpstatistics stat=usersonline ] Today Visitor: [wpstatistics stat=visitors ]

    ?????
    Thanks. Jim

    I am struggling with the syntax as well, I thought I had the shortcode correct but it still comes out as text.

    Visit Data:
    <ul>
    	<li>Todays:<code> today</code></li>
    	<li>Yesterday: <code>yesterday</code></li>
    	<li>Yesterday: <code>yesterday</code></li>
    	<li>Month: <code>month</code></li>
    	<li>Year: <code>year</code></li>
    </ul>
    End Message

    I am now taking out the code tags to see if that works.

    Plugin Contributor Greg Ross

    (@gregross)

    The short codes are in the format of:

    [wpstatistics stat=usersonline time=today]
    [wpstatistics stat=visitors time=total]

    Ok. Thanks.
    from wps-install.php I found:
    $template_vars = array(
    ‘user_online’ => ‘[wpstatistics stat=usersonline]’,
    ‘today_visitor’ => ‘[wpstatistics stat=visitors time=today]’,
    ‘today_visit’ => ‘[wpstatistics stat=visits time=today]’,
    ‘yesterday_visitor’ => ‘[wpstatistics stat=visitors time=yesterday]’,
    ‘yesterday_visit’ => ‘[wpstatistics stat=visits time=yesterday]’,
    ‘total_visitor’ => ‘[wpstatistics stat=visitors time=total]’,
    ‘total_visit’ => ‘[wpstatistics stat=visits time=total]’,
    );
    and in the report body template, have manually replaced the %(text_on_left_side_of_arrow)% (including %’s) with brackets and text on right.
    For some reason it appears that the script did not run upon my upgrade to 8.1.1
    My report body template now looks like:
    Input data: User Online: [wpstatistics stat=usersonline]
    Today Visitor: [wpstatistics stat=visitors time=today]
    Today Visit: [wpstatistics stat=visits time=today]
    Yesterday Visitor: [wpstatistics stat=visitors time=yesterday]
    Yesterday Visit: [wpstatistics stat=visits time=yesterday]
    Total Visitor: [wpstatistics stat=visitors time=total]
    Total Visit: [wpstatistics stat=visits time=total]
    I will watch to see what happens today when the report comes.
    Perhaps removing and reinstalling would have fixed this automajically?

    Thanks for your work and your help Greg

    Plugin Contributor Greg Ross

    (@gregross)

    No, the upgrade code only runs when the version changes, it may have been fixed with the next update.

    please update correct setup information! I’ve read the comments above, but do now understand. Would be awesome if there was a simple way to copy/paste these things like I did with the older version.
    If you have done this, please let me know at georgie at tomm.nl.

    I actually still can’t get it to work. I updated to what I believe from this and other posts is the correct syntax, but still no luck 🙁

    Visit Data:

    `
    <ul>
    <li>Input data: User Online: [wpstatistics stat=usersonline]</li>
    <li>Today Visitor: [wpstatistics stat=visitors time=today]</li>
    <li>Today Visit: [wpstatistics stat=visits time=today]</li>
    <li>Yesterday Visitor: [wpstatistics stat=visitors time=yesterday]</li>
    <li>Yesterday Visit: [wpstatistics stat=visits time=yesterday]</li>
    <li>Month Visitor: [wpstatistics stat=visitors time=month]</li>
    <li>Total Visitor: [wpstatistics stat=visitors time=total]</li>
    <li>Total Visit: [wpstatistics stat=visits time=total]</li>
    </ul>

    `
    End Message

    Plugin Contributor Greg Ross

    (@gregross)

    %user_online%       = [wpstatistics stat=usersonline]
    %today_visitor%     = [wpstatistics stat=visitors time=today]
    %today_visit%       = [wpstatistics stat=visits time=today]
    %yesterday_visitor% = [wpstatistics stat=visitors time=yesterday]
    %yesterday_visit%   = [wpstatistics stat=visits time=yesterday]
    %total_visitor%     = [wpstatistics stat=visitors time=total]
    %total_visit%       = [wpstatistics stat=visits time=total]
    Plugin Contributor Greg Ross

    (@gregross)

    UndeadEarth: what do you see in the e-mail your receive?

    I see this in the email:

    Visit Data:
    • Todays: today
    • Yesterday: yesterday
    • Week: week
    • Month: month
    • Year: year
    End Message

    Plugin Contributor Greg Ross

    (@gregross)

    Can you send me a screenshot of your report configuration?

    tomm: Gebruiker Online: %user_online% Bezoeker Vandaag: %today_visitor% Bezoek Vandaag: %today_visit% Bezoeker Gisteren: %yesterday_visitor% Bezoek Gisteren: %yesterday_visit% Bezoeker Totaal: %total_visitor% Bezoek Totaal: %total_visit%

    Plugin Contributor Greg Ross

    (@gregross)

    georgiedekker: WP Statistics version 8 doesn’t support the old %% format, use the new short codes.

    that’s my question. what is the current working setup?
    please just post a public annunciation of the proper new way.

    thanks in advance.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Email Shows Text Not Values’ is closed to new replies.