Avatar

Where to begin... (General)

by Auge ⌂, Sunday, January 29, 2023, 17:20 (503 days ago) @ Cleo

Hello …

Ok, I have MLF installed - I like the format a lot. I installed another theme I like as well. However...

… and welcome.

I have no idea how to edit a site such as this, aside from the CSS. I understand the particular format relates to a template engine called Smarty - I am not experienced with, or familiar with this. I know how to edit HTML well, and PHP decently - I don't know how to even approach editing this code, though!

The project utilises Smarty, which is a template engine, that mixes HTML with a basic PHP-based programming language, that makes it possible to replace placeholders with content of variables and to loop over a collection of similar things to generate table rows or lists items.

Mostly it is possible to change snippets of HTML and/or CSS. But you have to be patient because the main structure and variable names are fixed to fulfill their purpose. If you have questions about specific code, feel free to ask.

To use a hard example, say

I wanted to change something simple like change 'New topic' to 'Post topic' …

As Micha already said, is this a topic of the language file. Keep in mind, if you change a wording in a language file of your installation, the change will be lost with the next upgrade if it is not transferred to the new files of the upgrade package. Similar counts for changes in template files. If you change files in the default theme, your changes will be overwritten in case of an upgrade. If you maintain your own theme – what is the recommended way –, you need to track functional changes from the default theme in case of an update.

Functional changes can be the introduction of form fields because of a security issue (we did this with the introduction of hidden fields with a csrf-token in many forms to prevent the inserting of unwanted content from external sources) or in general new fields for new purposes.

… or wanted to change # of allowable characters in a form field.

To change the number of characters for several fields is possible in the forum settings. This belongs in example to the user name, subject, e-mail-address and a few others. See therefore the configuration items description in the project wiki.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!


Complete thread:

 RSS Feed of thread