Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2018-11-06 09:17:09

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

Re: [solved] Nth year counter from given start

Destry wrote #314976:

Better still, having a look in TXP, my old friend. (Wow, running 4.7.1) Grabbed gpb_perm_links from plugin composer and will see how templates are set up.

Well… spent some time poking around in my old friend. Heh.

Having some trouble if anyone can help me out. It could be a stone that kills three birds:

  1. Making some headway to putting TXP right (baby steps)
  2. Clearing up variable docs for people like me who need it.
  3. Getting the ‘Issue’ functionality working in my own project.

Here’s what I notice in TXP Mag admin-side, and perhaps a good place to start:

  • Content > Macros panel. There’s a macro, in_issue, that’s apparently involved with Issues functionality somehow, but macros seem to be broken in TXP. If you go to the panel and select the macro for edit mode to see what it looks like, nothing happens. And there’s some progress bar turning perpetually.
  • Admin > Permanent Links. There’s an error thrown on the panel. And if you try to open or edit any of the three created link patterns — two of which are seemingly relevant to Issues handling — you see the same thing in each case, only two fields filled: name of link and section it applies to. Beats me how the patterns are created.
  • Presentation > Forms. All of the form type widgets are expanded and can not be closed, whether individually or all at once using the ‘Collapse all’ link. While the forms themselves seem to be usable/editable, the expanded lists make it hard to navigate and work with them.

Btw, both plugin panels have complex forms that are just a mess. I hope plugin authors make better efforts going forward to usabilitize their UIs. Seriously, that should be a release requirement. And so should proper plugin documentation!

Overall, I think these are barriers to some degree of me being able to look at and map how the Issues functionality works in TXP Mag, which I can’t figure out yet. The variables, as mentioned, are another problem for me too.

For example, in the ‘section’ form, page_issue, it contains these seemingly relevant variables — issue, issue_month, and issue_year:

<txp:variable name="issue" /> <span class="emdash"><txp:variable name="issue_month" /> <txp:variable name="issue_year" /></span>

And in the ‘article’ form, articles_on_front_page, it also contains contains the issue variable, and another for feat_title:

<div id="toc">
<h2>In this issue</h2>
<txp:smd_featured label='issue_<txp:variable name="issue" />' wraptag="dl">
<txp:variable name="feat_title"><txp:smd_featured_info item="title" /></txp:variable>
<dt><txp:permlink><txp:if_variable name="feat_title" value=""><txp:title /><txp:else /><txp:variable name="feat_title" /></txp:if_variable></txp:permlink></dt>
<dd><txp:smd_featured_info item="description" /></dd>
</txp:smd_featured>
</div>

But where are these variables defined? And how does one know (concerning my repo issue question for docs)? I can’t try to mimic the logic in my project until I understand how it’s supposed to layer together in the mag. I’m having trouble mapping and unpacking it. The macro and PL problems mentioned above might be a factor there too. I don’t know.

Can anyone toss me a bone? I don’t want to have to look at Stef alone, but he’s got the history here with me. Would etc be interested in a mag account? It is a Txp site. ;)

After getting these immediate issues ironed-out, the next thing I’d want to do is modernize the tag architecture in the mag, and drop any unnecessary plugins. Right now the mag seems to have a lot of detritus festered about the panels and markup. Hard to tell what you’re supposed to be looking at. I think the number of forms could/should be consolidated too, and renamed to a more intuitive scheme. I might be guilty there back in the day, but, you know, improve as you go.

Offline

#14 2018-11-06 09:31:51

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

Re: [solved] Nth year counter from given start

Destry wrote #315004:

Would etc be interested in a mag account? It is a Txp site. ;)

Just don’t let me write anything but code :-)

Offline

#15 2018-11-06 09:41:20

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

Re: [solved] Nth year counter from given start

etc wrote #315005:

Just don’t let me write anything but code :-)

Just don’t let me write anything but text!

We might have a partnership.

I’ll let Stef set you up. He probably knows what email to use.

Offline

#16 2018-11-06 09:50:51

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

Re: [solved] Nth year counter from given start

My word, the Mag is quite the smd_ show isn’t it!

