Marcus
Well-known member
Most of that javascript, with the exception of some very minor data might be put into an external file:
PHP:
<script>
jQuery.extend(true, XenForo,
{
visitor: { user_id: 166 },
serverTimeInfo:
{
now: 1382694736,
today: 1382652000,
todayDow: 5
},
_lightBoxUniversal: "1",
_enableOverlays: "1",
_animationSpeedMultiplier: "1",
_overlayConfig:
{
top: "10%",
speed: 200,
closeSpeed: 100,
mask:
{
color: "rgb(255, 255, 255)",
opacity: "0.6",
loadSpeed: 200,
closeSpeed: 100
}
},
_ignoredUsers: {"1":"a","2":"b"},
_loadedScripts: {"node_list":true,"node_category":true,"node_forum":true,"node_link":true,"node_page":true,"sidebar_share_page":true,"xfcom_page_wrapper":true},
_cookieConfig: { path: "/", domain: "", prefix: "xf_"},
_csrfToken: "166,234,123",
_csrfRefreshUrl: "login/csrf-token-refresh",
_jsVersion: "4fb209a0"
});
jQuery.extend(XenForo.phrases,
{
cancel: "Cancel",
a_moment_ago: "A moment ago",
one_minute_ago: "1 minute ago",
x_minutes_ago: "%minutes% minutes ago",
today_at_x: "Today at %time%",
yesterday_at_x: "Yesterday at %time%",
day_x_at_time_y: "%day% at %time%",
day0: "Sunday",
day1: "Monday",
day2: "Tuesday",
day3: "Wednesday",
day4: "Thursday",
day5: "Friday",
day6: "Saturday",
_months: "January,February,March,April,May,June,July,August,September,October,November,December",
_daysShort: "Sun,Mon,Tue,Wed,Thu,Fri,Sat",
following_error_occurred: "The following error occurred",
server_did_not_respond_in_time_try_again: "The server did not respond in time. Please try again.",
logging_in: "Logging in",
click_image_show_full_size_version: "Click this image to show the full-size version.",
show_hidden_content_by_x: "Show hidden content by {names}"
});
// Facebook Javascript SDK
XenForo.Facebook.appId = "146201428725181";
XenForo.Facebook.forceInit = true;
</script>
Upvote
0