Code: Select all
$template->assign_var('AWS_URL', append_sid($phpbb_root_path . 'aws.' . $phpEx));
Code: Select all
<script>
var awsUrl = '{{ AWS_URL }}';
</script>
Code: Select all
$.ajax({ url: awsUrl,
Code: Select all
<script>
var awsUrl = '{{ AWS_URL }}';
</script>
Code: Select all
$.ajax({ url: awsUrl,
Code: Select all
$template->assign_var('AWS_URL', append_sid($phpbb_root_path . 'aws.' . $phpEx));
Theterrylb wrote: ↑Fri Sep 07, 2018 5:26 pm and this was added above the session management stuff in aws.phpCode: Select all
$template->assign_var('AWS_URL', append_sid($phpbb_root_path . 'aws.' . $phpEx));
AWS_URL
template variable needs to be assigned in a file that renders the page you want the AWS script to be called on, not aws.php
itself. Since you've edited overall_header.html
, I assume you want aws.js
included on every page? You could add the template variable here. However, to not waste resources, it's recommended to only include it when actually needed.AWS_URL
template variable on every page doesn't cost much. As long as you include the aws.js
script only on pages where you need it it's fine. You probably want to include it in posting_body.html
, viewtopic_body.html
and ucp_pm_viewmessage.html
.