A lot of the issues are down to two things:

  • PHP 7 is now in use, but plugins use old mysql_*() calls or functions like split() that have been removed from PHP.
  • A content security policy is forbidding loading a lot of inline scripts, styles and SVG content, so stuff is missing from the admin side. That totally kills smd_macro, though it ought to be possible to design that out in 4.7 with shortcodes so I won’t invest any time in fixing it. Once the CSP is fixed, the plugin will limp along enough for you to copy out the macro definitions into Forms and change any macro calls from things like <txp:in_issue/> to shortcode counterparts like <txp::in_issue />. Or look in the macro table in the database, but the code might be base64’d, I can’t remember offhand.

I’ve fixed smd_user_manager to use mysqli_*() calls so at least user management limps home. But until the CSP is fixed, it’s hard to diagnose what’s an actual plugin issue and what isn’t.


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

#17 2018-11-06 09:53:57

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

Re: [solved] Nth year counter from given start

Destry wrote #315006:

I’ll let Stef set you up. He probably knows what email to use.

I see yours (under the name aside your posts), don’t you see mine?

Offline

#18 2018-11-06 10:00:05

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

Re: [solved] Nth year counter from given start

I’ve set an account up for you, etc. But whether you get the invite depends on whether smd_user_manager behaved itself. I got no notification because the message area uses JS that was blocked by the CSP. If you don’t get it, let me know and I’ll set your password to something and send it to you via PM.

smd_um is using the ‘old’ method of password management unfortunately. Sorely needs an update to bring it inline with the 4.7 methods.


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

#19 2018-11-06 10:19:49

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

Re: [solved] Nth year counter from given start

etc wrote #315008:

I see yours (under the name aside your posts), don’t you see mine?

Ah, yes. But sometimes people want to use a different email. I always allow for that at the start. ;)

Offline

#20 2018-11-06 10:24:56

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

Re: [solved] Nth year counter from given start

Destry wrote #315012:

Ah, yes. But sometimes people want to use a different email.

I’ve got nothing to hide from txp community… save few Easter eggs :-) Got no mail atm, but no rush.

Offline

#21 2018-11-06 11:07:56

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

Re: [solved] Nth year counter from given start

Bloke wrote #315007:

My word, the Mag is quite the smd_ show isn’t it!

And a great show it was. I’m sure everything would have been nudged along in regular manner had we stuck with it. ;) It was a fun ride that came to an end only for lack of writers.

If one needs proof, or a situational example, about how important writers are for a website, and especially one oriented around editorial, look no further than TXP. But I got to say, five years on and it still holds it down. It wouldn’t take much for un petit evolu.

Offline

#22 2018-11-06 13:23:45

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: [solved] Nth year counter from given start

Perhaps this could be an agenda item for that pending (virtual) txp-meetup :-)

Jonathan passed over the reigns of Textpattern Tips a couple of weeks ago and txpbuilders now host it (unchanged for the moment but I’ll look at that in due course). The magazine and tips serve similar functions but have different formats. They also overlap with but also augment the docs. Doing the txptips site transfer, and also updating the textpattern.org site to 4.7 recently, where there are also many tips and articles (albeit mostly outdated), made me think that there are number of new things in txp 4.7 that would make good content for magazine articles (e.g. building a theme, making a multi-site installation, working with flat files…) and number of smaller things that would also make good tips (like the new tags and 4.7 tricks like those Oleg has shown us). Maybe we can tie the mag, tips and docs together a bit more…

EDIT: maybe we should split this diverging thread out into a new topic?


TXP Builders – finely-crafted code, design and txp

Offline

#23 2018-11-06 16:38:40

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

Re: [solved] Nth year counter from given start

jakob wrote #315015:

Jonathan passed over the reigns of Textpattern Tips a couple of weeks ago and txpbuilders now host it

Aww… Glad it’s in good hands. Sad to see Mr. Stubbs go, which is essentially what that means. Time wears on us all. :{

EDIT: maybe we should split this diverging thread out into a new topic?

For that sites thinking stuff in relation to a TextMeat, yeah.

As far as the mag concernes my immediate objective for getting an issues system worked out, that discussion can remain here.

Offline

#24 2018-11-06 17:09:54

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

Re: [solved] Nth year counter from given start

Offline

Board footer

Powered by FluxBB