Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2018-11-05 14:17:38

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,020
Website

Re: [solved] Nth year counter from given start

Bloke wrote #314971:

The front page for an issues was a gbp_pl rule to translate /issue/N URLs into an article_custom search to grab the articles matching that issue CF.

That seems pretty straighforward, assuming that plugin is still usable. I’ll check.

Uhhh. Content->Articles. Checkboxes. Multi-edit->Change status to Live?

Haha… I live too long in my little nematode routines of simplicity and dankness.


The text persuades, the *notes prove。

Offline

#12 2018-11-05 14:25:36

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,020
Website

Re: [solved] Nth year counter from given start

Better still, having a look in 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.


The text persuades, the *notes prove。

Offline

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

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,020
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.


The text persuades, the *notes prove。

Offline

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

etc
Developer
Registered: 2010-11-11
Posts: 2,949
Website

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 :-)


etc_[ query | search | pagination | date | tree | cache ]

Offline

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

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,020
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.


The text persuades, the *notes prove。

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

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: 2,949
Website

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?


etc_[ query | search | pagination | date | tree | cache ]

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,458
Website

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
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,020
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. ;)


The text persuades, the *notes prove。

Offline

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

etc
Developer
Registered: 2010-11-11
Posts: 2,949
Website

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.


etc_[ query | search | pagination | date | tree | cache ]

Offline

Board footer

Powered by FluxBB