For example let's take a custom made/edited offline.php:
- Is it ok (I know it's possible, duh) to write HTML directly into offline.php? Or...
- .. do I make changes in the core files that are called within said .php file?
Right now, my offline.php is mostly PHP code and the backend little window in Custom Message under Site Settings is filled with HTML code but I'd really prefer to have just HTML in the .php file. I have a few concirnes:
- are there any security or other issues when doing this? IMO there shouldn't be since this is exactly how it's laid in HTML. Then again, HTML and PHP are worlds apart.
- although it's possible, we don't write CSS into .html files anymore because we have .css for that. So, HTML for content and CSS for styling... Is that the same reason why I shouldn't write HTML in .php files like offline.php, error.php and so on and on?
Thanks for the feedback.
Ok, here's an example. This is the part in offline.php that calls the message and styling that I've inserted at the backend (Custom Message in File Settings):
<jdoc:include type="message" /> <?php if ($app->get('display_offline_message', 1) == 1 && str_replace(' ', '', $app->get('offline_message')) != '') : ?> <p><?php echo $app->get('offline_message'); ?></p> <?php endif; ?>
If it's perfectly ok to just delete those lines and paste HTML code instead, then I'd prefer to use this option even though it's not just the message itself, it's also 20 lines of HTML.
And while we're at it, let's take another example: main index.php. Is it ok then to delete, let's say, the line
<html lang="<?php echo $this->language; ?>" > and simply substitute it with
<html lang="en" /> (since the website is only in one language)?