Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2020-06-25 09:28:19

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,615
Website GitHub Twitter

Re: Bibliography management

gaekwad wrote #323999:

Yiannis is actually a wizard, complete with a mysterious cloak and pointed hat.

No wizard:)


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#38 2020-06-25 09:47:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,285
Website GitHub

Re: Bibliography management

colak wrote #324001:

Maybe have the URL? ie equivalent to "$":http://domain.tld with rel="external" if needed.

As long as there’s a URL defined, sure that makes a lot of sense. We could fall back on that in the first instance perhaps. Then what would we do as a second avenue in case the URL is also empty? Do we need a second avenue at all? I mean, if you have no name and no URL, there’s pretty much no point having a link at all so maybe falling back on URL is enough?

Last edited by Bloke (2020-06-25 09:48:07)


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

#39 2020-06-25 15:08:04

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,615
Website GitHub Twitter

Re: Bibliography management

I agree that without a title and url, all we are left with is the description, which, a couple of years ago I was thinking of using as headless content. Now we have headless sections, which fill that gap. Could there be a check that either the title OR the url field are filled? In this way, if there is no title, the url could be ‘auto-filled,’ and if there is a title and no url, a list could still be parced.


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#40 2020-06-27 00:56:05

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

Re: Bibliography management

Bloke wrote #323983:

Now, one could argue that if you’re making a link, then the URL should be required. But I’ve just worked on a site where that’s not the case.

colak wrote #323994:

I’m using the links panel in creative ways.

Yah, the way I see it, Links (the panel) was conceived by Dean with blogrolls in mind, to easily keep a list of blogs in the sidebar to show what cool kid blogger crowd you were in with. They had a blog name, a URL, and a description was more the option than the norm.

But blogrolls haven’t been fashionable for 15 years, at least, and the Links panel has never been reinvented in response. I’m not even sure calling it a Links panel is sensible anymore. I think a ‘Lists’ panel (as in structured data lists) gets closer to something more usable for the times, from which a links list is just one of many types that could be created without having to start that way. Something to stew on.

Anyway, I look forward to trying Jakob’s augmented plugin, but considering core for the moment, here’s what I face in my current creative use of the panel as a bibliography management system, and taking into account that citation types are numerous, thus fields must be able to allow different possible situations for a given list using the fewest possible fields. At least that’s how I’m looking at it under the constraints. (I’ve used citation software before, and it allows highly granular, custom creation of data fields, so granular, in fact, that it’s almost overblown and confusing.)

What I’m seeing so far needed in my case is:

Every field needs to be conditional except the Description field, oddly enough, which in my situation will always have something in it. The more singular that something is, the better, and that’s where Jakob’s plugin might come in with extra fields, but always something. So if you had to make one field required, that would be the one I choose.

Related to the previous, yes, even the Time Stamp would need to be conditional in my case. I’m using it for ‘accessed on [date]’ output, but, as I’ve since realized while creating more entries, not all citations use one. The ‘accessed on…’ thing is meant for sources that can be accessed online, but for which their indicated URLs could change. It’s a way to say to readers over time that ‘the resource was there when I used it on [date], but too bad if the web has reshuffled itself.’ So, again, I’ll have to use a plugin field for this, I guess, to get the conditional ability I need there.

While the Title field (links panel field) should be conditional in my case in order to make use of it at all (and it would be a shame not to), it i also unfortunate, either way, that it has the position it does in the panel table. Because when not used, even with a void placeholder like I’m using (‘field not used’), it still provides no meaningful information or utility in the panel view. This would be a moot point if I could turn that column off in the Column Display Options and just rely on the ID link as a means to edit the record, but I can’t, currently because the ‘Name’ field in the options is grayed out.

Those are the sticklers I’ve identified in my case as far as the core panel goes.

Now, combined with a plugin that augments the fields, I could probably get near all I need with this combination of fields, assuming the core Title and URL fields could be used on a conditional basis:

Data type Txp field Plugin field
Author(s) [author]
Article title [title]
Source [description]
Edition [edition]
Editor(s) [editor]
Volume(s) [volume]
City [city]
Year [yyyy]
Type [type]
URL [url]
Accessed [date]

For example this:

Juliot, C., ed., L’Art de la Menuiserie par Roubo, Nouvelle edn, i (Paris, 1876) [online fascimile], https://gallica.bnf.fr/ark:/12148/bpt6k6555542d, accessed 24 June 2020.

Would be parsed as:

[author], [description], [edition], [volume] ([city], [yyyy]) [[type]], [url], accessed on [date].

If I didn’t have that many plugin fields available, as shown in the table, I could combine [edition], [editor], and [volume] data into the [description] easy enough, and other possible middle detail variations not represented in the table. This would give 3 Txp field and 5 plugin fields. For example:

[author], [description = source, edition, volume] ([city], [yyyy]) [[type]], [url], accessed on [date].

Offline

#41 2020-06-27 05:15:23

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,615
Website GitHub Twitter

Re: Bibliography management

I just thought that you can achieve the above using articles and custom fields in a headless section.
ie.

Data type Txp field Plugin field Write Tab
Author(s) [author] CF 1
Article title [title] Title field
Source [description] Body field
Edition [edition] CF 2
Editor(s) [editor] CF 3
Volume(s) [volume] CF 4
City [city] CF 5
Year [yyyy] CF 6
Type [type] CF 7
URL [url] CF 8
Accessed [date] Posted date

> Edited to add that you may even use article_image to include a picture of the publication (if appropriate).

Last edited by colak (2020-06-27 07:26:30)


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#42 2020-06-27 06:55:53

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

Re: Bibliography management

colak wrote #324038:

I just thought that you can achieve the above using articles and custom fields in a headless section.

I’d tend to agree with you. What Destry describes sounds like a whole new content type and if you (Destry) are not already using articles and want to avoid overlap, then you’re likely to get more flexibility out of txp:article and txp:article_custom than txp:linklist. You may not even need to assign them to a ‘pageless’ section if you’re displaying them anyway.

But, you’re welcome to try out the multiple field version of jcr_link_custom. Currently it gives you up to five extra fields, but it could be expanded easily to more.

The level of granularity you need depends firstly on whether you intend to slice-and-dice your output based on those different fields and possibly also on the styling or markup you might want to apply to the individual items. If three items will always be displayed together (in future too) and you don’t need to mark them up differently bar simple italicising or spans, then you can use textile in the respective field.


TXP Builders – finely-crafted code, design and txp

Offline

#43 2020-06-27 07:22:30

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,285
Website GitHub

Re: Bibliography management

Destry wrote #324036:

the way I see it, Links (the panel) was conceived by Dean with blogrolls in mind… and the Links panel has never been reinvented in response.

Agreed.

even the Time Stamp would need to be conditional in my case.

Since null dates are not permitted in SQL, we have no choice here. But there is a workaround, in a way. If you set any dates that you don’t want to a known-past date, say “1970-01-01 00:00:00” (which is treated as ‘zero’ in the epoch counting system) then you can detect that situation using something like this (untested):

<txp:evaluate query='<txp:link_date format="%s" /> > 0'>The date is used!</txp:evaluate>

Bit of a hack, and annoying that if you don’t want to use something you have to explicitly set it, which is counter-intuitive, but such is the nature of the system we’re working in at present.

if I could turn [the Title] column off in the Column Display Options

Just sort the table by a different column by clicking another heading, then you can turn it off. We don’t allow you to turn off the currently-in-use sort key as that breaks things.

combined with a plugin that augments the fields

Unlimited core custom fields can be used for all content types. They’ll be here. I promise.

Last edited by Bloke (2020-06-27 07:24:38)


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

#44 2020-06-27 09:24:49

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

Re: Bibliography management

colak wrote #324038:

you can achieve the above using articles and custom fields

Destry wrote #323908:

I do not want to Frankenstein a bibliography out of articles. Trying to make better use of links [panel] here, is the point.

Rather, Frankenstein the otherwise needless Links panel instead. ;)

The thing is, I’ve never liked having to use Articles for any content that isn’t already article-based. They don’t have to be ‘blog’ articles, per se, but there should be at least one component of the content item that is a multi-sentenced paragraph meant to be read like prose. Citations are not that. It just doesn’t look or feel right in the backend to mix data-oriented content types with article-based content types. And I am using citations in purely academic style, so no gratuitous elements like images and whatnot are added.

If that’s still too abstract, here’s another way I typically distinguish the two categories of types (article-based and data-oriented): article-based will mostly rely on textarea fields for the bulk of the text volume. Data-oriented will typically only rely text fields, with Description fields often being the one exception, as they are here.

Even when unlimited custom fields come along to create more article-based content types (how I would use it), I would not use the Articles panel for creating data-oriented types.

So in my case with bibliographies, either I find an acceptable compromising hack scenario using Links panel (otherwise not used at all), or I more painstakingly edit the master bibliography as a whole list in a single article, and subset lists at bottoms of main articles. More blob fodder in the Body blob field, but that’s what it would take.

Which leads me to clarify with Bloke…

Bloke wrote #324040:

Unlimited core custom fields can be used for all content types. They’ll be here. I promise.

‘for all content types’… You’re saying I would be able to use UCFs on the Links panel? If so, then problem solved. I’ll use Jakob’s plugin in combination with Link fields in the meantime, and redo it with UCFs when they land.

But if you’re still just talking about Article UCFs, then nothing changes for me, as I tried to explain above. In this case, I’d still keep using Jakob’s plugin, or write the bibliography as whole lists, because I would not want citation items sitting in the Articles panel with article items. They just don’t belong mixed together in my sense of organization. Sure, it can be done, but it doesn’t make sense to me…

Unless with UCFs we could also pull out a given type of article items (e.g. citations) and display them in their own Content panel (e.g. Citations); a custom panel composed of a sublist of articles. You could still see them in the Article table too, I guess, since that’s where they were created, but you wouldn’t have to access them that way. Easier by the custom panel that filters the specific items out. I guess you could then edit a given item by either panel, but 9 out of 10 times one would use the dedicated custom panel for working with existing items. That would change things for me when it came to custom content types. But I haven’t been keeping up with the plan there.

set dates you don’t want to a known past date, say “1970-01-01 00:00:00” (which is treated as ‘zero’ in the epoch counting system) then you can detect that situation using something like this (untested): <txp:evaluate query='<txp:link_date format="%s" /> > 0'>The date is used!</txp:evaluate>.... Bit of a hack, and annoying that if you don’t want to use something you have to explicitly set it, which is counter-intuitive, but such is the nature of the system we’re working in at present.

Noted. Thanks. I think it’s a moot issue now with Jakob’s augmented plugin.

Sort the table by a different column by clicking another heading, then you can turn it off.

Ha. I never paid attention to that fact before.

Last edited by Destry (2020-06-27 09:40:27)

Offline

#45 2020-06-27 10:05:59

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

Re: Bibliography management

jakob wrote #324039:

you’re welcome to try out the multiple field version of jcr_link_custom.

Is this the right location for the multi-field, jcr_link_custom? Still says updated ’4 years’ ago.

Offline

#46 2020-06-27 11:58:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,285
Website GitHub

Re: Bibliography management

Destry wrote #324047:

The thing is, I’ve never liked having to use Articles for any content that isn’t already _article_-based.

I agree. Use articles where it makes sense. The other types are there for your (ab)use where they’re more appropriate, and maybe in some far off distant utopia, custom types without the headache of spending aeons defining them from scratch.

‘for all content types’… You’re saying I would be able to use UCFs on the Links panel?

Yes. UCF has been designed from the ground up to add custom fields to all or any content types. This includes:

  • Articles
  • Files
  • Images
  • Links
  • Categories
  • Sections (will require a little table tweak as they don’t have IDs at the moment)
  • Authors (goodbye smd_bio!)
  • Third-party plugins (yes, there’s nothing to stop plugin authors registering their own fields as it’s just a linking system – internally in code, it’s known as The Meta Store. That’s primarily because ‘custom fields’ has already been taken in code, so we needed something else. But also because it’s really just a way to add structured, augmented metadata to anything you can lay your hands on).

As long as the tables they’re linking to have IDs, custom fields can be defined and attached to anything. And if a plugin adds their own, (e.g. custom content type) then the field definitions could be managed from the Admin->Custom Fields panel. Though I am considering the ability to specify some sort of field visibility in case a plugin wants to make them uneditable from the admin side – still thinking about this.

Last edited by Bloke (2020-06-27 12:03:14)


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

#47 2020-06-27 17:04:52

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

Re: Bibliography management

Destry wrote #324048:

Is this the right location for the multi-field, jcr_link_custom? Still says updated ’4 years’ ago.

That’s the original 1cf version. It is now :-)

I made a few small updates that migrate the settings from the earlier plugin without you having to set the custom field name. As with the article cfs it’s called “custom1” to begin with but you can rename it.

See the section in the docs for giving them your own name in the links panel.

EDIT: updated the links.


TXP Builders – finely-crafted code, design and txp

Offline

#48 2020-06-27 17:12:41

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

Re: Bibliography management

Bloke, that all sounds fab. Bibliography solved, then. Will evolve it as abilities arrive.

jakob wrote #324058:

You just need to switch to the “multiple fields” branch:

Zut, you had mentioned that before. Sorry.

Thanks a lot for extending the plugin.

EDIT: updated the link, see the topic above.

Offline

Board footer

Powered by FluxBB