Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2020-01-29 10:57:33

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,565
Website GitHub Mastodon

Re: Feedback to: Textpattern CMS 4.8.0-beta.2 released

Myusername wrote #321390:

I don’t know if it’s known to the developers, but the 4.8.0-beta and 4.8.0-dev demo are misaligned on the mobile.

I think this is now fixed in latest dev version, based on a suggestion by Philippe. Let me know if not. Cheers!

Offline

#17 2020-01-29 15:24:06

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: Feedback to: Textpattern CMS 4.8.0-beta.2 released

etc wrote #321412:

Feel free to experiment:

I have a question.

<txp:variable name="firstpage" value='<txp:newer shift="-1" link=""><txp:yield item="page" /></txp:newer>' />

<txp:variable name="nextprevpage" value='<txp:newer shift="2" link=""><txp:yield item="page" /></txp:newer>' />

<txp:variable name="prevpage" value='<txp:newer shift="1" link=""><txp:yield item="page" /></txp:newer>' />

<txp:variable name="currentpage" value='<txp:newer shift="0" link=""><txp:yield item="page" /></txp:newer>' />

<txp:variable name="nextpage" value='<txp:older shift="1" link=""><txp:yield item="page" /></txp:older>' />

<txp:variable name="nextnextpage" value='<txp:older shift="2" link=""><txp:yield item="page" /></txp:older>' />

<txp:variable name="lastpage" value='<txp:older shift="-1" link=""><txp:yield item="page" /></txp:older>' />

<p>First Page: <txp:variable name="firstpage" /></p>

<p>Next Previous Page: <txp:variable name="nextprevpage" /></p>

<p>Previous Page: <txp:variable name="prevpage" /></p>

<p>Current Page: <txp:variable name="currentpage" /></p>

<p>Next Page: <txp:variable name="nextpage" /></p>

<p>Next Next Page: <txp:variable name="nextnextpage" /></p>

<p>Last Page: <txp:variable name="lastpage" /></p>

outputs

<p>First Page: 1</p>

<p>Next Previous Page: </p>

<p>Previous Page: 2</p>

<p>Current Page: 3</p>

<p>Next Page: 4</p>

<p>Next Next Page: 5</p>

<p>Last Page: </p>

It seems like once you get an answer with shift (ex. firstpage and nextprevpage should both be 1), you can’t get it again. Is there a way to reset this?

Addendum:

If you include the line of code in the head that phiw13 mentions above, the output becomes:

<p>First Page: 1</p>

<p>Next Previous Page: </p>

<p>Previous Page: 2</p>

<p>Current Page: 3</p>

<p>Next Page: </p>

<p>Next Next Page: </p>

<p>Last Page: </p>

Offline

#18 2020-01-29 16:45:45

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

Re: Feedback to: Textpattern CMS 4.8.0-beta.2 released

michaelkpate wrote #321420:

It seems like once you get an answer with shift (ex. firstpage and nextprevpage should both be 1), you can’t get it again. Is there a way to reset this?

You can try showalways="1" attribute, but be careful if prevpage does not exist.

Offline

#19 2020-01-29 17:22:00

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: Feedback to: Textpattern CMS 4.8.0-beta.2 released

etc wrote #321421:

You can try showalways="1" attribute, but be careful if prevpage does not exist.

That solved it. And I will.

And I just realized that

<txp:older shift="-1" link="" showalways="1"><txp:yield item="page" /></txp:older>

won’t return the last page if you are on the last page.

<txp:variable name="currentpage" value='<txp:newer shift="0" link="" showalways="1"><txp:yield item="page" /></txp:newer>' />

<txp:variable name="lastpage" value='<txp:older shift="-1" link="" showalways="1"><txp:yield item="page" /></txp:older>' />

<txp:if_variable name="lastpage" value="">
    <txp:variable name="lastpage" value='<txp:variable name="currentpage" />' />
</txp:if_variable>

Offline

#20 2020-01-29 20:51:38

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

Re: Feedback to: Textpattern CMS 4.8.0-beta.2 released

michaelkpate wrote #321423:

And I just realized that … shift="-1" … won’t return the last page if you are on the last page.

That’s right, to avoid duplicate last page links. But I have changed (in dev) the valueless shift in such a way that <txp:older shift /> will always link to the last page, even if you are on.

Offline

#21 2020-01-30 08:13:24

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

Re: Feedback to: Textpattern CMS 4.8.0-beta.2 released

This issue might be undoable, and it existed since the beginning of txp.

Is there a way to only count a complete file download? At the moment the file download number is incremented every time the link is clicked, without taking into consideration that the download may have been partial, and hence unreadable.


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

Offline

#22 2020-01-30 08:28:35

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,749
GitHub

Re: Feedback to: Textpattern CMS 4.8.0-beta.2 released

colak wrote #321428:

Is there a way to only count a complete file download?

Web server log files. Depending on the server, and the format of the log files, it’s possible to log the number of bytes sent for a given request. Typically, a line in a web server log is written at the end of a request, so if a GET request for a 10MB file completes with 10MB being transferred, then that value can be written to the log file. If the user or process bombs out before the end, the bytes sent is written.

Web server log file analytics is what you’re looking for, I think. I’ve used Sawmill before, it’s proprietary and pay-for, but was good when I needed it. See also: en.wikipedia.org/wiki/List_of_web_analytics_software for ideas.

Offline

#23 2020-01-30 09:16:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,479
Website GitHub

Re: Feedback to: Textpattern CMS 4.8.0-beta.2 released

