aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
11 daysServer config: Add redirect option for static dirThomas Lange2-0/+10
Add option to redirect requests from the old to the new global static directory in the server configuration files for Apache and nginx.
2024-12-03Bugfix: Date in search form not kept after submitThomas Lange1-3/+3
Use the `==` (equal) instead of `===` (identical) comparison operator in the form template. This bug was silently introduced in 2021 with 8cd1105 in `core/include/search/main.php` where the `$FORM['OPTIONS']` array is since then filled with integer values and not string values anymore.
2024-12-01PHP Keywords and types should be in lowercaseThomas Lange48-181/+181
Follow PSR-12 and use lowercase variants of PHP reserved keywords. See: https://www.php-fig.org/psr/psr-12/#25-keywords-and-types Find all uppercase occurrences of "or", "and", "null", "true" and "false" and change them to the lowercase variant.
2024-11-29Rename "rsrc" directories to "static"Thomas Lange38-15/+15
Stop using "rsrc" as name for the directories which contain static files and rename them to "static". This affects the global static directory and the subdirectories in the theme directories. If you've stored your own files in the old global "rsrc" directory, you must move them to the new "static" directory.
2024-11-16Use foreach to register entity content functionsThomas Lange1-65/+17
2024-11-15FunctionParser: No static property/methods anymoreThomas Lange3-7/+23
Problem: When creating a new "FunctionParser" object, it should not know the previously registered content functions which were saved in a static class property and registered via static class method. If one creates a new "FunctionParser" object, one would expect that the array of registered content functions in that object is empty. Changes: - Make static property "functions" non-static - Make static method "register" non-static - Add new method "registerFromArray"
2024-11-15Save registered content functions in class arrayThomas Lange1-0/+9
Modify the Application class so that it keeps an array of all registered content functions and add the method "getContentFunctions" to return it.
2024-11-15Define default functions with "addContentFunction"Thomas Lange1-10/+20
Instead of calling the static method FunctionParser::register directly, use the wrapper method addContentFunction of the Application class.
2024-02-05Drop support for parsing/transforming content tagsThomas Lange1-31/+8
The *content tags* are deprecated since July 2021 and have been replaced by the more powerful *content functions*, but parsing/transforming the old syntax was still supported until today. This commit removes the logic to parse/transform the old *content tags* from the codebase completely. If you are still using the old syntax in your entities' content, you need to run a converter script. Please look at the wiki for more information about *content functions* and how to replace the old *content tags* with the converter script.
2024-02-05Add content tag converter scriptThomas Lange1-0/+142
This script is used to convert the old *content tag* syntax to the newer *content functions* syntax which has been introduced in July 2021. See the wiki page for *content tags* for more details.
2024-02-05Add (CATEGORY|PAGE|POST|USER)_URL content functionThomas Lange1-0/+39
These content functions will return the pure URL to the corresponding entity instead of a Markdown formatted link like the other functions.
2024-02-03Fix use of wrong Fontello class for nav toggleThomas Lange1-1/+1
Broken since 6f1c594 when the class name in the Fontello SCSS file has been renamed from `fa-bars` to `fa-menu` and it was forgotten to also change the use of the class name in the HTML template.
2024-02-03Fix broken link to wiki page in first postThomas Lange1-1/+1
OLD: https://github.com/Nerdmind/Blog/wiki/Content-functions NEW: https://github.com/Nerdmind/Blog/wiki/Content_functions
2024-02-03Hotfix: Replace `"` with `'` in link title stringThomas Lange1-3/+12
Because there currently is no sane way to escape double quotes within a string intended to be used as title for a Markdown formatted link, just replace the double with single quotes until a better solution is found. Note: Just replacing with `"` will not work here because Parsedown escapes this further to `"`.
2024-02-02Fix incorrect backslash escaping of `\\`Thomas Lange1-2/+2
The regular expression part `\\` must be written as `\\\\`, not `\\\` in a PHP string variable. Although both variants (`\\\\` and `\\\`) will be passed as `\` to the regex engine in this specific case, it's correct to use 4 backslashes, as the PHP manual tells you: https://www.php.net/manual/en/regexp.reference.escape.php
2024-02-02Rewrite and optimize FunctionParser classThomas Lange1-15/+54
* Rewrite regular expressions and make them easier to read. * Use named capture groups for backreferences and array keys. * Allow backslash-escaping of quotes inside string arguments. * Allow string arguments to be enclosed between single quotes.
2024-01-23Remove trailing slash on void elementsThomas Lange17-82/+82
The trailing slash on void elements (self-closing tags) doesn't have any effect, isn't required by HTML5 and it is recommended to not use it.
2023-09-23Pass NULL instead of array containing NULL elementThomas Lange1-1/+7
2023-09-23Language: Cast parameter for "vsprintf" to arrayThomas Lange1-1/+1
Since PHP8, the second parameter for the "vsprintf" function MUST BE of type "array", so cast the $arguments variable to "array".
2023-09-23Language: Remove deprecated method "template"Thomas Lange1-7/+0
If your custom theme is still using that method, you can simply upgrade your theme by replacing all occurrences of "template" with "text": OLD: $Language->template NEW: $Language->text
2023-02-01Darken the background color of the headerThomas Lange4-4/+6
Use SCSS variables for the background color of the header and darken it a bit more for the dark theme of the "admin" template.
2023-02-01Remove "text-shadow" property from header textThomas Lange3-3/+0
2023-02-01Recompile CSS and add ".sass-cache" to .gitignoreThomas Lange4-1713/+1045
2023-01-03Put "try_files" directive into "location" contextThomas Lange1-1/+3
When used in the "server" context, the "try_files" directive will never get executed if there also is a "location / {}" block specified (which is most likely the case on a production vhost config).
2022-08-05Merge pull request #21 from MarkusHackspacher/patch-1Thomas Lange1-0/+1
SET NAMES 'utf8mb4'
2022-08-03SET NAMES 'utf8mb4'Markus Hackspacher1-0/+1
with SET NAMES can you imort the file with the commandline: mysql -u root blog < core/db/database.sql
2022-03-28Add notice about AllowOverride in .htaccessThomas Lange1-0/+6
2022-03-14Include category data in feed item templateThomas Lange1-0/+17
Include the category data and the category tree data in the feed item template in the same way as on the post's "main" or "item" template. So in the feed item template, the available parameters are now: $POST (already existed before) $USER (already existed before) $CATEGORY (added with this commit) $CATEGORIES (added with this commit) See the template documentation in the wiki for more information.
2021-10-02Don't use suppression operator for "session_start"Thomas Lange1-1/+3
Don't use the suppression operator "@" for the "session_start" call in the migrations.php file, but rather check properly if there already is an active session by checking the "session_status" return value.
2021-10-02Fix wrong color scheme identifier in migration.phpThomas Lange1-1/+1
The light color scheme was renamed from "main" to "bright" since the following commit: 01cbd757d69668b39c1b072b0449b77e6e2bee8d
2021-09-27Fix incorrect parameter list for logout actionThomas Lange1-1/+1
2021-09-19Pre-select the current user in page/post formThomas Lange2-2/+4
Pre-select the user with the user ID of the current session in the forms for creating a page or a post. This fixes the problem that occurs if one have multiple users in the database, but the create forms were not using the *current* logged-in user as the default selected user. The forms for modifying a page or post are not affected because they use the ID from "$FORM['DATA']['USER']" for selecting the correct user. This key is undefined on the create forms, so we use "$_SESSION['USER_ID']" for selecting the default user for creating new pages and posts.
2021-09-19Rename some session array keysThomas Lange2-5/+5
* Rename "auth" to "USER_ID" * Rename "token" to "CSRF_TOKEN"
2021-08-29Check for "is_file" in the SPL class autoloaderThomas Lange1-4/+8
2021-08-26Add underline for blue hyperlinks in admin themeThomas Lange3-3/+16
2021-08-26Don't use wrapper function "escapeHTML" internallyThomas Lange1-2/+2
Don't use the template function "escapeHTML" internally and replace all occurrences outside of the template files with "htmlspecialchars".
2021-08-26Explicitly set placeholder color for admin themeThomas Lange3-0/+24
Explicitly set the placeholder color and opacity for the form fields of the admin theme as the various browsers are using different defaults.
2021-08-26Explicitly set scrollbar colors for admin themeThomas Lange5-0/+108
Explicitly set the scrollbar colors for the admin theme instead of using the default colors of the web browser and integrate the scrollbar colors better into the user-selected color scheme (bright or dark).
2021-08-10Exclude "_modified" property from "getAll" methodThomas Lange1-0/+1
The "getAll" method of the Entity class should return an array with real attributes of the Entity object but not internally used properties.
2021-08-10Add "getModifiedKeys" method to EntityInterfaceThomas Lange1-0/+1
2021-08-10Declare "set" method of Entity class as voidThomas Lange2-4/+3
2021-08-10Add a better mechanism to detect Entity changesThomas Lange7-61/+68
Implement and use a better mechanism to detect changes of attributes of the Entity objects by using a private variable which keeps track of the changed Entity attributes ("properties") via the "set" method. The "insert" and "update" method of the Repository now calls the method "getModifiedKeys" of the Entity class to get a list of properties which have been changed and builds the database query accordingly. This makes the use of "FALSE" as default value for the Entity attributes obsolete, so they have been set to the initial PHP default ("NULL").
2021-08-10Clear floating for #message-list-wrapperThomas Lange3-0/+3
2021-08-09Merge regex pattern for search and feed controllerThomas Lange1-17/+5
2021-08-09Show ID in the heading of the update templateThomas Lange4-4/+16
Show the current entity ID right-floated in the update.php templates.
2021-08-09Show action button list in entity update templateThomas Lange7-4/+23
Add a link to the current entity on the website and a link to the entity delete form in the administration area's update.php templates.
2021-08-09Pass entity template data to the update templateThomas Lange4-0/+4
2021-08-09Fix some inconsistent variable namesThomas Lange4-12/+12
2021-08-05Update link to MySQL documentation in translationsThomas Lange4-6/+6
Since the introduction of the category system, the application requires MySQL >= 8.0, so we should update the links to the documentation of the MySQL search functionality to match the minimum required MySQL version.
2021-08-05Enhance error message for invalid CSRF tokenThomas Lange2-2/+2