Page 2 of 2
Re: FlatPress 1.3: Beta 1 released, please help testing
Posted: Sun Mar 10, 2024 6:36 pm
by fraenkiman
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
Re: FlatPress 1.3: Beta 1 released, please help testing
Posted: Sat Mar 16, 2024 12:04 pm
by Arvid
Wolfgang, thank you very much for yor testing and for reporting the outcome!

Re: FlatPress 1.3: Beta 1 released, please help testing
Posted: Sat Mar 16, 2024 9:02 pm
by Arvid
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"!
All the best
Arvid
Re: FlatPress 1.3: Beta 1 released, please help testing
Posted: Wed Jul 24, 2024 2:37 pm
by Tongara
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.
Re: FlatPress 1.3: Beta 1 released, please help testing
Posted: Wed Jul 24, 2024 5:03 pm
by Tongara
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
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!
Re: FlatPress 1.3: Beta 1 released, please help testing
Posted: Fri Jul 26, 2024 8:10 pm
by fraenkiman
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
Re: FlatPress 1.3: Beta 1 released, please help testing
Posted: Mon Aug 05, 2024 3:18 am
by Tongara
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~