Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#265 2021-01-18 09:45:45

etc
Developer
Registered: 2010-11-11
Posts: 5,129
Website GitHub

Re: com_connect - form and contact mailer

You actually can use double colons with core tags too:

<if::first_article>
    Winner!
</if::first_article>

Offline

#266 2021-01-18 09:55:26

zero
Member
From: Lancashire
Registered: 2004-04-19
Posts: 1,470
Website

Re: com_connect - form and contact mailer

OMG, you guys are amazing!

<com::connect_secret ><site::url trim="/" /><page::url /></com::connect_secret>

BB6 Band My band
Gud One My blog

Offline

#267 2021-02-01 12:49:55

marios2
Member
From: Germany
Registered: 2019-07-31
Posts: 76

Re: com_connect - form and contact mailer

This is a bookmark post.

rgrds , marios

Offline

#268 2021-02-02 12:51:15

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: com_connect - form and contact mailer

marios2 wrote #328468:

This is a bookmark post.

Lol. Yeah, more regex to figure.

Actually, though, I almost think the new double-colon tags should be the new core suite. They take so much visual repetition out of markup. It’s nice.

Offline

#269 2021-02-02 13:01:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,402
Website GitHub

Re: com_connect - form and contact mailer

Destry wrote #328488:

I almost think the new double-colon tags should be the new core suite.

Aye, but it doesn’t work universally; only if the tag has an underscore. So you still need <txp:yield /> and <txp:evaluate /> and <txp:body />, for example, but can use <file::download_list> and <meta::description /> which is funner.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#270 2021-02-02 13:07:49

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: com_connect - form and contact mailer

What about <t::yield>, <t::body>, etc. ;)

Offline

#271 2021-02-02 13:57:37

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,402
Website GitHub

Re: com_connect - form and contact mailer

Destry wrote #328491:

What about <t::yield>, <t::body>, etc. ;)

Possibly, if you want to save one character’s typing :)

I recall the reason we chose double colon in the first place is so there’s less likelihood of a clash with namespaced values like <smd:something>, which are valid in XML. For consistency, we could look into a double colon for txp native tags too. Not sure what impact that would have on the parser. Oleg would be able to comment.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#272 2021-02-02 14:18:27

etc
Developer
Registered: 2010-11-11
Posts: 5,129
Website GitHub

Re: com_connect - form and contact mailer

Destry wrote #328488:

I almost think the new double-colon tags should be the new core suite.

Ahem.. it’s there since txp 4.6 (2016) :-)

Bloke wrote #328493:

Not sure what impact that would have on the parser.

No extra impact, whatever new scheme (e.g. <body:: /> or even <body: />) we allow. The price of the double colon syntax will mainly remain the difference between strpos() and preg_match(), multiplied by ~1000 parser calls to process an average page — hardly noticeable.

Offline

#273 2021-02-02 16:23:40

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: com_connect - form and contact mailer

etc wrote #328494:

Ahem.. it’s there since txp 4.6 (2016) :-)

Heh. True. What I had in mind as I wrote that was changing the focus of tag docs. O_o

<body: />)

Ooh, like.

Offline

#274 2021-02-16 17:16:22

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,058
Website GitHub Mastodon Twitter

Re: com_connect - form and contact mailer

Apologies I am posting this here but I could not find a dedicated thread for ext_file_attach which returns a validation error

Attribute maxlength is only allowed when the input type is email, password, search, tel, text, or url.

I understand maxlength to be the max attribute of the plugin. Is there a way to have this valided or should I just omit the attribute?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#275 2021-02-16 17:36:54

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,402
Website GitHub

Re: com_connect - form and contact mailer

Ugh, why am I trying to set the maxlength on a file input tag? That’s mad. Try editing the plugin and taking out lines 261-267. That should fix it. viz. remove this:

    if ($min) {
        $attr['minlength'] = 'minlength="' . intval($min) . '"';
    }

    if ($max) {
        $attr['maxlength'] = 'maxlength="' . intval($max) . '"';
    }

Please let know if that works and I’ll do it in the plugin.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#276 2021-02-16 17:58:26

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,058
Website GitHub Mastodon Twitter

Re: com_connect - form and contact mailer

Bloke wrote #328916:

Ugh, why am I trying to set the maxlength on a file input tag? That’s mad. Try editing the plugin and taking out lines 261-267. That should fix it. viz. remove this:

if ($min) {...

Please let know if that works and I’ll do it in the plugin.

So should I just remove the max attribute after updating the code with the one you suggest and add the max upload within the code?

The reason I am asking is because just updating the code and leaving the max attribute there, I still get the same error.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB