Closed Aerys-Aeksio closed 4 months ago
Hello @Aerys-Aeksio,
your approach may not work. What are you trying to do? Please describe the individual steps so that I can reproduce it.
With best regards Frank
Well, jquery plugin is enabled but no script files are put in their place.
Plugin jquery
function plugin_jquery_head() {
$pdir = plugin_geturl('jquery');
echo '
<!-- start of jsUtils -->
<script src="' . $pdir . 'res/jquery/3.6.1/jquery-3.6.1.min.js"></script>
<script src="' . $pdir . 'res/jqueryui/1.13.2/jquery-ui.min.js"></script>
<!-- end of jsUtils -->';
}
So it should insert the scripts files but it only inserts the comments of where jsutils start and end.
From: <Saved by Blink>
Snapshot-Content-Location: https://192.168.50.2/flatpress/?page=Sudoku_Rules
Subject: =?utf-8?Q?Kierownik's=20Sudoku's=20=C2=BB=20Sudoku=20Rules?=
Date: Sun, 25 Feb 2024 21:25:25 +0100
MIME-Version: 1.0
Content-Type: multipart/related;
type="text/html";
boundary="----MultipartBoundary--cPQxaOIKU2xzFhbY2iQA9RnJP6Q9BcocrHjtlzv3a2----"
------MultipartBoundary--cPQxaOIKU2xzFhbY2iQA9RnJP6Q9BcocrHjtlzv3a2----
Content-Type: text/html
Content-ID: <frame-25E95023E513EA80612BC25D612F4B0B@mhtml.blink>
Content-Transfer-Encoding: binary
Content-Location: https://192.168.50.2/flatpress/?page=Sudoku_Rules
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Kierownik's Sudoku's » Sudoku Rules</title>
<!-- start of Cookiebanner -->
<link rel="stylesheet" type="text/css" href="https://192.168.50.2/flatpress/fp-plugins/cookiebanner/res/cookiebanner.css">
<!-- end of Cookiebanner -->
<!-- start of jsUtils -->
<!-- end of jsUtils --><!-- PhotoSwipe -->
<link rel="stylesheet" property="stylesheet" href="https://192.168.50.2/flatpress/fp-plugins/photoswipe/res/photoswipe-4.1.3/default-skin/default-skin.css">
<link media="screen" hclass=; }
Hope it goes well because I do not see a preview button 😉
Hello @Aerys-Aeksio ,
your theme/style still seems to use XHTML 1.0 Strict. The jQuery plugin and some others are designed for HTML5.
If you want to include scripts in XHTML 1.0 Strict, you would have to change the jQuery plugin as follows:
<!-- start of jsUtils -->
<script type="text/javascript" src="' . $pdir . 'res/jquery/3.6.1/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="' . $pdir . 'res/jqueryui/1.13.2/jquery-ui.min.js"></script>
<!-- end of jsUtils -->';
Are the jQuery script files inserted when you use a leggero style? I recommend that you switch the theme/style you are using to HTML5. This usually affects the following template files: cpheader.tpl, header.tpl.
With best regards Frank
Hello @Fraenkiman,
I made the changes but nothing shows up.
Something is sanatizing script because hardcoding it in the tpl header or footer does not insert the scripts.
Changed to leggero and it does not help.
Just close it.
I am on a android tablet and used the download button of the site to see the source but now I use view-source:http://site and now i see the inserted scripts.
So i was being a dumdum, sorry to waste your time.
Your request is justified, don't worry ;-). I will gladly take the time if it is available. Sometimes the devil hides in the details.
Best regards and a good start to the new week Frank
The plugin does not insert the scripts into the head. Something is holding it back from inserting
Even putting it in the tpl files, something strips them.