Edit header/body HTML code in Mediawiki - mediawiki

I am not familiar with with the Mediawiki script and having a hard time finding stuff. I need to make some pretty big changes to the header and body tags but I haven't figured out where and which file holds those two tags.
Does someone know the location and name of the files where I can edit the header and body content?

If you use the Vector skin (which is default) you can change the header and body within the file mediawiki/skins/Vector/VectorTemplate.php.
Be aware that this file is overwritten if you update MediaWiki.

Related

How to load different parts of a web-page from different html files

I am making a local website where I have a number of pages with a lot of common code for header, navigation bar and footer.
I was wondering if there was a way I could use to store the header, footer and other such codes as independent html files, and then simply link them in the code for the new page.
You can use server-side includes for using an HTML file into another one. For that, you'll have to make a few changes in your server configuration as well. I'll show you an example of Apache.
Change configuration as mentioned in https://www.linuxtopia.org/HowToGuides/apache_ssi.html
Include the below code in your html file and replace "included.html" with your section html filename
<!--#include file="included.html" -->
Check more on : https://en.wikipedia.org/wiki/Server_Side_Includes

HTML headers and footers: edit multiple files from one place

I am currently coding up my own website (basically a personal blog) w/ HTML5 and CSS3. However, the growing number of .html files (blog posts and other stuff) quickly raised a problem: say if I want to change something in my page header / footer (which I want to keep the same across the entire site), I would have to edit every .html file to get this done. Is there anyway that this process can be simplified to a one-time action? Mostly, I write html files in Brackets. Thanks in advance!
Why not save the files as .php, create another file for the header and footer, and include the header and footer ( <?php include 'header.php'; ?> ) files from each of the main files?

How to automatically load a CSS file into HTML

I have a basic index.html file in a folder, as well as many, many other files. I want them all to use the same CSS file, without having to manually add to every file. I was wondering if you renamed the file index.css or something like that it would automatically load into every HTML file in the folder? Out of curiosity, is there also a Javascript method for this too?
Bad news my friend No. There is no magical tool that will import the CSS into all of your files. You have to do it yourself. Also it's really easy
Get the CSS file
Import the CSS File
See it's that easy. Was it so hard to do it?
You can't do that with simple HTML.
Do a PHP template instead, basically with:
head
header
nav menu
a content/container div/section
footer
Then, include your HTML/PHP page in your content.
For instance, use $_GET or $_POST to know which page to include.

No Static Footer or Header

My company just bought out another company and I have to change some links on their site to point to our site. However, this site doesn't have a static footer or header (as in, each link is recreated on each HTML page). So instead of changing the necessary files (30+), is there any other way to do a sweeping change?
Thanks.
While there are several methods, the one that I would recommend would be to use a server side include file.
My recommendation would be to follow these steps, approximately:
Copy the header / nav contents from one of your HTML files into a new PHP include file (called, for example, header.php).
Edit each HTML file, removing the header / nav contents, and including the file - that would look something like this: <?php require_once 'header.php'; ?>
Repeat for the footer, if that has "common" links and markup.
While this may take longer initially, the very first time you have to make any updates it will pay off.
Lastly, there are ways - if necessary - to (utilizing PHP) make the current nav item have an active class, etc. That's a bit of a stretch for this answer, but this answer may get you going in the right direction.
If you have access to these files on a GNU/Linux machine, use sed:
sed -i 's|http://oldcompany.com|https://newcompany.net|g' /dir/of/static/files
The -i flag does infile replacements, so each file under the given path is will be searched for the first URL and replaced accordingly.
Please note that this will just change links like http://oldcompany.com/team to http://newcompany.net/team. It also does not change links for https://oldcompany.com which would require modifications of the sed expression. Please give more information on how the links should be altered so we can provide solutions for your specific problem.

Changing the location of the index.html file in Doxygen output

I'm using Doxygen to create html output.
I'd like to customize the output so that the index.html file could be more noticeable, since at the moment it is buried half way down a huge list of files in the html output folder.
For example, if it were moved up one directory to be outside of the 'bits and pieces' html files then it would be much more accessible for others who will be looking for it. However, I can't just ass a line of script to copy it to that location, since all of the links it has would break.
If I could configure Doxygen to have the index file go to a different location, or if you can think of another solution to my problem, I'd be grateful for your response.
Thanks
I would leave the documentation in its place and instead use the meta refresh option of the HTML language. Place a file, for instance called, "Documentation.html" in any folder you want with the following content
<meta http-equiv="REFRESH" content="0;URL=RELATIVE/PATH/TO/index.html">
As I mention in comments to the OP the easiest solution is probably to create a symbolic link or shortcut to the index.html file generated by doxygen, rather than trying to get doxygen to change the layout of it's output files. This symlink/shortcut can then be placed in the root directory of your project (or elsewhere), pointing to ./html/index/html, and named anything you like to make it obvious to your users what it is.