Sadly not, Yiannis. Txp doesn’t know whether a download is canceled or is corrupt or if the power goes off mid-transaction. Once you click that link, and the dialog appears to save/view (or the download auto-starts, depending on your browser settings/mime type associations) the counter has been incremented. No way to do anything else.

It’s not like there’s even any callback or hook to get hold of when a download is complete, nor during its transfer. Once it’s passed over to the browser for download, it’s out of our hands.


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#24 2020-01-30 11:33:28

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

Re: Feedback to: Textpattern CMS 4.8.0-beta.2 released

Bloke wrote #321430:

Sadly not, Yiannis. Txp doesn’t know whether a download is canceled or is corrupt or if the power goes off mid-transaction. Once you click that link, and the dialog appears to save/view (or the download auto-starts, depending on your browser settings/mime type associations) the counter has been incremented. No way to do anything else.

It’s not like there’s even any callback or hook to get hold of when a download is complete, nor during its transfer. Once it’s passed over to the browser for download, it’s out of our hands.

I thought that would be the case. No worries.

gaekwad wrote #321429:

Web server log file analytics is what you’re looking for, I think. I’ve used Sawmill before, it’s proprietary and pay-for, but was good when I needed it. See also: en.wikipedia.org/wiki/List_of_web_analytics_software for ideas.

A few weeks ago, I deleted Matomo from our site. For years I could track our visitors behaviour in our site, through slimstat, g-analytics, and piwik/Matomo. Since GDPR we opted to leave the cookie consent as unobtrusive as possible, because we would rather have visitors reading our content rather than having to give in to being tracked-be that in an ethical way. As such, I would rather not install any software for now and I will suffice with g-analytics, as pointless as it is for us now. Having said that www.openwebanalytics.com/ looks interesting.


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

Offline

#25 2020-01-30 12:57:24

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,207
Website GitHub

Re: Feedback to: Textpattern CMS 4.8.0-beta.2 released

colak wrote #321431:

Having said that www.openwebanalytics.com/ looks interesting.

You might want to look at Fathom, which has an open-source variant but has some specific server requirements. I couldn’t get it to work quite as I wanted. There’s a pay variant of that, though, where you don’t have to deal with that. You can use it for several sites at once.

Another pay service that says no consent notice is required at all is simpleanalytics. The reports are pleasingly simple to appraise too. Again, when used for several sites without huge page views, it could be a real alternative if you split the cost.


TXP Builders – finely-crafted code, design and txp

Offline

#26 2020-01-31 07:41:04

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,657
Website

Re: Feedback to: Textpattern CMS 4.8.0-beta.2 released

I’ve updated one (small and simple) real world site. Everything went fine. The com_connect plugin still works fine and sends a saner agent-string: X-PHP-Originating-Script: 72467:com_connect.php.

One note: on the upgrading page, please add a note that the /textpattern/plugins must be writeable, else you get a bunch of warnings when logging in. That makes everybody unhappy – Diagnostics panel would explain the issue as well, who sees that when first logging in ? (and yeah, my upgrade was on shared server with PHP/Apache configured that way).


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#27 2020-01-31 11:18:31

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,479
Website GitHub

Re: Feedback to: Textpattern CMS 4.8.0-beta.2 released

phiw13 wrote #321444:

on the upgrading page, please add a note that the /textpattern/plugins must be writeable

Good catch. Since we’ve not officially released 4.8.0 yet, I’ve not done this here (yet). But I have:

  • Added info about downloading the beta there.
  • Added mention of the plugins directory permissions on the new installation and upgrading docs.
phiw13 wrote #321444:

else you get a bunch of warnings when logging in

PHP warning messages? That’s not good. I’d like there to be no horrible warnings if the dir is not writeable. We should trap this and spit out something nicer. Would you raise an issue with steps-to-reproduce please so we can keep it on our radar and see if something can be done about it.

Thanks!


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#28 2020-01-31 11:44:39

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,657
Website

Re: Feedback to: Textpattern CMS 4.8.0-beta.2 released

Bloke wrote #321446:

Good catch. Since we’ve not officially released 4.8.0 yet, I’ve not done this here (yet). But I have […]:

Good, that is what i like to see :-).

PHP warning messages? That’s not good. I’d like there to be no horrible warnings if the dir is not writeable. We should trap this and spit out something nicer. Would you raise an issue with steps-to-reproduce please so we can keep it on our radar and see if something can be done about it.

Hmm, not sure if those where those typical PHP thingies you get when you enable debugging mode. doubts doubts… it is anyway at the top of each page / panel. I’ll see how I can go about to reproduce it with screenshots and all those fancy things.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#29 2020-02-03 01:31:54

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,657
Website

Re: Feedback to: Textpattern CMS 4.8.0-beta.2 released

Bloke wrote #321446:

PHP warning messages? That’s not good. I’d like there to be no horrible warnings if the dir is not writeable. We should trap this and spit out something nicer.

Here you go: issue 1465. excuse the poor markdown formatting as usual..


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#30 2020-02-03 10:48:53

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

Re: Feedback to: Textpattern CMS 4.8.0-beta.2 released

phiw13 wrote #321444:

I’ve updated one (small and simple) real world site. Everything went fine. The com_connect plugin still works fine and sends a saner agent-string: X-PHP-Originating-Script: 72467:com_connect.php.

One note: on the upgrading page, please add a note that the /textpattern/plugins must be writeable, else you get a bunch of warnings when logging in. That makes everybody unhappy – Diagnostics panel would explain the issue as well, who sees that when first logging in ? (and yeah, my upgrade was on shared server with PHP/Apache configured that way).

Just to say that there is no such issue on my server with 755 permissions on the plugins folder.


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