Sobota, Červen 27, 2026
Aby fungovaly PrettyURLs u příspěvků, musí se upravit .htaccess
1) In Setting > FlatPress Protect > enable editing .htaccess
2) In Plugin > setting PrettyURLs > Save .htaccess
AddType application/x-httpd-php .php .htm .html
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
# Zde upravte cestu k adresáři (např. RewriteBase / nebo RewriteBase /flatpress/)
RewriteBase /
RewriteRule ^.htaccess$ - [F]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Neděle, Listopad 23, 2025
Tento článek vám ukáže některé z možností FlatPressu.
Tag “more” zobrazí odkaz “Číst dál…”, po kliknutí na něj se zobrazí celý článek.
[Číst dál…]
Neděle, Leden 5, 2025
Script detecting mobile device
<script>
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
document.currentScript.outerHTML = `[img=images/mapka_apartmany.jpeg scale=5% float=right]`;
}else{
document.currentScript.outerHTML = `[img=images/mapka_apartmany.jpeg scale=18% float=right]`;
}
</script>
CSS: change the background color when the browser window is less 400px
@media only screen and (max-width: 400px) {
body {
background-color: lightblue;
}
}
Codepen: https://codepen.io/L … r-Ludvik/pen/RNbjeOV
More example: https://www.w3school … ref/atrule_media.php
This script also detecting mobile device:
<script>
if (window.matchMedia(”(max-width: 400px)”).matches) {
// Viewport is less or equal to 400 pixels on mobile
document.currentScript.outerHTML = `less or equal to 400`
} else {
// Viewport is greater than 400 pixels on desktop
document.currentScript.outerHTML = `greater than 400`
}
document.write(”
“);
document.write(document.documentElement[”clientWidth”]);
document.write(”
“);
document.write(document.body[”scrollWidth”]);
</script>
Neděle, Prosinec 22, 2024
source rssread.php?rss=
<?php
$rss = $_GET[’rss’];
$rss = simplexml_load_file($rss);
echo ’<h1>’. $rss->channel->title . ’</h1>’;
foreach ($rss->channel->item as $item) {
echo ’<h2><a href=”‘. $item->link .’”>’ . $item->title . ”</a></h2>”;
echo ”<p>” . $item->pubDate . ”</p>”;
echo ”<p>” . $item->description . ”</p>”;
}
?>
<html><head><style>
iframe{
height: 400px;
width: 200px;
}</style></head>
<body>
<iframe src=”https://solarcz.eu/programy/php_kody/rssread.php?rss=https://www.flatpress.org/feed/rss2/” ></iframe>
<iframe id=”test” src=”https://solarcz.eu/programy/php_kody/rssread.php?rss=http://flatpress.cz/?x=feed:rss2”></iframe>
<iframe id=”test1” src=”https://solarcz.eu/programy/php_kody/rssread.php?rss=http://feeds.bbci.co.uk/news/england/rss.xml” ></iframe>
<iframe src=”https://rss.app/embed/v1/feed/xeLKa4jg6jhRnw7V”style=”border-style:none; width:610px; height:500px;”></iframe>
</body></html>