Skip to content

Commit

Permalink
Merge pull request #1 from elyonox/v3.1.0
Browse files Browse the repository at this point in the history
Release v3.1.0
  • Loading branch information
elyonox authored Dec 28, 2022
2 parents b1b0b7b + 6bcf142 commit 8670c95
Show file tree
Hide file tree
Showing 18 changed files with 389 additions and 109 deletions.
172 changes: 172 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,175 @@ RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?page=$1 [L]

<IfModule mod_deflate.c>
# 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
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>

</IfModule>

# 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.
<IfModule mod_gzip.c>
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.*
</IfModule>


## EXPIRES CACHING ##
<IfModule mod_expires.c>
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"

</IfModule>
## EXPIRES CACHING ##


#Alternative caching using Apache's "mod_headers", if it's installed.
#Caching of common files - ENABLED
<IfModule mod_headers.c>

# 1 Month
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=2592000, public"
</FilesMatch>

# 2 DAYS
<FilesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=172800, public, must-revalidate"
</FilesMatch>

# 2 HOURS
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=7200, must-revalidate"
</FilesMatch>

</IfModule>


<IfModule mod_headers.c>
<FilesMatch "\.(js|css|xml|gz|html|ttf)$">
Header append Vary: Accept-Encoding
</FilesMatch>
</IfModule>

# 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
<IfModule mod_headers.c>
Header set Connection keep-alive
</IfModule>

# If your server don't support ETags deactivate with "None" (and remove header)
<IfModule mod_expires.c>
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
FileETag None
</IfModule>
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------
Expand Down
2 changes: 1 addition & 1 deletion robots.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
User-agent: *
Disallow /
Allow /
Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 10 additions & 9 deletions yt-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -63,4 +64,4 @@ function site_url()
}
if ( ! defined( 'IMGURI' ) ) {
define ( 'IMGURI', TMPLURI .'/assets/images' );
}
}
12 changes: 11 additions & 1 deletion yt-content/404.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
?>
Expand Down
22 changes: 21 additions & 1 deletion yt-content/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<meta name="description" content="Ytronic - The most Advanced and Faster PHP Website. NO mysql needed. Strongly SEO optimized.">';
}

function YTPageKeywords()
{
echo '<meta name="keywords" content="ytronic, php website, seo, php bootstrap theme, php bootstrap template, bootstrap, bootstrap 5, faster php website, website themes, web design, php web development, free php website, php7, php8">';
}

function YTLoadPageContent()
{
ob_start(); // Page content to buffer
?>
Expand Down
22 changes: 21 additions & 1 deletion yt-content/cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<meta name="description" content="Ytronic - The most Advanced and Faster PHP Website. NO mysql needed. Strongly SEO optimized.">';
}

function YTPageKeywords()
{
echo '<meta name="keywords" content="ytronic, php website, seo, php bootstrap theme, php bootstrap template, bootstrap, bootstrap 5, faster php website, website themes, web design, php web development, free php website, php7, php8">';
}

function YTLoadPageContent()
{
ob_start(); // Page content to buffer
?>
Expand Down
22 changes: 21 additions & 1 deletion yt-content/faqs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<meta name="description" content="Ytronic - The most Advanced and Faster PHP Website. NO mysql needed. Strongly SEO optimized.">';
}

function YTPageKeywords()
{
echo '<meta name="keywords" content="ytronic, php website, seo, php bootstrap theme, php bootstrap template, bootstrap, bootstrap 5, faster php website, website themes, web design, php web development, free php website, php7, php8">';
}

function YTLoadPageContent()
{
ob_start(); // Page content to buffer
?>
Expand Down
22 changes: 21 additions & 1 deletion yt-content/help.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<meta name="description" content="Ytronic - The most Advanced and Faster PHP Website. NO mysql needed. Strongly SEO optimized.">';
}

function YTPageKeywords()
{
echo '<meta name="keywords" content="ytronic, php website, seo, php bootstrap theme, php bootstrap template, bootstrap, bootstrap 5, faster php website, website themes, web design, php web development, free php website, php7, php8">';
}

function YTLoadPageContent()
{
ob_start(); // Page content to buffer
?>
Expand Down
22 changes: 21 additions & 1 deletion yt-content/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<meta name="description" content="Ytronic - The most Advanced and Faster PHP Website. NO mysql needed. Strongly SEO optimized.">';
}

function YTPageKeywords()
{
echo '<meta name="keywords" content="ytronic, php website, seo, php bootstrap theme, php bootstrap template, bootstrap, bootstrap 5, faster php website, website themes, web design, php web development, free php website, php7, php8">';
}

function YTLoadPageContent()
{
ob_start(); // Page content to buffer
?>
Expand Down
Loading

0 comments on commit 8670c95

Please sign in to comment.