Can Abyss inject Javascript into <head> on every page?

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
JMMotyer
-


Joined: 06 Jul 2005
Posts: 80
Location: Burlington (Toronto-ish), Ontario, Canada

PostPosted: Fri Dec 19, 2025 8:34 pm    Post subject: Can Abyss inject Javascript into <head> on every page? Reply with quote

Hello folks,

I don't know how to ask this question, but I will try to explain what I am hoping that Abyss X2 can do for me.

I use FontAwesome on all my Abyss websites. In order to use FontAwesome, I need to add some Javascript code to all my headers of every page:

Code:
<head>
     <script src="https://kit.fontawesome.com/1234567890.js" crossorigin="anonymous" async defer></script>
</head>
...where 1234567890 above is replaced with my FontAwesome kit's unique code.

Until now, I've added that script code individually to each of the sections on my websites. By sections, I mean sections such as my PHP scripts for CMS, forums, guestbook, statistics, etc. And that's for each of my sites (hosts).

I am inquiring at this time if I can somehow configure my Abyss hosts to apply (inject?) that FontAwesome Javascript code, and I could then remove my current FontAwesome Javascript code from each of my individual sections (scripts).

I hope that makes sense.

Even better would be, if I could somehow configure Abyss in a single place with that Javascript code, and then Abyss applies that Javascript code to every page of every host that Abyss serves up.

I'm not that technical, so I would need details how to accomplish whatever Abyss if capable of, if at all.

Thanks in advance & have a great day.

Regards,
John
Back to top View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1353

PostPosted: Sun Dec 21, 2025 6:49 pm    Post subject: Re: Can Abyss inject Javascript into <head> on every p Reply with quote

JMMotyer,

XSSI can come to rescue.

The idea is to declare HTML files as processed by XSSI (Server side includes) instea d of .shtml and .shtml only.

Then put that snippet of code in a file called fa.html for example and insert in each of your .html files a directive to include fa.html.

The article in https://aprelium.com/abyssws/articles/xssi-introduction.html can help explain how XSSI syntax works and links to the official documentation of all directives.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
JMMotyer
-


Joined: 06 Jul 2005
Posts: 80
Location: Burlington (Toronto-ish), Ontario, Canada

PostPosted: Mon Dec 22, 2025 10:24 am    Post subject: Reply with quote

Thanks for getting back to me, folks.

I thought that I have now done what you suggest, by following what you describe in your above reply, but nothing is happening.

    1. I created a file with an shtml extension, and called it fa.shtml;
    2. I inserted the snippet into that fa.shtml file;
    3. I placed that fa.shtml file in the root of that host;
    4. In Abyss, for XSSI Parameters for a host, I added a Virtual Path of "/" (without the quotes);
    5. I checked the box in front of Enable XSSI Processing (to enable it).
But nothing is happening... the snippet is not being called.

Quote:
Then put that snippet of code in a file called fa.html for example and insert in each of your .html files a directive to include fa.html.

That is basically what I have been doing this past year, but without XSSI... here's how I have done it until now:

    1. I have a /common folder containing files that are shared by all 14 of my Abyss hosts.
    2. Each of my Abyss hosts has an alias called /common that points to that shared common folder.
    3. I have a file called font_awesome.php that contains my snippet.
I know that I could just use an HTML extension for that file, but all my other common files are PHP, so for consistency I used PHP.

Next:
    4. In my website's CMS' footer.php, I call that font_awesome.php file using an INCLUDE;
    5. In my website's guestbook's index.php, I call that same font_awesome.php file using an identical INCLUDE;
    6. In my website's tracking script's index.php, I call that same font_awesome.php file using an identical INCLUDE.

Code:
<?php include 'D:\Web\_common\_globals\font_awesome.php' ; ?>

Between my 14 hosts running on Abyss X2, that's a few dozen places on those hosts that have PHP files that call that same font_awesome.php files with that above INCLUDE.

I am curious how using Abyss' XSSI method differs from my own method that I've been using for the past year.

What I wish to be able to accomplish for each of my Abyss 14 hosts: for Abyss to call that font_awesome.shtml file for every page that Abyss serves up, so that I do not need to configure (and periodically update) many individual apps (PHP scripts) running on those hosts to call that file.

I know that I'm not explaining it very well, but I hope that the above makes sense.

Thanks in advance.

Regards,
John
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group