What This Plugin Does
Smart Arbor Statistics lets you:
Add one or more Arbor export endpoints.
Optionally attach Basic auth credentials per endpoint.
Fetch JSON data from Arbor and store each leaf value in the database.
Output any stored value using a shortcode ID.
Build calculated values using a math shortcode.
Admin Menu
After activation, go to:
Arbor Statistics > EndpointsArbor Statistics > Values & Shortcodes
Endpoints Page
Use this page to create and manage Arbor data sources.
Add a New Endpoint
Go to
Arbor Statistics > Endpoints.Click
+ Add New.Complete the form:
Label: A friendly name for this feed.
Arbor Export URL: Full JSON export URL from Arbor.
Basic Auth Token (optional): The Base64 token value that comes after
Basicin the header.Active: If enabled, the endpoint is included in automatic daily refresh.
Click
Save Endpoint.Click
Refreshto fetch data immediately.
Endpoint Actions
Refresh: Fetch this endpoint now and update stored values.
Edit: Update label, URL, auth token, or active status.
Delete: Remove the endpoint and all values linked to it.
Refresh All Active: Runs refresh for active endpoints from the list.
Values & Shortcodes Page
This page lists all stored values generated from endpoint JSON responses.
Each row shows:
ID (used by shortcode)
Endpoint label
JSON key path (dot notation)
Current value
Last updated timestamp
Ready-to-copy shortcode
You can filter values by endpoint and delete individual value rows.
Shortcodes
1) Output a Stored Value
JavaScript[arbor-data-export id="123"]Optional attributes:
JavaScript[arbor-data-export id="123" decimals="0" prefix="£" suffix=" pupils" fallback="N/A"]Attributes:
id(required): Stored value ID.decimals(optional): Number formatting for numeric values.prefix(optional): Text before value.suffix(optional): Text after value.fallback(optional): Returned if ID is missing or value is empty.
2) Math Shortcode (Content Form)
JavaScript[arbor_math decimals="0"]
([arbor-data-export id="1"] + [arbor-data-export id="2"]) / 2
[/arbor_math]3) Math Shortcode (Inline Attribute Form)
JavaScript[arbor_math math='[arbor-data-export id="1"] / [arbor-data-export id="2"] * 100' decimals="1" suffix="%"]Use opposite quote styles when nesting shortcodes in the math attribute.
Math Rules Supported
The evaluator supports:
Operators:
+,-,*,/,%Multiplication aliases:
x,X,×Parentheses:
( ... )Implicit multiplication:
2(3+4)and(2+3)4Unicode variants for minus/divide/percent/full-width parentheses
Behavior notes:
Division by zero returns
0.Modulo by zero returns
0.Non-math characters are ignored where possible.
Refresh Behavior
Manual
Refreshfetches immediately.Automatic refresh is scheduled daily (
sas_daily_refresh).Endpoints are refreshed at most once per ~23-hour window in automatic runs.
Authentication Notes
This plugin uses Basic auth token value.
If your token is:
JavaScriptBasic abc123...Enter only:
JavaScriptabc123...Do not include the word Basic in the token field.