diff --git a/.htaccess b/.htaccess
index 4b51721..7ac0200 100644
--- a/.htaccess
+++ b/.htaccess
@@ -3,3 +3,175 @@ RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?page=$1 [L]
+
+
+# Insert filters / compress text, html, javascript, css, xml:
+# mod_deflate can be used for Apache v2 and later and is the recommended GZip mechanism to use
+AddOutputFilterByType DEFLATE text/plain
+AddOutputFilterByType DEFLATE text/javascript
+AddOutputFilterByType DEFLATE text/html
+AddOutputFilterByType DEFLATE text/xml
+AddOutputFilterByType DEFLATE text/css
+AddOutputFilterByType DEFLATE text/vtt
+AddOutputFilterByType DEFLATE text/x-component
+AddOutputFilterByType DEFLATE application/xml
+AddOutputFilterByType DEFLATE application/xhtml+xml
+AddOutputFilterByType DEFLATE application/rss+xml
+AddOutputFilterByType DEFLATE application/js
+AddOutputFilterByType DEFLATE application/javascript
+AddOutputFilterByType DEFLATE application/x-javascript
+AddOutputFilterByType DEFLATE application/x-httpd-php
+AddOutputFilterByType DEFLATE application/x-httpd-fastphp
+AddOutputFilterByType DEFLATE application/atom+xml
+AddOutputFilterByType DEFLATE application/json
+AddOutputFilterByType DEFLATE application/ld+json
+AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
+AddOutputFilterByType DEFLATE application/x-font-ttf
+AddOutputFilterByType DEFLATE application/font-sfnt
+AddOutputFilterByType DEFLATE application/x-web-app-manifest+json
+AddOutputFilterByType DEFLATE font/opentype
+AddOutputFilterByType DEFLATE font/otf
+AddOutputFilterByType DEFLATE font/ttf
+AddOutputFilterByType DEFLATE font/sfnt
+AddOutputFilterByType DEFLATE image/svg+xml
+AddOutputFilterByType DEFLATE image/x-icon
+
+# Exception: Images
+SetEnvIfNoCase REQUEST_URI \.(?:gif|jpg|jpeg|png)$ no-gzip dont-vary
+
+# Drop problematic browsers
+BrowserMatch ^Mozilla/4 gzip-only-text/html
+BrowserMatch ^Mozilla/4\.0[678] no-gzip
+BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
+
+# Make sure proxies don't deliver the wrong content
+
+Header append Vary User-Agent env=!dont-vary
+
+
+
+
+# mod_gzip is an external extension and last updated 2015, so
+# if available please use mod_deflate instead
+# If you are stuck on Apache v1.3 you can use mod_zip to enable Gzip
+# as mod_deflate is available for Apache v2 or later only.
+
+ mod_gzip_on Yes
+ mod_gzip_dechunk Yes
+ mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
+ mod_gzip_item_include handler ^cgi-script$
+ mod_gzip_item_include mime ^text/.*
+ mod_gzip_item_include mime ^application/x-javascript.*
+ mod_gzip_item_exclude mime ^image/.*
+ mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
+
+
+
+## EXPIRES CACHING ##
+
+ExpiresActive On
+ExpiresDefault "access plus 1 week"
+
+ExpiresByType text/css "access plus 1 month"
+
+ExpiresByType application/atom+xml "access plus 1 hour"
+ExpiresByType application/rdf+xml "access plus 1 hour"
+ExpiresByType application/rss+xml "access plus 1 hour"
+
+ExpiresByType application/json "access plus 0 seconds"
+ExpiresByType application/ld+json "access plus 0 seconds"
+ExpiresByType application/schema+json "access plus 0 seconds"
+ExpiresByType application/vnd.geo+json "access plus 0 seconds"
+ExpiresByType application/xml "access plus 0 seconds"
+ExpiresByType text/xml "access plus 0 seconds"
+
+ExpiresByType image/x-icon "access plus 1 month"
+ExpiresByType image/vnd.microsoft.icon "access plus 1 month"
+
+ExpiresByType text/html "access plus 1 minute"
+
+ExpiresByType text/javascript "access plus 1 month"
+ExpiresByType text/x-javascript "access plus 1 month"
+ExpiresByType application/javascript "access plus 1 months"
+ExpiresByType application/x-javascript "access plus 1 months"
+
+ExpiresByType image/jpg "access plus 1 month"
+ExpiresByType image/jpeg "access plus 1 month"
+ExpiresByType image/gif "access plus 1 month"
+ExpiresByType image/png "access plus 1 month"
+ExpiresByType image/svg+xml "access plus 1 month"
+ExpiresByType image/bmp "access plus 1 month"
+ExpiresByType image/webp "access plus 1 month"
+
+ExpiresByType audio/ogg "access plus 1 month"
+
+ExpiresByType video/mp4 "access plus 1 month"
+ExpiresByType video/ogg "access plus 1 month"
+ExpiresByType video/webm "access plus 1 month"
+
+ExpiresByType text/plain "access plus 1 month"
+ExpiresByType text/x-component "access plus 1 month"
+
+ExpiresByType application/manifest+json "access plus 1 week"
+ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
+ExpiresByType text/cache-manifest "access plus 0 seconds"
+
+ExpiresByType application/pdf "access plus 1 month"
+
+ExpiresByType application/x-shockwave-flash "access plus 1 month"
+
+ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
+ExpiresByType font/eot "access plus 1 month"
+ExpiresByType font/opentype "access plus 1 month"
+ExpiresByType application/x-font-ttf "access plus 1 month"
+ExpiresByType application/font-woff "access plus 1 month"
+ExpiresByType application/font-woff2 "access plus 1 month"
+ExpiresByType application/x-font-woff "access plus 1 month"
+ExpiresByType font/woff "access plus 1 month"
+
+
+## EXPIRES CACHING ##
+
+
+#Alternative caching using Apache's "mod_headers", if it's installed.
+#Caching of common files - ENABLED
+
+
+# 1 Month
+
+Header set Cache-Control "max-age=2592000, public"
+
+
+# 2 DAYS
+
+Header set Cache-Control "max-age=172800, public, must-revalidate"
+
+
+# 2 HOURS
+
+Header set Cache-Control "max-age=7200, must-revalidate"
+
+
+
+
+
+
+
+ Header append Vary: Accept-Encoding
+
+
+
+# Set Keep Alive Header
+# This *just* sets the header - maybe your hoster is not allowing this feature
+# Please check if it is working with tools like http://www.webpagetest.org
+
+ Header set Connection keep-alive
+
+
+# If your server don't support ETags deactivate with "None" (and remove header)
+
+
+ Header unset ETag
+
+ FileETag None
+
\ No newline at end of file
diff --git a/README.md b/README.md
index d5966dc..3602fb5 100644
--- a/README.md
+++ b/README.md
@@ -29,19 +29,16 @@ Local Disc C: -> xampp -> htdocs -> 'ytronic'
### Howto create Pages and Menus
-- Go to `ytronic -> yt-content` and create a file `webpage.php` inside
+- Go to `ytronic -> yt-content`, clone `faqs.php`, rename to `webpage.php` and edit the title, content, metas, etc...
-- Open `ytronic -> yt-template -> functions.php` and go to `line 101` and add this:
+- Open `ytronic -> yt-template -> nav-menu.php` and go to `line 11` and add this:
```php
-'webpage' => array(
- 'menu_name' => 'Web Page',
- 'page_title' => 'Web Page title',
- 'page_description' => 'Web Page description',
+'webpage' => 'Webpage',
),
```
-- Refresh your browser and a new menu should be appear
+- Refresh your browser and a new menu item should be appear
License
-------
diff --git a/robots.txt b/robots.txt
index 235f7aa..0f69ca0 100644
--- a/robots.txt
+++ b/robots.txt
@@ -1,2 +1,2 @@
User-agent: *
-Disallow /
+Allow /
diff --git a/screenshot.png b/screenshot.png
index 1842abb..08fafba 100644
Binary files a/screenshot.png and b/screenshot.png differ
diff --git a/yt-config.php b/yt-config.php
index d868c17..8c4e2c0 100644
--- a/yt-config.php
+++ b/yt-config.php
@@ -8,14 +8,15 @@ function yt_config( $opt = '' )
{
$settings = array(
- 'site_lang' => 'en', /** Website language **/
- 'site_name' => 'Ytronic', /** Website name **/
- 'site_descript' => 'Ytronic description', /** Website description **/
- 'site_url' => 'http://localhost/ytronic/', /** Website url **/
- 'pretty_url' => false, /** Convert url "/?page=contact" to "/contact" **/
- 'template_dir' => 'yt-template', /** Template directory name **/
- 'content_dir' => 'yt-content', /** Pages directory name **/
- 'version' => 'v2.1.0', /** Ytronic app version **/
+ 'site_lang' => 'en', /** Website language **/
+ 'site_name' => 'Ytronic', /** Website name **/
+ 'site_descript' => 'Faster PHP Website', /** Website description **/
+ 'site_url' => 'http://localhost/ytronic/', /** Website url **/
+ 'pretty_url' => true, /** Convert url "/?page=contact" to "/contact" **/
+ 'allow_search_engine' => true, /** Allow search engines to indexing this website. Warning!!! -> Edit robots.txt file **/
+ 'template_dir' => 'yt-template', /** Template directory name **/
+ 'content_dir' => 'yt-content', /** Pages directory name **/
+ 'version' => 'v3.1.0', /** Ytronic app version **/
);
return isset($settings[$opt]) ? $settings[$opt] : null;
@@ -63,4 +64,4 @@ function site_url()
}
if ( ! defined( 'IMGURI' ) ) {
define ( 'IMGURI', TMPLURI .'/assets/images' );
-}
\ No newline at end of file
+}
diff --git a/yt-content/404.php b/yt-content/404.php
index 4bffc8d..d6be085 100644
--- a/yt-content/404.php
+++ b/yt-content/404.php
@@ -3,7 +3,17 @@
exit; // Exit if accessed directly.
}
-function yt_page_content()
+function YTMetaRobots()
+{
+ echo YTIndexingSearchEngines('noindex','nofollow');
+}
+
+function YTPageTitle()
+{
+ echo '404 Page not found - Ytronic - Advanced and Faster PHP Website';
+}
+
+function YTLoadPageContent()
{
ob_start(); // Page content to buffer
?>
diff --git a/yt-content/contact.php b/yt-content/contact.php
index f735544..02c6390 100644
--- a/yt-content/contact.php
+++ b/yt-content/contact.php
@@ -3,7 +3,27 @@
exit; // Exit if accessed directly.
}
-function yt_page_content()
+function YTMetaRobots()
+{
+ echo YTIndexingSearchEngines('index','nofollow');
+}
+
+function YTPageTitle()
+{
+ echo 'Contact - Ytronic - Advanced and Faster PHP Website';
+}
+
+function YTPageDescription()
+{
+ echo '';
+}
+
+function YTPageKeywords()
+{
+ echo '';
+}
+
+function YTLoadPageContent()
{
ob_start(); // Page content to buffer
?>
diff --git a/yt-content/cookies.php b/yt-content/cookies.php
index 5ad7b90..cf85ba8 100644
--- a/yt-content/cookies.php
+++ b/yt-content/cookies.php
@@ -3,7 +3,27 @@
exit; // Exit if accessed directly.
}
-function yt_page_content()
+function YTMetaRobots()
+{
+ echo YTIndexingSearchEngines('index','nofollow');
+}
+
+function YTPageTitle()
+{
+ echo 'Cookies - Ytronic - Advanced and Faster PHP Website';
+}
+
+function YTPageDescription()
+{
+ echo '';
+}
+
+function YTPageKeywords()
+{
+ echo '';
+}
+
+function YTLoadPageContent()
{
ob_start(); // Page content to buffer
?>
diff --git a/yt-content/faqs.php b/yt-content/faqs.php
index 4b472f4..97312a7 100644
--- a/yt-content/faqs.php
+++ b/yt-content/faqs.php
@@ -3,7 +3,27 @@
exit; // Exit if accessed directly.
}
-function yt_page_content()
+function YTMetaRobots()
+{
+ echo YTIndexingSearchEngines('index','nofollow');
+}
+
+function YTPageTitle()
+{
+ echo 'FAQs - Ytronic - Advanced and Faster PHP Website';
+}
+
+function YTPageDescription()
+{
+ echo '';
+}
+
+function YTPageKeywords()
+{
+ echo '';
+}
+
+function YTLoadPageContent()
{
ob_start(); // Page content to buffer
?>
diff --git a/yt-content/help.php b/yt-content/help.php
index c8c9b4a..7ffc6a1 100644
--- a/yt-content/help.php
+++ b/yt-content/help.php
@@ -3,7 +3,27 @@
exit; // Exit if accessed directly.
}
-function yt_page_content()
+function YTMetaRobots()
+{
+ echo YTIndexingSearchEngines('index','nofollow');
+}
+
+function YTPageTitle()
+{
+ echo 'Help - Ytronic - Advanced and Faster PHP Website';
+}
+
+function YTPageDescription()
+{
+ echo '';
+}
+
+function YTPageKeywords()
+{
+ echo '';
+}
+
+function YTLoadPageContent()
{
ob_start(); // Page content to buffer
?>
diff --git a/yt-content/home.php b/yt-content/home.php
index 4c9d209..7b59fca 100644
--- a/yt-content/home.php
+++ b/yt-content/home.php
@@ -3,7 +3,27 @@
exit; // Exit if accessed directly.
}
-function yt_page_content()
+function YTMetaRobots()
+{
+ echo YTIndexingSearchEngines('index','follow');
+}
+
+function YTPageTitle()
+{
+ echo 'Ytronic - Advanced and Faster PHP Website';
+}
+
+function YTPageDescription()
+{
+ echo '';
+}
+
+function YTPageKeywords()
+{
+ echo '';
+}
+
+function YTLoadPageContent()
{
ob_start(); // Page content to buffer
?>
diff --git a/yt-content/services.php b/yt-content/services.php
index 7134a04..95d0cb9 100644
--- a/yt-content/services.php
+++ b/yt-content/services.php
@@ -3,7 +3,27 @@
exit; // Exit if accessed directly.
}
-function yt_page_content()
+function YTMetaRobots()
+{
+ echo YTIndexingSearchEngines('index','nofollow');
+}
+
+function YTPageTitle()
+{
+ echo 'Services - Ytronic - Advanced and Faster PHP Website';
+}
+
+function YTPageDescription()
+{
+ echo '';
+}
+
+function YTPageKeywords()
+{
+ echo '';
+}
+
+function YTLoadPageContent()
{
ob_start(); // Page content to buffer
?>
diff --git a/yt-template/assets/css/style.css b/yt-template/assets/css/style.css
index 9ab1606..18b5bad 100644
--- a/yt-template/assets/css/style.css
+++ b/yt-template/assets/css/style.css
@@ -4,7 +4,7 @@
* Author: Yonox
* Author URI: https://github.com/elyonox
* Description: PHP Website designed for multipurpose objective.
- * Version: 2.1.0
+ * Version: 3.1.0
* License: GNU General Public License v2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
diff --git a/yt-template/footer.php b/yt-template/footer.php
index 0adf56b..33e7574 100644
--- a/yt-template/footer.php
+++ b/yt-template/footer.php
@@ -5,7 +5,6 @@
if ( ! defined( 'YTABPATH' ) ) {
exit; // Exit if accessed directly.
} ?>
-
-
-
+