Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#111 2019-12-15 12:29:28

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,038
Website

Re: Dev news

etc wrote #320547:

All dialogs are concerned (tagbuilder, pophelp, etc), not only preview. It’s not a big annoyance, just a bit irritating.

Yeah, a few of the pop help popups merit to be kept on screen while interacting with the page. Luckily most are short and to the point and don’t need to be kept open.

Related to Preview and small screens: the “live preview” feature is disabled once the dialog is closed / dismissed, correct? If the user opens the preview and turns the live preview feature on, then dismisses the dialog (it is anyway in the way on a smartphone) to continue editing / typing / …, then the live preview won’t do nothing anymore as far as I understand it. Next time the user opens the dialog, an updated version of the text is displayed anyway.

In that case, on small screens, the checkbox and eventual related controls could be hidden, saving some real estate.


Where is that emoji for a solar powered submarine when you need it ?

Offline

#112 2020-01-17 04:44:31

Summer
Member
Registered: 2018-01-29
Posts: 58

Re: Dev news

Hi guys,
admin >> preferences >> site >> Date format / Archive date format.
These two date formats have some errors in the Chinese settings.
E.g.
1月17 (wrong) → 1月17日(correct).
The uppercase date in Chinese is xxxx年 xx月 xx日.

Offline

#113 2020-01-17 10:41:48

etc
Developer
Registered: 2010-11-11
Posts: 3,768
Website

Re: Dev news

Hello, thanks for the report. Dates are output via standard PHP functions. Can you test in some article which date format, e.g.

<txp:php>echo strftime('%m%B %d');</txp:php>

outputs correctly?

Offline

#114 2020-01-20 14:54:37

etc
Developer
Registered: 2010-11-11
Posts: 3,768
Website

Re: Dev news

Good news for those of us who need (for whatever reason) to append URL parameters to txp links. For example, suppose that we serve our articles in two languages, say en and ru, detected from URL lang parameter. Suppose also that our article form contains the links to the previous/next article:

...
<txp:link_to_prev>&laquo;</txp:link_to_prev>
<txp:link_to_next>&raquo;</txp:link_to_next>

Naturally, when we are on /title?lang=ru page, we want our prev/next links to inherit lang=ru parameter: /prev_title?lang=ru and /next_title?lang=ru. In txp 4.7 this can be achieved with something like

<txp:evaluate test="link_to_prev">
    <a href="<txp:link_to_prev /><txp:page_url type="lang" wraptag="?lang=<+>" />">&laquo;</a>
</txp:evaluate>
<txp:evaluate test="link_to_next">
    <a href="<txp:link_to_next /><txp:page_url type="lang" wraptag="?lang=<+>" />">&raquo;</a>
</txp:evaluate>

In 4.8 we have a more readable and flexible solution:

<txp:page_url context="lang">
    <txp:link_to_prev>&laquo;</txp:link_to_prev>
    <txp:link_to_next>&raquo;</txp:link_to_next>
</txp:page_url>

Moreover, we can easily ‘inherit’ multiple parameters and set some of them if needed:

<txp:page_url context="lang, chapter">
    <txp:link_to_prev chapter="1">&laquo;</txp:link_to_prev>
    <txp:link_to_next chapter="1">&raquo;</txp:link_to_next>
</txp:page_url>

Offline

#115 2020-01-20 16:45:31

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,159
Website

Re: Dev news

This is getting cooler and cooler!


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#116 2020-01-20 22:11:34

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,038
Website

Re: Dev news

colak wrote #321230:

This is getting cooler and cooler!

Echoing that; by 10x.


Where is that emoji for a solar powered submarine when you need it ?

Offline

#117 2020-01-30 07:17:53

Summer
Member
Registered: 2018-01-29
Posts: 58

Re: Dev news

Hi guys,
Advanced options → Custom form template types.
Can I set the form size?
E.g.
The js form defaults to 64kb. Set to 200kb?

Offline

#118 2020-02-03 13:32:53

etc
Developer
Registered: 2010-11-11
Posts: 3,768
Website

Re: Dev news

Summer wrote #321427:

Hi guys,
Advanced options → Custom form template types.
Can I set the form size?
E.g.
The js form defaults to 64kb. Set to 200kb?

Not via txp interface, but it should be safe to change txp_form.Form field type from TEXT to MEDIUMTEXT via some DB manager (e.g. phpMyAdmin). You will then get up to 16Mb, but most txp users would hardly need so much, so I don’t think we should do it in core.

Offline

#119 2020-02-04 13:41:07

etc
Developer
Registered: 2010-11-11
Posts: 3,768
Website

Re: Dev news

Last minute (hope non-breaking) news: in 4.8-dev global evaluate attribute and <txp:evaluate /> tag allow for custom processing order. For example,

<txp:evaluate test="tag3, tag1">
    <txp:tag1 />
    <txp:tag2 />
    <txp:tag3 />
    <txp:tag3 />
</txp:evaluate>

will first process both tag3, then tag1 and finally tag2 if one of tested tags is not empty.

Moreover, it is possible to use tags (top-level) order instead of its name:

<txp:evaluate test="4, tag1">
    <txp:tag1 />
    <txp:tag2 />
    <txp:tag3 />
    <txp:tag3 />
</txp:evaluate>

will test the second tag3 (4th inside the block), then tag1 and then the rest if necessary.

I have already found a use-case for this (pagination) which has actually inspired this commit.

Offline

#120 2020-02-04 13:42:38

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 3,076

Re: Dev news

Seriously, we’re gonna need at least a year to document all the hidden gems in Textpattern.

Offline

Board footer

Powered by FluxBB