NamelessMC

Internet Explorer

Internet Explorer is not supported. Please upgrade to a more modern browser.

Question Custom Pages Source Code
Started by cbackas

cbackas

cbackas

Member
Joined
30 Mar 2016
Last Seen
02 May 2016
Topics
7
Posts
11

Why are custom pages created in the AdminCP stored on the database? I have the complete html coded and ready to upload, tested and completely working. However, the only way that Nameless seems to let you put that source code in is to hit the "source" button on the custom page page. I put the source code in, and after hitting submit it seems to be changing the formatting of my code and the code looks quite different than what I see when I test it on it's own page. Is there anyway to put my raw code in and have it work without any reformatting? This is a bit annoying :P

Thanks for the help and the pretty neat software

cbackas · over 8 years ago
Samerton

Samerton

Owner
Joined
30 Mar 2015
Last Seen
08 May 2024
Topics
41
Posts
1054

The chances are the purification process may be blocking some of the HTML code from being displayed, as it only allows certain tags through.

I need to add more to the allowed tags, if you could find out which tags are being blocked I can add them straight away.

Alternatively, you can create a new file (must be .php) in the pages directory, for example "page.php" which will be found at /page, and put your HTML code in there. Here is a template for the custom page file. You can then add a navigation link to your page by editing styles/templates/navbar.tpl

x2
Samerton · over 8 years ago
cbackas

cbackas

Member
Joined
30 Mar 2016
Last Seen
02 May 2016
Topics
7
Posts
11
Samerton said:

I need to add more to the allowed tags, if you could find out which tags are being blocked I can add them straight away.

I'm pretty sure that the issue is:

	<link rel="stylesheet" media="screen" href="linkhere"/>

 being blocked... At least when I remove that line of code and run it not through nameless I get a similar result to what nameless modifies it to. Thanks for the help I'll give manually adding a page a shot now!

cbackas · over 8 years ago
cbackas

cbackas

Member
Joined
30 Mar 2016
Last Seen
02 May 2016
Topics
7
Posts
11

So the navbar/footer and all that doesn't display with this method, I imagine I could figure out how to add it to the source of that custom page but I thought I'd just ask you... How do I get the navbar and all that so that this page looks like it meshes with the rest of the site better?

Update: So I was bored and I went ahead and added the header/footer...Now I've just got to figure a way for the Nameless "custom-core.css" file to be used for the navbar and let the css file I have handle the actual page :P

cbackas · over 8 years ago
Samerton

Samerton

Owner
Joined
30 Mar 2015
Last Seen
08 May 2024
Topics
41
Posts
1054

If you put your CSS into a new class within custom_core.css, and then add that class to the navbar only, it will only affect the navbar and not the rest of the page.

In the (far) future, version 2.0 will allow for totally custom themes and templates, which will make things like this much easier to do.

Samerton · over 8 years ago