FlatPress 1.3: Beta 1 released, please help testing

For devs and testers: Tests of current development versions, technical details of the code.
User avatar
fraenkiman
Posts: 253
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: FlatPress 1.3: Beta 1 released, please help testing

Post by fraenkiman » Sun Mar 10, 2024 6:36 pm

Hello Wolfram,

great that scaling images now works. I'll take a look at the GreyMatter theme in the course of the coming week. If there's anything new, I'll post it in the Theme support topic.

Best regards and have a good start into the new week
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

User avatar
Arvid
FlatPress Coder
Posts: 591
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: FlatPress 1.3: Beta 1 released, please help testing

Post by Arvid » Sat Mar 16, 2024 12:04 pm

Wolfgang, thank you very much for yor testing and for reporting the outcome! :)

User avatar
Arvid
FlatPress Coder
Posts: 591
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: FlatPress 1.3: Beta 1 released, please help testing

Post by Arvid » Sat Mar 16, 2024 9:02 pm

Okay guys, we're really making progress here: We have only two open issues before finally being able to release FlatPress 1.3!

One of them may be sorted out quite quickly.
But the other one is a little annoying: The Post Views plugin just doesn't show the view count :(
Everyone familiar with PHP and Smarty is invited to investigate this; I added my current findings to the GitHub issue.

And to all of you testers out there: We are on the home stretch!
Please get the latest development version from GitHub and test the heck out of it. Does everything work (and look) fine?

As soon as the Post Views bug is fixed, and if no other errors occur during your tests, we can finally release FlatPress 1.3 "Andante"! 8-)

All the best
Arvid

Tongara
Posts: 80
Joined: Wed Jan 22, 2020 11:09 am
Location: Birmingham, UK
Contact:

Re: FlatPress 1.3: Beta 1 released, please help testing

Post by Tongara » Wed Jul 24, 2024 2:37 pm

fraenkiman wrote: ↑Wed Jan 31, 2024 11:22 pm Hello Peter,

Thank you very much for your feedback.
Tongara wrote: ↑Wed Jan 31, 2024 10:23 am Used the updater package, and 500 errors. Literally can't access my site.
Meh, that's not supposed to happen.
It is possible that the theme/style you are using is not adapted to Smarty4. Just a wild guess.
Can you provide us with some excerpts from your server log?

With best regards
Frank
Finally got round to having another go at this. After enabling the debug mode, I was able to fix all errors apart from one...

I have a google search bar on my site. I followed https://www.igorkromin.net/index.php/20 ... ess-theme/ several years ago to do this.

This has worked until the current version.

The issue is, Smarty4 has dropped support for {php} tags. There have been quite a few complaints towards the Smarty devs for this, but it is what it is.

As can be seen in the code on that site, these are present in an important part of the forms code...

Code: Select all

<div>Search</div>
<form method="get" action="{$flatpress.www}">
<div>
<input type="text" name="q" 
  value="{php}echo $_GET['q']{/php}" 
  {literal}
  onkeydown="if (event.keyCode == 13) { this.form.submit(); return false; }"
  {/literal}
  placeholder="Search" autofocus/>
<input name="search" type="submit" value="Search" />
</div>
</form>
So, obviously I am stuck at this point. Could anyone either point me to a js alternative or help me adapt the code to work with Smarty4?

Apart from this, I have the latest 1.3.1 working on my site.

Tongara
Posts: 80
Joined: Wed Jan 22, 2020 11:09 am
Location: Birmingham, UK
Contact:

Re: FlatPress 1.3: Beta 1 released, please help testing

Post by Tongara » Wed Jul 24, 2024 5:03 pm

Sorry to double post, but it is impossible to edit messages after a certain time has passed, so I'll post here.

I managed to fix the above. The fix appears to be replacing any {php}, {include_php}, and {insert} tags with a hook using the "add_hook" function, as noted at the following page: https://help.whmcs.com/m/troubleshootin ... with-hooks

So, for the code I wanted to fix above, you would simply take

Code: Select all

value="{php}echo $_GET['q']{/php}" 
and replace it with

Code: Select all

add_hook="echo $_GET['q']"
That seemed to fix the issue, and I bet this could fix a bunch of other issues for people who have used old custom Flatpress code or just code of their own!

There may be a better method and this may well not work in the future, but for now I am happy. It is nice to be able to fix up yet another old Flatpress tutorial for modern versions.

Obviously if anyone has a better method, please feel free to post it!

User avatar
fraenkiman
Posts: 253
Joined: Thu Feb 03, 2022 7:25 pm
Location: Berlin, Germany
Contact:

Re: FlatPress 1.3: Beta 1 released, please help testing

Post by fraenkiman » Fri Jul 26, 2024 8:10 pm

Hello Tongara,

I have never tried to include Google search in my blog myself. Great that you found an alternative to the php tag. The {php}{/php} tags were apparently only supported for backwards compatibility with Smarty 2 to Smarty 3.1 (as a smartyBC class). In principle, I agree with wisskid that PHP and templates should be separated, which is the point of a template engine.
Would you like to create a wiki article from the combination of Igor's article and your PHP tag repacement?

Best regards and have a relaxing weekend
Frank
:pencil: You are strong in PHP and Java Script? :point_right: Then help us to improve FlatPress. :point_left:

:exploding_head: Looking for ideas, templates, examples and answers to frequently asked questions?
:bulb: You'll find it here.

My :de: FlatPress-Blog: https://frank-web.dedyn.io

Tongara
Posts: 80
Joined: Wed Jan 22, 2020 11:09 am
Location: Birmingham, UK
Contact:

Re: FlatPress 1.3: Beta 1 released, please help testing

Post by Tongara » Mon Aug 05, 2024 3:18 am

fraenkiman wrote: ↑Fri Jul 26, 2024 8:10 pm Hello Tongara,

I have never tried to include Google search in my blog myself. Great that you found an alternative to the php tag. The {php}{/php} tags were apparently only supported for backwards compatibility with Smarty 2 to Smarty 3.1 (as a smartyBC class). In principle, I agree with wisskid that PHP and templates should be separated, which is the point of a template engine.
Would you like to create a wiki article from the combination of Igor's article and your PHP tag repacement?

Best regards and have a relaxing weekend
Frank
Eh, I think it should be up to the end-user if they want to use PHP or not and not be restricted by the backend without having to make plugins to do so... but that is neither here nor there, I suppose. It won't change, so eventually I may find myself moving away from FlatPress if it becomes too much of a restriction.

Looks like I was beaten to making the wiki article. At least the knowledge is shared now~

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 0 guests